From 1b2c89e1f36819e04d5d8ad30dc1a7f80956690d Mon Sep 17 00:00:00 2001 From: Aleksandr Rodionov Date: Sun, 4 Oct 2026 15:51:51 +0300 Subject: [PATCH 1/4] Add source-aware file actions and artifact path search (#524) --- src/commands/up.rs | 123 ++++- src/local/files.rs | 188 +++++++ ...iew-DfZYK3-b.js => PdfPreview--NppkCR0.js} | 2 +- ui/dist/assets/index-CZskjF0U.css | 1 - .../{index-BxuZLhmE.js => index-CdYShGTw.js} | 458 +++++++++--------- ui/dist/assets/index-IGs9wcek.css | 1 + ui/dist/index.html | 4 +- ui/messages/ar.json | 11 +- ui/messages/en.json | 11 +- ui/messages/es.json | 11 +- ui/messages/fa.json | 11 +- ui/messages/hi.json | 11 +- ui/messages/zh-CN.json | 11 +- ui/src/App.tsx | 18 +- ui/src/api.ts | 23 +- ui/src/components/ArtifactsTab.tsx | 105 +++- ui/src/components/FileLinkActions.tsx | 85 ++++ ui/src/components/FilePathDetails.tsx | 35 ++ ui/src/components/FileTreeActions.tsx | 43 +- ui/src/components/FileViewer.tsx | 22 +- ui/src/components/Md.tsx | 18 +- ui/src/fileLocation.ts | 43 ++ ui/src/queries/files.ts | 16 +- ui/src/queries/invalidation.ts | 2 +- ui/tests/copyFilePath.test.mjs | 33 ++ ui/tests/fileLinkActions.test.mjs | 64 +++ ui/tests/fileLocation.test.mjs | 31 ++ 27 files changed, 1081 insertions(+), 300 deletions(-) rename ui/dist/assets/{PdfPreview-DfZYK3-b.js => PdfPreview--NppkCR0.js} (99%) delete mode 100644 ui/dist/assets/index-CZskjF0U.css rename ui/dist/assets/{index-BxuZLhmE.js => index-CdYShGTw.js} (53%) create mode 100644 ui/dist/assets/index-IGs9wcek.css create mode 100644 ui/src/components/FileLinkActions.tsx create mode 100644 ui/src/components/FilePathDetails.tsx create mode 100644 ui/src/fileLocation.ts create mode 100644 ui/tests/copyFilePath.test.mjs create mode 100644 ui/tests/fileLinkActions.test.mjs create mode 100644 ui/tests/fileLocation.test.mjs diff --git a/src/commands/up.rs b/src/commands/up.rs index 05b2316c5..7f0d35c49 100644 --- a/src/commands/up.rs +++ b/src/commands/up.rs @@ -554,6 +554,11 @@ fn router(state: AppState, remote_auth: Option) -> Router { .route("/api/projects/{id}/file/raw", get(project_raw_file)) .route("/api/projects/{id}/file/open", post(open_project_file)) .route("/api/projects/{id}/file/reveal", post(reveal_project_file)) + .route( + "/api/projects/{id}/file/location", + get(project_file_location), + ) + .route("/api/projects/{id}/files/search", get(search_artifacts)) .route("/api/projects/{id}/file/latex", post(compile_project_latex)) .route("/api/latex/engine", get(latex_engine)) .route( @@ -3378,9 +3383,78 @@ async fn write_project_file( struct OpenProjectFileReq { path: String, session_id: Option, + #[serde(default)] + source: Option, + #[serde(default)] + r#ref: Option, +} + +/// Resolve only the source that answered the preview, never a second fallback. +/// The caller passes the reader's resolved path/root; Git blobs have no disk path. +fn file_location_path(id: &str, req: &OpenProjectFileReq) -> Result { + if req.r#ref.as_deref().is_some_and(|r| !r.is_empty()) { + return Err(bad_request( + "committed versions have no current filesystem path", + )); + } + let store = Store::open()?; + let project = store + .get_local_project(id)? + .ok_or_else(|| not_found("project"))?; + match req.source.as_deref().unwrap_or("repo") { + "repo" => confined_checkout_file(id, req, "reveal"), + "artifacts" => { + if req.path.is_empty() { + return crate::paths::canonicalize(&local::files::ensure_dir(&project)?) + .map_err(|e| ApiError::from(anyhow!("artifacts unavailable: {e}"))); + } + local::files::file_path(&project, &req.path).map_err(bad_request) + } + "abs" => { + let (_, path) = validated_absolute_file_path(&req.path)?; + crate::paths::canonicalize(&path).map_err(|e| match e.kind() { + std::io::ErrorKind::NotFound => not_found("file"), + _ => ApiError::from(anyhow!("file unavailable: {e}")), + }) + } + _ => Err(bad_request("invalid file source")), + } +} + +async fn project_file_location( + Path(id): Path, + Query(req): Query, +) -> ApiResult { + blocking_api(move || { + if req.r#ref.as_deref().is_some_and(|r| !r.is_empty()) { + // A ref is provenance, not permission to reveal an unrelated live copy. + return Ok(Json(json!({ "absolutePath": null, "isDir": false }))); + } + let full = file_location_path(&id, &req)?; + Ok(Json( + json!({ "absolutePath": full.to_string_lossy(), "isDir": full.is_dir() }), + )) + }) + .await } /// Canonical path of a checkout-relative file, confined to the checkout root. +fn ensure_selected_worktree(req: &OpenProjectFileReq, root_kind: &str) -> Result<(), ApiError> { + // New source-aware callers already resolved a preview. A supplied session + // therefore names that worktree, not permission to fall back after it vanishes. + // Legacy callers omit source and retain their existing clone fallback. + if req.source.as_deref() == Some("repo") + && req + .session_id + .as_deref() + .is_some_and(|id| !id.trim().is_empty()) + && root_kind != "worktree" + { + return Err(not_found("session worktree")); + } + Ok(()) +} + fn confined_checkout_file( id: &str, req: &OpenProjectFileReq, @@ -3394,7 +3468,8 @@ fn confined_checkout_file( let project = store .get_local_project(id)? .ok_or_else(|| not_found("project"))?; - let (root, _) = resolve_checkout_root(&store, &project, req.session_id.as_deref())?; + let (root, root_kind) = resolve_checkout_root(&store, &project, req.session_id.as_deref())?; + ensure_selected_worktree(req, root_kind)?; let full = match crate::paths::canonicalize(root.join(&rel_path)) { Ok(p) => p, Err(e) if e.kind() == std::io::ErrorKind::NotFound => return Err(not_found("file")), @@ -3431,7 +3506,7 @@ async fn reveal_project_file( Json(req): Json, ) -> ApiResult { blocking_api(move || { - let full = confined_checkout_file(&id, &req, "reveal")?; + let full = file_location_path(&id, &req)?; crate::editors::reveal_in_file_manager(&full) .map_err(|e| ApiError::from(anyhow!("could not reveal file: {e}")))?; Ok(Json(json!({ "ok": true }))) @@ -4224,6 +4299,30 @@ async fn list_artifacts(Path(id): Path) -> ApiResult { .await } +#[derive(Deserialize)] +struct ArtifactSearchQuery { + q: String, + after: Option, +} + +async fn search_artifacts( + Path(id): Path, + Query(q): Query, +) -> ApiResult { + if q.q.len() > 1024 || q.after.as_ref().is_some_and(|s| s.len() > 4096) { + return Err(bad_request("search query is too long")); + } + blocking_api(move || { + let store = Store::open()?; + let project = store + .get_local_project(&id)? + .ok_or_else(|| not_found("project"))?; + let result = local::files::search(&project, &q.q, q.after.as_deref())?; + Ok(Json(json!(result))) + }) + .await +} + async fn manage_artifact_file( State(state): State, Path(id): Path, @@ -7988,6 +8087,26 @@ pub(crate) async fn spa(uri: Uri) -> Response { #[cfg(test)] mod tests { + #[test] + fn resolved_os_actions_do_not_fall_back_after_a_worktree_disappears() { + let request: super::OpenProjectFileReq = serde_json::from_value(serde_json::json!({ + "path": "report.md", "source": "repo", "sessionId": "chat" + })) + .unwrap(); + assert!(super::ensure_selected_worktree(&request, "clone").is_err()); + assert!(super::ensure_selected_worktree(&request, "worktree").is_ok()); + let clone: super::OpenProjectFileReq = serde_json::from_value(serde_json::json!({ + "path": "report.md", "source": "repo" + })) + .unwrap(); + assert!(super::ensure_selected_worktree(&clone, "clone").is_ok()); + let legacy: super::OpenProjectFileReq = serde_json::from_value(serde_json::json!({ + "path": "report.md", "sessionId": "pruned" + })) + .unwrap(); + assert!(super::ensure_selected_worktree(&legacy, "clone").is_ok()); + } + use super::*; #[test] diff --git a/src/local/files.rs b/src/local/files.rs index 0cad5d3d7..3ab07a9e4 100644 --- a/src/local/files.rs +++ b/src/local/files.rs @@ -315,6 +315,125 @@ pub struct ArtifactsListing { pub truncated: bool, } +#[derive(Debug, Serialize)] +#[serde(rename_all = "camelCase")] +pub struct ArtifactSearch { + pub entries: Vec, + pub next_cursor: Option, + /// Unreadable/disappearing directories must not masquerade as a complete search. + pub incomplete: bool, +} + +const SEARCH_PAGE_SIZE: usize = 200; + +/// An on-demand filesystem search, independent of the cheap live-listing cap. +/// Keep at most one page + a sentinel in memory; cursors are relative paths, +/// not offsets into a truncated tree. No file contents are read. +fn search_dir(base: &Path, query: &str, after: Option<&str>) -> ArtifactSearch { + struct Walk<'a> { + base: &'a Path, + query: &'a str, + after: Option<&'a str>, + hits: std::collections::BTreeMap, + ancestors: std::collections::HashSet, + incomplete: bool, + } + impl Walk<'_> { + fn visit(&mut self, dir: &Path, prefix: &str) { + let canonical = match crate::paths::canonicalize(dir) { + Ok(p) if p.starts_with(self.base) => p, + _ => { + self.incomplete = true; + return; + } + }; + // Track ancestors, not every visited directory: aliases may be valid + // paths in their own right, but a link back up must not recurse forever. + if !self.ancestors.insert(canonical.clone()) { + return; + } + match std::fs::read_dir(dir) { + Err(_) => self.incomplete = true, + Ok(entries) => { + for result in entries { + let entry = match result { + Ok(e) => e, + Err(_) => { + self.incomplete = true; + continue; + } + }; + let name = entry.file_name().to_string_lossy().into_owned(); + if is_ignored(&name) { + continue; + } + let Some(md) = followed_metadata(self.base, &entry) else { + continue; + }; + let path = if prefix.is_empty() { + name.clone() + } else { + format!("{prefix}/{name}") + }; + if md.is_dir() { + self.visit(&entry.path(), &path); + } else if md.is_file() + && path.to_lowercase().contains(self.query) + && self.after.is_none_or(|after| path.as_str() > after) + { + self.hits.insert( + path.clone(), + ArtifactEntry { + name, + path: path.clone(), + is_dir: false, + size: md.len(), + modified_at: mtime_ms(&md), + presentation: Some(presentation_for_path(&path)), + children: Vec::new(), + }, + ); + if self.hits.len() > SEARCH_PAGE_SIZE + 1 { + self.hits.pop_last(); + } + } + } + } + } + self.ancestors.remove(&canonical); + } + } + let query = query.trim().to_lowercase(); + let mut walk = Walk { + base, + query: &query, + after, + hits: Default::default(), + ancestors: Default::default(), + incomplete: false, + }; + if !query.is_empty() { + walk.visit(base, ""); + } + let has_more = walk.hits.len() > SEARCH_PAGE_SIZE; + let entries: Vec<_> = walk.hits.into_values().take(SEARCH_PAGE_SIZE).collect(); + let next_cursor = if has_more { + entries.last().map(|e| e.path.clone()) + } else { + None + }; + ArtifactSearch { + entries, + next_cursor, + incomplete: walk.incomplete, + } +} + +pub fn search(project: &LocalProject, query: &str, after: Option<&str>) -> Result { + let base = crate::paths::canonicalize(&ensure_dir(project)?)?; + Ok(search_dir(&base, query, after)) +} + fn mtime_ms(md: &std::fs::Metadata) -> i64 { md.modified() .ok() @@ -499,6 +618,75 @@ mod tests { let _ = std::fs::remove_dir_all(root); } + #[test] + fn search_finds_paths_beyond_the_live_listing_limit() { + let (root, base, _) = scratch(); + for i in 0..MAX_ENTRIES + 5 { + std::fs::write(base.join(format!("report-{i:04}.md")), "x").unwrap(); + } + let canonical = crate::paths::canonicalize(&base).unwrap(); + let (entries, truncated) = collect_tree(&canonical, &canonical, "", &mut 0); + assert!(truncated); + let missing = (0..MAX_ENTRIES + 5) + .map(|i| format!("report-{i:04}.md")) + .find(|path| !entries.iter().any(|e| &e.path == path)) + .unwrap(); + let result = search_dir(&canonical, &missing.to_uppercase(), None); + assert_eq!(result.entries.len(), 1); + assert_eq!(result.entries[0].path, missing); + assert!(result.next_cursor.is_none()); + assert!(!result.incomplete); + let _ = std::fs::remove_dir_all(root); + } + + #[test] + fn search_paginates_without_duplicate_or_missing_matches() { + let (root, base, _) = scratch(); + std::fs::create_dir(base.join("reports")).unwrap(); + for i in 0..SEARCH_PAGE_SIZE * 2 + 3 { + std::fs::write(base.join(format!("reports/result-{i:04}.txt")), "x").unwrap(); + } + let canonical = crate::paths::canonicalize(&base).unwrap(); + let mut cursor = None; + let mut paths = Vec::new(); + loop { + let result = search_dir(&canonical, "REPORTS/", cursor.as_deref()); + assert!(result.entries.len() <= SEARCH_PAGE_SIZE); + paths.extend(result.entries.into_iter().map(|e| e.path)); + cursor = result.next_cursor; + if cursor.is_none() { + break; + } + } + assert_eq!(paths.len(), SEARCH_PAGE_SIZE * 2 + 3); + assert!(paths.windows(2).all(|p| p[0] < p[1])); + assert!(search_dir(&canonical, " ", None).entries.is_empty()); + let _ = std::fs::remove_dir_all(root); + } + + #[test] + fn search_confines_symlinks_and_breaks_cycles_but_keeps_valid_aliases() { + let (root, base, outside) = scratch(); + std::fs::create_dir(base.join("reports")).unwrap(); + std::fs::write(base.join("reports/result.md"), "x").unwrap(); + symlink(&outside, base.join("outside")).unwrap(); + symlink(&base, base.join("reports/loop")).unwrap(); + symlink(base.join("reports"), base.join("alias")).unwrap(); + let canonical = crate::paths::canonicalize(&base).unwrap(); + assert!(search_dir(&canonical, "secret", None).entries.is_empty()); + let result = search_dir(&canonical, "result", None); + assert_eq!( + result + .entries + .iter() + .map(|e| e.path.as_str()) + .collect::>(), + ["alias/result.md", "reports/result.md"] + ); + assert!(!result.incomplete); + let _ = std::fs::remove_dir_all(root); + } + #[test] fn blocks_symlink_file_escape() { let (root, base, outside) = scratch(); diff --git a/ui/dist/assets/PdfPreview-DfZYK3-b.js b/ui/dist/assets/PdfPreview--NppkCR0.js similarity index 99% rename from ui/dist/assets/PdfPreview-DfZYK3-b.js rename to ui/dist/assets/PdfPreview--NppkCR0.js index 3a2708a2d..6c78a2246 100644 --- a/ui/dist/assets/PdfPreview-DfZYK3-b.js +++ b/ui/dist/assets/PdfPreview--NppkCR0.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-BxuZLhmE.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-CdYShGTw.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-CZskjF0U.css b/ui/dist/assets/index-CZskjF0U.css deleted file mode 100644 index 744fafb67..000000000 --- a/ui/dist/assets/index-CZskjF0U.css +++ /dev/null @@ -1 +0,0 @@ -/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--spacing:.25rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:6px;--radius-md:8px;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-3xl:64px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-diff-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-selection:color-mix(in oklab, var(--surface) 76%, var(--primary))}}:root,:host{--color-diff-gutter-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-gutter-selection:color-mix(in oklab, var(--surface) 68%, var(--primary))}}:root,:host{--color-diff-insert-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-gutter:color-mix(in oklab, var(--base) 84%, var(--accent-green))}}:root,:host{--color-diff-delete-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-gutter:color-mix(in oklab, var(--base) 86%, var(--accent-red))}}:root,:host{--color-diff-insert-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-code:color-mix(in oklab, var(--base) 91%, var(--accent-green))}}:root,:host{--color-diff-delete-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-code:color-mix(in oklab, var(--base) 92%, var(--accent-red))}}:root,:host{--color-diff-insert-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-edit:color-mix(in oklab, var(--base) 72%, var(--accent-green))}}:root,:host{--color-diff-delete-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-edit:color-mix(in oklab, var(--base) 78%, var(--accent-red))}}:root,:host{--color-diff-omit-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-omit-gutter:color-mix(in oklab, var(--base) 86%, var(--text))}}}@layer base{*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--base);color:var(--text);font-family:var(--sans);font-size:1rem;line-height:1.45;overflow:hidden}::selection{background:var(--highlight)}.chat-thread-inner ::selection{background:var(--chat-annotation-highlight)}::highlight(chat-annotations){background:var(--chat-annotation-highlight)}::highlight(side-chat-annotations){background:var(--chat-annotation-highlight)}.file-view-editarea::selection{background:var(--editor-selection)}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:none;padding:0}input,textarea,select{font:inherit;color:var(--text);background:var(--base);border:1px solid var(--border);border-radius:var(--radius-md);outline:none;padding:6px 10px}input:focus,textarea:focus,select:focus{border-color:var(--text)}input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--border);border-radius:var(--radius-sm);background-clip:padding-box;border:2px solid #0000}::-webkit-scrollbar-track{background:0 0}}@layer vendor{.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-color-default:inherit;--xy-node-border-default:1px solid #1a192b;--xy-node-background-color-default:#fff;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #00000014;--xy-node-boxshadow-selected-default:0 0 0 .5px #1a192b;--xy-node-border-radius-default:3px;--xy-handle-background-color-default:#1a192b;--xy-handle-border-color-default:#fff;--xy-selection-background-color-default:#0059dc14;--xy-selection-border-default:1px dotted #0059dccc;--xy-controls-button-background-color-default:#fefefe;--xy-controls-button-background-color-hover-default:#f4f4f4;--xy-controls-button-color-default:inherit;--xy-controls-button-color-hover-default:inherit;--xy-controls-button-border-color-default:#eee;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#fff;--xy-edge-label-color-default:inherit;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8;--xy-node-border-default:1px solid #3c3c3c;--xy-node-background-color-default:#1e1e1e;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #ffffff14;--xy-node-boxshadow-selected-default:0 0 0 .5px #999;--xy-handle-background-color-default:#bebebe;--xy-handle-border-color-default:#1e1e1e;--xy-selection-background-color-default:#c8c8dc14;--xy-selection-border-default:1px dotted #c8c8dccc;--xy-controls-button-background-color-default:#2b2b2b;--xy-controls-button-background-color-hover-default:#3e3e3e;--xy-controls-button-color-default:#f8f8f8;--xy-controls-button-color-hover-default:#fff;--xy-controls-button-border-color-default:#5b5b5b;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#141414;--xy-edge-label-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color,var(--xy-handle-border-color-default));border-radius:100%;width:6px;min-width:5px;height:6px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{box-shadow:var(--xy-controls-box-shadow,var(--xy-controls-box-shadow-default));flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{background:var(--xy-controls-button-background-color,var(--xy-controls-button-background-color-default));border:none;border-bottom:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)));width:26px;height:26px;color:var(--xy-controls-button-color-props,var(--xy-controls-button-color,var(--xy-controls-button-color-default)));cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border-radius:var(--xy-node-border-radius,var(--xy-node-border-radius-default));width:150px;color:var(--xy-node-color,var(--xy-node-color-default));text-align:center;border:var(--xy-node-border,var(--xy-node-border-default));background-color:var(--xy-node-background-color,var(--xy-node-background-color-default));padding:10px;font-size:12px}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover,var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected,var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color,var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var(--xy-controls-button-background-color-hover-props,var(--xy-controls-button-background-color-hover,var(--xy-controls-button-background-color-hover-default)));color:var(--xy-controls-button-color-hover-props,var(--xy-controls-button-color-hover,var(--xy-controls-button-color-hover-default)))}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)))}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color,var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color,var(--xy-edge-label-color-default))}.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2)format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff)format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff)format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff)format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2)format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff)format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2)format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff)format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2)format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff)format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2)format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff)format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2)format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff)format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2)format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff)format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff)format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff)format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff)format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2)format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff)format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2)format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff)format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2)format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff)format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC)format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff)format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2)format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff)format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2)format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff)format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf)format("truetype")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif;position:relative}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{clip-path:inset(50%);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{white-space:nowrap;width:min-content;position:relative}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{flex-direction:row;display:inline-flex}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{line-height:0;display:inline}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;height:inherit;width:100%;display:block;position:absolute}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo}:root{--diff-background-color:initial;--diff-text-color:initial;--diff-font-family:Consolas,Courier,monospace;--diff-selection-background-color:#b3d7ff;--diff-selection-text-color:var(--diff-text-color);--diff-gutter-insert-background-color:#d6fedb;--diff-gutter-insert-text-color:var(--diff-text-color);--diff-gutter-delete-background-color:#fadde0;--diff-gutter-delete-text-color:var(--diff-text-color);--diff-gutter-selected-background-color:#fffce0;--diff-gutter-selected-text-color:var(--diff-text-color);--diff-code-insert-background-color:#eaffee;--diff-code-insert-text-color:var(--diff-text-color);--diff-code-delete-background-color:#fdeff0;--diff-code-delete-text-color:var(--diff-text-color);--diff-code-insert-edit-background-color:#c0dc91;--diff-code-insert-edit-text-color:var(--diff-text-color);--diff-code-delete-edit-background-color:#f39ea2;--diff-code-delete-edit-text-color:var(--diff-text-color);--diff-code-selected-background-color:#fffce0;--diff-code-selected-text-color:var(--diff-text-color);--diff-omit-gutter-line-color:#cb2a1d}.diff{background-color:var(--diff-background-color);border-collapse:collapse;color:var(--diff-text-color);table-layout:fixed;width:100%}.diff::selection{background-color:#b3d7ff;background-color:var(--diff-selection-background-color);color:var(--diff-selection-text-color)}.diff td{vertical-align:top;padding-top:0;padding-bottom:0}.diff-line{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);line-height:1.5}.diff-gutter>a{color:inherit;display:block}.diff-gutter{cursor:pointer;text-align:right;-webkit-user-select:none;user-select:none;padding:0 1ch}.diff-gutter-insert{background-color:#d6fedb;background-color:var(--diff-gutter-insert-background-color);color:var(--diff-gutter-insert-text-color)}.diff-gutter-delete{background-color:#fadde0;background-color:var(--diff-gutter-delete-background-color);color:var(--diff-gutter-delete-text-color)}.diff-gutter-omit{cursor:default}.diff-gutter-selected{background-color:#fffce0;background-color:var(--diff-gutter-selected-background-color);color:var(--diff-gutter-selected-text-color)}.diff-code{word-wrap:break-word;white-space:pre-wrap;word-break:break-all;padding:0 0 0 .5em}.diff-code-edit{color:inherit}.diff-code-insert{background-color:#eaffee;background-color:var(--diff-code-insert-background-color);color:var(--diff-code-insert-text-color)}.diff-code-insert .diff-code-edit{background-color:#c0dc91;background-color:var(--diff-code-insert-edit-background-color);color:var(--diff-code-insert-edit-text-color)}.diff-code-delete{background-color:#fdeff0;background-color:var(--diff-code-delete-background-color);color:var(--diff-code-delete-text-color)}.diff-code-delete .diff-code-edit{background-color:#f39ea2;background-color:var(--diff-code-delete-edit-background-color);color:var(--diff-code-delete-edit-text-color)}.diff-code-selected{background-color:#fffce0;background-color:var(--diff-code-selected-background-color);color:var(--diff-code-selected-text-color)}.diff-widget-content{vertical-align:top}.diff-gutter-col{width:7ch}.diff-gutter-omit{height:0}.diff-gutter-omit:before{background-color:#cb2a1d;background-color:var(--diff-omit-gutter-line-color);content:" ";white-space:pre;width:2px;height:100%;margin-left:4.6ch;display:block;overflow:hidden}.diff-decoration{-webkit-user-select:none;user-select:none;line-height:1.5}.diff-decoration-content{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);padding:0}}@layer components;@layer utilities{.\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-14{inset:calc(var(--spacing) * -14)}.-inset-\[7px\]{top:-7px;right:-7px;bottom:-7px;left:-7px}.inset-0{top:0;right:0;bottom:0;left:0}.inset-auto{inset:auto}.inset-x-0{inset-inline:0}.inset-x-4{inset-inline:calc(var(--spacing) * 4)}.inset-x-6{inset-inline:calc(var(--spacing) * 6)}.inset-y-0{inset-block:0}.start-0{inset-inline-start:calc(var(--spacing) * 0)}.start-2{inset-inline-start:calc(var(--spacing) * 2)}.start-3{inset-inline-start:calc(var(--spacing) * 3)}.-end-\[3px\]{inset-inline-end:-3px}.end-0{inset-inline-end:calc(var(--spacing) * 0)}.end-1\.5{inset-inline-end:calc(var(--spacing) * 1.5)}.end-3{inset-inline-end:calc(var(--spacing) * 3)}.end-3\.5{inset-inline-end:calc(var(--spacing) * 3.5)}.top-0{top:0}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-3{top:calc(var(--spacing) * 3)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-5{top:calc(var(--spacing) * 5)}.top-7{top:calc(var(--spacing) * 7)}.top-16{top:calc(var(--spacing) * 16)}.top-\[calc\(100\%_\+_4px\)\]{top:calc(100% + 4px)}.top-\[calc\(100\%_\+_6px\)\]{top:calc(100% + 6px)}.right-5{right:calc(var(--spacing) * 5)}.bottom-0{bottom:0}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-32{bottom:calc(var(--spacing) * 32)}.bottom-\[calc\(100\%_\+_4px\)\]{bottom:calc(100% + 4px)}.bottom-\[calc\(100\%_\+_6px\)\]{bottom:calc(100% + 6px)}.bottom-\[calc\(100\%_\+_8px\)\]{bottom:calc(100% + 8px)}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.z-0{z-index:0}.z-1{z-index:1}.z-2{z-index:2}.z-4{z-index:4}.z-5{z-index:5}.z-6{z-index:6}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-60{z-index:60}.z-70{z-index:70}.z-100{z-index:100}.z-200{z-index:200}.z-300{z-index:300}.col-span-2{grid-column:span 2/span 2}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.row-start-1{grid-row-start:1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.m-3{margin:calc(var(--spacing) * 3)}.m-5{margin:calc(var(--spacing) * 5)}.m-auto{margin:auto}.mx-0{margin-inline:0}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.-my-0\.5{margin-block:calc(var(--spacing) * -.5)}.my-0{margin-block:0}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-2\.5{margin-block:calc(var(--spacing) * 2.5)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-3\.5{margin-block:calc(var(--spacing) * 3.5)}.my-4{margin-block:calc(var(--spacing) * 4)}.my-6{margin-block:calc(var(--spacing) * 6)}.my-\[5px\]{margin-block:5px}.ms-0{margin-inline-start:0}.ms-1{margin-inline-start:var(--spacing)}.ms-2{margin-inline-start:calc(var(--spacing) * 2)}.ms-3\.5{margin-inline-start:calc(var(--spacing) * 3.5)}.ms-6{margin-inline-start:calc(var(--spacing) * 6)}.ms-auto{margin-inline-start:auto}.me-0{margin-inline-end:0}.me-0\.5{margin-inline-end:calc(var(--spacing) * .5)}.me-1{margin-inline-end:var(--spacing)}.me-2{margin-inline-end:calc(var(--spacing) * 2)}.me-3\.5{margin-inline-end:calc(var(--spacing) * 3.5)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-4\.5{margin-top:calc(var(--spacing) * 4.5)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-5\.5{margin-top:calc(var(--spacing) * 5.5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\[5px\]{margin-top:5px}.mt-\[13px\]{margin-top:13px}.mt-auto{margin-top:auto}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-4\.5{margin-bottom:calc(var(--spacing) * 4.5)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-5\.5{margin-bottom:calc(var(--spacing) * 5.5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.ml-1{margin-left:var(--spacing)}.box-border{box-sizing:border-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.table{display:table}.field-sizing-content{field-sizing:content}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.h-1{height:var(--spacing)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-10\.5{height:calc(var(--spacing) * 10.5)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-40{height:calc(var(--spacing) * 40)}.h-80{height:calc(var(--spacing) * 80)}.h-96{height:calc(var(--spacing) * 96)}.h-\[7px\]{height:7px}.h-\[9px\]{height:9px}.h-\[13px\]{height:13px}.h-\[15px\]{height:15px}.h-\[min\(42rem\,calc\(100vh-2\.5rem\)\)\]{height:min(42rem,100vh - 2.5rem)}.h-\[min\(48rem\,calc\(100vh-2\.5rem\)\)\]{height:min(48rem,100vh - 2.5rem)}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.h-px{height:1px}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-45{max-height:calc(var(--spacing) * 45)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-50{max-height:calc(var(--spacing) * 50)}.max-h-65{max-height:calc(var(--spacing) * 65)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-85{max-height:calc(var(--spacing) * 85)}.max-h-95{max-height:calc(var(--spacing) * 95)}.max-h-100{max-height:calc(var(--spacing) * 100)}.max-h-120{max-height:calc(var(--spacing) * 120)}.max-h-\[calc\(100vh_-_40px\)\]{max-height:calc(100vh - 40px)}.max-h-\[calc\(100vh_-_var\(--modal-top\)_-_1\.25rem\)\]{max-height:calc(100vh - var(--modal-top) - 1.25rem)}.max-h-\[calc\(100vh_-_var\(--modal-top\)_-_48px\)\]{max-height:calc(100vh - var(--modal-top) - 48px)}.max-h-\[calc\(100vh_-_var\(--new-project-modal-top\)_-_1\.25rem\)\]{max-height:calc(100vh - var(--new-project-modal-top) - 1.25rem)}.max-h-\[min\(18rem\,40vh\)\]{max-height:min(18rem,40vh)}.max-h-\[min\(70vh\,_720px\)\]{max-height:min(70vh,720px)}.max-h-full{max-height:100%}.max-h-none{max-height:none}.min-h-0{min-height:0}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-7{min-height:calc(var(--spacing) * 7)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-19\.5{min-height:calc(var(--spacing) * 19.5)}.min-h-22{min-height:calc(var(--spacing) * 22)}.min-h-41{min-height:calc(var(--spacing) * 41)}.min-h-dvh{min-height:100dvh}.min-h-full{min-height:100%}.w-0{width:0}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\/5{width:40%}.w-4{width:calc(var(--spacing) * 4)}.w-4\/5{width:80%}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-6\.5{width:calc(var(--spacing) * 6.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-9\.5{width:calc(var(--spacing) * 9.5)}.w-10{width:calc(var(--spacing) * 10)}.w-10\.5{width:calc(var(--spacing) * 10.5)}.w-11\.5{width:calc(var(--spacing) * 11.5)}.w-36{width:calc(var(--spacing) * 36)}.w-37{width:calc(var(--spacing) * 37)}.w-40{width:calc(var(--spacing) * 40)}.w-52{width:calc(var(--spacing) * 52)}.w-52\.5{width:calc(var(--spacing) * 52.5)}.w-60{width:calc(var(--spacing) * 60)}.w-66{width:calc(var(--spacing) * 66)}.w-68{width:calc(var(--spacing) * 68)}.w-70{width:calc(var(--spacing) * 70)}.w-72{width:calc(var(--spacing) * 72)}.w-96{width:calc(var(--spacing) * 96)}.w-110{width:calc(var(--spacing) * 110)}.w-120{width:calc(var(--spacing) * 120)}.w-140{width:calc(var(--spacing) * 140)}.w-160{width:calc(var(--spacing) * 160)}.w-180{width:calc(var(--spacing) * 180)}.w-200{width:calc(var(--spacing) * 200)}.w-\[7px\]{width:7px}.w-\[9px\]{width:9px}.w-\[13px\]{width:13px}.w-\[15px\]{width:15px}.w-\[min\(440px\,_calc\(100vw_-_48px\)\)\]{width:min(440px,100vw - 48px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-36{max-width:calc(var(--spacing) * 36)}.max-w-40{max-width:calc(var(--spacing) * 40)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-55{max-width:calc(var(--spacing) * 55)}.max-w-60{max-width:calc(var(--spacing) * 60)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-65{max-width:calc(var(--spacing) * 65)}.max-w-68{max-width:calc(var(--spacing) * 68)}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-105{max-width:calc(var(--spacing) * 105)}.max-w-120{max-width:calc(var(--spacing) * 120)}.max-w-155{max-width:calc(var(--spacing) * 155)}.max-w-160{max-width:calc(var(--spacing) * 160)}.max-w-230{max-width:calc(var(--spacing) * 230)}.max-w-290{max-width:calc(var(--spacing) * 290)}.max-w-\[88\%\]{max-width:88%}.max-w-\[94vw\]{max-width:94vw}.max-w-\[calc\(100vw-1rem\)\]{max-width:calc(100vw - 1rem)}.max-w-\[calc\(100vw_-_40px\)\]{max-width:calc(100vw - 40px)}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-readable{max-width:var(--readable-col)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-16{min-width:calc(var(--spacing) * 16)}.min-w-20{min-width:calc(var(--spacing) * 20)}.min-w-40{min-width:calc(var(--spacing) * 40)}.min-w-44{min-width:calc(var(--spacing) * 44)}.min-w-47\.5{min-width:calc(var(--spacing) * 47.5)}.min-w-55{min-width:calc(var(--spacing) * 55)}.min-w-56{min-width:calc(var(--spacing) * 56)}.min-w-57\.5{min-width:calc(var(--spacing) * 57.5)}.min-w-60{min-width:calc(var(--spacing) * 60)}.min-w-80{min-width:calc(var(--spacing) * 80)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-full{flex-basis:100%}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[or-pulse_1\.2s_ease-in-out_infinite\]{animation:1.2s ease-in-out infinite or-pulse}.animate-\[spin_0\.8s_linear_infinite\]{animation:.8s linear infinite spin}.animate-\[spin_0\.9s_linear_infinite\]{animation:.9s linear infinite spin}.animate-\[title-char-in_240ms_ease-out_both\]{animation:.24s ease-out both title-char-in}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-e-resize{cursor:e-resize}.cursor-help{cursor:help}.cursor-nesw-resize{cursor:nesw-resize}.cursor-ns-resize{cursor:ns-resize}.cursor-nwse-resize{cursor:nwse-resize}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.cursor-zoom-in{cursor:zoom-in}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.\[scrollbar-width\:none\]{scrollbar-width:none}.\[scrollbar-gutter\:stable\]{scrollbar-gutter:stable}.\[scrollbar-gutter\:stable_both-edges\]{scrollbar-gutter:stable both-edges}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-\[2rem_minmax\(0\,1fr\)_2rem\]{grid-template-columns:2rem minmax(0,1fr) 2rem}.grid-cols-\[8\.5rem_5rem\]{grid-template-columns:8.5rem 5rem}.grid-cols-\[9rem_minmax\(0\,1fr\)\]{grid-template-columns:9rem minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)\]{grid-template-columns:24px minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)_28px\]{grid-template-columns:24px minmax(0,1fr) 28px}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_minmax\(0\,1fr\)_auto\]{grid-template-columns:auto minmax(0,1fr) auto}.grid-cols-\[minmax\(0\,1fr\)_9rem_9rem_minmax\(18rem\,max-content\)\]{grid-template-columns:minmax(0,1fr) 9rem 9rem minmax(18rem,max-content)}.grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(12rem\,18rem\)_minmax\(12rem\,18rem\)\]{grid-template-columns:minmax(12rem,18rem) minmax(12rem,18rem)}.grid-cols-\[minmax\(180px\,_260px\)_minmax\(0\,_1fr\)\]{grid-template-columns:minmax(180px,260px) minmax(0,1fr)}.grid-cols-\[repeat\(2\,_minmax\(0\,_1fr\)\)\]{grid-template-columns:repeat(2,minmax(0,1fr))}.\!flex-col{flex-direction:column!important}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.\!items-stretch{align-items:stretch!important}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-4\.5{gap:calc(var(--spacing) * 4.5)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\[0\.4em\]{gap:.4em}.gap-\[3px\]{gap:3px}.gap-\[5px\]{gap:5px}.gap-\[7px\]{gap:7px}.gap-\[9px\]{gap:9px}.gap-px{gap:1px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-1\.5{column-gap:calc(var(--spacing) * 1.5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.gap-x-4\.5{column-gap:calc(var(--spacing) * 4.5)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-x-12{column-gap:calc(var(--spacing) * 12)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2\.5{row-gap:calc(var(--spacing) * 2.5)}.gap-y-\[3px\]{row-gap:3px}.gap-y-\[7px\]{row-gap:7px}.gap-y-\[9px\]{row-gap:9px}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border-variant>:not(:last-child)){border-color:var(--border-variant)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[3px\]{border-radius:3px}.rounded-\[16px\]{border-radius:16px}.rounded-\[inherit\]{border-radius:inherit}.rounded-\[var\(--radius-md\)_var\(--radius-md\)_0_0\]{border-radius:var(--radius-md) var(--radius-md) 0 0}.rounded-full{border-radius:999px}.rounded-lg{border-radius:10px}.rounded-md{border-radius:8px}.rounded-none{border-radius:0}.rounded-sm{border-radius:6px}.rounded-xl{border-radius:12px}.rounded-xs{border-radius:4px}.rounded-s-none{border-start-start-radius:0;border-end-start-radius:0}.rounded-e-none{border-start-end-radius:0;border-end-end-radius:0}.rounded-b-lg{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-x-0{border-inline-style:var(--tw-border-style);border-inline-width:0}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-s-0{border-inline-start-style:var(--tw-border-style);border-inline-start-width:0}.border-s-2{border-inline-start-style:var(--tw-border-style);border-inline-start-width:2px}.border-s-\[3px\]{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-solid{--tw-border-style:solid;border-style:solid}.border-accent-amber,.border-accent-amber\/45{border-color:var(--accent-amber)}@supports (color:color-mix(in lab,red,red)){.border-accent-amber\/45{border-color:color-mix(in oklab,var(--accent-amber) 45%,transparent)}}.border-accent-blue,.border-accent-blue\/45{border-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.border-accent-blue\/45{border-color:color-mix(in oklab,var(--accent-blue) 45%,transparent)}}.border-accent-green,.border-accent-green\/45{border-color:var(--accent-green)}@supports (color:color-mix(in lab,red,red)){.border-accent-green\/45{border-color:color-mix(in oklab,var(--accent-green) 45%,transparent)}}.border-accent-red{border-color:var(--accent-red)}.border-border{border-color:var(--border)}.border-border-strong{border-color:var(--border-strong)}.border-border-variant{border-color:var(--border-variant)}.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.border-danger-notice-border{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.border-danger-notice-border{border-color:color-mix(in srgb,var(--accent-red) 35%,var(--border-variant))}}.border-primary,.border-primary\/45{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,var(--primary) 45%,transparent)}}.border-transparent{border-color:#0000}.border-s-accent-blue{border-inline-start-color:var(--accent-blue)}.border-s-accent-red{border-inline-start-color:var(--accent-red)}.border-s-border{border-inline-start-color:var(--border)}.border-s-border-variant{border-inline-start-color:var(--border-variant)}.border-s-plan-caret{border-inline-start-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.border-s-plan-caret{border-inline-start-color:color-mix(in oklab,var(--base) 35%,var(--text))}}.border-e-border-variant{border-inline-end-color:var(--border-variant)}.border-t-accent-amber{border-top-color:var(--accent-amber)}.border-t-border{border-top-color:var(--border)}.border-t-border-variant{border-top-color:var(--border-variant)}.border-t-primary{border-top-color:var(--primary)}.border-b-accent-amber{border-bottom-color:var(--accent-amber)}.border-b-border{border-bottom-color:var(--border)}.border-b-border-variant{border-bottom-color:var(--border-variant)}.border-b-divider-subtle{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.border-b-divider-subtle{border-bottom-color:color-mix(in oklab,var(--text) 7%,transparent)}}.bg-accent{background-color:var(--accent)}.bg-accent-amber{background-color:var(--accent-amber)}.bg-accent-amber-subtle{background-color:var(--accent-amber-subtle)}.bg-accent-blue{background-color:var(--accent-blue)}.bg-accent-blue-subtle{background-color:var(--accent-blue-subtle)}.bg-accent-green{background-color:var(--accent-green)}.bg-accent-green-subtle{background-color:var(--accent-green-subtle)}.bg-accent-red{background-color:var(--accent-red)}.bg-accent-red-subtle{background-color:var(--accent-red-subtle)}.bg-accent-teal{background-color:var(--accent-teal)}.bg-background{background-color:var(--base)}.bg-border-variant{background-color:var(--border-variant)}.bg-canvas{background-color:var(--canvas)}.bg-current{background-color:currentColor}.bg-hover-faint{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-faint{background-color:color-mix(in oklab,var(--text) 3%,transparent)}}.bg-hover-muted{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-muted{background-color:color-mix(in oklab,var(--text) 8%,transparent)}}.bg-hover-subtle{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-subtle{background-color:color-mix(in oklab,var(--text) 10%,transparent)}}.bg-modal-backdrop{background-color:#1d1b1a6b}.bg-modal-backdrop-light{background-color:#1d1b1a66}.bg-muted{background-color:var(--muted)}.bg-panel{background-color:var(--panel)}.bg-primary{background-color:var(--primary)}.bg-primary-subtle{background-color:var(--primary-subtle)}.bg-skill-blue-subtle{background-color:var(--skill-blue-subtle)}.bg-surface{background-color:var(--surface)}.bg-surface-bright{background-color:var(--surface-bright)}.bg-terminal{background-color:var(--term-bg)}.bg-terminal-app{background-color:var(--term-app-bg)}.bg-text{background-color:var(--text)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-none{background-image:none}.from-background{--tw-gradient-from:var(--base);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-terminal{--tw-gradient-from:var(--term-bg);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.object-contain{object-fit:contain}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-7{padding:calc(var(--spacing) * 7)}.p-8{padding:calc(var(--spacing) * 8)}.p-\[1\.5px\]{padding:1.5px}.p-\[3px\]{padding:3px}.p-\[5px\]{padding:5px}.p-px{padding:1px}.px-0{padding-inline:0}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[9px\]{padding-inline:9px}.px-\[11px\]{padding-inline:11px}.px-\[13px\]{padding-inline:13px}.px-\[15px\]{padding-inline:15px}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-4\.5{padding-block:calc(var(--spacing) * 4.5)}.py-6\.5{padding-block:calc(var(--spacing) * 6.5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-\[3px\]{padding-block:3px}.py-\[5px\]{padding-block:5px}.py-\[7px\]{padding-block:7px}.py-\[9px\]{padding-block:9px}.py-\[11px\]{padding-block:11px}.py-px{padding-block:1px}.ps-1{padding-inline-start:var(--spacing)}.ps-1\.5{padding-inline-start:calc(var(--spacing) * 1.5)}.ps-2{padding-inline-start:calc(var(--spacing) * 2)}.ps-2\.5{padding-inline-start:calc(var(--spacing) * 2.5)}.ps-3{padding-inline-start:calc(var(--spacing) * 3)}.ps-3\.5{padding-inline-start:calc(var(--spacing) * 3.5)}.ps-4{padding-inline-start:calc(var(--spacing) * 4)}.ps-4\.5{padding-inline-start:calc(var(--spacing) * 4.5)}.ps-5{padding-inline-start:calc(var(--spacing) * 5)}.ps-\[2ch\]{padding-inline-start:2ch}.ps-\[31px\]{padding-inline-start:31px}.pe-0{padding-inline-end:0}.pe-0\.5{padding-inline-end:calc(var(--spacing) * .5)}.pe-1{padding-inline-end:var(--spacing)}.pe-1\.5{padding-inline-end:calc(var(--spacing) * 1.5)}.pe-2{padding-inline-end:calc(var(--spacing) * 2)}.pe-2\.5{padding-inline-end:calc(var(--spacing) * 2.5)}.pe-4{padding-inline-end:calc(var(--spacing) * 4)}.pe-8{padding-inline-end:calc(var(--spacing) * 8)}.pe-10{padding-inline-end:calc(var(--spacing) * 10)}.pe-14{padding-inline-end:calc(var(--spacing) * 14)}.pe-\[1ch\]{padding-inline-end:1ch}.pt-0{padding-top:0}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-4\.5{padding-top:calc(var(--spacing) * 4.5)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-6\.5{padding-top:calc(var(--spacing) * 6.5)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pt-\[var\(--modal-top\)\]{padding-top:var(--modal-top)}.pt-\[var\(--new-project-modal-top\)\]{padding-top:var(--new-project-modal-top)}.pb-0{padding-bottom:0}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-15{padding-bottom:calc(var(--spacing) * 15)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.pl-\[2ch\]{padding-left:2ch}.text-center{text-align:center}.text-end{text-align:end}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.align-middle{vertical-align:middle}.font-\[\'Segoe_Fluent_Icons\'\,\'Segoe_MDL2_Assets\'\]{font-family:Segoe Fluent Icons,Segoe MDL2 Assets}.font-\[inherit\]{font-family:inherit}.font-mono{font-family:var(--mono)}.font-sans{font-family:var(--sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-menu{font-size:.8125rem;line-height:var(--tw-leading,1.25rem)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-0{--tw-leading:0px;line-height:0}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[1\.3\]{--tw-leading:1.3;line-height:1.3}.leading-\[1\.4\]{--tw-leading:1.4;line-height:1.4}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.leading-\[1\.08\]{--tw-leading:1.08;line-height:1.08}.leading-\[1\.45\]{--tw-leading:1.45;line-height:1.45}.leading-\[1\.55\]{--tw-leading:1.55;line-height:1.55}.leading-\[1\.62\]{--tw-leading:1.62;line-height:1.62}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\!font-medium{--tw-font-weight:var(--font-weight-medium)!important;font-weight:var(--font-weight-medium)!important}.\!font-normal{--tw-font-weight:var(--font-weight-normal)!important;font-weight:var(--font-weight-normal)!important}.font-\[375\]{--tw-font-weight:375;font-weight:375}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.01em\]{--tw-tracking:-.01em;letter-spacing:-.01em}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[-0\.015em\]{--tw-tracking:-.015em;letter-spacing:-.015em}.tracking-\[-0\.035em\]{--tw-tracking:-.035em;letter-spacing:-.035em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.06em\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-accent-red{color:var(--accent-red)!important}.text-accent-amber{color:var(--accent-amber)}.text-accent-blue{color:var(--accent-blue)}.text-accent-green{color:var(--accent-green)}.text-accent-orange{color:var(--accent-orange)}.text-accent-purple{color:var(--accent-purple)}.text-accent-red{color:var(--accent-red)}.text-accent-teal{color:var(--accent-teal)}.text-background{color:var(--base)}.text-inherit{color:inherit}.text-muted{color:var(--muted)}.text-primary{color:var(--primary)}.text-skill-blue{color:var(--skill-blue)}.text-skill-blue-slash{color:var(--skill-blue-slash)}.text-subtext{color:var(--subtext)}.text-text,.text-text\/80{color:var(--text)}@supports (color:color-mix(in lab,red,red)){.text-text\/80{color:color-mix(in oklab,var(--text) 80%,transparent)}}.text-transparent{color:#0000}.text-white{color:#fff}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-border-strong{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.underline-offset-2{text-underline-offset:2px}.underline-offset-3{text-underline-offset:3px}.caret-text{caret-color:var(--text)}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-50{opacity:.5}.opacity-52{opacity:.52}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,color-mix(in oklab, var(--text) 6%, transparent))}}.shadow-card{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control-subtle{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-dropdown{--tw-shadow:0 10px 26px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,var(--text)), 0 1px 4px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,color-mix(in oklab, var(--text) 5%, transparent)), 0 1px 4px var(--tw-shadow-color,color-mix(in oklab, var(--text) 4%, transparent))}}.shadow-elevated{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-file-line{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--accent-blue));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-floating{--tw-shadow:0 8px 24px var(--tw-shadow-color,#00000024);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-hairline{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-logo{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-menu{--tw-shadow:0 12px 32px var(--tw-shadow-color,#0000002e);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-modal{--tw-shadow:0 24px 60px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan{--tw-shadow:0 2px 10px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan-menu{--tw-shadow:0 6px 20px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-popover{--tw-shadow:0 4px 16px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-tree{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-primary{--tw-ring-color:var(--primary)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-background{--tw-ring-offset-color:var(--base)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\,color\]{transition-property:background,border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\]{transition-property:background,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,color\]{transition-property:background,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background-color\,border-color\]{transition-property:background-color,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,background\]{transition-property:border-color,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,box-shadow\]{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,color\]{transition-property:border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[box-shadow\]{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,color\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-80{--tw-duration:80ms;transition-duration:80ms}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-standard{--tw-ease:ease;transition-timing-function:ease}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[--new-project-modal-top\:clamp\(4rem\,20vh\,24rem\)\]{--new-project-modal-top:clamp(4rem, 20vh, 24rem)}.\[font\:inherit\]{font:inherit}.\[grid-area\:actions\]{grid-area:actions}.\[grid-area\:meta\]{grid-area:meta}.\[grid-area\:name\]{grid-area:name}.\[grid-template-areas\:\'name_meta\'_\'actions_actions\'\]{grid-template-areas:"name meta""actions actions"}.group-open\/limit\:rotate-90:is(:where(.group\/limit):is([open],:popover-open,:open) *){rotate:90deg}.group-focus-within\:pointer-events-auto:is(:where(.group):focus-within *){pointer-events:auto}.group-focus-within\:opacity-100:is(:where(.group):focus-within *),.group-focus-within\/turn\:opacity-100:is(:where(.group\/turn):focus-within *){opacity:1}@media(hover:hover){.group-hover\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/skill\:opacity-100:is(:where(.group\/skill):hover *),.group-hover\/turn\:opacity-100:is(:where(.group\/turn):hover *){opacity:1}}.group-focus-visible\:opacity-0:is(:where(.group):focus-visible *){opacity:0}.group-focus-visible\:opacity-100:is(:where(.group):focus-visible *){opacity:1}.placeholder\:text-muted::placeholder{color:var(--muted)}.backdrop\:bg-image-backdrop::backdrop{background-color:#1d1b1ad9}.backdrop\:bg-modal-backdrop-light::backdrop{background-color:#1d1b1a66}.before\:content-\[attr\(data-line\)\]:before{--tw-content:attr(data-line);content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-0:after{content:var(--tw-content);inset-inline-start:calc(var(--spacing) * 0)}.after\:end-0:after{content:var(--tw-content);inset-inline-end:calc(var(--spacing) * 0)}.after\:top-full:after{content:var(--tw-content);top:100%}.after\:h-2:after{content:var(--tw-content);height:calc(var(--spacing) * 2)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:border-text:focus-within{border-color:var(--text)}.focus-within\:bg-surface-bright:focus-within{background-color:var(--surface-bright)}@media(hover:hover){.hover\:border-border-strong:hover{border-color:var(--border-strong)}.hover\:border-text:hover{border-color:var(--text)}.hover\:bg-accent-red:hover{background-color:var(--accent-red)}.hover\:bg-panel:hover{background-color:var(--panel)}.hover\:bg-surface:hover{background-color:var(--surface)}.hover\:bg-surface-bright:hover{background-color:var(--surface-bright)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-accent-red:hover{color:var(--accent-red)}.hover\:text-primary-hover:hover{color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary-hover:hover{color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.hover\:text-text:hover{color:var(--text)}.hover\:text-white:hover{color:#fff}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-primary:hover{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}}.focus\:pointer-events-auto:focus{pointer-events:auto}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:border-text:focus{border-color:var(--text)}.focus\:opacity-100:focus,.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:-outline-offset-2:focus-visible{outline-offset:-2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-primary:focus-visible{outline-color:var(--primary)}.focus-visible\:outline-text:focus-visible{outline-color:var(--text)}.focus-visible\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.disabled\:cursor-default:disabled{cursor:default}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-50:disabled{opacity:.5}@media(prefers-reduced-motion:reduce){.motion-reduce\:transition-none{transition-property:none}}@media(min-width:1120px){.min-\[1120px\]\:col-start-1{grid-column-start:1}.min-\[1120px\]\:col-start-2{grid-column-start:2}.min-\[1120px\]\:row-start-1{grid-row-start:1}.min-\[1120px\]\:row-start-2{grid-row-start:2}.min-\[1120px\]\:mt-0{margin-top:0}.min-\[1120px\]\:grid{display:grid}.min-\[1120px\]\:grid-cols-\[minmax\(0\,_1\.1fr\)_minmax\(28rem\,_1fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(28rem,1fr)}.min-\[1120px\]\:grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.min-\[1120px\]\:content-center{align-content:center}.min-\[1120px\]\:gap-x-20{column-gap:calc(var(--spacing) * 20)}.min-\[1120px\]\:gap-y-10{row-gap:calc(var(--spacing) * 10)}.min-\[1120px\]\:self-end{align-self:flex-end}.min-\[1120px\]\:self-start{align-self:flex-start}}@media(min-width:40rem){.sm\:inset-x-12{inset-inline:calc(var(--spacing) * 12)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-12{padding-inline:calc(var(--spacing) * 12)}}@media(min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@container not (min-width:36rem){.\@max-xl\:hidden{display:none}}@container not (min-width:32rem){.\@max-lg\:hidden{display:none}}@container (min-width:24rem){.\@sm\:flex-row{flex-direction:row}.\@sm\:items-center{align-items:center}.\@sm\:justify-between{justify-content:space-between}.\@sm\:self-auto{align-self:auto}}@container (min-width:32rem){.\@lg\:flex-row{flex-direction:row}.\@lg\:items-center{align-items:center}.\@lg\:gap-2{gap:calc(var(--spacing) * 2)}}@media(prefers-color-scheme:dark){.dark\:invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.mac-titlebar\:ms-16:where(.mac-titlebar *){margin-inline-start:calc(var(--spacing) * 16)}.mac-titlebar\:mt-8:where(.mac-titlebar *){margin-top:calc(var(--spacing) * 8)}.mac-titlebar\:grid-cols-\[6rem_minmax\(0\,1fr\)_6rem\]:where(.mac-titlebar *){grid-template-columns:6rem minmax(0,1fr) 6rem}.mac-titlebar\:ps-20:where(.mac-titlebar *){padding-inline-start:calc(var(--spacing) * 20)}.win-titlebar\:top-10:where(.win-titlebar *){top:calc(var(--spacing) * 10)}.win-titlebar\:mt-10:where(.win-titlebar *){margin-top:calc(var(--spacing) * 10)}.win-titlebar\:pe-36:where(.win-titlebar *){padding-inline-end:calc(var(--spacing) * 36)}.\[\&_\+_\.settings-stack-section\]\:mt-6+.settings-stack-section{margin-top:calc(var(--spacing) * 6)}.\[\&_\.actions\]\:mt-1\.5 .actions{margin-top:calc(var(--spacing) * 1.5)}.\[\&_\.actions\]\:flex .actions{display:flex}.\[\&_\.actions\]\:justify-end .actions{justify-content:flex-end}.\[\&_\.actions\]\:gap-2\.5 .actions{gap:calc(var(--spacing) * 2.5)}.\[\&_\.artifact-img\]\:mx-0 .artifact-img{margin-inline:0}.\[\&_\.artifact-img\]\:my-3 .artifact-img{margin-block:calc(var(--spacing) * 3)}.\[\&_\.artifact-img\]\:block .artifact-img{display:block}.\[\&_\.artifact-img_img\]\:h-auto .artifact-img img{height:auto}.\[\&_\.artifact-img_img\]\:max-w-full .artifact-img img{max-width:100%}.\[\&_\.artifact-img_img\]\:rounded-sm .artifact-img img{border-radius:6px}.\[\&_\.artifact-img_img\]\:border .artifact-img img{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.artifact-img_img\]\:border-border .artifact-img img{border-color:var(--border)}.\[\&_\.artifact-img-caption\]\:mt-1 .artifact-img-caption{margin-top:var(--spacing)}.\[\&_\.artifact-img-caption\]\:block .artifact-img-caption{display:block}.\[\&_\.artifact-img-caption\]\:text-center .artifact-img-caption{text-align:center}.\[\&_\.artifact-img-caption\]\:text-sm .artifact-img-caption{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.artifact-img-caption\]\:text-subtext .artifact-img-caption{color:var(--subtext)}.\[\&_\.backend-badge\]\:text-text .backend-badge{color:var(--text)}.\[\&_\.backend-detail\]\:text-muted .backend-detail{color:var(--muted)}.\[\&_\.backend-name\]\:font-medium .backend-name{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.badge\]\:ms-2 .badge{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.btn\]\:inline-flex .btn{display:inline-flex}.\[\&_\.btn\]\:items-center .btn{align-items:center}.\[\&_\.btn\]\:gap-\[5px\] .btn{gap:5px}.\[\&_\.busy-dot\]\:h-\[7px\] .busy-dot{height:7px}.\[\&_\.busy-dot\]\:w-\[7px\] .busy-dot{width:7px}.\[\&_\.busy-dot\]\:shrink-0 .busy-dot{flex-shrink:0}.\[\&_\.busy-dot\]\:animate-\[or-pulse_1\.2s_infinite\] .busy-dot{animation:1.2s infinite or-pulse}.\[\&_\.busy-dot\]\:rounded-full .busy-dot{border-radius:999px}.\[\&_\.busy-dot\]\:bg-primary .busy-dot{background-color:var(--primary)}.\[\&_\.busy-dot\.waiting\]\:animate-none .busy-dot.waiting{animation:none}.\[\&_\.chev\]\:w-3 .chev{width:calc(var(--spacing) * 3)}.\[\&_\.chev\]\:shrink-0 .chev{flex-shrink:0}.\[\&_\.chev\]\:text-xs .chev{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.chev\]\:text-muted .chev{color:var(--muted)}.\[\&_\.cmd-inline\]\:mx-2 .cmd-inline{margin-inline:calc(var(--spacing) * 2)}.\[\&_\.cmd-inline\]\:gap-2 .cmd-inline{gap:calc(var(--spacing) * 2)}.\[\&_\.count-badge\]\:inline-flex .count-badge{display:inline-flex}.\[\&_\.count-badge\]\:h-4\.5 .count-badge{height:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:min-w-4\.5 .count-badge{min-width:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:items-center .count-badge{align-items:center}.\[\&_\.count-badge\]\:justify-center .count-badge{justify-content:center}.\[\&_\.count-badge\]\:rounded-md .count-badge{border-radius:8px}.\[\&_\.count-badge\]\:border .count-badge{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.count-badge\]\:border-border .count-badge{border-color:var(--border)}.\[\&_\.count-badge\]\:bg-canvas .count-badge{background-color:var(--canvas)}.\[\&_\.count-badge\]\:px-\[5px\] .count-badge{padding-inline:5px}.\[\&_\.count-badge\]\:py-0 .count-badge{padding-block:0}.\[\&_\.count-badge\]\:text-xs .count-badge{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.count-badge\]\:font-medium .count-badge{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.count-badge\]\:text-text .count-badge{color:var(--text)}.\[\&_\.elided-node-label\]\:flex .elided-node-label{display:flex}.\[\&_\.elided-node-label\]\:flex-col .elided-node-label{flex-direction:column}.\[\&_\.elided-node-label\]\:leading-\[1\.3\] .elided-node-label{--tw-leading:1.3;line-height:1.3}.\[\&_\.elided-node-sub\]\:text-muted .elided-node-sub{color:var(--muted)}.\[\&_\.error\]\:basis-full .error{flex-basis:100%}.\[\&_\.error\]\:text-base .error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.error\]\:text-sm .error{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.error\]\:whitespace-pre-wrap .error{white-space:pre-wrap}.\[\&_\.error\]\:text-accent-red .error{color:var(--accent-red)}.\[\&_\.file-chip\]\:mx-px .file-chip{margin-inline:1px}.\[\&_\.file-chip\]\:my-0 .file-chip{margin-block:0}.\[\&_\.file-chip\]\:inline-flex .file-chip{display:inline-flex}.\[\&_\.file-chip\]\:max-w-full .file-chip{max-width:100%}.\[\&_\.file-chip\]\:cursor-pointer .file-chip{cursor:pointer}.\[\&_\.file-chip\]\:items-center .file-chip{align-items:center}.\[\&_\.file-chip\]\:gap-1 .file-chip{gap:var(--spacing)}.\[\&_\.file-chip\]\:rounded-xs .file-chip{border-radius:4px}.\[\&_\.file-chip\]\:border .file-chip{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.file-chip\]\:border-border-variant .file-chip{border-color:var(--border-variant)}.\[\&_\.file-chip\]\:bg-panel .file-chip{background-color:var(--panel)}.\[\&_\.file-chip\]\:px-1\.5 .file-chip{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.file-chip\]\:py-0 .file-chip{padding-block:0}.\[\&_\.file-chip\]\:align-baseline .file-chip{vertical-align:baseline}.\[\&_\.file-chip\]\:font-mono .file-chip{font-family:var(--mono)}.\[\&_\.file-chip\]\:text-sm .file-chip{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.file-chip\]\:font-medium .file-chip{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.file-chip\]\:text-text .file-chip{color:var(--text)}.\[\&_\.file-chip_svg\]\:flex-none .file-chip svg{flex:none}.\[\&_\.file-chip_svg\]\:opacity-60 .file-chip svg{opacity:.6}.\[\&_\.file-chip-label\]\:max-w-65 .file-chip-label{max-width:calc(var(--spacing) * 65)}.\[\&_\.file-chip-label\]\:overflow-hidden .file-chip-label{overflow:hidden}.\[\&_\.file-chip-label\]\:text-ellipsis .file-chip-label{text-overflow:ellipsis}.\[\&_\.file-chip-label\]\:whitespace-nowrap .file-chip-label{white-space:nowrap}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:bg-surface .file-chip:hover:not(:disabled){background-color:var(--surface)}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:text-primary .file-chip:hover:not(:disabled){color:var(--primary)}.\[\&_\.files-pill\]\:rounded-sm .files-pill{border-radius:6px}.\[\&_\.files-pill\]\:px-2 .files-pill{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.files-pill\]\:py-\[5px\] .files-pill{padding-block:5px}.\[\&_\.files-pill_code\]\:text-xs .files-pill code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.folder-picker-chevron\]\:flex-none .folder-picker-chevron{flex:none}.\[\&_\.folder-picker-chevron\]\:text-muted .folder-picker-chevron{color:var(--muted)}.\[\&_\.folder-picker-control\]\:flex .folder-picker-control{display:flex}.\[\&_\.folder-picker-control\]\:w-full .folder-picker-control{width:100%}.\[\&_\.folder-picker-control\]\:min-w-0 .folder-picker-control{min-width:0}.\[\&_\.folder-picker-control\]\:cursor-pointer .folder-picker-control{cursor:pointer}.\[\&_\.folder-picker-control\]\:items-center .folder-picker-control{align-items:center}.\[\&_\.folder-picker-control\]\:gap-\[9px\] .folder-picker-control{gap:9px}.\[\&_\.folder-picker-control\]\:overflow-hidden .folder-picker-control{overflow:hidden}.\[\&_\.folder-picker-control\]\:rounded-md .folder-picker-control{border-radius:8px}.\[\&_\.folder-picker-control\]\:border .folder-picker-control{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.folder-picker-control\]\:border-border .folder-picker-control{border-color:var(--border)}.\[\&_\.folder-picker-control\]\:bg-background .folder-picker-control{background-color:var(--base)}.\[\&_\.folder-picker-control\]\:px-2\.5 .folder-picker-control{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.folder-picker-control\]\:py-2 .folder-picker-control{padding-block:calc(var(--spacing) * 2)}.\[\&_\.folder-picker-control\]\:text-start .folder-picker-control{text-align:start}.\[\&_\.folder-picker-control\]\:transition-\[border-color\,box-shadow\] .folder-picker-control{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_\.folder-picker-control\]\:duration-120 .folder-picker-control{--tw-duration:.12s;transition-duration:.12s}.\[\&_\.folder-picker-control\]\:ease-standard .folder-picker-control{--tw-ease:ease;transition-timing-function:ease}.\[\&_\.folder-picker-control_\.placeholder\]\:text-muted .folder-picker-control .placeholder{color:var(--muted)}.\[\&_\.folder-picker-control_span\]\:min-w-0 .folder-picker-control span{min-width:0}.\[\&_\.folder-picker-control_span\]\:flex-1 .folder-picker-control span{flex:1}.\[\&_\.folder-picker-control_span\]\:overflow-hidden .folder-picker-control span{overflow:hidden}.\[\&_\.folder-picker-control_span\]\:text-ellipsis .folder-picker-control span{text-overflow:ellipsis}.\[\&_\.folder-picker-control_span\]\:whitespace-nowrap .folder-picker-control span{white-space:nowrap}.\[\&_\.folder-picker-control\:disabled\]\:cursor-default .folder-picker-control:disabled{cursor:default}.\[\&_\.folder-picker-control\:disabled\]\:opacity-65 .folder-picker-control:disabled{opacity:.65}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-2 .folder-picker-control:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-offset-2 .folder-picker-control:focus-visible{outline-offset:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-text .folder-picker-control:focus-visible{outline-color:var(--text)}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-solid .folder-picker-control:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:border-muted .folder-picker-control:hover:not(:disabled){border-color:var(--muted)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:shadow-control-subtle .folder-picker-control:hover:not(:disabled){--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)_\.folder-picker-chevron\]\:text-subtext .folder-picker-control:hover:not(:disabled) .folder-picker-chevron{color:var(--subtext)}.\[\&_\.folder-picker-hint\]\:text-sm .folder-picker-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.folder-picker-hint\]\:leading-\[1\.4\] .folder-picker-hint{--tw-leading:1.4;line-height:1.4}.\[\&_\.folder-picker-hint\]\:font-normal .folder-picker-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.folder-picker-hint\]\:text-subtext .folder-picker-hint{color:var(--subtext)}.\[\&_\.folder-picker-icon\]\:flex-none .folder-picker-icon{flex:none}.\[\&_\.folder-picker-icon\]\:text-current .folder-picker-icon{color:currentColor}.\[\&_\.form-seg\]\:mb-0\.5 .form-seg{margin-bottom:calc(var(--spacing) * .5)}.\[\&_\.form-seg\]\:self-start .form-seg{align-self:flex-start}.\[\&_\.form-seg_button\]\:px-3 .form-seg button{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.form-seg_button\]\:py-\[5px\] .form-seg button{padding-block:5px}.\[\&_\.hc-actions\]\:mt-2\.5 .hc-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions\]\:flex .hc-actions{display:flex}.\[\&_\.hc-actions\]\:items-center .hc-actions{align-items:center}.\[\&_\.hc-actions\]\:gap-1\.5 .hc-actions{gap:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:inline-flex .hc-actions button{display:inline-flex}.\[\&_\.hc-actions_button\]\:min-w-21 .hc-actions button{min-width:calc(var(--spacing) * 21)}.\[\&_\.hc-actions_button\]\:items-center .hc-actions button{align-items:center}.\[\&_\.hc-actions_button\]\:justify-center .hc-actions button{justify-content:center}.\[\&_\.hc-actions_button\]\:gap-\[5px\] .hc-actions button{gap:5px}.\[\&_\.hc-actions_button\]\:rounded-md .hc-actions button{border-radius:8px}.\[\&_\.hc-actions_button\]\:border .hc-actions button{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.hc-actions_button\]\:border-border .hc-actions button{border-color:var(--border)}.\[\&_\.hc-actions_button\]\:bg-background .hc-actions button{background-color:var(--base)}.\[\&_\.hc-actions_button\]\:px-2\.5 .hc-actions button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions_button\]\:py-1\.5 .hc-actions button{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:text-sm .hc-actions button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-actions_button\]\:font-medium .hc-actions button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-actions_button\]\:text-text .hc-actions button{color:var(--text)}.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:color-mix(in oklab,var(--border) 55%,var(--text))}}.\[\&_\.hc-actions_button\:hover\]\:bg-canvas .hc-actions button:hover{background-color:var(--canvas)}.\[\&_\.hc-body\]\:mt-2\.5 .hc-body{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:line-clamp-10 .hc-body{-webkit-line-clamp:10;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-body\]\:border-t .hc-body{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-body\]\:border-t-border-variant .hc-body{border-top-color:var(--border-variant)}.\[\&_\.hc-body\]\:pt-2\.5 .hc-body{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:leading-\[1\.6\] .hc-body{--tw-leading:1.6;line-height:1.6}.\[\&_\.hc-body\]\:whitespace-pre-line .hc-body{white-space:pre-line}.\[\&_\.hc-body\.expanded\]\:line-clamp-none .hc-body.expanded{-webkit-line-clamp:unset;-webkit-box-orient:horizontal;display:block;overflow:visible}.\[\&_\.hc-body\.expanded\]\:block .hc-body.expanded{display:block}.\[\&_\.hc-body\.expanded\]\:max-h-\[45vh\] .hc-body.expanded{max-height:45vh}.\[\&_\.hc-body\.expanded\]\:overflow-x-hidden .hc-body.expanded{overflow-x:hidden}.\[\&_\.hc-body\.expanded\]\:overflow-y-auto .hc-body.expanded{overflow-y:auto}.\[\&_\.hc-body\.expanded\]\:pb-1 .hc-body.expanded{padding-bottom:var(--spacing)}.\[\&_\.hc-branch\]\:inline-flex .hc-branch{display:inline-flex}.\[\&_\.hc-branch\]\:min-w-0 .hc-branch{min-width:0}.\[\&_\.hc-branch\]\:items-center .hc-branch{align-items:center}.\[\&_\.hc-branch\]\:gap-1 .hc-branch{gap:var(--spacing)}.\[\&_\.hc-branch\]\:overflow-hidden .hc-branch{overflow:hidden}.\[\&_\.hc-branch\]\:text-ellipsis .hc-branch{text-overflow:ellipsis}.\[\&_\.hc-branch\]\:whitespace-nowrap .hc-branch{white-space:nowrap}.\[\&_\.hc-failure\]\:mt-2 .hc-failure{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-failure\]\:line-clamp-3 .hc-failure{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-failure\]\:text-accent-red .hc-failure{color:var(--accent-red)}.\[\&_\.hc-foot\]\:mt-2 .hc-foot{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-foot\]\:flex .hc-foot{display:flex}.\[\&_\.hc-foot\]\:items-center .hc-foot{align-items:center}.\[\&_\.hc-foot\]\:justify-between .hc-foot{justify-content:space-between}.\[\&_\.hc-foot\]\:gap-2\.5 .hc-foot{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-foot\]\:text-xs .hc-foot{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-foot\]\:text-muted .hc-foot{color:var(--muted)}.\[\&_\.hc-foot_\.hc-command\]\:min-w-0 .hc-foot .hc-command{min-width:0}.\[\&_\.hc-foot_\.hc-command\]\:overflow-hidden .hc-foot .hc-command{overflow:hidden}.\[\&_\.hc-foot_\.hc-command\]\:text-ellipsis .hc-foot .hc-command{text-overflow:ellipsis}.\[\&_\.hc-foot_\.hc-command\]\:whitespace-nowrap .hc-foot .hc-command{white-space:nowrap}.\[\&_\.hc-git\]\:mt-2\.5 .hc-git{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-git\]\:flex .hc-git{display:flex}.\[\&_\.hc-git\]\:flex-col .hc-git{flex-direction:column}.\[\&_\.hc-git\]\:gap-1 .hc-git{gap:var(--spacing)}.\[\&_\.hc-git\]\:border-t .hc-git{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-git\]\:border-t-border-variant .hc-git{border-top-color:var(--border-variant)}.\[\&_\.hc-git\]\:pt-2 .hc-git{padding-top:calc(var(--spacing) * 2)}.\[\&_\.hc-git\]\:text-xs .hc-git{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-git\]\:text-text .hc-git{color:var(--text)}.\[\&_\.hc-git-row\]\:flex .hc-git-row{display:flex}.\[\&_\.hc-git-row\]\:min-w-0 .hc-git-row{min-width:0}.\[\&_\.hc-git-row\]\:flex-wrap .hc-git-row{flex-wrap:wrap}.\[\&_\.hc-git-row\]\:items-center .hc-git-row{align-items:center}.\[\&_\.hc-git-row\]\:gap-2\.5 .hc-git-row{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-head\]\:flex .hc-head{display:flex}.\[\&_\.hc-head\]\:items-baseline .hc-head{align-items:baseline}.\[\&_\.hc-head\]\:justify-between .hc-head{justify-content:space-between}.\[\&_\.hc-head\]\:gap-2\.5 .hc-head{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-monitoring\]\:mt-2 .hc-monitoring{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-monitoring\]\:line-clamp-3 .hc-monitoring{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-monitoring\]\:text-accent-amber .hc-monitoring{color:var(--accent-amber)}.\[\&_\.hc-slug\]\:min-w-0 .hc-slug{min-width:0}.\[\&_\.hc-slug\]\:overflow-hidden .hc-slug{overflow:hidden}.\[\&_\.hc-slug\]\:text-sm .hc-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-slug\]\:font-semibold .hc-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.hc-slug\]\:text-ellipsis .hc-slug{text-overflow:ellipsis}.\[\&_\.hc-slug\]\:whitespace-nowrap .hc-slug{white-space:nowrap}.\[\&_\.hc-stats\]\:mt-2\.5 .hc-stats{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:flex .hc-stats{display:flex}.\[\&_\.hc-stats\]\:flex-wrap .hc-stats{flex-wrap:wrap}.\[\&_\.hc-stats\]\:items-center .hc-stats{align-items:center}.\[\&_\.hc-stats\]\:gap-3 .hc-stats{gap:calc(var(--spacing) * 3)}.\[\&_\.hc-stats\]\:border-t .hc-stats{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-stats\]\:border-t-border-variant .hc-stats{border-top-color:var(--border-variant)}.\[\&_\.hc-stats\]\:pt-2\.5 .hc-stats{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:text-xs .hc-stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-stats\]\:text-text .hc-stats{color:var(--text)}.\[\&_\.hc-title\]\:mt-\[3px\] .hc-title{margin-top:3px}.\[\&_\.hc-title\]\:text-text .hc-title{color:var(--text)}.\[\&_\.hc-toggle\]\:mt-1 .hc-toggle{margin-top:var(--spacing)}.\[\&_\.hc-toggle\]\:text-sm .hc-toggle{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-toggle\]\:font-medium .hc-toggle{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-toggle\]\:text-muted .hc-toggle{color:var(--muted)}.\[\&_\.hc-toggle\:hover\]\:text-text .hc-toggle:hover{color:var(--text)}.\[\&_\.home-inner\]\:max-w-140 .home-inner{max-width:calc(var(--spacing) * 140)}.\[\&_\.home-inner\]\:max-w-300 .home-inner{max-width:calc(var(--spacing) * 300)}.\[\&_\.home-inner\]\:pt-0 .home-inner{padding-top:0}.\[\&_\.home-inner\]\:pt-24 .home-inner{padding-top:calc(var(--spacing) * 24)}.\[\&_\.home-inner\]\:pb-0 .home-inner{padding-bottom:0}.\[\&_\.icon-btn\]\:ms-2 .icon-btn{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.icon-btn\]\:align-middle .icon-btn{vertical-align:middle}.\[\&_\.id\]\:text-xs .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.id\]\:text-muted .id{color:var(--muted)}.\[\&_\.k\]\:text-sm .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.k\]\:font-medium .k{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.k\]\:text-subtext .k{color:var(--subtext)}.\[\&_\.k\]\:text-text .k{color:var(--text)}.\[\&_\.katex\]\:text-prose-emphasis .katex{font-size:1.05em}.\[\&_\.katex-display\]\:mx-0 .katex-display{margin-inline:0}.\[\&_\.katex-display\]\:my-3 .katex-display{margin-block:calc(var(--spacing) * 3)}.\[\&_\.katex-display\]\:overflow-x-auto .katex-display{overflow-x:auto}.\[\&_\.katex-display\]\:overflow-y-hidden .katex-display{overflow-y:hidden}.\[\&_\.katex-display\]\:px-0 .katex-display{padding-inline:0}.\[\&_\.katex-display\]\:py-0\.5 .katex-display{padding-block:calc(var(--spacing) * .5)}.\[\&_\.kv\]\:grid-cols-\[132px_minmax\(0\,_1fr\)\] .kv{grid-template-columns:132px minmax(0,1fr)}.\[\&_\.kv\]\:items-center .kv{align-items:center}.\[\&_\.kv\]\:gap-x-4\.5 .kv{column-gap:calc(var(--spacing) * 4.5)}.\[\&_\.kv\]\:gap-y-1\.5 .kv{row-gap:calc(var(--spacing) * 1.5)}.\[\&_\.kv\]\:gap-y-\[9px\] .kv{row-gap:9px}.\[\&_\.kv_\.k\]\:text-sm .kv .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.kv_\.v\]\:flex .kv .v{display:flex}.\[\&_\.kv_\.v\]\:min-w-0 .kv .v{min-width:0}.\[\&_\.kv_\.v\]\:flex-wrap .kv .v{flex-wrap:wrap}.\[\&_\.kv_\.v\]\:items-center .kv .v{align-items:center}.\[\&_\.kv_\.v\]\:gap-\[7px\] .kv .v{gap:7px}.\[\&_\.kv_\.v\]\:font-sans .kv .v{font-family:var(--sans)}.\[\&_\.kv_\.v\]\:text-base .kv .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.kv_\.v\]\:break-normal .kv .v{overflow-wrap:normal;word-break:normal}.\[\&_\.md\]\:max-w-readable .md{max-width:var(--readable-col)}.\[\&_\.md\]\:text-base .md{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.md\]\:leading-\[1\.65\] .md{--tw-leading:1.65;line-height:1.65}.\[\&_\.md\]\:text-text .md{color:var(--text)}.\[\&_\.md_h1\]\:mx-0 .md h1{margin-inline:0}.\[\&_\.md_h1\]\:mt-4\.5 .md h1{margin-top:calc(var(--spacing) * 4.5)}.\[\&_\.md_h1\]\:mb-2 .md h1{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h1\]\:text-2xl .md h1{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_\.md_h2\]\:mx-0 .md h2{margin-inline:0}.\[\&_\.md_h2\]\:mt-4 .md h2{margin-top:calc(var(--spacing) * 4)}.\[\&_\.md_h2\]\:mb-2 .md h2{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h2\]\:text-xl .md h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\.md_h3\]\:text-lg .md h3{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_\.model-id\]\:block .model-id{display:block}.\[\&_\.model-id\]\:text-xs .model-id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.model-id\]\:text-muted .model-id{color:var(--muted)}.\[\&_\.model-item\]\:ps-6 .model-item{padding-inline-start:calc(var(--spacing) * 6)}.\[\&_\.model-item\]\:whitespace-nowrap .model-item{white-space:nowrap}.\[\&_\.model-item\:disabled\]\:cursor-default .model-item:disabled{cursor:default}.\[\&_\.model-item\:disabled\]\:text-muted .model-item:disabled{color:var(--muted)}.\[\&_\.model-item\:disabled\:hover\]\:bg-transparent .model-item:disabled:hover{background-color:#0000}.\[\&_\.new-project-actions\]\:mt-2\.5 .new-project-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.new-project-actions\]\:justify-start .new-project-actions{justify-content:flex-start}.\[\&_\.node-action\]\:inline-flex .node-action{display:inline-flex}.\[\&_\.node-action\]\:items-center .node-action{align-items:center}.\[\&_\.node-action\]\:gap-\[5px\] .node-action{gap:5px}.\[\&_\.node-action\]\:rounded-sm .node-action{border-radius:6px}.\[\&_\.node-action\]\:px-1\.5 .node-action{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.node-action\]\:py-\[3px\] .node-action{padding-block:3px}.\[\&_\.node-action\]\:text-sm .node-action{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-action\]\:font-medium .node-action{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-action\]\:text-text .node-action{color:var(--text)}.\[\&_\.node-action\]\:no-underline .node-action{text-decoration-line:none}.\[\&_\.node-action-ext\]\:ms-auto .node-action-ext{margin-inline-start:auto}.\[\&_\.node-action-ext\]\:px-\[5px\] .node-action-ext{padding-inline:5px}.\[\&_\.node-action-ext\]\:py-\[3px\] .node-action-ext{padding-block:3px}.\[\&_\.node-action\:hover\]\:bg-surface .node-action:hover{background-color:var(--surface)}.\[\&_\.node-action\:hover\]\:text-text .node-action:hover{color:var(--text)}.\[\&_\.node-actions\]\:mt-2 .node-actions{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-actions\]\:flex .node-actions{display:flex}.\[\&_\.node-actions\]\:items-center .node-actions{align-items:center}.\[\&_\.node-actions\]\:gap-\[3px\] .node-actions{gap:3px}.\[\&_\.node-actions\]\:border-t .node-actions{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.node-actions\]\:border-t-border-variant .node-actions{border-top-color:var(--border-variant)}.\[\&_\.node-actions\]\:pt-1\.5 .node-actions{padding-top:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:mb-1\.5 .node-eyebrow{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:flex .node-eyebrow{display:flex}.\[\&_\.node-eyebrow\]\:items-center .node-eyebrow{align-items:center}.\[\&_\.node-eyebrow\]\:justify-between .node-eyebrow{justify-content:space-between}.\[\&_\.node-eyebrow\]\:gap-2 .node-eyebrow{gap:calc(var(--spacing) * 2)}.\[\&_\.node-eyebrow\]\:text-xs .node-eyebrow{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-eyebrow\]\:font-medium .node-eyebrow{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-eyebrow\]\:text-muted .node-eyebrow{color:var(--muted)}.\[\&_\.node-head\]\:flex .node-head{display:flex}.\[\&_\.node-head\]\:min-w-0 .node-head{min-width:0}.\[\&_\.node-head\]\:items-center .node-head{align-items:center}.\[\&_\.node-head\]\:gap-\[7px\] .node-head{gap:7px}.\[\&_\.node-meta\]\:mt-2 .node-meta{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:flex .node-meta{display:flex}.\[\&_\.node-meta\]\:items-center .node-meta{align-items:center}.\[\&_\.node-meta\]\:gap-2 .node-meta{gap:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:text-xs .node-meta{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-meta\]\:text-muted .node-meta{color:var(--muted)}.\[\&_\.node-overview-link\]\:block .node-overview-link{display:block}.\[\&_\.node-overview-link\]\:w-full .node-overview-link{width:100%}.\[\&_\.node-overview-link\]\:cursor-pointer .node-overview-link{cursor:pointer}.\[\&_\.node-overview-link\]\:border-0 .node-overview-link{border-style:var(--tw-border-style);border-width:0}.\[\&_\.node-overview-link\]\:bg-transparent .node-overview-link{background-color:#0000}.\[\&_\.node-overview-link\]\:p-0 .node-overview-link{padding:0}.\[\&_\.node-overview-link\]\:text-start .node-overview-link{text-align:start}.\[\&_\.node-overview-link\]\:text-inherit .node-overview-link{color:inherit}.\[\&_\.node-overview-link\]\:\[font\:inherit\] .node-overview-link{font:inherit}.\[\&_\.node-overview-link\:focus-visible\]\:rounded-xs .node-overview-link:focus-visible{border-radius:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-2 .node-overview-link:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-offset-4 .node-overview-link:focus-visible{outline-offset:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-accent .node-overview-link:focus-visible{outline-color:var(--accent)}.\[\&_\.node-overview-link\:focus-visible\]\:outline-solid .node-overview-link:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline .node-overview-link:hover .node-slug{text-decoration-line:underline}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline-offset-\[3px\] .node-overview-link:hover .node-slug{text-underline-offset:3px}.\[\&_\.node-slug\]\:min-w-0 .node-slug{min-width:0}.\[\&_\.node-slug\]\:flex-1 .node-slug{flex:1}.\[\&_\.node-slug\]\:overflow-hidden .node-slug{overflow:hidden}.\[\&_\.node-slug\]\:text-sm .node-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-slug\]\:font-semibold .node-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.node-slug\]\:text-ellipsis .node-slug{text-overflow:ellipsis}.\[\&_\.node-slug\]\:whitespace-nowrap .node-slug{white-space:nowrap}.\[\&_\.node-slug\]\:text-text .node-slug{color:var(--text)}.\[\&_\.node-status\]\:h-2 .node-status{height:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:w-2 .node-status{width:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:shrink-0 .node-status{flex-shrink:0}.\[\&_\.node-status\]\:rounded-full .node-status{border-radius:999px}.\[\&_\.node-title\]\:mt-1 .node-title{margin-top:var(--spacing)}.\[\&_\.node-title\]\:line-clamp-2 .node-title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.node-title\]\:text-sm .node-title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-title\]\:text-text .node-title{color:var(--text)}.\[\&_\.openresearch-diff-file\]\:w-full .openresearch-diff-file{width:100%}.\[\&_\.openresearch-diff-file\]\:\[--diff-background-color\:var\(--base\)\] .openresearch-diff-file{--diff-background-color:var(--base)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-background-color\:var\(--color-diff-delete-code\)\] .openresearch-diff-file{--diff-code-delete-background-color:var(--color-diff-delete-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-background-color\:var\(--color-diff-delete-edit\)\] .openresearch-diff-file{--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-background-color\:var\(--color-diff-insert-code\)\] .openresearch-diff-file{--diff-code-insert-background-color:var(--color-diff-insert-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-background-color\:var\(--color-diff-insert-edit\)\] .openresearch-diff-file{--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-background-color\:var\(--diff-selection-background-color\)\] .openresearch-diff-file{--diff-code-selected-background-color:var(--diff-selection-background-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-code-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-font-family\:var\(--mono\)\] .openresearch-diff-file{--diff-font-family:var(--mono)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-background-color\:var\(--color-diff-delete-gutter\)\] .openresearch-diff-file{--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-text-color\:var\(--accent-red\)\] .openresearch-diff-file{--diff-gutter-delete-text-color:var(--accent-red)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-background-color\:var\(--color-diff-insert-gutter\)\] .openresearch-diff-file{--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-text-color\:var\(--accent-green\)\] .openresearch-diff-file{--diff-gutter-insert-text-color:var(--accent-green)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-background-color\:var\(--color-diff-gutter-selection\)\] .openresearch-diff-file{--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-gutter-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-omit-gutter-line-color\:var\(--color-diff-omit-gutter\)\] .openresearch-diff-file{--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-background-color\:var\(--color-diff-selection\)\] .openresearch-diff-file{--diff-selection-background-color:var(--color-diff-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-text-color\:var\(--primary\)\] .openresearch-diff-file{--diff-selection-text-color:var(--primary)}.\[\&_\.openresearch-diff-file\]\:\[--diff-text-color\:var\(--text\)\] .openresearch-diff-file{--diff-text-color:var(--text)}.\[\&_\.openresearch-diff-file_\.diff-code\]\:py-0 .openresearch-diff-file .diff-code{padding-block:0}.\[\&_\.openresearch-diff-file_\.diff-code\]\:ps-\[2ch\] .openresearch-diff-file .diff-code{padding-inline-start:2ch}.\[\&_\.openresearch-diff-file_\.diff-code\]\:pe-4 .openresearch-diff-file .diff-code{padding-inline-end:calc(var(--spacing) * 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-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.openresearch-diff-file_\.diff-hunk_\+_\.diff-hunk_\.diff-line\:first-child_\>_td\]\:border-t-border .openresearch-diff-file .diff-hunk+.diff-hunk .diff-line:first-child>td{border-top-color:var(--border)}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:color-mix(in oklab,var(--base) 92%,var(--accent-red))}}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:color-mix(in oklab,var(--base) 91%,var(--accent-green))}}.\[\&_\.openresearch-diff-file\.diff-unified\]\:table-fixed .openresearch-diff-file.diff-unified{table-layout:fixed}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:first-child\]\:p-0 .openresearch-diff-file.diff-unified .diff-line>td:first-child{padding:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:w-\[7ch\] .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){width:7ch}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:cursor-default .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){cursor:default}.\[\&_\.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-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.\[\&_\.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){border-inline-end-color:var(--border)}.\[\&_\.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){padding-inline-start:calc(var(--spacing) * 3.5)}.\[\&_\.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){padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pt-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-top:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pb-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-bottom:0}.\[\&_\.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-align:end}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:whitespace-nowrap .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){white-space:nowrap}.\[\&_\.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){color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.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){color:color-mix(in oklab,var(--text) 45%,var(--base))}}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:select-none .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){-webkit-user-select:none;user-select:none}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:collapse .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{visibility:collapse}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:w-0 .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{width:0}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:nth-child\(2\)\]\:w-\[7ch\] .openresearch-diff-file.diff-unified col.diff-gutter-col:nth-child(2){width:7ch}.\[\&_\.option-menu\]\:w-max .option-menu{width:max-content}.\[\&_\.paper-destination\]\:flex .paper-destination{display:flex}.\[\&_\.paper-destination\]\:items-center .paper-destination{align-items:center}.\[\&_\.paper-destination\]\:gap-2\.5 .paper-destination{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-destination\]\:rounded-md .paper-destination{border-radius:8px}.\[\&_\.paper-destination\]\:border .paper-destination{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-destination\]\:border-border .paper-destination{border-color:var(--border)}.\[\&_\.paper-destination\]\:bg-background .paper-destination{background-color:var(--base)}.\[\&_\.paper-destination\]\:ps-3 .paper-destination{padding-inline-start:calc(var(--spacing) * 3)}.\[\&_\.paper-destination\]\:pe-2 .paper-destination{padding-inline-end:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pt-2 .paper-destination{padding-top:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pb-2 .paper-destination{padding-bottom:calc(var(--spacing) * 2)}.\[\&_\.paper-destination_\.btn\]\:flex-none .paper-destination .btn{flex:none}.\[\&_\.paper-destination_code\]\:min-w-0 .paper-destination code{min-width:0}.\[\&_\.paper-destination_code\]\:flex-1 .paper-destination code{flex:1}.\[\&_\.paper-destination_code\]\:overflow-hidden .paper-destination code{overflow:hidden}.\[\&_\.paper-destination_code\]\:text-sm .paper-destination code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-destination_code\]\:font-normal .paper-destination code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.paper-destination_code\]\:text-ellipsis .paper-destination code{text-overflow:ellipsis}.\[\&_\.paper-destination_code\]\:whitespace-nowrap .paper-destination code{white-space:nowrap}.\[\&_\.paper-destination_code\]\:text-text .paper-destination code{color:var(--text)}.\[\&_\.paper-pick\]\:flex .paper-pick{display:flex}.\[\&_\.paper-pick\]\:items-center .paper-pick{align-items:center}.\[\&_\.paper-pick\]\:justify-between .paper-pick{justify-content:space-between}.\[\&_\.paper-pick\]\:gap-2\.5 .paper-pick{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick\]\:rounded-md .paper-pick{border-radius:8px}.\[\&_\.paper-pick\]\:border .paper-pick{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-pick\]\:border-border .paper-pick{border-color:var(--border)}.\[\&_\.paper-pick\]\:bg-surface .paper-pick{background-color:var(--surface)}.\[\&_\.paper-pick\]\:px-3 .paper-pick{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.paper-pick\]\:py-2\.5 .paper-pick{padding-block:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick_\.id\]\:text-xs .paper-pick .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-pick_\.id\]\:text-muted .paper-pick .id{color:var(--muted)}.\[\&_\.paper-pick_\.meta\]\:min-w-0 .paper-pick .meta{min-width:0}.\[\&_\.paper-pick_\.title\]\:text-sm .paper-pick .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-pick_\.title\]\:font-medium .paper-pick .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results\]\:flex .paper-results{display:flex}.\[\&_\.paper-results\]\:max-h-60 .paper-results{max-height:calc(var(--spacing) * 60)}.\[\&_\.paper-results\]\:flex-col .paper-results{flex-direction:column}.\[\&_\.paper-results\]\:overflow-y-auto .paper-results{overflow-y:auto}.\[\&_\.paper-results\]\:rounded-md .paper-results{border-radius:8px}.\[\&_\.paper-results\]\:border .paper-results{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-results\]\:border-border .paper-results{border-color:var(--border)}.\[\&_\.paper-results_\.id\]\:text-xs .paper-results .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-results_\.id\]\:text-muted .paper-results .id{color:var(--muted)}.\[\&_\.paper-results_\.title\]\:text-sm .paper-results .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-results_\.title\]\:font-medium .paper-results .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results_button\]\:flex .paper-results button{display:flex}.\[\&_\.paper-results_button\]\:cursor-pointer .paper-results button{cursor:pointer}.\[\&_\.paper-results_button\]\:flex-col .paper-results button{flex-direction:column}.\[\&_\.paper-results_button\]\:items-start .paper-results button{align-items:flex-start}.\[\&_\.paper-results_button\]\:gap-0\.5 .paper-results button{gap:calc(var(--spacing) * .5)}.\[\&_\.paper-results_button\]\:border-0 .paper-results button{border-style:var(--tw-border-style);border-width:0}.\[\&_\.paper-results_button\]\:border-b .paper-results button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_\.paper-results_button\]\:border-b-border-variant .paper-results button{border-bottom-color:var(--border-variant)}.\[\&_\.paper-results_button\]\:bg-transparent .paper-results button{background-color:#0000}.\[\&_\.paper-results_button\]\:bg-none .paper-results button{background-image:none}.\[\&_\.paper-results_button\]\:px-2\.5 .paper-results button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.paper-results_button\]\:py-2 .paper-results button{padding-block:calc(var(--spacing) * 2)}.\[\&_\.paper-results_button\]\:text-start .paper-results button{text-align:start}.\[\&_\.paper-results_button\]\:text-text .paper-results button{color:var(--text)}.\[\&_\.paper-results_button\]\:\[font\:inherit\] .paper-results button{font:inherit}.\[\&_\.paper-results_button\:hover\]\:bg-surface .paper-results button:hover{background-color:var(--surface)}.\[\&_\.paper-results_button\:last-child\]\:border-b-0 .paper-results button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_\.path\]\:flex .path{display:flex}.\[\&_\.path\]\:min-w-0 .path{min-width:0}.\[\&_\.path\]\:flex-1 .path{flex:1}.\[\&_\.path\]\:items-center .path{align-items:center}.\[\&_\.path\]\:gap-2 .path{gap:calc(var(--spacing) * 2)}.\[\&_\.path_code\]\:min-w-0 .path code{min-width:0}.\[\&_\.path_code\]\:flex-1 .path code{flex:1}.\[\&_\.path_code\]\:overflow-hidden .path code{overflow:hidden}.\[\&_\.path_code\]\:font-mono .path code{font-family:var(--mono)}.\[\&_\.path_code\]\:text-xs .path code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.path_code\]\:font-medium .path code{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.path_code\]\:text-ellipsis .path code{text-overflow:ellipsis}.\[\&_\.path_code\]\:whitespace-nowrap .path code{white-space:nowrap}.\[\&_\.path_code\]\:text-text .path code{color:var(--text)}.\[\&_\.progress\]\:mx-0 .progress{margin-inline:0}.\[\&_\.progress\]\:mt-2 .progress{margin-top:calc(var(--spacing) * 2)}.\[\&_\.progress\]\:mb-0 .progress{margin-bottom:0}.\[\&_\.progress-track\]\:h-\[5px\] .progress-track{height:5px}.\[\&_\.progress-track\]\:border-0 .progress-track{border-style:var(--tw-border-style);border-width:0}.\[\&_\.progress-track\]\:bg-border .progress-track{background-color:var(--border)}.\[\&_\.project-default-title\]\:text-base .project-default-title,.\[\&_\.project-field-label\]\:text-base .project-field-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-field-label\]\:font-medium .project-field-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-field-label\]\:text-text .project-field-label{color:var(--text)}.\[\&_\.project-location-field\]\:flex .project-location-field{display:flex}.\[\&_\.project-location-field\]\:flex-col .project-location-field{flex-direction:column}.\[\&_\.project-location-field\]\:gap-2 .project-location-field{gap:calc(var(--spacing) * 2)}.\[\&_\.project-location-label\]\:text-base .project-location-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-location-label\]\:font-medium .project-location-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-location-label\]\:text-text .project-location-label{color:var(--text)}.\[\&_\.project-path-notice\]\:rounded-sm .project-path-notice{border-radius:6px}.\[\&_\.project-path-notice\]\:border .project-path-notice{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.project-path-notice\]\:border-border-variant .project-path-notice{border-color:var(--border-variant)}.\[\&_\.project-path-notice\]\:bg-surface .project-path-notice{background-color:var(--surface)}.\[\&_\.project-path-notice\]\:px-\[11px\] .project-path-notice{padding-inline:11px}.\[\&_\.project-path-notice\]\:py-\[9px\] .project-path-notice{padding-block:9px}.\[\&_\.project-path-notice\]\:text-base .project-path-notice{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-path-notice\]\:text-sm .project-path-notice{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.project-path-notice\]\:leading-\[1\.4\] .project-path-notice{--tw-leading:1.4;line-height:1.4}.\[\&_\.project-path-notice\]\:leading-relaxed .project-path-notice{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\.project-path-notice\]\:text-subtext .project-path-notice{color:var(--subtext)}.\[\&_\.project-path-notice\]\:text-text .project-path-notice{color:var(--text)}.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:color-mix(in srgb,var(--accent-red) 35%,var(--border-variant))}}.\[\&_\.rail-body\]\:min-h-0 .rail-body{min-height:0}.\[\&_\.rail-body\]\:flex-1 .rail-body{flex:1}.\[\&_\.rail-body\]\:overflow-y-auto .rail-body{overflow-y:auto}.\[\&_\.rail-body\]\:px-2 .rail-body{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.rail-body\]\:pt-0 .rail-body{padding-top:0}.\[\&_\.rail-body\]\:pb-1 .rail-body{padding-bottom:var(--spacing)}.\[\&_\.react-flow\\_\\_attribution\]\:hidden\! .react-flow__attribution{display:none!important}.\[\&_\.react-flow\\_\\_handle\]\:pointer-events-none .react-flow__handle{pointer-events:none}.\[\&_\.react-flow\\_\\_handle\]\:opacity-0 .react-flow__handle{opacity:0}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-archived\.selectable\]\:cursor-pointer .react-flow__node.react-flow__node-archived.selectable,.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-elided\.selectable\]\:cursor-pointer .react-flow__node.react-flow__node-elided.selectable{cursor:pointer}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-exp\.selectable\]\:cursor-default .react-flow__node.react-flow__node-exp.selectable{cursor:default}.\[\&_\.repo-hint\]\:text-sm .repo-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.repo-hint\]\:font-normal .repo-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.repo-hint\]\:text-muted .repo-hint{color:var(--muted)}.\[\&_\.repo-hint\.ok\]\:text-accent-teal .repo-hint.ok{color:var(--accent-teal)}.\[\&_\.row2\]\:grid .row2{display:grid}.\[\&_\.row2\]\:grid-cols-2 .row2{grid-template-columns:repeat(2,minmax(0,1fr))}.\[\&_\.row2\]\:gap-2\.5 .row2{gap:calc(var(--spacing) * 2.5)}.\[\&_\.run-chip_svg\]\:text-primary .run-chip svg{color:var(--primary)}.\[\&_\.run-chip_svg\]\:opacity-100 .run-chip svg{opacity:1}.\[\&_\.sel\]\:font-medium .sel{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.sel\]\:text-text .sel{color:var(--text)}.\[\&_\.session-dot\]\:inline-flex .session-dot{display:inline-flex}.\[\&_\.session-dot\]\:w-4 .session-dot{width:calc(var(--spacing) * 4)}.\[\&_\.session-dot\]\:shrink-0 .session-dot{flex-shrink:0}.\[\&_\.session-dot\]\:items-center .session-dot{align-items:center}.\[\&_\.session-dot\]\:justify-center .session-dot{justify-content:center}.\[\&_\.session-dot\:empty\]\:hidden .session-dot:empty{display:none}.\[\&_\.session-menu-btn\]\:mx-0 .session-menu-btn{margin-inline:0}.\[\&_\.session-menu-btn\]\:-my-0\.5 .session-menu-btn{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-menu-btn\]\:hidden .session-menu-btn{display:none}.\[\&_\.session-menu-btn\]\:h-4 .session-menu-btn{height:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:w-4 .session-menu-btn{width:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:shrink-0 .session-menu-btn{flex-shrink:0}.\[\&_\.session-menu-btn\]\:items-center .session-menu-btn{align-items:center}.\[\&_\.session-menu-btn\]\:justify-center .session-menu-btn{justify-content:center}.\[\&_\.session-menu-btn\]\:rounded-sm .session-menu-btn{border-radius:6px}.\[\&_\.session-menu-btn\]\:text-muted .session-menu-btn{color:var(--muted)}.\[\&_\.session-menu-btn\:focus-visible\]\:inline-flex .session-menu-btn:focus-visible{display:inline-flex}.\[\&_\.session-menu-btn\:hover\]\:bg-panel .session-menu-btn:hover{background-color:var(--panel)}.\[\&_\.session-menu-btn\:hover\]\:text-text .session-menu-btn:hover{color:var(--text)}.\[\&_\.session-title\]\:min-w-0 .session-title{min-width:0}.\[\&_\.session-title\]\:flex-1 .session-title{flex:1}.\[\&_\.session-title\]\:overflow-hidden .session-title{overflow:hidden}.\[\&_\.session-title\]\:\[mask-image\:linear-gradient\(to_right\,black_calc\(100\%_-_16px\)\,transparent\)\] .session-title{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000);mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000)}.\[\&_\.session-title\]\:whitespace-nowrap .session-title{white-space:nowrap}.\[\&_\.session-title-input\]\:mx-0 .session-title-input{margin-inline:0}.\[\&_\.session-title-input\]\:-my-0\.5 .session-title-input{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-title-input\]\:min-w-0 .session-title-input{min-width:0}.\[\&_\.session-title-input\]\:flex-1 .session-title-input{flex:1}.\[\&_\.session-title-input\]\:rounded-sm .session-title-input{border-radius:6px}.\[\&_\.session-title-input\]\:border .session-title-input{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.session-title-input\]\:border-primary .session-title-input{border-color:var(--primary)}.\[\&_\.session-title-input\]\:bg-background .session-title-input{background-color:var(--base)}.\[\&_\.session-title-input\]\:px-\[5px\] .session-title-input{padding-inline:5px}.\[\&_\.session-title-input\]\:py-px .session-title-input{padding-block:1px}.\[\&_\.session-title-input\]\:text-text .session-title-input{color:var(--text)}.\[\&_\.session-title-input\]\:outline-none .session-title-input{--tw-outline-style:none;outline-style:none}.\[\&_\.session-title-input\]\:\[font\:inherit\] .session-title-input{font:inherit}.\[\&_\.settings-card\]\:mb-0 .settings-card,.\[\&_\.settings-card-head\]\:mb-0 .settings-card-head{margin-bottom:0}.\[\&_\.settings-card-head\]\:justify-between .settings-card-head{justify-content:space-between}.\[\&_\.settings-card-head\]\:pb-3 .settings-card-head{padding-bottom:calc(var(--spacing) * 3)}.\[\&_\.settings-card-head_h3\]\:m-0 .settings-card-head h3{margin:0}.\[\&_\.settings-form\]\:mt-6 .settings-form{margin-top:calc(var(--spacing) * 6)}.\[\&_\.settings-form\]\:border-t-0 .settings-form{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\.settings-form\]\:pt-0 .settings-form{padding-top:0}.\[\&_\.settings-sub\]\:mb-3 .settings-sub{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\.skill-chip\]\:align-baseline .skill-chip{vertical-align:baseline}.\[\&_\.spinner\]\:h-5\.5 .spinner{height:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:w-5\.5 .spinner{width:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:border-\[3px\] .spinner{border-style:var(--tw-border-style);border-width:3px}.\[\&_\.stats\]\:flex .stats{display:flex}.\[\&_\.stats\]\:shrink-0 .stats{flex-shrink:0}.\[\&_\.stats\]\:items-center .stats{align-items:center}.\[\&_\.stats\]\:gap-2 .stats{gap:calc(var(--spacing) * 2)}.\[\&_\.stats\]\:font-mono .stats{font-family:var(--mono)}.\[\&_\.stats\]\:text-xs .stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.stats\]\:font-medium .stats{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.stats\]\:tabular-nums .stats{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.\[\&_\.status-badge\]\:text-text .status-badge{color:var(--text)}.\[\&_\.tab-close\]\:inline-flex .tab-close{display:inline-flex}.\[\&_\.tab-close\]\:h-3\.5 .tab-close{height:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:w-3\.5 .tab-close{width:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:shrink-0 .tab-close{flex-shrink:0}.\[\&_\.tab-close\]\:items-center .tab-close{align-items:center}.\[\&_\.tab-close\]\:justify-center .tab-close{justify-content:center}.\[\&_\.tab-close\]\:rounded-xs .tab-close{border-radius:4px}.\[\&_\.tab-close\]\:text-muted .tab-close{color:var(--muted)}.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:color-mix(in oklab,var(--text) 15%,transparent)}}.\[\&_\.tab-close\:hover\]\:text-text .tab-close:hover{color:var(--text)}.\[\&_\.tab-label\]\:grid .tab-label{display:grid}.\[\&_\.tab-label\]\:min-w-0 .tab-label{min-width:0}.\[\&_\.tab-label\]\:grid-cols-\[minmax\(0\,_1fr\)\] .tab-label{grid-template-columns:minmax(0,1fr)}.\[\&_\.tab-label\]\:overflow-hidden .tab-label,.\[\&_\.tab-label_\>_span\]\:overflow-hidden .tab-label>span{overflow:hidden}.\[\&_\.tab-label_\>_span\]\:pe-1 .tab-label>span{padding-inline-end:var(--spacing)}.\[\&_\.tab-label_\>_span\]\:text-ellipsis .tab-label>span{text-overflow:ellipsis}.\[\&_\.tab-label_\>_span\]\:whitespace-nowrap .tab-label>span{white-space:nowrap}.\[\&_\.tab-label_\>_span\]\:\[grid-area\:1_\/_1\] .tab-label>span{grid-area:1/1}.\[\&_\.tab-label\:\:after\]\:invisible .tab-label:after{visibility:hidden}.\[\&_\.tab-label\:\:after\]\:overflow-hidden .tab-label:after{overflow:hidden}.\[\&_\.tab-label\:\:after\]\:pe-1 .tab-label:after{padding-inline-end:var(--spacing)}.\[\&_\.tab-label\:\:after\]\:font-medium .tab-label:after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.tab-label\:\:after\]\:text-ellipsis .tab-label:after{text-overflow:ellipsis}.\[\&_\.tab-label\:\:after\]\:whitespace-nowrap .tab-label:after{white-space:nowrap}.\[\&_\.tab-label\:\:after\]\:content-\[attr\(data-label\)\] .tab-label:after{--tw-content:attr(data-label);content:var(--tw-content)}.\[\&_\.tab-label\:\:after\]\:\[grid-area\:1_\/_1\] .tab-label:after{grid-area:1/1}.\[\&_\.title\]\:max-w-60 .title{max-width:calc(var(--spacing) * 60)}.\[\&_\.title\]\:overflow-hidden .title{overflow:hidden}.\[\&_\.title\]\:text-sm .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.title\]\:font-medium .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.title\]\:text-ellipsis .title{text-overflow:ellipsis}.\[\&_\.title\]\:whitespace-nowrap .title{white-space:nowrap}.\[\&_\.unread-dot\]\:h-\[7px\] .unread-dot{height:7px}.\[\&_\.unread-dot\]\:w-\[7px\] .unread-dot{width:7px}.\[\&_\.unread-dot\]\:shrink-0 .unread-dot{flex-shrink:0}.\[\&_\.unread-dot\]\:rounded-full .unread-dot{border-radius:999px}.\[\&_\.unread-dot\]\:bg-primary .unread-dot{background-color:var(--primary)}.\[\&_\.v\]\:flex .v{display:flex}.\[\&_\.v\]\:min-w-0 .v{min-width:0}.\[\&_\.v\]\:flex-wrap .v{flex-wrap:wrap}.\[\&_\.v\]\:items-center .v{align-items:center}.\[\&_\.v\]\:gap-2 .v{gap:calc(var(--spacing) * 2)}.\[\&_\.v\]\:font-sans .v{font-family:var(--sans)}.\[\&_\.v\]\:text-base .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.v\]\:text-sm .v{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.v\]\:break-words .v{overflow-wrap:break-word}.\[\&_\.v\]\:break-all .v{word-break:break-all}.\[\&_\.v\]\:text-text .v{color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\]\:relative :where([data-tip]){position:relative}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:pointer-events-none :where([data-tip]):after{pointer-events:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:invisible :where([data-tip]):after{visibility:hidden}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:absolute :where([data-tip]):after{position:absolute}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:top-\[calc\(100\%_\+_6px\)\] :where([data-tip]):after{top:calc(100% + 6px)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:left-1\/2 :where([data-tip]):after{left:50%}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:z-\[9999\] :where([data-tip]):after{z-index:9999}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:w-max :where([data-tip]):after{width:max-content}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:max-w-none :where([data-tip]):after{max-width:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:-translate-x-1\/2 :where([data-tip]):after{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:rounded-sm :where([data-tip]):after{border-radius:6px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:bg-text :where([data-tip]):after{background-color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:px-2 :where([data-tip]):after{padding-inline:calc(var(--spacing) * 2)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:py-\[5px\] :where([data-tip]):after{padding-block:5px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-xs :where([data-tip]):after{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:leading-none :where([data-tip]):after{--tw-leading:1;line-height:1}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:font-medium :where([data-tip]):after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:whitespace-nowrap :where([data-tip]):after{white-space:nowrap}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-background :where([data-tip]):after{color:var(--base)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:opacity-0 :where([data-tip]):after{opacity:0}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:content-\[attr\(data-tip\)\] :where([data-tip]):after{--tw-content:attr(data-tip);content:var(--tw-content)}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:visible :where([data-tip]):is(:hover,:focus-visible):after{visibility:visible}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:opacity-100 :where([data-tip]):is(:hover,:focus-visible):after{opacity:1}.\[\&_\>_\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&_\>_\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_\.changes-note\]\:mx-4>.changes-note{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.changes-note\]\:my-3\.5>.changes-note{margin-block:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mx-4>.diff-explorer{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.diff-explorer\]\:mt-3\.5>.diff-explorer{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mb-0>.diff-explorer{margin-bottom:0}.\[\&_\>_\.error\]\:mx-0>.error{margin-inline:0}.\[\&_\>_\.error\]\:mt-0>.error{margin-top:0}.\[\&_\>_\.error\]\:mt-3\.5>.error{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.error\]\:mb-3>.error{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\>_\.error\]\:text-base>.error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\>_\.error\]\:whitespace-pre-wrap>.error{white-space:pre-wrap}.\[\&_\>_\.error\]\:text-accent-red>.error{color:var(--accent-red)}.\[\&_\>_\.openresearch-diff\]\:mx-4>.openresearch-diff{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.openresearch-diff\]\:mt-3\.5>.openresearch-diff{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.openresearch-diff\]\:mb-0>.openresearch-diff{margin-bottom:0}.\[\&_\>_\.project-default-row\:first-child\]\:border-t-0>.project-default-row:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\>_\.project-default-row\:first-child\]\:pt-0>.project-default-row:first-child{padding-top:0}.\[\&_\>_\.seg\]\:rounded-sm>.seg{border-radius:6px}.\[\&_\>_\.seg\]\:p-0\.5>.seg{padding:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:px-2>.seg button{padding-inline:calc(var(--spacing) * 2)}.\[\&_\>_\.seg_button\]\:py-0\.5>.seg button{padding-block:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:text-sm>.seg button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_\.seg_button\]\:font-medium>.seg button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\>_\.truncated-notice\]\:mx-4>.truncated-notice{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.truncated-notice\]\:mt-3\.5>.truncated-notice{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.truncated-notice\]\:mb-0>.truncated-notice{margin-bottom:0}.\[\&_\>_\:first-child\]\:mt-3\.5>:first-child{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_h2\]\:mx-0>h2{margin-inline:0}.\[\&_\>_h2\]\:mt-0>h2{margin-top:0}.\[\&_\>_h2\]\:mb-1\.5>h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\>_h2\]\:text-xl>h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\>_label\]\:gap-2>label{gap:calc(var(--spacing) * 2)}.\[\&_\>_p\]\:m-0>p{margin:0}.\[\&_\>_p\]\:text-sm>p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_p\]\:leading-relaxed>p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\>_p\]\:text-text>p{color:var(--text)}.\[\&_\>_span\]\:inline-flex>span{display:inline-flex}.\[\&_\>_span\]\:items-center>span{align-items:center}.\[\&_\>_span\]\:gap-\[5px\]>span{gap:5px}.\[\&_\>_svg\]\:shrink-0>svg{flex-shrink:0}.\[\&_\>_svg\]\:text-muted>svg{color:var(--muted)}.\[\&_\>_svg\]\:text-subtext>svg{color:var(--subtext)}.\[\&_\>_svg\.file-tree-chevron\]\:text-muted>svg.file-tree-chevron{color:var(--muted)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:start-auto [data-tip-align=end]:after{inset-inline-start:auto}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:end-0 [data-tip-align=end]:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:translate-none [data-tip-align=end]:after{translate:none}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:start-0 [data-tip-align=start]:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:translate-none [data-tip-align=start]:after{translate:none}.\[\&_a\]\:text-sm a{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_a\]\:whitespace-nowrap a{white-space:nowrap}.\[\&_a\]\:text-primary a{color:var(--primary)}.\[\&_a\]\:text-subtext a{color:var(--subtext)}.\[\&_blockquote\]\:mx-0 blockquote{margin-inline:0}.\[\&_blockquote\]\:my-1\.5 blockquote{margin-block:calc(var(--spacing) * 1.5)}.\[\&_blockquote\]\:border-s-\[3px\] blockquote{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.\[\&_blockquote\]\:border-s-border blockquote{border-inline-start-color:var(--border)}.\[\&_blockquote\]\:ps-2\.5 blockquote{padding-inline-start:calc(var(--spacing) * 2.5)}.\[\&_blockquote\]\:pe-0 blockquote{padding-inline-end:0}.\[\&_blockquote\]\:pt-0\.5 blockquote{padding-top:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:pb-0\.5 blockquote{padding-bottom:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:text-subtext blockquote{color:var(--subtext)}.\[\&_button\]\:absolute button{position:absolute}.\[\&_button\]\:-top-\[5px\] button{top:-5px}.\[\&_button\]\:-right-\[5px\] button{right:-5px}.\[\&_button\]\:flex button{display:flex}.\[\&_button\]\:grid button{display:grid}.\[\&_button\]\:inline-flex button{display:inline-flex}.\[\&_button\]\:h-4 button{height:calc(var(--spacing) * 4)}.\[\&_button\]\:w-4 button{width:calc(var(--spacing) * 4)}.\[\&_button\]\:w-full button{width:100%}.\[\&_button\]\:cursor-pointer button{cursor:pointer}.\[\&_button\]\:grid-cols-\[18px_minmax\(0\,_1fr\)_auto_auto\] button{grid-template-columns:18px minmax(0,1fr) auto auto}.\[\&_button\]\:grid-cols-\[minmax\(72px\,_0\.7fr\)_minmax\(100px\,_1fr\)_minmax\(70px\,_0\.7fr\)_60px_16px\] button{grid-template-columns:minmax(72px,.7fr) minmax(100px,1fr) minmax(70px,.7fr) 60px 16px}.\[\&_button\]\:flex-col button{flex-direction:column}.\[\&_button\]\:items-center button{align-items:center}.\[\&_button\]\:items-start button{align-items:flex-start}.\[\&_button\]\:justify-center button{justify-content:center}.\[\&_button\]\:gap-0\.5 button{gap:calc(var(--spacing) * .5)}.\[\&_button\]\:gap-3\.5 button{gap:calc(var(--spacing) * 3.5)}.\[\&_button\]\:gap-\[7px\] button{gap:7px}.\[\&_button\]\:rounded-full button{border-radius:999px}.\[\&_button\]\:rounded-sm button{border-radius:6px}.\[\&_button\]\:rounded-xs button{border-radius:4px}.\[\&_button\]\:border button{border-style:var(--tw-border-style);border-width:1px}.\[\&_button\]\:border-0 button{border-style:var(--tw-border-style);border-width:0}.\[\&_button\]\:border-b button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_button\]\:border-border button{border-color:var(--border)}.\[\&_button\]\:border-b-border-variant button{border-bottom-color:var(--border-variant)}.\[\&_button\]\:bg-surface button{background-color:var(--surface)}.\[\&_button\]\:bg-transparent button{background-color:#0000}.\[\&_button\]\:bg-none button{background-image:none}.\[\&_button\]\:p-0 button{padding:0}.\[\&_button\]\:p-0\.5 button{padding:calc(var(--spacing) * .5)}.\[\&_button\]\:px-0 button{padding-inline:0}.\[\&_button\]\:px-0\.5 button{padding-inline:calc(var(--spacing) * .5)}.\[\&_button\]\:px-2 button{padding-inline:calc(var(--spacing) * 2)}.\[\&_button\]\:px-2\.5 button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_button\]\:px-3 button{padding-inline:calc(var(--spacing) * 3)}.\[\&_button\]\:px-\[9px\] button{padding-inline:9px}.\[\&_button\]\:py-0\.5 button{padding-block:calc(var(--spacing) * .5)}.\[\&_button\]\:py-2 button{padding-block:calc(var(--spacing) * 2)}.\[\&_button\]\:py-\[3px\] button{padding-block:3px}.\[\&_button\]\:py-\[11px\] button{padding-block:11px}.\[\&_button\]\:text-start button{text-align:start}.\[\&_button\]\:text-sm button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_button\]\:font-medium button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_button\]\:text-muted button{color:var(--muted)}.\[\&_button\]\:text-text button{color:var(--text)}.\[\&_button\]\:\[font\:inherit\] button{font:inherit}.\[\&_button\.active\]\:bg-background button.active{background-color:var(--base)}.\[\&_button\.active\]\:bg-surface button.active{background-color:var(--surface)}.\[\&_button\.active\]\:shadow-diff-active button.active{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--text));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,color-mix(in oklab, var(--text) 25%, transparent))}}.\[\&_button\.active\]\:shadow-segment button.active{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\:disabled\]\:cursor-default button:disabled{cursor:default}.\[\&_button\:disabled\]\:text-muted button:disabled{color:var(--muted)}.\[\&_button\:hover\]\:bg-panel button:hover{background-color:var(--panel)}.\[\&_button\:hover\]\:bg-surface button:hover{background-color:var(--surface)}.\[\&_button\:hover\]\:bg-text button:hover{background-color:var(--text)}.\[\&_button\:hover\]\:text-background button:hover{color:var(--base)}.\[\&_button\:hover\]\:text-text button:hover{color:var(--text)}.\[\&_button\:hover\]\:underline button:hover{text-decoration-line:underline}.\[\&_button\:hover\]\:underline-offset-2 button:hover{text-underline-offset:2px}.\[\&_button\:last-child\]\:border-b-0 button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_button\:not\(\:disabled\)\:hover\]\:text-text button:not(:disabled):hover{color:var(--text)}.\[\&_code\]\:min-w-0 code{min-width:0}.\[\&_code\]\:overflow-hidden code{overflow:hidden}.\[\&_code\]\:rounded-xs code{border-radius:4px}.\[\&_code\]\:border code{border-style:var(--tw-border-style);border-width:1px}.\[\&_code\]\:border-border-variant code{border-color:var(--border-variant)}.\[\&_code\]\:bg-panel code{background-color:var(--panel)}.\[\&_code\]\:px-\[5px\] code{padding-inline:5px}.\[\&_code\]\:py-px code{padding-block:1px}.\[\&_code\]\:font-mono code{font-family:var(--mono)}.\[\&_code\]\:text-sm code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_code\]\:text-xs code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_code\]\:font-medium code{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_code\]\:text-ellipsis code{text-overflow:ellipsis}.\[\&_code\]\:whitespace-nowrap code{white-space:nowrap}.\[\&_code\]\:whitespace-pre-wrap code{white-space:pre-wrap}.\[\&_code\]\:text-primary code{color:var(--primary)}.\[\&_code\]\:text-text code{color:var(--text)}.\[\&_h1\]\:m-0 h1{margin:0}.\[\&_h1\]\:mx-0 h1{margin-inline:0}.\[\&_h1\]\:mt-0 h1{margin-top:0}.\[\&_h1\]\:mt-3 h1{margin-top:calc(var(--spacing) * 3)}.\[\&_h1\]\:mt-7 h1{margin-top:calc(var(--spacing) * 7)}.\[\&_h1\]\:mb-1\.5 h1{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h1\]\:mb-3\.5 h1{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h1\]\:text-3xl h1{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h1\]\:text-4xl h1{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h1\]\:text-xl h1{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h1\]\:text-prose-emphasis h1{font-size:1.05em}.\[\&_h1\]\:leading-\[1\.18\] h1{--tw-leading:1.18;line-height:1.18}.\[\&_h1\]\:leading-tight h1{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h1\]\:font-semibold h1{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h1\]\:text-text h1{color:var(--text)}.\[\&_h2\]\:m-0 h2{margin:0}.\[\&_h2\]\:mx-0 h2{margin-inline:0}.\[\&_h2\]\:mt-0 h2{margin-top:0}.\[\&_h2\]\:mt-3 h2{margin-top:calc(var(--spacing) * 3)}.\[\&_h2\]\:mt-7 h2{margin-top:calc(var(--spacing) * 7)}.\[\&_h2\]\:mb-1\.5 h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h2\]\:mb-2\.5 h2{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h2\]\:mb-3\.5 h2{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h2\]\:flex h2{display:flex}.\[\&_h2\]\:items-center h2{align-items:center}.\[\&_h2\]\:gap-2 h2{gap:calc(var(--spacing) * 2)}.\[\&_h2\]\:text-3xl h2{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h2\]\:text-4xl h2{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h2\]\:text-5xl h2{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.\[\&_h2\]\:text-lg h2{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h2\]\:text-sm h2{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h2\]\:text-xl h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h2\]\:text-prose-emphasis h2{font-size:1.05em}.\[\&_h2\]\:leading-tight h2{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h2\]\:font-medium h2{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_h2\]\:font-semibold h2{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h2\]\:tracking-\[-0\.02em\] h2{--tw-tracking:-.02em;letter-spacing:-.02em}.\[\&_h2\]\:tracking-\[-0\.015em\] h2{--tw-tracking:-.015em;letter-spacing:-.015em}.\[\&_h2\]\:text-text h2{color:var(--text)}.\[\&_h3\]\:mx-0 h3{margin-inline:0}.\[\&_h3\]\:mt-0 h3{margin-top:0}.\[\&_h3\]\:mt-3 h3{margin-top:calc(var(--spacing) * 3)}.\[\&_h3\]\:mt-5\.5 h3{margin-top:calc(var(--spacing) * 5.5)}.\[\&_h3\]\:mb-1\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:mb-2 h3{margin-bottom:calc(var(--spacing) * 2)}.\[\&_h3\]\:mb-2\.5 h3{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h3\]\:mb-3 h3{margin-bottom:calc(var(--spacing) * 3)}.\[\&_h3\]\:text-base h3{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_h3\]\:text-xl h3{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h3\]\:text-prose-emphasis h3{font-size:1.05em}.\[\&_h3\]\:leading-\[1\.35\] h3{--tw-leading:1.35;line-height:1.35}.\[\&_h3\]\:font-semibold h3{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h3\]\:text-text h3{color:var(--text)}.\[\&_h4\]\:mx-0 h4{margin-inline:0}.\[\&_h4\]\:mt-0 h4{margin-top:0}.\[\&_h4\]\:mt-3 h4{margin-top:calc(var(--spacing) * 3)}.\[\&_h4\]\:mt-4\.5 h4{margin-top:calc(var(--spacing) * 4.5)}.\[\&_h4\]\:mb-1 h4{margin-bottom:var(--spacing)}.\[\&_h4\]\:mb-1\.5 h4{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h4\]\:text-lg h4{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h4\]\:text-sm h4{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h4\]\:text-prose-emphasis h4{font-size:1.05em}.\[\&_h4\]\:leading-\[1\.4\] h4{--tw-leading:1.4;line-height:1.4}.\[\&_h4\]\:font-semibold h4{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h4\]\:text-accent-amber h4{color:var(--accent-amber)}.\[\&_h4\]\:text-text h4{color:var(--text)}.\[\&_img\]\:mx-auto img{margin-inline:auto}.\[\&_img\]\:my-0 img{margin-block:0}.\[\&_img\]\:block img{display:block}.\[\&_img\]\:h-13 img{height:calc(var(--spacing) * 13)}.\[\&_img\]\:h-auto img{height:auto}.\[\&_img\]\:max-h-40 img{max-height:calc(var(--spacing) * 40)}.\[\&_img\]\:max-h-\[min\(480px\,60vh\)\] img{max-height:min(480px,60vh)}.\[\&_img\]\:w-13 img{width:calc(var(--spacing) * 13)}.\[\&_img\]\:w-auto img{width:auto}.\[\&_img\]\:max-w-55 img{max-width:calc(var(--spacing) * 55)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_img\]\:rounded-none img{border-radius:0}.\[\&_img\]\:rounded-sm img{border-radius:6px}.\[\&_img\]\:rounded-xs img{border-radius:4px}.\[\&_img\]\:border img{border-style:var(--tw-border-style);border-width:1px}.\[\&_img\]\:border-0 img{border-style:var(--tw-border-style);border-width:0}.\[\&_img\]\:border-border img{border-color:var(--border)}.\[\&_img\]\:border-border-variant img{border-color:var(--border-variant)}.\[\&_img\]\:object-contain img{object-fit:contain}.\[\&_img\]\:object-cover img{object-fit:cover}.\[\&_input\]\:m-0 input{margin:0}.\[\&_input\]\:w-full input{width:100%}.\[\&_input\]\:min-w-55 input{min-width:calc(var(--spacing) * 55)}.\[\&_input\]\:flex-1 input{flex:1}.\[\&_input\]\:rounded-none input{border-radius:0}.\[\&_input\]\:border-0 input{border-style:var(--tw-border-style);border-width:0}.\[\&_input\]\:border-b input{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_input\]\:border-b-border-variant input{border-bottom-color:var(--border-variant)}.\[\&_input\]\:bg-transparent input{background-color:#0000}.\[\&_input\]\:bg-none input{background-image:none}.\[\&_input\]\:px-2\.5 input{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_input\]\:py-2 input{padding-block:calc(var(--spacing) * 2)}.\[\&_input\]\:font-sans input{font-family:var(--sans)}.\[\&_input\]\:text-sm input{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_input\]\:font-normal input{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_input\]\:text-text input{color:var(--text)}.\[\&_input\]\:outline-none input{--tw-outline-style:none;outline-style:none}.\[\&_input\:\:placeholder\]\:text-subtext input::placeholder{color:var(--subtext)}.\[\&_label\]\:flex label{display:flex}.\[\&_label\]\:flex-col label{flex-direction:column}.\[\&_label\]\:gap-1 label{gap:var(--spacing)}.\[\&_label\]\:text-sm label{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_label\]\:font-medium label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_label\]\:text-text label{color:var(--text)}.\[\&_legend\]\:mb-1\.5 legend{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_legend\]\:text-base legend{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_legend\]\:font-medium legend{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_li\:\:marker\]\:text-primary li::marker{color:var(--primary)}.\[\&_ol\]\:mx-0 ol{margin-inline:0}.\[\&_ol\]\:my-1\.5 ol{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ol\]\:ps-5\.5 ol{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&_p\]\:m-0 p{margin:0}.\[\&_p\]\:mx-0 p{margin-inline:0}.\[\&_p\]\:my-2\.5 p{margin-block:calc(var(--spacing) * 2.5)}.\[\&_p\]\:mt-\[3px\] p{margin-top:3px}.\[\&_p\]\:mb-0 p{margin-bottom:0}.\[\&_p\]\:max-w-80 p{max-width:calc(var(--spacing) * 80)}.\[\&_p\]\:max-w-\[46ch\] p{max-width:46ch}.\[\&_p\]\:text-sm p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_p\]\:leading-normal p{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_p\]\:text-balance p{text-wrap:balance}.\[\&_p\]\:text-subtext p{color:var(--subtext)}.\[\&_p\]\:text-text p{color:var(--text)}.\[\&_p_\+_p\]\:mt-3 p+p{margin-top:calc(var(--spacing) * 3)}.\[\&_p\.empty-state-hint\]\:text-lg p.empty-state-hint{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_p\.empty-state-hint\]\:text-subtext p.empty-state-hint{color:var(--subtext)}.\[\&_p\.empty-state-title\]\:text-2xl p.empty-state-title{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_p\.empty-state-title\]\:font-normal p.empty-state-title{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_p\.empty-state-title\]\:text-text p.empty-state-title{color:var(--text)}.\[\&_pre\]\:m-0 pre{margin:0}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_pre\]\:rounded-md pre{border-radius:8px}.\[\&_pre\]\:border pre{border-style:var(--tw-border-style);border-width:1px}.\[\&_pre\]\:border-border-muted pre{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_pre\]\:border-border-muted pre{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.\[\&_pre\]\:bg-surface pre{background-color:var(--surface)}.\[\&_pre\]\:px-3 pre{padding-inline:calc(var(--spacing) * 3)}.\[\&_pre\]\:py-2 pre{padding-block:calc(var(--spacing) * 2)}.\[\&_pre\]\:text-sm pre{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_pre\]\:text-text pre{color:var(--text)}.\[\&_pre_code\]\:border-0 pre code{border-style:var(--tw-border-style);border-width:0}.\[\&_pre_code\]\:bg-transparent pre code{background-color:#0000}.\[\&_pre_code\]\:bg-none pre code{background-image:none}.\[\&_pre_code\]\:p-0 pre code{padding:0}.\[\&_pre_code\]\:font-normal pre code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_pre_code\]\:text-inherit pre code{color:inherit}.\[\&_select\]\:font-sans select{font-family:var(--sans)}.\[\&_select\]\:text-sm select{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_select\]\:font-normal select{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_select\]\:text-text select{color:var(--text)}.\[\&_span\]\:absolute span{position:absolute}.\[\&_span\]\:start-\[3px\] span{inset-inline-start:3px}.\[\&_span\]\:top-\[3px\] span{top:3px}.\[\&_span\]\:h-3\.5 span{height:calc(var(--spacing) * 3.5)}.\[\&_span\]\:w-3\.5 span{width:calc(var(--spacing) * 3.5)}.\[\&_span\]\:translate-x-4 span{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_span\]\:overflow-hidden span{overflow:hidden}.\[\&_span\]\:rounded-full span{border-radius:999px}.\[\&_span\]\:bg-background span{background-color:var(--base)}.\[\&_span\]\:bg-muted span{background-color:var(--muted)}.\[\&_span\]\:text-ellipsis span{text-overflow:ellipsis}.\[\&_span\]\:whitespace-nowrap span{white-space:nowrap}.\[\&_span\]\:transition-\[translate\,background\] span{transition-property:translate,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_span\]\:duration-120 span{--tw-duration:.12s;transition-duration:.12s}.\[\&_span\]\:ease-standard span{--tw-ease:ease;transition-timing-function:ease}.\[\&_strong\]\:font-medium strong{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_strong\]\:text-accent-amber strong{color:var(--accent-amber)}.\[\&_strong\]\:text-text strong{color:var(--text)}.\[\&_summary\]\:flex summary{display:flex}.\[\&_summary\]\:w-fit summary{width:fit-content}.\[\&_summary\]\:max-w-full summary{max-width:100%}.\[\&_summary\]\:cursor-pointer summary{cursor:pointer}.\[\&_summary\]\:list-none summary{list-style-type:none}.\[\&_summary\]\:items-center summary{align-items:center}.\[\&_summary\]\:gap-2 summary{gap:calc(var(--spacing) * 2)}.\[\&_summary\]\:rounded-sm summary{border-radius:6px}.\[\&_summary\]\:px-1 summary{padding-inline:var(--spacing)}.\[\&_summary\]\:py-\[3px\] summary{padding-block:3px}.\[\&_summary\]\:select-none summary{-webkit-user-select:none;user-select:none}.\[\&_summary_\.plan-chevron\]\:transition-transform summary .plan-chevron{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary_\.plan-chevron\]\:duration-120 summary .plan-chevron{--tw-duration:.12s;transition-duration:.12s}.\[\&_summary_\.plan-chevron\]\:ease-standard summary .plan-chevron{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:-webkit-details-marker\]\:hidden summary::-webkit-details-marker{display:none}.\[\&_summary\:\:after\]\:text-muted summary:after{color:var(--muted)}.\[\&_summary\:\:after\]\:transition-transform summary:after{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary\:\:after\]\:duration-80 summary:after{--tw-duration:80ms;transition-duration:80ms}.\[\&_summary\:\:after\]\:ease-standard summary:after{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:after\]\:content-\[\'›\'\] summary:after{--tw-content:"›";content:var(--tw-content)}.\[\&_summary\:hover\]\:bg-surface summary:hover{background-color:var(--surface)}.\[\&_svg\]\:block svg{display:block}.\[\&_svg\]\:h-\[1em\] svg{height:1em}.\[\&_svg\]\:h-full svg{height:100%}.\[\&_svg\]\:w-\[1em\] svg{width:1em}.\[\&_svg\]\:w-full svg{width:100%}.\[\&_svg\]\:flex-none svg{flex:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\]\:text-muted svg{color:var(--muted)}.\[\&_table\]\:mx-0 table{margin-inline:0}.\[\&_table\]\:my-2\.5 table{margin-block:calc(var(--spacing) * 2.5)}.\[\&_table\]\:block table{display:block}.\[\&_table\]\:w-max table{width:max-content}.\[\&_table\]\:max-w-full table{max-width:100%}.\[\&_table\]\:border-collapse table{border-collapse:collapse}.\[\&_table\]\:overflow-x-auto table{overflow-x:auto}.\[\&_table\]\:rounded-md table{border-radius:8px}.\[\&_table\]\:border table{border-style:var(--tw-border-style);border-width:1px}.\[\&_table\]\:border-border table{border-color:var(--border)}.\[\&_table\]\:text-sm table{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_tbody_tr\:hover_td\]\:bg-surface-bright tbody tr:hover td{background-color:var(--surface-bright)}.\[\&_td\]\:h-12 td{height:calc(var(--spacing) * 12)}.\[\&_td\]\:border-b td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_td\]\:border-b-border-variant td{border-bottom-color:var(--border-variant)}.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:color-mix(in oklab,var(--text) 6%,transparent)}}.\[\&_td\]\:px-3 td{padding-inline:calc(var(--spacing) * 3)}.\[\&_td\]\:px-3\.5 td{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_td\]\:py-2 td{padding-block:calc(var(--spacing) * 2)}.\[\&_td\]\:ps-0 td{padding-inline-start:0}.\[\&_td\]\:pe-2\.5 td{padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_td\]\:pt-0 td{padding-top:0}.\[\&_td\]\:pb-0 td{padding-bottom:0}.\[\&_td\]\:text-start td{text-align:start}.\[\&_td\]\:align-middle td{vertical-align:middle}.\[\&_td\]\:break-normal td{overflow-wrap:normal;word-break:normal}.\[\&_td\]\:break-words td{overflow-wrap:break-word}.\[\&_td\]\:whitespace-nowrap td{white-space:nowrap}.\[\&_td\]\:text-text td{color:var(--text)}.\[\&_td\:first-child\]\:w-\[32\%\] td:first-child{width:32%}.\[\&_td\:first-child\]\:wrap-anywhere td:first-child{overflow-wrap:anywhere}.\[\&_td\:last-child\]\:w-29 td:last-child{width:calc(var(--spacing) * 29)}.\[\&_td\:last-child\]\:text-end td:last-child{text-align:end}.\[\&_td\:last-child\]\:whitespace-nowrap td:last-child{white-space:nowrap}.\[\&_td\[colspan\]\]\:text-start td[colspan]{text-align:start}.\[\&_td\[colspan\]\]\:whitespace-normal td[colspan]{white-space:normal}.\[\&_textarea\]\:field-sizing-content textarea{field-sizing:content}.\[\&_textarea\]\:max-h-45 textarea{max-height:calc(var(--spacing) * 45)}.\[\&_textarea\]\:min-h-18 textarea{min-height:calc(var(--spacing) * 18)}.\[\&_textarea\]\:flex-1 textarea{flex:1}.\[\&_textarea\]\:resize-none textarea{resize:none}.\[\&_textarea\]\:border-0 textarea{border-style:var(--tw-border-style);border-width:0}.\[\&_textarea\]\:bg-transparent textarea{background-color:#0000}.\[\&_textarea\]\:bg-none textarea{background-image:none}.\[\&_textarea\]\:px-3 textarea{padding-inline:calc(var(--spacing) * 3)}.\[\&_textarea\]\:pt-2\.5 textarea{padding-top:calc(var(--spacing) * 2.5)}.\[\&_textarea\]\:pb-1 textarea{padding-bottom:var(--spacing)}.\[\&_textarea\]\:font-mono textarea{font-family:var(--mono)}.\[\&_textarea\]\:text-base textarea{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_textarea\]\:text-sm textarea{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:sticky th{position:sticky}.\[\&_th\]\:top-0 th{top:0}.\[\&_th\]\:z-1 th{z-index:1}.\[\&_th\]\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_th\]\:border-b-border th{border-bottom-color:var(--border)}.\[\&_th\]\:border-b-border-variant th{border-bottom-color:var(--border-variant)}.\[\&_th\]\:bg-background th{background-color:var(--base)}.\[\&_th\]\:px-3 th{padding-inline:calc(var(--spacing) * 3)}.\[\&_th\]\:px-3\.5 th{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_th\]\:py-2 th{padding-block:calc(var(--spacing) * 2)}.\[\&_th\]\:text-start th{text-align:start}.\[\&_th\]\:text-sm th{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:font-medium th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_th\]\:break-normal th{overflow-wrap:normal;word-break:normal}.\[\&_th\]\:break-words th{overflow-wrap:break-word}.\[\&_th\]\:text-text th{color:var(--text)}.\[\&_thead_th\]\:border-b thead th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_thead_th\]\:border-b-border thead th{border-bottom-color:var(--border)}.\[\&_thead_th\]\:bg-surface thead th{background-color:var(--surface)}.\[\&_thead_th\]\:font-medium thead th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_thead_th\]\:text-text thead th{color:var(--text)}.\[\&_tr\.clickable\]\:cursor-pointer tr.clickable{cursor:pointer}.\[\&_tr\.clickable\:hover_td\]\:bg-canvas tr.clickable:hover td{background-color:var(--canvas)}.\[\&_tr\:last-child_td\]\:border-b-0 tr:last-child td{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_ul\]\:mx-0 ul{margin-inline:0}.\[\&_ul\]\:my-1\.5 ul{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ul\]\:ps-5\.5 ul{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&\+\&\]\:border-t+.\[\&\+\&\]\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&\+\&\]\:border-border-variant+.\[\&\+\&\]\:border-border-variant{border-color:var(--border-variant)}.\[\&\.active\]\:border-border.active{border-color:var(--border)}.\[\&\.active\]\:bg-background.active{background-color:var(--base)}.\[\&\.active\]\:bg-hover-muted.active{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\.active\]\:bg-hover-muted.active{background-color:color-mix(in oklab,var(--text) 8%,transparent)}}.\[\&\.active\]\:bg-panel.active{background-color:var(--panel)}.\[\&\.active\]\:bg-surface.active{background-color:var(--surface)}.\[\&\.active\]\:font-medium.active{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&\.active\]\:text-muted.active{color:var(--muted)}.\[\&\.active\]\:text-primary.active{color:var(--primary)}.\[\&\.active\]\:text-text.active{color:var(--text)}.\[\&\.active\:\:after\]\:absolute.active:after{position:absolute}.\[\&\.active\:\:after\]\:start-0.active:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:end-0.active:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:-bottom-px.active:after{bottom:-1px}.\[\&\.active\:\:after\]\:h-px.active:after{height:1px}.\[\&\.active\:\:after\]\:bg-background.active:after{background-color:var(--base)}.\[\&\.active\:\:after\]\:content-\[\'\'\].active:after{--tw-content:"";content:var(--tw-content)}.\[\&\.align-right\]\:start-auto.align-right{inset-inline-start:auto}.\[\&\.align-right\]\:end-0.align-right{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.approved\]\:text-accent-green.approved{color:var(--accent-green)}.\[\&\.approved\:\:before\]\:content-\[\'✓_\'\].approved:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.archive\]\:text-accent-amber.archive{color:var(--accent-amber)}.\[\&\.chosen\]\:text-accent-green.chosen{color:var(--accent-green)}.\[\&\.chosen\:\:before\]\:content-\[\'✓_\'\].chosen:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.clamped\]\:relative.clamped{position:relative}.\[\&\.clamped\]\:max-h-\[9\.5em\].clamped{max-height:9.5em}.\[\&\.clamped\]\:overflow-hidden.clamped{overflow:hidden}.\[\&\.clamped\:\:after\]\:pointer-events-none.clamped:after{pointer-events:none}.\[\&\.clamped\:\:after\]\:absolute.clamped:after{position:absolute}.\[\&\.clamped\:\:after\]\:inset-x-0.clamped:after{inset-inline:0}.\[\&\.clamped\:\:after\]\:top-auto.clamped:after{top:auto}.\[\&\.clamped\:\:after\]\:bottom-0.clamped:after{bottom:0}.\[\&\.clamped\:\:after\]\:h-8\.5.clamped:after{height:calc(var(--spacing) * 8.5)}.\[\&\.clamped\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_transparent\,_var\(--surface\)\)\].clamped:after{background-image:linear-gradient(to bottom,transparent,var(--surface))}.\[\&\.clamped\:\:after\]\:content-\[\'\'\].clamped:after{--tw-content:"";content:var(--tw-content)}.\[\&\.closable\]\:max-w-60.closable{max-width:calc(var(--spacing) * 60)}.\[\&\.closable\]\:pe-0\.5.closable{padding-inline-end:calc(var(--spacing) * .5)}.\[\&\.code\]\:text-accent-orange.code{color:var(--accent-orange)}.\[\&\.doc\]\:px-7.doc{padding-inline:calc(var(--spacing) * 7)}.\[\&\.doc\]\:pt-4\.5.doc{padding-top:calc(var(--spacing) * 4.5)}.\[\&\.doc\]\:pb-12.doc{padding-bottom:calc(var(--spacing) * 12)}.\[\&\.doc_\.artifact-md\]\:mx-auto.doc .artifact-md{margin-inline:auto}.\[\&\.doc_\.artifact-md\]\:my-0.doc .artifact-md{margin-block:0}.\[\&\.doc_\.artifact-md\]\:max-w-readable.doc .artifact-md{max-width:var(--readable-col)}.\[\&\.document\]\:text-subtext.document{color:var(--subtext)}.\[\&\.drop-down\]\:top-\[calc\(100\%_\+_4px\)\].drop-down{top:calc(100% + 4px)}.\[\&\.drop-down\]\:bottom-auto.drop-down{bottom:auto}.\[\&\.editing\]\:cursor-default.editing{cursor:default}.\[\&\.editing\]\:bg-surface.editing{background-color:var(--surface)}.\[\&\.editing_\.session-dot\]\:hidden.editing .session-dot,.\[\&\.editing_\.session-menu-btn\]\:hidden.editing .session-menu-btn{display:none}.\[\&\.err\]\:bg-accent-red.err{background-color:var(--accent-red)}.\[\&\.expanded_\.diff-file-header\]\:border-b.expanded .diff-file-header{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&\.expanded_\.diff-file-header\]\:border-b-border.expanded .diff-file-header{border-bottom-color:var(--border)}.\[\&\.fail\]\:border-\[1\.5px\].fail{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.fail\]\:border-danger-outline.fail{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\.fail\]\:border-danger-outline.fail{border-color:color-mix(in oklab,var(--accent-red) 55%,transparent)}}.\[\&\.failed\]\:text-accent-red.failed{color:var(--accent-red)}.\[\&\.image\]\:text-accent-purple.image{color:var(--accent-purple)}.\[\&\.live\]\:animate-\[or-pulse_1\.2s_ease-in-out_infinite\].live{animation:1.2s ease-in-out infinite or-pulse}.\[\&\.live\]\:border-accent-teal.live{border-color:var(--accent-teal)}.\[\&\.live\]\:bg-accent-teal.live{background-color:var(--accent-teal)}.\[\&\.live\]\:shadow-tree-live.live{--tw-shadow:0 2px 12px var(--tw-shadow-color,#209a8433);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.markdown\]\:text-accent-blue.markdown{color:var(--accent-blue)}.\[\&\.max\]\:fixed.max{position:fixed}.\[\&\.max\]\:inset-2\.5.max{inset:calc(var(--spacing) * 2.5)}.\[\&\.max\]\:z-60.max{z-index:60}.\[\&\.max\]\:m-0.max{margin:0}.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,color-mix(in oklab, var(--text) 22%, transparent))}}.\[\&\.max\]\:shadow-panel-max.max{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mac-titlebar\:\[\&\.max\]\:top-8:where(.mac-titlebar *).max{top:calc(var(--spacing) * 8)}.win-titlebar\:\[\&\.max\]\:top-10:where(.win-titlebar *).max{top:calc(var(--spacing) * 10)}.\[\&\.menu-open_\.session-dot\]\:hidden.menu-open .session-dot{display:none}.\[\&\.menu-open_\.session-menu-btn\]\:inline-flex.menu-open .session-menu-btn{display:inline-flex}.\[\&\.muted\]\:text-muted.muted{color:var(--muted)}.\[\&\.ok\]\:bg-accent-green.ok{background-color:var(--accent-green)}.\[\&\.on\]\:bg-primary.on{background-color:var(--primary)}.\[\&\.on\]\:text-background.on{color:var(--base)}.\[\&\.open\]\:rotate-90.open{rotate:90deg}.\[\&\.other\]\:border-\[1\.5px\].other{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.other\]\:border-border.other{border-color:var(--border)}.\[\&\.pass\]\:bg-accent-green.pass{background-color:var(--accent-green)}.\[\&\.pdf\]\:text-accent-red.pdf{color:var(--accent-red)}.\[\&\.permission\]\:border-s-accent-amber.permission{border-inline-start-color:var(--accent-amber)}.\[\&\.plan\]\:border-s-accent-blue.plan{border-inline-start-color:var(--accent-blue)}.\[\&\.question\]\:border-s-accent-purple.question{border-inline-start-color:var(--accent-purple)}.\[\&\.readonly\]\:opacity-60.readonly{opacity:.6}.\[\&\.rejected\]\:text-accent-amber.rejected,.\[\&\.revised\]\:text-accent-amber.revised{color:var(--accent-amber)}.\[\&\.sel\]\:border-primary.sel{border-color:var(--primary)}.\[\&\.sel\]\:bg-primary-subtle.sel{background-color:var(--primary-subtle)}.\[\&\.selected\]\:border-accent.selected{border-color:var(--accent)}.\[\&\.selected\]\:bg-panel.selected{background-color:var(--panel)}.\[\&\.selected\]\:shadow-selected.selected{--tw-shadow:0 0 0 1px var(--tw-shadow-color,var(--accent));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.selected\:hover\]\:bg-panel.selected:hover{background-color:var(--panel)}.\[\&\.session-menu\]\:start-auto.session-menu{inset-inline-start:auto}.\[\&\.session-menu\]\:end-1\.5.session-menu{inset-inline-end:calc(var(--spacing) * 1.5)}.\[\&\.session-menu\]\:top-\[calc\(100\%_-_2px\)\].session-menu{top:calc(100% - 2px)}.\[\&\.session-menu\]\:min-w-35.session-menu{min-width:calc(var(--spacing) * 35)}.\[\&\.spreadsheet\]\:text-accent-green.spreadsheet,.\[\&\.status-add\]\:text-accent-green.status-add{color:var(--accent-green)}.\[\&\.status-copy\]\:text-accent-blue.status-copy{color:var(--accent-blue)}.\[\&\.status-delete\]\:text-accent-red.status-delete{color:var(--accent-red)}.\[\&\.status-rename\]\:text-accent-blue.status-rename{color:var(--accent-blue)}.\[\&\.warn\]\:bg-accent-amber.warn{background-color:var(--accent-amber)}.\[\&\:\:-webkit-details-marker\]\:hidden::-webkit-details-marker{display:none}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:\:-webkit-search-cancel-button\]\:hidden::-webkit-search-cancel-button{display:none}.\[\&\:\:after\]\:pointer-events-none:after{pointer-events:none}.\[\&\:\:after\]\:absolute:after{position:absolute}.\[\&\:\:after\]\:start-0:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:end-0:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:top-full:after{top:100%}.\[\&\:\:after\]\:h-6:after{height:calc(var(--spacing) * 6)}.\[\&\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_var\(--base\)\,_transparent\)\]:after{background-image:linear-gradient(to bottom,var(--base),transparent)}.\[\&\:\:after\]\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.\[\&\:active\]\:bg-resizer-hover:active{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\]\:bg-resizer-hover:active{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 14%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:bg-highlight:active:not(:disabled){background-color:var(--highlight)}.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:disabled\]\:cursor-default:disabled{cursor:default}.\[\&\:focus\]\:border-accent-blue:focus{border-color:var(--accent-blue)}.\[\&\:focus-visible\]\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&\:focus-visible\]\:outline-offset-2:focus-visible{outline-offset:2px}.\[\&\:focus-visible\]\:outline-text:focus-visible{outline-color:var(--text)}.\[\&\:focus-visible\]\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&\:focus-visible_\.session-dot\]\:hidden:focus-visible .session-dot{display:none}.\[\&\:focus-visible_\.session-menu-btn\]\:inline-flex:focus-visible .session-menu-btn{display:inline-flex}.\[\&\:has\(\.session-menu-btn\:focus-visible\)_\.session-dot\]\:hidden:has(.session-menu-btn:focus-visible) .session-dot{display:none}.\[\&\:has\(input\:checked\)\]\:border-accent:has(input:checked){border-color:var(--accent)}.\[\&\:has\(input\:checked\)\]\:bg-primary-subtle:has(input:checked){background-color:var(--primary-subtle)}.\[\&\:hover\]\:border-primary:hover{border-color:var(--primary)}.\[\&\:hover\]\:border-text:hover{border-color:var(--text)}.\[\&\:hover\]\:bg-canvas:hover{background-color:var(--canvas)}.\[\&\:hover\]\:bg-highlight:hover{background-color:var(--highlight)}.\[\&\:hover\]\:bg-panel:hover{background-color:var(--panel)}.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:hover\]\:bg-surface:hover{background-color:var(--surface)}.\[\&\:hover\]\:bg-text:hover{background-color:var(--text)}.\[\&\:hover\]\:text-background:hover{color:var(--base)}.\[\&\:hover\]\:text-text:hover{color:var(--text)}.\[\&\:hover\]\:underline:hover{text-decoration-line:underline}.\[\&\:hover\]\:shadow-tree-hover:hover{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\:hover_\.ft-row-delete\]\:opacity-100:hover .ft-row-delete,.\[\&\:hover_\.md-code-copy\]\:opacity-100:hover .md-code-copy{opacity:1}.\[\&\:hover_\.session-dot\]\:hidden:hover .session-dot{display:none}.\[\&\:hover_\.session-menu-btn\]\:inline-flex:hover .session-menu-btn{display:inline-flex}.\[\&\:hover\:not\(\.active\)\]\:bg-surface:hover:not(.active){background-color:var(--surface)}.\[\&\:hover\:not\(\.on\)\]\:bg-highlight:hover:not(.on){background-color:var(--highlight)}.\[\&\:hover\:not\(\.on\)\]\:text-text:hover:not(.on){color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:border-accent-blue:hover:not(:disabled){border-color:var(--accent-blue)}.\[\&\:hover\:not\(\:disabled\)\]\:border-border-strong:hover:not(:disabled){border-color:var(--border-strong)}.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:border-text:hover:not(:disabled){border-color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-amber-subtle:hover:not(:disabled){background-color:var(--accent-amber-subtle)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-blue) 90%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 8%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:var(--surface)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--surface) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-surface:hover:not(:disabled){background-color:var(--surface)}.\[\&\:hover\:not\(\:disabled\)\]\:text-accent-red:hover:not(:disabled){color:var(--accent-red)}.\[\&\:hover\:not\(\:disabled\)\]\:text-text:hover:not(:disabled){color:var(--text)}.\[\&\:last-child\]\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:absolute:not(.active)+.tab:not(.active):before{position:absolute}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:-start-px:not(.active)+.tab:not(.active):before{inset-inline-start:-1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:top-2\.5:not(.active)+.tab:not(.active):before{top:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bottom-2\.5:not(.active)+.tab:not(.active):before{bottom:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:w-px:not(.active)+.tab:not(.active):before{width:1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bg-border:not(.active)+.tab:not(.active):before{background-color:var(--border)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:content-\[\'\'\]:not(.active)+.tab:not(.active):before{--tw-content:"";content:var(--tw-content)}.\[\&\>\.settings-form\:first-child\]\:mt-0>.settings-form:first-child{margin-top:0}.\[\&\>div\:first-child\]\:border-t-0>div:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&\[data-tip\]\:\:after\]\:top-auto[data-tip]:after{top:auto}.\[\&\[data-tip\]\:\:after\]\:bottom-\[calc\(100\%_\+_6px\)\][data-tip]:after{bottom:calc(100% + 6px)}.\[\&\[open\]_summary_\.plan-chevron\]\:rotate-90[open] summary .plan-chevron,.\[\&\[open\]_summary\:\:after\]\:rotate-90[open] summary:after{rotate:90deg}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.atrule\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.atrule{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-name\]\:text-syntax-green,.openresearch-diff,.file-view) .token.attr-name{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-value\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.attr-value,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.boolean\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.boolean{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.builtin\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.builtin{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.cdata{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:italic,.openresearch-diff,.file-view) .token.cdata{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.char\]\:text-syntax-green,.openresearch-diff,.file-view) .token.char{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.class-name\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.class-name{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.comment{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:italic,.openresearch-diff,.file-view) .token.comment{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.constant\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.constant{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.decorator\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.decorator,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.def\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.def{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.deleted\]\:text-syntax-red,.openresearch-diff,.file-view) .token.deleted{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.entity\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.entity{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.function\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.function{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.important\]\:text-syntax-red,.openresearch-diff,.file-view) .token.important{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.inserted\]\:text-syntax-green,.openresearch-diff,.file-view) .token.inserted{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.keyword\]\:text-syntax-purple,.openresearch-diff,.file-view) .token.keyword{color:var(--syntax-purple)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.namespace\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.namespace{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.number\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.number{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.operator\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.operator{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.parameter\]\:text-syntax-text,.openresearch-diff,.file-view) .token.parameter{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.prolog{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:italic,.openresearch-diff,.file-view) .token.prolog{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.property\]\:text-syntax-red,.openresearch-diff,.file-view) .token.property{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.punctuation\]\:text-syntax-text,.openresearch-diff,.file-view) .token.punctuation{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.regex\]\:text-syntax-green,.openresearch-diff,.file-view) .token.regex,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.selector\]\:text-syntax-green,.openresearch-diff,.file-view) .token.selector,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.string\]\:text-syntax-green,.openresearch-diff,.file-view) .token.string{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.symbol\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.symbol{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.tag\]\:text-syntax-red,.openresearch-diff,.file-view) .token.tag{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.url\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.url{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.variable\]\:text-syntax-red,.openresearch-diff,.file-view) .token.variable{color:var(--syntax-red)}@container (max-width:400px){.\[\@container\(\(max-width\:_400px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)\]{grid-template-columns:minmax(0,1fr)}.\[\@container\(\(max-width\:_400px\)\)\]\:\!flex-row{flex-direction:row!important}.\[\@container\(\(max-width\:_400px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@container\(\(max-width\:_400px\)\)\]\:\!items-center{align-items:center!important}.\[\@container\(\(max-width\:_400px\)\)\]\:justify-start{justify-content:flex-start}.\[\@container\(\(max-width\:_400px\)\)\]\:gap-3{gap:calc(var(--spacing) * 3)}.\[\@container\(\(max-width\:_400px\)\)\]\:\[grid-template-areas\:\'name\'_\'meta\'_\'actions\'\]{grid-template-areas:"name""meta""actions"}}@container (max-width:560px){.\[\@container\(\(max-width\:_560px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.\[\@container\(\(max-width\:_560px\)\)\]\:flex-col{flex-direction:column}.\[\@container\(\(max-width\:_560px\)\)\]\:items-end{align-items:flex-end}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-1\.5{gap:calc(var(--spacing) * 1.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-y-\[9px\]{row-gap:9px}}@container (max-width:720px){.\[\@container\(\(max-width\:_720px\)\)\]\:hidden{display:none}.\[\@container\(\(max-width\:_720px\)\)\]\:\!w-full{width:100%!important}}@container (max-width:960px){.\[\@container\(\(max-width\:_960px\)\)\]\:static{position:static}.\[\@container\(\(max-width\:_960px\)\)\]\:max-h-55{max-height:calc(var(--spacing) * 55)}.\[\@container\(\(max-width\:_960px\)\)\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(max-width:520px){.\[\@media\(\(max-width\:_520px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_520px\)\)\]\:items-start{align-items:flex-start}}@media(max-width:600px){.\[\@media\(\(max-width\:_600px\)\)\]\:col-span-2{grid-column:span 2/span 2}.\[\@media\(\(max-width\:_600px\)\)\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.\[\@media\(\(max-width\:_640px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_640px\)\)\]\:items-stretch{align-items:stretch}.\[\@media\(\(max-width\:_640px\)\)\]\:justify-start{justify-content:flex-start}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:grid-cols-1 .kv{grid-template-columns:repeat(1,minmax(0,1fr))}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:gap-\[3px\] .kv{gap:3px}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv_\.v_\+_\.k\]\:mt-\[7px\] .kv .v+.k{margin-top:7px}}@media(max-width:720px){.\[\@media\(\(max-width\:_720px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_720px\)\)\]\:px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pt-5{padding-top:calc(var(--spacing) * 5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pb-8{padding-bottom:calc(var(--spacing) * 8)}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button\]\:grid-cols-\[65px_1fr_60px_16px\] button{grid-template-columns:65px 1fr 60px 16px}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button_\>_\:nth-child\(3\)\]\:hidden button>:nth-child(3){display:none}}@media(max-width:960px){.\[\@media\(\(max-width\:_960px\)\)\]\:col-span-3{grid-column:span 3/span 3}.\[\@media\(\(max-width\:_960px\)\)\]\:mb-1{margin-bottom:var(--spacing)}.\[\@media\(\(max-width\:_960px\)\)\]\:block{display:block}.\[\@media\(\(max-width\:_960px\)\)\]\:hidden{display:none}.\[\@media\(\(max-width\:_960px\)\)\]\:grid-cols-\[minmax\(0\,0\.8fr\)_minmax\(0\,0\.8fr\)_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.4fr)}.\[\@media\(\(max-width\:_960px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_960px\)\)\]\:items-start{align-items:flex-start}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-x-4{column-gap:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-y-3{row-gap:calc(var(--spacing) * 3)}.\[\@media\(\(max-width\:_960px\)\)\]\:px-4{padding-inline:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:py-4{padding-block:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:pt-6{padding-top:calc(var(--spacing) * 6)}.\[\@media\(\(max-width\:_960px\)\)\]\:break-all{word-break:break-all}.\[\@media\(\(max-width\:_960px\)\)\]\:whitespace-normal{white-space:normal}.win-titlebar\:\[\@media\(\(max-width\:_960px\)\)\]\:pt-10:where(.win-titlebar *){padding-top:calc(var(--spacing) * 10)}}@media(prefers-reduced-motion:reduce){.\[\@media\(\(prefers-reduced-motion\:_reduce\)\)\]\:animate-none{animation:none}}a.\[a\&\:hover\]\:border-muted:hover{border-color:var(--muted)}button.\[button\&\]\:inline-flex{display:inline-flex}button.\[button\&\]\:h-\[13px\]{height:13px}button.\[button\&\]\:w-\[13px\]{width:13px}button.\[button\&\]\:cursor-pointer{cursor:pointer}button.\[button\&\]\:items-center{align-items:center}button.\[button\&\]\:justify-center{justify-content:center}button.\[button\&\]\:border-0{border-style:var(--tw-border-style);border-width:0}button.\[button\&\]\:bg-transparent{background-color:#0000}button.\[button\&\]\:p-0{padding:0}button.\[button\&_\>_svg\]\:transition-transform>svg{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}button.\[button\&_\>_svg\]\:duration-120>svg{--tw-duration:.12s;transition-duration:.12s}button.\[button\&_\>_svg\]\:ease-standard>svg{--tw-ease:ease;transition-timing-function:ease}button.\[button\&_\>_svg\.open\]\:rotate-90>svg.open{rotate:90deg}button.\[button\&\:hover\]\:border-muted:hover{border-color:var(--muted)}}:root{--base:#fff;--canvas:#faf8f4;--panel:#f3f0ea;--surface:#faf7f2;--surface-bright:#fdfbfb;--highlight:#fdf3f1;--chat-annotation-highlight:#b8d4ff;--text:#1d1b1a;--subtext:#737373;--muted:#a1a1a1;--primary:#9a2036;--primary-subtle:#f7e9ec;--border:#d4d4d4;--border-variant:#e5e5e5;--accent-orange:#da642c;--accent-red:#d94654;--accent-teal:#209a84;--accent-blue:#3a8dff;--accent-amber:#da9100;--accent-green:#5eb64c;--accent-purple:#9c5cff;--accent-green-subtle:#e7f4e5;--accent-amber-subtle:#fff3e1;--accent-teal-subtle:#e1f3f0;--accent-red-subtle:#fbe9ea;--accent-blue-subtle:#e5f0ff;--skill-blue:#184f91;--skill-blue-subtle:#d9e9fb;--skill-blue-slash:#7fa6d2;--accent-purple-subtle:#f1e8ff;--dots-muted:#e3ded5;--dots-strong:#bdb6a8;--mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;--sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;--modal-top:min(30vh, 260px);--term-bg:#1a1a1a;--term-foreground:#e6e1e0;--term-selection:#2c3441;--term-app-bg:#fdfbfb;--term-app-foreground:#1d1b1a;--term-app-selection:#e9e2d8;--term-app-ansi-black:#1d1b1a;--term-app-ansi-red:#c0392b;--term-app-ansi-green:#3d8b37;--term-app-ansi-yellow:#b26a00;--term-app-ansi-blue:#2a6fcb;--term-app-ansi-magenta:#8e44ad;--term-app-ansi-cyan:#1a8a7a;--term-app-ansi-white:#8f8a85;--term-app-ansi-bright-black:#6b6663;--term-app-ansi-bright-red:#d94654;--term-app-ansi-bright-green:#5eb64c;--term-app-ansi-bright-yellow:#da9100;--term-app-ansi-bright-blue:#3a8dff;--term-app-ansi-bright-magenta:#9c5cff;--term-app-ansi-bright-cyan:#209a84;--term-app-ansi-bright-white:#1d1b1a;--tool-shimmer:var(--text)}@supports (color:color-mix(in lab,red,red)){:root{--tool-shimmer:color-mix(in srgb, var(--text) 58%, var(--subtext))}}:root{--editor-selection:var(--primary)}@supports (color:color-mix(in lab,red,red)){:root{--editor-selection:color-mix(in oklab, var(--primary) 22%, transparent)}}:root{--readable-col:840px;--border-strong:var(--border);--accent:var(--primary);--teal:var(--accent-teal);--green:var(--accent-green);--red:var(--accent-red);--amber:var(--accent-amber);--syntax-comment:#a0a1a7;--syntax-text:#383a42;--syntax-red:#e45649;--syntax-orange:#986801;--syntax-green:#50a14f;--syntax-yellow:#c18401;--syntax-cyan:#56b6c2;--syntax-purple:#a626a4;--syntax-blue:#4078f2}:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{--base:#0e0c0c;--canvas:#141110;--panel:#221f1e;--surface:#1d1b1a;--surface-bright:#130f0f;--highlight:#393433;--chat-annotation-highlight:#244e7a;--text:#e6e1e0;--subtext:#a68e8b;--muted:#737373;--primary:#ffb3ad;--primary-subtle:#33191b;--border:#525252;--border-variant:#404040;--accent-amber:#e67e22;--accent-green-subtle:#1c2b18;--accent-amber-subtle:#33260f;--accent-teal-subtle:#12332d;--accent-red-subtle:#331418;--accent-blue-subtle:#10233a;--skill-blue:#79adf0;--skill-blue-subtle:#183452;--skill-blue-slash:#527ca8;--accent-purple-subtle:#251933;--dots-muted:#2a2523;--dots-strong:#555;--term-app-bg:#141110;--term-app-foreground:#e6e1e0;--term-app-selection:#2c3441;--syntax-comment:#7f848e;--syntax-text:#abb2bf;--syntax-red:#e06c75;--syntax-orange:#d19a66;--syntax-green:#98c379;--syntax-yellow:#e5c07b;--syntax-purple:#c678dd;--syntax-blue:#61afef;color-scheme:dark}.tinker-logo{clip-path:inset(34% 9%)}:root[data-theme=dark] .tinker-logo{filter:invert();mix-blend-mode:screen}:root:is([lang=fa],[lang=ar]) #root :where(p,h1,h2,h3,h4,h5,h6,button,label,li,th,td,dt,dd,[role=status],[role=alert]),.md :where(p,h1,h2,h3,h4,li,th,td,blockquote),:root:is([lang=fa],[lang=ar]) #root .file-view-note{unicode-bidi:plaintext}:where(pre,code,.font-mono,.code-source-text,.xterm,.openresearch-diff){direction:ltr;unicode-bidi:isolate}.xterm{color-scheme:dark}@keyframes or-pulse{50%{opacity:.35}}@keyframes tool-target-reveal{0%{opacity:0;filter:blur(1.5px)}to{opacity:1;filter:blur()}}@keyframes tool-running-shimmer{0%{background-position:200% 0}to{background-position:-100% 0}}@keyframes tool-running-shimmer-icon{0%,to{color:var(--muted);opacity:.35}50%{color:var(--tool-shimmer);opacity:1}}.tool-running-shimmer{color:#0000;background:linear-gradient(100deg,var(--muted) 12%,var(--subtext) 34%,var(--tool-shimmer) 50%,var(--subtext) 66%,var(--muted) 88%);-webkit-text-fill-color:transparent;background-size:300% 100%;-webkit-background-clip:text;background-clip:text;animation:1.75s linear infinite tool-running-shimmer}.tool-running-shimmer::selection{color:var(--text);-webkit-text-fill-color:var(--text)}.tool-running-shimmer-icon{color:var(--muted);animation:1.75s ease-in-out infinite tool-running-shimmer-icon}.tool-group-summary .tool-group-label{transition:color .12s}.tool-group-summary:hover .tool-group-label,.tool-group-summary:hover .tool-chevron{color:var(--text)}.tool-group-disclosure{grid-template-rows:0fr;transition:grid-template-rows .22s cubic-bezier(.2,.75,.25,1);display:grid}.tool-group-disclosure.open{grid-template-rows:1fr}.tool-group-disclosure-inner{min-height:0;position:relative;overflow:hidden}.tool-target-reveal{animation:.18s cubic-bezier(.2,.75,.25,1) tool-target-reveal}.tool-target,.tool-target-more{color:inherit;cursor:pointer;font-weight:inherit;text-align:inherit;text-underline-offset:3px;-webkit-text-decoration-skip-ink:auto;text-decoration-skip-ink:auto;text-decoration-line:underline;text-decoration-thickness:.6px;transition:color .14s,text-decoration-color .14s;display:inline}.tool-line,.tool-group-summary{font-weight:375}.tool-group-rows .tool-line{font-size:var(--text-sm)}.msg-assistant .md table{margin-block:14px;margin-inline:auto}.msg-assistant .md th,.msg-assistant .md td{padding-block:10px}.msg-assistant .md figure{width:fit-content;max-width:100%;margin-inline:auto}.md .file-chip{padding-block:.5px;line-height:1.3}.md .file-chip .file-chip-open{color:currentColor;opacity:.6}.md .file-chip .file-chip-label{text-decoration-line:underline;-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);text-underline-offset:2px;text-decoration-thickness:.6px}.md .file-chip:hover:not(:disabled) .file-chip-label,.md .file-chip:focus-visible .file-chip-label{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}.md .file-chip:disabled .file-chip-label{text-decoration-line:none}.md .file-chip:disabled .file-chip-open{display:none}.msg-assistant .md img{max-width:100%;height:auto;margin-inline:auto;display:block}.md[data-streaming=true] .katex-error{visibility:hidden}.tool-target{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target-more{text-decoration-color:#0000}.project-row:hover .project-row-title{text-underline-offset:2px;text-decoration-line:underline}.project-row:has(.project-row-secondary:hover) .project-row-title{text-decoration-line:none}@media(hover:none){.project-row-delete{opacity:1;pointer-events:auto}}.tool-target:hover,.tool-target-more:hover{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target:focus-visible,.tool-target-more:focus-visible{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);outline:1px solid var(--border-strong);outline-offset:2px}@media(prefers-reduced-motion:reduce){.activity-pulse{animation:none}.tool-group-disclosure{transition:none}.tool-target-reveal{animation:none}.tool-running-shimmer{color:var(--subtext);-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer-icon{animation:none}}@media(forced-colors:active){.tool-running-shimmer{color:canvastext;-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer::selection{color:highlighttext;-webkit-text-fill-color:HighlightText}.tool-running-shimmer-icon{color:canvastext;animation:none}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes title-char-in{0%{opacity:0;filter:blur(4px);transform:translateY(.15em)}}.workspace-body>.chat-pane .chat-header{padding-inline-end:11.25rem}.workspace-card-visible>.chat-pane{padding-inline-end:16rem}.workspace-card-visible>.chat-pane .chat-header{padding-inline-end:1rem}.workspace-card-visible .workspace-tools{top:1.25rem}.win-titlebar .workspace-card-visible .workspace-tools{top:2.5rem}.code-source-text,.openresearch-diff .diff-line{font-family:var(--mono);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:1.55;-moz-tab-size:4;tab-size:4;line-height:1.55}.code-source-wrap,.openresearch-diff .diff-code{overflow-wrap:normal;word-break:normal;overflow-wrap:break-word;white-space:pre-wrap}@property --tw-leading{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes pulse{50%{opacity:.5}} diff --git a/ui/dist/assets/index-BxuZLhmE.js b/ui/dist/assets/index-CdYShGTw.js similarity index 53% rename from ui/dist/assets/index-BxuZLhmE.js rename to ui/dist/assets/index-CdYShGTw.js index 7bb62a4d4..6c6f8af83 100644 --- a/ui/dist/assets/index-BxuZLhmE.js +++ b/ui/dist/assets/index-CdYShGTw.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-DfZYK3-b.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); -var tK=Object.defineProperty;var rE=e=>{throw TypeError(e)};var nK=(e,n,t)=>n in e?tK(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var Ys=(e,n,t)=>nK(e,typeof n!="symbol"?n+"":n,t),q2=(e,n,t)=>n.has(e)||rE("Cannot "+t);var le=(e,n,t)=>(q2(e,n,"read from private field"),t?t.call(e):n.get(e)),lt=(e,n,t)=>n.has(e)?rE("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ge=(e,n,t,r)=>(q2(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Ut=(e,n,t)=>(q2(e,n,"access private method"),t);var Fp=(e,n,t,r)=>({set _(s){Ge(e,n,s,t)},get _(){return le(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 Em(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var U2={exports:{}},Hp={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview--NppkCR0.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); +var hV=Object.defineProperty;var gE=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 Qs=(e,n,t)=>pV(e,typeof n!="symbol"?n+"":n,t),V2=(e,n,t)=>n.has(e)||gE("Cannot "+t);var le=(e,n,t)=>(V2(e,n,"read from private field"),t?t.call(e):n.get(e)),lt=(e,n,t)=>n.has(e)?gE("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ge=(e,n,t,r)=>(V2(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Gt=(e,n,t)=>(V2(e,n,"access private method"),t);var Hp=(e,n,t,r)=>({set _(s){Ge(e,n,s,t)},get _(){return le(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 Em(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var W2={exports:{}},qp={};/** * @license React * react-jsx-runtime.production.js * @@ -7,7 +7,7 @@ var tK=Object.defineProperty;var rE=e=>{throw TypeError(e)};var nK=(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 sE;function rK(){if(sE)return Hp;sE=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 Hp.Fragment=n,Hp.jsx=t,Hp.jsxs=t,Hp}var iE;function sK(){return iE||(iE=1,U2.exports=rK()),U2.exports}var _=sK(),G2={exports:{}},rn={};/** + */var vE;function mV(){if(vE)return qp;vE=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 qp.Fragment=n,qp.jsx=t,qp.jsxs=t,qp}var bE;function gV(){return bE||(bE=1,W2.exports=mV()),W2.exports}var _=gV(),Q2={exports:{}},sn={};/** * @license React * react.production.js * @@ -15,7 +15,7 @@ var tK=Object.defineProperty;var rE=e=>{throw TypeError(e)};var nK=(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 iK(){if(aE)return rn;aE=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"),h=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 b(F,U,H){this.props=F,this.context=U,this.refs=v,this.updater=H||w}b.prototype.isReactComponent={},b.prototype.setState=function(F,U){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,U,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function y(){}y.prototype=b.prototype;function x(F,U,H){this.props=F,this.context=U,this.refs=v,this.updater=H||w}var C=x.prototype=new y;C.constructor=x,k(C,b.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function j(){}var A={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function M(F,U,H){var ae=H.ref;return{$$typeof:e,type:F,key:U,ref:ae!==void 0?ae:null,props:H}}function D(F,U){return M(F.type,U,F.props)}function I(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function B(F){var U={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(H){return U[H]})}var G=/\/+/g;function q(F,U){return typeof F=="object"&&F!==null&&F.key!=null?B(""+F.key):U.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(j,j):(F.status="pending",F.then(function(U){F.status==="pending"&&(F.status="fulfilled",F.value=U)},function(U){F.status==="pending"&&(F.status="rejected",F.reason=U)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function K(F,U,H,ae,ie){var ue=typeof F;(ue==="undefined"||ue==="boolean")&&(F=null);var re=!1;if(F===null)re=!0;else switch(ue){case"bigint":case"string":case"number":re=!0;break;case"object":switch(F.$$typeof){case e:case n:re=!0;break;case h:return re=F._init,K(re(F._payload),U,H,ae,ie)}}if(re)return ie=ie(F),re=ae===""?"."+q(F,0):ae,N(ie)?(H="",re!=null&&(H=re.replace(G,"$&/")+"/"),K(ie,U,H,"",function(ce){return ce})):ie!=null&&(I(ie)&&(ie=D(ie,H+(ie.key==null||F&&F.key===ie.key?"":(""+ie.key).replace(G,"$&/")+"/")+re)),U.push(ie)),1;re=0;var V=ae===""?".":ae+":";if(N(F))for(var oe=0;oe{const n=T.useContext(BO);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},aK=({client:e,children:n})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),_.jsx(BO.Provider,{value:e,children:n})),oK={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var wu,Pk,NO,cK=(NO=class{constructor(){lt(this,wu,oK);lt(this,Pk,!1)}setTimeoutProvider(e){Ge(this,wu,e)}setTimeout(e,n){return le(this,wu).setTimeout(e,n)}clearTimeout(e){le(this,wu).clearTimeout(e)}setInterval(e,n){return le(this,wu).setInterval(e,n)}clearInterval(e){le(this,wu).clearInterval(e)}},wu=new WeakMap,Pk=new WeakMap,NO);const B_=new cK;function lK(e){setTimeout(e,0)}const uK=typeof window>"u"||"Deno"in globalThis;function ni(){}function _K(e,n){return typeof e=="function"?e(n):e}function PO(e){return typeof e=="number"&&e>=0&&e!==1/0}function FO(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Gr(e,n){return typeof e=="function"?e(n):e}function cE(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==Fk(a,n.options))return!1}else if(!Sh(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 lE(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(uf(n.options.mutationKey)!==uf(i))return!1}else if(!Sh(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function Fk(e,n){return((n==null?void 0:n.queryKeyHashFn)||uf)(e)}function uf(e){return JSON.stringify(e,(n,t)=>Q4(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function Sh(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=uE(e)&&uE(n);if(!r&&!(Q4(e)&&Q4(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{B_.setTimeout(n,e)})}function X4(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?Hk(e,n):n}function hK(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function pK(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const qk=Symbol();function HO(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===qk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Uk(e,n){return typeof e=="function"?e(...n):!!e}function mK(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 gK=()=>uK;const Gk=()=>gK();var zf=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(){}},q_,ku,ah,zO,vK=(zO=class extends zf{constructor(){super();lt(this,q_);lt(this,ku);lt(this,ah);Ge(this,ah,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){le(this,ku)||this.setEventListener(le(this,ah))}onUnsubscribe(){var n;this.hasListeners()||((n=le(this,ku))==null||n.call(this),Ge(this,ku,void 0))}setEventListener(n){var t;Ge(this,ah,n),(t=le(this,ku))==null||t.call(this),Ge(this,ku,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){le(this,q_)!==n&&(Ge(this,q_,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof le(this,q_)=="boolean"?le(this,q_):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},q_=new WeakMap,ku=new WeakMap,ah=new WeakMap,zO);const Vk=new vK,bK=lK;function yK(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=bK;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 Ir=yK();var oh,Su,ch,jO,xK=(jO=class extends zf{constructor(){super();lt(this,oh,!0);lt(this,Su);lt(this,ch);Ge(this,ch,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(){le(this,Su)||this.setEventListener(le(this,ch))}onUnsubscribe(){var n;this.hasListeners()||((n=le(this,Su))==null||n.call(this),Ge(this,Su,void 0))}setEventListener(n){var t;Ge(this,ch,n),(t=le(this,Su))==null||t.call(this),Ge(this,Su,n(this.setOnline.bind(this)))}setOnline(n){le(this,oh)!==n&&(Ge(this,oh,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return le(this,oh)}},oh=new WeakMap,Su=new WeakMap,ch=new WeakMap,jO);const wv=new xK;function wK(e){return Math.min(1e3*2**e,3e4)}function qO(e){return(e??"online")==="online"?wv.isOnline():!0}var kv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function kK(e){return e instanceof kv}function UO(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((y,x)=>{i=y,a=x});o.catch(ni);const c=()=>s!=="pending",u=y=>{var x;if(!c()){const C=new kv(y);k(C),(x=e.onCancel)==null||x.call(e,C)}},h=()=>{n=!0},f=()=>{n=!1},p=()=>Vk.isFocused()&&(e.networkMode==="always"||wv.isOnline())&&e.canRun(),m=()=>qO(e.networkMode)&&e.canRun(),w=y=>{c()||(r==null||r(),s="resolved",i(y))},k=y=>{c()||(r==null||r(),s="rejected",a(y))},v=()=>new Promise(y=>{var x;r=C=>{(c()||p())&&y(C)},(x=e.onPause)==null||x.call(e)}).then(()=>{var y;r=void 0,c()||(y=e.onContinue)==null||y.call(e)}),b=()=>{if(c())return;let y;const x=t===0?e.initialPromise:void 0;try{y=x??e.fn()}catch(C){y=Promise.reject(C)}Promise.resolve(y).then(w).catch(C=>{var M;if(c())return;const N=e.retry??(Gk()?0:3),j=e.retryDelay??wK,A=typeof j=="function"?j(t,C):j,z=N===!0||typeof N=="number"&&tp()?void 0:v()).then(()=>{n?k(C):b()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:h,continueRetry:f,canStart:m,start:()=>(m()?b():v().then(b),o)}}var U_,AO,GO=(AO=class{constructor(){lt(this,U_)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),PO(this.gcTime)&&Ge(this,U_,B_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Gk()?1/0:3e5))}clearGcTimeout(){le(this,U_)!==void 0&&(B_.clearTimeout(le(this,U_)),Ge(this,U_,void 0))}},U_=new WeakMap,AO);function SK(e){return{onFetch:(n,t)=>{var h,f,p,m,w;const r=n.options,s=(p=(f=(h=n.fetchOptions)==null?void 0:h.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=x=>{mK(x,()=>n.signal,()=>k=!0)},b=HO(n.options,n.fetchOptions),y=async(x,C,N)=>{if(k)return Promise.reject(n.signal.reason);if(C==null&&x.pages.length)return Promise.resolve(x);const A=(()=>{const I={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return v(I),I})(),z=await b(A),{maxPages:M}=n.options,D=N?pK:hK;return{pages:D(x.pages,z,M),pageParams:D(x.pageParams,C,M)}};if(s&&i.length){const x=s==="backward",C=x?CK:fE,N={pages:i,pageParams:a};o=await y(N,C(r,N),x)}else{const x=e??i.length;do{const C=c===0?a[0]??r.initialPageParam:fE(r,o);if(c>0&&C==null)break;o=await y(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 fE(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 CK(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}var lh,G_,uh,Fa,V_,ws,fm,K_,ao,el,TO,EK=(TO=class extends GO{constructor(n){super();lt(this,ao);lt(this,lh);lt(this,G_);lt(this,uh);lt(this,Fa);lt(this,V_);lt(this,ws);lt(this,fm);lt(this,K_);Ge(this,K_,!1),Ge(this,fm,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ge(this,V_,n.client),Ge(this,Fa,le(this,V_).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ge(this,G_,hE(this.options)),this.state=n.state??le(this,G_),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return le(this,lh)}get promise(){var n;return(n=le(this,ws))==null?void 0:n.promise}setOptions(n){if(this.options={...le(this,fm),...n},n!=null&&n._type&&Ge(this,lh,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=hE(this.options);t.data!==void 0&&(this.setState(dE(t.data,t.dataUpdatedAt)),Ge(this,G_,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&le(this,Fa).remove(this)}setData(n,t){const r=X4(this.state.data,n,this.options);return Ut(this,ao,el).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){Ut(this,ao,el).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=le(this,ws))==null?void 0:r.promise;return(s=le(this,ws))==null||s.cancel(n),t?t.then(ni).catch(ni):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return le(this,G_)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Gr(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qk||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Gr(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:!FO(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=le(this,ws))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=le(this,ws))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),le(this,Fa).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||(le(this,ws)&&(le(this,K_)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?le(this,ws).cancel({revert:!0}):le(this,ws).cancelRetry()),this.scheduleGc()),le(this,Fa).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ut(this,ao,el).call(this,{type:"invalidate"})}async fetch(n,t){var u,h,f,p,m,w,k,v,b,y,x,C;if(this.state.fetchStatus!=="idle"&&((u=le(this,ws))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(le(this,ws))return le(this,ws).continueRetry(),le(this,ws).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(j=>j.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ge(this,K_,!0),r.signal)})},i=()=>{const N=HO(this.options,t),A=(()=>{const z={client:le(this,V_),queryKey:this.queryKey,meta:this.meta};return s(z),z})();return Ge(this,K_,!1),this.options.persister?this.options.persister(N,A,this):N(A)},o=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:le(this,V_),state:this.state,fetchFn:i};return s(N),N})();(h=le(this,lh)==="infinite"?SK(this.options.pages):this.options.behavior)==null||h.onFetch(o,this),Ge(this,uh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Ut(this,ao,el).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const c=Ge(this,ws,UO({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:N=>{N instanceof kv&&N.revert&&this.setState({...le(this,uh),fetchStatus:"idle"}),r.abort()},onFail:(N,j)=>{Ut(this,ao,el).call(this,{type:"failed",failureCount:N,error:j})},onPause:()=>{Ut(this,ao,el).call(this,{type:"pause"})},onContinue:()=>{Ut(this,ao,el).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=le(this,Fa).config).onSuccess)==null||w.call(m,N,this),(v=(k=le(this,Fa).config).onSettled)==null||v.call(k,N,this.state.error,this),N}catch(N){if(N instanceof kv){if(N.silent)return le(this,ws).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Ut(this,ao,el).call(this,{type:"error",error:N}),(y=(b=le(this,Fa).config).onError)==null||y.call(b,N,this),(C=(x=le(this,Fa).config).onSettled)==null||C.call(x,this.state.data,N,this),N}finally{le(this,ws)===c&&Ge(this,ws,void 0),this.scheduleGc()}}},lh=new WeakMap,G_=new WeakMap,uh=new WeakMap,Fa=new WeakMap,V_=new WeakMap,ws=new WeakMap,fm=new WeakMap,K_=new WeakMap,ao=new WeakSet,el=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,...VO(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...dE(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,uh,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),Ir.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),le(this,Fa).notify({query:this,type:"updated",action:n})})},TO);function VO(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:qO(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function dE(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function hE(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 hi,On,dm,pi,W_,_h,sl,hm,fh,dh,Q_,X_,Cu,hh,tr,c0,Y4,Z4,J4,e3,t3,n3,r3,s3,RO,Kk=(RO=class extends zf{constructor(n,t){super();lt(this,tr);lt(this,hi);lt(this,On);lt(this,dm);lt(this,pi);lt(this,W_);lt(this,_h);lt(this,sl);lt(this,hm);lt(this,fh);lt(this,dh);lt(this,Q_);lt(this,X_);lt(this,Cu);lt(this,hh,new Set);this.options=t,Ge(this,hi,n),Ge(this,sl,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(le(this,On).addObserver(this),pE(le(this,On),this.options)?Ut(this,tr,c0).call(this):this.updateResult(),Ut(this,tr,t3).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return i3(le(this,On),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return i3(le(this,On),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ut(this,tr,n3).call(this),Ut(this,tr,r3).call(this),le(this,On).removeObserver(this)}setOptions(n){const t=this.options,r=le(this,On);if(this.options=le(this,hi).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Gr(this.options.enabled,le(this,On))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ut(this,tr,s3).call(this),le(this,On).setOptions(this.options),t._defaulted&&!h0(this.options,t)&&le(this,hi).getQueryCache().notify({type:"observerOptionsUpdated",query:le(this,On),observer:this});const s=this.hasListeners();s&&mE(le(this,On),r,this.options,t)&&Ut(this,tr,c0).call(this),this.updateResult(),s&&(le(this,On)!==r||Gr(this.options.enabled,le(this,On))!==Gr(t.enabled,le(this,On))||Gr(this.options.staleTime,le(this,On))!==Gr(t.staleTime,le(this,On)))&&Ut(this,tr,Z4).call(this);const i=Ut(this,tr,J4).call(this);s&&(le(this,On)!==r||Gr(this.options.enabled,le(this,On))!==Gr(t.enabled,le(this,On))||i!==le(this,Cu))&&Ut(this,tr,e3).call(this,i)}getOptimisticResult(n){const t=le(this,hi).getQueryCache().build(le(this,hi),n),r=this.createResult(t,n);return h0(this.getCurrentResult(),r)||(Ge(this,pi,r),Ge(this,_h,this.options),Ge(this,W_,le(this,On).state)),r}getCurrentResult(){return le(this,pi)}trackResult(n,t){return new Proxy(n,{get:(r,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(r,s))})}trackProp(n){le(this,hh).add(n)}getCurrentQuery(){return le(this,On)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=le(this,hi).defaultQueryOptions(n),r=le(this,hi).getQueryCache().build(le(this,hi),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=le(this,hi).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 Ut(this,tr,c0).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),le(this,pi)))}createResult(n,t){var j;const r=le(this,On),s=this.options,i=le(this,pi),a=le(this,W_),o=le(this,_h),c=n!==r?n.state:le(this,dm),{state:u}=n;let h={...u},f=!1,p;if(t._optimisticResults){const A=this.hasListeners(),z=!A&&pE(n,t),M=A&&mE(n,r,t,s);(z||M)&&(h={...h,...VO(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:w,status:k}=h;p=h.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((j=le(this,dh))==null?void 0:j.state.data,le(this,dh)):t.placeholderData,A!==void 0&&(k="success",p=X4(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===le(this,hm))p=le(this,fh);else try{Ge(this,hm,t.select),p=t.select(p),p=X4(i==null?void 0:i.data,p,t),Ge(this,fh,p),Ge(this,sl,null)}catch(A){Ge(this,sl,A)}else p===void 0&&Ge(this,sl,null);le(this,sl)&&(m=le(this,sl),p=le(this,fh),w=Date.now(),k="error",f=!1);const b=h.fetchStatus==="fetching",y=k==="pending",x=k==="error",C=y&&b,N=p!==void 0;return{status:k,fetchStatus:h.fetchStatus,isPending:y,isSuccess:k==="success",isError:x,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:x&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&N,isStale:Wk(n,t),refetch:this.refetch,isEnabled:Gr(t.enabled,n)!==!1}}updateResult(){const n=le(this,pi),t=this.createResult(le(this,On),this.options);if(Ge(this,W_,le(this,On).state),Ge(this,_h,this.options),le(this,W_).data!==void 0&&Ge(this,dh,le(this,On)),h0(t,n))return;Ge(this,pi,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!le(this,hh).size)return!0;const o=new Set(a??le(this,hh));return this.options.throwOnError&&o.add("error"),Object.keys(le(this,pi)).some(c=>{const u=c;return le(this,pi)[u]!==n[u]&&o.has(u)})})();Ir.batch(()=>{s&&this.listeners.forEach(i=>{i(le(this,pi))}),le(this,hi).getQueryCache().notify({query:le(this,On),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ut(this,tr,t3).call(this)}},hi=new WeakMap,On=new WeakMap,dm=new WeakMap,pi=new WeakMap,W_=new WeakMap,_h=new WeakMap,sl=new WeakMap,hm=new WeakMap,fh=new WeakMap,dh=new WeakMap,Q_=new WeakMap,X_=new WeakMap,Cu=new WeakMap,hh=new WeakMap,tr=new WeakSet,c0=function(n){Ut(this,tr,s3).call(this);let t=le(this,On).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(ni)),t},Y4=function(n){return!Gk()&&Gr(this.options.enabled,le(this,On))!==!1&&PO(n)},Z4=function(){Ut(this,tr,n3).call(this);const n=Gr(this.options.staleTime,le(this,On));if(le(this,pi).isStale||!Ut(this,tr,Y4).call(this,n))return;const t=FO(le(this,pi).dataUpdatedAt,n)+1;Ge(this,Q_,B_.setTimeout(()=>{le(this,pi).isStale||this.updateResult()},t))},J4=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(le(this,On)):this.options.refetchInterval)??!1},e3=function(n){Ut(this,tr,r3).call(this),Ge(this,Cu,n),!(le(this,Cu)===0||!Ut(this,tr,Y4).call(this,le(this,Cu)))&&Ge(this,X_,B_.setInterval(()=>{(this.options.refetchIntervalInBackground||Vk.isFocused())&&Ut(this,tr,c0).call(this)},le(this,Cu)))},t3=function(){Ut(this,tr,Z4).call(this),Ut(this,tr,e3).call(this,Ut(this,tr,J4).call(this))},n3=function(){le(this,Q_)!==void 0&&(B_.clearTimeout(le(this,Q_)),Ge(this,Q_,void 0))},r3=function(){le(this,X_)!==void 0&&(B_.clearInterval(le(this,X_)),Ge(this,X_,void 0))},s3=function(){const n=le(this,hi).getQueryCache().build(le(this,hi),this.options);if(n===le(this,On))return;const t=le(this,On);Ge(this,On,n),Ge(this,dm,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},RO);function NK(e,n){return Gr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Gr(n.retryOnMount,e)===!1)}function pE(e,n){return NK(e,n)||e.state.data!==void 0&&i3(e,n,n.refetchOnMount)}function i3(e,n,t){if(Gr(n.enabled,e)!==!1&&Gr(n.staleTime,e)!=="static"){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&Wk(e,n)}return!1}function mE(e,n,t,r){return(e!==n||Gr(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&Wk(e,t)}function Wk(e,n){return Gr(n.enabled,e)!==!1&&e.isStaleByTime(Gr(n.staleTime,e))}var pm,Xo,Js,Y_,Yo,gu,MO,zK=(MO=class extends GO{constructor(n){super();lt(this,Yo);lt(this,pm);lt(this,Xo);lt(this,Js);lt(this,Y_);Ge(this,pm,n.client),this.mutationId=n.mutationId,Ge(this,Js,n.mutationCache),Ge(this,Xo,[]),this.state=n.state||KO(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){le(this,Xo).includes(n)||(le(this,Xo).push(n),this.clearGcTimeout(),le(this,Js).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ge(this,Xo,le(this,Xo).filter(t=>t!==n)),this.scheduleGc(),le(this,Js).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){le(this,Xo).length||(this.state.status==="pending"?this.scheduleGc():le(this,Js).remove(this))}continue(){var n;return((n=le(this,Y_))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,c,u,h,f,p,m,w,k,v,b,y,x,C,N,j,A,z;const t=()=>{Ut(this,Yo,gu).call(this,{type:"continue"})},r={client:le(this,pm),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,Y_,UO({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,D)=>{Ut(this,Yo,gu).call(this,{type:"failed",failureCount:M,error:D})},onPause:()=>{Ut(this,Yo,gu).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>le(this,Js).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{Ut(this,Yo,gu).call(this,{type:"pending",variables:n,isPaused:a}),le(this,Js).config.onMutate&&await le(this,Js).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&&Ut(this,Yo,gu).call(this,{type:"pending",context:D,variables:n,isPaused:a})}const M=await s.start();return await((h=(u=le(this,Js).config).onSuccess)==null?void 0:h.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=le(this,Js).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)),Ut(this,Yo,gu).call(this,{type:"success",data:M}),M}catch(M){try{await((y=(b=le(this,Js).config).onError)==null?void 0:y.call(b,M,n,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(x=this.options).onError)==null?void 0:C.call(x,M,n,this.state.context,r))}catch(D){Promise.reject(D)}try{await((j=(N=le(this,Js).config).onSettled)==null?void 0:j.call(N,void 0,M,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((z=(A=this.options).onSettled)==null?void 0:z.call(A,void 0,M,n,this.state.context,r))}catch(D){Promise.reject(D)}throw Ut(this,Yo,gu).call(this,{type:"error",error:M}),M}finally{le(this,Y_)===s&&Ge(this,Y_,void 0),le(this,Js).runNext(this)}}},pm=new WeakMap,Xo=new WeakMap,Js=new WeakMap,Y_=new WeakMap,Yo=new WeakSet,gu=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),Ir.batch(()=>{le(this,Xo).forEach(r=>{r.onMutationUpdate(n)}),le(this,Js).notify({mutation:this,type:"updated",action:n})})},MO);function KO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var il,oo,mm,OO,jK=(OO=class extends zf{constructor(n={}){super();lt(this,il);lt(this,oo);lt(this,mm);this.config=n,Ge(this,il,new Set),Ge(this,oo,new Map),Ge(this,mm,0)}build(n,t,r){const s=new zK({client:n,mutationCache:this,mutationId:++Fp(this,mm)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){le(this,il).add(n);const t=Zg(n);if(typeof t=="string"){const r=le(this,oo).get(t);r?r.push(n):le(this,oo).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(le(this,il).delete(n)){const t=Zg(n);if(typeof t=="string"){const r=le(this,oo).get(t);if(r)if(r.length>1){const s=r.indexOf(n);s!==-1&&r.splice(s,1)}else r[0]===n&&le(this,oo).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=Zg(n);if(typeof t=="string"){const s=(r=le(this,oo).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=Zg(n);return typeof t=="string"?((s=(r=le(this,oo).get(t))==null?void 0:r.find(i=>i!==n&&i.state.isPaused))==null?void 0:s.continue())??Promise.resolve():Promise.resolve()}clear(){Ir.batch(()=>{le(this,il).forEach(n=>{this.notify({type:"removed",mutation:n})}),le(this,il).clear(),le(this,oo).clear()})}getAll(){return Array.from(le(this,il))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>lE(t,r))}findAll(n={}){return this.getAll().filter(t=>lE(n,t))}notify(n){Ir.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Ir.batch(()=>Promise.all(n.map(t=>t.continue().catch(ni))))}},il=new WeakMap,oo=new WeakMap,mm=new WeakMap,OO);function Zg(e){var n;return(n=e.options.scope)==null?void 0:n.id}var al,Eu,ei,ol,rc,l0,a3,DO,AK=(DO=class extends zf{constructor(t,r){super();lt(this,rc);lt(this,al);lt(this,Eu);lt(this,ei);lt(this,ol);Ge(this,al,t),this.setOptions(r),this.bindMethods(),Ut(this,rc,l0).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=le(this,al).defaultMutationOptions(t),h0(this.options,r)||le(this,al).getMutationCache().notify({type:"observerOptionsUpdated",mutation:le(this,ei),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&uf(r.mutationKey)!==uf(this.options.mutationKey)?this.reset():((s=le(this,ei))==null?void 0:s.state.status)==="pending"&&le(this,ei).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&le(this,ei)&&(le(this,ei).addObserver(this),Ut(this,rc,l0).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=le(this,ei))==null||t.removeObserver(this)}onMutationUpdate(t){Ut(this,rc,l0).call(this),Ut(this,rc,a3).call(this,t)}getCurrentResult(){return le(this,Eu)}reset(){var t;(t=le(this,ei))==null||t.removeObserver(this),Ge(this,ei,void 0),Ut(this,rc,l0).call(this),Ut(this,rc,a3).call(this)}mutate(t,r){var s;return Ge(this,ol,r),(s=le(this,ei))==null||s.removeObserver(this),Ge(this,ei,le(this,al).getMutationCache().build(le(this,al),this.options)),le(this,ei).addObserver(this),le(this,ei).execute(t)}},al=new WeakMap,Eu=new WeakMap,ei=new WeakMap,ol=new WeakMap,rc=new WeakSet,l0=function(){var r;const t=((r=le(this,ei))==null?void 0:r.state)??KO();Ge(this,Eu,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},a3=function(t){Ir.batch(()=>{var r,s,i,a,o,c,u,h;if(le(this,ol)&&this.hasListeners()){const f=le(this,Eu).variables,p=le(this,Eu).context,m={client:le(this,al),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=le(this,ol)).onSuccess)==null||s.call(r,t.data,f,p,m)}catch(w){Promise.reject(w)}try{(a=(i=le(this,ol)).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=le(this,ol)).onError)==null||c.call(o,t.error,f,p,m)}catch(w){Promise.reject(w)}try{(h=(u=le(this,ol)).onSettled)==null||h.call(u,void 0,t.error,f,p,m)}catch(w){Promise.reject(w)}}}this.listeners.forEach(f=>{f(le(this,Eu))})})},DO);function gE(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var ph,mi,mh,Z_,la,J_,gm,vm,bm,ym,Es,o3,c3,WO,l3,u3,_3,LO,TK=(LO=class extends zf{constructor(n,t,r){super();lt(this,Es);lt(this,ph);lt(this,mi);lt(this,mh);lt(this,Z_);lt(this,la);lt(this,J_);lt(this,gm);lt(this,vm);lt(this,bm);lt(this,ym,[]);Ge(this,ph,n),Ge(this,Z_,r),Ge(this,mh,[]),Ge(this,la,[]),Ge(this,mi,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&le(this,la).forEach(n=>{n.subscribe(t=>{Ut(this,Es,u3).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,le(this,la).forEach(n=>{n.destroy()})}setQueries(n,t){Ge(this,mh,n),Ge(this,Z_,t),Ir.batch(()=>{const r=le(this,la),s=Ut(this,Es,l3).call(this,le(this,mh));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,h=u?!0:a.some((f,p)=>{const m=le(this,mi)[p];return!m||!h0(f,m)});!u&&!h||(u&&(Ge(this,ym,s),Ge(this,la,i)),Ge(this,mi,a),this.hasListeners()&&(u&&(gE(r,i).forEach(f=>{f.destroy()}),gE(i,r).forEach(f=>{f.subscribe(p=>{Ut(this,Es,u3).call(this,f,p)})})),Ut(this,Es,_3).call(this)))})}getCurrentResult(){return le(this,mi)}getQueries(){return le(this,la).map(n=>n.getCurrentQuery())}getObservers(){return le(this,la)}getOptimisticResult(n,t){const r=Ut(this,Es,l3).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Ut(this,Es,c3).call(this,a??s,t,i),()=>Ut(this,Es,o3).call(this,s,r)]}},ph=new WeakMap,mi=new WeakMap,mh=new WeakMap,Z_=new WeakMap,la=new WeakMap,J_=new WeakMap,gm=new WeakMap,vm=new WeakMap,bm=new WeakMap,ym=new WeakMap,Es=new WeakSet,o3=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)}))})})},c3=function(n,t,r){if(t){const s=le(this,bm),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(le(this,mi)!==le(this,vm)||i||t!==le(this,gm))&&(Ge(this,gm,t),Ge(this,vm,le(this,mi)),r!==void 0&&Ge(this,bm,r),Ge(this,J_,Hk(le(this,J_),t(n)))),le(this,J_)}return n},WO=function(){var n;return!((n=le(this,Z_))!=null&&n.combine)||le(this,la).some((t,r)=>{var s;return t.options.suspense&&((s=le(this,mi)[r])==null?void 0:s.data)===void 0})},l3=function(n){const t=new Map;le(this,la).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=le(this,ph).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new Kk(le(this,ph),i);r.push({defaultedQueryOptions:i,observer:a})}),r},u3=function(n,t){const r=le(this,la).indexOf(n);r!==-1&&(Ge(this,mi,le(this,mi).slice()),le(this,mi)[r]=t,Ut(this,Es,_3).call(this))},_3=function(){var n;if(this.hasListeners()){const t=Ut(this,Es,WO).call(this),r=le(this,J_),s=t?r:Ut(this,Es,c3).call(this,Ut(this,Es,o3).call(this,le(this,mi),le(this,ym)),(n=le(this,Z_))==null?void 0:n.combine);(t||r!==s)&&Ir.batch(()=>{this.listeners.forEach(i=>{i(le(this,mi))})})}},LO),Zo,IO,RK=(IO=class extends zf{constructor(n={}){super();lt(this,Zo);this.config=n,Ge(this,Zo,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??Fk(s,t);let a=this.get(i);return a||(a=new EK({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(a)),a}add(n){le(this,Zo).has(n.queryHash)||(le(this,Zo).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=le(this,Zo).get(n.queryHash);t&&(n.destroy(),t===n&&le(this,Zo).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Ir.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return le(this,Zo).get(n)}getAll(){return[...le(this,Zo).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>cE(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>cE(n,r)):t}notify(n){Ir.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Ir.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Ir.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Zo=new WeakMap,IO),Dr,Nu,zu,gh,vh,ju,bh,yh,$O,MK=($O=class{constructor(e={}){lt(this,Dr);lt(this,Nu);lt(this,zu);lt(this,gh);lt(this,vh);lt(this,ju);lt(this,bh);lt(this,yh);Ge(this,Dr,e.queryCache||new RK),Ge(this,Nu,e.mutationCache||new jK),Ge(this,zu,e.defaultOptions||{}),Ge(this,gh,new Map),Ge(this,vh,new Map),Ge(this,ju,0)}mount(){Fp(this,ju)._++,le(this,ju)===1&&(Ge(this,bh,Vk.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Dr).onFocus())})),Ge(this,yh,wv.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Dr).onOnline())})))}unmount(){var e,n;Fp(this,ju)._--,le(this,ju)===0&&((e=le(this,bh))==null||e.call(this),Ge(this,bh,void 0),(n=le(this,yh))==null||n.call(this),Ge(this,yh,void 0))}isFetching(e){return le(this,Dr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return le(this,Nu).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=le(this,Dr).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=le(this,Dr).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Gr(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return le(this,Dr).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var a;const r=this.defaultQueryOptions({queryKey:e}),s=(a=le(this,Dr).get(r.queryHash))==null?void 0:a.state.data,i=_K(n,s);if(i!==void 0)return le(this,Dr).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return Ir.batch(()=>le(this,Dr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=le(this,Dr).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=le(this,Dr);Ir.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=le(this,Dr);return Ir.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=Ir.batch(()=>le(this,Dr).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(ni).catch(ni)}invalidateQueries(e,n={}){return Ir.batch(()=>(le(this,Dr).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=Ir.batch(()=>le(this,Dr).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(ni)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(ni)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=le(this,Dr).build(this,n),r=t.isStaleByTime(Gr(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=le(this,Dr).build(this,n);return t.isStaleByTime(Gr(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ni).catch(ni)}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(ni).catch(ni)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return wv.isOnline()?le(this,Nu).resumePausedMutations():Promise.resolve()}getQueryCache(){return le(this,Dr)}getMutationCache(){return le(this,Nu)}getDefaultOptions(){return le(this,zu)}setDefaultOptions(e){Ge(this,zu,e)}setQueryDefaults(e,n){le(this,gh).set(uf(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...le(this,gh).values()],t={};return n.forEach(r=>{Sh(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){le(this,vh).set(uf(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...le(this,vh).values()],t={};return n.forEach(r=>{Sh(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...le(this,zu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Fk(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===qk&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...le(this,zu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){le(this,Dr).clear(),le(this,Nu).clear()}},Dr=new WeakMap,Nu=new WeakMap,zu=new WeakMap,gh=new WeakMap,vh=new WeakMap,ju=new WeakMap,bh=new WeakMap,yh=new WeakMap,$O);const QO=T.createContext(!1),XO=()=>T.useContext(QO);QO.Provider;function OK(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const DK=T.createContext(OK()),YO=()=>T.useContext(DK),ZO=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?Uk(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},JO=e=>{T.useEffect(()=>{e.clearReset()},[e])},eD=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Uk(t,[e.error,r])),tD=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))}},f3=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,nD=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function LK({queries:e,...n},t){const r=zm(),s=XO(),i=YO(),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=>{tD(k);const v=r.getQueryCache().get(k.queryHash);ZO(k,i,v)}),JO(i);const[c]=T.useState(()=>new TK(r,o,n)),[u,h,f]=c.getOptimisticResult(o,n.combine),p=!s&&a;T.useSyncExternalStore(T.useCallback(k=>p?c.subscribe(Ir.batchCalls(k)):ni,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setQueries(o,n)},[o,n,c]);const m=u.some((k,v)=>f3(o[v],k))?u.flatMap((k,v)=>{const b=o[v];if(b&&f3(b,k)){const y=new Kk(r,b);return nD(b,y,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const w=u.find((k,v)=>{const b=o[v];return b&&eD({result:k,errorResetBoundary:i,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(w)throw w.error;return h(f())}function IK(e,n,t){const r=XO(),s=YO(),i=zm(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,tD(a),ZO(a,s,o),JO(s);const[u]=T.useState(()=>new n(i,a)),h=u.getOptimisticResult(a),f=!r&&c;if(T.useSyncExternalStore(T.useCallback(p=>{const m=f?u.subscribe(Ir.batchCalls(p)):ni;return u.updateResult(),m},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),T.useEffect(()=>{u.setOptions(a)},[a,u]),f3(a,h))throw nD(a,u,s);if(eD({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return a.notifyOnChangeProps?h:u.trackResult(h)}function _t(e,n){return IK(e,Kk)}function $K(e,n){const t=zm(),r=t.getQueryCache();return T.useSyncExternalStore(T.useCallback(s=>r.subscribe(Ir.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function gn(e,n){const t=zm(),[r]=T.useState(()=>new AK(t,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const s=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Ir.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=T.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(ni)},[r]);if(s.error&&Uk(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const et=new MK({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),vl=new Set;let vE=null,Tb=0;const d3=new Set,BK=()=>Tb,bE=e=>(d3.add(e),()=>{d3.delete(e)}),Ga=()=>["workspace",Tb],zt=(e,...n)=>[...Ga(),e,...n];function PK(e,n=!1){if(vE===e&&!n)return!1;const t=Ga();return vE=e,Tb++,vl.clear(),Qk({queryKey:t}),d3.forEach(r=>r()),!0}const Gn=e=>e[1]===Tb;async function Qk(e){await et.cancelQueries(e,{revert:!1}),et.removeQueries(e)}function Vr(e,n){if(Gn(e))return et.setQueryData(e,n)}var V2={exports:{}},qp={},K2={exports:{}},W2={};/** + */var yE;function vV(){if(yE)return sn;yE=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"),h=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;function m(q){return q===null||typeof q!="object"?null:(q=p&&q[p]||q["@@iterator"],typeof q=="function"?q:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function b(q,P,F){this.props=q,this.context=P,this.refs=v,this.updater=F||w}b.prototype.isReactComponent={},b.prototype.setState=function(q,P){if(typeof q!="object"&&typeof q!="function"&&q!=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,q,P,"setState")},b.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function y(){}y.prototype=b.prototype;function x(q,P,F){this.props=q,this.context=P,this.refs=v,this.updater=F||w}var C=x.prototype=new y;C.constructor=x,k(C,b.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function j(){}var A={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function M(q,P,F){var re=F.ref;return{$$typeof:e,type:q,key:P,ref:re!==void 0?re:null,props:F}}function D(q,P){return M(q.type,P,q.props)}function I(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function B(q){var P={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(F){return P[F]})}var G=/\/+/g;function U(q,P){return typeof q=="object"&&q!==null&&q.key!=null?B(""+q.key):P.toString(36)}function Q(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(j,j):(q.status="pending",q.then(function(P){q.status==="pending"&&(q.status="fulfilled",q.value=P)},function(P){q.status==="pending"&&(q.status="rejected",q.reason=P)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function V(q,P,F,re,ie){var ue=typeof q;(ue==="undefined"||ue==="boolean")&&(q=null);var se=!1;if(q===null)se=!0;else switch(ue){case"bigint":case"string":case"number":se=!0;break;case"object":switch(q.$$typeof){case e:case n:se=!0;break;case h:return se=q._init,V(se(q._payload),P,F,re,ie)}}if(se)return ie=ie(q),se=re===""?"."+U(q,0):re,N(ie)?(F="",se!=null&&(F=se.replace(G,"$&/")+"/"),V(ie,P,F,"",function(ce){return ce})):ie!=null&&(I(ie)&&(ie=D(ie,F+(ie.key==null||q&&q.key===ie.key?"":(""+ie.key).replace(G,"$&/")+"/")+se)),P.push(ie)),1;se=0;var K=re===""?".":re+":";if(N(q))for(var oe=0;oe{const n=T.useContext(XO);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},bV=({client:e,children:n})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),_.jsx(XO.Provider,{value:e,children:n})),yV={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var xu,Wk,$O,xV=($O=class{constructor(){lt(this,xu,yV);lt(this,Wk,!1)}setTimeoutProvider(e){Ge(this,xu,e)}setTimeout(e,n){return le(this,xu).setTimeout(e,n)}clearTimeout(e){le(this,xu).clearTimeout(e)}setInterval(e,n){return le(this,xu).setInterval(e,n)}clearInterval(e){le(this,xu).clearInterval(e)}},xu=new WeakMap,Wk=new WeakMap,$O);const $_=new xV;function wV(e){setTimeout(e,0)}const kV=typeof window>"u"||"Deno"in globalThis;function ei(){}function SV(e,n){return typeof e=="function"?e(n):e}function YO(e){return typeof e=="number"&&e>=0&&e!==1/0}function ZO(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Kr(e,n){return typeof e=="function"?e(n):e}function wE(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==Qk(a,n.options))return!1}else if(!Sh(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 kE(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(lf(n.options.mutationKey)!==lf(i))return!1}else if(!Sh(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function Qk(e,n){return((n==null?void 0:n.queryKeyHashFn)||lf)(e)}function lf(e){return JSON.stringify(e,(n,t)=>J4(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function Sh(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=SE(e)&&SE(n);if(!r&&!(J4(e)&&J4(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{$_.setTimeout(n,e)})}function e3(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?Xk(e,n):n}function NV(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function zV(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const Yk=Symbol();function JO(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===Yk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Zk(e,n){return typeof e=="function"?e(...n):!!e}function jV(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 AV=()=>kV;const Jk=()=>AV();var zf=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(){}},H_,wu,ah,BO,TV=(BO=class extends zf{constructor(){super();lt(this,H_);lt(this,wu);lt(this,ah);Ge(this,ah,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){le(this,wu)||this.setEventListener(le(this,ah))}onUnsubscribe(){var n;this.hasListeners()||((n=le(this,wu))==null||n.call(this),Ge(this,wu,void 0))}setEventListener(n){var t;Ge(this,ah,n),(t=le(this,wu))==null||t.call(this),Ge(this,wu,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){le(this,H_)!==n&&(Ge(this,H_,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof le(this,H_)=="boolean"?le(this,H_):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},H_=new WeakMap,wu=new WeakMap,ah=new WeakMap,BO);const eS=new TV,RV=wV;function MV(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=RV;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 Ir=MV();var oh,ku,ch,PO,OV=(PO=class extends zf{constructor(){super();lt(this,oh,!0);lt(this,ku);lt(this,ch);Ge(this,ch,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(){le(this,ku)||this.setEventListener(le(this,ch))}onUnsubscribe(){var n;this.hasListeners()||((n=le(this,ku))==null||n.call(this),Ge(this,ku,void 0))}setEventListener(n){var t;Ge(this,ch,n),(t=le(this,ku))==null||t.call(this),Ge(this,ku,n(this.setOnline.bind(this)))}setOnline(n){le(this,oh)!==n&&(Ge(this,oh,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return le(this,oh)}},oh=new WeakMap,ku=new WeakMap,ch=new WeakMap,PO);const wv=new OV;function DV(e){return Math.min(1e3*2**e,3e4)}function eD(e){return(e??"online")==="online"?wv.isOnline():!0}var kv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function LV(e){return e instanceof kv}function tD(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((y,x)=>{i=y,a=x});o.catch(ei);const c=()=>s!=="pending",u=y=>{var x;if(!c()){const C=new kv(y);k(C),(x=e.onCancel)==null||x.call(e,C)}},h=()=>{n=!0},f=()=>{n=!1},p=()=>eS.isFocused()&&(e.networkMode==="always"||wv.isOnline())&&e.canRun(),m=()=>eD(e.networkMode)&&e.canRun(),w=y=>{c()||(r==null||r(),s="resolved",i(y))},k=y=>{c()||(r==null||r(),s="rejected",a(y))},v=()=>new Promise(y=>{var x;r=C=>{(c()||p())&&y(C)},(x=e.onPause)==null||x.call(e)}).then(()=>{var y;r=void 0,c()||(y=e.onContinue)==null||y.call(e)}),b=()=>{if(c())return;let y;const x=t===0?e.initialPromise:void 0;try{y=x??e.fn()}catch(C){y=Promise.reject(C)}Promise.resolve(y).then(w).catch(C=>{var M;if(c())return;const N=e.retry??(Jk()?0:3),j=e.retryDelay??DV,A=typeof j=="function"?j(t,C):j,z=N===!0||typeof N=="number"&&tp()?void 0:v()).then(()=>{n?k(C):b()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:h,continueRetry:f,canStart:m,start:()=>(m()?b():v().then(b),o)}}var q_,FO,nD=(FO=class{constructor(){lt(this,q_)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),YO(this.gcTime)&&Ge(this,q_,$_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Jk()?1/0:3e5))}clearGcTimeout(){le(this,q_)!==void 0&&($_.clearTimeout(le(this,q_)),Ge(this,q_,void 0))}},q_=new WeakMap,FO);function IV(e){return{onFetch:(n,t)=>{var h,f,p,m,w;const r=n.options,s=(p=(f=(h=n.fetchOptions)==null?void 0:h.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=x=>{jV(x,()=>n.signal,()=>k=!0)},b=JO(n.options,n.fetchOptions),y=async(x,C,N)=>{if(k)return Promise.reject(n.signal.reason);if(C==null&&x.pages.length)return Promise.resolve(x);const A=(()=>{const I={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return v(I),I})(),z=await b(A),{maxPages:M}=n.options,D=N?zV:NV;return{pages:D(x.pages,z,M),pageParams:D(x.pageParams,C,M)}};if(s&&i.length){const x=s==="backward",C=x?rD:t3,N={pages:i,pageParams:a};o=await y(N,C(r,N),x)}else{const x=e??i.length;do{const C=c===0?a[0]??r.initialPageParam:t3(r,o);if(c>0&&C==null)break;o=await y(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 t3(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 rD(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 $V(e,n){return n?t3(e,n)!=null:!1}function BV(e,n){return!n||!e.getPreviousPageParam?!1:rD(e,n)!=null}var lh,U_,uh,Fa,G_,Cs,fm,K_,so,tl,HO,PV=(HO=class extends nD{constructor(n){super();lt(this,so);lt(this,lh);lt(this,U_);lt(this,uh);lt(this,Fa);lt(this,G_);lt(this,Cs);lt(this,fm);lt(this,K_);Ge(this,K_,!1),Ge(this,fm,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ge(this,G_,n.client),Ge(this,Fa,le(this,G_).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ge(this,U_,NE(this.options)),this.state=n.state??le(this,U_),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return le(this,lh)}get promise(){var n;return(n=le(this,Cs))==null?void 0:n.promise}setOptions(n){if(this.options={...le(this,fm),...n},n!=null&&n._type&&Ge(this,lh,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=NE(this.options);t.data!==void 0&&(this.setState(EE(t.data,t.dataUpdatedAt)),Ge(this,U_,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&le(this,Fa).remove(this)}setData(n,t){const r=e3(this.state.data,n,this.options);return Gt(this,so,tl).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){Gt(this,so,tl).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=le(this,Cs))==null?void 0:r.promise;return(s=le(this,Cs))==null||s.cancel(n),t?t.then(ei).catch(ei):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return le(this,U_)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Kr(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yk||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Kr(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:!ZO(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=le(this,Cs))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=le(this,Cs))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),le(this,Fa).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||(le(this,Cs)&&(le(this,K_)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?le(this,Cs).cancel({revert:!0}):le(this,Cs).cancelRetry()),this.scheduleGc()),le(this,Fa).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Gt(this,so,tl).call(this,{type:"invalidate"})}async fetch(n,t){var u,h,f,p,m,w,k,v,b,y,x,C;if(this.state.fetchStatus!=="idle"&&((u=le(this,Cs))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(le(this,Cs))return le(this,Cs).continueRetry(),le(this,Cs).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(j=>j.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ge(this,K_,!0),r.signal)})},i=()=>{const N=JO(this.options,t),A=(()=>{const z={client:le(this,G_),queryKey:this.queryKey,meta:this.meta};return s(z),z})();return Ge(this,K_,!1),this.options.persister?this.options.persister(N,A,this):N(A)},o=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:le(this,G_),state:this.state,fetchFn:i};return s(N),N})();(h=le(this,lh)==="infinite"?IV(this.options.pages):this.options.behavior)==null||h.onFetch(o,this),Ge(this,uh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Gt(this,so,tl).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const c=Ge(this,Cs,tD({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:N=>{N instanceof kv&&N.revert&&this.setState({...le(this,uh),fetchStatus:"idle"}),r.abort()},onFail:(N,j)=>{Gt(this,so,tl).call(this,{type:"failed",failureCount:N,error:j})},onPause:()=>{Gt(this,so,tl).call(this,{type:"pause"})},onContinue:()=>{Gt(this,so,tl).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=le(this,Fa).config).onSuccess)==null||w.call(m,N,this),(v=(k=le(this,Fa).config).onSettled)==null||v.call(k,N,this.state.error,this),N}catch(N){if(N instanceof kv){if(N.silent)return le(this,Cs).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Gt(this,so,tl).call(this,{type:"error",error:N}),(y=(b=le(this,Fa).config).onError)==null||y.call(b,N,this),(C=(x=le(this,Fa).config).onSettled)==null||C.call(x,this.state.data,N,this),N}finally{le(this,Cs)===c&&Ge(this,Cs,void 0),this.scheduleGc()}}},lh=new WeakMap,U_=new WeakMap,uh=new WeakMap,Fa=new WeakMap,G_=new WeakMap,Cs=new WeakMap,fm=new WeakMap,K_=new WeakMap,so=new WeakSet,tl=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,...sD(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...EE(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,uh,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),Ir.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),le(this,Fa).notify({query:this,type:"updated",action:n})})},HO);function sD(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:eD(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function EE(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function NE(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 di,Ln,dm,hi,V_,_h,il,hm,fh,dh,W_,Q_,Su,hh,sr,l0,n3,r3,s3,i3,a3,o3,c3,l3,qO,Rb=(qO=class extends zf{constructor(n,t){super();lt(this,sr);lt(this,di);lt(this,Ln);lt(this,dm);lt(this,hi);lt(this,V_);lt(this,_h);lt(this,il);lt(this,hm);lt(this,fh);lt(this,dh);lt(this,W_);lt(this,Q_);lt(this,Su);lt(this,hh,new Set);this.options=t,Ge(this,di,n),Ge(this,il,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(le(this,Ln).addObserver(this),zE(le(this,Ln),this.options)?Gt(this,sr,l0).call(this):this.updateResult(),Gt(this,sr,a3).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return u3(le(this,Ln),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return u3(le(this,Ln),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Gt(this,sr,o3).call(this),Gt(this,sr,c3).call(this),le(this,Ln).removeObserver(this)}setOptions(n){const t=this.options,r=le(this,Ln);if(this.options=le(this,di).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Kr(this.options.enabled,le(this,Ln))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Gt(this,sr,l3).call(this),le(this,Ln).setOptions(this.options),t._defaulted&&!p0(this.options,t)&&le(this,di).getQueryCache().notify({type:"observerOptionsUpdated",query:le(this,Ln),observer:this});const s=this.hasListeners();s&&jE(le(this,Ln),r,this.options,t)&&Gt(this,sr,l0).call(this),this.updateResult(),s&&(le(this,Ln)!==r||Kr(this.options.enabled,le(this,Ln))!==Kr(t.enabled,le(this,Ln))||Kr(this.options.staleTime,le(this,Ln))!==Kr(t.staleTime,le(this,Ln)))&&Gt(this,sr,r3).call(this);const i=Gt(this,sr,s3).call(this);s&&(le(this,Ln)!==r||Kr(this.options.enabled,le(this,Ln))!==Kr(t.enabled,le(this,Ln))||i!==le(this,Su))&&Gt(this,sr,i3).call(this,i)}getOptimisticResult(n){const t=le(this,di).getQueryCache().build(le(this,di),n),r=this.createResult(t,n);return p0(this.getCurrentResult(),r)||(Ge(this,hi,r),Ge(this,_h,this.options),Ge(this,V_,le(this,Ln).state)),r}getCurrentResult(){return le(this,hi)}trackResult(n,t){return new Proxy(n,{get:(r,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(r,s))})}trackProp(n){le(this,hh).add(n)}getCurrentQuery(){return le(this,Ln)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=le(this,di).defaultQueryOptions(n),r=le(this,di).getQueryCache().build(le(this,di),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=le(this,di).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 Gt(this,sr,l0).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),le(this,hi)))}createResult(n,t){var j;const r=le(this,Ln),s=this.options,i=le(this,hi),a=le(this,V_),o=le(this,_h),c=n!==r?n.state:le(this,dm),{state:u}=n;let h={...u},f=!1,p;if(t._optimisticResults){const A=this.hasListeners(),z=!A&&zE(n,t),M=A&&jE(n,r,t,s);(z||M)&&(h={...h,...sD(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:w,status:k}=h;p=h.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((j=le(this,dh))==null?void 0:j.state.data,le(this,dh)):t.placeholderData,A!==void 0&&(k="success",p=e3(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===le(this,hm))p=le(this,fh);else try{Ge(this,hm,t.select),p=t.select(p),p=e3(i==null?void 0:i.data,p,t),Ge(this,fh,p),Ge(this,il,null)}catch(A){Ge(this,il,A)}else p===void 0&&Ge(this,il,null);le(this,il)&&(m=le(this,il),p=le(this,fh),w=Date.now(),k="error",f=!1);const b=h.fetchStatus==="fetching",y=k==="pending",x=k==="error",C=y&&b,N=p!==void 0;return{status:k,fetchStatus:h.fetchStatus,isPending:y,isSuccess:k==="success",isError:x,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:x&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&N,isStale:tS(n,t),refetch:this.refetch,isEnabled:Kr(t.enabled,n)!==!1}}updateResult(){const n=le(this,hi),t=this.createResult(le(this,Ln),this.options);if(Ge(this,V_,le(this,Ln).state),Ge(this,_h,this.options),le(this,V_).data!==void 0&&Ge(this,dh,le(this,Ln)),p0(t,n))return;Ge(this,hi,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!le(this,hh).size)return!0;const o=new Set(a??le(this,hh));return this.options.throwOnError&&o.add("error"),Object.keys(le(this,hi)).some(c=>{const u=c;return le(this,hi)[u]!==n[u]&&o.has(u)})})();Ir.batch(()=>{s&&this.listeners.forEach(i=>{i(le(this,hi))}),le(this,di).getQueryCache().notify({query:le(this,Ln),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Gt(this,sr,a3).call(this)}},di=new WeakMap,Ln=new WeakMap,dm=new WeakMap,hi=new WeakMap,V_=new WeakMap,_h=new WeakMap,il=new WeakMap,hm=new WeakMap,fh=new WeakMap,dh=new WeakMap,W_=new WeakMap,Q_=new WeakMap,Su=new WeakMap,hh=new WeakMap,sr=new WeakSet,l0=function(n){Gt(this,sr,l3).call(this);let t=le(this,Ln).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(ei)),t},n3=function(n){return!Jk()&&Kr(this.options.enabled,le(this,Ln))!==!1&&YO(n)},r3=function(){Gt(this,sr,o3).call(this);const n=Kr(this.options.staleTime,le(this,Ln));if(le(this,hi).isStale||!Gt(this,sr,n3).call(this,n))return;const t=ZO(le(this,hi).dataUpdatedAt,n)+1;Ge(this,W_,$_.setTimeout(()=>{le(this,hi).isStale||this.updateResult()},t))},s3=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(le(this,Ln)):this.options.refetchInterval)??!1},i3=function(n){Gt(this,sr,c3).call(this),Ge(this,Su,n),!(le(this,Su)===0||!Gt(this,sr,n3).call(this,le(this,Su)))&&Ge(this,Q_,$_.setInterval(()=>{(this.options.refetchIntervalInBackground||eS.isFocused())&&Gt(this,sr,l0).call(this)},le(this,Su)))},a3=function(){Gt(this,sr,r3).call(this),Gt(this,sr,i3).call(this,Gt(this,sr,s3).call(this))},o3=function(){le(this,W_)!==void 0&&($_.clearTimeout(le(this,W_)),Ge(this,W_,void 0))},c3=function(){le(this,Q_)!==void 0&&($_.clearInterval(le(this,Q_)),Ge(this,Q_,void 0))},l3=function(){const n=le(this,di).getQueryCache().build(le(this,di),this.options);if(n===le(this,Ln))return;const t=le(this,Ln);Ge(this,Ln,n),Ge(this,dm,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},qO);function FV(e,n){return Kr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Kr(n.retryOnMount,e)===!1)}function zE(e,n){return FV(e,n)||e.state.data!==void 0&&u3(e,n,n.refetchOnMount)}function u3(e,n,t){if(Kr(n.enabled,e)!==!1&&Kr(n.staleTime,e)!=="static"){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&tS(e,n)}return!1}function jE(e,n,t,r){return(e!==n||Kr(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&tS(e,t)}function tS(e,n){return Kr(n.enabled,e)!==!1&&e.isStaleByTime(Kr(n.staleTime,e))}var HV=class extends Rb{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",h=s&&c==="forward",f=a&&c==="backward",p=s&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:$V(n,t.data),hasPreviousPage:BV(n,t.data),isFetchNextPageError:u,isFetchingNextPage:h,isFetchPreviousPageError:f,isFetchingPreviousPage:p,isRefetchError:o&&!u&&!f,isRefetching:i&&!h&&!p}}},pm,Yo,Ys,X_,Zo,mu,UO,qV=(UO=class extends nD{constructor(n){super();lt(this,Zo);lt(this,pm);lt(this,Yo);lt(this,Ys);lt(this,X_);Ge(this,pm,n.client),this.mutationId=n.mutationId,Ge(this,Ys,n.mutationCache),Ge(this,Yo,[]),this.state=n.state||iD(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){le(this,Yo).includes(n)||(le(this,Yo).push(n),this.clearGcTimeout(),le(this,Ys).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ge(this,Yo,le(this,Yo).filter(t=>t!==n)),this.scheduleGc(),le(this,Ys).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){le(this,Yo).length||(this.state.status==="pending"?this.scheduleGc():le(this,Ys).remove(this))}continue(){var n;return((n=le(this,X_))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,c,u,h,f,p,m,w,k,v,b,y,x,C,N,j,A,z;const t=()=>{Gt(this,Zo,mu).call(this,{type:"continue"})},r={client:le(this,pm),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,X_,tD({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,D)=>{Gt(this,Zo,mu).call(this,{type:"failed",failureCount:M,error:D})},onPause:()=>{Gt(this,Zo,mu).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>le(this,Ys).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{Gt(this,Zo,mu).call(this,{type:"pending",variables:n,isPaused:a}),le(this,Ys).config.onMutate&&await le(this,Ys).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&&Gt(this,Zo,mu).call(this,{type:"pending",context:D,variables:n,isPaused:a})}const M=await s.start();return await((h=(u=le(this,Ys).config).onSuccess)==null?void 0:h.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=le(this,Ys).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)),Gt(this,Zo,mu).call(this,{type:"success",data:M}),M}catch(M){try{await((y=(b=le(this,Ys).config).onError)==null?void 0:y.call(b,M,n,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(x=this.options).onError)==null?void 0:C.call(x,M,n,this.state.context,r))}catch(D){Promise.reject(D)}try{await((j=(N=le(this,Ys).config).onSettled)==null?void 0:j.call(N,void 0,M,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((z=(A=this.options).onSettled)==null?void 0:z.call(A,void 0,M,n,this.state.context,r))}catch(D){Promise.reject(D)}throw Gt(this,Zo,mu).call(this,{type:"error",error:M}),M}finally{le(this,X_)===s&&Ge(this,X_,void 0),le(this,Ys).runNext(this)}}},pm=new WeakMap,Yo=new WeakMap,Ys=new WeakMap,X_=new WeakMap,Zo=new WeakSet,mu=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),Ir.batch(()=>{le(this,Yo).forEach(r=>{r.onMutationUpdate(n)}),le(this,Ys).notify({mutation:this,type:"updated",action:n})})},UO);function iD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var al,io,mm,GO,UV=(GO=class extends zf{constructor(n={}){super();lt(this,al);lt(this,io);lt(this,mm);this.config=n,Ge(this,al,new Set),Ge(this,io,new Map),Ge(this,mm,0)}build(n,t,r){const s=new qV({client:n,mutationCache:this,mutationId:++Hp(this,mm)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){le(this,al).add(n);const t=Zg(n);if(typeof t=="string"){const r=le(this,io).get(t);r?r.push(n):le(this,io).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(le(this,al).delete(n)){const t=Zg(n);if(typeof t=="string"){const r=le(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&&le(this,io).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=Zg(n);if(typeof t=="string"){const s=(r=le(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=Zg(n);return typeof t=="string"?((s=(r=le(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(){Ir.batch(()=>{le(this,al).forEach(n=>{this.notify({type:"removed",mutation:n})}),le(this,al).clear(),le(this,io).clear()})}getAll(){return Array.from(le(this,al))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>kE(t,r))}findAll(n={}){return this.getAll().filter(t=>kE(n,t))}notify(n){Ir.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Ir.batch(()=>Promise.all(n.map(t=>t.continue().catch(ei))))}},al=new WeakMap,io=new WeakMap,mm=new WeakMap,GO);function Zg(e){var n;return(n=e.options.scope)==null?void 0:n.id}var ol,Cu,Zs,cl,sc,u0,_3,KO,GV=(KO=class extends zf{constructor(t,r){super();lt(this,sc);lt(this,ol);lt(this,Cu);lt(this,Zs);lt(this,cl);Ge(this,ol,t),this.setOptions(r),this.bindMethods(),Gt(this,sc,u0).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=le(this,ol).defaultMutationOptions(t),p0(this.options,r)||le(this,ol).getMutationCache().notify({type:"observerOptionsUpdated",mutation:le(this,Zs),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&lf(r.mutationKey)!==lf(this.options.mutationKey)?this.reset():((s=le(this,Zs))==null?void 0:s.state.status)==="pending"&&le(this,Zs).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&le(this,Zs)&&(le(this,Zs).addObserver(this),Gt(this,sc,u0).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=le(this,Zs))==null||t.removeObserver(this)}onMutationUpdate(t){Gt(this,sc,u0).call(this),Gt(this,sc,_3).call(this,t)}getCurrentResult(){return le(this,Cu)}reset(){var t;(t=le(this,Zs))==null||t.removeObserver(this),Ge(this,Zs,void 0),Gt(this,sc,u0).call(this),Gt(this,sc,_3).call(this)}mutate(t,r){var s;return Ge(this,cl,r),(s=le(this,Zs))==null||s.removeObserver(this),Ge(this,Zs,le(this,ol).getMutationCache().build(le(this,ol),this.options)),le(this,Zs).addObserver(this),le(this,Zs).execute(t)}},ol=new WeakMap,Cu=new WeakMap,Zs=new WeakMap,cl=new WeakMap,sc=new WeakSet,u0=function(){var r;const t=((r=le(this,Zs))==null?void 0:r.state)??iD();Ge(this,Cu,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},_3=function(t){Ir.batch(()=>{var r,s,i,a,o,c,u,h;if(le(this,cl)&&this.hasListeners()){const f=le(this,Cu).variables,p=le(this,Cu).context,m={client:le(this,ol),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=le(this,cl)).onSuccess)==null||s.call(r,t.data,f,p,m)}catch(w){Promise.reject(w)}try{(a=(i=le(this,cl)).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=le(this,cl)).onError)==null||c.call(o,t.error,f,p,m)}catch(w){Promise.reject(w)}try{(h=(u=le(this,cl)).onSettled)==null||h.call(u,void 0,t.error,f,p,m)}catch(w){Promise.reject(w)}}}this.listeners.forEach(f=>{f(le(this,Cu))})})},KO);function AE(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var ph,pi,mh,Y_,ua,Z_,gm,vm,bm,ym,js,f3,d3,aD,h3,p3,m3,VO,KV=(VO=class extends zf{constructor(n,t,r){super();lt(this,js);lt(this,ph);lt(this,pi);lt(this,mh);lt(this,Y_);lt(this,ua);lt(this,Z_);lt(this,gm);lt(this,vm);lt(this,bm);lt(this,ym,[]);Ge(this,ph,n),Ge(this,Y_,r),Ge(this,mh,[]),Ge(this,ua,[]),Ge(this,pi,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&le(this,ua).forEach(n=>{n.subscribe(t=>{Gt(this,js,p3).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,le(this,ua).forEach(n=>{n.destroy()})}setQueries(n,t){Ge(this,mh,n),Ge(this,Y_,t),Ir.batch(()=>{const r=le(this,ua),s=Gt(this,js,h3).call(this,le(this,mh));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,h=u?!0:a.some((f,p)=>{const m=le(this,pi)[p];return!m||!p0(f,m)});!u&&!h||(u&&(Ge(this,ym,s),Ge(this,ua,i)),Ge(this,pi,a),this.hasListeners()&&(u&&(AE(r,i).forEach(f=>{f.destroy()}),AE(i,r).forEach(f=>{f.subscribe(p=>{Gt(this,js,p3).call(this,f,p)})})),Gt(this,js,m3).call(this)))})}getCurrentResult(){return le(this,pi)}getQueries(){return le(this,ua).map(n=>n.getCurrentQuery())}getObservers(){return le(this,ua)}getOptimisticResult(n,t){const r=Gt(this,js,h3).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Gt(this,js,d3).call(this,a??s,t,i),()=>Gt(this,js,f3).call(this,s,r)]}},ph=new WeakMap,pi=new WeakMap,mh=new WeakMap,Y_=new WeakMap,ua=new WeakMap,Z_=new WeakMap,gm=new WeakMap,vm=new WeakMap,bm=new WeakMap,ym=new WeakMap,js=new WeakSet,f3=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)}))})})},d3=function(n,t,r){if(t){const s=le(this,bm),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(le(this,pi)!==le(this,vm)||i||t!==le(this,gm))&&(Ge(this,gm,t),Ge(this,vm,le(this,pi)),r!==void 0&&Ge(this,bm,r),Ge(this,Z_,Xk(le(this,Z_),t(n)))),le(this,Z_)}return n},aD=function(){var n;return!((n=le(this,Y_))!=null&&n.combine)||le(this,ua).some((t,r)=>{var s;return t.options.suspense&&((s=le(this,pi)[r])==null?void 0:s.data)===void 0})},h3=function(n){const t=new Map;le(this,ua).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=le(this,ph).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new Rb(le(this,ph),i);r.push({defaultedQueryOptions:i,observer:a})}),r},p3=function(n,t){const r=le(this,ua).indexOf(n);r!==-1&&(Ge(this,pi,le(this,pi).slice()),le(this,pi)[r]=t,Gt(this,js,m3).call(this))},m3=function(){var n;if(this.hasListeners()){const t=Gt(this,js,aD).call(this),r=le(this,Z_),s=t?r:Gt(this,js,d3).call(this,Gt(this,js,f3).call(this,le(this,pi),le(this,ym)),(n=le(this,Y_))==null?void 0:n.combine);(t||r!==s)&&Ir.batch(()=>{this.listeners.forEach(i=>{i(le(this,pi))})})}},VO),Jo,WO,VV=(WO=class extends zf{constructor(n={}){super();lt(this,Jo);this.config=n,Ge(this,Jo,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??Qk(s,t);let a=this.get(i);return a||(a=new PV({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(a)),a}add(n){le(this,Jo).has(n.queryHash)||(le(this,Jo).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=le(this,Jo).get(n.queryHash);t&&(n.destroy(),t===n&&le(this,Jo).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Ir.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return le(this,Jo).get(n)}getAll(){return[...le(this,Jo).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>wE(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>wE(n,r)):t}notify(n){Ir.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Ir.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Ir.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Jo=new WeakMap,WO),Dr,Eu,Nu,gh,vh,zu,bh,yh,QO,WV=(QO=class{constructor(e={}){lt(this,Dr);lt(this,Eu);lt(this,Nu);lt(this,gh);lt(this,vh);lt(this,zu);lt(this,bh);lt(this,yh);Ge(this,Dr,e.queryCache||new VV),Ge(this,Eu,e.mutationCache||new UV),Ge(this,Nu,e.defaultOptions||{}),Ge(this,gh,new Map),Ge(this,vh,new Map),Ge(this,zu,0)}mount(){Hp(this,zu)._++,le(this,zu)===1&&(Ge(this,bh,eS.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Dr).onFocus())})),Ge(this,yh,wv.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Dr).onOnline())})))}unmount(){var e,n;Hp(this,zu)._--,le(this,zu)===0&&((e=le(this,bh))==null||e.call(this),Ge(this,bh,void 0),(n=le(this,yh))==null||n.call(this),Ge(this,yh,void 0))}isFetching(e){return le(this,Dr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return le(this,Eu).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=le(this,Dr).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=le(this,Dr).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Kr(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return le(this,Dr).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var a;const r=this.defaultQueryOptions({queryKey:e}),s=(a=le(this,Dr).get(r.queryHash))==null?void 0:a.state.data,i=SV(n,s);if(i!==void 0)return le(this,Dr).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return Ir.batch(()=>le(this,Dr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=le(this,Dr).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=le(this,Dr);Ir.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=le(this,Dr);return Ir.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=Ir.batch(()=>le(this,Dr).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(ei).catch(ei)}invalidateQueries(e,n={}){return Ir.batch(()=>(le(this,Dr).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=Ir.batch(()=>le(this,Dr).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(ei)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(ei)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=le(this,Dr).build(this,n),r=t.isStaleByTime(Kr(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=le(this,Dr).build(this,n);return t.isStaleByTime(Kr(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ei).catch(ei)}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(ei).catch(ei)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return wv.isOnline()?le(this,Eu).resumePausedMutations():Promise.resolve()}getQueryCache(){return le(this,Dr)}getMutationCache(){return le(this,Eu)}getDefaultOptions(){return le(this,Nu)}setDefaultOptions(e){Ge(this,Nu,e)}setQueryDefaults(e,n){le(this,gh).set(lf(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...le(this,gh).values()],t={};return n.forEach(r=>{Sh(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){le(this,vh).set(lf(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...le(this,vh).values()],t={};return n.forEach(r=>{Sh(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...le(this,Nu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Qk(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===Yk&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...le(this,Nu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){le(this,Dr).clear(),le(this,Eu).clear()}},Dr=new WeakMap,Eu=new WeakMap,Nu=new WeakMap,gh=new WeakMap,vh=new WeakMap,zu=new WeakMap,bh=new WeakMap,yh=new WeakMap,QO);const oD=T.createContext(!1),cD=()=>T.useContext(oD);oD.Provider;function QV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const XV=T.createContext(QV()),lD=()=>T.useContext(XV),uD=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?Zk(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},_D=e=>{T.useEffect(()=>{e.clearReset()},[e])},fD=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Zk(t,[e.error,r])),dD=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))}},g3=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,hD=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function YV({queries:e,...n},t){const r=zm(),s=cD(),i=lD(),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=>{dD(k);const v=r.getQueryCache().get(k.queryHash);uD(k,i,v)}),_D(i);const[c]=T.useState(()=>new KV(r,o,n)),[u,h,f]=c.getOptimisticResult(o,n.combine),p=!s&&a;T.useSyncExternalStore(T.useCallback(k=>p?c.subscribe(Ir.batchCalls(k)):ei,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setQueries(o,n)},[o,n,c]);const m=u.some((k,v)=>g3(o[v],k))?u.flatMap((k,v)=>{const b=o[v];if(b&&g3(b,k)){const y=new Rb(r,b);return hD(b,y,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const w=u.find((k,v)=>{const b=o[v];return b&&fD({result:k,errorResetBoundary:i,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(w)throw w.error;return h(f())}function pD(e,n,t){const r=cD(),s=lD(),i=zm(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,dD(a),uD(a,s,o),_D(s);const[u]=T.useState(()=>new n(i,a)),h=u.getOptimisticResult(a),f=!r&&c;if(T.useSyncExternalStore(T.useCallback(p=>{const m=f?u.subscribe(Ir.batchCalls(p)):ei;return u.updateResult(),m},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),T.useEffect(()=>{u.setOptions(a)},[a,u]),g3(a,h))throw hD(a,u,s);if(fD({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return a.notifyOnChangeProps?h:u.trackResult(h)}function ut(e,n){return pD(e,Rb)}function ZV(e,n){const t=zm(),r=t.getQueryCache();return T.useSyncExternalStore(T.useCallback(s=>r.subscribe(Ir.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function pn(e,n){const t=zm(),[r]=T.useState(()=>new GV(t,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const s=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Ir.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=T.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(ei)},[r]);if(s.error&&Zk(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}function JV(e,n){return pD(e,HV)}const tt=new WV({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),bl=new Set;let TE=null,Mb=0;const v3=new Set,eW=()=>Mb,RE=e=>(v3.add(e),()=>{v3.delete(e)}),yi=()=>["workspace",Mb],kt=(e,...n)=>[...yi(),e,...n];function tW(e,n=!1){if(TE===e&&!n)return!1;const t=yi();return TE=e,Mb++,bl.clear(),nS({queryKey:t}),v3.forEach(r=>r()),!0}const zn=e=>e[1]===Mb;async function nS(e){await tt.cancelQueries(e,{revert:!1}),tt.removeQueries(e)}function Vr(e,n){if(zn(e))return tt.setQueryData(e,n)}var X2={exports:{}},Up={},Y2={exports:{}},Z2={};/** * @license React * scheduler.production.js * @@ -23,7 +23,7 @@ var tK=Object.defineProperty;var rE=e=>{throw TypeError(e)};var nK=(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 yE;function FK(){return yE||(yE=1,(function(e){function n(K,Z){var J=K.length;K.push(Z);e:for(;0>>1,L=K[$];if(0>>1;$s(H,J))aes(ie,H)?(K[$]=ie,K[ae]=J,$=ae):(K[$]=H,K[U]=J,$=U);else if(aes(ie,J))K[$]=ie,K[ae]=J,$=ae;else break e}}return Z}function s(K,Z){var J=K.sortIndex-Z.sortIndex;return J!==0?J: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=[],h=1,f=null,p=3,m=!1,w=!1,k=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=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,j||(j=!0,B());else{var Z=t(u);Z!==null&&Q(N,Z.startTime-K)}}var j=!1,A=-1,z=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 L=$(f.expirationTime<=K);if(K=e.unstable_now(),typeof L=="function"){f.callback=L,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=J,m=!1}Z=void 0}}finally{Z?B():j=!1}}}var B;if(typeof x=="function")B=function(){x(I)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,q=G.port2;G.port1.onmessage=I,B=function(){q.postMessage(null)}}else B=function(){b(I,0)};function Q(K,Z){A=b(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=J,n(u,K),t(c)===null&&K===t(u)&&(k?(y(A),A=-1):k=!0,Q(N,J-$))):(K.sortIndex=L,n(c,K),w||m||(w=!0,j||(j=!0,B()))),K},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(K){var Z=p;return function(){var J=p;p=Z;try{return K.apply(this,arguments)}finally{p=J}}}})(W2)),W2}var xE;function HK(){return xE||(xE=1,K2.exports=FK()),K2.exports}var Q2={exports:{}},Zs={};/** + */var ME;function nW(){return ME||(ME=1,(function(e){function n(V,Z){var J=V.length;V.push(Z);e:for(;0>>1,L=V[$];if(0>>1;$s(F,J))res(ie,F)?(V[$]=ie,V[re]=J,$=re):(V[$]=F,V[P]=J,$=P);else if(res(ie,J))V[$]=ie,V[re]=J,$=re;else break e}}return Z}function s(V,Z){var J=V.sortIndex-Z.sortIndex;return J!==0?J:V.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=[],h=1,f=null,p=3,m=!1,w=!1,k=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function C(V){for(var Z=t(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=V)r(u),Z.sortIndex=Z.expirationTime,n(c,Z);else break;Z=t(u)}}function N(V){if(k=!1,C(V),!w)if(t(c)!==null)w=!0,j||(j=!0,B());else{var Z=t(u);Z!==null&&Q(N,Z.startTime-V)}}var j=!1,A=-1,z=5,M=-1;function D(){return v?!0:!(e.unstable_now()-MV&&D());){var $=f.callback;if(typeof $=="function"){f.callback=null,p=f.priorityLevel;var L=$(f.expirationTime<=V);if(V=e.unstable_now(),typeof L=="function"){f.callback=L,C(V),Z=!0;break t}f===t(c)&&r(c),C(V)}else r(c);f=t(c)}if(f!==null)Z=!0;else{var q=t(u);q!==null&&Q(N,q.startTime-V),Z=!1}}break e}finally{f=null,p=J,m=!1}Z=void 0}}finally{Z?B():j=!1}}}var B;if(typeof x=="function")B=function(){x(I)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,U=G.port2;G.port1.onmessage=I,B=function(){U.postMessage(null)}}else B=function(){b(I,0)};function Q(V,Z){A=b(function(){V(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(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125$?(V.sortIndex=J,n(u,V),t(c)===null&&V===t(u)&&(k?(y(A),A=-1):k=!0,Q(N,J-$))):(V.sortIndex=L,n(c,V),w||m||(w=!0,j||(j=!0,B()))),V},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(V){var Z=p;return function(){var J=p;p=Z;try{return V.apply(this,arguments)}finally{p=J}}}})(Z2)),Z2}var OE;function rW(){return OE||(OE=1,Y2.exports=nW()),Y2.exports}var J2={exports:{}},Xs={};/** * @license React * react-dom.production.js * @@ -31,7 +31,7 @@ var tK=Object.defineProperty;var rE=e=>{throw TypeError(e)};var nK=(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 wE;function qK(){if(wE)return Zs;wE=1;var e=Nm();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(),Q2.exports=qK(),Q2.exports}/** + */var DE;function sW(){if(DE)return Xs;DE=1;var e=Nm();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(),J2.exports=sW(),J2.exports}/** * @license React * react-dom-client.production.js * @@ -39,15 +39,15 @@ var tK=Object.defineProperty;var rE=e=>{throw TypeError(e)};var nK=(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 SE;function UK(){if(SE)return qp;SE=1;var e=HK(),n=Nm(),t=rD();function r(l){var d="https://react.dev/errors/"+l;if(1L||(l.current=$[L],$[L]=null,L--)}function H(l,d){L++,$[L]=l.current,l.current=d}var ae=F(null),ie=F(null),ue=F(null),re=F(null);function V(l,d){switch(H(ue,d),H(ie,l),H(ae,null),d.nodeType){case 9:case 11:l=(l=d.documentElement)&&(l=l.namespaceURI)?E9(l):0;break;default:if(l=d.tagName,d=d.namespaceURI)d=E9(d),l=N9(d,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}U(ae),H(ae,l)}function oe(){U(ae),U(ie),U(ue)}function ce(l){l.memoizedState!==null&&H(re,l);var d=ae.current,g=N9(d,l.type);d!==g&&(H(ie,l),H(ae,g))}function me(l){ie.current===l&&(U(ae),U(ie)),re.current===l&&(U(re),Ip._currentValue=J)}var ve,Re;function Fe(l){if(ve===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);ve=d&&d[1]||"",Re=-1L||(l.current=$[L],$[L]=null,L--)}function F(l,d){L++,$[L]=l.current,l.current=d}var re=q(null),ie=q(null),ue=q(null),se=q(null);function K(l,d){switch(F(ue,d),F(ie,l),F(re,null),d.nodeType){case 9:case 11:l=(l=d.documentElement)&&(l=l.namespaceURI)?P9(l):0;break;default:if(l=d.tagName,d=d.namespaceURI)d=P9(d),l=F9(d,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}P(re),F(re,l)}function oe(){P(re),P(ie),P(ue)}function ce(l){l.memoizedState!==null&&F(se,l);var d=re.current,g=F9(d,l.type);d!==g&&(F(ie,l),F(re,g))}function pe(l){ie.current===l&&(P(re),P(ie)),se.current===l&&(P(se),$p._currentValue=J)}var ve,Me;function Fe(l){if(ve===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);ve=d&&d[1]||"",Me=-1)":-1R||he[S]!==Ee[R]){var Be=` -`+he[S].replace(" at new "," at ");return l.displayName&&Be.includes("")&&(Be=Be.replace("",l.displayName)),Be}while(1<=S&&0<=R);break}}}finally{Xe=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?Fe(g):""}function $e(l,d){switch(l.tag){case 26:case 27:case 5:return Fe(l.type);case 16:return Fe("Lazy");case 13:return l.child!==d&&d!==null?Fe("Suspense Fallback"):Fe("Suspense");case 19:return Fe("SuspenseList");case 0:case 15:return Te(l.type,!1);case 11:return Te(l.type.render,!1);case 1:return Te(l.type,!0);case 31:return Fe("Activity");default:return""}}function wt(l){try{var d="",g=null;do d+=$e(l,g),g=l,l=l.return;while(l);return d}catch(S){return` +`+ve+l+Me}var Ye=!1;function Te(l,d){if(!l||Ye)return"";Ye=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(d){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(De){var Ae=De}Reflect.construct(l,[],Ue)}else{try{Ue.call()}catch(De){Ae=De}l.call(Ue.prototype)}}else{try{throw Error()}catch(De){Ae=De}(Ue=l())&&typeof Ue.catch=="function"&&Ue.catch(function(){})}}catch(De){if(De&&Ae&&typeof De.stack=="string")return[De.stack,Ae.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],ne=O[1];if(X&&ne){var he=X.split(` +`),Ne=ne.split(` +`);for(R=S=0;SR||he[S]!==Ne[R]){var Be=` +`+he[S].replace(" at new "," at ");return l.displayName&&Be.includes("")&&(Be=Be.replace("",l.displayName)),Be}while(1<=S&&0<=R);break}}}finally{Ye=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?Fe(g):""}function $e(l,d){switch(l.tag){case 26:case 27:case 5:return Fe(l.type);case 16:return Fe("Lazy");case 13:return l.child!==d&&d!==null?Fe("Suspense Fallback"):Fe("Suspense");case 19:return Fe("SuspenseList");case 0:case 15:return Te(l.type,!1);case 11:return Te(l.type.render,!1);case 1:return Te(l.type,!0);case 31:return Fe("Activity");default:return""}}function yt(l){try{var d="",g=null;do d+=$e(l,g),g=l,l=l.return;while(l);return d}catch(S){return` Error generating stack: `+S.message+` -`+S.stack}}var ot=Object.prototype.hasOwnProperty,Mt=e.unstable_scheduleCallback,jt=e.unstable_cancelCallback,Ft=e.unstable_shouldYield,Le=e.unstable_requestPaint,tt=e.unstable_now,ke=e.unstable_getCurrentPriorityLevel,ge=e.unstable_ImmediatePriority,Ne=e.unstable_UserBlockingPriority,qe=e.unstable_NormalPriority,nt=e.unstable_LowPriority,ht=e.unstable_IdlePriority,rt=e.log,qt=e.unstable_setDisableYieldValue,Xt=null,Jt=null;function an(l){if(typeof rt=="function"&&qt(l),Jt&&typeof Jt.setStrictMode=="function")try{Jt.setStrictMode(Xt,l)}catch{}}var At=Math.clz32?Math.clz32:Ot,bn=Math.log,on=Math.LN2;function Ot(l){return l>>>=0,l===0?32:31-(bn(l)/on|0)|0}var hn=256,cn=262144,Sn=4194304;function Vn(l){var d=l&42;if(d!==0)return d;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 hs(l,d,g){var S=l.pendingLanes;if(S===0)return 0;var R=0,O=l.suspendedLanes,X=l.pingedLanes;l=l.warmLanes;var ne=S&134217727;return ne!==0?(S=ne&~O,S!==0?R=Vn(S):(X&=ne,X!==0?R=Vn(X):g||(g=ne&~l,g!==0&&(R=Vn(g))))):(ne=S&~O,ne!==0?R=Vn(ne):X!==0?R=Vn(X):g||(g=S&~l,g!==0&&(R=Vn(g)))),R===0?0:d!==0&&d!==R&&(d&O)===0&&(O=R&-R,g=d&-d,O>=g||O===32&&(g&4194048)!==0)?d:R}function es(l,d){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&d)===0}function bt(l,d){switch(l){case 1:case 2:case 4:case 8:case 64:return d+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 d+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 ln(){var l=Sn;return Sn<<=1,(Sn&62914560)===0&&(Sn=4194304),l}function xn(l){for(var d=[],g=0;31>g;g++)d.push(l);return d}function un(l,d){l.pendingLanes|=d,d!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function ur(l,d,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 ne=l.entanglements,he=l.expirationTimes,Ee=l.hiddenUpdates;for(g=X&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var ut=/[\n"\\]/g;function Pt(l){return l.replace(ut,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function li(l,d,g,S,R,O,X,ne){l.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?l.type=X:l.removeAttribute("type"),d!=null?X==="number"?(d===0&&l.value===""||l.value!=d)&&(l.value=""+or(d)):l.value!==""+or(d)&&(l.value=""+or(d)):X!=="submit"&&X!=="reset"||l.removeAttribute("value"),d!=null?Ei(l,X,or(d)):g!=null?Ei(l,X,or(g)):S!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?l.name=""+or(ne):l.removeAttribute("name")}function Ci(l,d,g,S,R,O,X,ne){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),d!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||d!=null)){Na(l);return}g=g!=null?""+or(g):"",d=d!=null?""+or(d):g,ne||d===l.value||(l.value=d),l.defaultValue=d}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,l.checked=ne?l.checked:!!S,l.defaultChecked=!!S,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(l.name=X),Na(l)}function Ei(l,d,g){d==="number"&&Ws(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function Mr(l,d,g,S){if(l=l.options,d){d={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),r_=!1;if(ss)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){r_=!0}}),window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{r_=!1}var Zi=null,Sc=null,Ns=null;function za(){if(Ns)return Ns;var l,d=Sc,g=d.length,S,R="value"in Zi?Zi.value:Zi.textContent,O=R.length;for(l=0;l=Mo),Aa=" ",Wf=!1;function Dl(l,d){switch(l){case"keyup":return jc.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ll(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Ta=!1;function Qf(l,d){switch(l){case"compositionend":return Ll(d);case"keypress":return d.which!==32?null:(Wf=!0,Aa);case"textInput":return l=d.data,l===Aa&&Wf?null:l;default:return null}}function c_(l,d){if(Ta)return l==="compositionend"||!Ro&&Dl(l,d)?(l=za(),Ns=Sc=Zi=null,Ta=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:g,offset:d-l};l=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=Fl(g)}}function Lo(l,d){return l&&d?l===d?!0:l&&l.nodeType===3?!1:d&&d.nodeType===3?Lo(l,d.parentNode):"contains"in l?l.contains(d):l.compareDocumentPosition?!!(l.compareDocumentPosition(d)&16):!1:!1}function As(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var d=Ws(l.document);d instanceof l.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)l=d.contentWindow;else break;d=Ws(l.document)}return d}function Yr(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d&&(d==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||d==="textarea"||l.contentEditable==="true")}var Jf=ss&&"documentMode"in document&&11>=document.documentMode,te=null,pe=null,ze=null,Oe=!1;function Pe(l,d,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Oe||te==null||te!==Ws(S)||(S=te,"selectionStart"in S&&Yr(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}),ze&&Ti(ze,S)||(ze=S,S=Ig(pe,"onSelect"),0>=X,R-=X,Io=1<<32-At(d)+R|g<mn?(Tn=Et,Et=null):Tn=Et.sibling;var Un=je(we,Et,Se[mn],He);if(Un===null){Et===null&&(Et=Tn);break}l&&Et&&Un.alternate===null&&d(we,Et),be=O(Un,be,mn),qn===null?Ht=Un:qn.sibling=Un,qn=Un,Et=Tn}if(mn===Se.length)return g(we,Et),Mn&&Dc(we,mn),Ht;if(Et===null){for(;mnmn?(Tn=Et,Et=null):Tn=Et.sibling;var uu=je(we,Et,Un.value,He);if(uu===null){Et===null&&(Et=Tn);break}l&&Et&&uu.alternate===null&&d(we,Et),be=O(uu,be,mn),qn===null?Ht=uu:qn.sibling=uu,qn=uu,Et=Tn}if(Un.done)return g(we,Et),Mn&&Dc(we,mn),Ht;if(Et===null){for(;!Un.done;mn++,Un=Se.next())Un=Ue(we,Un.value,He),Un!==null&&(be=O(Un,be,mn),qn===null?Ht=Un:qn.sibling=Un,qn=Un);return Mn&&Dc(we,mn),Ht}for(Et=S(Et);!Un.done;mn++,Un=Se.next())Un=De(Et,we,mn,Un.value,He),Un!==null&&(l&&Un.alternate!==null&&Et.delete(Un.key===null?mn:Un.key),be=O(Un,be,mn),qn===null?Ht=Un:qn.sibling=Un,qn=Un);return l&&Et.forEach(function(eK){return d(we,eK)}),Mn&&Dc(we,mn),Ht}function pr(we,be,Se,He){if(typeof Se=="object"&&Se!==null&&Se.type===k&&Se.key===null&&(Se=Se.props.children),typeof Se=="object"&&Se!==null){switch(Se.$$typeof){case m:e:{for(var Ht=Se.key;be!==null;){if(be.key===Ht){if(Ht=Se.type,Ht===k){if(be.tag===7){g(we,be.sibling),He=R(be,Se.props.children),He.return=we,we=He;break e}}else if(be.elementType===Ht||typeof Ht=="object"&&Ht!==null&&Ht.$$typeof===z&&y_(Ht)===be.type){g(we,be.sibling),He=R(be,Se.props),hp(He,Se),He.return=we,we=He;break e}g(we,be);break}else d(we,be);be=be.sibling}Se.type===k?(He=p_(Se.props.children,we.mode,He,Se.key),He.return=we,we=He):(He=eg(Se.type,Se.key,Se.props,null,we.mode,He),hp(He,Se),He.return=we,we=He)}return X(we);case w:e:{for(Ht=Se.key;be!==null;){if(be.key===Ht)if(be.tag===4&&be.stateNode.containerInfo===Se.containerInfo&&be.stateNode.implementation===Se.implementation){g(we,be.sibling),He=R(be,Se.children||[]),He.return=we,we=He;break e}else{g(we,be);break}else d(we,be);be=be.sibling}He=ox(Se,we.mode,He),He.return=we,we=He}return X(we);case z:return Se=y_(Se),pr(we,be,Se,He)}if(Q(Se))return kt(we,be,Se,He);if(B(Se)){if(Ht=B(Se),typeof Ht!="function")throw Error(r(150));return Se=Ht.call(Se),Vt(we,be,Se,He)}if(typeof Se.then=="function")return pr(we,be,og(Se),He);if(Se.$$typeof===x)return pr(we,be,rg(we,Se),He);cg(we,Se)}return typeof Se=="string"&&Se!==""||typeof Se=="number"||typeof Se=="bigint"?(Se=""+Se,be!==null&&be.tag===6?(g(we,be.sibling),He=R(be,Se),He.return=we,we=He):(g(we,be),He=ax(Se,we.mode,He),He.return=we,we=He),X(we)):g(we,be)}return function(we,be,Se,He){try{dp=0;var Ht=pr(we,be,Se,He);return od=null,Ht}catch(Et){if(Et===ad||Et===ig)throw Et;var qn=Yn(29,Et,null,we.mode);return qn.lanes=He,qn.return=we,qn}finally{}}}var w_=g7(!0),v7=g7(!1),Kl=!1;function bx(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function yx(l,d){l=l.updateQueue,d.updateQueue===l&&(d.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Wl(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Ql(l,d,g){var S=l.updateQueue;if(S===null)return null;if(S=S.shared,(Zn&2)!==0){var R=S.pending;return R===null?d.next=d:(d.next=R.next,R.next=d),S.pending=d,d=wn(l),Oc(l,null,g),d}return bs(l,S,d,g),wn(l)}function pp(l,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,Kn(l,g)}}function xx(l,d){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=d:O=O.next=d}else R=O=d;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=d:l.next=d,g.lastBaseUpdate=d}var wx=!1;function mp(){if(wx){var l=id;if(l!==null)throw l}}function gp(l,d,g,S){wx=!1;var R=l.updateQueue;Kl=!1;var O=R.firstBaseUpdate,X=R.lastBaseUpdate,ne=R.shared.pending;if(ne!==null){R.shared.pending=null;var he=ne,Ee=he.next;he.next=null,X===null?O=Ee:X.next=Ee,X=he;var Be=l.alternate;Be!==null&&(Be=Be.updateQueue,ne=Be.lastBaseUpdate,ne!==X&&(ne===null?Be.firstBaseUpdate=Ee:ne.next=Ee,Be.lastBaseUpdate=he))}if(O!==null){var Ue=R.baseState;X=0,Be=Ee=he=null,ne=O;do{var je=ne.lane&-536870913,De=je!==ne.lane;if(De?(An&je)===je:(S&je)===je){je!==0&&je===sd&&(wx=!0),Be!==null&&(Be=Be.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var kt=l,Vt=ne;je=d;var pr=g;switch(Vt.tag){case 1:if(kt=Vt.payload,typeof kt=="function"){Ue=kt.call(pr,Ue,je);break e}Ue=kt;break e;case 3:kt.flags=kt.flags&-65537|128;case 0:if(kt=Vt.payload,je=typeof kt=="function"?kt.call(pr,Ue,je):kt,je==null)break e;Ue=f({},Ue,je);break e;case 2:Kl=!0}}je=ne.callback,je!==null&&(l.flags|=64,De&&(l.flags|=8192),De=R.callbacks,De===null?R.callbacks=[je]:De.push(je))}else De={lane:je,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},Be===null?(Ee=Be=De,he=Ue):Be=Be.next=De,X|=je;if(ne=ne.next,ne===null){if(ne=R.shared.pending,ne===null)break;De=ne,ne=De.next,De.next=null,R.lastBaseUpdate=De,R.shared.pending=null}}while(!0);Be===null&&(he=Ue),R.baseState=he,R.firstBaseUpdate=Ee,R.lastBaseUpdate=Be,O===null&&(R.shared.lanes=0),eu|=X,l.lanes=X,l.memoizedState=Ue}}function b7(l,d){if(typeof l!="function")throw Error(r(191,l));l.call(d)}function y7(l,d){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var X=K.T,ne={};K.T=ne,Fx(l,!1,d,g);try{var he=R(),Ee=K.S;if(Ee!==null&&Ee(ne,he),he!==null&&typeof he=="object"&&typeof he.then=="function"){var Be=qG(he,S);yp(l,d,Be,aa(l))}else yp(l,d,S,aa(l))}catch(Ue){yp(l,d,{then:function(){},status:"rejected",reason:Ue},aa())}finally{Z.p=O,X!==null&&ne.types!==null&&(X.types=ne.types),K.T=X}}function QG(){}function Bx(l,d,g,S){if(l.tag!==5)throw Error(r(476));var R=Z7(l).queue;Y7(l,R,d,J,g===null?QG:function(){return J7(l),g(S)})}function Z7(l){var d=l.memoizedState;if(d!==null)return d;d={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bc,lastRenderedState:J},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bc,lastRenderedState:g},next:null},l.memoizedState=d,l=l.alternate,l!==null&&(l.memoizedState=d),d}function J7(l){var d=Z7(l);d.next===null&&(d=l.alternate.memoizedState),yp(l,d.next.queue,{},aa())}function Px(){return Ps(Ip)}function e8(){return Jr().memoizedState}function t8(){return Jr().memoizedState}function XG(l){for(var d=l.return;d!==null;){switch(d.tag){case 24:case 3:var g=aa();l=Wl(g);var S=Ql(d,l,g);S!==null&&(Ii(S,d,g),pp(S,d,g)),d={cache:px()},l.payload=d;return}d=d.return}}function YG(l,d,g){var S=aa();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},vg(l)?r8(d,g):(g=$s(l,d,g,S),g!==null&&(Ii(g,l,S),s8(g,d,S)))}function n8(l,d,g){var S=aa();yp(l,d,g,S)}function yp(l,d,g,S){var R={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(vg(l))r8(d,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=d.lastRenderedReducer,O!==null))try{var X=d.lastRenderedState,ne=O(X,g);if(R.hasEagerState=!0,R.eagerState=ne,Or(ne,X))return bs(l,d,R,0),gr===null&&vs(),!1}catch{}finally{}if(g=$s(l,d,R,S),g!==null)return Ii(g,l,S),s8(g,d,S),!0}return!1}function Fx(l,d,g,S){if(S={lane:2,revertLane:b2(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},vg(l)){if(d)throw Error(r(479))}else d=$s(l,g,S,2),d!==null&&Ii(d,l,2)}function vg(l){var d=l.alternate;return l===dn||d!==null&&d===dn}function r8(l,d){ld=_g=!0;var g=l.pending;g===null?d.next=d:(d.next=g.next,g.next=d),l.pending=d}function s8(l,d,g){if((g&4194048)!==0){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,Kn(l,g)}}var xp={readContext:Ps,use:hg,useCallback:Hr,useContext:Hr,useEffect:Hr,useImperativeHandle:Hr,useLayoutEffect:Hr,useInsertionEffect:Hr,useMemo:Hr,useReducer:Hr,useRef:Hr,useState:Hr,useDebugValue:Hr,useDeferredValue:Hr,useTransition:Hr,useSyncExternalStore:Hr,useId:Hr,useHostTransitionStatus:Hr,useFormState:Hr,useActionState:Hr,useOptimistic:Hr,useMemoCache:Hr,useCacheRefresh:Hr};xp.useEffectEvent=Hr;var i8={readContext:Ps,use:hg,useCallback:function(l,d){return fi().memoizedState=[l,d===void 0?null:d],l},useContext:Ps,useEffect:H7,useImperativeHandle:function(l,d,g){g=g!=null?g.concat([l]):null,mg(4194308,4,V7.bind(null,d,l),g)},useLayoutEffect:function(l,d){return mg(4194308,4,l,d)},useInsertionEffect:function(l,d){mg(4,2,l,d)},useMemo:function(l,d){var g=fi();d=d===void 0?null:d;var S=l();if(k_){an(!0);try{l()}finally{an(!1)}}return g.memoizedState=[S,d],S},useReducer:function(l,d,g){var S=fi();if(g!==void 0){var R=g(d);if(k_){an(!0);try{g(d)}finally{an(!1)}}}else R=d;return S.memoizedState=S.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},S.queue=l,l=l.dispatch=YG.bind(null,dn,l),[S.memoizedState,l]},useRef:function(l){var d=fi();return l={current:l},d.memoizedState=l},useState:function(l){l=Ox(l);var d=l.queue,g=n8.bind(null,dn,d);return d.dispatch=g,[l.memoizedState,g]},useDebugValue:Ix,useDeferredValue:function(l,d){var g=fi();return $x(g,l,d)},useTransition:function(){var l=Ox(!1);return l=Y7.bind(null,dn,l.queue,!0,!1),fi().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,d,g){var S=dn,R=fi();if(Mn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),gr===null)throw Error(r(349));(An&127)!==0||E7(S,d,g)}R.memoizedState=g;var O={value:g,getSnapshot:d};return R.queue=O,H7(z7.bind(null,S,O,l),[l]),S.flags|=2048,_d(9,{destroy:void 0},N7.bind(null,S,O,g,d),null),g},useId:function(){var l=fi(),d=gr.identifierPrefix;if(Mn){var g=$o,S=Io;g=(S&~(1<<32-At(S)-1)).toString(32)+g,d="_"+d+"R_"+g,g=fg++,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]=d,O[Bn]=S;e:for(X=d.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===d)break e;for(;X.sibling===null;){if(X.return===null||X.return===d)break e;X=X.return}X.sibling.return=X.return,X=X.sibling}d.stateNode=O;e:switch(Hs(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&&Fc(d)}}return kr(d),t2(d,d.type,l===null?null:l.memoizedProps,d.pendingProps,g),null;case 6:if(l&&d.stateNode!=null)l.memoizedProps!==S&&Fc(d);else{if(typeof S!="string"&&d.stateNode===null)throw Error(r(166));if(l=ue.current,nd(d)){if(l=d.stateNode,g=d.memoizedProps,S=null,R=Bs,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}l[sr]=d,l=!!(l.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||S9(l.nodeValue,g)),l||Gl(d,!0)}else l=$g(l).createTextNode(S),l[sr]=d,d.stateNode=l}return kr(d),null;case 31:if(g=d.memoizedState,l===null||l.memoizedState!==null){if(S=nd(d),g!==null){if(l===null){if(!S)throw Error(r(318));if(l=d.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[sr]=d}else m_(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;kr(d),l=!1}else g=_x(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return d.flags&256?(ra(d),d):(ra(d),null);if((d.flags&128)!==0)throw Error(r(558))}return kr(d),null;case 13:if(S=d.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=nd(d),S!==null&&S.dehydrated!==null){if(l===null){if(!R)throw Error(r(318));if(R=d.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[sr]=d}else m_(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;kr(d),R=!1}else R=_x(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return d.flags&256?(ra(d),d):(ra(d),null)}return ra(d),(d.flags&128)!==0?(d.lanes=g,d):(g=S!==null,l=l!==null&&l.memoizedState!==null,g&&(S=d.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&&(d.child.flags|=8192),kg(d,d.updateQueue),kr(d),null);case 4:return oe(),l===null&&k2(d.stateNode.containerInfo),kr(d),null;case 10:return Ic(d.type),kr(d),null;case 19:if(U(Zr),S=d.memoizedState,S===null)return kr(d),null;if(R=(d.flags&128)!==0,O=S.rendering,O===null)if(R)kp(S,!1);else{if(qr!==0||l!==null&&(l.flags&128)!==0)for(l=d.child;l!==null;){if(O=ug(l),O!==null){for(d.flags|=128,kp(S,!1),l=O.updateQueue,d.updateQueue=l,kg(d,l),d.subtreeFlags=0,l=g,g=d.child;g!==null;)cp(g,l),g=g.sibling;return H(Zr,Zr.current&1|2),Mn&&Dc(d,S.treeForkCount),d.child}l=l.sibling}S.tail!==null&&tt()>zg&&(d.flags|=128,R=!0,kp(S,!1),d.lanes=4194304)}else{if(!R)if(l=ug(O),l!==null){if(d.flags|=128,R=!0,l=l.updateQueue,d.updateQueue=l,kg(d,l),kp(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!Mn)return kr(d),null}else 2*tt()-S.renderingStartTime>zg&&g!==536870912&&(d.flags|=128,R=!0,kp(S,!1),d.lanes=4194304);S.isBackwards?(O.sibling=d.child,d.child=O):(l=S.last,l!==null?l.sibling=O:d.child=O,S.last=O)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=tt(),l.sibling=null,g=Zr.current,H(Zr,R?g&1|2:g&1),Mn&&Dc(d,S.treeForkCount),l):(kr(d),null);case 22:case 23:return ra(d),Sx(),S=d.memoizedState!==null,l!==null?l.memoizedState!==null!==S&&(d.flags|=8192):S&&(d.flags|=8192),S?(g&536870912)!==0&&(d.flags&128)===0&&(kr(d),d.subtreeFlags&6&&(d.flags|=8192)):kr(d),g=d.updateQueue,g!==null&&kg(d,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==g&&(d.flags|=2048),l!==null&&U(b_),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),Ic(is),kr(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function nV(l,d){switch(lx(d),d.tag){case 1:return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 3:return Ic(is),oe(),l=d.flags,(l&65536)!==0&&(l&128)===0?(d.flags=l&-65537|128,d):null;case 26:case 27:case 5:return me(d),null;case 31:if(d.memoizedState!==null){if(ra(d),d.alternate===null)throw Error(r(340));m_()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 13:if(ra(d),l=d.memoizedState,l!==null&&l.dehydrated!==null){if(d.alternate===null)throw Error(r(340));m_()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 19:return U(Zr),null;case 4:return oe(),null;case 10:return Ic(d.type),null;case 22:case 23:return ra(d),Sx(),l!==null&&U(b_),l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 24:return Ic(is),null;case 25:return null;default:return null}}function j8(l,d){switch(lx(d),d.tag){case 3:Ic(is),oe();break;case 26:case 27:case 5:me(d);break;case 4:oe();break;case 31:d.memoizedState!==null&&ra(d);break;case 13:ra(d);break;case 19:U(Zr);break;case 10:Ic(d.type);break;case 22:case 23:ra(d),Sx(),l!==null&&U(b_);break;case 24:Ic(is)}}function Sp(l,d){try{var g=d.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(ne){lr(d,d.return,ne)}}function Zl(l,d,g){try{var S=d.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,ne=X.destroy;if(ne!==void 0){X.destroy=void 0,R=d;var he=g,Ee=ne;try{Ee()}catch(Be){lr(R,he,Be)}}}S=S.next}while(S!==O)}}catch(Be){lr(d,d.return,Be)}}function A8(l){var d=l.updateQueue;if(d!==null){var g=l.stateNode;try{y7(d,g)}catch(S){lr(l,l.return,S)}}}function T8(l,d,g){g.props=S_(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(S){lr(l,d,S)}}function Cp(l,d){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,d,R)}}function Bo(l,d){var g=l.ref,S=l.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(R){lr(l,d,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,d,R)}else g.current=null}function R8(l){var d=l.type,g=l.memoizedProps,S=l.stateNode;try{e:switch(d){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 n2(l,d,g){try{var S=l.stateNode;SV(S,l.type,g,d),S[Bn]=d}catch(R){lr(l,l.return,R)}}function M8(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&iu(l.type)||l.tag===4}function r2(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||M8(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&&iu(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 s2(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(l),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=_r));else if(S!==4&&(S===27&&iu(l.type)&&(g=l.stateNode,d=null),l=l.child,l!==null))for(s2(l,d,g),l=l.sibling;l!==null;)s2(l,d,g),l=l.sibling}function Sg(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?g.insertBefore(l,d):g.appendChild(l);else if(S!==4&&(S===27&&iu(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(Sg(l,d,g),l=l.sibling;l!==null;)Sg(l,d,g),l=l.sibling}function O8(l){var d=l.stateNode,g=l.memoizedProps;try{for(var S=l.type,R=d.attributes;R.length;)d.removeAttributeNode(R[0]);Hs(d,S,g),d[sr]=l,d[Bn]=g}catch(O){lr(l,l.return,O)}}var Hc=!1,cs=!1,i2=!1,D8=typeof WeakSet=="function"?WeakSet:Set,Ms=null;function rV(l,d){if(l=l.containerInfo,E2=Gg,l=As(l),Yr(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,ne=-1,he=-1,Ee=0,Be=0,Ue=l,je=null;t:for(;;){for(var De;Ue!==g||R!==0&&Ue.nodeType!==3||(ne=X+R),Ue!==O||S!==0&&Ue.nodeType!==3||(he=X+S),Ue.nodeType===3&&(X+=Ue.nodeValue.length),(De=Ue.firstChild)!==null;)je=Ue,Ue=De;for(;;){if(Ue===l)break t;if(je===g&&++Ee===R&&(ne=X),je===O&&++Be===S&&(he=X),(De=Ue.nextSibling)!==null)break;Ue=je,je=Ue.parentNode}Ue=De}g=ne===-1||he===-1?null:{start:ne,end:he}}else g=null}g=g||{start:0,end:0}}else g=null;for(N2={focusedElem:l,selectionRange:g},Gg=!1,Ms=d;Ms!==null;)if(d=Ms,l=d.child,(d.subtreeFlags&1028)!==0&&l!==null)l.return=d,Ms=l;else for(;Ms!==null;){switch(d=Ms,O=d.alternate,l=d.flags,d.tag){case 0:if((l&4)!==0&&(l=d.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),Hs(O,S,g),O[sr]=l,_n(O),S=O;break e;case"link":var X=F9("link","href",R).get(S+(g.href||""));if(X){for(var ne=0;nepr&&(X=pr,pr=Vt,Vt=X);var we=Rc(ne,Vt),be=Rc(ne,pr);if(we&&be&&(De.rangeCount!==1||De.anchorNode!==we.node||De.anchorOffset!==we.offset||De.focusNode!==be.node||De.focusOffset!==be.offset)){var Se=Ue.createRange();Se.setStart(we.node,we.offset),De.removeAllRanges(),Vt>pr?(De.addRange(Se),De.extend(be.node,be.offset)):(Se.setEnd(be.node,be.offset),De.addRange(Se))}}}}for(Ue=[],De=ne;De=De.parentNode;)De.nodeType===1&&Ue.push({element:De,left:De.scrollLeft,top:De.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;neg?32:g,K.T=null,g=f2,f2=null;var O=nu,X=Kc;if(ys=0,md=nu=null,Kc=0,(Zn&6)!==0)throw Error(r(331));var ne=Zn;if(Zn|=4,V8(O.current),q8(O,O.current,X,g),Zn=ne,Tp(0,!1),Jt&&typeof Jt.onPostCommitFiberRoot=="function")try{Jt.onPostCommitFiberRoot(Xt,O)}catch{}return!0}finally{Z.p=R,K.T=S,u9(l,d)}}function f9(l,d,g){d=Ra(g,d),d=Gx(l.stateNode,d,2),l=Ql(l,d,2),l!==null&&(un(l,2),Po(l))}function lr(l,d,g){if(l.tag===3)f9(l,l,g);else for(;d!==null;){if(d.tag===3){f9(d,l,g);break}else if(d.tag===1){var S=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(tu===null||!tu.has(S))){l=Ra(g,l),g=d8(2),S=Ql(d,g,2),S!==null&&(h8(g,S,d,l),un(S,2),Po(S));break}}d=d.return}}function m2(l,d,g){var S=l.pingCache;if(S===null){S=l.pingCache=new aV;var R=new Set;S.set(d,R)}else R=S.get(d),R===void 0&&(R=new Set,S.set(d,R));R.has(g)||(c2=!0,R.add(g),l=_V.bind(null,l,d,g),d.then(l,l))}function _V(l,d,g){var S=l.pingCache;S!==null&&S.delete(d),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,gr===l&&(An&g)===g&&(qr===4||qr===3&&(An&62914560)===An&&300>tt()-Ng?(Zn&2)===0&&gd(l,0):l2|=g,pd===An&&(pd=0)),Po(l)}function d9(l,d){d===0&&(d=ln()),l=Ts(l,d),l!==null&&(un(l,d),Po(l))}function fV(l){var d=l.memoizedState,g=0;d!==null&&(g=d.retryLane),d9(l,g)}function dV(l,d){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(d),d9(l,g)}function hV(l,d){return Mt(l,d)}var Og=null,bd=null,g2=!1,Dg=!1,v2=!1,su=0;function Po(l){l!==bd&&l.next===null&&(bd===null?Og=bd=l:bd=bd.next=l),Dg=!0,g2||(g2=!0,mV())}function Tp(l,d){if(!v2&&Dg){v2=!0;do for(var g=!1,S=Og;S!==null;){if(l!==0){var R=S.pendingLanes;if(R===0)var O=0;else{var X=S.suspendedLanes,ne=S.pingedLanes;O=(1<<31-At(42|l)+1)-1,O&=R&~(X&~ne),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,g9(S,O))}else O=An,O=hs(S,S===gr?O:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(O&3)===0||es(S,O)||(g=!0,g9(S,O));S=S.next}while(g);v2=!1}}function pV(){h9()}function h9(){Dg=g2=!1;var l=0;su!==0&&EV()&&(l=su);for(var d=tt(),g=null,S=Og;S!==null;){var R=S.next,O=p9(S,d);O===0?(S.next=null,g===null?Og=R:g.next=R,R===null&&(bd=g)):(g=S,(l!==0||(O&3)!==0)&&(Dg=!0)),S=R}ys!==0&&ys!==5||Tp(l),su!==0&&(su=0)}function p9(l,d){for(var g=l.suspendedLanes,S=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0ne)break;var Be=he.transferSize,Ue=he.initiatorType;Be&&C9(Ue)&&(he=he.responseEnd,X+=Be*(he"u"?null:document;function I9(l,d,g){var S=yd;if(S&&typeof d=="string"&&d){var R=Pt(d);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),L9.has(R)||(L9.add(R),l={rel:l,crossOrigin:g,href:d},S.querySelector(R)===null&&(d=S.createElement("link"),Hs(d,"link",l),_n(d),S.head.appendChild(d)))}}function DV(l){Wc.D(l),I9("dns-prefetch",l,null)}function LV(l,d){Wc.C(l,d),I9("preconnect",l,d)}function IV(l,d,g){Wc.L(l,d,g);var S=yd;if(S&&l&&d){var R='link[rel="preload"][as="'+Pt(d)+'"]';d==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+Pt(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+Pt(g.imageSizes)+'"]')):R+='[href="'+Pt(l)+'"]';var O=R;switch(d){case"style":O=xd(l);break;case"script":O=wd(l)}$a.has(O)||(l=f({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:l,as:d},g),$a.set(O,l),S.querySelector(R)!==null||d==="style"&&S.querySelector(Dp(O))||d==="script"&&S.querySelector(Lp(O))||(d=S.createElement("link"),Hs(d,"link",l),_n(d),S.head.appendChild(d)))}}function $V(l,d){Wc.m(l,d);var g=yd;if(g&&l){var S=d&&typeof d.as=="string"?d.as:"script",R='link[rel="modulepreload"][as="'+Pt(S)+'"][href="'+Pt(l)+'"]',O=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=wd(l)}if(!$a.has(O)&&(l=f({rel:"modulepreload",href:l},d),$a.set(O,l),g.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(Lp(O)))return}S=g.createElement("link"),Hs(S,"link",l),_n(S),g.head.appendChild(S)}}}function BV(l,d,g){Wc.S(l,d,g);var S=yd;if(S&&l){var R=Rr(S).hoistableStyles,O=xd(l);d=d||"default";var X=R.get(O);if(!X){var ne={loading:0,preload:null};if(X=S.querySelector(Dp(O)))ne.loading=5;else{l=f({rel:"stylesheet",href:l,"data-precedence":d},g),(g=$a.get(O))&&O2(l,g);var he=X=S.createElement("link");_n(he),Hs(he,"link",l),he._p=new Promise(function(Ee,Be){he.onload=Ee,he.onerror=Be}),he.addEventListener("load",function(){ne.loading|=1}),he.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,Pg(X,d,S)}X={type:"stylesheet",instance:X,count:1,state:ne},R.set(O,X)}}}function PV(l,d){Wc.X(l,d);var g=yd;if(g&&l){var S=Rr(g).hoistableScripts,R=wd(l),O=S.get(R);O||(O=g.querySelector(Lp(R)),O||(l=f({src:l,async:!0},d),(d=$a.get(R))&&D2(l,d),O=g.createElement("script"),_n(O),Hs(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function FV(l,d){Wc.M(l,d);var g=yd;if(g&&l){var S=Rr(g).hoistableScripts,R=wd(l),O=S.get(R);O||(O=g.querySelector(Lp(R)),O||(l=f({src:l,async:!0,type:"module"},d),(d=$a.get(R))&&D2(l,d),O=g.createElement("script"),_n(O),Hs(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function $9(l,d,g,S){var R=(R=ue.current)?Bg(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"?(d=xd(g.href),g=Rr(R).hoistableStyles,S=g.get(d),S||(S={type:"style",instance:null,count:0,state:null},g.set(d,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=xd(g.href);var O=Rr(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(Dp(l)))&&!O._p&&(X.instance=O,X.state.loading=5),$a.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},$a.set(l,g),O||HV(R,l,g,X.state))),d&&S===null)throw Error(r(528,""));return X}if(d&&S!==null)throw Error(r(529,""));return null;case"script":return d=g.async,g=g.src,typeof g=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=wd(g),g=Rr(R).hoistableScripts,S=g.get(d),S||(S={type:"script",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function xd(l){return'href="'+Pt(l)+'"'}function Dp(l){return'link[rel="stylesheet"]['+l+"]"}function B9(l){return f({},l,{"data-precedence":l.precedence,precedence:null})}function HV(l,d,g,S){l.querySelector('link[rel="preload"][as="style"]['+d+"]")?S.loading=1:(d=l.createElement("link"),S.preload=d,d.addEventListener("load",function(){return S.loading|=1}),d.addEventListener("error",function(){return S.loading|=2}),Hs(d,"link",g),_n(d),l.head.appendChild(d))}function wd(l){return'[src="'+Pt(l)+'"]'}function Lp(l){return"script[async]"+l}function P9(l,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var S=l.querySelector('style[data-href~="'+Pt(g.href)+'"]');if(S)return d.instance=S,_n(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"),_n(S),Hs(S,"style",R),Pg(S,g.precedence,l),d.instance=S;case"stylesheet":R=xd(g.href);var O=l.querySelector(Dp(R));if(O)return d.state.loading|=4,d.instance=O,_n(O),O;S=B9(g),(R=$a.get(R))&&O2(S,R),O=(l.ownerDocument||l).createElement("link"),_n(O);var X=O;return X._p=new Promise(function(ne,he){X.onload=ne,X.onerror=he}),Hs(O,"link",S),d.state.loading|=4,Pg(O,g.precedence,l),d.instance=O;case"script":return O=wd(g.src),(R=l.querySelector(Lp(O)))?(d.instance=R,_n(R),R):(S=g,(R=$a.get(O))&&(S=f({},g),D2(S,R)),l=l.ownerDocument||l,R=l.createElement("script"),_n(R),Hs(R,"link",S),l.head.appendChild(R),d.instance=R);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(S=d.instance,d.state.loading|=4,Pg(S,g.precedence,l));return d.instance}function Pg(l,d,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 qV(l,d,g){if(g===1||d.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;switch(d.rel){case"stylesheet":return l=d.disabled,typeof d.precedence=="string"&&l==null;default:return!0}case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function q9(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function UV(l,d,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=xd(S.href),O=d.querySelector(Dp(R));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(l.count++,l=Hg.bind(l),d.then(l,l)),g.state.loading|=4,g.instance=O,_n(O);return}O=d.ownerDocument||d,S=B9(S),(R=$a.get(R))&&O2(S,R),O=O.createElement("link"),_n(O);var X=O;X._p=new Promise(function(ne,he){X.onload=ne,X.onerror=he}),Hs(O,"link",S),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=Hg.bind(l),d.addEventListener("load",g),d.addEventListener("error",g))}}var L2=0;function GV(l,d){return l.stylesheets&&l.count===0&&Ug(l,l.stylesheets),0L2?50:800)+d);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function Hg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ug(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var qg=null;function Ug(l,d){l.stylesheets=null,l.unsuspend!==null&&(l.count++,qg=new Map,d.forEach(VV,l),qg=null,Hg.call(l))}function VV(l,d){if(!(d.state.loading&4)){var g=qg.get(l);if(g)var S=g.get(null);else{g=new Map,qg.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(),V2.exports=UK(),V2.exports}var VK=GK();const KK=!1;var sD=T.useLayoutEffect;function WK(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 QK(e){const n=T.useRef(null);return T.useImperativeHandle(e,()=>n.current,[]),n}function j0(e){return e[e.length-1]}function Ch(e,n){return typeof e=="function"?e(n):e}const iD=Object.prototype.hasOwnProperty,XK=Object.prototype.propertyIsEnumerable;function aD(e){for(const n in e)if(iD.call(e,n))return!0;return!1}const YK=()=>Object.create(null),N_=(e,n)=>P_(e,n,YK);function P_(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=zE(e)&&zE(s);if(!i&&!(Sv(e)&&Sv(s)))return s;const a=i?e:EE(e);if(!a)return s;const o=i?s:EE(s);if(!o)return s;const c=a.length,u=o.length,h=i?new Array(u):t();let f=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!NE(t)||!t.hasOwnProperty("isPrototypeOf"))}function NE(e){return Object.prototype.toString.call(e)==="[object Object]"}function zE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Du(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||!Du(e[a],n[a],t)))return!1;return s===i}return!1}const ZK=/[\x00-\x1f\x7f"<>`{}]/g;function JK(e){return e.replace(ZK,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function jE(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 JK(n)}const eW=["http:","https:","mailto:","tel:"];function Cv(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function Up(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+=jE(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+jE(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function tW(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function nW(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 Tu=4,oD=5;function cD(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!I.parse&&I.caseSensitive===z&&I.prefix===j&&I.suffix===A));if(D)y=D;else{const I=rW(N,f,z,j,A);y=I,I.parent=s,I.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(I),B.length===2&&(a==null||a.push(B))}break}}s=y}if(k&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=Kd(f);b.kind=oD,b.parent=s,i++,b.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&f.endsWith("/")){const b=Kd(f);b.kind=Tu,b.parent=s,i++,b.depth=i,s.index=b,s=b}s.parse=k??null,s.priority=((h=p==null?void 0:p.params)==null?void 0:h.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=f)}if(t.children)for(const f of t.children)Rb(e,n,f,c,s,i,a,o)}function lD(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 Kd(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 rW(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 sW(e,n){const t=Kd("/"),r=new Uint16Array(6),s=[];for(const i of e)Rb(!1,r,i,1,t,0,s);for(const i of s)i.sort(lD);n.masksTree=t,n.flatCache=Ev(1e3)}function iW(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=Yk(e,n.masksTree);return n.flatCache.set(e,r),r}function aW(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=Kd("/"),Rb(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),Yk(r,a,t)}function oW(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=Yk(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=_D(i.route)),n.matchCache.set(r,i),i}function cW(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function lW(e,n=!1,t){const r=Kd(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let c=0;Rb(n,s,e,1,r,0,i,u=>{if(t==null||t(u,c),u.id in a&&Xk(),a[u.id]=u,c!==0&&u.path){const h=cW(u.fullPath);(!o[h]||u.fullPath.endsWith("/"))&&(o[h]=u)}c++});for(const u of i)u.sort(lD);return{processedTree:{segmentTree:r,singleCache:Ev(1e3),matchCache:Ev(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function Yk(e,n,t=!1){const r=e.split("/"),s=_W(e,r,n,t);if(!s)return null;const[i]=uD(e,r,s);return{route:s.node.route,rawParams:i}}function uD(e,n,t){var h,f,p,m;const r=uW(t.node);let s=null;const i=Object.create(null);let a=((h=t.extract)==null?void 0:h.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;j--){const A=f.wildcard[j],{prefix:z,suffix:M}=A;if(!(z&&(x||!(A.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(z)))){if(M){if(x)continue;const D=n.slice(p).join("/"),I=D.slice(-M.length);if((A.caseSensitive?I:I.toLowerCase())!==M||D.length-M.length=0;A--){const z=f.optional[A];o.push({node:z,index:p,skipped:j,statics:w,dynamics:k,optionals:v,extract:b,rawParams:y})}if(!x)for(let A=f.optional.length-1;A>=0;A--){const z=f.optional[A],{prefix:M,suffix:D}=z;if(M||D){const I=z.caseSensitive?C:N??(N=C.toLowerCase());if(M&&!I.startsWith(M)||D&&I.indexOf(D,I.length-D.length)=0;j--){const A=f.dynamic[j],{prefix:z,suffix:M}=A;if(z||M){const D=A.caseSensitive?C:N??(N=C.toLowerCase());if(z&&!D.startsWith(z)||M&&D.indexOf(M,D.length-M.length)=0;j--){const A=f.pathless[j];o.push({node:A,index:p,skipped:m,statics:w,dynamics:k,optionals:v,extract:b,rawParams:y})}}if(u)return u;if(r&&c){let h=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===Tu)>(e.node.kind===Tu)||n.node.kind===Tu==(e.node.kind===Tu)&&n.node.depth>e.node.depth))):!0}function X1(e){return Y1(e.filter(n=>n!==void 0).join("/"))}function Y1(e){return e.replace(/\/{2,}/g,"/")}function fD(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function cl(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function dD(e){return cl(fD(e))}function Nv(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function dW(e,n,t){return Nv(e,t)===Nv(n,t)}function hW({base:e,to:n,trailingSlash:t="never",cache:r}){if(n.includes("//")&&(n=Y1(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=Y1(e)),a=e.split("/");a.length>1&&j0(a)==="";)a.pop();const u=n.split("/");for(let h=0,f=u.length;h1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(j0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),c=(s?Y1(o):o)||"/";return i&&r&&r.set(i,c),c}function pW(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 X2(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=>RE(s,t)).join("/"):RE(r,t)}function TE({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 wW(e){const n=e.getAttribute(ME);if(n)return`[${ME}="${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 t1=!1;const Z1="window";function h3(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function OE(e){const n=new Set;for(const t of e){if(t===Z1)continue;const r=h3(t);r&&n.add(r)}return n}function kW(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||xW,i=new Set,a=o=>{const c=vu[o]||(vu[o]={});for(const u of i)u===document?c[Z1]={scrollX,scrollY}:u.isConnected&&(c[wW(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,t1=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{t1||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())),yW()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var k;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,h=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=vu[w];if(v){let b=vu[m];for(const y in v){if(y===Z1){if(h)continue}else{const x=h3(y);if(!x||h&&u&&(p??(p=OE(u)),p.has(x)))continue}b||(b=vu[m]={}),b[y]??(b[y]=v[y])}}}t1=!0;try{const v=o.toLocation.hash,b=o.toLocation.state.__hashScrollIntoViewOptions??!0;let y=!1;if(h){!v&&u&&(p??(p=OE(u)));const x=v&&b&&f,C=r.restoring?vu[m]:void 0;if(C)for(const N in C){const{scrollX:j,scrollY:A}=C[N];if(N===Z1){if(x)continue;scrollTo({top:A,left:j,behavior:c}),y=!0}else{const z=h3(N);z&&(z.scrollLeft=j,z.scrollTop=A,p==null||p.delete(z))}}if(!v){const N={top:0,left:0,behavior:c};if(y||scrollTo(N),p)for(const j of p)j.scrollTo(N)}}!y&&v&&b&&((k=document.getElementById(v))==null||k.scrollIntoView(b))}finally{t1=!1}}))}function SW(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 Y2(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function CW(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]=Y2(s):Array.isArray(i)?i.push(Y2(s)):t[r]=[i,Y2(s)]}return t}const EW=/^(?:\s|["[{\d-]|fa|nu|tr)/,NW=jW(JSON.parse),zW=AW(JSON.stringify,JSON.parse);function jW(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=CW(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function AW(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&&!EW.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=SW(s,r);return i?`?${i}`:""}}const Qd="__root__";function TW(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 hD(e){return e instanceof Response&&!!e.options}function RW(e){return{input:({url:n})=>{for(const t of e)n=p3(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=pD(e[t],n);return n}}}function MW(e){const n=dD(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=X1(["/",n,i.pathname]),i)}}function p3(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 pD(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 OW(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([]),h=r(()=>u.get().map(k=>i.get(k).get())),f=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:h.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:h,byRoute:i,__store:f,getMatchStore:p,setMatches:w};function w(k){const v=u.get(),b=k.map(y=>y.routeId);s(()=>{nW(v,b)||u.set(b);for(const y of v)b.includes(y)||i.get(y).set(()=>{});for(const y of k){const x=p(y.routeId);x.get()!==y&&x.set(y)}})}return m}var Lu="__TSR_index",DE="popstate",LE="beforeunload";function DW(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))??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&h)for(const m of u){const w=zv(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[Lu];o=IE(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[Lu];o=IE(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[Lu]!==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 h,f;const u=((h=e.getBlockers)==null?void 0:h.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 IE(e,n){n||(n={});const t=Zk();return{...n,key:t,__TSR_key:t,[Lu]:e}}function LW(e){var A,z;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=(()=>zv(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((A=n.history.state)!=null&&A.__TSR_key)&&!((z=n.history.state)!=null&&z.key)){const M=Zk();n.history.replaceState({[Lu]:0,key:M,__TSR_key:M},"")}let u=c(),h,f=!1,p=!1,m=!1,w=!1;const k=()=>u;let v;const b=()=>{v&&(j._ignoreSubscribers=!0,(v[2]?n.history.pushState:n.history.replaceState)(v[1],"",v[0]),j._ignoreSubscribers=!1,v=void 0,h=void 0)},y=(M,D,I)=>{const B=o(D),G=!!v;G||(h=u),u=zv(D,I),v=[B,I,(v==null?void 0:v[2])||M],G||queueMicrotask(()=>b())},x=M=>{u=c(),j.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=c(),D=M.state[Lu]-u.state[Lu],I=D===1,B=D===-1,G=!I&&!B||f;f=!1;const q=G?"GO":B?"BACK":"FORWARD",Q=G?{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:q})){p=!0,n.history.go(1),j.notify(Q);return}}}u=c(),j.notify(Q)},N=M=>{if(w){w=!1;return}let D=!1;const I=i();if(typeof document<"u"&&I.length)for(const B of I){const G=B.enableBeforeUnload??!0;if(G===!0){D=!0;break}if(typeof G=="function"&&G()===!0){D=!0;break}}if(D)return M.preventDefault(),M.returnValue=""},j=DW({getLocation:k,getLength:()=>n.history.length,pushState:(M,D)=>y(!0,M,D),replaceState:(M,D)=>y(!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:b,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(LE,N,{capture:!0}),n.removeEventListener(DE,C)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(LE,N,{capture:!0}),n.addEventListener(DE,C),n.history.pushState=function(...M){const D=t.apply(n.history,M);return j._ignoreSubscribers||x("PUSH"),D},n.history.replaceState=function(...M){const D=r.apply(n.history,M);return j._ignoreSubscribers||x("REPLACE"),D},j}function IW(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function zv(e,n){const t=IW(e),r=t.indexOf("#"),s=t.indexOf("?"),i=Zk();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||{[Lu]:0,key:i,__TSR_key:i}}}function Zk(){return(Math.random()+1).toString(36).substring(7)}function $E(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 Mb(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 BE({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function $W(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 BW=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??KK??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=pW(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=LW()),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=Ev(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=OW(this.latestLocation,u),kW(this)}const o=this.options.basepath??"/",c=this.options.rewrite;if(i||s!==o||a!==c){this.basepath=o;const u=[],h=dD(o);h&&h!=="/"&&u.push(MW({basepath:o})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:RW(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=lW(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&sW(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:h,href:f,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const b=this.options.parseSearch(u),y=this.options.stringifySearch(b);return{href:c+y+h,publicHref:c+y+h,pathname:Up(c).path,external:!1,searchStr:y,search:N_(r==null?void 0:r.search,b),hash:Up(h.slice(1)).path,state:P_(r==null?void 0:r.state,p)}}const m=new URL(f,this.origin),w=p3(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:Up(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:v,search:N_(r==null?void 0:r.search,k),hash:Up(w.hash.slice(1)).path,state:P_(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)=>hW({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=oW(cl(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 I=zv(i.href,{});i={...i,to:p3(this.rewrite,new URL(I.pathname,this.origin)).pathname,search:this.options.parseSearch(I.search),hash:I.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],h=o[3],f=this.resolvePathWithBase(c,i.to?`${i.to}`:".");let p=PE(i.params,h);const m=this.routesByPath[cl(f)];let w;if(m)w=this.getRouteBranch(m);else if(f.includes("$"))w=[];else{const[I,B,G]=this.getMatchedRoutes(f);w=I,this.options.notFoundRoute&&(!G||G.path!=="/"&&B["**"])&&(w=[...w,this.options.notFoundRoute])}if(w.length&&aD(p))for(const I of w){const B=((M=I.options.params)==null?void 0:M.stringify)??I.options.stringifyParams;if(B){p===h&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,B(p))}catch{}}}const k=t.leaveParams?f:Up(TE({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 I={};w.forEach(B=>{if(B.options.validateSearch)try{Object.assign(I,J1(B.options.validateSearch,{...I,...v}))}catch{}}),v=I}v=FW(v,i,w,t._includeValidateSearch),v=N_(u,v);const b=this.options.stringifySearch(v),y=i.hash===!0?a.hash:i.hash?Ch(i.hash,a.hash):void 0,x=y?`#${y}`:"";let C=i.state===!0?a.state:i.state?Ch(i.state,a.state):{};i.state&&(C=P_(a.state,C));const N=`${k}${b}${x}`;let j,A,z=!1;if(this.rewrite){const I=new URL(N,this.origin),B=pD(this.rewrite,I);j=I.href.replace(I.origin,""),B.origin!==this.origin?(A=B.href,z=!0):A=B.pathname+B.search+B.hash}else j=tW(N),A=j;return{publicHref:A,href:j,pathname:k,search:v,searchStr:b,state:C,hash:y??"",external:z,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=iW(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:c,...u}=i.route,h=PE(c,a);s.maskedLocation=r({from:t.from,...u,params:h})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=cl(this.latestLocation.href)===cl(s.href)&&Du(BE(s.state),BE(this.latestLocation.state)),o=this._commitPromise;let c;const u=new Promise(h=>{c=h});if(u.resolve=()=>{c(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:h,hashScrollIntoView:f,...p}=s;h&&(p={...h,state:{...h.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 h=!o&&i?i:s;if(Cv(h,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(h):window.location.href=h;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 XW(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(Mb(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,h;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")&&$E(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)(h=this._flights)==null||h.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&&Cv(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[h,f]of r)(!i||i(f))&&(o.push(h),a.push(f));const c=[];for(const[h,f]of s??[])(!i||f.some(i))&&(c.push(h),a.push(...f));for(const h of o)r.delete(h);for(const h of c)s.delete(h);for(const h of a){const f=h._flight;h._flight=void 0,f&&!--f[2]&&(((u=this._flights)==null?void 0:u.get(h.id))===f&&this._flights.delete(h.id),c.push(f[1]))}for(const h of c)h.abort()},this.loadRouteChunk=Xd,this.preloadRoute=t=>YW(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=aW(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!c||t.params&&!Du(c.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Du(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??zW,parseSearch:e.parseSearch??NW,protocolAllowlist:e.protocolAllowlist??eW}),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=_D(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["**"]:cl(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?HW(this.options.notFoundMode,i):void 0,c=new Array(i.length),u=this._committed,h=(w,k)=>{const v=u[k];return(v==null?void 0:v.routeId)===w.id?v:w===this.options.notFoundRoute?u.find(b=>b.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(h)}const u=c.validateSearch;if(r&&u){const h=({search:f,next:p,meta:m})=>{const w=p(f);try{const k=J1(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(h)}}const i=(o,c,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return c;const f=Ch(n.search,c);return u&&(u.explicit=f),f}const h=(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:h,meta:u})};return i(0,e)}function HW(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 Qd}function PE(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,Ch(e,t))}function FE(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 m3(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function qW(e,n){const t=m3(e,"component");let r=m3(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function Xd(e,n,t){const r=()=>n===!1?void 0:n?m3(e,n):qW(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 Jk(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 Af(e,n){return e.routesById[n.routeId]}function T0(e,n,t){return hD(e)?[fa,e]:Eh(e)?(e.routeId||(e.routeId=t),[Ob,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[hl,e]):[sc,e]}function eS(e,n){var r,s;let t=T0(n,!0,e.id);if(t[0]!==hl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=T0(i,!0,e.id)}return t}function p0(e,n,t,r,s){return s[0].signal.aborted?Bu:rS(e,n,t,eS(t,r),s)}async function UW(e,n,t,r,s,i){var h,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 ll(e,m),[p,p0(e,n,w,C,t)]}if(c.aborted)return[p,Bu];const b=m.paramsError??m.searchError;if(b!==void 0)return ll(e,m),[p,p0(e,n,w,b,t)];const y=w.options.beforeLoad;if(!y)continue;const x=m.status;p>=i&&(m.status="pending",(f=t[7])==null||f.call(t));try{R0(e,m,"beforeLoad",t[0]);const C=await jf(y({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,Bu];const N=rS(e,n,w,T0(C,!1,w.id),t);if(N[0]!==sc)return ll(e,m),[p,N];m.context={...m.context,...C}}catch(C){return ll(e,m),[p,p0(e,n,w,C,t)]}finally{m.status=x,R0(e,m,!1,t[0])}}s()}function tS(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 ll(e,n){var r;const t=n._flight;n._flight=void 0,(r=tS(e,n,t))==null||r.abort()}function qi(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=tS(e,a,o);c&&s.push(c)}}for(const a of s)a.abort()}function nS(e){for(const n of e){const t=n._flight;t&&t[2]++}}function R0(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 mD(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 HE(e,n,t,r,s,i,a){const o=a[0],c=o.signal;if(c.aborted)return Bu;if(!s)return[sc,void 0];let u=t._flight;R0(e,t,"loader",o);try{if(!u){const h=new AbortController;u=[Promise.resolve().then(()=>s(mD(e,n,t,r,h,i,!!a[3]))).then(f=>T0(f,!1,r.id),f=>T0(f,!0,r.id)).then(f=>{var p;return f[0]!==sc&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||h.abort()),f[0]===hl&&u[2]?eS(r,f[1]):f}),h,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],rS(e,n,r,await jf(u[0],c),a)}catch(h){if(h!==c||!c.aborted)throw h;return ll(e,t),Bu}finally{R0(e,t,!1,o)}}function qE(e,n,t){n[0]!==fa&&(e.status="success",e.error=void 0,n[0]===sc?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function GW(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&&ll(e,r)}function UE(e,n){return n[0]===hl||n[0]===Ob?{...e,status:n[0]===hl?"error":"notFound",error:n[1],_flight:void 0}:e}function VW(e,n,t,r,s,i,a){var B,G;const o=n[1][t],c=Af(e,o),u=!!i[3],h=e._cache.get(o.id);let f,p=!1,m;try{if(o.status==="success"&&(f=c.options.shouldReload,typeof f=="function"&&(f=f(mD(e,n,o,c,i[0],s,u))),i[0].signal.aborted&&(m=Bu)),!m)if(o.status!=="success")p=!0;else{const q=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>=q&&(i[5]||o.cause==="enter"||i[2].some(Q=>Q.routeId===o.routeId&&Q.id!==o.id)))}}catch(q){o.invalid=!0,ll(e,o),m=p0(e,n,c,q,i)}const w=c.options.loader,k=typeof w=="function",v=k?w:w==null?void 0:w.handler,b=!u||c.options.preload!==!1;let y=b&&w?(B=e._flights)==null?void 0:B.get(o.id):void 0;y===o._flight||m?y=void 0:y&&!p&&!u&&f===void 0?p=!0:p||(y=void 0);const x=!!(w&&p&&o.status==="success"&&!u&&!i[4]&&((k?void 0:w.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&b,N=C&&!x&&(o.status!=="success"||!!w),j=t>=a?i[7]:void 0,A=c.lazyFn&&c._lazy!==!0?j:void 0;if(C&&!w&&(o.invalid=!1,o.updatedAt=Date.now()),y&&y[2]++,N){const q=o._flight;o._flight=y,(G=tS(e,o,q))==null||G.abort(),t>=a&&(o.status="pending"),j==null||j()}C||(o.isFetching=!1);const z=(m?Promise.resolve(m):N?HE(e,n,o,c,v,s,i):Promise.resolve([sc,o.loaderData])).then(q=>(N&&(qE(o,q,u),q[0]===sc&&(w&&!i[0].signal.aborted&&GW(e,o,h),t>=a&&(o.status="pending"))),q)),M=jf(Promise.resolve().then(()=>Xd(c,void 0,A)),i[0].signal).then(()=>{},q=>n[1].some((Q,K)=>K<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,p0(e,n,c,q,i)]).then(q=>z.then(Q=>(N&&!q&&Q[0]===sc&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",j==null||j()),q)));if(r.push([t,z,M]),!x)return z.then(q=>UE(o,q));const D={...o,status:"pending",preload:!1,_flight:y};o.invalid=!1,o.isFetching="loader";const I=HE(e,n,D,c,v,s,i).then(q=>(o.isFetching=!1,qE(D,q,!1),q));return(n[2]??(n[2]=[])).push([t,I,M,D]),I.then(q=>UE(D,q))}async function g3(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=Af(e,n[o]);try{const u=Xd(c,!1);u&&await jf(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 rf(e,n){n[2]&&(qi(e,n[2].map(t=>t[3])),n[2]=void 0)}async function GE(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]>=fa)throw[o,a];!s&&a[0]!==sc&&(s=[o,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=o))return c[1].then(u=>{if(u[0]===fa)throw[c[0],u]})})))}})))}catch(i){return i}return n??s}function rS(e,n,t,r,s,i){for(;r[0]===fa;){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):[fa,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(c){r=i?[hl,c]:eS(t,c),i=!0}}return r}async function gD(e,n,t,r,s,i){const a=n[1];let o=await s,c=!1;const u=a.findIndex(m=>m._notFound),h=m=>m[1][0]===Ob?g3(e,a,m,r.signal):m[0];let f=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=fa)f=0;else if(o){f=o[2]??(o[2]=await h(o));for(const m of t){if(m[0]>=f)break;const w=await m[1];if(w[0]!==sc&&w[0]=f)break;const w=await m[2];if(w){o=w;break}}if(((o==null?void 0:o[1][0])??0)>=fa){const m=o[1];if(m[0]!==fa||m[1].options.reloadDocument||m[2])return rf(e,n),m;c=!0,o=[0,[hl,new Error("Too many redirects")]]}const p=o?o[2]??await h(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],b=()=>{m&&(k._notFound=void 0,w===hl?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)};b(),m||i==null||i();const y=Af(e,k);try{await jf(m?Promise.resolve().then(()=>Xd(y,w===hl?"errorComponent":"notFoundComponent")):Promise.all([Xd(y),Xd(y,"notFoundComponent")]),r.signal)}catch(x){if(x===r.signal&&r.signal.aborted)return rf(e,n),Bu}m?c&&(r.abort(),await Promise.all([...t.map(x=>x[1]),...t.map(x=>x[2]),...(n[2]??[]).map(x=>x[1])]),rf(e,n),qi(e,a),b()):k.status="success"}return n}async function vD(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let c=r;cy._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const y=await g3(e,t,void 0,i,u);t[u]._notFound=void 0,t[y]._notFound=!0,u=y}let h=u<0?t.length:u+1,f=0;for(;f{for(let y=m;y=fa&&(h=0);k()}if(!i.aborted&&!r[3]){const y=[];for(const[x,C]of e._flights??[])C[2]||(e._flights.delete(x),y.push(C[1]));for(const x of y)x.abort()}const b=gD(e,s,p,r[0],GE(p,v,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=GE(s[2],void 0,void 0,b.then(y=>A0(y)?0:Jk(t).length,()=>0))),a=await b}catch(c){if(rf(e,s),c===i&&i.aborted)return Bu;throw c}return A0(a)?a:vD(e,a,i,r[6]===t.length?r[6]:0)}function v3(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(()=>v3(e,n),y);return}s[2]=0}const v=t.map(y=>({...y,_flight:void 0}));v[o].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(y=>(y&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+w),y));return}}function Gp(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 VE(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!Jk(n[3]).some(i=>i.id===t[1]))return;let s;try{await jf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function yD(e,n){e._committed=n,e.stores.setMatches(n)}function KW(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=Jk(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?h.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:h.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,yD(e,t),qi(e,[...i.values(),...s],[...t,...o.values()]),$W(e,s,t,n)}async function n1(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function xD(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 WW(e,n,t,r,s){const i=t.map(c=>({...c}));nS(i);for(const c of r)ll(e,i[c[0]]),i[c[0]]=c[3];const a=[n[2],i];let o;try{o=await gD(e,a,r,n[0],s)}catch(c){throw qi(e,i),c}if(A0(o)){qi(e,i),o[0]===fa&&e._tx===n&&e._committed===t&&await xD(e,n,o);return}if(await vD(e,o,n[0].signal),e._tx!==n||e._committed!==t){qi(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),ll(e,u))}yD(e,i),qi(e,t,i)}async function QW(e,n,t,r,s,i){const a=await bD(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(A0(a)){const f=a[0]===fa&&e._tx===n;if((!f||a[1].options.reloadDocument)&&Gp(e,n),qi(e,n[3]),n[3]=[],!f)return;if(e._tx!==n){Gp(e,n);return}await xD(e,n,a);return}const o=a[1];if(e._tx===n&&await VE(e,n),e._tx!==n){Gp(e,n),qi(e,o),rf(e,a);return}const c=n[2],u=Mb(c,e.stores.resolvedLocation.get()),h=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await VE(e,n),e._tx!==n){Gp(e,n),qi(e,o),rf(e,a);return}const f=()=>{Gp(e,n),KW(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){rf(e,a);return}h!=null&&h.length&&WW(e,n,o,h,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 XW(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](),h=new AbortController,f=e._preflight;if(e._preflight=h,u||c==null||c[1](),f==null||f.abort(),!h.signal.aborted){const N=Mb(i,r);e.emit({type:"onBeforeNavigate",...N}),h.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(h.signal.aborted){await n1(e,t);return}const p=s.href===i.href;let m=h;const w=e.matchRoutes(i,{_controller:h});nS(w);const k=u?c[1](w):void 0;if(k?m=u:u==null||u.abort(),h.signal.aborted){qi(e,w),await n1(e,t);return}e._preflight=void 0;let v;const b=()=>QW(e,x,p,()=>v3(e,x),n==null?void 0:n.sync,k),y=n!=null&&n.sync?new Promise(N=>v=N):Promise.resolve().then(b).then(),x=[m,o,i,w,Date.now(),y];if(e._tx=x,t){for(const N of e.stores.matches.get()){if(e._tx!==x)break;N.isFetching&&R0(e,N,!1)}t[0].abort(),qi(e,t[3],x[3],!0)}if(e._tx!==x){qi(e,x[3]),x[3]=[],v==null||v(),await n1(e,x);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))&&v3(e,x),v==null||v(b()),await y,await n1(e,x)}async function YW(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}),nS(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),c=await bD(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),qi(e,a)),i.abort()}if(!A0(c))return c[1];if(!o||c.length<3)return;t=c[2]}catch(u){Eh(u)||console.error(u);return}}}const ZW="Error preloading route! ☝️";var wD=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=Qd:this.parentRoute||Xk();let s=r?Qd:t==null?void 0:t.path;s&&s!=="/"&&(s=fD(s));const i=(t==null?void 0:t.id)||s;let a=r?Qd:X1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=X1(["/",a]));const o=a==="__root__"?"/":X1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=cl(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=>TW({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.")}},JW=class extends wD{constructor(e){super(e)}},sS=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??eQ,{error:e,reset:this.reset}):this.props.children}};function eQ({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 tQ({children:e,fallback:n=null}){return _.jsx(st.Fragment,{children:kD()?e:n})}function kD(){return st.useSyncExternalStore(nQ,()=>!0,()=>!1)}function nQ(){return()=>{}}var SD=T.createContext(null);function xi(e){return T.useContext(SD)}var Db=T.createContext(void 0),rQ=T.createContext(void 0),Er=(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))(Er||{});function sQ({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,h,f){const p=h.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:h.deps;if(m!==void 0&&m.dep===u){m.version=f,h.depsTail=m;return}const w=u.subsTail;if(w!==void 0&&w.version===f&&w.sub===h)return;const k=h.depsTail=u.subsTail={version:f,dep:u,sub:h,prevDep:p,nextDep:m,prevSub:w,nextSub:void 0};m!==void 0&&(m.prevDep=k),p!==void 0?p.nextDep=k:h.deps=k,w!==void 0?w.nextSub=k:u.subs=k}function s(u,h=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:h.depsTail=p,p!==void 0?p.nextDep=m:h.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 h=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:h,prev:f},h=k);continue}}if((u=h)!==void 0){h=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){h=u.nextSub;continue e}break}while(!0)}function a(u,h){let f,p=0,m=!1;e:do{const w=u.dep,k=w.flags;if(h.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,h=w,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=h.subs,b=v.nextSub!==void 0;if(b?(u=f.value,f=f.prev):u=v,m){if(e(h)){b&&o(v),h=u.sub;continue}m=!1}else h.flags&=-33;h=u.sub;const y=u.nextDep;if(y!==void 0){u=y;continue e}}return m}while(!0)}function o(u){do{const h=u.sub,f=h.flags;(f&48)===32&&(h.flags=f|16,(f&6)===2&&n(h))}while((u=u.nextSub)!==void 0)}function c(u,h){let f=h.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}function iQ(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 b3=[];let ev=0;const{link:KE,unlink:aQ,propagate:oQ,checkDirty:CD,shallowPropagate:WE}=sQ({update(e){return e._update()},notify(e){b3[y3++]=e,e.flags&=~Er.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=Er.Mutable|Er.Dirty,Av(e))}});let r1=0,y3=0,Qo,x3=0;function cQ(e){try{++x3,e()}finally{--x3||ED()}}function Av(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=aQ(t,e)}function ED(){if(!(x3>0)){for(;r1{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=Qo,o=(n==null?void 0:n.compare)??Object.is;if(t)Qo=s,++ev,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=Er.Mutable|Er.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{Qo=a,t&&(s.flags&=~Er.RecursedCheck),Av(s)}}};return t?(s.flags=Er.Mutable|Er.Dirty,s.get=function(){const i=s.flags;if(i&Er.Dirty||i&Er.Pending&&CD(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&WE(a)}}else i&Er.Pending&&(s.flags=i&~Er.Pending);return Qo!==void 0&&KE(s,Qo,ev),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(oQ(a),WE(a),ED())}},s}function lQ(e){const n=()=>{const r=Qo;Qo=t,++ev,t.depsTail=void 0,t.flags=Er.Watching|Er.RecursedCheck;try{return e()}finally{Qo=r,t.flags&=~Er.RecursedCheck,Av(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:Er.Watching|Er.RecursedCheck,notify(){const r=this.flags;r&Er.Dirty||r&Er.Pending&&CD(this.deps,this)?n():this.flags=Er.Watching},stop(){this.flags=Er.None,this.depsTail=void 0,Av(this)}};return n(),t}var Z2={exports:{}},J2={},ew={exports:{}},tw={};/** +`+S.stack}}var ot=Object.prototype.hasOwnProperty,Mt=e.unstable_scheduleCallback,jt=e.unstable_cancelCallback,Pt=e.unstable_shouldYield,Le=e.unstable_requestPaint,nt=e.unstable_now,ke=e.unstable_getCurrentPriorityLevel,me=e.unstable_ImmediatePriority,je=e.unstable_UserBlockingPriority,qe=e.unstable_NormalPriority,rt=e.unstable_LowPriority,dt=e.unstable_IdlePriority,st=e.log,Ut=e.unstable_setDisableYieldValue,Xt=null,en=null;function an(l){if(typeof st=="function"&&Ut(l),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(Xt,l)}catch{}}var At=Math.clz32?Math.clz32:Ot,gn=Math.log,on=Math.LN2;function Ot(l){return l>>>=0,l===0?32:31-(gn(l)/on|0)|0}var dn=256,cn=262144,kn=4194304;function Wn(l){var d=l&42;if(d!==0)return d;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 gs(l,d,g){var S=l.pendingLanes;if(S===0)return 0;var R=0,O=l.suspendedLanes,X=l.pingedLanes;l=l.warmLanes;var ne=S&134217727;return ne!==0?(S=ne&~O,S!==0?R=Wn(S):(X&=ne,X!==0?R=Wn(X):g||(g=ne&~l,g!==0&&(R=Wn(g))))):(ne=S&~O,ne!==0?R=Wn(ne):X!==0?R=Wn(X):g||(g=S&~l,g!==0&&(R=Wn(g)))),R===0?0:d!==0&&d!==R&&(d&O)===0&&(O=R&-R,g=d&-d,O>=g||O===32&&(g&4194048)!==0)?d:R}function ns(l,d){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&d)===0}function gt(l,d){switch(l){case 1:case 2:case 4:case 8:case 64:return d+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 d+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 ln(){var l=kn;return kn<<=1,(kn&62914560)===0&&(kn=4194304),l}function bn(l){for(var d=[],g=0;31>g;g++)d.push(l);return d}function un(l,d){l.pendingLanes|=d,d!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function _r(l,d,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 ne=l.entanglements,he=l.expirationTimes,Ne=l.hiddenUpdates;for(g=X&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var _t=/[\n"\\]/g;function Bt(l){return l.replace(_t,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function oi(l,d,g,S,R,O,X,ne){l.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?l.type=X:l.removeAttribute("type"),d!=null?X==="number"?(d===0&&l.value===""||l.value!=d)&&(l.value=""+cr(d)):l.value!==""+cr(d)&&(l.value=""+cr(d)):X!=="submit"&&X!=="reset"||l.removeAttribute("value"),d!=null?Ei(l,X,cr(d)):g!=null?Ei(l,X,cr(g)):S!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?l.name=""+cr(ne):l.removeAttribute("name")}function Ci(l,d,g,S,R,O,X,ne){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),d!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||d!=null)){za(l);return}g=g!=null?""+cr(g):"",d=d!=null?""+cr(d):g,ne||d===l.value||(l.value=d),l.defaultValue=d}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,l.checked=ne?l.checked:!!S,l.defaultChecked=!!S,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(l.name=X),za(l)}function Ei(l,d,g){d==="number"&&Ks(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function Or(l,d,g,S){if(l=l.options,d){d={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n_=!1;if(as)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){n_=!0}}),window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{n_=!1}var Zi=null,Cc=null,Ts=null;function ja(){if(Ts)return Ts;var l,d=Cc,g=d.length,S,R="value"in Zi?Zi.value:Zi.textContent,O=R.length;for(l=0;l=To),Sr=" ",Wf=!1;function o_(l,d){switch(l){case"keyup":return eo.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tc(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Ro=!1;function Il(l,d){switch(l){case"compositionend":return Tc(d);case"keypress":return d.which!==32?null:(Wf=!0,Sr);case"textInput":return l=d.data,l===Sr&&Wf?null:l;default:return null}}function Qf(l,d){if(Ro)return l==="compositionend"||!Ao&&o_(l,d)?(l=ja(),Ts=Cc=Zi=null,Ro=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:g,offset:d-l};l=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=to(g)}}function Mc(l,d){return l&&d?l===d?!0:l&&l.nodeType===3?!1:d&&d.nodeType===3?Mc(l,d.parentNode):"contains"in l?l.contains(d):l.compareDocumentPosition?!!(l.compareDocumentPosition(d)&16):!1:!1}function Io(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var d=Ks(l.document);d instanceof l.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)l=d.contentWindow;else break;d=Ks(l.document)}return d}function ys(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d&&(d==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||d==="textarea"||l.contentEditable==="true")}var xs=as&&"documentMode"in document&&11>=document.documentMode,te=null,ge=null,Se=null,Oe=!1;function Pe(l,d,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Oe||te==null||te!==Ks(S)||(S=te,"selectionStart"in S&&ys(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}),Se&&ui(Se,S)||(Se=S,S=Ig(ge,"onSelect"),0>=X,R-=X,$o=1<<32-At(d)+R|g<hn?(Rn=Nt,Nt=null):Rn=Nt.sibling;var Vn=Ae(we,Nt,Ee[hn],He);if(Vn===null){Nt===null&&(Nt=Rn);break}l&&Nt&&Vn.alternate===null&&d(we,Nt),be=O(Vn,be,hn),Kn===null?Ft=Vn:Kn.sibling=Vn,Kn=Vn,Nt=Rn}if(hn===Ee.length)return g(we,Nt),Dn&&Lc(we,hn),Ft;if(Nt===null){for(;hnhn?(Rn=Nt,Nt=null):Rn=Nt.sibling;var lu=Ae(we,Nt,Vn.value,He);if(lu===null){Nt===null&&(Nt=Rn);break}l&&Nt&&lu.alternate===null&&d(we,Nt),be=O(lu,be,hn),Kn===null?Ft=lu:Kn.sibling=lu,Kn=lu,Nt=Rn}if(Vn.done)return g(we,Nt),Dn&&Lc(we,hn),Ft;if(Nt===null){for(;!Vn.done;hn++,Vn=Ee.next())Vn=Ue(we,Vn.value,He),Vn!==null&&(be=O(Vn,be,hn),Kn===null?Ft=Vn:Kn.sibling=Vn,Kn=Vn);return Dn&&Lc(we,hn),Ft}for(Nt=S(Nt);!Vn.done;hn++,Vn=Ee.next())Vn=De(Nt,we,hn,Vn.value,He),Vn!==null&&(l&&Vn.alternate!==null&&Nt.delete(Vn.key===null?hn:Vn.key),be=O(Vn,be,hn),Kn===null?Ft=Vn:Kn.sibling=Vn,Kn=Vn);return l&&Nt.forEach(function(dV){return d(we,dV)}),Dn&&Lc(we,hn),Ft}function gr(we,be,Ee,He){if(typeof Ee=="object"&&Ee!==null&&Ee.type===k&&Ee.key===null&&(Ee=Ee.props.children),typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case m:e:{for(var Ft=Ee.key;be!==null;){if(be.key===Ft){if(Ft=Ee.type,Ft===k){if(be.tag===7){g(we,be.sibling),He=R(be,Ee.props.children),He.return=we,we=He;break e}}else if(be.elementType===Ft||typeof Ft=="object"&&Ft!==null&&Ft.$$typeof===z&&b_(Ft)===be.type){g(we,be.sibling),He=R(be,Ee.props),pp(He,Ee),He.return=we,we=He;break e}g(we,be);break}else d(we,be);be=be.sibling}Ee.type===k?(He=h_(Ee.props.children,we.mode,He,Ee.key),He.return=we,we=He):(He=eg(Ee.type,Ee.key,Ee.props,null,we.mode,He),pp(He,Ee),He.return=we,we=He)}return X(we);case w:e:{for(Ft=Ee.key;be!==null;){if(be.key===Ft)if(be.tag===4&&be.stateNode.containerInfo===Ee.containerInfo&&be.stateNode.implementation===Ee.implementation){g(we,be.sibling),He=R(be,Ee.children||[]),He.return=we,we=He;break e}else{g(we,be);break}else d(we,be);be=be.sibling}He=_x(Ee,we.mode,He),He.return=we,we=He}return X(we);case z:return Ee=b_(Ee),gr(we,be,Ee,He)}if(Q(Ee))return xt(we,be,Ee,He);if(B(Ee)){if(Ft=B(Ee),typeof Ft!="function")throw Error(r(150));return Ee=Ft.call(Ee),Vt(we,be,Ee,He)}if(typeof Ee.then=="function")return gr(we,be,og(Ee),He);if(Ee.$$typeof===x)return gr(we,be,rg(we,Ee),He);cg(we,Ee)}return typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint"?(Ee=""+Ee,be!==null&&be.tag===6?(g(we,be.sibling),He=R(be,Ee),He.return=we,we=He):(g(we,be),He=ux(Ee,we.mode,He),He.return=we,we=He),X(we)):g(we,be)}return function(we,be,Ee,He){try{hp=0;var Ft=gr(we,be,Ee,He);return ad=null,Ft}catch(Nt){if(Nt===id||Nt===ig)throw Nt;var Kn=On(29,Nt,null,we.mode);return Kn.lanes=He,Kn.return=we,Kn}finally{}}}var x_=T7(!0),R7=T7(!1),Kl=!1;function kx(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sx(l,d){l=l.updateQueue,d.updateQueue===l&&(d.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Vl(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Wl(l,d,g){var S=l.updateQueue;if(S===null)return null;if(S=S.shared,(tr&2)!==0){var R=S.pending;return R===null?d.next=d:(d.next=R.next,R.next=d),S.pending=d,d=Cn(l),ta(l,null,g),d}return ws(l,S,d,g),Cn(l)}function mp(l,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,Qn(l,g)}}function Cx(l,d){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=d:O=O.next=d}else R=O=d;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=d:l.next=d,g.lastBaseUpdate=d}var Ex=!1;function gp(){if(Ex){var l=sd;if(l!==null)throw l}}function vp(l,d,g,S){Ex=!1;var R=l.updateQueue;Kl=!1;var O=R.firstBaseUpdate,X=R.lastBaseUpdate,ne=R.shared.pending;if(ne!==null){R.shared.pending=null;var he=ne,Ne=he.next;he.next=null,X===null?O=Ne:X.next=Ne,X=he;var Be=l.alternate;Be!==null&&(Be=Be.updateQueue,ne=Be.lastBaseUpdate,ne!==X&&(ne===null?Be.firstBaseUpdate=Ne:ne.next=Ne,Be.lastBaseUpdate=he))}if(O!==null){var Ue=R.baseState;X=0,Be=Ne=he=null,ne=O;do{var Ae=ne.lane&-536870913,De=Ae!==ne.lane;if(De?(Tn&Ae)===Ae:(S&Ae)===Ae){Ae!==0&&Ae===rd&&(Ex=!0),Be!==null&&(Be=Be.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var xt=l,Vt=ne;Ae=d;var gr=g;switch(Vt.tag){case 1:if(xt=Vt.payload,typeof xt=="function"){Ue=xt.call(gr,Ue,Ae);break e}Ue=xt;break e;case 3:xt.flags=xt.flags&-65537|128;case 0:if(xt=Vt.payload,Ae=typeof xt=="function"?xt.call(gr,Ue,Ae):xt,Ae==null)break e;Ue=f({},Ue,Ae);break e;case 2:Kl=!0}}Ae=ne.callback,Ae!==null&&(l.flags|=64,De&&(l.flags|=8192),De=R.callbacks,De===null?R.callbacks=[Ae]:De.push(Ae))}else De={lane:Ae,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},Be===null?(Ne=Be=De,he=Ue):Be=Be.next=De,X|=Ae;if(ne=ne.next,ne===null){if(ne=R.shared.pending,ne===null)break;De=ne,ne=De.next,De.next=null,R.lastBaseUpdate=De,R.shared.pending=null}}while(!0);Be===null&&(he=Ue),R.baseState=he,R.firstBaseUpdate=Ne,R.lastBaseUpdate=Be,O===null&&(R.shared.lanes=0),Jl|=X,l.lanes=X,l.memoizedState=Ue}}function M7(l,d){if(typeof l!="function")throw Error(r(191,l));l.call(d)}function O7(l,d){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var X=V.T,ne={};V.T=ne,Gx(l,!1,d,g);try{var he=R(),Ne=V.S;if(Ne!==null&&Ne(ne,he),he!==null&&typeof he=="object"&&typeof he.then=="function"){var Be=nK(he,S);xp(l,d,Be,oa(l))}else xp(l,d,S,oa(l))}catch(Ue){xp(l,d,{then:function(){},status:"rejected",reason:Ue},oa())}finally{Z.p=O,X!==null&&ne.types!==null&&(X.types=ne.types),V.T=X}}function cK(){}function qx(l,d,g,S){if(l.tag!==5)throw Error(r(476));var R=f8(l).queue;_8(l,R,d,J,g===null?cK:function(){return d8(l),g(S)})}function f8(l){var d=l.memoizedState;if(d!==null)return d;d={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pc,lastRenderedState:J},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pc,lastRenderedState:g},next:null},l.memoizedState=d,l=l.alternate,l!==null&&(l.memoizedState=d),d}function d8(l){var d=f8(l);d.next===null&&(d=l.alternate.memoizedState),xp(l,d.next.queue,{},oa())}function Ux(){return Bs($p)}function h8(){return ts().memoizedState}function p8(){return ts().memoizedState}function lK(l){for(var d=l.return;d!==null;){switch(d.tag){case 24:case 3:var g=oa();l=Vl(g);var S=Wl(d,l,g);S!==null&&(Ii(S,d,g),mp(S,d,g)),d={cache:bx()},l.payload=d;return}d=d.return}}function uK(l,d,g){var S=oa();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},vg(l)?g8(d,g):(g=Rs(l,d,g,S),g!==null&&(Ii(g,l,S),v8(g,d,S)))}function m8(l,d,g){var S=oa();xp(l,d,g,S)}function xp(l,d,g,S){var R={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(vg(l))g8(d,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=d.lastRenderedReducer,O!==null))try{var X=d.lastRenderedState,ne=O(X,g);if(R.hasEagerState=!0,R.eagerState=ne,qn(ne,X))return ws(l,d,R,0),br===null&&Un(),!1}catch{}finally{}if(g=Rs(l,d,R,S),g!==null)return Ii(g,l,S),v8(g,d,S),!0}return!1}function Gx(l,d,g,S){if(S={lane:2,revertLane:k2(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},vg(l)){if(d)throw Error(r(479))}else d=Rs(l,g,S,2),d!==null&&Ii(d,l,2)}function vg(l){var d=l.alternate;return l===fn||d!==null&&d===fn}function g8(l,d){cd=_g=!0;var g=l.pending;g===null?d.next=d:(d.next=g.next,g.next=d),l.pending=d}function v8(l,d,g){if((g&4194048)!==0){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,Qn(l,g)}}var wp={readContext:Bs,use:hg,useCallback:qr,useContext:qr,useEffect:qr,useImperativeHandle:qr,useLayoutEffect:qr,useInsertionEffect:qr,useMemo:qr,useReducer:qr,useRef:qr,useState:qr,useDebugValue:qr,useDeferredValue:qr,useTransition:qr,useSyncExternalStore:qr,useId:qr,useHostTransitionStatus:qr,useFormState:qr,useActionState:qr,useOptimistic:qr,useMemoCache:qr,useCacheRefresh:qr};wp.useEffectEvent=qr;var b8={readContext:Bs,use:hg,useCallback:function(l,d){return _i().memoizedState=[l,d===void 0?null:d],l},useContext:Bs,useEffect:n8,useImperativeHandle:function(l,d,g){g=g!=null?g.concat([l]):null,mg(4194308,4,a8.bind(null,d,l),g)},useLayoutEffect:function(l,d){return mg(4194308,4,l,d)},useInsertionEffect:function(l,d){mg(4,2,l,d)},useMemo:function(l,d){var g=_i();d=d===void 0?null:d;var S=l();if(w_){an(!0);try{l()}finally{an(!1)}}return g.memoizedState=[S,d],S},useReducer:function(l,d,g){var S=_i();if(g!==void 0){var R=g(d);if(w_){an(!0);try{g(d)}finally{an(!1)}}}else R=d;return S.memoizedState=S.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},S.queue=l,l=l.dispatch=uK.bind(null,fn,l),[S.memoizedState,l]},useRef:function(l){var d=_i();return l={current:l},d.memoizedState=l},useState:function(l){l=$x(l);var d=l.queue,g=m8.bind(null,fn,d);return d.dispatch=g,[l.memoizedState,g]},useDebugValue:Fx,useDeferredValue:function(l,d){var g=_i();return Hx(g,l,d)},useTransition:function(){var l=$x(!1);return l=_8.bind(null,fn,l.queue,!0,!1),_i().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,d,g){var S=fn,R=_i();if(Dn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),br===null)throw Error(r(349));(Tn&127)!==0||P7(S,d,g)}R.memoizedState=g;var O={value:g,getSnapshot:d};return R.queue=O,n8(H7.bind(null,S,O,l),[l]),S.flags|=2048,ud(9,{destroy:void 0},F7.bind(null,S,O,g,d),null),g},useId:function(){var l=_i(),d=br.identifierPrefix;if(Dn){var g=Bo,S=$o;g=(S&~(1<<32-At(S)-1)).toString(32)+g,d="_"+d+"R_"+g,g=fg++,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[Xn]=d,O[Yn]=S;e:for(X=d.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===d)break e;for(;X.sibling===null;){if(X.return===null||X.return===d)break e;X=X.return}X.sibling.return=X.return,X=X.sibling}d.stateNode=O;e:switch(Fs(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&&Hc(d)}}return Er(d),i2(d,d.type,l===null?null:l.memoizedProps,d.pendingProps,g),null;case 6:if(l&&d.stateNode!=null)l.memoizedProps!==S&&Hc(d);else{if(typeof S!="string"&&d.stateNode===null)throw Error(r(166));if(l=ue.current,td(d)){if(l=d.stateNode,g=d.memoizedProps,S=null,R=$s,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}l[Xn]=d,l=!!(l.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||$9(l.nodeValue,g)),l||Ul(d,!0)}else l=$g(l).createTextNode(S),l[Xn]=d,d.stateNode=l}return Er(d),null;case 31:if(g=d.memoizedState,l===null||l.memoizedState!==null){if(S=td(d),g!==null){if(l===null){if(!S)throw Error(r(318));if(l=d.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[Xn]=d}else p_(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Er(d),l=!1}else g=px(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return d.flags&256?(sa(d),d):(sa(d),null);if((d.flags&128)!==0)throw Error(r(558))}return Er(d),null;case 13:if(S=d.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=td(d),S!==null&&S.dehydrated!==null){if(l===null){if(!R)throw Error(r(318));if(R=d.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[Xn]=d}else p_(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Er(d),R=!1}else R=px(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return d.flags&256?(sa(d),d):(sa(d),null)}return sa(d),(d.flags&128)!==0?(d.lanes=g,d):(g=S!==null,l=l!==null&&l.memoizedState!==null,g&&(S=d.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&&(d.child.flags|=8192),kg(d,d.updateQueue),Er(d),null);case 4:return oe(),l===null&&N2(d.stateNode.containerInfo),Er(d),null;case 10:return $c(d.type),Er(d),null;case 19:if(P(es),S=d.memoizedState,S===null)return Er(d),null;if(R=(d.flags&128)!==0,O=S.rendering,O===null)if(R)Sp(S,!1);else{if(Ur!==0||l!==null&&(l.flags&128)!==0)for(l=d.child;l!==null;){if(O=ug(l),O!==null){for(d.flags|=128,Sp(S,!1),l=O.updateQueue,d.updateQueue=l,kg(d,l),d.subtreeFlags=0,l=g,g=d.child;g!==null;)lp(g,l),g=g.sibling;return F(es,es.current&1|2),Dn&&Lc(d,S.treeForkCount),d.child}l=l.sibling}S.tail!==null&&nt()>zg&&(d.flags|=128,R=!0,Sp(S,!1),d.lanes=4194304)}else{if(!R)if(l=ug(O),l!==null){if(d.flags|=128,R=!0,l=l.updateQueue,d.updateQueue=l,kg(d,l),Sp(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!Dn)return Er(d),null}else 2*nt()-S.renderingStartTime>zg&&g!==536870912&&(d.flags|=128,R=!0,Sp(S,!1),d.lanes=4194304);S.isBackwards?(O.sibling=d.child,d.child=O):(l=S.last,l!==null?l.sibling=O:d.child=O,S.last=O)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=nt(),l.sibling=null,g=es.current,F(es,R?g&1|2:g&1),Dn&&Lc(d,S.treeForkCount),l):(Er(d),null);case 22:case 23:return sa(d),zx(),S=d.memoizedState!==null,l!==null?l.memoizedState!==null!==S&&(d.flags|=8192):S&&(d.flags|=8192),S?(g&536870912)!==0&&(d.flags&128)===0&&(Er(d),d.subtreeFlags&6&&(d.flags|=8192)):Er(d),g=d.updateQueue,g!==null&&kg(d,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==g&&(d.flags|=2048),l!==null&&P(v_),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),$c(cs),Er(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function pK(l,d){switch(dx(d),d.tag){case 1:return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 3:return $c(cs),oe(),l=d.flags,(l&65536)!==0&&(l&128)===0?(d.flags=l&-65537|128,d):null;case 26:case 27:case 5:return pe(d),null;case 31:if(d.memoizedState!==null){if(sa(d),d.alternate===null)throw Error(r(340));p_()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 13:if(sa(d),l=d.memoizedState,l!==null&&l.dehydrated!==null){if(d.alternate===null)throw Error(r(340));p_()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 19:return P(es),null;case 4:return oe(),null;case 10:return $c(d.type),null;case 22:case 23:return sa(d),zx(),l!==null&&P(v_),l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 24:return $c(cs),null;case 25:return null;default:return null}}function q8(l,d){switch(dx(d),d.tag){case 3:$c(cs),oe();break;case 26:case 27:case 5:pe(d);break;case 4:oe();break;case 31:d.memoizedState!==null&&sa(d);break;case 13:sa(d);break;case 19:P(es);break;case 10:$c(d.type);break;case 22:case 23:sa(d),zx(),l!==null&&P(v_);break;case 24:$c(cs)}}function Cp(l,d){try{var g=d.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(ne){ur(d,d.return,ne)}}function Yl(l,d,g){try{var S=d.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,ne=X.destroy;if(ne!==void 0){X.destroy=void 0,R=d;var he=g,Ne=ne;try{Ne()}catch(Be){ur(R,he,Be)}}}S=S.next}while(S!==O)}}catch(Be){ur(d,d.return,Be)}}function U8(l){var d=l.updateQueue;if(d!==null){var g=l.stateNode;try{O7(d,g)}catch(S){ur(l,l.return,S)}}}function G8(l,d,g){g.props=k_(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(S){ur(l,d,S)}}function Ep(l,d){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,d,R)}}function Po(l,d){var g=l.ref,S=l.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(R){ur(l,d,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,d,R)}else g.current=null}function K8(l){var d=l.type,g=l.memoizedProps,S=l.stateNode;try{e:switch(d){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 a2(l,d,g){try{var S=l.stateNode;IK(S,l.type,g,d),S[Yn]=d}catch(R){ur(l,l.return,R)}}function V8(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&su(l.type)||l.tag===4}function o2(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||V8(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&&su(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 c2(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(l),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=dr));else if(S!==4&&(S===27&&su(l.type)&&(g=l.stateNode,d=null),l=l.child,l!==null))for(c2(l,d,g),l=l.sibling;l!==null;)c2(l,d,g),l=l.sibling}function Sg(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?g.insertBefore(l,d):g.appendChild(l);else if(S!==4&&(S===27&&su(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(Sg(l,d,g),l=l.sibling;l!==null;)Sg(l,d,g),l=l.sibling}function W8(l){var d=l.stateNode,g=l.memoizedProps;try{for(var S=l.type,R=d.attributes;R.length;)d.removeAttributeNode(R[0]);Fs(d,S,g),d[Xn]=l,d[Yn]=g}catch(O){ur(l,l.return,O)}}var qc=!1,_s=!1,l2=!1,Q8=typeof WeakSet=="function"?WeakSet:Set,Ms=null;function mK(l,d){if(l=l.containerInfo,A2=Gg,l=Io(l),ys(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,ne=-1,he=-1,Ne=0,Be=0,Ue=l,Ae=null;t:for(;;){for(var De;Ue!==g||R!==0&&Ue.nodeType!==3||(ne=X+R),Ue!==O||S!==0&&Ue.nodeType!==3||(he=X+S),Ue.nodeType===3&&(X+=Ue.nodeValue.length),(De=Ue.firstChild)!==null;)Ae=Ue,Ue=De;for(;;){if(Ue===l)break t;if(Ae===g&&++Ne===R&&(ne=X),Ae===O&&++Be===S&&(he=X),(De=Ue.nextSibling)!==null)break;Ue=Ae,Ae=Ue.parentNode}Ue=De}g=ne===-1||he===-1?null:{start:ne,end:he}}else g=null}g=g||{start:0,end:0}}else g=null;for(T2={focusedElem:l,selectionRange:g},Gg=!1,Ms=d;Ms!==null;)if(d=Ms,l=d.child,(d.subtreeFlags&1028)!==0&&l!==null)l.return=d,Ms=l;else for(;Ms!==null;){switch(d=Ms,O=d.alternate,l=d.flags,d.tag){case 0:if((l&4)!==0&&(l=d.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),Fs(O,S,g),O[Xn]=l,An(O),S=O;break e;case"link":var X=tE("link","href",R).get(S+(g.href||""));if(X){for(var ne=0;negr&&(X=gr,gr=Vt,Vt=X);var we=Pl(ne,Vt),be=Pl(ne,gr);if(we&&be&&(De.rangeCount!==1||De.anchorNode!==we.node||De.anchorOffset!==we.offset||De.focusNode!==be.node||De.focusOffset!==be.offset)){var Ee=Ue.createRange();Ee.setStart(we.node,we.offset),De.removeAllRanges(),Vt>gr?(De.addRange(Ee),De.extend(be.node,be.offset)):(Ee.setEnd(be.node,be.offset),De.addRange(Ee))}}}}for(Ue=[],De=ne;De=De.parentNode;)De.nodeType===1&&Ue.push({element:De,left:De.scrollLeft,top:De.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;neg?32:g,V.T=null,g=m2,m2=null;var O=tu,X=Wc;if(ks=0,pd=tu=null,Wc=0,(tr&6)!==0)throw Error(r(331));var ne=tr;if(tr|=4,a9(O.current),r9(O,O.current,X,g),tr=ne,Rp(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(Xt,O)}catch{}return!0}finally{Z.p=R,V.T=S,S9(l,d)}}function E9(l,d,g){d=Ra(g,d),d=Qx(l.stateNode,d,2),l=Wl(l,d,2),l!==null&&(un(l,2),Fo(l))}function ur(l,d,g){if(l.tag===3)E9(l,l,g);else for(;d!==null;){if(d.tag===3){E9(d,l,g);break}else if(d.tag===1){var S=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(eu===null||!eu.has(S))){l=Ra(g,l),g=N8(2),S=Wl(d,g,2),S!==null&&(z8(g,S,d,l),un(S,2),Fo(S));break}}d=d.return}}function y2(l,d,g){var S=l.pingCache;if(S===null){S=l.pingCache=new bK;var R=new Set;S.set(d,R)}else R=S.get(d),R===void 0&&(R=new Set,S.set(d,R));R.has(g)||(f2=!0,R.add(g),l=SK.bind(null,l,d,g),d.then(l,l))}function SK(l,d,g){var S=l.pingCache;S!==null&&S.delete(d),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,br===l&&(Tn&g)===g&&(Ur===4||Ur===3&&(Tn&62914560)===Tn&&300>nt()-Ng?(tr&2)===0&&md(l,0):d2|=g,hd===Tn&&(hd=0)),Fo(l)}function N9(l,d){d===0&&(d=ln()),l=Jr(l,d),l!==null&&(un(l,d),Fo(l))}function CK(l){var d=l.memoizedState,g=0;d!==null&&(g=d.retryLane),N9(l,g)}function EK(l,d){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(d),N9(l,g)}function NK(l,d){return Mt(l,d)}var Og=null,vd=null,x2=!1,Dg=!1,w2=!1,ru=0;function Fo(l){l!==vd&&l.next===null&&(vd===null?Og=vd=l:vd=vd.next=l),Dg=!0,x2||(x2=!0,jK())}function Rp(l,d){if(!w2&&Dg){w2=!0;do for(var g=!1,S=Og;S!==null;){if(l!==0){var R=S.pendingLanes;if(R===0)var O=0;else{var X=S.suspendedLanes,ne=S.pingedLanes;O=(1<<31-At(42|l)+1)-1,O&=R&~(X&~ne),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,T9(S,O))}else O=Tn,O=gs(S,S===br?O:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(O&3)===0||ns(S,O)||(g=!0,T9(S,O));S=S.next}while(g);w2=!1}}function zK(){z9()}function z9(){Dg=x2=!1;var l=0;ru!==0&&BK()&&(l=ru);for(var d=nt(),g=null,S=Og;S!==null;){var R=S.next,O=j9(S,d);O===0?(S.next=null,g===null?Og=R:g.next=R,R===null&&(vd=g)):(g=S,(l!==0||(O&3)!==0)&&(Dg=!0)),S=R}ks!==0&&ks!==5||Rp(l),ru!==0&&(ru=0)}function j9(l,d){for(var g=l.suspendedLanes,S=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0ne)break;var Be=he.transferSize,Ue=he.initiatorType;Be&&B9(Ue)&&(he=he.responseEnd,X+=Be*(he"u"?null:document;function Y9(l,d,g){var S=bd;if(S&&typeof d=="string"&&d){var R=Bt(d);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),X9.has(R)||(X9.add(R),l={rel:l,crossOrigin:g,href:d},S.querySelector(R)===null&&(d=S.createElement("link"),Fs(d,"link",l),An(d),S.head.appendChild(d)))}}function WK(l){Qc.D(l),Y9("dns-prefetch",l,null)}function QK(l,d){Qc.C(l,d),Y9("preconnect",l,d)}function XK(l,d,g){Qc.L(l,d,g);var S=bd;if(S&&l&&d){var R='link[rel="preload"][as="'+Bt(d)+'"]';d==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+Bt(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+Bt(g.imageSizes)+'"]')):R+='[href="'+Bt(l)+'"]';var O=R;switch(d){case"style":O=yd(l);break;case"script":O=xd(l)}$a.has(O)||(l=f({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:l,as:d},g),$a.set(O,l),S.querySelector(R)!==null||d==="style"&&S.querySelector(Lp(O))||d==="script"&&S.querySelector(Ip(O))||(d=S.createElement("link"),Fs(d,"link",l),An(d),S.head.appendChild(d)))}}function YK(l,d){Qc.m(l,d);var g=bd;if(g&&l){var S=d&&typeof d.as=="string"?d.as:"script",R='link[rel="modulepreload"][as="'+Bt(S)+'"][href="'+Bt(l)+'"]',O=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=xd(l)}if(!$a.has(O)&&(l=f({rel:"modulepreload",href:l},d),$a.set(O,l),g.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(Ip(O)))return}S=g.createElement("link"),Fs(S,"link",l),An(S),g.head.appendChild(S)}}}function ZK(l,d,g){Qc.S(l,d,g);var S=bd;if(S&&l){var R=Yr(S).hoistableStyles,O=yd(l);d=d||"default";var X=R.get(O);if(!X){var ne={loading:0,preload:null};if(X=S.querySelector(Lp(O)))ne.loading=5;else{l=f({rel:"stylesheet",href:l,"data-precedence":d},g),(g=$a.get(O))&&$2(l,g);var he=X=S.createElement("link");An(he),Fs(he,"link",l),he._p=new Promise(function(Ne,Be){he.onload=Ne,he.onerror=Be}),he.addEventListener("load",function(){ne.loading|=1}),he.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,Pg(X,d,S)}X={type:"stylesheet",instance:X,count:1,state:ne},R.set(O,X)}}}function JK(l,d){Qc.X(l,d);var g=bd;if(g&&l){var S=Yr(g).hoistableScripts,R=xd(l),O=S.get(R);O||(O=g.querySelector(Ip(R)),O||(l=f({src:l,async:!0},d),(d=$a.get(R))&&B2(l,d),O=g.createElement("script"),An(O),Fs(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function eV(l,d){Qc.M(l,d);var g=bd;if(g&&l){var S=Yr(g).hoistableScripts,R=xd(l),O=S.get(R);O||(O=g.querySelector(Ip(R)),O||(l=f({src:l,async:!0,type:"module"},d),(d=$a.get(R))&&B2(l,d),O=g.createElement("script"),An(O),Fs(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function Z9(l,d,g,S){var R=(R=ue.current)?Bg(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"?(d=yd(g.href),g=Yr(R).hoistableStyles,S=g.get(d),S||(S={type:"style",instance:null,count:0,state:null},g.set(d,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=yd(g.href);var O=Yr(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(Lp(l)))&&!O._p&&(X.instance=O,X.state.loading=5),$a.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},$a.set(l,g),O||tV(R,l,g,X.state))),d&&S===null)throw Error(r(528,""));return X}if(d&&S!==null)throw Error(r(529,""));return null;case"script":return d=g.async,g=g.src,typeof g=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=xd(g),g=Yr(R).hoistableScripts,S=g.get(d),S||(S={type:"script",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function yd(l){return'href="'+Bt(l)+'"'}function Lp(l){return'link[rel="stylesheet"]['+l+"]"}function J9(l){return f({},l,{"data-precedence":l.precedence,precedence:null})}function tV(l,d,g,S){l.querySelector('link[rel="preload"][as="style"]['+d+"]")?S.loading=1:(d=l.createElement("link"),S.preload=d,d.addEventListener("load",function(){return S.loading|=1}),d.addEventListener("error",function(){return S.loading|=2}),Fs(d,"link",g),An(d),l.head.appendChild(d))}function xd(l){return'[src="'+Bt(l)+'"]'}function Ip(l){return"script[async]"+l}function eE(l,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var S=l.querySelector('style[data-href~="'+Bt(g.href)+'"]');if(S)return d.instance=S,An(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"),An(S),Fs(S,"style",R),Pg(S,g.precedence,l),d.instance=S;case"stylesheet":R=yd(g.href);var O=l.querySelector(Lp(R));if(O)return d.state.loading|=4,d.instance=O,An(O),O;S=J9(g),(R=$a.get(R))&&$2(S,R),O=(l.ownerDocument||l).createElement("link"),An(O);var X=O;return X._p=new Promise(function(ne,he){X.onload=ne,X.onerror=he}),Fs(O,"link",S),d.state.loading|=4,Pg(O,g.precedence,l),d.instance=O;case"script":return O=xd(g.src),(R=l.querySelector(Ip(O)))?(d.instance=R,An(R),R):(S=g,(R=$a.get(O))&&(S=f({},g),B2(S,R)),l=l.ownerDocument||l,R=l.createElement("script"),An(R),Fs(R,"link",S),l.head.appendChild(R),d.instance=R);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(S=d.instance,d.state.loading|=4,Pg(S,g.precedence,l));return d.instance}function Pg(l,d,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 nV(l,d,g){if(g===1||d.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;switch(d.rel){case"stylesheet":return l=d.disabled,typeof d.precedence=="string"&&l==null;default:return!0}case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function rE(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function rV(l,d,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=yd(S.href),O=d.querySelector(Lp(R));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(l.count++,l=Hg.bind(l),d.then(l,l)),g.state.loading|=4,g.instance=O,An(O);return}O=d.ownerDocument||d,S=J9(S),(R=$a.get(R))&&$2(S,R),O=O.createElement("link"),An(O);var X=O;X._p=new Promise(function(ne,he){X.onload=ne,X.onerror=he}),Fs(O,"link",S),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=Hg.bind(l),d.addEventListener("load",g),d.addEventListener("error",g))}}var P2=0;function sV(l,d){return l.stylesheets&&l.count===0&&Ug(l,l.stylesheets),0P2?50:800)+d);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function Hg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ug(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var qg=null;function Ug(l,d){l.stylesheets=null,l.unsuspend!==null&&(l.count++,qg=new Map,d.forEach(iV,l),qg=null,Hg.call(l))}function iV(l,d){if(!(d.state.loading&4)){var g=qg.get(l);if(g)var S=g.get(null);else{g=new Map,qg.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(),X2.exports=iW(),X2.exports}var oW=aW();const cW=!1;var gD=T.useLayoutEffect;function lW(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 uW(e){const n=T.useRef(null);return T.useImperativeHandle(e,()=>n.current,[]),n}function A0(e){return e[e.length-1]}function Ch(e,n){return typeof e=="function"?e(n):e}const vD=Object.prototype.hasOwnProperty,_W=Object.prototype.propertyIsEnumerable;function bD(e){for(const n in e)if(vD.call(e,n))return!0;return!1}const fW=()=>Object.create(null),E_=(e,n)=>B_(e,n,fW);function B_(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=FE(e)&&FE(s);if(!i&&!(Sv(e)&&Sv(s)))return s;const a=i?e:BE(e);if(!a)return s;const o=i?s:BE(s);if(!o)return s;const c=a.length,u=o.length,h=i?new Array(u):t();let f=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!PE(t)||!t.hasOwnProperty("isPrototypeOf"))}function PE(e){return Object.prototype.toString.call(e)==="[object Object]"}function FE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ou(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||!Ou(e[a],n[a],t)))return!1;return s===i}return!1}const dW=/[\x00-\x1f\x7f"<>`{}]/g;function hW(e){return e.replace(dW,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function HE(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 hW(n)}const pW=["http:","https:","mailto:","tel:"];function Cv(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function Gp(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+=HE(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+HE(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function mW(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function gW(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 Au=4,yD=5;function xD(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!I.parse&&I.caseSensitive===z&&I.prefix===j&&I.suffix===A));if(D)y=D;else{const I=vW(N,f,z,j,A);y=I,I.parent=s,I.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(I),B.length===2&&(a==null||a.push(B))}break}}s=y}if(k&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=Kd(f);b.kind=yD,b.parent=s,i++,b.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&f.endsWith("/")){const b=Kd(f);b.kind=Au,b.parent=s,i++,b.depth=i,s.index=b,s=b}s.parse=k??null,s.priority=((h=p==null?void 0:p.params)==null?void 0:h.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=f)}if(t.children)for(const f of t.children)Ob(e,n,f,c,s,i,a,o)}function wD(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 Kd(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 vW(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 bW(e,n){const t=Kd("/"),r=new Uint16Array(6),s=[];for(const i of e)Ob(!1,r,i,1,t,0,s);for(const i of s)i.sort(wD);n.masksTree=t,n.flatCache=Ev(1e3)}function yW(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=sS(e,n.masksTree);return n.flatCache.set(e,r),r}function xW(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=Kd("/"),Ob(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),sS(r,a,t)}function wW(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=sS(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=SD(i.route)),n.matchCache.set(r,i),i}function kW(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function SW(e,n=!1,t){const r=Kd(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let c=0;Ob(n,s,e,1,r,0,i,u=>{if(t==null||t(u,c),u.id in a&&rS(),a[u.id]=u,c!==0&&u.path){const h=kW(u.fullPath);(!o[h]||u.fullPath.endsWith("/"))&&(o[h]=u)}c++});for(const u of i)u.sort(wD);return{processedTree:{segmentTree:r,singleCache:Ev(1e3),matchCache:Ev(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function sS(e,n,t=!1){const r=e.split("/"),s=EW(e,r,n,t);if(!s)return null;const[i]=kD(e,r,s);return{route:s.node.route,rawParams:i}}function kD(e,n,t){var h,f,p,m;const r=CW(t.node);let s=null;const i=Object.create(null);let a=((h=t.extract)==null?void 0:h.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;j--){const A=f.wildcard[j],{prefix:z,suffix:M}=A;if(!(z&&(x||!(A.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(z)))){if(M){if(x)continue;const D=n.slice(p).join("/"),I=D.slice(-M.length);if((A.caseSensitive?I:I.toLowerCase())!==M||D.length-M.length=0;A--){const z=f.optional[A];o.push({node:z,index:p,skipped:j,statics:w,dynamics:k,optionals:v,extract:b,rawParams:y})}if(!x)for(let A=f.optional.length-1;A>=0;A--){const z=f.optional[A],{prefix:M,suffix:D}=z;if(M||D){const I=z.caseSensitive?C:N??(N=C.toLowerCase());if(M&&!I.startsWith(M)||D&&I.indexOf(D,I.length-D.length)=0;j--){const A=f.dynamic[j],{prefix:z,suffix:M}=A;if(z||M){const D=A.caseSensitive?C:N??(N=C.toLowerCase());if(z&&!D.startsWith(z)||M&&D.indexOf(M,D.length-M.length)=0;j--){const A=f.pathless[j];o.push({node:A,index:p,skipped:m,statics:w,dynamics:k,optionals:v,extract:b,rawParams:y})}}if(u)return u;if(r&&c){let h=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===Au)>(e.node.kind===Au)||n.node.kind===Au==(e.node.kind===Au)&&n.node.depth>e.node.depth))):!0}function X1(e){return Y1(e.filter(n=>n!==void 0).join("/"))}function Y1(e){return e.replace(/\/{2,}/g,"/")}function CD(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ll(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function ED(e){return ll(CD(e))}function Nv(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function zW(e,n,t){return Nv(e,t)===Nv(n,t)}function jW({base:e,to:n,trailingSlash:t="never",cache:r}){if(n.includes("//")&&(n=Y1(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=Y1(e)),a=e.split("/");a.length>1&&A0(a)==="";)a.pop();const u=n.split("/");for(let h=0,f=u.length;h1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(A0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),c=(s?Y1(o):o)||"/";return i&&r&&r.set(i,c),c}function AW(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 ew(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=>GE(s,t)).join("/"):GE(r,t)}function UE({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 IW(e){const n=e.getAttribute(KE);if(n)return`[${KE}="${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 t1=!1;const Z1="window";function b3(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function VE(e){const n=new Set;for(const t of e){if(t===Z1)continue;const r=b3(t);r&&n.add(r)}return n}function $W(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||LW,i=new Set,a=o=>{const c=gu[o]||(gu[o]={});for(const u of i)u===document?c[Z1]={scrollX,scrollY}:u.isConnected&&(c[IW(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,t1=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{t1||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())),DW()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var k;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,h=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=gu[w];if(v){let b=gu[m];for(const y in v){if(y===Z1){if(h)continue}else{const x=b3(y);if(!x||h&&u&&(p??(p=VE(u)),p.has(x)))continue}b||(b=gu[m]={}),b[y]??(b[y]=v[y])}}}t1=!0;try{const v=o.toLocation.hash,b=o.toLocation.state.__hashScrollIntoViewOptions??!0;let y=!1;if(h){!v&&u&&(p??(p=VE(u)));const x=v&&b&&f,C=r.restoring?gu[m]:void 0;if(C)for(const N in C){const{scrollX:j,scrollY:A}=C[N];if(N===Z1){if(x)continue;scrollTo({top:A,left:j,behavior:c}),y=!0}else{const z=b3(N);z&&(z.scrollLeft=j,z.scrollTop=A,p==null||p.delete(z))}}if(!v){const N={top:0,left:0,behavior:c};if(y||scrollTo(N),p)for(const j of p)j.scrollTo(N)}}!y&&v&&b&&((k=document.getElementById(v))==null||k.scrollIntoView(b))}finally{t1=!1}}))}function BW(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 tw(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function PW(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]=tw(s):Array.isArray(i)?i.push(tw(s)):t[r]=[i,tw(s)]}return t}const FW=/^(?:\s|["[{\d-]|fa|nu|tr)/,HW=UW(JSON.parse),qW=GW(JSON.stringify,JSON.parse);function UW(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=PW(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function GW(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&&!FW.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=BW(s,r);return i?`?${i}`:""}}const Wd="__root__";function KW(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 ND(e){return e instanceof Response&&!!e.options}function VW(e){return{input:({url:n})=>{for(const t of e)n=y3(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=zD(e[t],n);return n}}}function WW(e){const n=ED(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=X1(["/",n,i.pathname]),i)}}function y3(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 zD(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 QW(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([]),h=r(()=>u.get().map(k=>i.get(k).get())),f=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:h.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:h,byRoute:i,__store:f,getMatchStore:p,setMatches:w};function w(k){const v=u.get(),b=k.map(y=>y.routeId);s(()=>{gW(v,b)||u.set(b);for(const y of v)b.includes(y)||i.get(y).set(()=>{});for(const y of k){const x=p(y.routeId);x.get()!==y&&x.set(y)}})}return m}var Du="__TSR_index",WE="popstate",QE="beforeunload";function XW(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))??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&h)for(const m of u){const w=zv(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[Du];o=XE(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[Du];o=XE(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[Du]!==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 h,f;const u=((h=e.getBlockers)==null?void 0:h.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 XE(e,n){n||(n={});const t=iS();return{...n,key:t,__TSR_key:t,[Du]:e}}function YW(e){var A,z;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=(()=>zv(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((A=n.history.state)!=null&&A.__TSR_key)&&!((z=n.history.state)!=null&&z.key)){const M=iS();n.history.replaceState({[Du]:0,key:M,__TSR_key:M},"")}let u=c(),h,f=!1,p=!1,m=!1,w=!1;const k=()=>u;let v;const b=()=>{v&&(j._ignoreSubscribers=!0,(v[2]?n.history.pushState:n.history.replaceState)(v[1],"",v[0]),j._ignoreSubscribers=!1,v=void 0,h=void 0)},y=(M,D,I)=>{const B=o(D),G=!!v;G||(h=u),u=zv(D,I),v=[B,I,(v==null?void 0:v[2])||M],G||queueMicrotask(()=>b())},x=M=>{u=c(),j.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=c(),D=M.state[Du]-u.state[Du],I=D===1,B=D===-1,G=!I&&!B||f;f=!1;const U=G?"GO":B?"BACK":"FORWARD",Q=G?{type:"GO",index:D}:{type:B?"BACK":"FORWARD"};if(m)m=!1;else{const V=i();if(typeof document<"u"&&V.length){for(const Z of V)if(await Z.blockerFn({currentLocation:u,nextLocation:M,action:U})){p=!0,n.history.go(1),j.notify(Q);return}}}u=c(),j.notify(Q)},N=M=>{if(w){w=!1;return}let D=!1;const I=i();if(typeof document<"u"&&I.length)for(const B of I){const G=B.enableBeforeUnload??!0;if(G===!0){D=!0;break}if(typeof G=="function"&&G()===!0){D=!0;break}}if(D)return M.preventDefault(),M.returnValue=""},j=XW({getLocation:k,getLength:()=>n.history.length,pushState:(M,D)=>y(!0,M,D),replaceState:(M,D)=>y(!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:b,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(QE,N,{capture:!0}),n.removeEventListener(WE,C)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(QE,N,{capture:!0}),n.addEventListener(WE,C),n.history.pushState=function(...M){const D=t.apply(n.history,M);return j._ignoreSubscribers||x("PUSH"),D},n.history.replaceState=function(...M){const D=r.apply(n.history,M);return j._ignoreSubscribers||x("REPLACE"),D},j}function ZW(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function zv(e,n){const t=ZW(e),r=t.indexOf("#"),s=t.indexOf("?"),i=iS();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||{[Du]:0,key:i,__TSR_key:i}}}function iS(){return(Math.random()+1).toString(36).substring(7)}function YE(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 Db(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 ZE({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function JW(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 eQ=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??cW??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=AW(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=YW()),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=Ev(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=QW(this.latestLocation,u),$W(this)}const o=this.options.basepath??"/",c=this.options.rewrite;if(i||s!==o||a!==c){this.basepath=o;const u=[],h=ED(o);h&&h!=="/"&&u.push(WW({basepath:o})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:VW(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=SW(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&bW(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:h,href:f,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const b=this.options.parseSearch(u),y=this.options.stringifySearch(b);return{href:c+y+h,publicHref:c+y+h,pathname:Gp(c).path,external:!1,searchStr:y,search:E_(r==null?void 0:r.search,b),hash:Gp(h.slice(1)).path,state:B_(r==null?void 0:r.state,p)}}const m=new URL(f,this.origin),w=y3(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:Gp(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:v,search:E_(r==null?void 0:r.search,k),hash:Gp(w.hash.slice(1)).path,state:B_(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)=>jW({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=wW(ll(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 I=zv(i.href,{});i={...i,to:y3(this.rewrite,new URL(I.pathname,this.origin)).pathname,search:this.options.parseSearch(I.search),hash:I.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],h=o[3],f=this.resolvePathWithBase(c,i.to?`${i.to}`:".");let p=JE(i.params,h);const m=this.routesByPath[ll(f)];let w;if(m)w=this.getRouteBranch(m);else if(f.includes("$"))w=[];else{const[I,B,G]=this.getMatchedRoutes(f);w=I,this.options.notFoundRoute&&(!G||G.path!=="/"&&B["**"])&&(w=[...w,this.options.notFoundRoute])}if(w.length&&bD(p))for(const I of w){const B=((M=I.options.params)==null?void 0:M.stringify)??I.options.stringifyParams;if(B){p===h&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,B(p))}catch{}}}const k=t.leaveParams?f:Gp(UE({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 I={};w.forEach(B=>{if(B.options.validateSearch)try{Object.assign(I,J1(B.options.validateSearch,{...I,...v}))}catch{}}),v=I}v=nQ(v,i,w,t._includeValidateSearch),v=E_(u,v);const b=this.options.stringifySearch(v),y=i.hash===!0?a.hash:i.hash?Ch(i.hash,a.hash):void 0,x=y?`#${y}`:"";let C=i.state===!0?a.state:i.state?Ch(i.state,a.state):{};i.state&&(C=B_(a.state,C));const N=`${k}${b}${x}`;let j,A,z=!1;if(this.rewrite){const I=new URL(N,this.origin),B=zD(this.rewrite,I);j=I.href.replace(I.origin,""),B.origin!==this.origin?(A=B.href,z=!0):A=B.pathname+B.search+B.hash}else j=mW(N),A=j;return{publicHref:A,href:j,pathname:k,search:v,searchStr:b,state:C,hash:y??"",external:z,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=yW(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:c,...u}=i.route,h=JE(c,a);s.maskedLocation=r({from:t.from,...u,params:h})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=ll(this.latestLocation.href)===ll(s.href)&&Ou(ZE(s.state),ZE(this.latestLocation.state)),o=this._commitPromise;let c;const u=new Promise(h=>{c=h});if(u.resolve=()=>{c(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:h,hashScrollIntoView:f,...p}=s;h&&(p={...h,state:{...h.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 h=!o&&i?i:s;if(Cv(h,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(h):window.location.href=h;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 _Q(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(Db(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,h;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")&&YE(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)(h=this._flights)==null||h.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&&Cv(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[h,f]of r)(!i||i(f))&&(o.push(h),a.push(f));const c=[];for(const[h,f]of s??[])(!i||f.some(i))&&(c.push(h),a.push(...f));for(const h of o)r.delete(h);for(const h of c)s.delete(h);for(const h of a){const f=h._flight;h._flight=void 0,f&&!--f[2]&&(((u=this._flights)==null?void 0:u.get(h.id))===f&&this._flights.delete(h.id),c.push(f[1]))}for(const h of c)h.abort()},this.loadRouteChunk=Qd,this.preloadRoute=t=>fQ(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=xW(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!c||t.params&&!Ou(c.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Ou(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??qW,parseSearch:e.parseSearch??HW,protocolAllowlist:e.protocolAllowlist??pW}),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=SD(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["**"]:ll(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?rQ(this.options.notFoundMode,i):void 0,c=new Array(i.length),u=this._committed,h=(w,k)=>{const v=u[k];return(v==null?void 0:v.routeId)===w.id?v:w===this.options.notFoundRoute?u.find(b=>b.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(h)}const u=c.validateSearch;if(r&&u){const h=({search:f,next:p,meta:m})=>{const w=p(f);try{const k=J1(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(h)}}const i=(o,c,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return c;const f=Ch(n.search,c);return u&&(u.explicit=f),f}const h=(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:h,meta:u})};return i(0,e)}function rQ(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 Wd}function JE(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,Ch(e,t))}function eN(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 x3(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function sQ(e,n){const t=x3(e,"component");let r=x3(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function Qd(e,n,t){const r=()=>n===!1?void 0:n?x3(e,n):sQ(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 aS(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 Af(e,n){return e.routesById[n.routeId]}function R0(e,n,t){return ND(e)?[da,e]:Eh(e)?(e.routeId||(e.routeId=t),[Lb,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[pl,e]):[ic,e]}function oS(e,n){var r,s;let t=R0(n,!0,e.id);if(t[0]!==pl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=R0(i,!0,e.id)}return t}function m0(e,n,t,r,s){return s[0].signal.aborted?$u:uS(e,n,t,oS(t,r),s)}async function iQ(e,n,t,r,s,i){var h,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 ul(e,m),[p,m0(e,n,w,C,t)]}if(c.aborted)return[p,$u];const b=m.paramsError??m.searchError;if(b!==void 0)return ul(e,m),[p,m0(e,n,w,b,t)];const y=w.options.beforeLoad;if(!y)continue;const x=m.status;p>=i&&(m.status="pending",(f=t[7])==null||f.call(t));try{M0(e,m,"beforeLoad",t[0]);const C=await jf(y({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,$u];const N=uS(e,n,w,R0(C,!1,w.id),t);if(N[0]!==ic)return ul(e,m),[p,N];m.context={...m.context,...C}}catch(C){return ul(e,m),[p,m0(e,n,w,C,t)]}finally{m.status=x,M0(e,m,!1,t[0])}}s()}function cS(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 ul(e,n){var r;const t=n._flight;n._flight=void 0,(r=cS(e,n,t))==null||r.abort()}function qi(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=cS(e,a,o);c&&s.push(c)}}for(const a of s)a.abort()}function lS(e){for(const n of e){const t=n._flight;t&&t[2]++}}function M0(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 jD(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 tN(e,n,t,r,s,i,a){const o=a[0],c=o.signal;if(c.aborted)return $u;if(!s)return[ic,void 0];let u=t._flight;M0(e,t,"loader",o);try{if(!u){const h=new AbortController;u=[Promise.resolve().then(()=>s(jD(e,n,t,r,h,i,!!a[3]))).then(f=>R0(f,!1,r.id),f=>R0(f,!0,r.id)).then(f=>{var p;return f[0]!==ic&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||h.abort()),f[0]===pl&&u[2]?oS(r,f[1]):f}),h,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],uS(e,n,r,await jf(u[0],c),a)}catch(h){if(h!==c||!c.aborted)throw h;return ul(e,t),$u}finally{M0(e,t,!1,o)}}function nN(e,n,t){n[0]!==da&&(e.status="success",e.error=void 0,n[0]===ic?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function aQ(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&&ul(e,r)}function rN(e,n){return n[0]===pl||n[0]===Lb?{...e,status:n[0]===pl?"error":"notFound",error:n[1],_flight:void 0}:e}function oQ(e,n,t,r,s,i,a){var B,G;const o=n[1][t],c=Af(e,o),u=!!i[3],h=e._cache.get(o.id);let f,p=!1,m;try{if(o.status==="success"&&(f=c.options.shouldReload,typeof f=="function"&&(f=f(jD(e,n,o,c,i[0],s,u))),i[0].signal.aborted&&(m=$u)),!m)if(o.status!=="success")p=!0;else{const U=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>=U&&(i[5]||o.cause==="enter"||i[2].some(Q=>Q.routeId===o.routeId&&Q.id!==o.id)))}}catch(U){o.invalid=!0,ul(e,o),m=m0(e,n,c,U,i)}const w=c.options.loader,k=typeof w=="function",v=k?w:w==null?void 0:w.handler,b=!u||c.options.preload!==!1;let y=b&&w?(B=e._flights)==null?void 0:B.get(o.id):void 0;y===o._flight||m?y=void 0:y&&!p&&!u&&f===void 0?p=!0:p||(y=void 0);const x=!!(w&&p&&o.status==="success"&&!u&&!i[4]&&((k?void 0:w.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&b,N=C&&!x&&(o.status!=="success"||!!w),j=t>=a?i[7]:void 0,A=c.lazyFn&&c._lazy!==!0?j:void 0;if(C&&!w&&(o.invalid=!1,o.updatedAt=Date.now()),y&&y[2]++,N){const U=o._flight;o._flight=y,(G=cS(e,o,U))==null||G.abort(),t>=a&&(o.status="pending"),j==null||j()}C||(o.isFetching=!1);const z=(m?Promise.resolve(m):N?tN(e,n,o,c,v,s,i):Promise.resolve([ic,o.loaderData])).then(U=>(N&&(nN(o,U,u),U[0]===ic&&(w&&!i[0].signal.aborted&&aQ(e,o,h),t>=a&&(o.status="pending"))),U)),M=jf(Promise.resolve().then(()=>Qd(c,void 0,A)),i[0].signal).then(()=>{},U=>n[1].some((Q,V)=>V<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,m0(e,n,c,U,i)]).then(U=>z.then(Q=>(N&&!U&&Q[0]===ic&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",j==null||j()),U)));if(r.push([t,z,M]),!x)return z.then(U=>rN(o,U));const D={...o,status:"pending",preload:!1,_flight:y};o.invalid=!1,o.isFetching="loader";const I=tN(e,n,D,c,v,s,i).then(U=>(o.isFetching=!1,nN(D,U,!1),U));return(n[2]??(n[2]=[])).push([t,I,M,D]),I.then(U=>rN(D,U))}async function w3(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=Af(e,n[o]);try{const u=Qd(c,!1);u&&await jf(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 nf(e,n){n[2]&&(qi(e,n[2].map(t=>t[3])),n[2]=void 0)}async function sN(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]>=da)throw[o,a];!s&&a[0]!==ic&&(s=[o,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=o))return c[1].then(u=>{if(u[0]===da)throw[c[0],u]})})))}})))}catch(i){return i}return n??s}function uS(e,n,t,r,s,i){for(;r[0]===da;){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):[da,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(c){r=i?[pl,c]:oS(t,c),i=!0}}return r}async function AD(e,n,t,r,s,i){const a=n[1];let o=await s,c=!1;const u=a.findIndex(m=>m._notFound),h=m=>m[1][0]===Lb?w3(e,a,m,r.signal):m[0];let f=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=da)f=0;else if(o){f=o[2]??(o[2]=await h(o));for(const m of t){if(m[0]>=f)break;const w=await m[1];if(w[0]!==ic&&w[0]=f)break;const w=await m[2];if(w){o=w;break}}if(((o==null?void 0:o[1][0])??0)>=da){const m=o[1];if(m[0]!==da||m[1].options.reloadDocument||m[2])return nf(e,n),m;c=!0,o=[0,[pl,new Error("Too many redirects")]]}const p=o?o[2]??await h(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],b=()=>{m&&(k._notFound=void 0,w===pl?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)};b(),m||i==null||i();const y=Af(e,k);try{await jf(m?Promise.resolve().then(()=>Qd(y,w===pl?"errorComponent":"notFoundComponent")):Promise.all([Qd(y),Qd(y,"notFoundComponent")]),r.signal)}catch(x){if(x===r.signal&&r.signal.aborted)return nf(e,n),$u}m?c&&(r.abort(),await Promise.all([...t.map(x=>x[1]),...t.map(x=>x[2]),...(n[2]??[]).map(x=>x[1])]),nf(e,n),qi(e,a),b()):k.status="success"}return n}async function TD(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let c=r;cy._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const y=await w3(e,t,void 0,i,u);t[u]._notFound=void 0,t[y]._notFound=!0,u=y}let h=u<0?t.length:u+1,f=0;for(;f{for(let y=m;y=da&&(h=0);k()}if(!i.aborted&&!r[3]){const y=[];for(const[x,C]of e._flights??[])C[2]||(e._flights.delete(x),y.push(C[1]));for(const x of y)x.abort()}const b=AD(e,s,p,r[0],sN(p,v,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=sN(s[2],void 0,void 0,b.then(y=>T0(y)?0:aS(t).length,()=>0))),a=await b}catch(c){if(nf(e,s),c===i&&i.aborted)return $u;throw c}return T0(a)?a:TD(e,a,i,r[6]===t.length?r[6]:0)}function k3(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(()=>k3(e,n),y);return}s[2]=0}const v=t.map(y=>({...y,_flight:void 0}));v[o].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(y=>(y&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+w),y));return}}function Kp(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 iN(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!aS(n[3]).some(i=>i.id===t[1]))return;let s;try{await jf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function MD(e,n){e._committed=n,e.stores.setMatches(n)}function cQ(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=aS(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?h.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:h.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,MD(e,t),qi(e,[...i.values(),...s],[...t,...o.values()]),JW(e,s,t,n)}async function n1(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function OD(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 lQ(e,n,t,r,s){const i=t.map(c=>({...c}));lS(i);for(const c of r)ul(e,i[c[0]]),i[c[0]]=c[3];const a=[n[2],i];let o;try{o=await AD(e,a,r,n[0],s)}catch(c){throw qi(e,i),c}if(T0(o)){qi(e,i),o[0]===da&&e._tx===n&&e._committed===t&&await OD(e,n,o);return}if(await TD(e,o,n[0].signal),e._tx!==n||e._committed!==t){qi(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),ul(e,u))}MD(e,i),qi(e,t,i)}async function uQ(e,n,t,r,s,i){const a=await RD(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(T0(a)){const f=a[0]===da&&e._tx===n;if((!f||a[1].options.reloadDocument)&&Kp(e,n),qi(e,n[3]),n[3]=[],!f)return;if(e._tx!==n){Kp(e,n);return}await OD(e,n,a);return}const o=a[1];if(e._tx===n&&await iN(e,n),e._tx!==n){Kp(e,n),qi(e,o),nf(e,a);return}const c=n[2],u=Db(c,e.stores.resolvedLocation.get()),h=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await iN(e,n),e._tx!==n){Kp(e,n),qi(e,o),nf(e,a);return}const f=()=>{Kp(e,n),cQ(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){nf(e,a);return}h!=null&&h.length&&lQ(e,n,o,h,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 _Q(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](),h=new AbortController,f=e._preflight;if(e._preflight=h,u||c==null||c[1](),f==null||f.abort(),!h.signal.aborted){const N=Db(i,r);e.emit({type:"onBeforeNavigate",...N}),h.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(h.signal.aborted){await n1(e,t);return}const p=s.href===i.href;let m=h;const w=e.matchRoutes(i,{_controller:h});lS(w);const k=u?c[1](w):void 0;if(k?m=u:u==null||u.abort(),h.signal.aborted){qi(e,w),await n1(e,t);return}e._preflight=void 0;let v;const b=()=>uQ(e,x,p,()=>k3(e,x),n==null?void 0:n.sync,k),y=n!=null&&n.sync?new Promise(N=>v=N):Promise.resolve().then(b).then(),x=[m,o,i,w,Date.now(),y];if(e._tx=x,t){for(const N of e.stores.matches.get()){if(e._tx!==x)break;N.isFetching&&M0(e,N,!1)}t[0].abort(),qi(e,t[3],x[3],!0)}if(e._tx!==x){qi(e,x[3]),x[3]=[],v==null||v(),await n1(e,x);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))&&k3(e,x),v==null||v(b()),await y,await n1(e,x)}async function fQ(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}),lS(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),c=await RD(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),qi(e,a)),i.abort()}if(!T0(c))return c[1];if(!o||c.length<3)return;t=c[2]}catch(u){Eh(u)||console.error(u);return}}}const dQ="Error preloading route! ☝️";var DD=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=Wd:this.parentRoute||rS();let s=r?Wd:t==null?void 0:t.path;s&&s!=="/"&&(s=CD(s));const i=(t==null?void 0:t.id)||s;let a=r?Wd:X1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=X1(["/",a]));const o=a==="__root__"?"/":X1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=ll(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=>KW({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.")}},hQ=class extends DD{constructor(e){super(e)}},_S=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??pQ,{error:e,reset:this.reset}):this.props.children}};function pQ({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 mQ({children:e,fallback:n=null}){return _.jsx(it.Fragment,{children:LD()?e:n})}function LD(){return it.useSyncExternalStore(gQ,()=>!0,()=>!1)}function gQ(){return()=>{}}var ID=T.createContext(null);function xi(e){return T.useContext(ID)}var Ib=T.createContext(void 0),vQ=T.createContext(void 0),jr=(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))(jr||{});function bQ({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,h,f){const p=h.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:h.deps;if(m!==void 0&&m.dep===u){m.version=f,h.depsTail=m;return}const w=u.subsTail;if(w!==void 0&&w.version===f&&w.sub===h)return;const k=h.depsTail=u.subsTail={version:f,dep:u,sub:h,prevDep:p,nextDep:m,prevSub:w,nextSub:void 0};m!==void 0&&(m.prevDep=k),p!==void 0?p.nextDep=k:h.deps=k,w!==void 0?w.nextSub=k:u.subs=k}function s(u,h=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:h.depsTail=p,p!==void 0?p.nextDep=m:h.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 h=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:h,prev:f},h=k);continue}}if((u=h)!==void 0){h=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){h=u.nextSub;continue e}break}while(!0)}function a(u,h){let f,p=0,m=!1;e:do{const w=u.dep,k=w.flags;if(h.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,h=w,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=h.subs,b=v.nextSub!==void 0;if(b?(u=f.value,f=f.prev):u=v,m){if(e(h)){b&&o(v),h=u.sub;continue}m=!1}else h.flags&=-33;h=u.sub;const y=u.nextDep;if(y!==void 0){u=y;continue e}}return m}while(!0)}function o(u){do{const h=u.sub,f=h.flags;(f&48)===32&&(h.flags=f|16,(f&6)===2&&n(h))}while((u=u.nextSub)!==void 0)}function c(u,h){let f=h.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}function yQ(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 S3=[];let ev=0;const{link:aN,unlink:xQ,propagate:wQ,checkDirty:$D,shallowPropagate:oN}=bQ({update(e){return e._update()},notify(e){S3[C3++]=e,e.flags&=~jr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=jr.Mutable|jr.Dirty,Av(e))}});let r1=0,C3=0,Xo,E3=0;function kQ(e){try{++E3,e()}finally{--E3||BD()}}function Av(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=xQ(t,e)}function BD(){if(!(E3>0)){for(;r1{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=Xo,o=(n==null?void 0:n.compare)??Object.is;if(t)Xo=s,++ev,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=jr.Mutable|jr.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{Xo=a,t&&(s.flags&=~jr.RecursedCheck),Av(s)}}};return t?(s.flags=jr.Mutable|jr.Dirty,s.get=function(){const i=s.flags;if(i&jr.Dirty||i&jr.Pending&&$D(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&oN(a)}}else i&jr.Pending&&(s.flags=i&~jr.Pending);return Xo!==void 0&&aN(s,Xo,ev),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(wQ(a),oN(a),BD())}},s}function SQ(e){const n=()=>{const r=Xo;Xo=t,++ev,t.depsTail=void 0,t.flags=jr.Watching|jr.RecursedCheck;try{return e()}finally{Xo=r,t.flags&=~jr.RecursedCheck,Av(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:jr.Watching|jr.RecursedCheck,notify(){const r=this.flags;r&jr.Dirty||r&jr.Pending&&$D(this.deps,this)?n():this.flags=jr.Watching},stop(){this.flags=jr.None,this.depsTail=void 0,Av(this)}};return n(),t}var nw={exports:{}},rw={},sw={exports:{}},iw={};/** * @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 XE;function uQ(){if(XE)return tw;XE=1;var e=Nm();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 h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return tw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,tw}var YE;function _Q(){return YE||(YE=1,ew.exports=uQ()),ew.exports}/** + */var lN;function CQ(){if(lN)return iw;lN=1;var e=Nm();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 h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return iw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,iw}var uN;function EQ(){return uN||(uN=1,sw.exports=CQ()),sw.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -63,555 +63,555 @@ 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 ZE;function fQ(){if(ZE)return J2;ZE=1;var e=Nm(),n=_Q();function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}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 J2.useSyncExternalStoreWithSelector=function(u,h,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 b(j){if(!y){if(y=!0,x=j,j=p(j),m!==void 0&&k.hasValue){var A=k.value;if(m(A,j))return C=A}return C=j}if(A=C,r(x,j))return A;var z=p(j);return m!==void 0&&m(A,z)?(x=j,A):(x=j,C=z)}var y=!1,x,C,N=f===void 0?null:f;return[function(){return b(h())},N===null?void 0:function(){return b(N())}]},[h,f,p,m]);var v=s(u,w[0],w[1]);return a(function(){k.hasValue=!0,k.value=v},[v]),c(v),v},J2}var JE;function dQ(){return JE||(JE=1,Z2.exports=fQ()),Z2.exports}var ND=dQ();const hQ=Em(ND);function pQ(e,n){return e===n}function oc(e,n,t=pQ){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 ND.useSyncExternalStoreWithSelector(r,s,s,n,t)}var eN={};function iS(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=P_(t.current,s):s}}function Tf(e){const n=xi(),t=T.useContext(e.from?rQ:Db),r=e.from??t,s=n.stores.getMatchStore(r),i=iS(e,n),a=oc(s,o=>o?i(o):eN);if(a!==eN)return a;(e.shouldThrow??!0)&&Xk()}function zD(e){return Tf({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function jD(e){const{select:n,...t}=e;return Tf({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function AD(e){return Tf({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 TD(e){return Tf({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Lb(e){const n=xi();return T.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function aS(e){return Tf({...e,select:n=>e.select?e.select(n.context):n.context})}function nw(e){const n=T.useRef(e);return Du(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 gQ(e,n,t){if(e!=null&&e.external)return Cv(e.href,t)?void 0:e.href;if(!SQ(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),Cv(n,t)?void 0:n}catch{}}function vQ(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!dW(e.pathname,n.pathname,r))return!1}else{const a=Nv(e.pathname,r),o=Nv(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!Du(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 bQ(e,n){const t=xi(),r=QK(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,preloadIntentProximity:h,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:w,viewTransition:k,children:v,target:b,disabled:y,style:x,className:C,onClick:N,onBlur:j,onFocus:A,onMouseEnter:z,onMouseLeave:M,onTouchStart:D,ignoreBlocker:I,params:B,search:G,hash:q,state:Q,mask:K,reloadDocument:Z,unsafeRelative:J,from:$,_fromLocation:L,...F}=e,U=kD(),H=nw(e.search),ae=nw(e.params),ie=nw(a),ue=T.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,H,ae,e.state,e.mask,e.unsafeRelative]),re=T.useCallback(Le=>{const tt=t.buildLocation({_fromLocation:Le,...ue}),ke=kQ(tt.maskedLocation?tt.maskedLocation.publicHref:tt.publicHref,tt.maskedLocation?tt.maskedLocation.external:tt.external,t.history,y),ge=gQ(ke,o,t.protocolAllowlist);return[ke==null?void 0:ke.href,ge,vQ(Le,tt,ie,t.basepath,U,ge!==void 0)]},[ie,y,U,ue,t,o]),[V,oe,ce]=oc(t.stores.location,re,mQ),me=ce?Ch(s,{})??yQ:rw,ve=ce?rw:Ch(i,{})??rw,Re=[C,me.className,ve.className].filter(Boolean).join(" "),Fe=(x||me.style||ve.style)&&{...x,...me.style,...ve.style},Xe=T.useRef(!1),Te=e.reloadDocument||oe||y?!1:c??t.options.defaultPreload,$e=u??t.options.defaultPreloadDelay??0,wt=T.useCallback(()=>{t.preloadRoute(ue).catch(Le=>{console.warn(Le),console.warn(ZW)})},[t,ue]),ot=T.useCallback(Le=>{if(!Le){sw(r);return}if(!(Le.isIntersecting??Te==="intent")){Le.isIntersecting===!1&&sw(r);return}if(!$e){wt();return}m0.has(r)||m0.set(r,setTimeout(()=>{m0.delete(r),wt()},$e))},[wt,r,Te,$e]);WK(r,ot,Te!=="viewport"),T.useEffect(()=>{Xe.current||Te==="render"&&(wt(),Xe.current=!0)},[wt,Te]);const Mt=Le=>{const tt=Le.currentTarget.getAttribute("target"),ke=b!==void 0?b:tt;!y&&!(Le.metaKey||Le.altKey||Le.ctrlKey||Le.shiftKey)&&!Le.defaultPrevented&&(!ke||ke==="_self")&&Le.button===0&&(Le.preventDefault(),t.navigate({...ue,replace:p,resetScroll:w,hashScrollIntoView:f,startTransition:m,viewTransition:k,ignoreBlocker:I}))};if(oe)return{...F,ref:r,href:oe,...v&&{children:v},...b&&{target:b},...y&&{disabled:y},...x&&{style:x},...C&&{className:C},...N&&{onClick:N},...j&&{onBlur:j},...A&&{onFocus:A},...z&&{onMouseEnter:z},...M&&{onMouseLeave:M},...D&&{onTouchStart:D}};const jt=()=>{Te==="intent"&&wt()},Ft=()=>{Te==="intent"&&sw(r)};return{...F,...me,...ve,href:V,ref:r,onClick:Sd([N,Mt]),onBlur:Sd([j,Ft]),onFocus:Sd([A,ot]),onMouseEnter:Sd([z,ot]),onMouseLeave:Sd([M,Ft]),onTouchStart:Sd([D,jt]),disabled:!!y,target:b,...Fe&&{style:Fe},...Re&&{className:Re},...y&&xQ,...ce&&wQ}}var rw={},yQ={className:"active"},xQ={role:"link","aria-disabled":!0},wQ={"data-status":"active","aria-current":"page"},m0=new WeakMap,sw=e=>{clearTimeout(m0.get(e)),m0.delete(e)},Sd=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function kQ(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function SQ(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var Ib=T.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=bQ(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)}),CQ=class extends wD{constructor(n){super(n),this.useMatch=t=>Tf({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>aS({...t,from:this.id}),this.useSearch=t=>TD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>AD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>jD({...t,from:this.id}),this.useLoaderData=t=>zD({...t,from:this.id}),this.useNavigate=()=>Lb({from:this.fullPath}),this.Link=st.forwardRef((t,r)=>_.jsx(Ib,{ref:r,from:this.fullPath,...t}))}};function EQ(e){return new CQ(e)}function NQ(){return e=>jQ(e)}var zQ=class extends JW{constructor(e){super(e),this.useMatch=n=>Tf({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>aS({...n,from:this.id}),this.useSearch=n=>TD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>AD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>jD({...n,from:this.id}),this.useLoaderData=n=>zD({...n,from:this.id}),this.useNavigate=()=>Lb({from:this.fullPath}),this.Link=st.forwardRef((n,t)=>_.jsx(Ib,{ref:t,from:this.fullPath,...n}))}};function jQ(e){return new zQ(e)}function dc(e){return n=>{const t=EQ(n);return t.isRoot=!1,t}}function AQ(e){const n=xi(),t=`not-found-${oc(n.stores.location,r=>r.pathname)}-${oc(n.stores.status,r=>r)}`;return _.jsx(sS,{getResetKey:()=>t,onCatch:(r,s)=>{var i;if(Eh(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Eh(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function TQ(){return _.jsx("p",{children:"Not Found"})}function Md(e){return _.jsx(_.Fragment,{children:e.children})}function RD(e,n,t){return n.options.notFoundComponent?_.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?_.jsx(e.options.defaultNotFoundComponent,{...t}):_.jsx(TQ,{})}function $b(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?_.jsx(t,{}):null}var RQ=(e,n)=>e[0]===n[0]&&e[1]===n[1],MD=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,OD=T.memo(function({routeId:n}){const t=xi();return _.jsx(MQ,{router:t,match:oc(t.stores.getMatchStore(n),r=>r)})});function MQ({router:e,match:n}){var f,p;const t=e.routesById[n.routeId],r=$b(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=MD(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?T.Suspense:Md,u=s?sS:Md,h=a?AQ:Md;return _.jsxs(t.isRoot?t.options.shellComponent??Md:Md,{children:[_.jsx(Db.Provider,{value:n.routeId,children:_.jsx(c,{fallback:r,children:_.jsx(u,{getResetKey:()=>n,errorComponent:s,onCatch:(m,w)=>{if(Eh(m))throw m.routeId??(m.routeId=n.routeId),m;i==null||i(m,w)},children:_.jsx(h,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return T.createElement(a,m)},children:o?_.jsx(tQ,{fallback:r,children:_.jsx(tN,{match:n})}):_.jsx(tN,{match:n})})})})}),null]})}var tN=T.memo(function({match:n}){const t=xi(),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(M0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!MD(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return $b(t,s)}if(n.status==="notFound")return RD(t,s,n.error);if(n.status==="error")throw n.error;return a}),M0=T.memo(function(){const n=xi(),t=T.useContext(Db);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=oc(o,c=>[!!c._notFound,c.error],RQ),i=oc(n.stores.ids,c=>c[c.indexOf(t)+1])}if(r)return RD(n,n.routesById[t],s);if(!i)return null;const a=_.jsx(OD,{routeId:i});return t===Qd?_.jsx(T.Suspense,{fallback:$b(n),children:a}):a});function DD(e,n){const t=e[1];e.length=0,t==null||t(n)}function OQ({t:e}){const n=xi(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{DD(t,!1),t.push(s,i),e(n),T.startTransition(r)}),sD(()=>{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(cl(s.publicHref)!==cl(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",...Mb(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function DQ(){const e=xi(),n=e.routesById[Qd],t=$b(e,n),r=e.ssr?Md:T.Suspense,s=_.jsxs(_.Fragment,{children:[_.jsx(OQ,{t:T.useState()[1]}),_.jsx(r,{fallback:t,children:_.jsx(LQ,{})})]});return e.options.InnerWrap?_.jsx(e.options.InnerWrap,{children:s}):s}function LQ(){const e=xi(),n=e._rendered,t=oc(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;sD(()=>{n[0]===t&&DD(n,!0)},[n,t]);const i=s?_.jsx(OD,{routeId:s}):null;return _.jsx(Db.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:_.jsx(sS,{getResetKey:()=>r,onCatch:void 0,children:i})})}var IQ=e=>({createMutableStore:QE,createReadonlyStore:QE,batch:cQ}),$Q=e=>new BQ(e),BQ=class extends BW{constructor(e){super(e,IQ)}};function PQ({router:e,children:n,...t}){aD(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=_.jsx(SD.Provider,{value:e,children:n});return e.options.Wrap?_.jsx(e.options.Wrap,{children:r}):r}function FQ({router:e,...n}){return _.jsx(PQ,{router:e,...n,children:_.jsx(DQ,{})})}function HQ(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 qQ(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=HQ(e),a=xi(),{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 h=async f=>{function p(b){const y=a.parseLocation(b),[,x,C]=a.getMatchedRoutes(y.pathname);return C===void 0?{routeId:"__notFound__",fullPath:y.pathname,pathname:y.pathname,params:x,search:a.options.parseSearch(b.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:y.pathname,params:x,search:a.options.parseSearch(b.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(b=>{u({status:"blocked",current:m,next:w,action:f.action,proceed:()=>b(!1),reset:()=>b(!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:h,enableBeforeUnload:r})},[t,r,s,i,o,a]),c}function LD(e){const n=xi({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return oc(t.stores.__store,iS(e,t))}function UQ(e){const n=xi();return oc(n.stores.location,iS(e,n))}const Tv=new WeakMap,tv=new WeakMap;function lo(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))Tv.set(s,(Tv.get(s)??0)+1),(r=tv.get(s))==null||r.add(t)}function jm(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 Kh(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?Tv.get(s):void 0,a=await t();if(!s||Tv.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;tv.set(s,o);try{const c=await t();return o.size?r(c,e.getQueryData(n),o):c}finally{tv.get(s)===o&&tv.delete(s)}}const Nh=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function ID(e){const n=e.queryKey[2];if(n==="resolvedFile")return Nh(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&&Nh(t.ref)}function Pa(e,n=Ga(),t,r=!1){if(!Gn(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!ID(i)&&(!t||t(i))};r?et.cancelQueries(s).then(()=>{Gn(n)&&et.invalidateQueries(s)}):et.invalidateQueries(s)}const $D=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],oS=["getArtifacts","getArtifactFileText","getArtifactFileMetadata"],GQ=["listProjects","listProjectActivity","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...oS,...$D,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function VQ(e,n=Ga(),t=!1){const r=et.getQueryData([...n,"listChatSessions",e])??[],s=et.getQueryData([...n,"listRuns",e])??[],i=et.getQueryData([...n,"listExperiments",e])??[];Pa([...$D,...oS,"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 Bb(e){const n=Ga();vl.add(e),lo(et,[...n,"listChatSessions"],e),et.setQueriesData({queryKey:[...n,"listChatSessions"]},t=>t==null?void 0:t.filter(r=>r.id!==e));for(const t of["getChatMessages","getSessionWorktree"])Qk({queryKey:[...n,t,e]})}function KQ(e){const n=Ga(),t=et.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])Bb(r.id);Qk({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const WQ={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 QQ(e,n){var a;if(!Gn(n))return;const t=(o,c=n,u)=>Pa(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(WQ[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),et.invalidateQueries({queryKey:["gateway","runtime"]});return}if(r.startsWith("/api/chat/")){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")){VQ(o,n,!0);return}t(["listProjects","listProjectActivity"],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 XQ={},YQ="en",cS=["en","zh-CN","fa","ar","es","hi"],BD="orx:locale",lS=["localStorage","preferredLanguage","baseLocale"],nN=[],O0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let rN=!1,E=()=>{var t;let e=lS;!O0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=HD(window.location.href));const n=ZQ(e);if(n)return rN||(rN=!0,PD(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function ZQ(e,n){let t;for(const r of e){if(r==="baseLocale")t=YQ;else if(r==="preferredLanguage"&&!O0)t=rX();else if(r==="localStorage"&&!O0)t=localStorage.getItem(BD)??void 0;else if(qD(r)&&Rv.has(r)){const i=Rv.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return tX(a)}}const s=D0(t);if(s)return s}}const JQ=e=>{window.location.reload()};let PD=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=E()}catch{}const s=[];let i=lS;!O0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=HD(window.location.href));for(const c of i)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(BD,e);else if(qD(c)&&Rv.has(c)){const u=Rv.get(c);if(u){let h=u.setLocale(e);h instanceof Promise&&(h=h.catch(f=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:f})}),s.push(h))}}}const a=()=>{!O0&&t.reload&&window.location&&e!==r&&JQ()};if(s.length)return Promise.all(s).then(()=>{a()});a()},eX=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function D0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of cS)if(t.toLowerCase()===n)return t}function FD(e){return!!e&&cS.some(n=>n===e)}function tX(e){const n=D0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${cS.join(", ")}`)}function nX(e,n){return e.exec(n.href)}function rX(){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=D0(t.fullTag);if(r)return r;const s=D0(t.baseTag);if(s)return s}}function sX(e){return iX(e)}function iX(e){const n=typeof e=="string"?new URL(e,eX()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&D0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let sN,iN;function aX(e){if(nN.length===0)return;const n=typeof e=="string"?e:e.href;if(sN===n)return iN;const t=new URL(n,"http://example.com"),r=sX(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of nN){const c=new XQ(o.match,a.href);if(nX(c,a)){i=o;break}}if(i)break}return sN=n,iN=i,i}function HD(e){const n=aX(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:lS}const Rv=new Map;function qD(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const oX=e=>`Actions for ${e==null?void 0:e.name}`,cX=e=>`${e==null?void 0:e.name} 的操作`,lX=e=>`عملیات ${e==null?void 0:e.name}`,uX=e=>`إجراءات ${e==null?void 0:e.name}`,_X=e=>`Acciones para ${e==null?void 0:e.name}`,fX=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,dX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cX(e):t==="fa"?lX(e):t==="ar"?uX(e):t==="es"?_X(e):t==="hi"?fX(e):oX(e)}),hX=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,pX=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,mX=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,gX=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,vX=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,bX=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,yX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pX(e):t==="fa"?mX(e):t==="ar"?gX(e):t==="es"?vX(e):t==="hi"?bX(e):hX(e)}),xX=e=>`Branch: ${e==null?void 0:e.branch}`,wX=e=>`分支:${e==null?void 0:e.branch}`,kX=e=>`شاخه: ${e==null?void 0:e.branch}`,SX=e=>`الفرع: ${e==null?void 0:e.branch}`,CX=e=>`Rama: ${e==null?void 0:e.branch}`,EX=e=>`ब्रांच: ${e==null?void 0:e.branch}`,NX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wX(e):t==="fa"?kX(e):t==="ar"?SX(e):t==="es"?CX(e):t==="hi"?EX(e):xX(e)}),zX=e=>`Browse code on ${e==null?void 0:e.branch}`,jX=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,AX=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,TX=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,RX=e=>`Explorar el código en ${e==null?void 0:e.branch}`,MX=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,UD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jX(e):t==="fa"?AX(e):t==="ar"?TX(e):t==="es"?RX(e):t==="hi"?MX(e):zX(e)}),OX=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,DX=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,LX=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,IX=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,$X=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,BX=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,PX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DX(e):t==="fa"?LX(e):t==="ar"?IX(e):t==="es"?$X(e):t==="hi"?BX(e):OX(e)}),FX=e=>`Collapse ${e==null?void 0:e.name}`,HX=e=>`折叠 ${e==null?void 0:e.name}`,qX=e=>`بستن ${e==null?void 0:e.name}`,UX=e=>`طيّ ${e==null?void 0:e.name}`,GX=e=>`Contraer ${e==null?void 0:e.name}`,VX=e=>`${e==null?void 0:e.name} समेटें`,KX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HX(e):t==="fa"?qX(e):t==="ar"?UX(e):t==="es"?GX(e):t==="hi"?VX(e):FX(e)}),WX=e=>`Committed changes versus ${e==null?void 0:e.parent}`,QX=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,XX=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,YX=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,ZX=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,JX=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,eY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QX(e):t==="fa"?XX(e):t==="ar"?YX(e):t==="es"?ZX(e):t==="hi"?JX(e):WX(e)}),tY=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,nY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,rY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,sY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,iY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,aY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,oY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nY(e):t==="fa"?rY(e):t==="ar"?sY(e):t==="es"?iY(e):t==="hi"?aY(e):tY(e)}),cY=e=>`Copy ${e==null?void 0:e.value}`,lY=e=>`复制 ${e==null?void 0:e.value}`,uY=e=>`کپی ${e==null?void 0:e.value}`,_Y=e=>`نسخ ${e==null?void 0:e.value}`,fY=e=>`Copiar ${e==null?void 0:e.value}`,dY=e=>`${e==null?void 0:e.value} कॉपी करें`,hY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lY(e):t==="fa"?uY(e):t==="ar"?_Y(e):t==="es"?fY(e):t==="hi"?dY(e):cY(e)}),pY=e=>`Delete ${e==null?void 0:e.name}`,mY=e=>`删除 ${e==null?void 0:e.name}`,gY=e=>`حذف ${e==null?void 0:e.name}`,vY=e=>`حذف ${e==null?void 0:e.name}`,bY=e=>`Eliminar ${e==null?void 0:e.name}`,yY=e=>`${e==null?void 0:e.name} हटाएं`,w3=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mY(e):t==="fa"?gY(e):t==="ar"?vY(e):t==="es"?bY(e):t==="hi"?yY(e):pY(e)}),xY=e=>`Download ${e==null?void 0:e.name}`,wY=e=>`下载 ${e==null?void 0:e.name}`,kY=e=>`بارگیری ${e==null?void 0:e.name}`,SY=e=>`تنزيل ${e==null?void 0:e.name}`,CY=e=>`Descargar ${e==null?void 0:e.name}`,EY=e=>`${e==null?void 0:e.name} डाउनलोड करें`,Mv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wY(e):t==="fa"?kY(e):t==="ar"?SY(e):t==="es"?CY(e):t==="hi"?EY(e):xY(e)}),NY=e=>`Expand ${e==null?void 0:e.name}`,zY=e=>`展开 ${e==null?void 0:e.name}`,jY=e=>`باز کردن ${e==null?void 0:e.name}`,AY=e=>`توسيع ${e==null?void 0:e.name}`,TY=e=>`Expandir ${e==null?void 0:e.name}`,RY=e=>`${e==null?void 0:e.name} फैलाएं`,MY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zY(e):t==="fa"?jY(e):t==="ar"?AY(e):t==="es"?TY(e):t==="hi"?RY(e):NY(e)}),OY=e=>`Hide additional ${e==null?void 0:e.target}`,DY=e=>`隐藏其余${e==null?void 0:e.target}`,LY=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,IY=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,$Y=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,BY=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,PY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DY(e):t==="fa"?LY(e):t==="ar"?IY(e):t==="es"?$Y(e):t==="hi"?BY(e):OY(e)}),FY=e=>`Hide error details for ${e==null?void 0:e.activity}`,HY=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,qY=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,UY=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,GY=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,VY=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,KY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HY(e):t==="fa"?qY(e):t==="ar"?UY(e):t==="es"?GY(e):t==="hi"?VY(e):FY(e)}),WY=e=>`${e==null?void 0:e.count} consecutive identical calls`,QY=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,XY=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,YY=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,ZY=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,JY=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,eZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QY(e):t==="fa"?XY(e):t==="ar"?YY(e):t==="es"?ZY(e):t==="hi"?JY(e):WY(e)}),tZ=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,nZ=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,rZ=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,sZ=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,iZ=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,aZ=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,oZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nZ(e):t==="fa"?rZ(e):t==="ar"?sZ(e):t==="es"?iZ(e):t==="hi"?aZ(e):tZ(e)}),cZ=e=>`Open ${e==null?void 0:e.branch} on GitHub`,lZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,uZ=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,_Z=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,fZ=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,dZ=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,GD=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lZ(e):t==="fa"?uZ(e):t==="ar"?_Z(e):t==="es"?fZ(e):t==="hi"?dZ(e):cZ(e)}),hZ=e=>`Open experiment ${e==null?void 0:e.name}`,pZ=e=>`打开实验 ${e==null?void 0:e.name}`,mZ=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,gZ=e=>`فتح التجربة ${e==null?void 0:e.name}`,vZ=e=>`Abrir el experimento ${e==null?void 0:e.name}`,bZ=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,yZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pZ(e):t==="fa"?mZ(e):t==="ar"?gZ(e):t==="es"?vZ(e):t==="hi"?bZ(e):hZ(e)}),xZ=e=>`Open ${e==null?void 0:e.path} in the right pane`,wZ=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,kZ=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,SZ=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,CZ=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,EZ=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,NZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wZ(e):t==="fa"?kZ(e):t==="ar"?SZ(e):t==="es"?CZ(e):t==="hi"?EZ(e):xZ(e)}),zZ=e=>`Open ${e==null?void 0:e.name}`,jZ=e=>`打开 ${e==null?void 0:e.name}`,AZ=e=>`باز کردن ${e==null?void 0:e.name}`,TZ=e=>`فتح ${e==null?void 0:e.name}`,RZ=e=>`Abrir ${e==null?void 0:e.name}`,MZ=e=>`${e==null?void 0:e.name} खोलें`,OZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jZ(e):t==="fa"?AZ(e):t==="ar"?TZ(e):t==="es"?RZ(e):t==="hi"?MZ(e):zZ(e)}),DZ=e=>`Open logs for run ${e==null?void 0:e.run}`,LZ=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,IZ=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,$Z=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,BZ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,PZ=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,FZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LZ(e):t==="fa"?IZ(e):t==="ar"?$Z(e):t==="es"?BZ(e):t==="hi"?PZ(e):DZ(e)}),HZ=e=>`Open ${e==null?void 0:e.name} on GitHub`,qZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,UZ=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,GZ=e=>`فتح ${e==null?void 0:e.name} على GitHub`,VZ=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,KZ=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,Ov=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qZ(e):t==="fa"?UZ(e):t==="ar"?GZ(e):t==="es"?VZ(e):t==="hi"?KZ(e):HZ(e)}),WZ=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,QZ=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,XZ=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,YZ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,ZZ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,JZ=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,eJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QZ(e):t==="fa"?XZ(e):t==="ar"?YZ(e):t==="es"?ZZ(e):t==="hi"?JZ(e):WZ(e)}),tJ=e=>`Overleaf — ${e==null?void 0:e.status}`,nJ=e=>`Overleaf — ${e==null?void 0:e.status}`,rJ=e=>`Overleaf — ${e==null?void 0:e.status}`,sJ=e=>`Overleaf — ${e==null?void 0:e.status}`,iJ=e=>`Overleaf — ${e==null?void 0:e.status}`,aJ=e=>`Overleaf — ${e==null?void 0:e.status}`,oJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nJ(e):t==="fa"?rJ(e):t==="ar"?sJ(e):t==="es"?iJ(e):t==="hi"?aJ(e):tJ(e)}),cJ=e=>`Preview /${e==null?void 0:e.name} skill`,lJ=e=>`预览 /${e==null?void 0:e.name} 技能`,uJ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,_J=e=>`معاينة مهارة /${e==null?void 0:e.name}`,fJ=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,dJ=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,hJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lJ(e):t==="fa"?uJ(e):t==="ar"?_J(e):t==="es"?fJ(e):t==="hi"?dJ(e):cJ(e)}),pJ=e=>`Remove annotation ${e==null?void 0:e.number}`,mJ=e=>`移除批注 ${e==null?void 0:e.number}`,gJ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,vJ=e=>`إزالة التعليق ${e==null?void 0:e.number}`,bJ=e=>`Quitar la anotación ${e==null?void 0:e.number}`,yJ=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,xJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mJ(e):t==="fa"?gJ(e):t==="ar"?vJ(e):t==="es"?bJ(e):t==="hi"?yJ(e):pJ(e)}),wJ=e=>`Remove ${e==null?void 0:e.name}`,kJ=e=>`移除 ${e==null?void 0:e.name}`,SJ=e=>`حذف ${e==null?void 0:e.name}`,CJ=e=>`إزالة ${e==null?void 0:e.name}`,EJ=e=>`Quitar ${e==null?void 0:e.name}`,NJ=e=>`${e==null?void 0:e.name} हटाएं`,zJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kJ(e):t==="fa"?SJ(e):t==="ar"?CJ(e):t==="es"?EJ(e):t==="hi"?NJ(e):wJ(e)}),jJ=e=>`Remove queued message: ${e==null?void 0:e.text}`,AJ=e=>`移除排队消息:${e==null?void 0:e.text}`,TJ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,RJ=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,MJ=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,OJ=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,DJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AJ(e):t==="fa"?TJ(e):t==="ar"?RJ(e):t==="es"?MJ(e):t==="hi"?OJ(e):jJ(e)}),LJ=e=>`Retry queued message: ${e==null?void 0:e.text}`,IJ=e=>`重试排队消息:${e==null?void 0:e.text}`,$J=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,BJ=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,PJ=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,FJ=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,HJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IJ(e):t==="fa"?$J(e):t==="ar"?BJ(e):t==="es"?PJ(e):t==="hi"?FJ(e):LJ(e)}),qJ=e=>`Run ${e==null?void 0:e.value} in a terminal here`,UJ=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,GJ=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,VJ=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,KJ=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,WJ=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,aN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UJ(e):t==="fa"?GJ(e):t==="ar"?VJ(e):t==="es"?KJ(e):t==="hi"?WJ(e):qJ(e)}),QJ=e=>`Run ${e==null?void 0:e.id}`,XJ=e=>`运行 ${e==null?void 0:e.id}`,YJ=e=>`اجرای ${e==null?void 0:e.id}`,ZJ=e=>`تشغيل ${e==null?void 0:e.id}`,JJ=e=>`Ejecución ${e==null?void 0:e.id}`,eee=e=>`रन ${e==null?void 0:e.id}`,tee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XJ(e):t==="fa"?YJ(e):t==="ar"?ZJ(e):t==="es"?JJ(e):t==="hi"?eee(e):QJ(e)}),nee=e=>`Show error details for ${e==null?void 0:e.activity}`,ree=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,see=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,iee=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,aee=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,oee=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,cee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ree(e):t==="fa"?see(e):t==="ar"?iee(e):t==="es"?aee(e):t==="hi"?oee(e):nee(e)}),lee=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,uee=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,_ee=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,fee=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,dee=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,hee=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,pee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uee(e):t==="fa"?_ee(e):t==="ar"?fee(e):t==="es"?dee(e):t==="hi"?hee(e):lee(e)}),mee=e=>`${e==null?void 0:e.name} skill`,gee=e=>`${e==null?void 0:e.name} 技能`,vee=e=>`مهارت ${e==null?void 0:e.name}`,bee=e=>`مهارة ${e==null?void 0:e.name}`,yee=e=>`Skill ${e==null?void 0:e.name}`,xee=e=>`${e==null?void 0:e.name} स्किल`,wee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gee(e):t==="fa"?vee(e):t==="ar"?bee(e):t==="es"?yee(e):t==="hi"?xee(e):mee(e)}),kee=e=>`Value for ${e==null?void 0:e.name}`,See=e=>`${e==null?void 0:e.name} 的值`,Cee=e=>`مقدار ${e==null?void 0:e.name}`,Eee=e=>`قيمة ${e==null?void 0:e.name}`,Nee=e=>`Valor de ${e==null?void 0:e.name}`,zee=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,jee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?See(e):t==="fa"?Cee(e):t==="ar"?Eee(e):t==="es"?Nee(e):t==="hi"?zee(e):kee(e)}),Aee=()=>"Agent reported back",Tee=()=>"智能体已返回结果",Ree=()=>"عامل نتیجه را گزارش کرد",Mee=()=>"أبلغ الوكيل بالنتيجة",Oee=()=>"El agente informó de los resultados",Dee=()=>"एजेंट ने रिपोर्ट भेजी",Lee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tee():t==="fa"?Ree():t==="ar"?Mee():t==="es"?Oee():t==="hi"?Dee():Aee()}),Iee=()=>"Browse",$ee=()=>"浏览",Bee=()=>"مرور",Pee=()=>"تصفّح",Fee=()=>"Navegar",Hee=()=>"ब्राउज़ करें",qee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ee():t==="fa"?Bee():t==="ar"?Pee():t==="es"?Fee():t==="hi"?Hee():Iee()}),Uee=()=>"Browsing…",Gee=()=>"正在浏览…",Vee=()=>"در حال مرور…",Kee=()=>"جارٍ التصفّح…",Wee=()=>"Navegando…",Qee=()=>"ब्राउज़ कर रहा है…",Xee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gee():t==="fa"?Vee():t==="ar"?Kee():t==="es"?Wee():t==="hi"?Qee():Uee()}),Yee=()=>"Checked experiment status and updated notes",Zee=()=>"已检查实验状态并更新笔记",Jee=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",ete=()=>"فحص حالة التجربة وحدّث الملاحظات",tte=()=>"Consultó el estado del experimento y actualizó las notas",nte=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",rte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zee():t==="fa"?Jee():t==="ar"?ete():t==="es"?tte():t==="hi"?nte():Yee()}),ste=()=>"Closed an agent",ite=()=>"已关闭智能体",ate=()=>"عامل بسته شد",ote=()=>"أغلق وكيلًا",cte=()=>"Cerró un agente",lte=()=>"एक एजेंट बंद किया",ute=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ite():t==="fa"?ate():t==="ar"?ote():t==="es"?cte():t==="hi"?lte():ste()}),_te=()=>"Context compacted",fte=()=>"上下文已压缩",dte=()=>"زمینه فشرده شد",hte=()=>"تم ضغط السياق",pte=()=>"Contexto comprimido",mte=()=>"कॉन्टेक्स्ट छोटा किया गया",gte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fte():t==="fa"?dte():t==="ar"?hte():t==="es"?pte():t==="hi"?mte():_te()}),vte=()=>"Compacting conversation…",bte=()=>"正在压缩对话…",yte=()=>"در حال فشرده‌سازی گفت‌وگو…",xte=()=>"جارٍ ضغط المحادثة…",wte=()=>"Comprimiendo la conversación…",kte=()=>"बातचीत छोटी की जा रही है…",oN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bte():t==="fa"?yte():t==="ar"?xte():t==="es"?wte():t==="hi"?kte():vte()}),Ste=()=>"Compacting failed",Cte=()=>"压缩失败",Ete=()=>"فشرده‌سازی ناموفق بود",Nte=()=>"فشل الضغط",zte=()=>"Error al comprimir",jte=()=>"छोटा करना विफल",Ate=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cte():t==="fa"?Ete():t==="ar"?Nte():t==="es"?zte():t==="hi"?jte():Ste()}),Tte=e=>`Created ${e==null?void 0:e.target}`,Rte=e=>`已创建 ${e==null?void 0:e.target}`,Mte=e=>`${e==null?void 0:e.target} ایجاد شد`,Ote=e=>`أنشأ ${e==null?void 0:e.target}`,Dte=e=>`Creó ${e==null?void 0:e.target}`,Lte=e=>`${e==null?void 0:e.target} बनाया`,Ite=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Rte(e):t==="fa"?Mte(e):t==="ar"?Ote(e):t==="es"?Dte(e):t==="hi"?Lte(e):Tte(e)}),$te=()=>"Delegate",Bte=()=>"委派",Pte=()=>"واگذاری",Fte=()=>"تفويض",Hte=()=>"Delegar",qte=()=>"सौंपें",Ute=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bte():t==="fa"?Pte():t==="ar"?Fte():t==="es"?Hte():t==="hi"?qte():$te()}),Gte=()=>"Delegating…",Vte=()=>"正在委派…",Kte=()=>"در حال واگذاری…",Wte=()=>"جارٍ التفويض…",Qte=()=>"Delegando…",Xte=()=>"सौंप रहा है…",Yte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vte():t==="fa"?Kte():t==="ar"?Wte():t==="es"?Qte():t==="hi"?Xte():Gte()}),Zte=e=>`Deleted ${e==null?void 0:e.target}`,Jte=e=>`已删除 ${e==null?void 0:e.target}`,ene=e=>`${e==null?void 0:e.target} حذف شد`,tne=e=>`حذف ${e==null?void 0:e.target}`,nne=e=>`Eliminó ${e==null?void 0:e.target}`,rne=e=>`${e==null?void 0:e.target} हटाया`,sne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jte(e):t==="fa"?ene(e):t==="ar"?tne(e):t==="es"?nne(e):t==="hi"?rne(e):Zte(e)}),ine=()=>"Edit",ane=()=>"编辑",one=()=>"ویرایش",cne=()=>"تعديل",lne=()=>"Editar",une=()=>"संपादित करें",_ne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ane():t==="fa"?one():t==="ar"?cne():t==="es"?lne():t==="hi"?une():ine()}),fne=e=>`Edited ${e==null?void 0:e.target}`,dne=e=>`已编辑 ${e==null?void 0:e.target}`,hne=e=>`${e==null?void 0:e.target} ویرایش شد`,pne=e=>`عدّل ${e==null?void 0:e.target}`,mne=e=>`Editó ${e==null?void 0:e.target}`,gne=e=>`${e==null?void 0:e.target} संपादित किया`,vne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dne(e):t==="fa"?hne(e):t==="ar"?pne(e):t==="es"?mne(e):t==="hi"?gne(e):fne(e)}),bne=()=>"Editing…",yne=()=>"正在编辑…",xne=()=>"در حال ویرایش…",wne=()=>"جارٍ التعديل…",kne=()=>"Editando…",Sne=()=>"संपादित कर रहा है…",Cne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yne():t==="fa"?xne():t==="ar"?wne():t==="es"?kne():t==="hi"?Sne():bne()}),Ene=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,Nne=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,zne=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,jne=e=>`${e==null?void 0:e.activity} عن «${e==null?void 0:e.query}»`,Ane=e=>`${e==null?void 0:e.activity}: “${e==null?void 0:e.query}”`,Tne=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,Rne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nne(e):t==="fa"?zne(e):t==="ar"?jne(e):t==="es"?Ane(e):t==="hi"?Tne(e):Ene(e)}),Mne=()=>"Imported from your terminal — new turns continue in the agent's own history",One=()=>"从你的终端导入 — 新的回合将在智能体自己的历史中继续",Dne=()=>"از ترمینال شما وارد شد — نوبت‌های جدید در تاریخچهٔ خود عامل ادامه می‌یابند",Lne=()=>"مستورد من طرفيتك — الجولات الجديدة تتابع في سجل الوكيل نفسه",Ine=()=>"Importado desde tu terminal — los turnos nuevos continúan en el historial del agente",$ne=()=>"आपके टर्मिनल से इम्पोर्ट किया गया — नए टर्न एजेंट के अपने इतिहास में जारी रहेंगे",Bne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?One():t==="fa"?Dne():t==="ar"?Lne():t==="es"?Ine():t==="hi"?$ne():Mne()}),Pne=e=>`Listed files matching ${e==null?void 0:e.pattern}`,Fne=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,Hne=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,qne=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,Une=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,Gne=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,Vne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Fne(e):t==="fa"?Hne(e):t==="ar"?qne(e):t==="es"?Une(e):t==="hi"?Gne(e):Pne(e)}),Kne=()=>"Load",Wne=()=>"加载",Qne=()=>"بارگیری",Xne=()=>"تحميل",Yne=()=>"Cargar",Zne=()=>"लोड करें",Jne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wne():t==="fa"?Qne():t==="ar"?Xne():t==="es"?Yne():t==="hi"?Zne():Kne()}),ere=()=>"Loaded a skill",tre=()=>"已加载技能",nre=()=>"یک مهارت بارگیری شد",rre=()=>"حمّل مهارة",sre=()=>"Cargó una skill",ire=()=>"एक स्किल लोड की",are=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tre():t==="fa"?nre():t==="ar"?rre():t==="es"?sre():t==="hi"?ire():ere()}),ore=e=>`Loaded ${e==null?void 0:e.name} skill`,cre=e=>`已加载技能 ${e==null?void 0:e.name}`,lre=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,ure=e=>`حمّل مهارة ${e==null?void 0:e.name}`,_re=e=>`Cargó la skill ${e==null?void 0:e.name}`,fre=e=>`${e==null?void 0:e.name} स्किल लोड की`,dre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cre(e):t==="fa"?lre(e):t==="ar"?ure(e):t==="es"?_re(e):t==="hi"?fre(e):ore(e)}),hre=()=>"Loading…",pre=()=>"正在加载…",mre=()=>"در حال بارگیری…",gre=()=>"جارٍ التحميل…",vre=()=>"Cargando…",bre=()=>"लोड हो रहा है…",yre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pre():t==="fa"?mre():t==="ar"?gre():t==="es"?vre():t==="hi"?bre():hre()}),xre=e=>`Opened ${e==null?void 0:e.target}`,wre=e=>`已打开 ${e==null?void 0:e.target}`,kre=e=>`${e==null?void 0:e.target} باز شد`,Sre=e=>`فتح ${e==null?void 0:e.target}`,Cre=e=>`Abrió ${e==null?void 0:e.target}`,Ere=e=>`${e==null?void 0:e.target} खोला`,Nre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wre(e):t==="fa"?kre(e):t==="ar"?Sre(e):t==="es"?Cre(e):t==="hi"?Ere(e):xre(e)}),zre=e=>`Ran ${e==null?void 0:e.command}`,jre=e=>`已运行 ${e==null?void 0:e.command}`,Are=e=>`${e==null?void 0:e.command} اجرا شد`,Tre=e=>`نفّذ ${e==null?void 0:e.command}`,Rre=e=>`Ejecutó ${e==null?void 0:e.command}`,Mre=e=>`${e==null?void 0:e.command} चलाया`,Ore=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jre(e):t==="fa"?Are(e):t==="ar"?Tre(e):t==="es"?Rre(e):t==="hi"?Mre(e):zre(e)}),Dre=()=>"Ran a sub-agent",Lre=()=>"已运行子智能体",Ire=()=>"یک عامل فرعی اجرا شد",$re=()=>"شغّل وكيلًا فرعيًا",Bre=()=>"Ejecutó un subagente",Pre=()=>"एक सब-एजेंट चलाया",Fre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lre():t==="fa"?Ire():t==="ar"?$re():t==="es"?Bre():t==="hi"?Pre():Dre()}),Hre=()=>"Read",qre=()=>"读取",Ure=()=>"خواندن",Gre=()=>"قراءة",Vre=()=>"Leer",Kre=()=>"पढ़ें",Wre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qre():t==="fa"?Ure():t==="ar"?Gre():t==="es"?Vre():t==="hi"?Kre():Hre()}),Qre=()=>"Read experiment notes",Xre=()=>"已读取实验笔记",Yre=()=>"یادداشت‌های آزمایش خوانده شد",Zre=()=>"قرأ ملاحظات التجربة",Jre=()=>"Leyó las notas del experimento",ese=()=>"प्रयोग के नोट्स पढ़े",tse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xre():t==="fa"?Yre():t==="ar"?Zre():t==="es"?Jre():t==="hi"?ese():Qre()}),nse=()=>"Read a paper",rse=()=>"已读取论文",sse=()=>"یک مقاله خوانده شد",ise=()=>"قرأ ورقة",ase=()=>"Leyó un paper",ose=()=>"एक पेपर पढ़ा",cse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rse():t==="fa"?sse():t==="ar"?ise():t==="es"?ase():t==="hi"?ose():nse()}),lse=e=>`Read ${e==null?void 0:e.name} skill`,use=e=>`已读取技能 ${e==null?void 0:e.name}`,_se=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,fse=e=>`قرأ مهارة ${e==null?void 0:e.name}`,dse=e=>`Leyó la skill ${e==null?void 0:e.name}`,hse=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,iw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?use(e):t==="fa"?_se(e):t==="ar"?fse(e):t==="es"?dse(e):t==="hi"?hse(e):lse(e)}),pse=e=>`Read ${e==null?void 0:e.target}`,mse=e=>`已读取 ${e==null?void 0:e.target}`,gse=e=>`${e==null?void 0:e.target} خوانده شد`,vse=e=>`قرأ ${e==null?void 0:e.target}`,bse=e=>`Leyó ${e==null?void 0:e.target}`,yse=e=>`${e==null?void 0:e.target} पढ़ा`,Vp=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mse(e):t==="fa"?gse(e):t==="ar"?vse(e):t==="es"?bse(e):t==="hi"?yse(e):pse(e)}),xse=()=>"Read a web page",wse=()=>"已读取网页",kse=()=>"یک صفحهٔ وب خوانده شد",Sse=()=>"قرأ صفحة ويب",Cse=()=>"Leyó una página web",Ese=()=>"एक वेब पेज पढ़ा",Nse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wse():t==="fa"?kse():t==="ar"?Sse():t==="es"?Cse():t==="hi"?Ese():xse()}),zse=()=>"Reading…",jse=()=>"正在读取…",Ase=()=>"در حال خواندن…",Tse=()=>"جارٍ القراءة…",Rse=()=>"Leyendo…",Mse=()=>"पढ़ रहा है…",Ose=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jse():t==="fa"?Ase():t==="ar"?Tse():t==="es"?Rse():t==="hi"?Mse():zse()}),Dse=()=>"Resumed an agent",Lse=()=>"已恢复智能体",Ise=()=>"عامل از سر گرفته شد",$se=()=>"استأنف عمل وكيل",Bse=()=>"Reanudó un agente",Pse=()=>"एक एजेंट फिर से शुरू किया",Fse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lse():t==="fa"?Ise():t==="ar"?$se():t==="es"?Bse():t==="hi"?Pse():Dse()}),Hse=()=>"Review",qse=()=>"查看",Use=()=>"بازبینی",Gse=()=>"مراجعة",Vse=()=>"Revisar",Kse=()=>"समीक्षा करें",Wse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qse():t==="fa"?Use():t==="ar"?Gse():t==="es"?Vse():t==="hi"?Kse():Hse()}),Qse=()=>"Reviewed run log",Xse=()=>"已查看运行日志",Yse=()=>"گزارش اجرا بازبینی شد",Zse=()=>"راجع سجل التشغيل",Jse=()=>"Revisó el log de la ejecución",eie=()=>"रन लॉग की समीक्षा की",tie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xse():t==="fa"?Yse():t==="ar"?Zse():t==="es"?Jse():t==="hi"?eie():Qse()}),nie=()=>"Reviewed run logs",rie=()=>"已查看运行日志",sie=()=>"گزارش‌های اجرا بازبینی شد",iie=()=>"راجع سجلات التشغيل",aie=()=>"Revisó los logs de las ejecuciones",oie=()=>"रन लॉग की समीक्षा की",cie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rie():t==="fa"?sie():t==="ar"?iie():t==="es"?aie():t==="hi"?oie():nie()}),lie=()=>"Reviewed experiment status and notes",uie=()=>"已查看实验状态和笔记",_ie=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",fie=()=>"راجع حالة التجربة وملاحظاتها",die=()=>"Revisó el estado y las notas del experimento",hie=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",pie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uie():t==="fa"?_ie():t==="ar"?fie():t==="es"?die():t==="hi"?hie():lie()}),mie=()=>"Reviewing…",gie=()=>"正在查看…",vie=()=>"در حال بازبینی…",bie=()=>"جارٍ المراجعة…",yie=()=>"Revisando…",xie=()=>"समीक्षा कर रहा है…",wie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gie():t==="fa"?vie():t==="ar"?bie():t==="es"?yie():t==="hi"?xie():mie()}),kie=()=>"Run",Sie=()=>"运行",Cie=()=>"اجرا",Eie=()=>"تشغيل",Nie=()=>"Ejecutar",zie=()=>"चलाएं",jie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sie():t==="fa"?Cie():t==="ar"?Eie():t==="es"?Nie():t==="hi"?zie():kie()}),Aie=()=>"Running…",Tie=()=>"正在运行…",Rie=()=>"در حال اجرا…",Mie=()=>"جارٍ التشغيل…",Oie=()=>"Ejecutando…",Die=()=>"चल रहा है…",VD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tie():t==="fa"?Rie():t==="ar"?Mie():t==="es"?Oie():t==="hi"?Die():Aie()}),Lie=()=>"Search",Iie=()=>"搜索",$ie=()=>"جست‌وجو",Bie=()=>"بحث",Pie=()=>"Buscar",Fie=()=>"खोजें",Hie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iie():t==="fa"?$ie():t==="ar"?Bie():t==="es"?Pie():t==="hi"?Fie():Lie()}),qie=()=>"Searched alphaXiv full text",Uie=()=>"已搜索 alphaXiv 全文",Gie=()=>"متن کامل alphaXiv جست‌وجو شد",Vie=()=>"بحث في نص alphaXiv الكامل",Kie=()=>"Buscó en el texto completo de alphaXiv",Wie=()=>"alphaXiv का पूरा टेक्स्ट खोजा",Qie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uie():t==="fa"?Gie():t==="ar"?Vie():t==="es"?Kie():t==="hi"?Wie():qie()}),Xie=()=>"Searched alphaXiv semantically",Yie=()=>"已对 alphaXiv 进行语义搜索",Zie=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",Jie=()=>"أجرى بحثًا دلاليًا في alphaXiv",eae=()=>"Hizo una búsqueda semántica en alphaXiv",tae=()=>"alphaXiv को सिमेंटिक रूप से खोजा",nae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yie():t==="fa"?Zie():t==="ar"?Jie():t==="es"?eae():t==="hi"?tae():Xie()}),rae=()=>"Searched bioRxiv",sae=()=>"已搜索 bioRxiv",iae=()=>"bioRxiv جست‌وجو شد",aae=()=>"بحث في bioRxiv",oae=()=>"Buscó en bioRxiv",cae=()=>"bioRxiv खोजा",lae=((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()}),uae=()=>"Searched code",_ae=()=>"已搜索代码",fae=()=>"کد جست‌وجو شد",dae=()=>"بحث في الشيفرة",hae=()=>"Buscó en el código",pae=()=>"कोड खोजा",aw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ae():t==="fa"?fae():t==="ar"?dae():t==="es"?hae():t==="hi"?pae():uae()}),mae=e=>`Searched code for “${e==null?void 0:e.pattern}”`,gae=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,vae=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,bae=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,yae=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,xae=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,ow=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gae(e):t==="fa"?vae(e):t==="ar"?bae(e):t==="es"?yae(e):t==="hi"?xae(e):mae(e)}),wae=e=>`Searched images for “${e==null?void 0:e.query}”`,kae=e=>`已搜索图片“${e==null?void 0:e.query}”`,Sae=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,Cae=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,Eae=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,Nae=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,zae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kae(e):t==="fa"?Sae(e):t==="ar"?Cae(e):t==="es"?Eae(e):t==="hi"?Nae(e):wae(e)}),jae=()=>"Searched the literature",Aae=()=>"已搜索文献",Tae=()=>"منابع علمی جست‌وجو شد",Rae=()=>"بحث في الأدبيات",Mae=()=>"Buscó en la literatura",Oae=()=>"साहित्य खोजा",cN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aae():t==="fa"?Tae():t==="ar"?Rae():t==="es"?Mae():t==="hi"?Oae():jae()}),Dae=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,Lae=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,Iae=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,$ae=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,Bae=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,Pae=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,Fae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lae(e):t==="fa"?Iae(e):t==="ar"?$ae(e):t==="es"?Bae(e):t==="hi"?Pae(e):Dae(e)}),Hae=()=>"Searched OpenAlex",qae=()=>"已搜索 OpenAlex",Uae=()=>"OpenAlex جست‌وجو شد",Gae=()=>"بحث في OpenAlex",Vae=()=>"Buscó en OpenAlex",Kae=()=>"OpenAlex खोजा",Wae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qae():t==="fa"?Uae():t==="ar"?Gae():t==="es"?Vae():t==="hi"?Kae():Hae()}),Qae=()=>"Searched PubMed",Xae=()=>"已搜索 PubMed",Yae=()=>"PubMed جست‌وجو شد",Zae=()=>"بحث في PubMed",Jae=()=>"Buscó en PubMed",eoe=()=>"PubMed खोजा",toe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xae():t==="fa"?Yae():t==="ar"?Zae():t==="es"?Jae():t==="hi"?eoe():Qae()}),noe=e=>`Searched the web for “${e==null?void 0:e.query}”`,roe=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,soe=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,ioe=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,aoe=e=>`Buscó “${e==null?void 0:e.query}” en la web`,ooe=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,lN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?roe(e):t==="fa"?soe(e):t==="ar"?ioe(e):t==="es"?aoe(e):t==="hi"?ooe(e):noe(e)}),coe=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,loe=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,uoe=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,_oe=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,foe=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,doe=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,hoe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?loe(e):t==="fa"?uoe(e):t==="ar"?_oe(e):t==="es"?foe(e):t==="hi"?doe(e):coe(e)}),poe=()=>"Searching…",moe=()=>"正在搜索…",goe=()=>"در حال جست‌وجو…",voe=()=>"جارٍ البحث…",boe=()=>"Buscando…",yoe=()=>"खोज रहा है…",xoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?moe():t==="fa"?goe():t==="ar"?voe():t==="es"?boe():t==="hi"?yoe():poe()}),woe=()=>"Sent input to an agent",koe=()=>"已向智能体发送输入",Soe=()=>"ورودی به عامل فرستاده شد",Coe=()=>"أرسل مدخلًا إلى وكيل",Eoe=()=>"Envió información a un agente",Noe=()=>"एक एजेंट को इनपुट भेजा",zoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?koe():t==="fa"?Soe():t==="ar"?Coe():t==="es"?Eoe():t==="hi"?Noe():woe()}),joe=()=>"Spawned an agent",Aoe=()=>"已创建智能体",Toe=()=>"یک عامل ساخته شد",Roe=()=>"أنشأ وكيلًا",Moe=()=>"Creó un agente",Ooe=()=>"एक एजेंट शुरू किया",Doe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aoe():t==="fa"?Toe():t==="ar"?Roe():t==="es"?Moe():t==="hi"?Ooe():joe()}),Loe=()=>"Sub-agent",Ioe=()=>"子智能体",$oe=()=>"عامل فرعی",Boe=()=>"وكيل فرعي",Poe=()=>"Subagente",Foe=()=>"सब-एजेंट",Hoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ioe():t==="fa"?$oe():t==="ar"?Boe():t==="es"?Poe():t==="hi"?Foe():Loe()}),qoe=()=>"Sub-agent interrupted",Uoe=()=>"子智能体已中断",Goe=()=>"عامل فرعی متوقف شد",Voe=()=>"قُوطع الوكيل الفرعي",Koe=()=>"Subagente interrumpido",Woe=()=>"सब-एजेंट बाधित हुआ",Qoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uoe():t==="fa"?Goe():t==="ar"?Voe():t==="es"?Koe():t==="hi"?Woe():qoe()}),Xoe=()=>"Sub-agent started",Yoe=()=>"子智能体已启动",Zoe=()=>"عامل فرعی آغاز شد",Joe=()=>"بدأ الوكيل الفرعي",ece=()=>"Subagente iniciado",tce=()=>"सब-एजेंट शुरू हुआ",nce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yoe():t==="fa"?Zoe():t==="ar"?Joe():t==="es"?ece():t==="hi"?tce():Xoe()}),rce=()=>"Updated experiment notes",sce=()=>"已更新实验笔记",ice=()=>"یادداشت‌های آزمایش به‌روز شد",ace=()=>"حدّث ملاحظات التجربة",oce=()=>"Actualizó las notas del experimento",cce=()=>"प्रयोग के नोट्स अपडेट किए",lce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sce():t==="fa"?ice():t==="ar"?ace():t==="es"?oce():t==="hi"?cce():rce()}),uce=()=>"Waiting on an agent",_ce=()=>"正在等待智能体",fce=()=>"در انتظار عامل",dce=()=>"في انتظار وكيل",hce=()=>"Esperando a un agente",pce=()=>"एजेंट का इंतज़ार है",mce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ce():t==="fa"?fce():t==="ar"?dce():t==="es"?hce():t==="hi"?pce():uce()}),gce=e=>`Approval required: ${e==null?void 0:e.label}`,vce=e=>`需要批准:${e==null?void 0:e.label}`,bce=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,yce=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,xce=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,wce=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,uN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vce(e):t==="fa"?bce(e):t==="ar"?yce(e):t==="es"?xce(e):t==="hi"?wce(e):gce(e)}),kce=()=>"The CLI is retrying the turn.",Sce=()=>"CLI 正在重试本轮。",Cce=()=>"CLI در حال تلاش دوباره برای این نوبت است.",Ece=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",Nce=()=>"La CLI está reintentando el turno.",zce=()=>"CLI टर्न फिर से कोशिश कर रहा है।",jce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sce():t==="fa"?Cce():t==="ar"?Ece():t==="es"?Nce():t==="hi"?zce():kce()}),Ace=()=>"Continue is available.",Tce=()=>"可以继续。",Rce=()=>"ادامه در دسترس است.",Mce=()=>"المتابعة متاحة.",Oce=()=>"Puedes continuar.",Dce=()=>"जारी रखना उपलब्ध है।",Lce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tce():t==="fa"?Rce():t==="ar"?Mce():t==="es"?Oce():t==="hi"?Dce():Ace()}),Ice=()=>"Retry is available.",$ce=()=>"可以重试。",Bce=()=>"تلاش دوباره در دسترس است.",Pce=()=>"إعادة المحاولة متاحة.",Fce=()=>"Puedes reintentarlo.",Hce=()=>"फिर से कोशिश करना उपलब्ध है।",qce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ce():t==="fa"?Bce():t==="ar"?Pce():t==="es"?Fce():t==="hi"?Hce():Ice()}),Uce=()=>"Running a tool",Gce=()=>"正在运行工具",Vce=()=>"در حال اجرای ابزار",Kce=()=>"جارٍ تشغيل أداة",Wce=()=>"Ejecutando una herramienta",Qce=()=>"एक टूल चल रहा है",Xce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gce():t==="fa"?Vce():t==="ar"?Kce():t==="es"?Wce():t==="hi"?Qce():Uce()}),Yce=()=>"Tool activity completed",Zce=()=>"工具活动已完成",Jce=()=>"فعالیت ابزار کامل شد",ele=()=>"اكتمل نشاط الأداة",tle=()=>"Actividad de la herramienta completada",nle=()=>"टूल गतिविधि पूरी हुई",rle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zce():t==="fa"?Jce():t==="ar"?ele():t==="es"?tle():t==="hi"?nle():Yce()}),sle=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,ile=e=>`工具活动失败:${e==null?void 0:e.labels}`,ale=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,ole=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,cle=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,lle=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,ule=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ile(e):t==="fa"?ale(e):t==="ar"?ole(e):t==="es"?cle(e):t==="hi"?lle(e):sle(e)}),_le=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,fle=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,dle=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,hle=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,ple=e=>`Actividades de herramientas con error (${e==null?void 0:e.count}): ${e==null?void 0:e.labels}`,mle=e=>`${e==null?void 0:e.count} टूल गतिविधियाँ विफल: ${e==null?void 0:e.labels}`,gle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fle(e):t==="fa"?dle(e):t==="ar"?hle(e):t==="es"?ple(e):t==="hi"?mle(e):_le(e)}),vle=()=>"Turn did not finish.",ble=()=>"本轮未完成。",yle=()=>"این نوبت کامل نشد.",xle=()=>"لم تكتمل الجولة.",wle=()=>"El turno no terminó.",kle=()=>"यह टर्न पूरा नहीं हुआ।",Sle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ble():t==="fa"?yle():t==="ar"?xle():t==="es"?wle():t==="hi"?kle():vle()}),Cle=()=>"Artifacts",Ele=()=>"产物",Nle=()=>"خروجی‌ها",zle=()=>"المُخرَجات",jle=()=>"Artefactos",Ale=()=>"आर्टिफ़ैक्ट",KD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ele():t==="fa"?Nle():t==="ar"?zle():t==="es"?jle():t==="hi"?Ale():Cle()}),Tle=()=>"Close panel",Rle=()=>"关闭面板",Mle=()=>"بستن پنل",Ole=()=>"إغلاق اللوحة",Dle=()=>"Cerrar panel",Lle=()=>"पैनल बंद करें",L0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rle():t==="fa"?Mle():t==="ar"?Ole():t==="es"?Dle():t==="hi"?Lle():Tle()}),Ile=()=>"Current task",$le=()=>"当前任务",Ble=()=>"وظیفهٔ فعلی",Ple=()=>"المهمة الحالية",Fle=()=>"Tarea actual",Hle=()=>"मौजूदा टास्क",_N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$le():t==="fa"?Ble():t==="ar"?Ple():t==="es"?Fle():t==="hi"?Hle():Ile()}),qle=()=>"Drag to resize panel",Ule=()=>"拖动以调整面板大小",Gle=()=>"برای تغییر اندازهٔ پنل بکشید",Vle=()=>"اسحب لتغيير حجم اللوحة",Kle=()=>"Arrastra para cambiar el tamaño del panel",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=()=>"Drag toward the center to restore panel",Yle=()=>"向中央拖动以恢复面板",Zle=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",Jle=()=>"اسحب نحو المنتصف لاستعادة اللوحة",eue=()=>"Arrastra hacia el centro para restaurar el panel",tue=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",nue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yle():t==="fa"?Zle():t==="ar"?Jle():t==="es"?eue():t==="hi"?tue():Xle()}),rue=()=>"Entire project",sue=()=>"整个项目",iue=()=>"کل پروژه",aue=()=>"المشروع بالكامل",oue=()=>"Todo el proyecto",cue=()=>"पूरा प्रोजेक्ट",fN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sue():t==="fa"?iue():t==="ar"?aue():t==="es"?oue():t==="hi"?cue():rue()}),lue=()=>"Expand panel",uue=()=>"展开面板",_ue=()=>"گسترش پنل",fue=()=>"توسيع اللوحة",due=()=>"Expandir panel",hue=()=>"पैनल फैलाएं",dN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uue():t==="fa"?_ue():t==="ar"?fue():t==="es"?due():t==="hi"?hue():lue()}),pue=e=>`Experiment filter: ${e==null?void 0:e.scope}`,mue=e=>`实验筛选:${e==null?void 0:e.scope}`,gue=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,vue=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,bue=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,yue=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,xue=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mue(e):t==="fa"?gue(e):t==="ar"?vue(e):t==="es"?bue(e):t==="hi"?yue(e):pue(e)}),wue=()=>"Experiment view",kue=()=>"实验视图",Sue=()=>"نمای آزمایش",Cue=()=>"عرض التجربة",Eue=()=>"Vista de experimento",Nue=()=>"प्रयोग व्यू",zue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kue():t==="fa"?Sue():t==="ar"?Cue():t==="es"?Eue():t==="hi"?Nue():wue()}),jue=()=>"Experiments",Aue=()=>"实验",Tue=()=>"آزمایش‌ها",Rue=()=>"التجارب",Mue=()=>"Experimentos",Oue=()=>"प्रयोग",WD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aue():t==="fa"?Tue():t==="ar"?Rue():t==="es"?Mue():t==="hi"?Oue():jue()}),Due=()=>"Files",Lue=()=>"文件",Iue=()=>"فایل‌ها",$ue=()=>"الملفات",Bue=()=>"Archivos",Pue=()=>"फ़ाइलें",k3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lue():t==="fa"?Iue():t==="ar"?$ue():t==="es"?Bue():t==="hi"?Pue():Due()}),Fue=()=>"Filter experiments",Hue=()=>"筛选实验",que=()=>"فیلتر آزمایش‌ها",Uue=()=>"تصفية التجارب",Gue=()=>"Filtrar experimentos",Vue=()=>"प्रयोग फ़िल्टर करें",Kue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hue():t==="fa"?que():t==="ar"?Uue():t==="es"?Gue():t==="hi"?Vue():Fue()}),Wue=()=>"Current task filtering is unavailable for unattributed experiments",Que=()=>"存在无法归属的实验时,不能按当前任务筛选",Xue=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",Yue=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",Zue=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",Jue=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",e_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Que():t==="fa"?Xue():t==="ar"?Yue():t==="es"?Zue():t==="hi"?Jue():Wue()}),t_e=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",n_e=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",r_e=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",s_e=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",i_e=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",a_e=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",o_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n_e():t==="fa"?r_e():t==="ar"?s_e():t==="es"?i_e():t==="hi"?a_e():t_e()}),c_e=()=>"Open a task to filter to its experiments",l_e=()=>"请打开一个任务以筛选其实验",u_e=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",__e=()=>"افتح مهمة لعرض تجاربها فقط",f_e=()=>"Abre una tarea para filtrar por sus experimentos",d_e=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",h_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l_e():t==="fa"?u_e():t==="ar"?__e():t==="es"?f_e():t==="hi"?d_e():c_e()}),p_e=()=>"projects",m_e=()=>"项目",g_e=()=>"پروژه‌ها",v_e=()=>"المشاريع",b_e=()=>"los proyectos",y_e=()=>"प्रोजेक्ट",g0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m_e():t==="fa"?g_e():t==="ar"?v_e():t==="es"?b_e():t==="hi"?y_e():p_e()}),x_e=()=>"Restore panel",w_e=()=>"还原面板",k_e=()=>"بازگرداندن اندازهٔ پنل",S_e=()=>"استعادة اللوحة",C_e=()=>"Restaurar panel",E_e=()=>"पैनल वापस लाएं",hN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w_e():t==="fa"?k_e():t==="ar"?S_e():t==="es"?C_e():t==="hi"?E_e():x_e()}),N_e=()=>"Retry",z_e=()=>"重试",j_e=()=>"تلاش دوباره",A_e=()=>"إعادة المحاولة",T_e=()=>"Reintentar",R_e=()=>"फिर से कोशिश करें",si=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z_e():t==="fa"?j_e():t==="ar"?A_e():t==="es"?T_e():t==="hi"?R_e():N_e()}),M_e=()=>"Select a project to browse its files.",O_e=()=>"选择一个项目以浏览其文件。",D_e=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",L_e=()=>"اختر مشروعًا لتصفح ملفاته.",I_e=()=>"Selecciona un proyecto para explorar sus archivos.",$_e=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",B_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O_e():t==="fa"?D_e():t==="ar"?L_e():t==="es"?I_e():t==="hi"?$_e():M_e()}),P_e=()=>"settings",F_e=()=>"设置",H_e=()=>"تنظیمات",q_e=()=>"الإعدادات",U_e=()=>"la configuración",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=()=>"Show archived",W_e=()=>"显示已归档",Q_e=()=>"نمایش بایگانی‌شده‌ها",X_e=()=>"إظهار المؤرشف",Y_e=()=>"Mostrar archivados",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()}),efe=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,tfe=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,nfe=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,rfe=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,sfe=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,ife=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,afe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tfe(e):t==="fa"?nfe(e):t==="ar"?rfe(e):t==="es"?sfe(e):t==="hi"?ife(e):efe(e)}),ofe=()=>"Sub-agent",cfe=()=>"子智能体",lfe=()=>"عامل فرعی",ufe=()=>"وكيل فرعي",_fe=()=>"Subagente",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=()=>"Table",pfe=()=>"表格",mfe=()=>"جدول",gfe=()=>"جدول",vfe=()=>"Tabla",bfe=()=>"टेबल",yfe=((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()}),xfe=()=>"Tree",wfe=()=>"树状图",kfe=()=>"درخت",Sfe=()=>"شجرة",Cfe=()=>"Árbol",Efe=()=>"ट्री",Nfe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wfe():t==="fa"?kfe():t==="ar"?Sfe():t==="es"?Cfe():t==="hi"?Efe():xfe()}),zfe=e=>`Collapse ${e==null?void 0:e.name}`,jfe=e=>`折叠 ${e==null?void 0:e.name}`,Afe=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,Tfe=e=>`طيّ ${e==null?void 0:e.name}`,Rfe=e=>`Contraer ${e==null?void 0:e.name}`,Mfe=e=>`${e==null?void 0:e.name} समेटें`,Ofe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jfe(e):t==="fa"?Afe(e):t==="ar"?Tfe(e):t==="es"?Rfe(e):t==="hi"?Mfe(e):zfe(e)}),Dfe=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,Lfe=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,Ife=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,$fe=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,Bfe=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,Pfe=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,uS=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lfe(e):t==="fa"?Ife(e):t==="ar"?$fe(e):t==="es"?Bfe(e):t==="hi"?Pfe(e):Dfe(e)}),Ffe=e=>`Delete folder ${e==null?void 0:e.name}`,Hfe=e=>`删除文件夹 ${e==null?void 0:e.name}`,qfe=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,Ufe=e=>`حذف المجلد ${e==null?void 0:e.name}`,Gfe=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,Vfe=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,Kfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hfe(e):t==="fa"?qfe(e):t==="ar"?Ufe(e):t==="es"?Gfe(e):t==="hi"?Vfe(e):Ffe(e)}),Wfe=e=>`Expand ${e==null?void 0:e.name}`,Qfe=e=>`展开 ${e==null?void 0:e.name}`,Xfe=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,Yfe=e=>`توسيع ${e==null?void 0:e.name}`,Zfe=e=>`Expandir ${e==null?void 0:e.name}`,Jfe=e=>`${e==null?void 0:e.name} फैलाएं`,ede=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qfe(e):t==="fa"?Xfe(e):t==="ar"?Yfe(e):t==="es"?Zfe(e):t==="hi"?Jfe(e):Wfe(e)}),tde=()=>"Binary or unsupported file — no inline preview.",nde=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",rde=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",sde=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",ide=()=>"Archivo binario o no compatible — sin vista previa.",ade=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",ode=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nde():t==="fa"?rde():t==="ar"?sde():t==="es"?ide():t==="hi"?ade():tde()}),cde=()=>"Copy path",lde=()=>"复制路径",ude=()=>"کپی مسیر",_de=()=>"نسخ المسار",fde=()=>"Copiar ruta",dde=()=>"पथ कॉपी करें",hde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lde():t==="fa"?ude():t==="ar"?_de():t==="es"?fde():t==="hi"?dde():cde()}),pde=()=>"Artifact not found",mde=()=>"找不到产物",gde=()=>"خروجی پیدا نشد",vde=()=>"لم يُعثر على المُخرَج",bde=()=>"No se encontró el artefacto",yde=()=>"आर्टिफ़ैक्ट नहीं मिला",xde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mde():t==="fa"?gde():t==="ar"?vde():t==="es"?bde():t==="hi"?yde():pde()}),wde=()=>"Open raw",kde=()=>"打开原始文件",Sde=()=>"باز کردن فایل خام",Cde=()=>"فتح الملف الخام",Ede=()=>"Abrir sin formato",Nde=()=>"रॉ खोलें",zde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kde():t==="fa"?Sde():t==="ar"?Cde():t==="es"?Ede():t==="hi"?Nde():wde()}),jde=()=>"Click an artifact to view it",Ade=()=>"点击产物即可查看",Tde=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Rde=()=>"انقر على مُخرَج لعرضه",Mde=()=>"Selecciona un artefacto para verlo",Ode=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",Dde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ade():t==="fa"?Tde():t==="ar"?Rde():t==="es"?Mde():t==="hi"?Ode():jde()}),Lde=()=>"Delete artifact",Ide=()=>"删除产物",$de=()=>"حذف خروجی",Bde=()=>"حذف المُخرَج",Pde=()=>"Eliminar artefacto",Fde=()=>"आर्टिफ़ैक्ट हटाएं",pN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ide():t==="fa"?$de():t==="ar"?Bde():t==="es"?Pde():t==="hi"?Fde():Lde()}),Hde=()=>"Delete folder",qde=()=>"删除文件夹",Ude=()=>"حذف پوشه",Gde=()=>"حذف المجلد",Vde=()=>"Eliminar carpeta",Kde=()=>"फ़ोल्डर हटाएं",Wde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qde():t==="fa"?Ude():t==="ar"?Gde():t==="es"?Vde():t==="hi"?Kde():Hde()}),Qde=()=>"Failed to load:",Xde=()=>"加载失败:",Yde=()=>"بارگیری ناموفق بود:",Zde=()=>"تعذّر التحميل:",Jde=()=>"Error al cargar:",ehe=()=>"लोड नहीं हो सका:",the=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xde():t==="fa"?Yde():t==="ar"?Zde():t==="es"?Jde():t==="hi"?ehe():Qde()}),nhe=()=>"File truncated — showing the first 512 KB.",rhe=()=>"文件已截断——仅显示前 512 KB。",she=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",ihe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",ahe=()=>"Archivo truncado — se muestran los primeros 512 KB.",ohe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",che=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rhe():t==="fa"?she():t==="ar"?ihe():t==="es"?ahe():t==="hi"?ohe():nhe()}),lhe=()=>"Listing truncated — the folder has more artifacts.",uhe=()=>"列表已截断——文件夹中还有更多产物。",_he=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",fhe=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",dhe=()=>"Listado truncado — la carpeta tiene más artefactos.",hhe=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",phe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uhe():t==="fa"?_he():t==="ar"?fhe():t==="es"?dhe():t==="hi"?hhe():lhe()}),mhe=()=>"Loading…",ghe=()=>"正在加载…",vhe=()=>"در حال بارگیری…",bhe=()=>"جارٍ التحميل…",yhe=()=>"Cargando…",xhe=()=>"लोड हो रहा है…",QD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ghe():t==="fa"?vhe():t==="ar"?bhe():t==="es"?yhe():t==="hi"?xhe():mhe()}),whe=()=>"Loading artifacts…",khe=()=>"正在加载产物…",She=()=>"در حال بارگیری خروجی‌ها…",Che=()=>"جارٍ تحميل المُخرَجات…",Ehe=()=>"Cargando artefactos…",Nhe=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",zhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?khe():t==="fa"?She():t==="ar"?Che():t==="es"?Ehe():t==="hi"?Nhe():whe()}),jhe=()=>"Modified",Ahe=()=>"修改时间",The=()=>"ویرایش‌شده",Rhe=()=>"عُدّل",Mhe=()=>"Modificado",Ohe=()=>"बदला गया",Dhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ahe():t==="fa"?The():t==="ar"?Rhe():t==="es"?Mhe():t==="hi"?Ohe():jhe()}),Lhe=()=>"No artifacts yet",Ihe=()=>"尚无产物",$he=()=>"هنوز خروجی‌ای وجود ندارد",Bhe=()=>"لا توجد مُخرَجات بعد",Phe=()=>"Aún no hay artefactos",Fhe=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",Hhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ihe():t==="fa"?$he():t==="ar"?Bhe():t==="es"?Phe():t==="hi"?Fhe():Lhe()}),qhe=()=>"Open raw in new tab",Uhe=()=>"在新标签页中打开原始文件",Ghe=()=>"باز کردن فایل خام در زبانهٔ جدید",Vhe=()=>"فتح الملف الخام في تبويب جديد",Khe=()=>"Abrir sin formato en una pestaña nueva",Whe=()=>"नए टैब में रॉ खोलें",mN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uhe():t==="fa"?Ghe():t==="ar"?Vhe():t==="es"?Khe():t==="hi"?Whe():qhe()}),Qhe=()=>"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.",Xhe=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",Yhe=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",Zhe=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",Jhe=()=>"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.",epe=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",tpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xhe():t==="fa"?Yhe():t==="ar"?Zhe():t==="es"?Jhe():t==="hi"?epe():Qhe()}),npe=()=>"File too large to preview inline.",rpe=()=>"文件太大,无法内嵌预览。",spe=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",ipe=()=>"الملف كبير جدًا للمعاينة المضمّنة.",ape=()=>"El archivo es demasiado grande para previsualizarlo.",ope=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",cpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rpe():t==="fa"?spe():t==="ar"?ipe():t==="es"?ape():t==="hi"?ope():npe()}),lpe=()=>"This is the baseline branch, so there is no parent comparison.",upe=()=>"这是基线分支,因此没有父分支可供比较。",_pe=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",fpe=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",dpe=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",hpe=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",ppe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?upe():t==="fa"?_pe():t==="ar"?fpe():t==="es"?dpe():t==="hi"?hpe():lpe()}),mpe=()=>"Failed to load changes:",gpe=()=>"加载更改失败:",vpe=()=>"بارگیری تغییرات ناموفق بود:",bpe=()=>"تعذّر تحميل التغييرات:",ype=()=>"Error al cargar los cambios:",xpe=()=>"बदलाव लोड नहीं हो सके:",wpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gpe():t==="fa"?vpe():t==="ar"?bpe():t==="es"?ype():t==="hi"?xpe():mpe()}),kpe=()=>"Loading changes…",Spe=()=>"正在加载更改…",Cpe=()=>"در حال بارگیری تغییرات…",Epe=()=>"جارٍ تحميل التغييرات…",Npe=()=>"Cargando cambios…",zpe=()=>"बदलाव लोड हो रहे हैं…",jpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Spe():t==="fa"?Cpe():t==="ar"?Epe():t==="es"?Npe():t==="hi"?zpe():kpe()}),Ape=()=>"No committed changes from the parent branch.",Tpe=()=>"与父分支相比没有已提交的更改。",Rpe=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",Mpe=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",Ope=()=>"No hay cambios confirmados respecto a la rama padre.",Dpe=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",Lpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tpe():t==="fa"?Rpe():t==="ar"?Mpe():t==="es"?Ope():t==="hi"?Dpe():Ape()}),Ipe=e=>`agent ${e==null?void 0:e.number}`,$pe=e=>`智能体 ${e==null?void 0:e.number}`,Bpe=e=>`عامل ${e==null?void 0:e.number}`,Ppe=e=>`وكيل ${e==null?void 0:e.number}`,Fpe=e=>`agente ${e==null?void 0:e.number}`,Hpe=e=>`एजेंट ${e==null?void 0:e.number}`,gN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$pe(e):t==="fa"?Bpe(e):t==="ar"?Ppe(e):t==="es"?Fpe(e):t==="hi"?Hpe(e):Ipe(e)}),qpe=()=>"agent sessions",Upe=()=>"智能体会话",Gpe=()=>"نشست‌های عامل‌ها",Vpe=()=>"جلسات الوكلاء",Kpe=()=>"sesiones de agente",Wpe=()=>"एजेंट सेशन",Qpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Upe():t==="fa"?Gpe():t==="ar"?Vpe():t==="es"?Kpe():t==="hi"?Wpe():qpe()}),Xpe=()=>"All sessions",Ype=()=>"所有会话",Zpe=()=>"همهٔ نشست‌ها",Jpe=()=>"كل الجلسات",e0e=()=>"Todas las sesiones",t0e=()=>"सभी सेशन",XD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ype():t==="fa"?Zpe():t==="ar"?Jpe():t==="es"?e0e():t==="hi"?t0e():Xpe()}),n0e=e=>`${e==null?void 0:e.count} annotations`,r0e=e=>`${e==null?void 0:e.count} 条批注`,s0e=e=>`${e==null?void 0:e.count} یادداشت`,i0e=e=>`التعليقات: ${e==null?void 0:e.count}`,a0e=e=>`${e==null?void 0:e.count} anotaciones`,o0e=e=>`${e==null?void 0:e.count} एनोटेशन`,c0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?r0e(e):t==="fa"?s0e(e):t==="ar"?i0e(e):t==="es"?a0e(e):t==="hi"?o0e(e):n0e(e)}),l0e=()=>"Archive",u0e=()=>"归档",_0e=()=>"بایگانی",f0e=()=>"أرشفة",d0e=()=>"Archivar",h0e=()=>"आर्काइव करें",p0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u0e():t==="fa"?_0e():t==="ar"?f0e():t==="es"?d0e():t==="hi"?h0e():l0e()}),m0e=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",g0e=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",v0e=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",b0e=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",y0e=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",x0e=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",w0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g0e():t==="fa"?v0e():t==="ar"?b0e():t==="es"?y0e():t==="hi"?x0e():m0e()}),k0e=()=>"Asked about selected text",S0e=()=>"已询问所选文本",C0e=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",E0e=()=>"سأل عن النص المحدد",N0e=()=>"Preguntó sobre el texto seleccionado",z0e=()=>"चयनित टेक्स्ट के बारे में पूछा",j0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S0e():t==="fa"?C0e():t==="ar"?E0e():t==="es"?N0e():t==="hi"?z0e():k0e()}),A0e=()=>"Attachment",T0e=()=>"附件",R0e=()=>"پیوست",M0e=()=>"مرفق",O0e=()=>"Adjunto",D0e=()=>"अटैचमेंट",L0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T0e():t==="fa"?R0e():t==="ar"?M0e():t==="es"?O0e():t==="hi"?D0e():A0e()}),I0e=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,$0e=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,B0e=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,P0e=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,F0e=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,H0e=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,q0e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$0e(e):t==="fa"?B0e(e):t==="ar"?P0e(e):t==="es"?F0e(e):t==="hi"?H0e(e):I0e(e)}),U0e=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",G0e=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",V0e=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",K0e=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",W0e=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",Q0e=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",X0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G0e():t==="fa"?V0e():t==="ar"?K0e():t==="es"?W0e():t==="hi"?Q0e():U0e()}),Y0e=()=>"Wait for the turn to finish before running a command.",Z0e=()=>"请等待本轮结束后再运行命令。",J0e=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",eme=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",tme=()=>"Espera a que termine el turno antes de ejecutar un comando.",nme=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",rme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z0e():t==="fa"?J0e():t==="ar"?eme():t==="es"?tme():t==="hi"?nme():Y0e()}),sme=e=>`Exited with code ${e==null?void 0:e.code}`,ime=e=>`退出码 ${e==null?void 0:e.code}`,ame=e=>`با کد ${e==null?void 0:e.code} خارج شد`,ome=e=>`خرج برمز ${e==null?void 0:e.code}`,cme=e=>`Terminó con el código ${e==null?void 0:e.code}`,lme=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,ume=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ime(e):t==="fa"?ame(e):t==="ar"?ome(e):t==="es"?cme(e):t==="hi"?lme(e):sme(e)}),_me=e=>`Command not run: ${e==null?void 0:e.error}`,fme=e=>`命令未运行:${e==null?void 0:e.error}`,dme=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,hme=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,pme=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,mme=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,vN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fme(e):t==="fa"?dme(e):t==="ar"?hme(e):t==="es"?pme(e):t==="hi"?mme(e):_me(e)}),gme=()=>"Collapse tool activity",vme=()=>"折叠工具活动",bme=()=>"بستن فعالیت ابزارها",yme=()=>"طيّ نشاط الأداة",xme=()=>"Contraer actividad de herramientas",wme=()=>"टूल गतिविधि समेटें",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=()=>"Wait for the turn to finish before compacting.",Cme=()=>"请等待本轮结束后再压缩。",Eme=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",Nme=()=>"انتظر انتهاء الجولة قبل الضغط.",zme=()=>"Espera a que termine el turno antes de comprimir.",jme=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",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=e=>`Compacting failed: ${e==null?void 0:e.error}`,Rme=e=>`压缩失败:${e==null?void 0:e.error}`,Mme=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,Ome=e=>`فشل الضغط: ${e==null?void 0:e.error}`,Dme=e=>`Error al comprimir: ${e==null?void 0:e.error}`,Lme=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,Ime=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Rme(e):t==="fa"?Mme(e):t==="ar"?Ome(e):t==="es"?Dme(e):t==="hi"?Lme(e):Tme(e)}),$me=()=>"Continue",Bme=()=>"继续",Pme=()=>"ادامه",Fme=()=>"متابعة",Hme=()=>"Continuar",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=()=>"Copy response",Vme=()=>"复制回复",Kme=()=>"کپی پاسخ",Wme=()=>"نسخ الرد",Qme=()=>"Copiar respuesta",Xme=()=>"जवाब कॉपी करें",bN=((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()}),Yme=e=>`Delete “${e==null?void 0:e.title}”? + */var _N;function NQ(){if(_N)return rw;_N=1;var e=Nm(),n=EQ();function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}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 rw.useSyncExternalStoreWithSelector=function(u,h,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 b(j){if(!y){if(y=!0,x=j,j=p(j),m!==void 0&&k.hasValue){var A=k.value;if(m(A,j))return C=A}return C=j}if(A=C,r(x,j))return A;var z=p(j);return m!==void 0&&m(A,z)?(x=j,A):(x=j,C=z)}var y=!1,x,C,N=f===void 0?null:f;return[function(){return b(h())},N===null?void 0:function(){return b(N())}]},[h,f,p,m]);var v=s(u,w[0],w[1]);return a(function(){k.hasValue=!0,k.value=v},[v]),c(v),v},rw}var fN;function zQ(){return fN||(fN=1,nw.exports=NQ()),nw.exports}var PD=zQ();const jQ=Em(PD);function AQ(e,n){return e===n}function cc(e,n,t=AQ){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 PD.useSyncExternalStoreWithSelector(r,s,s,n,t)}var dN={};function fS(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=B_(t.current,s):s}}function Tf(e){const n=xi(),t=T.useContext(e.from?vQ:Ib),r=e.from??t,s=n.stores.getMatchStore(r),i=fS(e,n),a=cc(s,o=>o?i(o):dN);if(a!==dN)return a;(e.shouldThrow??!0)&&rS()}function FD(e){return Tf({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function HD(e){const{select:n,...t}=e;return Tf({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function qD(e){return Tf({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 UD(e){return Tf({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function $b(e){const n=xi();return T.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function dS(e){return Tf({...e,select:n=>e.select?e.select(n.context):n.context})}function aw(e){const n=T.useRef(e);return Ou(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function TQ(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function RQ(e,n,t){if(e!=null&&e.external)return Cv(e.href,t)?void 0:e.href;if(!BQ(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),Cv(n,t)?void 0:n}catch{}}function MQ(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!zW(e.pathname,n.pathname,r))return!1}else{const a=Nv(e.pathname,r),o=Nv(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!Ou(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 OQ(e,n){const t=xi(),r=uW(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,preloadIntentProximity:h,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:w,viewTransition:k,children:v,target:b,disabled:y,style:x,className:C,onClick:N,onBlur:j,onFocus:A,onMouseEnter:z,onMouseLeave:M,onTouchStart:D,ignoreBlocker:I,params:B,search:G,hash:U,state:Q,mask:V,reloadDocument:Z,unsafeRelative:J,from:$,_fromLocation:L,...q}=e,P=LD(),F=aw(e.search),re=aw(e.params),ie=aw(a),ue=T.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,F,re,e.state,e.mask,e.unsafeRelative]),se=T.useCallback(Le=>{const nt=t.buildLocation({_fromLocation:Le,...ue}),ke=$Q(nt.maskedLocation?nt.maskedLocation.publicHref:nt.publicHref,nt.maskedLocation?nt.maskedLocation.external:nt.external,t.history,y),me=RQ(ke,o,t.protocolAllowlist);return[ke==null?void 0:ke.href,me,MQ(Le,nt,ie,t.basepath,P,me!==void 0)]},[ie,y,P,ue,t,o]),[K,oe,ce]=cc(t.stores.location,se,TQ),pe=ce?Ch(s,{})??DQ:ow,ve=ce?ow:Ch(i,{})??ow,Me=[C,pe.className,ve.className].filter(Boolean).join(" "),Fe=(x||pe.style||ve.style)&&{...x,...pe.style,...ve.style},Ye=T.useRef(!1),Te=e.reloadDocument||oe||y?!1:c??t.options.defaultPreload,$e=u??t.options.defaultPreloadDelay??0,yt=T.useCallback(()=>{t.preloadRoute(ue).catch(Le=>{console.warn(Le),console.warn(dQ)})},[t,ue]),ot=T.useCallback(Le=>{if(!Le){cw(r);return}if(!(Le.isIntersecting??Te==="intent")){Le.isIntersecting===!1&&cw(r);return}if(!$e){yt();return}g0.has(r)||g0.set(r,setTimeout(()=>{g0.delete(r),yt()},$e))},[yt,r,Te,$e]);lW(r,ot,Te!=="viewport"),T.useEffect(()=>{Ye.current||Te==="render"&&(yt(),Ye.current=!0)},[yt,Te]);const Mt=Le=>{const nt=Le.currentTarget.getAttribute("target"),ke=b!==void 0?b:nt;!y&&!(Le.metaKey||Le.altKey||Le.ctrlKey||Le.shiftKey)&&!Le.defaultPrevented&&(!ke||ke==="_self")&&Le.button===0&&(Le.preventDefault(),t.navigate({...ue,replace:p,resetScroll:w,hashScrollIntoView:f,startTransition:m,viewTransition:k,ignoreBlocker:I}))};if(oe)return{...q,ref:r,href:oe,...v&&{children:v},...b&&{target:b},...y&&{disabled:y},...x&&{style:x},...C&&{className:C},...N&&{onClick:N},...j&&{onBlur:j},...A&&{onFocus:A},...z&&{onMouseEnter:z},...M&&{onMouseLeave:M},...D&&{onTouchStart:D}};const jt=()=>{Te==="intent"&&yt()},Pt=()=>{Te==="intent"&&cw(r)};return{...q,...pe,...ve,href:K,ref:r,onClick:kd([N,Mt]),onBlur:kd([j,Pt]),onFocus:kd([A,ot]),onMouseEnter:kd([z,ot]),onMouseLeave:kd([M,Pt]),onTouchStart:kd([D,jt]),disabled:!!y,target:b,...Fe&&{style:Fe},...Me&&{className:Me},...y&&LQ,...ce&&IQ}}var ow={},DQ={className:"active"},LQ={role:"link","aria-disabled":!0},IQ={"data-status":"active","aria-current":"page"},g0=new WeakMap,cw=e=>{clearTimeout(g0.get(e)),g0.delete(e)},kd=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function $Q(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function BQ(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var Bb=T.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=OQ(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)}),PQ=class extends DD{constructor(n){super(n),this.useMatch=t=>Tf({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>dS({...t,from:this.id}),this.useSearch=t=>UD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>qD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>HD({...t,from:this.id}),this.useLoaderData=t=>FD({...t,from:this.id}),this.useNavigate=()=>$b({from:this.fullPath}),this.Link=it.forwardRef((t,r)=>_.jsx(Bb,{ref:r,from:this.fullPath,...t}))}};function FQ(e){return new PQ(e)}function HQ(){return e=>UQ(e)}var qQ=class extends hQ{constructor(e){super(e),this.useMatch=n=>Tf({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>dS({...n,from:this.id}),this.useSearch=n=>UD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>qD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>HD({...n,from:this.id}),this.useLoaderData=n=>FD({...n,from:this.id}),this.useNavigate=()=>$b({from:this.fullPath}),this.Link=it.forwardRef((n,t)=>_.jsx(Bb,{ref:t,from:this.fullPath,...n}))}};function UQ(e){return new qQ(e)}function hc(e){return n=>{const t=FQ(n);return t.isRoot=!1,t}}function GQ(e){const n=xi(),t=`not-found-${cc(n.stores.location,r=>r.pathname)}-${cc(n.stores.status,r=>r)}`;return _.jsx(_S,{getResetKey:()=>t,onCatch:(r,s)=>{var i;if(Eh(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Eh(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function KQ(){return _.jsx("p",{children:"Not Found"})}function Rd(e){return _.jsx(_.Fragment,{children:e.children})}function GD(e,n,t){return n.options.notFoundComponent?_.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?_.jsx(e.options.defaultNotFoundComponent,{...t}):_.jsx(KQ,{})}function Pb(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?_.jsx(t,{}):null}var VQ=(e,n)=>e[0]===n[0]&&e[1]===n[1],KD=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,VD=T.memo(function({routeId:n}){const t=xi();return _.jsx(WQ,{router:t,match:cc(t.stores.getMatchStore(n),r=>r)})});function WQ({router:e,match:n}){var f,p;const t=e.routesById[n.routeId],r=Pb(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=KD(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?T.Suspense:Rd,u=s?_S:Rd,h=a?GQ:Rd;return _.jsxs(t.isRoot?t.options.shellComponent??Rd:Rd,{children:[_.jsx(Ib.Provider,{value:n.routeId,children:_.jsx(c,{fallback:r,children:_.jsx(u,{getResetKey:()=>n,errorComponent:s,onCatch:(m,w)=>{if(Eh(m))throw m.routeId??(m.routeId=n.routeId),m;i==null||i(m,w)},children:_.jsx(h,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return T.createElement(a,m)},children:o?_.jsx(mQ,{fallback:r,children:_.jsx(hN,{match:n})}):_.jsx(hN,{match:n})})})})}),null]})}var hN=T.memo(function({match:n}){const t=xi(),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(O0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!KD(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return Pb(t,s)}if(n.status==="notFound")return GD(t,s,n.error);if(n.status==="error")throw n.error;return a}),O0=T.memo(function(){const n=xi(),t=T.useContext(Ib);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=cc(o,c=>[!!c._notFound,c.error],VQ),i=cc(n.stores.ids,c=>c[c.indexOf(t)+1])}if(r)return GD(n,n.routesById[t],s);if(!i)return null;const a=_.jsx(VD,{routeId:i});return t===Wd?_.jsx(T.Suspense,{fallback:Pb(n),children:a}):a});function WD(e,n){const t=e[1];e.length=0,t==null||t(n)}function QQ({t:e}){const n=xi(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{WD(t,!1),t.push(s,i),e(n),T.startTransition(r)}),gD(()=>{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(ll(s.publicHref)!==ll(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",...Db(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function XQ(){const e=xi(),n=e.routesById[Wd],t=Pb(e,n),r=e.ssr?Rd:T.Suspense,s=_.jsxs(_.Fragment,{children:[_.jsx(QQ,{t:T.useState()[1]}),_.jsx(r,{fallback:t,children:_.jsx(YQ,{})})]});return e.options.InnerWrap?_.jsx(e.options.InnerWrap,{children:s}):s}function YQ(){const e=xi(),n=e._rendered,t=cc(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;gD(()=>{n[0]===t&&WD(n,!0)},[n,t]);const i=s?_.jsx(VD,{routeId:s}):null;return _.jsx(Ib.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:_.jsx(_S,{getResetKey:()=>r,onCatch:void 0,children:i})})}var ZQ=e=>({createMutableStore:cN,createReadonlyStore:cN,batch:kQ}),JQ=e=>new eX(e),eX=class extends eQ{constructor(e){super(e,ZQ)}};function tX({router:e,children:n,...t}){bD(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=_.jsx(ID.Provider,{value:e,children:n});return e.options.Wrap?_.jsx(e.options.Wrap,{children:r}):r}function nX({router:e,...n}){return _.jsx(tX,{router:e,...n,children:_.jsx(XQ,{})})}function rX(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 sX(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=rX(e),a=xi(),{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 h=async f=>{function p(b){const y=a.parseLocation(b),[,x,C]=a.getMatchedRoutes(y.pathname);return C===void 0?{routeId:"__notFound__",fullPath:y.pathname,pathname:y.pathname,params:x,search:a.options.parseSearch(b.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:y.pathname,params:x,search:a.options.parseSearch(b.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(b=>{u({status:"blocked",current:m,next:w,action:f.action,proceed:()=>b(!1),reset:()=>b(!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:h,enableBeforeUnload:r})},[t,r,s,i,o,a]),c}function QD(e){const n=xi({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return cc(t.stores.__store,fS(e,t))}function iX(e){const n=xi();return cc(n.stores.location,fS(e,n))}const Tv=new WeakMap,tv=new WeakMap;function oo(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))Tv.set(s,(Tv.get(s)??0)+1),(r=tv.get(s))==null||r.add(t)}function jm(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 Kh(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?Tv.get(s):void 0,a=await t();if(!s||Tv.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;tv.set(s,o);try{const c=await t();return o.size?r(c,e.getQueryData(n),o):c}finally{tv.get(s)===o&&tv.delete(s)}}const Nh=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function XD(e){const n=e.queryKey[2];if(n==="resolvedFile")return Nh(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&&Nh(t.ref)}function Pa(e,n=yi(),t,r=!1){if(!zn(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!XD(i)&&(!t||t(i))};r?tt.cancelQueries(s).then(()=>{zn(n)&&tt.invalidateQueries(s)}):tt.invalidateQueries(s)}const YD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],hS=["getArtifacts","getArtifactFileText","getArtifactFileMetadata","searchArtifacts","getFileLocation"],aX=["listProjects","listProjectActivity","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...hS,...YD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function oX(e,n=yi(),t=!1){const r=tt.getQueryData([...n,"listChatSessions",e])??[],s=tt.getQueryData([...n,"listRuns",e])??[],i=tt.getQueryData([...n,"listExperiments",e])??[];Pa([...YD,...hS,"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 Fb(e){const n=yi();bl.add(e),oo(tt,[...n,"listChatSessions"],e),tt.setQueriesData({queryKey:[...n,"listChatSessions"]},t=>t==null?void 0:t.filter(r=>r.id!==e));for(const t of["getChatMessages","getSessionWorktree"])nS({queryKey:[...n,t,e]})}function cX(e){const n=yi(),t=tt.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])Fb(r.id);nS({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const lX={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 uX(e,n){var a;if(!zn(n))return;const t=(o,c=n,u)=>Pa(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(lX[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),tt.invalidateQueries({queryKey:["gateway","runtime"]});return}if(r.startsWith("/api/chat/")){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")){oX(o,n,!0);return}t(["listProjects","listProjectActivity"],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 _X={},fX="en",pS=["en","zh-CN","fa","ar","es","hi"],ZD="orx:locale",mS=["localStorage","preferredLanguage","baseLocale"],pN=[],D0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let mN=!1,E=()=>{var t;let e=mS;!D0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=tL(window.location.href));const n=dX(e);if(n)return mN||(mN=!0,JD(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function dX(e,n){let t;for(const r of e){if(r==="baseLocale")t=fX;else if(r==="preferredLanguage"&&!D0)t=vX();else if(r==="localStorage"&&!D0)t=localStorage.getItem(ZD)??void 0;else if(nL(r)&&Rv.has(r)){const i=Rv.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return mX(a)}}const s=L0(t);if(s)return s}}const hX=e=>{window.location.reload()};let JD=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=E()}catch{}const s=[];let i=mS;!D0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=tL(window.location.href));for(const c of i)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(ZD,e);else if(nL(c)&&Rv.has(c)){const u=Rv.get(c);if(u){let h=u.setLocale(e);h instanceof Promise&&(h=h.catch(f=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:f})}),s.push(h))}}}const a=()=>{!D0&&t.reload&&window.location&&e!==r&&hX()};if(s.length)return Promise.all(s).then(()=>{a()});a()},pX=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function L0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of pS)if(t.toLowerCase()===n)return t}function eL(e){return!!e&&pS.some(n=>n===e)}function mX(e){const n=L0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${pS.join(", ")}`)}function gX(e,n){return e.exec(n.href)}function vX(){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=L0(t.fullTag);if(r)return r;const s=L0(t.baseTag);if(s)return s}}function bX(e){return yX(e)}function yX(e){const n=typeof e=="string"?new URL(e,pX()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&L0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let gN,vN;function xX(e){if(pN.length===0)return;const n=typeof e=="string"?e:e.href;if(gN===n)return vN;const t=new URL(n,"http://example.com"),r=bX(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of pN){const c=new _X(o.match,a.href);if(gX(c,a)){i=o;break}}if(i)break}return gN=n,vN=i,i}function tL(e){const n=xX(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:mS}const Rv=new Map;function nL(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const wX=e=>`Actions for ${e==null?void 0:e.name}`,kX=e=>`${e==null?void 0:e.name} 的操作`,SX=e=>`عملیات ${e==null?void 0:e.name}`,CX=e=>`إجراءات ${e==null?void 0:e.name}`,EX=e=>`Acciones para ${e==null?void 0:e.name}`,NX=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,zX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kX(e):t==="fa"?SX(e):t==="ar"?CX(e):t==="es"?EX(e):t==="hi"?NX(e):wX(e)}),jX=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,AX=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,TX=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,RX=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,MX=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,OX=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,DX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AX(e):t==="fa"?TX(e):t==="ar"?RX(e):t==="es"?MX(e):t==="hi"?OX(e):jX(e)}),LX=e=>`Branch: ${e==null?void 0:e.branch}`,IX=e=>`分支:${e==null?void 0:e.branch}`,$X=e=>`شاخه: ${e==null?void 0:e.branch}`,BX=e=>`الفرع: ${e==null?void 0:e.branch}`,PX=e=>`Rama: ${e==null?void 0:e.branch}`,FX=e=>`ब्रांच: ${e==null?void 0:e.branch}`,HX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IX(e):t==="fa"?$X(e):t==="ar"?BX(e):t==="es"?PX(e):t==="hi"?FX(e):LX(e)}),qX=e=>`Browse code on ${e==null?void 0:e.branch}`,UX=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,GX=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,KX=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,VX=e=>`Explorar el código en ${e==null?void 0:e.branch}`,WX=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,rL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UX(e):t==="fa"?GX(e):t==="ar"?KX(e):t==="es"?VX(e):t==="hi"?WX(e):qX(e)}),QX=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,XX=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,YX=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,ZX=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,JX=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,eY=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,tY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XX(e):t==="fa"?YX(e):t==="ar"?ZX(e):t==="es"?JX(e):t==="hi"?eY(e):QX(e)}),nY=e=>`Collapse ${e==null?void 0:e.name}`,rY=e=>`折叠 ${e==null?void 0:e.name}`,sY=e=>`بستن ${e==null?void 0:e.name}`,iY=e=>`طيّ ${e==null?void 0:e.name}`,aY=e=>`Contraer ${e==null?void 0:e.name}`,oY=e=>`${e==null?void 0:e.name} समेटें`,cY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rY(e):t==="fa"?sY(e):t==="ar"?iY(e):t==="es"?aY(e):t==="hi"?oY(e):nY(e)}),lY=e=>`Committed changes versus ${e==null?void 0:e.parent}`,uY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,_Y=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,fY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,dY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,hY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,pY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uY(e):t==="fa"?_Y(e):t==="ar"?fY(e):t==="es"?dY(e):t==="hi"?hY(e):lY(e)}),mY=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,gY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,vY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,bY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,yY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,xY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,wY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gY(e):t==="fa"?vY(e):t==="ar"?bY(e):t==="es"?yY(e):t==="hi"?xY(e):mY(e)}),kY=e=>`Copy ${e==null?void 0:e.value}`,SY=e=>`复制 ${e==null?void 0:e.value}`,CY=e=>`کپی ${e==null?void 0:e.value}`,EY=e=>`نسخ ${e==null?void 0:e.value}`,NY=e=>`Copiar ${e==null?void 0:e.value}`,zY=e=>`${e==null?void 0:e.value} कॉपी करें`,jY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SY(e):t==="fa"?CY(e):t==="ar"?EY(e):t==="es"?NY(e):t==="hi"?zY(e):kY(e)}),AY=e=>`Delete ${e==null?void 0:e.name}`,TY=e=>`删除 ${e==null?void 0:e.name}`,RY=e=>`حذف ${e==null?void 0:e.name}`,MY=e=>`حذف ${e==null?void 0:e.name}`,OY=e=>`Eliminar ${e==null?void 0:e.name}`,DY=e=>`${e==null?void 0:e.name} हटाएं`,N3=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TY(e):t==="fa"?RY(e):t==="ar"?MY(e):t==="es"?OY(e):t==="hi"?DY(e):AY(e)}),LY=e=>`Download ${e==null?void 0:e.name}`,IY=e=>`下载 ${e==null?void 0:e.name}`,$Y=e=>`بارگیری ${e==null?void 0:e.name}`,BY=e=>`تنزيل ${e==null?void 0:e.name}`,PY=e=>`Descargar ${e==null?void 0:e.name}`,FY=e=>`${e==null?void 0:e.name} डाउनलोड करें`,Mv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IY(e):t==="fa"?$Y(e):t==="ar"?BY(e):t==="es"?PY(e):t==="hi"?FY(e):LY(e)}),HY=e=>`Expand ${e==null?void 0:e.name}`,qY=e=>`展开 ${e==null?void 0:e.name}`,UY=e=>`باز کردن ${e==null?void 0:e.name}`,GY=e=>`توسيع ${e==null?void 0:e.name}`,KY=e=>`Expandir ${e==null?void 0:e.name}`,VY=e=>`${e==null?void 0:e.name} फैलाएं`,WY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qY(e):t==="fa"?UY(e):t==="ar"?GY(e):t==="es"?KY(e):t==="hi"?VY(e):HY(e)}),QY=e=>`Hide additional ${e==null?void 0:e.target}`,XY=e=>`隐藏其余${e==null?void 0:e.target}`,YY=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,ZY=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,JY=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,eZ=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,tZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XY(e):t==="fa"?YY(e):t==="ar"?ZY(e):t==="es"?JY(e):t==="hi"?eZ(e):QY(e)}),nZ=e=>`Hide error details for ${e==null?void 0:e.activity}`,rZ=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,sZ=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,iZ=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,aZ=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,oZ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,cZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rZ(e):t==="fa"?sZ(e):t==="ar"?iZ(e):t==="es"?aZ(e):t==="hi"?oZ(e):nZ(e)}),lZ=e=>`${e==null?void 0:e.count} consecutive identical calls`,uZ=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,_Z=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,fZ=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,dZ=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,hZ=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,pZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uZ(e):t==="fa"?_Z(e):t==="ar"?fZ(e):t==="es"?dZ(e):t==="hi"?hZ(e):lZ(e)}),mZ=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,gZ=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,vZ=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,bZ=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,yZ=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,xZ=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,wZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gZ(e):t==="fa"?vZ(e):t==="ar"?bZ(e):t==="es"?yZ(e):t==="hi"?xZ(e):mZ(e)}),kZ=e=>`Open ${e==null?void 0:e.branch} on GitHub`,SZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,CZ=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,EZ=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,NZ=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,zZ=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,sL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SZ(e):t==="fa"?CZ(e):t==="ar"?EZ(e):t==="es"?NZ(e):t==="hi"?zZ(e):kZ(e)}),jZ=e=>`Open experiment ${e==null?void 0:e.name}`,AZ=e=>`打开实验 ${e==null?void 0:e.name}`,TZ=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,RZ=e=>`فتح التجربة ${e==null?void 0:e.name}`,MZ=e=>`Abrir el experimento ${e==null?void 0:e.name}`,OZ=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,DZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AZ(e):t==="fa"?TZ(e):t==="ar"?RZ(e):t==="es"?MZ(e):t==="hi"?OZ(e):jZ(e)}),LZ=e=>`Open ${e==null?void 0:e.path} in the right pane`,IZ=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,$Z=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,BZ=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,PZ=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,FZ=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,HZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IZ(e):t==="fa"?$Z(e):t==="ar"?BZ(e):t==="es"?PZ(e):t==="hi"?FZ(e):LZ(e)}),qZ=e=>`Open ${e==null?void 0:e.name}`,UZ=e=>`打开 ${e==null?void 0:e.name}`,GZ=e=>`باز کردن ${e==null?void 0:e.name}`,KZ=e=>`فتح ${e==null?void 0:e.name}`,VZ=e=>`Abrir ${e==null?void 0:e.name}`,WZ=e=>`${e==null?void 0:e.name} खोलें`,QZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UZ(e):t==="fa"?GZ(e):t==="ar"?KZ(e):t==="es"?VZ(e):t==="hi"?WZ(e):qZ(e)}),XZ=e=>`Open logs for run ${e==null?void 0:e.run}`,YZ=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,ZZ=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,JZ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,eJ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,tJ=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,nJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YZ(e):t==="fa"?ZZ(e):t==="ar"?JZ(e):t==="es"?eJ(e):t==="hi"?tJ(e):XZ(e)}),rJ=e=>`Open ${e==null?void 0:e.name} on GitHub`,sJ=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,iJ=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,aJ=e=>`فتح ${e==null?void 0:e.name} على GitHub`,oJ=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,cJ=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,Ov=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sJ(e):t==="fa"?iJ(e):t==="ar"?aJ(e):t==="es"?oJ(e):t==="hi"?cJ(e):rJ(e)}),lJ=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,uJ=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,_J=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,fJ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,dJ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,hJ=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,pJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uJ(e):t==="fa"?_J(e):t==="ar"?fJ(e):t==="es"?dJ(e):t==="hi"?hJ(e):lJ(e)}),mJ=e=>`Overleaf — ${e==null?void 0:e.status}`,gJ=e=>`Overleaf — ${e==null?void 0:e.status}`,vJ=e=>`Overleaf — ${e==null?void 0:e.status}`,bJ=e=>`Overleaf — ${e==null?void 0:e.status}`,yJ=e=>`Overleaf — ${e==null?void 0:e.status}`,xJ=e=>`Overleaf — ${e==null?void 0:e.status}`,wJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gJ(e):t==="fa"?vJ(e):t==="ar"?bJ(e):t==="es"?yJ(e):t==="hi"?xJ(e):mJ(e)}),kJ=e=>`Preview /${e==null?void 0:e.name} skill`,SJ=e=>`预览 /${e==null?void 0:e.name} 技能`,CJ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,EJ=e=>`معاينة مهارة /${e==null?void 0:e.name}`,NJ=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,zJ=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,jJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SJ(e):t==="fa"?CJ(e):t==="ar"?EJ(e):t==="es"?NJ(e):t==="hi"?zJ(e):kJ(e)}),AJ=e=>`Remove annotation ${e==null?void 0:e.number}`,TJ=e=>`移除批注 ${e==null?void 0:e.number}`,RJ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,MJ=e=>`إزالة التعليق ${e==null?void 0:e.number}`,OJ=e=>`Quitar la anotación ${e==null?void 0:e.number}`,DJ=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,LJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TJ(e):t==="fa"?RJ(e):t==="ar"?MJ(e):t==="es"?OJ(e):t==="hi"?DJ(e):AJ(e)}),IJ=e=>`Remove ${e==null?void 0:e.name}`,$J=e=>`移除 ${e==null?void 0:e.name}`,BJ=e=>`حذف ${e==null?void 0:e.name}`,PJ=e=>`إزالة ${e==null?void 0:e.name}`,FJ=e=>`Quitar ${e==null?void 0:e.name}`,HJ=e=>`${e==null?void 0:e.name} हटाएं`,qJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$J(e):t==="fa"?BJ(e):t==="ar"?PJ(e):t==="es"?FJ(e):t==="hi"?HJ(e):IJ(e)}),UJ=e=>`Remove queued message: ${e==null?void 0:e.text}`,GJ=e=>`移除排队消息:${e==null?void 0:e.text}`,KJ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,VJ=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,WJ=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,QJ=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,XJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GJ(e):t==="fa"?KJ(e):t==="ar"?VJ(e):t==="es"?WJ(e):t==="hi"?QJ(e):UJ(e)}),YJ=e=>`Retry queued message: ${e==null?void 0:e.text}`,ZJ=e=>`重试排队消息:${e==null?void 0:e.text}`,JJ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,eee=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,tee=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,nee=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,ree=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZJ(e):t==="fa"?JJ(e):t==="ar"?eee(e):t==="es"?tee(e):t==="hi"?nee(e):YJ(e)}),see=e=>`Run ${e==null?void 0:e.value} in a terminal here`,iee=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,aee=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,oee=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,cee=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,lee=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,bN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iee(e):t==="fa"?aee(e):t==="ar"?oee(e):t==="es"?cee(e):t==="hi"?lee(e):see(e)}),uee=e=>`Run ${e==null?void 0:e.id}`,_ee=e=>`运行 ${e==null?void 0:e.id}`,fee=e=>`اجرای ${e==null?void 0:e.id}`,dee=e=>`تشغيل ${e==null?void 0:e.id}`,hee=e=>`Ejecución ${e==null?void 0:e.id}`,pee=e=>`रन ${e==null?void 0:e.id}`,mee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_ee(e):t==="fa"?fee(e):t==="ar"?dee(e):t==="es"?hee(e):t==="hi"?pee(e):uee(e)}),gee=e=>`Show error details for ${e==null?void 0:e.activity}`,vee=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,bee=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,yee=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,xee=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,wee=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,kee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vee(e):t==="fa"?bee(e):t==="ar"?yee(e):t==="es"?xee(e):t==="hi"?wee(e):gee(e)}),See=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,Cee=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,Eee=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,Nee=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,zee=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,jee=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,Aee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Cee(e):t==="fa"?Eee(e):t==="ar"?Nee(e):t==="es"?zee(e):t==="hi"?jee(e):See(e)}),Tee=e=>`${e==null?void 0:e.name} skill`,Ree=e=>`${e==null?void 0:e.name} 技能`,Mee=e=>`مهارت ${e==null?void 0:e.name}`,Oee=e=>`مهارة ${e==null?void 0:e.name}`,Dee=e=>`Skill ${e==null?void 0:e.name}`,Lee=e=>`${e==null?void 0:e.name} स्किल`,Iee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ree(e):t==="fa"?Mee(e):t==="ar"?Oee(e):t==="es"?Dee(e):t==="hi"?Lee(e):Tee(e)}),$ee=e=>`Value for ${e==null?void 0:e.name}`,Bee=e=>`${e==null?void 0:e.name} 的值`,Pee=e=>`مقدار ${e==null?void 0:e.name}`,Fee=e=>`قيمة ${e==null?void 0:e.name}`,Hee=e=>`Valor de ${e==null?void 0:e.name}`,qee=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,Uee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bee(e):t==="fa"?Pee(e):t==="ar"?Fee(e):t==="es"?Hee(e):t==="hi"?qee(e):$ee(e)}),Gee=()=>"Agent reported back",Kee=()=>"智能体已返回结果",Vee=()=>"عامل نتیجه را گزارش کرد",Wee=()=>"أبلغ الوكيل بالنتيجة",Qee=()=>"El agente informó de los resultados",Xee=()=>"एजेंट ने रिपोर्ट भेजी",Yee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kee():t==="fa"?Vee():t==="ar"?Wee():t==="es"?Qee():t==="hi"?Xee():Gee()}),Zee=()=>"Browse",Jee=()=>"浏览",ete=()=>"مرور",tte=()=>"تصفّح",nte=()=>"Navegar",rte=()=>"ब्राउज़ करें",ste=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jee():t==="fa"?ete():t==="ar"?tte():t==="es"?nte():t==="hi"?rte():Zee()}),ite=()=>"Browsing…",ate=()=>"正在浏览…",ote=()=>"در حال مرور…",cte=()=>"جارٍ التصفّح…",lte=()=>"Navegando…",ute=()=>"ब्राउज़ कर रहा है…",_te=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ate():t==="fa"?ote():t==="ar"?cte():t==="es"?lte():t==="hi"?ute():ite()}),fte=()=>"Checked experiment status and updated notes",dte=()=>"已检查实验状态并更新笔记",hte=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",pte=()=>"فحص حالة التجربة وحدّث الملاحظات",mte=()=>"Consultó el estado del experimento y actualizó las notas",gte=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",vte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dte():t==="fa"?hte():t==="ar"?pte():t==="es"?mte():t==="hi"?gte():fte()}),bte=()=>"Closed an agent",yte=()=>"已关闭智能体",xte=()=>"عامل بسته شد",wte=()=>"أغلق وكيلًا",kte=()=>"Cerró un agente",Ste=()=>"एक एजेंट बंद किया",Cte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yte():t==="fa"?xte():t==="ar"?wte():t==="es"?kte():t==="hi"?Ste():bte()}),Ete=()=>"Context compacted",Nte=()=>"上下文已压缩",zte=()=>"زمینه فشرده شد",jte=()=>"تم ضغط السياق",Ate=()=>"Contexto comprimido",Tte=()=>"कॉन्टेक्स्ट छोटा किया गया",Rte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nte():t==="fa"?zte():t==="ar"?jte():t==="es"?Ate():t==="hi"?Tte():Ete()}),Mte=()=>"Compacting conversation…",Ote=()=>"正在压缩对话…",Dte=()=>"در حال فشرده‌سازی گفت‌وگو…",Lte=()=>"جارٍ ضغط المحادثة…",Ite=()=>"Comprimiendo la conversación…",$te=()=>"बातचीत छोटी की जा रही है…",yN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ote():t==="fa"?Dte():t==="ar"?Lte():t==="es"?Ite():t==="hi"?$te():Mte()}),Bte=()=>"Compacting failed",Pte=()=>"压缩失败",Fte=()=>"فشرده‌سازی ناموفق بود",Hte=()=>"فشل الضغط",qte=()=>"Error al comprimir",Ute=()=>"छोटा करना विफल",Gte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pte():t==="fa"?Fte():t==="ar"?Hte():t==="es"?qte():t==="hi"?Ute():Bte()}),Kte=e=>`Created ${e==null?void 0:e.target}`,Vte=e=>`已创建 ${e==null?void 0:e.target}`,Wte=e=>`${e==null?void 0:e.target} ایجاد شد`,Qte=e=>`أنشأ ${e==null?void 0:e.target}`,Xte=e=>`Creó ${e==null?void 0:e.target}`,Yte=e=>`${e==null?void 0:e.target} बनाया`,Zte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vte(e):t==="fa"?Wte(e):t==="ar"?Qte(e):t==="es"?Xte(e):t==="hi"?Yte(e):Kte(e)}),Jte=()=>"Delegate",ene=()=>"委派",tne=()=>"واگذاری",nne=()=>"تفويض",rne=()=>"Delegar",sne=()=>"सौंपें",ine=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ene():t==="fa"?tne():t==="ar"?nne():t==="es"?rne():t==="hi"?sne():Jte()}),ane=()=>"Delegating…",one=()=>"正在委派…",cne=()=>"در حال واگذاری…",lne=()=>"جارٍ التفويض…",une=()=>"Delegando…",_ne=()=>"सौंप रहा है…",fne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?one():t==="fa"?cne():t==="ar"?lne():t==="es"?une():t==="hi"?_ne():ane()}),dne=e=>`Deleted ${e==null?void 0:e.target}`,hne=e=>`已删除 ${e==null?void 0:e.target}`,pne=e=>`${e==null?void 0:e.target} حذف شد`,mne=e=>`حذف ${e==null?void 0:e.target}`,gne=e=>`Eliminó ${e==null?void 0:e.target}`,vne=e=>`${e==null?void 0:e.target} हटाया`,bne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hne(e):t==="fa"?pne(e):t==="ar"?mne(e):t==="es"?gne(e):t==="hi"?vne(e):dne(e)}),yne=()=>"Edit",xne=()=>"编辑",wne=()=>"ویرایش",kne=()=>"تعديل",Sne=()=>"Editar",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=e=>`Edited ${e==null?void 0:e.target}`,zne=e=>`已编辑 ${e==null?void 0:e.target}`,jne=e=>`${e==null?void 0:e.target} ویرایش شد`,Ane=e=>`عدّل ${e==null?void 0:e.target}`,Tne=e=>`Editó ${e==null?void 0:e.target}`,Rne=e=>`${e==null?void 0:e.target} संपादित किया`,Mne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zne(e):t==="fa"?jne(e):t==="ar"?Ane(e):t==="es"?Tne(e):t==="hi"?Rne(e):Nne(e)}),One=()=>"Editing…",Dne=()=>"正在编辑…",Lne=()=>"در حال ویرایش…",Ine=()=>"جارٍ التعديل…",$ne=()=>"Editando…",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.activity} for “${e==null?void 0:e.query}”`,Hne=e=>`${e==null?void 0:e.activity}:“${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}”`,Kne=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,Vne=((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"?Kne(e):Fne(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} اجرا شد`,Kre=e=>`نفّذ ${e==null?void 0:e.command}`,Vre=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"?Kre(e):t==="es"?Vre(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} स्किल पढ़ी`,lw=((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} पढ़ा`,Vp=((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=()=>"در حال خواندن…",Kse=()=>"جارٍ القراءة…",Vse=()=>"Leyendo…",Wse=()=>"पढ़ रहा है…",Qse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Use():t==="fa"?Gse():t==="ar"?Kse():t==="es"?Vse():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…",Kie=()=>"正在运行…",Vie=()=>"در حال اجرا…",Wie=()=>"جارٍ التشغيل…",Qie=()=>"Ejecutando…",Xie=()=>"चल रहा है…",iL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kie():t==="fa"?Vie():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=()=>"कोड खोजा",uw=((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}” के लिए कोड खोजा`,_w=((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=()=>"已搜索文献",Kae=()=>"منابع علمی جست‌وجو شد",Vae=()=>"بحث في الأدبيات",Wae=()=>"Buscó en la literatura",Qae=()=>"साहित्य खोजा",xN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gae():t==="fa"?Kae():t==="ar"?Vae():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}” के लिए वेब खोजा`,wN=((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=()=>"已创建智能体",Koe=()=>"یک عامل ساخته شد",Voe=()=>"أنشأ وكيلًا",Woe=()=>"Creó un agente",Qoe=()=>"एक एजेंट शुरू किया",Xoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Goe():t==="fa"?Koe():t==="ar"?Voe():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}`,kN=((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.",Kce=()=>"可以继续。",Vce=()=>"ادامه در دسترس است.",Wce=()=>"المتابعة متاحة.",Qce=()=>"Puedes continuar.",Xce=()=>"जारी रखना उपलब्ध है।",Yce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kce():t==="fa"?Vce():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=()=>"आर्टिफ़ैक्ट",aL=((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()}),Kle=()=>"Close panel",Vle=()=>"关闭面板",Wle=()=>"بستن پنل",Qle=()=>"إغلاق اللوحة",Xle=()=>"Cerrar panel",Yle=()=>"पैनल बंद करें",I0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vle():t==="fa"?Wle():t==="ar"?Qle():t==="es"?Xle():t==="hi"?Yle():Kle()}),Zle=()=>"Current task",Jle=()=>"当前任务",eue=()=>"وظیفهٔ فعلی",tue=()=>"المهمة الحالية",nue=()=>"Tarea actual",rue=()=>"मौजूदा टास्क",SN=((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=()=>"पूरा प्रोजेक्ट",CN=((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=()=>"पैनल फैलाएं",EN=((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=()=>"实验",Kue=()=>"آزمایش‌ها",Vue=()=>"التجارب",Wue=()=>"Experimentos",Que=()=>"प्रयोग",oL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gue():t==="fa"?Kue():t==="ar"?Vue():t==="es"?Wue():t==="hi"?Que():Uue()}),Xue=()=>"Files",Yue=()=>"文件",Zue=()=>"فایل‌ها",Jue=()=>"الملفات",e_e=()=>"Archivos",t_e=()=>"फ़ाइलें",z3=((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=()=>"प्रोजेक्ट",v0=((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=()=>"पैनल वापस लाएं",NN=((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=()=>"إعادة المحاولة",K_e=()=>"Reintentar",V_e=()=>"फिर से कोशिश करें",ni=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q_e():t==="fa"?U_e():t==="ar"?G_e():t==="es"?K_e():t==="hi"?V_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}`,Kfe=e=>`طيّ ${e==null?void 0:e.name}`,Vfe=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"?Kfe(e):t==="es"?Vfe(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}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,gS=((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=()=>"Some folders could not be searched. Results may be incomplete.",Gde=()=>"部分文件夹无法搜索,结果可能不完整。",Kde=()=>"جستجو در برخی پوشه‌ها ممکن نبود. نتایج ممکن است ناقص باشند.",Vde=()=>"تعذر البحث في بعض المجلدات. قد تكون النتائج غير مكتملة.",Wde=()=>"No se pudieron buscar algunas carpetas. Los resultados pueden estar incompletos.",Qde=()=>"कुछ फ़ोल्डरों में खोज नहीं हो सकी। परिणाम अधूरे हो सकते हैं।",Xde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gde():t==="fa"?Kde():t==="ar"?Vde():t==="es"?Wde():t==="hi"?Qde():Ude()}),Yde=()=>"Load more results",Zde=()=>"加载更多结果",Jde=()=>"بارگیری نتایج بیشتر",ehe=()=>"تحميل المزيد من النتائج",the=()=>"Cargar más resultados",nhe=()=>"और परिणाम लोड करें",rhe=((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()}),she=()=>"No matching artifacts",ihe=()=>"没有匹配的产物",ahe=()=>"فایل منطبقی پیدا نشد",ohe=()=>"لا توجد ملفات مطابقة",che=()=>"No hay artefactos coincidentes",lhe=()=>"कोई मेल खाता आर्टिफ़ैक्ट नहीं मिला",uhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ihe():t==="fa"?ahe():t==="ar"?ohe():t==="es"?che():t==="hi"?lhe():she()}),_he=()=>"Search artifacts by name or path",fhe=()=>"按名称或路径搜索产物",dhe=()=>"جستجوی فایل‌ها بر اساس نام یا مسیر",hhe=()=>"البحث في الملفات حسب الاسم أو المسار",phe=()=>"Buscar artefactos por nombre o ruta",mhe=()=>"नाम या पथ से आर्टिफ़ैक्ट खोजें",zN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fhe():t==="fa"?dhe():t==="ar"?hhe():t==="es"?phe():t==="hi"?mhe():_he()}),ghe=()=>"Searching…",vhe=()=>"正在搜索…",bhe=()=>"در حال جستجو…",yhe=()=>"جارٍ البحث…",xhe=()=>"Buscando…",whe=()=>"खोज रहे हैं…",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=()=>"Click an artifact to view it",Che=()=>"点击产物即可查看",Ehe=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Nhe=()=>"انقر على مُخرَج لعرضه",zhe=()=>"Selecciona un artefacto para verlo",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=()=>"Delete artifact",Rhe=()=>"删除产物",Mhe=()=>"حذف خروجی",Ohe=()=>"حذف المُخرَج",Dhe=()=>"Eliminar artefacto",Lhe=()=>"आर्टिफ़ैक्ट हटाएं",jN=((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=()=>"Delete folder",$he=()=>"删除文件夹",Bhe=()=>"حذف پوشه",Phe=()=>"حذف المجلد",Fhe=()=>"Eliminar carpeta",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=()=>"Failed to load:",Ghe=()=>"加载失败:",Khe=()=>"بارگیری ناموفق بود:",Vhe=()=>"تعذّر التحميل:",Whe=()=>"Error al cargar:",Qhe=()=>"लोड नहीं हो सका:",Xhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ghe():t==="fa"?Khe():t==="ar"?Vhe():t==="es"?Whe():t==="hi"?Qhe():Uhe()}),Yhe=()=>"File truncated — showing the first 512 KB.",Zhe=()=>"文件已截断——仅显示前 512 KB。",Jhe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",epe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",tpe=()=>"Archivo truncado — se muestran los primeros 512 KB.",npe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",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=()=>"Listing truncated — the folder has more artifacts.",ipe=()=>"列表已截断——文件夹中还有更多产物。",ape=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",ope=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",cpe=()=>"Listado truncado — la carpeta tiene más artefactos.",lpe=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",upe=((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()}),_pe=()=>"Loading…",fpe=()=>"正在加载…",dpe=()=>"در حال بارگیری…",hpe=()=>"جارٍ التحميل…",ppe=()=>"Cargando…",mpe=()=>"लोड हो रहा है…",cL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fpe():t==="fa"?dpe():t==="ar"?hpe():t==="es"?ppe():t==="hi"?mpe():_pe()}),gpe=()=>"Loading artifacts…",vpe=()=>"正在加载产物…",bpe=()=>"در حال بارگیری خروجی‌ها…",ype=()=>"جارٍ تحميل المُخرَجات…",xpe=()=>"Cargando artefactos…",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=()=>"Modified",Cpe=()=>"修改时间",Epe=()=>"ویرایش‌شده",Npe=()=>"عُدّل",zpe=()=>"Modificado",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=()=>"No artifacts yet",Rpe=()=>"尚无产物",Mpe=()=>"هنوز خروجی‌ای وجود ندارد",Ope=()=>"لا توجد مُخرَجات بعد",Dpe=()=>"Aún no hay artefactos",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=()=>"Open raw in new tab",Bpe=()=>"在新标签页中打开原始文件",Ppe=()=>"باز کردن فایل خام در زبانهٔ جدید",Fpe=()=>"فتح الملف الخام في تبويب جديد",Hpe=()=>"Abrir sin formato en una pestaña nueva",qpe=()=>"नए टैब में रॉ खोलें",AN=((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()}),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.",Gpe=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",Kpe=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",Vpe=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",Wpe=()=>"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.",Qpe=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",Xpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gpe():t==="fa"?Kpe():t==="ar"?Vpe():t==="es"?Wpe():t==="hi"?Qpe():Upe()}),Ype=()=>"File too large to preview inline.",Zpe=()=>"文件太大,无法内嵌预览。",Jpe=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",e0e=()=>"الملف كبير جدًا للمعاينة المضمّنة.",t0e=()=>"El archivo es demasiado grande para previsualizarlo.",n0e=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",r0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zpe():t==="fa"?Jpe():t==="ar"?e0e():t==="es"?t0e():t==="hi"?n0e():Ype()}),s0e=()=>"This is the baseline branch, so there is no parent comparison.",i0e=()=>"这是基线分支,因此没有父分支可供比较。",a0e=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",o0e=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",c0e=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",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=()=>"Failed to load changes:",f0e=()=>"加载更改失败:",d0e=()=>"بارگیری تغییرات ناموفق بود:",h0e=()=>"تعذّر تحميل التغييرات:",p0e=()=>"Error al cargar los cambios:",m0e=()=>"बदलाव लोड नहीं हो सके:",g0e=((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()}),v0e=()=>"Loading changes…",b0e=()=>"正在加载更改…",y0e=()=>"در حال بارگیری تغییرات…",x0e=()=>"جارٍ تحميل التغييرات…",w0e=()=>"Cargando cambios…",k0e=()=>"बदलाव लोड हो रहे हैं…",S0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b0e():t==="fa"?y0e():t==="ar"?x0e():t==="es"?w0e():t==="hi"?k0e():v0e()}),C0e=()=>"No committed changes from the parent branch.",E0e=()=>"与父分支相比没有已提交的更改。",N0e=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",z0e=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",j0e=()=>"No hay cambios confirmados respecto a la rama padre.",A0e=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",T0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E0e():t==="fa"?N0e():t==="ar"?z0e():t==="es"?j0e():t==="hi"?A0e():C0e()}),R0e=e=>`agent ${e==null?void 0:e.number}`,M0e=e=>`智能体 ${e==null?void 0:e.number}`,O0e=e=>`عامل ${e==null?void 0:e.number}`,D0e=e=>`وكيل ${e==null?void 0:e.number}`,L0e=e=>`agente ${e==null?void 0:e.number}`,I0e=e=>`एजेंट ${e==null?void 0:e.number}`,TN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?M0e(e):t==="fa"?O0e(e):t==="ar"?D0e(e):t==="es"?L0e(e):t==="hi"?I0e(e):R0e(e)}),$0e=()=>"agent sessions",B0e=()=>"智能体会话",P0e=()=>"نشست‌های عامل‌ها",F0e=()=>"جلسات الوكلاء",H0e=()=>"sesiones de agente",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=()=>"All sessions",K0e=()=>"所有会话",V0e=()=>"همهٔ نشست‌ها",W0e=()=>"كل الجلسات",Q0e=()=>"Todas las sesiones",X0e=()=>"सभी सेशन",lL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K0e():t==="fa"?V0e():t==="ar"?W0e():t==="es"?Q0e():t==="hi"?X0e():G0e()}),Y0e=e=>`${e==null?void 0:e.count} annotations`,Z0e=e=>`${e==null?void 0:e.count} 条批注`,J0e=e=>`${e==null?void 0:e.count} یادداشت`,eme=e=>`التعليقات: ${e==null?void 0:e.count}`,tme=e=>`${e==null?void 0:e.count} anotaciones`,nme=e=>`${e==null?void 0:e.count} एनोटेशन`,rme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Z0e(e):t==="fa"?J0e(e):t==="ar"?eme(e):t==="es"?tme(e):t==="hi"?nme(e):Y0e(e)}),sme=()=>"Archive",ime=()=>"归档",ame=()=>"بایگانی",ome=()=>"أرشفة",cme=()=>"Archivar",lme=()=>"आर्काइव करें",ume=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ime():t==="fa"?ame():t==="ar"?ome():t==="es"?cme():t==="hi"?lme():sme()}),_me=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",fme=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",dme=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",hme=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",pme=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",mme=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",gme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fme():t==="fa"?dme():t==="ar"?hme():t==="es"?pme():t==="hi"?mme():_me()}),vme=()=>"Asked about selected text",bme=()=>"已询问所选文本",yme=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",xme=()=>"سأل عن النص المحدد",wme=()=>"Preguntó sobre el texto seleccionado",kme=()=>"चयनित टेक्स्ट के बारे में पूछा",Sme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bme():t==="fa"?yme():t==="ar"?xme():t==="es"?wme():t==="hi"?kme():vme()}),Cme=()=>"Attachment",Eme=()=>"附件",Nme=()=>"پیوست",zme=()=>"مرفق",jme=()=>"Adjunto",Ame=()=>"अटैचमेंट",Tme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eme():t==="fa"?Nme():t==="ar"?zme():t==="es"?jme():t==="hi"?Ame():Cme()}),Rme=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,Mme=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,Ome=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,Dme=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,Lme=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,Ime=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,$me=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Mme(e):t==="fa"?Ome(e):t==="ar"?Dme(e):t==="es"?Lme(e):t==="hi"?Ime(e):Rme(e)}),Bme=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",Pme=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",Fme=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",Hme=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",qme=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",Ume=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",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()}),Kme=()=>"Wait for the turn to finish before running a command.",Vme=()=>"请等待本轮结束后再运行命令。",Wme=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",Qme=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",Xme=()=>"Espera a que termine el turno antes de ejecutar un comando.",Yme=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",Zme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vme():t==="fa"?Wme():t==="ar"?Qme():t==="es"?Xme():t==="hi"?Yme():Kme()}),Jme=e=>`Exited with code ${e==null?void 0:e.code}`,ege=e=>`退出码 ${e==null?void 0:e.code}`,tge=e=>`با کد ${e==null?void 0:e.code} خارج شد`,nge=e=>`خرج برمز ${e==null?void 0:e.code}`,rge=e=>`Terminó con el código ${e==null?void 0:e.code}`,sge=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,ige=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ege(e):t==="fa"?tge(e):t==="ar"?nge(e):t==="es"?rge(e):t==="hi"?sge(e):Jme(e)}),age=e=>`Command not run: ${e==null?void 0:e.error}`,oge=e=>`命令未运行:${e==null?void 0:e.error}`,cge=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,lge=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,uge=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,_ge=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,RN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oge(e):t==="fa"?cge(e):t==="ar"?lge(e):t==="es"?uge(e):t==="hi"?_ge(e):age(e)}),fge=()=>"Collapse tool activity",dge=()=>"折叠工具活动",hge=()=>"بستن فعالیت ابزارها",pge=()=>"طيّ نشاط الأداة",mge=()=>"Contraer actividad de herramientas",gge=()=>"टूल गतिविधि समेटें",vge=((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()}),bge=()=>"Wait for the turn to finish before compacting.",yge=()=>"请等待本轮结束后再压缩。",xge=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",wge=()=>"انتظر انتهاء الجولة قبل الضغط.",kge=()=>"Espera a que termine el turno antes de comprimir.",Sge=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",Cge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yge():t==="fa"?xge():t==="ar"?wge():t==="es"?kge():t==="hi"?Sge():bge()}),Ege=e=>`Compacting failed: ${e==null?void 0:e.error}`,Nge=e=>`压缩失败:${e==null?void 0:e.error}`,zge=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,jge=e=>`فشل الضغط: ${e==null?void 0:e.error}`,Age=e=>`Error al comprimir: ${e==null?void 0:e.error}`,Tge=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,Rge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nge(e):t==="fa"?zge(e):t==="ar"?jge(e):t==="es"?Age(e):t==="hi"?Tge(e):Ege(e)}),Mge=()=>"Continue",Oge=()=>"继续",Dge=()=>"ادامه",Lge=()=>"متابعة",Ige=()=>"Continuar",$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=()=>"Copy response",Fge=()=>"复制回复",Hge=()=>"کپی پاسخ",qge=()=>"نسخ الرد",Uge=()=>"Copiar respuesta",Gge=()=>"जवाब कॉपी करें",MN=((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=e=>`Delete “${e==null?void 0:e.title}”? -Its transcript will be permanently removed.`,Zme=e=>`删除“${e==null?void 0:e.title}”? +Its transcript will be permanently removed.`,Vge=e=>`删除“${e==null?void 0:e.title}”? -其对话记录将被永久移除。`,Jme=e=>`«${e==null?void 0:e.title}» حذف شود؟ +其对话记录将被永久移除。`,Wge=e=>`«${e==null?void 0:e.title}» حذف شود؟ -رونوشت آن برای همیشه حذف خواهد شد.`,ege=e=>`حذف «${e==null?void 0:e.title}»؟ +رونوشت آن برای همیشه حذف خواهد شد.`,Qge=e=>`حذف «${e==null?void 0:e.title}»؟ -سيُحذف سجل المحادثة نهائيًا.`,tge=e=>`¿Eliminar “${e==null?void 0:e.title}”? +سيُحذف سجل المحادثة نهائيًا.`,Xge=e=>`¿Eliminar “${e==null?void 0:e.title}”? -Su transcripción se eliminará de forma permanente.`,nge=e=>`“${e==null?void 0:e.title}” हटाएं? +Su transcripción se eliminará de forma permanente.`,Yge=e=>`“${e==null?void 0:e.title}” हटाएं? -इसका ट्रांसक्रिप्ट स्थायी रूप से हट जाएगा।`,rge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zme(e):t==="fa"?Jme(e):t==="ar"?ege(e):t==="es"?tge(e):t==="hi"?nge(e):Yme(e)}),sge=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,ige=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,age=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,oge=e=>`تعذّر حذف «${e==null?void 0:e.title}»: ${e==null?void 0:e.error}`,cge=e=>`No se pudo eliminar “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,lge=e=>`“${e==null?void 0:e.title}” हटाने में विफल: ${e==null?void 0:e.error}`,uge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ige(e):t==="fa"?age(e):t==="ar"?oge(e):t==="es"?cge(e):t==="hi"?lge(e):sge(e)}),_ge=()=>"Could not exit Plan mode. Try again.",fge=()=>"无法退出计划模式。请重试。",dge=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",hge=()=>"تعذّر الخروج من وضع التخطيط. حاول مجددًا.",pge=()=>"No se pudo salir del modo Plan. Inténtalo de nuevo.",mge=()=>"प्लान मोड से बाहर नहीं निकला जा सका। फिर से कोशिश करें।",gge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fge():t==="fa"?dge():t==="ar"?hge():t==="es"?pge():t==="hi"?mge():_ge()}),vge=()=>"Expand tool activity",bge=()=>"展开工具活动",yge=()=>"باز کردن فعالیت ابزارها",xge=()=>"توسيع نشاط الأداة",wge=()=>"Expandir actividad de herramientas",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=()=>"experiments",Ege=()=>"实验",Nge=()=>"آزمایش‌ها",zge=()=>"التجارب",jge=()=>"experimentos",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=()=>"You",Mge=()=>"你",Oge=()=>"شما",Dge=()=>"أنت",Lge=()=>"Tú",Ige=()=>"आप",$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=()=>"Goal cleared",Pge=()=>"已清除目标",Fge=()=>"هدف پاک شد",Hge=()=>"تم مسح الهدف",qge=()=>"Objetivo borrado",Uge=()=>"लक्ष्य हटाया गया",Gge=((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()}),Vge=e=>`Current goal: ${e==null?void 0:e.goal}`,Kge=e=>`当前目标:${e==null?void 0:e.goal}`,Wge=e=>`هدف فعلی: ${e==null?void 0:e.goal}`,Qge=e=>`الهدف الحالي: ${e==null?void 0:e.goal}`,Xge=e=>`Objetivo actual: ${e==null?void 0:e.goal}`,Yge=e=>`मौजूदा लक्ष्य: ${e==null?void 0:e.goal}`,Zge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kge(e):t==="fa"?Wge(e):t==="ar"?Qge(e):t==="es"?Xge(e):t==="hi"?Yge(e):Vge(e)}),Jge=e=>`Setting the goal failed: ${e==null?void 0:e.error}`,e1e=e=>`设置目标失败:${e==null?void 0:e.error}`,t1e=e=>`تنظیم هدف ناموفق بود: ${e==null?void 0:e.error}`,n1e=e=>`فشل تعيين الهدف: ${e==null?void 0:e.error}`,r1e=e=>`Error al definir el objetivo: ${e==null?void 0:e.error}`,s1e=e=>`लक्ष्य सेट करना विफल: ${e==null?void 0:e.error}`,yN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?e1e(e):t==="fa"?t1e(e):t==="ar"?n1e(e):t==="es"?r1e(e):t==="hi"?s1e(e):Jge(e)}),i1e=()=>"No goal set — add one after /goal",a1e=()=>"尚未设置目标 — 在 /goal 后面写一个",o1e=()=>"هدفی تنظیم نشده — یکی را بعد از /goal بنویسید",c1e=()=>"لا يوجد هدف — أضف واحدًا بعد /goal",l1e=()=>"Sin objetivo — añade uno después de /goal",u1e=()=>"कोई लक्ष्य नहीं — /goal के बाद एक जोड़ें",_1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a1e():t==="fa"?o1e():t==="ar"?c1e():t==="es"?l1e():t==="hi"?u1e():i1e()}),f1e=()=>"Goal set",d1e=()=>"已设置目标",h1e=()=>"هدف تنظیم شد",p1e=()=>"تم تعيين الهدف",m1e=()=>"Objetivo definido",g1e=()=>"लक्ष्य सेट किया गया",v1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d1e():t==="fa"?h1e():t==="ar"?p1e():t==="es"?m1e():t==="hi"?g1e():f1e()}),b1e=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,y1e=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,x1e=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,w1e=e=>`${e==null?void 0:e.harness} غير متاح — افتح مُنتقي النماذج`,k1e=e=>`${e==null?void 0:e.harness} no está disponible — abre el selector de modelos`,S1e=e=>`${e==null?void 0:e.harness} उपलब्ध नहीं है — मॉडल पिकर खोलें`,C1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?y1e(e):t==="fa"?x1e(e):t==="ar"?w1e(e):t==="es"?k1e(e):t==="hi"?S1e(e):b1e(e)}),E1e=e=>`Importing that chat failed: ${e==null?void 0:e.error}`,N1e=e=>`导入该聊天失败:${e==null?void 0:e.error}`,z1e=e=>`وارد کردن آن گفت‌وگو ناموفق بود: ${e==null?void 0:e.error}`,j1e=e=>`فشل استيراد تلك المحادثة: ${e==null?void 0:e.error}`,A1e=e=>`Error al importar ese chat: ${e==null?void 0:e.error}`,T1e=e=>`उस चैट को इम्पोर्ट करना विफल: ${e==null?void 0:e.error}`,R1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?N1e(e):t==="fa"?z1e(e):t==="ar"?j1e(e):t==="es"?A1e(e):t==="hi"?T1e(e):E1e(e)}),M1e=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,O1e=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,D1e=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,L1e=e=>`راسِل ${e==null?void 0:e.harness}… (/ للأوامر والمهارات، ! للطرفية)`,I1e=e=>`Escribe a ${e==null?void 0:e.harness}… (/ para comandos y skills, ! para la shell)`,$1e=e=>`${e==null?void 0:e.harness} को संदेश भेजें… (कमांड और स्किल के लिए /, शेल के लिए !)`,B1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?O1e(e):t==="fa"?D1e(e):t==="ar"?L1e(e):t==="es"?I1e(e):t==="hi"?$1e(e):M1e(e)}),P1e=e=>`Message not sent: ${e==null?void 0:e.error}`,F1e=e=>`消息未发送:${e==null?void 0:e.error}`,H1e=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,q1e=e=>`لم تُرسل الرسالة: ${e==null?void 0:e.error}`,U1e=e=>`Mensaje no enviado: ${e==null?void 0:e.error}`,G1e=e=>`संदेश नहीं भेजा गया: ${e==null?void 0:e.error}`,V1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?F1e(e):t==="fa"?H1e(e):t==="ar"?q1e(e):t==="es"?U1e(e):t==="hi"?G1e(e):P1e(e)}),K1e=()=>"Model unavailable",W1e=()=>"模型不可用",Q1e=()=>"مدل در دسترس نیست",X1e=()=>"النموذج غير متاح",Y1e=()=>"Modelo no disponible",Z1e=()=>"मॉडल उपलब्ध नहीं",J1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W1e():t==="fa"?Q1e():t==="ar"?X1e():t==="es"?Y1e():t==="hi"?Z1e():K1e()}),eve=()=>"New session",tve=()=>"新会话",nve=()=>"نشست جدید",rve=()=>"جلسة جديدة",sve=()=>"Nueva sesión",ive=()=>"नया सेशन",xN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tve():t==="fa"?nve():t==="ar"?rve():t==="es"?sve():t==="hi"?ive():eve()}),ave=()=>"No active sessions",ove=()=>"没有活跃会话",cve=()=>"نشست فعالی وجود ندارد",lve=()=>"لا توجد جلسات نشطة",uve=()=>"No hay sesiones activas",_ve=()=>"कोई सक्रिय सेशन नहीं",fve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ove():t==="fa"?cve():t==="ar"?lve():t==="es"?uve():t==="hi"?_ve():ave()}),dve=()=>"No activity",hve=()=>"无活动",pve=()=>"بدون فعالیت",mve=()=>"لا يوجد نشاط",gve=()=>"Sin actividad",vve=()=>"कोई गतिविधि नहीं",bve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hve():t==="fa"?pve():t==="ar"?mve():t==="es"?gve():t==="hi"?vve():dve()}),yve=()=>"No archived sessions",xve=()=>"没有已归档的会话",wve=()=>"نشست بایگانی‌شده‌ای وجود ندارد",kve=()=>"لا توجد جلسات مؤرشفة",Sve=()=>"No hay sesiones archivadas",Cve=()=>"कोई आर्काइव किया गया सेशन नहीं",Eve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xve():t==="fa"?wve():t==="ar"?kve():t==="es"?Sve():t==="hi"?Cve():yve()}),Nve=()=>"No sessions yet",zve=()=>"还没有会话",jve=()=>"هنوز نشستی وجود ندارد",Ave=()=>"لا توجد جلسات بعد",Tve=()=>"Aún no hay sesiones",Rve=()=>"अभी तक कोई सेशन नहीं",Mve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zve():t==="fa"?jve():t==="ar"?Ave():t==="es"?Tve():t==="hi"?Rve():Nve()}),Ove=()=>"There is nothing to compact yet",Dve=()=>"还没有可压缩的内容",Lve=()=>"هنوز چیزی برای فشرده‌سازی وجود ندارد",Ive=()=>"لا يوجد شيء لضغطه بعد",$ve=()=>"Aún no hay nada que comprimir",Bve=()=>"छोटा करने के लिए अभी कुछ नहीं है",Pve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dve():t==="fa"?Lve():t==="ar"?Ive():t==="es"?$ve():t==="hi"?Bve():Ove()}),Fve=()=>"No response to copy yet",Hve=()=>"还没有可复制的回复",qve=()=>"هنوز پاسخی برای کپی وجود ندارد",Uve=()=>"لا يوجد رد لنسخه بعد",Gve=()=>"Aún no hay ninguna respuesta que copiar",Vve=()=>"कॉपी करने के लिए अभी कोई जवाब नहीं है",Kve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hve():t==="fa"?qve():t==="ar"?Uve():t==="es"?Gve():t==="hi"?Vve():Fve()}),Wve=()=>"Nothing to export yet",Qve=()=>"还没有可导出的内容",Xve=()=>"هنوز چیزی برای خروجی گرفتن وجود ندارد",Yve=()=>"لا يوجد شيء لتصديره بعد",Zve=()=>"Aún no hay nada que exportar",Jve=()=>"एक्सपोर्ट करने के लिए अभी कुछ नहीं है",ebe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qve():t==="fa"?Xve():t==="ar"?Yve():t==="es"?Zve():t==="hi"?Jve():Wve()}),tbe=()=>"1 annotation",nbe=()=>"1 条批注",rbe=()=>"۱ یادداشت",sbe=()=>"تعليق واحد",ibe=()=>"1 anotación",abe=()=>"1 एनोटेशन",obe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nbe():t==="fa"?rbe():t==="ar"?sbe():t==="es"?ibe():t==="hi"?abe():tbe()}),cbe=()=>"Open sub-agent transcript",lbe=()=>"打开子智能体记录",ube=()=>"باز کردن متن گفت‌وگوی عامل فرعی",_be=()=>"فتح سجل محادثة الوكيل الفرعي",fbe=()=>"Abrir la transcripción del subagente",dbe=()=>"सब-एजेंट ट्रांसक्रिप्ट खोलें",hbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lbe():t==="fa"?ube():t==="ar"?_be():t==="es"?fbe():t==="hi"?dbe():cbe()}),pbe=()=>"About this demo",mbe=()=>"关于此演示",gbe=()=>"دربارهٔ این نسخهٔ نمایشی",vbe=()=>"حول هذا العرض التوضيحي",bbe=()=>"Acerca de esta demo",ybe=()=>"इस डेमो के बारे में",wN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mbe():t==="fa"?gbe():t==="ar"?vbe():t==="es"?bbe():t==="hi"?ybe():pbe()}),xbe=()=>"Accept and auto mode",wbe=()=>"接受并使用自动模式",kbe=()=>"پذیرش و حالت خودکار",Sbe=()=>"قبول وتفعيل الوضع التلقائي",Cbe=()=>"Aceptar en modo automático",Ebe=()=>"स्वीकार करें और ऑटो मोड",Nbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wbe():t==="fa"?kbe():t==="ar"?Sbe():t==="es"?Cbe():t==="hi"?Ebe():xbe()}),zbe=()=>"Accept and bypass all",jbe=()=>"接受并跳过所有审批",Abe=()=>"پذیرش و عبور از همهٔ تأییدها",Tbe=()=>"القبول وتجاوز الكل",Rbe=()=>"Aceptar y omitir permisos",Mbe=()=>"स्वीकार करें और सब बायपास करें",Obe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jbe():t==="fa"?Abe():t==="ar"?Tbe():t==="es"?Rbe():t==="hi"?Mbe():zbe()}),Dbe=()=>"Active",Lbe=()=>"活跃",Ibe=()=>"فعال",$be=()=>"نشط",Bbe=()=>"Activas",Pbe=()=>"सक्रिय",Fbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lbe():t==="fa"?Ibe():t==="ar"?$be():t==="es"?Bbe():t==="hi"?Pbe():Dbe()}),Hbe=()=>"All",qbe=()=>"全部",Ube=()=>"همه",Gbe=()=>"الكل",Vbe=()=>"Todas",Kbe=()=>"सभी",Wbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qbe():t==="fa"?Ube():t==="ar"?Gbe():t==="es"?Vbe():t==="hi"?Kbe():Hbe()}),Qbe=()=>"Allow",Xbe=()=>"允许",Ybe=()=>"اجازه دادن",Zbe=()=>"السماح",Jbe=()=>"Permitir",eye=()=>"अनुमति दें",tye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xbe():t==="fa"?Ybe():t==="ar"?Zbe():t==="es"?Jbe():t==="hi"?eye():Qbe()}),nye=()=>"Approval required",rye=()=>"需要批准",sye=()=>"نیازمند تأیید",iye=()=>"الموافقة مطلوبة",aye=()=>"Aprobación necesaria",oye=()=>"स्वीकृति ज़रूरी है",cye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rye():t==="fa"?sye():t==="ar"?iye():t==="es"?aye():t==="hi"?oye():nye()}),lye=()=>"Archived",uye=()=>"已归档",_ye=()=>"بایگانی‌شده",fye=()=>"مؤرشف",dye=()=>"Archivadas",hye=()=>"आर्काइव किया गया",kN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uye():t==="fa"?_ye():t==="ar"?fye():t==="es"?dye():t==="hi"?hye():lye()}),pye=()=>"Ask about this",mye=()=>"询问此内容",gye=()=>"دربارهٔ این بپرسید",vye=()=>"اسأل عن هذا",bye=()=>"Preguntar sobre esto",yye=()=>"इसके बारे में पूछें",xye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mye():t==="fa"?gye():t==="ar"?vye():t==="es"?bye():t==="hi"?yye():pye()}),wye=()=>"Attach a PDF or image",kye=()=>"附加 PDF 或图片",Sye=()=>"پیوست PDF یا تصویر",Cye=()=>"إرفاق ملف PDF أو صورة",Eye=()=>"Adjuntar un PDF o una imagen",Nye=()=>"PDF या इमेज अटैच करें",SN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kye():t==="fa"?Sye():t==="ar"?Cye():t==="es"?Eye():t==="hi"?Nye():wye()}),zye=()=>"Bash",jye=()=>"Bash",Aye=()=>"Bash",Tye=()=>"Bash",Rye=()=>"Bash",Mye=()=>"Bash",YD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jye():t==="fa"?Aye():t==="ar"?Tye():t==="es"?Rye():t==="hi"?Mye():zye()}),Oye=()=>"Browsed the web",Dye=()=>"已浏览网页",Lye=()=>"وب مرور شد",Iye=()=>"تصفّح الويب",$ye=()=>"Navegó por la web",Bye=()=>"वेब ब्राउज़ किया",CN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dye():t==="fa"?Lye():t==="ar"?Iye():t==="es"?$ye():t==="hi"?Bye():Oye()}),Pye=()=>"Built the project",Fye=()=>"已构建项目",Hye=()=>"پروژه ساخته شد",qye=()=>"بنى المشروع",Uye=()=>"Compiló el proyecto",Gye=()=>"प्रोजेक्ट बिल्ड किया",Vye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fye():t==="fa"?Hye():t==="ar"?qye():t==="es"?Uye():t==="hi"?Gye():Pye()}),Kye=()=>"Cancel",Wye=()=>"取消",Qye=()=>"لغو",Xye=()=>"إلغاء",Yye=()=>"Cancelar",Zye=()=>"रद्द करें",Jye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wye():t==="fa"?Qye():t==="ar"?Xye():t==="es"?Yye():t==="hi"?Zye():Kye()}),exe=()=>"Cancelled an experiment run",txe=()=>"已取消实验运行",nxe=()=>"اجرای آزمایش لغو شد",rxe=()=>"ألغى تشغيل تجربة",sxe=()=>"Canceló una ejecución de experimento",ixe=()=>"एक प्रयोग रन रद्द किया",axe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?txe():t==="fa"?nxe():t==="ar"?rxe():t==="es"?sxe():t==="hi"?ixe():exe()}),oxe=()=>"Checked code style",cxe=()=>"已检查代码风格",lxe=()=>"سبک کد بررسی شد",uxe=()=>"فحص نمط الشيفرة",_xe=()=>"Revisó el estilo del código",fxe=()=>"कोड स्टाइल जाँची",dxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cxe():t==="fa"?lxe():t==="ar"?uxe():t==="es"?_xe():t==="hi"?fxe():oxe()}),hxe=()=>"Checked compute options",pxe=()=>"已检查算力选项",mxe=()=>"گزینه‌های رایانشی بررسی شد",gxe=()=>"فحص خيارات الحوسبة",vxe=()=>"Consultó las opciones de cómputo",bxe=()=>"कंप्यूट विकल्प जाँचे",yxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pxe():t==="fa"?mxe():t==="ar"?gxe():t==="es"?vxe():t==="hi"?bxe():hxe()}),xxe=()=>"Checked experiment status",wxe=()=>"已检查实验状态",kxe=()=>"وضعیت آزمایش بررسی شد",Sxe=()=>"فحص حالة التجربة",Cxe=()=>"Consultó el estado del experimento",Exe=()=>"प्रयोग की स्थिति जाँची",EN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wxe():t==="fa"?kxe():t==="ar"?Sxe():t==="es"?Cxe():t==="hi"?Exe():xxe()}),Nxe=()=>"Checked Git status",zxe=()=>"已检查 Git 状态",jxe=()=>"وضعیت Git بررسی شد",Axe=()=>"فحص حالة Git",Txe=()=>"Consultó el estado de Git",Rxe=()=>"Git स्थिति जाँची",Mxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zxe():t==="fa"?jxe():t==="ar"?Axe():t==="es"?Txe():t==="hi"?Rxe():Nxe()}),Oxe=()=>"Checked local times",Dxe=()=>"已查询当地时间",Lxe=()=>"زمان‌های محلی بررسی شد",Ixe=()=>"فحص التوقيتات المحلية",$xe=()=>"Consultó horas locales",Bxe=()=>"स्थानीय समय जाँचे",Pxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dxe():t==="fa"?Lxe():t==="ar"?Ixe():t==="es"?$xe():t==="hi"?Bxe():Oxe()}),Fxe=()=>"Checked market data",Hxe=()=>"已查询市场数据",qxe=()=>"داده‌های بازار بررسی شد",Uxe=()=>"فحص بيانات السوق",Gxe=()=>"Consultó datos de mercado",Vxe=()=>"बाज़ार डेटा जाँचा",Kxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hxe():t==="fa"?qxe():t==="ar"?Uxe():t==="es"?Gxe():t==="hi"?Vxe():Fxe()}),Wxe=()=>"Checked sports data",Qxe=()=>"已查询体育数据",Xxe=()=>"داده‌های ورزشی بررسی شد",Yxe=()=>"فحص البيانات الرياضية",Zxe=()=>"Consultó datos deportivos",Jxe=()=>"खेल डेटा जाँचा",e2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qxe():t==="fa"?Xxe():t==="ar"?Yxe():t==="es"?Zxe():t==="hi"?Jxe():Wxe()}),t2e=()=>"Checked the weather",n2e=()=>"已查询天气",r2e=()=>"آب‌وهوا بررسی شد",s2e=()=>"فحص حالة الطقس",i2e=()=>"Consultó el tiempo",a2e=()=>"मौसम जाँचा",o2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n2e():t==="fa"?r2e():t==="ar"?s2e():t==="es"?i2e():t==="hi"?a2e():t2e()}),c2e=()=>"Checked types",l2e=()=>"已检查类型",u2e=()=>"نوع‌ها بررسی شد",_2e=()=>"فحص الأنواع",f2e=()=>"Comprobó los tipos",d2e=()=>"टाइप जाँचे",h2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l2e():t==="fa"?u2e():t==="ar"?_2e():t==="es"?f2e():t==="hi"?d2e():c2e()}),p2e=()=>"Clear annotations",m2e=()=>"清除批注",g2e=()=>"پاک کردن یادداشت‌ها",v2e=()=>"مسح التعليقات",b2e=()=>"Borrar anotaciones",y2e=()=>"एनोटेशन साफ़ करें",NN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m2e():t==="fa"?g2e():t==="ar"?v2e():t==="es"?b2e():t==="hi"?y2e():p2e()}),x2e=e=>`Clear the goal: ${e==null?void 0:e.goal}`,w2e=e=>`清除目标:${e==null?void 0:e.goal}`,k2e=e=>`پاک‌کردن هدف: ${e==null?void 0:e.goal}`,S2e=e=>`مسح الهدف: ${e==null?void 0:e.goal}`,C2e=e=>`Borrar el objetivo: ${e==null?void 0:e.goal}`,E2e=e=>`लक्ष्य हटाएँ: ${e==null?void 0:e.goal}`,zN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?w2e(e):t==="fa"?k2e(e):t==="ar"?S2e(e):t==="es"?C2e(e):t==="hi"?E2e(e):x2e(e)}),N2e=()=>"Customize",z2e=()=>"自定义",j2e=()=>"سفارشی‌سازی",A2e=()=>"تخصيص",T2e=()=>"Personalizar",R2e=()=>"कस्टमाइज़ करें",M2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z2e():t==="fa"?j2e():t==="ar"?A2e():t==="es"?T2e():t==="hi"?R2e():N2e()}),O2e=()=>"Data sources",D2e=()=>"数据源",L2e=()=>"منابع داده",I2e=()=>"مصادر البيانات",$2e=()=>"Fuentes de datos",B2e=()=>"डेटा स्रोत",cw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D2e():t==="fa"?L2e():t==="ar"?I2e():t==="es"?$2e():t==="hi"?B2e():O2e()}),P2e=()=>"Delegated a task to a new agent",F2e=()=>"已将任务委派给新智能体",H2e=()=>"وظیفه به عامل جدید واگذار شد",q2e=()=>"فوّض مهمة إلى وكيل جديد",U2e=()=>"Delegó una tarea a un nuevo agente",G2e=()=>"एक नए एजेंट को टास्क सौंपा",V2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F2e():t==="fa"?H2e():t==="ar"?q2e():t==="es"?U2e():t==="hi"?G2e():P2e()}),K2e=()=>"Delete",W2e=()=>"删除",Q2e=()=>"حذف",X2e=()=>"حذف",Y2e=()=>"Eliminar",Z2e=()=>"हटाएं",ZD=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W2e():t==="fa"?Q2e():t==="ar"?X2e():t==="es"?Y2e():t==="hi"?Z2e():K2e()}),J2e=()=>"This prompt runs a small 200-step training probe on your machine. Hit enter to get started.",ewe=()=>"这条提示会在你的机器上运行一个小型 200 步训练探测。按 Enter 开始。",twe=()=>"این پیام یک کاوش آموزشی کوچک ۲۰۰ مرحله‌ای روی دستگاه شما اجرا می‌کند. برای شروع Enter را بزنید.",nwe=()=>"يشغّل هذا الطلب اختبار تدريب صغيرًا من 200 خطوة على جهازك. اضغط Enter للبدء.",rwe=()=>"Este prompt ejecuta en tu equipo una pequeña prueba de entrenamiento de 200 pasos. Pulsa Intro para empezar.",swe=()=>"यह प्रॉम्प्ट आपकी मशीन पर एक छोटा 200-स्टेप ट्रेनिंग परीक्षण चलाता है। शुरू करने के लिए एंटर दबाएं।",iwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ewe():t==="fa"?twe():t==="ar"?nwe():t==="es"?rwe():t==="hi"?swe():J2e()}),awe=()=>"to monitor it.",owe=()=>"以查看进度。",cwe=()=>"بزنید.",lwe=()=>"لمتابعتها.",uwe=()=>"para seguirlo.",_we=()=>"इस पर नज़र रखने के लिए।",jN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?owe():t==="fa"?cwe():t==="ar"?lwe():t==="es"?uwe():t==="hi"?_we():awe()}),fwe=()=>"The experiment is now running. Tap",dwe=()=>"实验正在运行。点按",hwe=()=>"آزمایش اکنون در حال اجراست. برای پیگیری روی",pwe=()=>"التجربة قيد التشغيل الآن. اضغط على",mwe=()=>"El experimento ya se está ejecutando. Pulsa",gwe=()=>"प्रयोग अब चल रहा है। टैप करें",AN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dwe():t==="fa"?hwe():t==="ar"?pwe():t==="es"?mwe():t==="hi"?gwe():fwe()}),vwe=()=>"Deny",bwe=()=>"拒绝",ywe=()=>"رد کردن",xwe=()=>"رفض",wwe=()=>"Denegar",kwe=()=>"अस्वीकार करें",Swe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bwe():t==="fa"?ywe():t==="ar"?xwe():t==="es"?wwe():t==="hi"?kwe():vwe()}),Cwe=()=>"Dismiss",Ewe=()=>"关闭",Nwe=()=>"بستن",zwe=()=>"إغلاق",jwe=()=>"Cerrar",Awe=()=>"खारिज करें",s1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ewe():t==="fa"?Nwe():t==="ar"?zwe():t==="es"?jwe():t==="hi"?Awe():Cwe()}),Twe=()=>"Edit and re-send",Rwe=()=>"编辑并重新发送",Mwe=()=>"ویرایش و ارسال دوباره",Owe=()=>"تعديل وإعادة الإرسال",Dwe=()=>"Editar y reenviar",Lwe=()=>"संपादित करें और फिर भेजें",TN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rwe():t==="fa"?Mwe():t==="ar"?Owe():t==="es"?Dwe():t==="hi"?Lwe():Twe()}),Iwe=()=>"Edit message",$we=()=>"编辑消息",Bwe=()=>"ویرایش پیام",Pwe=()=>"تعديل الرسالة",Fwe=()=>"Editar mensaje",Hwe=()=>"संदेश संपादित करें",qwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$we():t==="fa"?Bwe():t==="ar"?Pwe():t==="es"?Fwe():t==="hi"?Hwe():Iwe()}),Uwe=()=>"Edited a file",Gwe=()=>"已编辑文件",Vwe=()=>"فایل ویرایش شد",Kwe=()=>"عدّل ملفًا",Wwe=()=>"Editó un archivo",Qwe=()=>"एक फ़ाइल संपादित की",RN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gwe():t==="fa"?Vwe():t==="ar"?Kwe():t==="es"?Wwe():t==="hi"?Qwe():Uwe()}),Xwe=()=>"Exit Bash mode",Ywe=()=>"退出 Bash 模式",Zwe=()=>"خروج از حالت Bash",Jwe=()=>"الخروج من وضع Bash",e4e=()=>"Salir del modo Bash",t4e=()=>"Bash मोड से बाहर निकलें",MN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ywe():t==="fa"?Zwe():t==="ar"?Jwe():t==="es"?e4e():t==="hi"?t4e():Xwe()}),n4e=()=>"Exit Plan mode",r4e=()=>"退出计划模式",s4e=()=>"خروج از حالت طرح",i4e=()=>"الخروج من وضع التخطيط",a4e=()=>"Salir del modo Plan",o4e=()=>"प्लान मोड से बाहर निकलें",ON=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r4e():t==="fa"?s4e():t==="ar"?i4e():t==="es"?a4e():t==="hi"?o4e():n4e()}),c4e=()=>"Failed:",l4e=()=>"失败:",u4e=()=>"ناموفق:",_4e=()=>"فشل:",f4e=()=>"Error:",d4e=()=>"विफल:",_S=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l4e():t==="fa"?u4e():t==="ar"?_4e():t==="es"?f4e():t==="hi"?d4e():c4e()}),h4e=()=>"Filter sessions",p4e=()=>"筛选会话",m4e=()=>"فیلتر نشست‌ها",g4e=()=>"تصفية الجلسات",v4e=()=>"Filtrar sesiones",b4e=()=>"सेशन फ़िल्टर करें",DN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p4e():t==="fa"?m4e():t==="ar"?g4e():t==="es"?v4e():t==="hi"?b4e():h4e()}),y4e=()=>"Goal",x4e=()=>"目标",w4e=()=>"هدف",k4e=()=>"الهدف",S4e=()=>"Objetivo",C4e=()=>"लक्ष्य",E4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x4e():t==="fa"?w4e():t==="ar"?k4e():t==="es"?S4e():t==="hi"?C4e():y4e()}),N4e=()=>"is unavailable.",z4e=()=>"不可用。",j4e=()=>"در دسترس نیست.",A4e=()=>"غير متاح.",T4e=()=>"no está disponible.",R4e=()=>"उपलब्ध नहीं है।",M4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z4e():t==="fa"?j4e():t==="ar"?A4e():t==="es"?T4e():t==="hi"?R4e():N4e()}),O4e=()=>"Later queued messages will wait until this is retried or removed.",D4e=()=>"后续排队的消息会等待此消息重试或移除。",L4e=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",I4e=()=>"ستنتظر الرسائل التالية في قائمة الانتظار حتى تُعاد المحاولة أو تُزال هذه الرسالة.",$4e=()=>"Los mensajes que están después en la cola esperarán hasta que este se reintente o se quite.",B4e=()=>"बाद में कतार में लगे संदेश तब तक रुके रहेंगे जब तक इसे फिर से कोशिश न किया जाए या हटाया न जाए।",P4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D4e():t==="fa"?L4e():t==="ar"?I4e():t==="es"?$4e():t==="hi"?B4e():O4e()}),F4e=()=>"Listed files",H4e=()=>"已列出文件",q4e=()=>"فایل‌ها فهرست شد",U4e=()=>"سرد الملفات",G4e=()=>"Listó archivos",V4e=()=>"फ़ाइलों की सूची बनाई",LN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H4e():t==="fa"?q4e():t==="ar"?U4e():t==="es"?G4e():t==="hi"?V4e():F4e()}),K4e=()=>"Listed project runs",W4e=()=>"已列出项目运行",Q4e=()=>"اجراهای پروژه فهرست شد",X4e=()=>"سرد عمليات تشغيل المشروع",Y4e=()=>"Listó las ejecuciones del proyecto",Z4e=()=>"प्रोजेक्ट रन की सूची बनाई",J4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W4e():t==="fa"?Q4e():t==="ar"?X4e():t==="es"?Y4e():t==="hi"?Z4e():K4e()}),e3e=()=>"Listed projects",t3e=()=>"已列出项目",n3e=()=>"پروژه‌ها فهرست شد",r3e=()=>"سرد المشاريع",s3e=()=>"Listó proyectos",i3e=()=>"प्रोजेक्ट की सूची बनाई",a3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t3e():t==="fa"?n3e():t==="ar"?r3e():t==="es"?s3e():t==="hi"?i3e():e3e()}),o3e=()=>"Loading conversation…",c3e=()=>"正在加载对话…",l3e=()=>"در حال بارگیری گفتگو…",u3e=()=>"جارٍ تحميل المحادثة…",_3e=()=>"Cargando conversación…",f3e=()=>"बातचीत लोड हो रही है…",d3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c3e():t==="fa"?l3e():t==="ar"?u3e():t==="es"?_3e():t==="hi"?f3e():o3e()}),h3e=()=>"New Chat",p3e=()=>"新对话",m3e=()=>"گفتگوی جدید",g3e=()=>"محادثة جديدة",v3e=()=>"Nuevo chat",b3e=()=>"नई चैट",y3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p3e():t==="fa"?m3e():t==="ar"?g3e():t==="es"?v3e():t==="hi"?b3e():h3e()}),x3e=()=>"Next version",w3e=()=>"下一版本",k3e=()=>"نسخهٔ بعدی",S3e=()=>"النسخة التالية",C3e=()=>"Siguiente versión",E3e=()=>"अगला वर्शन",IN=((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=()=>"पिछला वर्शन",$N=((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=()=>"फ़ाइल हटाएं",BN=((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=()=>"इमेज हटाएं",PN=((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=()=>"कतार में लगा संदेश हटाएं",FN=((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=()=>"नाम बदलें",JD=((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=()=>"रन",HN=((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=()=>"भेजें",S3=((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=()=>"सेशन विकल्प",qN=((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=()=>"साइडबार दिखाएं",UN=((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=()=>"रोकें",GN=((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=()=>"टूल इस्तेमाल किए",eL=((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=()=>"पेस्ट की गई इमेज",tL=((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=()=>"प्लान",nL=((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=()=>"प्रस्तावित प्लान",VN=((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=()=>"हाल की",rL=((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=()=>"नीचे तक स्क्रॉल करें",KN=((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=()=>"चुना गया हार्नेस उपलब्ध नहीं है",i1=((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=()=>"प्लान मोड टॉगल नहीं हो सका। फिर से कोशिश करें।",WN=((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=()=>"यह टर्न पूरा नहीं हुआ।",QN=((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=()=>"बिना शीर्षक",Od=((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=()=>"काम हो रहा है…",fS=((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=()=>"बदलाव",sL=((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=()=>"रीफ़्रेश करें",XN=((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=()=>"जाँचा जा रहा है…",ba=((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=()=>"कॉपी हो गया",_f=((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}`,dS=((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=()=>"लोड हो रहा है…",hS=((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=()=>"रेंडर किया गया व्यू",Dv=((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=()=>"सेव करें",hc=((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=()=>"सेव हो रहा है…",ka=((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=()=>"कम दिखाएं",iL=((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=()=>"और दिखाएं",xAe=((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()}),wAe=()=>"Stop",kAe=()=>"停止",SAe=()=>"توقف",CAe=()=>"إيقاف",EAe=()=>"Detener",NAe=()=>"रोकें",aL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kAe():t==="fa"?SAe():t==="ar"?CAe():t==="es"?EAe():t==="hi"?NAe():wAe()}),zAe=()=>"Stopping…",jAe=()=>"正在停止…",AAe=()=>"در حال توقف…",TAe=()=>"جارٍ الإيقاف…",RAe=()=>"Deteniendo…",MAe=()=>"रोका जा रहा है…",OAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jAe():t==="fa"?AAe():t==="ar"?TAe():t==="es"?RAe():t==="hi"?MAe():zAe()}),DAe=()=>"View source",LAe=()=>"查看源代码",IAe=()=>"نمایش متن منبع",$Ae=()=>"عرض المصدر",BAe=()=>"Ver código fuente",PAe=()=>"स्रोत देखें",Fd=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LAe():t==="fa"?IAe():t==="ar"?$Ae():t==="es"?BAe():t==="hi"?PAe():DAe()}),FAe=()=>"Shorten this chat's context",HAe=()=>"压缩此聊天的上下文",qAe=()=>"کوتاه‌کردن زمینهٔ این گفت‌وگو",UAe=()=>"اختصار سياق هذه المحادثة",GAe=()=>"Comprime el contexto de este chat",VAe=()=>"इस चैट का कॉन्टेक्स्ट छोटा करें",KAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HAe():t==="fa"?qAe():t==="ar"?UAe():t==="es"?GAe():t==="hi"?VAe():FAe()}),WAe=()=>"Runs as a remote Hugging Face Job",QAe=()=>"作为远程 Hugging Face Job 运行",XAe=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",YAe=()=>"يعمل كمهمة Hugging Face بعيدة",ZAe=()=>"Se ejecuta como un Job remoto de Hugging Face",JAe=()=>"एक रिमोट Hugging Face Job के रूप में चलता है",eTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QAe():t==="fa"?XAe():t==="ar"?YAe():t==="es"?ZAe():t==="hi"?JAe():WAe()}),tTe=()=>"Runs as a Job on your Kubernetes cluster",nTe=()=>"作为 Kubernetes 集群上的 Job 运行",rTe=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",sTe=()=>"يعمل كمهمة على عنقود Kubernetes الخاص بك",iTe=()=>"Se ejecuta como un Job en tu clúster de Kubernetes",aTe=()=>"आपके Kubernetes क्लस्टर पर एक Job के रूप में चलता है",oTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nTe():t==="fa"?rTe():t==="ar"?sTe():t==="es"?iTe():t==="hi"?aTe():tTe()}),cTe=()=>"Runs directly on this computer",lTe=()=>"直接在此计算机上运行",uTe=()=>"مستقیماً روی این رایانه اجرا می‌شود",_Te=()=>"يعمل مباشرة على هذا الحاسوب",fTe=()=>"Se ejecuta directamente en este equipo",dTe=()=>"सीधे इस कंप्यूटर पर चलता है",hTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lTe():t==="fa"?uTe():t==="ar"?_Te():t==="es"?fTe():t==="hi"?dTe():cTe()}),pTe=()=>"Runs in a remote Modal sandbox",mTe=()=>"在远程 Modal 沙箱中运行",gTe=()=>"در sandbox دوردست Modal اجرا می‌شود",vTe=()=>"يعمل في بيئة Modal معزولة عن بُعد",bTe=()=>"Se ejecuta en un sandbox remoto de Modal",yTe=()=>"एक रिमोट Modal सैंडबॉक्स में चलता है",xTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mTe():t==="fa"?gTe():t==="ar"?vTe():t==="es"?bTe():t==="hi"?yTe():pTe()}),wTe=()=>"Runs on an ephemeral OpenResearch box",kTe=()=>"在临时 OpenResearch 主机上运行",STe=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",CTe=()=>"يعمل على صندوق OpenResearch مؤقت",ETe=()=>"Se ejecuta en una máquina efímera de OpenResearch",NTe=()=>"एक अस्थायी OpenResearch बॉक्स पर चलता है",zTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kTe():t==="fa"?STe():t==="ar"?CTe():t==="es"?ETe():t==="hi"?NTe():wTe()}),jTe=()=>"Runs on the connected Ray cluster",ATe=()=>"在已连接的 Ray 集群上运行",TTe=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",RTe=()=>"يعمل على عنقود Ray المتصل",MTe=()=>"Se ejecuta en el clúster de Ray conectado",OTe=()=>"कनेक्टेड Ray क्लस्टर पर चलता है",DTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ATe():t==="fa"?TTe():t==="ar"?RTe():t==="es"?MTe():t==="hi"?OTe():jTe()}),LTe=()=>"Runs as a scheduled job on your Slurm cluster",ITe=()=>"作为 Slurm 集群上的调度作业运行",$Te=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",BTe=()=>"يعمل كمهمة مجدولة على عنقود Slurm الخاص بك",PTe=()=>"Se ejecuta como un job programado en tu clúster de Slurm",FTe=()=>"आपके Slurm क्लस्टर पर एक शेड्यूल्ड जॉब के रूप में चलता है",HTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ITe():t==="fa"?$Te():t==="ar"?BTe():t==="es"?PTe():t==="hi"?FTe():LTe()}),qTe=()=>"Runs on a host from your SSH config",UTe=()=>"在 SSH 配置中的主机上运行",GTe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",VTe=()=>"يعمل على مضيف من إعداد SSH الخاص بك",KTe=()=>"Se ejecuta en un host de tu configuración SSH",WTe=()=>"आपके SSH कॉन्फ़िग के किसी होस्ट पर चलता है",QTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UTe():t==="fa"?GTe():t==="ar"?VTe():t==="es"?KTe():t==="hi"?WTe():qTe()}),XTe=()=>"Runs through Tinker’s remote compute",YTe=()=>"通过 Tinker 远程算力运行",ZTe=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",JTe=()=>"يعمل عبر حوسبة Tinker البعيدة",eRe=()=>"Se ejecuta en el cómputo remoto de Tinker",tRe=()=>"Tinker के रिमोट कंप्यूट के ज़रिए चलता है",nRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YTe():t==="fa"?ZTe():t==="ar"?JTe():t==="es"?eRe():t==="hi"?tRe():XTe()}),rRe=()=>"HF Jobs",sRe=()=>"HF Jobs",iRe=()=>"HF Jobs",aRe=()=>"HF Jobs",oRe=()=>"HF Jobs",cRe=()=>"HF Jobs",lRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sRe():t==="fa"?iRe():t==="ar"?aRe():t==="es"?oRe():t==="hi"?cRe():rRe()}),uRe=()=>"Kubernetes",_Re=()=>"Kubernetes",fRe=()=>"Kubernetes",dRe=()=>"Kubernetes",hRe=()=>"Kubernetes",pRe=()=>"Kubernetes",mRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Re():t==="fa"?fRe():t==="ar"?dRe():t==="es"?hRe():t==="hi"?pRe():uRe()}),gRe=()=>"This machine",vRe=()=>"此计算机",bRe=()=>"این رایانه",yRe=()=>"هذا الجهاز",xRe=()=>"Este equipo",wRe=()=>"यह मशीन",oL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vRe():t==="fa"?bRe():t==="ar"?yRe():t==="es"?xRe():t==="hi"?wRe():gRe()}),kRe=()=>"Modal",SRe=()=>"Modal",CRe=()=>"Modal",ERe=()=>"Modal",NRe=()=>"Modal",zRe=()=>"Modal",jRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SRe():t==="fa"?CRe():t==="ar"?ERe():t==="es"?NRe():t==="hi"?zRe():kRe()}),ARe=()=>"OpenResearch",TRe=()=>"OpenResearch",RRe=()=>"OpenResearch",MRe=()=>"OpenResearch",ORe=()=>"OpenResearch",DRe=()=>"OpenResearch",LRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TRe():t==="fa"?RRe():t==="ar"?MRe():t==="es"?ORe():t==="hi"?DRe():ARe()}),IRe=()=>"Ray",$Re=()=>"Ray",BRe=()=>"Ray",PRe=()=>"Ray",FRe=()=>"Ray",HRe=()=>"Ray",qRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Re():t==="fa"?BRe():t==="ar"?PRe():t==="es"?FRe():t==="hi"?HRe():IRe()}),URe=()=>"Slurm",GRe=()=>"Slurm",VRe=()=>"Slurm",KRe=()=>"Slurm",WRe=()=>"Slurm",QRe=()=>"Slurm",XRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GRe():t==="fa"?VRe():t==="ar"?KRe():t==="es"?WRe():t==="hi"?QRe():URe()}),YRe=()=>"SSH",ZRe=()=>"SSH",JRe=()=>"SSH",eMe=()=>"SSH",tMe=()=>"SSH",nMe=()=>"SSH",rMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZRe():t==="fa"?JRe():t==="ar"?eMe():t==="es"?tMe():t==="hi"?nMe():YRe()}),sMe=()=>"Tinker",iMe=()=>"Tinker",aMe=()=>"Tinker",oMe=()=>"Tinker",cMe=()=>"Tinker",lMe=()=>"Tinker",uMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iMe():t==="fa"?aMe():t==="ar"?oMe():t==="es"?cMe():t==="hi"?lMe():sMe()}),_Me=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",fMe=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",dMe=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",hMe=()=>"تعمل مهمة Hugging Face عن بُعد في حسابك باستخدام العتاد المحدد. تتولى Hugging Face احتساب رسوم الاستخدام.",pMe=()=>"Un Hugging Face Job se ejecuta de forma remota en tu cuenta con el hardware seleccionado. Hugging Face factura el uso.",mMe=()=>"एक Hugging Face Job चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है। इस्तेमाल का बिल Hugging Face करता है।",gMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fMe():t==="fa"?dMe():t==="ar"?hMe():t==="es"?pMe():t==="hi"?mMe():_Me()}),vMe=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",bMe=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",yMe=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",xMe=()=>"تعمل بيئة Modal معزولة عن بُعد في حسابك باستخدام العتاد المحدد، وتُخفَّض مواردها إلى الصفر بعد انتهاء التشغيل.",wMe=()=>"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.",kMe=()=>"एक Modal सैंडबॉक्स चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है और रन के बाद शून्य पर स्केल हो जाता है।",SMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bMe():t==="fa"?yMe():t==="ar"?xMe():t==="es"?wMe():t==="hi"?kMe():vMe()}),CMe=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",EMe=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",NMe=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",zMe=()=>"تعمل التجربة على جهاز OpenResearch مؤقت، وتتحمل مؤسستك تكلفته، ويُحذف الجهاز عند انتهاء التشغيل.",jMe=()=>"Una máquina efímera de OpenResearch ejecuta el experimento, se factura a tu organización y se elimina al terminar la ejecución.",AMe=()=>"एक अस्थायी OpenResearch बॉक्स प्रयोग चलाता है, आपके संगठन को बिल किया जाता है, और रन खत्म होने पर हटा दिया जाता है।",TMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EMe():t==="fa"?NMe():t==="ar"?zMe():t==="es"?jMe():t==="hi"?AMe():CMe()}),RMe=()=>"This computer must stay awake and online while Tinker runs.",MMe=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",OMe=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",DMe=()=>"يجب أن يبقى هذا الحاسوب مستيقظًا ومتصلًا أثناء تشغيل Tinker.",LMe=()=>"Este equipo debe permanecer encendido y conectado mientras Tinker se ejecuta.",IMe=()=>"जब तक Tinker चल रहा है, इस कंप्यूटर को जागते और ऑनलाइन रहना होगा।",$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=()=>"Context window",PMe=()=>"上下文窗口",FMe=()=>"پنجرهٔ زمینه",HMe=()=>"نافذة السياق",qMe=()=>"Ventana de contexto",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=()=>"Context window used",KMe=()=>"已使用的上下文窗口",WMe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",QMe=()=>"المستخدَم من نافذة السياق",XMe=()=>"Ventana de contexto usada",YMe=()=>"इस्तेमाल हुई कॉन्टेक्स्ट विंडो",ZMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KMe():t==="fa"?WMe():t==="ar"?QMe():t==="es"?XMe():t==="hi"?YMe():VMe()}),JMe=e=>`${e==null?void 0:e.value} tokens`,eOe=e=>`${e==null?void 0:e.value} 个 token`,tOe=e=>`${e==null?void 0:e.value} توکن`,nOe=e=>`${e==null?void 0:e.value} رمز`,rOe=e=>`${e==null?void 0:e.value} tokens`,sOe=e=>`${e==null?void 0:e.value} टोकन`,iOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eOe(e):t==="fa"?tOe(e):t==="ar"?nOe(e):t==="es"?rOe(e):t==="hi"?sOe(e):JMe(e)}),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=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,fOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oOe(e):t==="fa"?cOe(e):t==="ar"?lOe(e):t==="es"?uOe(e):t==="hi"?_Oe(e):aOe(e)}),dOe=()=>"Copy the last response",hOe=()=>"复制最新回复",pOe=()=>"کپی آخرین پاسخ",mOe=()=>"نسخ آخر رد",gOe=()=>"Copia la última respuesta",vOe=()=>"आखिरी जवाब कॉपी करें",bOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hOe():t==="fa"?pOe():t==="ar"?mOe():t==="es"?gOe():t==="hi"?vOe():dOe()}),yOe=()=>"No runs yet — ask the agent to launch one.",xOe=()=>"尚无运行——让智能体启动一个。",wOe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",kOe=()=>"لا توجد عمليات تشغيل بعد — اطلب من الوكيل بدء واحدة.",SOe=()=>"Aún no hay ejecuciones — pídele al agente que lance una.",COe=()=>"अभी तक कोई रन नहीं — एजेंट से एक शुरू करने को कहें।",EOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xOe():t==="fa"?wOe():t==="ar"?kOe():t==="es"?SOe():t==="hi"?COe():yOe()}),NOe=()=>"Run",zOe=()=>"运行",jOe=()=>"اجرا",AOe=()=>"تشغيل",TOe=()=>"Ejecución",ROe=()=>"रन",YN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zOe():t==="fa"?jOe():t==="ar"?AOe():t==="es"?TOe():t==="hi"?ROe():NOe()}),MOe=()=>"Switch run",OOe=()=>"切换运行",DOe=()=>"تغییر اجرا",LOe=()=>"تبديل التشغيل",IOe=()=>"Cambiar de ejecución",$Oe=()=>"रन बदलें",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=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,FOe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,HOe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,qOe=e=>`${e==null?void 0:e.days}ي ${e==null?void 0:e.hours}س`,UOe=e=>`${e==null?void 0:e.days} d ${e==null?void 0:e.hours} h`,GOe=e=>`${e==null?void 0:e.days}दि ${e==null?void 0:e.hours}घं`,VOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FOe(e):t==="fa"?HOe(e):t==="ar"?qOe(e):t==="es"?UOe(e):t==="hi"?GOe(e):POe(e)}),KOe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,WOe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,QOe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,XOe=e=>`${e==null?void 0:e.hours}س ${e==null?void 0:e.minutes}د`,YOe=e=>`${e==null?void 0:e.hours} h ${e==null?void 0:e.minutes} min`,ZOe=e=>`${e==null?void 0:e.hours}घं ${e==null?void 0:e.minutes}मि`,JOe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WOe(e):t==="fa"?QOe(e):t==="ar"?XOe(e):t==="es"?YOe(e):t==="hi"?ZOe(e):KOe(e)}),eDe=e=>`${e==null?void 0:e.value}m`,tDe=e=>`${e==null?void 0:e.value} 分钟`,nDe=e=>`${e==null?void 0:e.value} دقیقه`,rDe=e=>`${e==null?void 0:e.value}د`,sDe=e=>`${e==null?void 0:e.value} min`,iDe=e=>`${e==null?void 0:e.value}मि`,aDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tDe(e):t==="fa"?nDe(e):t==="ar"?rDe(e):t==="es"?sDe(e):t==="hi"?iDe(e):eDe(e)}),oDe=e=>`${e==null?void 0:e.value}s`,cDe=e=>`${e==null?void 0:e.value} 秒`,lDe=e=>`${e==null?void 0:e.value} ثانیه`,uDe=e=>`${e==null?void 0:e.value}ث`,_De=e=>`${e==null?void 0:e.value} s`,fDe=e=>`${e==null?void 0:e.value}से`,dDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cDe(e):t==="fa"?lDe(e):t==="ar"?uDe(e):t==="es"?_De(e):t==="hi"?fDe(e):oDe(e)}),hDe=()=>"Code",pDe=()=>"代码",mDe=()=>"کد",gDe=()=>"الشيفرة",vDe=()=>"Código",bDe=()=>"कोड",yDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pDe():t==="fa"?mDe():t==="ar"?gDe():t==="es"?vDe():t==="hi"?bDe():hDe()}),xDe=()=>"created",wDe=()=>"创建于",kDe=()=>"ایجادشده",SDe=()=>"أُنشئ",CDe=()=>"creado",EDe=()=>"बनाया गया",NDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wDe():t==="fa"?kDe():t==="ar"?SDe():t==="es"?CDe():t==="hi"?EDe():xDe()}),zDe=()=>"from",jDe=()=>"来自",ADe=()=>"از",TDe=()=>"من",RDe=()=>"desde",MDe=()=>"से",ODe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jDe():t==="fa"?ADe():t==="ar"?TDe():t==="es"?RDe():t==="hi"?MDe():zDe()}),DDe=()=>"Logs",LDe=()=>"日志",IDe=()=>"گزارش‌ها",$De=()=>"السجلات",BDe=()=>"Logs",PDe=()=>"लॉग",FDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LDe():t==="fa"?IDe():t==="ar"?$De():t==="es"?BDe():t==="hi"?PDe():DDe()}),HDe=()=>"Latest run",qDe=()=>"最新运行",UDe=()=>"آخرین اجرا",GDe=()=>"أحدث تشغيل",VDe=()=>"Última ejecución",KDe=()=>"नवीनतम रन",WDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qDe():t==="fa"?UDe():t==="ar"?GDe():t==="es"?VDe():t==="hi"?KDe():HDe()}),QDe=()=>"Code",XDe=()=>"代码",YDe=()=>"کد",ZDe=()=>"الشيفرة",JDe=()=>"Código",eLe=()=>"कोड",tLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XDe():t==="fa"?YDe():t==="ar"?ZDe():t==="es"?JDe():t==="hi"?eLe():QDe()}),nLe=()=>"Commit",rLe=()=>"提交",sLe=()=>"کامیت",iLe=()=>"إيداع",aLe=()=>"Commit",oLe=()=>"कमिट",cLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rLe():t==="fa"?sLe():t==="ar"?iLe():t==="es"?aLe():t==="hi"?oLe():nLe()}),lLe=()=>"created",uLe=()=>"创建于",_Le=()=>"ایجادشده",fLe=()=>"أُنشئ",dLe=()=>"creado",hLe=()=>"बनाया गया",pLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uLe():t==="fa"?_Le():t==="ar"?fLe():t==="es"?dLe():t==="hi"?hLe():lLe()}),mLe=()=>"Description",gLe=()=>"说明",vLe=()=>"توضیحات",bLe=()=>"الوصف",yLe=()=>"Descripción",xLe=()=>"विवरण",wLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gLe():t==="fa"?vLe():t==="ar"?bLe():t==="es"?yLe():t==="hi"?xLe():mLe()}),kLe=()=>"Duration",SLe=()=>"时长",CLe=()=>"مدت",ELe=()=>"المدة",NLe=()=>"Duración",zLe=()=>"अवधि",jLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SLe():t==="fa"?CLe():t==="ar"?ELe():t==="es"?NLe():t==="hi"?zLe():kLe()}),ALe=()=>"exit",TLe=()=>"退出码",RLe=()=>"خروج",MLe=()=>"رمز الخروج",OLe=()=>"salida",DLe=()=>"एग्ज़िट",LLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TLe():t==="fa"?RLe():t==="ar"?MLe():t==="es"?OLe():t==="hi"?DLe():ALe()}),ILe=()=>"from",$Le=()=>"来自",BLe=()=>"از",PLe=()=>"من",FLe=()=>"desde",HLe=()=>"से",qLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Le():t==="fa"?BLe():t==="ar"?PLe():t==="es"?FLe():t==="hi"?HLe():ILe()}),ULe=()=>"Logs",GLe=()=>"日志",VLe=()=>"گزارش‌ها",KLe=()=>"السجلات",WLe=()=>"Logs",QLe=()=>"लॉग",XLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GLe():t==="fa"?VLe():t==="ar"?KLe():t==="es"?WLe():t==="hi"?QLe():ULe()}),YLe=()=>"Run",ZLe=()=>"运行",JLe=()=>"اجرا",eIe=()=>"تشغيل",tIe=()=>"Ejecución",nIe=()=>"रन",rIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZLe():t==="fa"?JLe():t==="ar"?eIe():t==="es"?tIe():t==="hi"?nIe():YLe()}),sIe=()=>"Run history",iIe=()=>"运行历史",aIe=()=>"تاریخچهٔ اجرا",oIe=()=>"سجل التشغيل",cIe=()=>"Historial de ejecuciones",lIe=()=>"रन इतिहास",uIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iIe():t==="fa"?aIe():t==="ar"?oIe():t==="es"?cIe():t==="hi"?lIe():sIe()}),_Ie=()=>"Started",fIe=()=>"开始时间",dIe=()=>"آغاز",hIe=()=>"بدأ",pIe=()=>"Inicio",mIe=()=>"शुरू हुआ",gIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fIe():t==="fa"?dIe():t==="ar"?hIe():t==="es"?pIe():t==="hi"?mIe():_Ie()}),vIe=()=>"Runs",bIe=()=>"运行",yIe=()=>"اجراها",xIe=()=>"عمليات التشغيل",wIe=()=>"Ejecuciones",kIe=()=>"रन",SIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bIe():t==="fa"?yIe():t==="ar"?xIe():t==="es"?wIe():t==="hi"?kIe():vIe()}),CIe=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",EIe=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",NIe=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",zIe=()=>"ستظهر التجارب وعمليات تشغيلها هنا. اطلب من الوكيل إعداد تجربة للبدء.",jIe=()=>"Los experimentos y sus ejecuciones aparecerán aquí. Pídele al agente que configure un experimento para empezar.",AIe=()=>"प्रयोग और उनके रन यहाँ दिखेंगे। शुरू करने के लिए एजेंट से एक प्रयोग सेट अप करने को कहें।",TIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EIe():t==="fa"?NIe():t==="ar"?zIe():t==="es"?jIe():t==="hi"?AIe():CIe()}),RIe=()=>"No runs yet",MIe=()=>"还没有运行",OIe=()=>"هنوز اجرایی وجود ندارد",DIe=()=>"لا عمليات تشغيل بعد",LIe=()=>"Aún no hay ejecuciones",IIe=()=>"अभी तक कोई रन नहीं",$Ie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MIe():t==="fa"?OIe():t==="ar"?DIe():t==="es"?LIe():t==="hi"?IIe():RIe()}),BIe=()=>"No experiments yet.",PIe=()=>"还没有实验。",FIe=()=>"هنوز آزمایشی وجود ندارد.",HIe=()=>"لا توجد تجارب بعد.",qIe=()=>"Aún no hay experimentos.",UIe=()=>"अभी तक कोई प्रयोग नहीं।",GIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PIe():t==="fa"?FIe():t==="ar"?HIe():t==="es"?qIe():t==="hi"?UIe():BIe()}),VIe=()=>"Not run yet",KIe=()=>"尚未运行",WIe=()=>"هنوز اجرا نشده",QIe=()=>"لم تُشغَّل بعد",XIe=()=>"Aún sin ejecutar",YIe=()=>"अभी तक नहीं चलाया गया",ZIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KIe():t==="fa"?WIe():t==="ar"?QIe():t==="es"?XIe():t==="hi"?YIe():VIe()}),JIe=()=>"1 run",e$e=()=>"1 次运行",t$e=()=>"۱ اجرا",n$e=()=>"تشغيل واحد",r$e=()=>"1 ejecución",s$e=()=>"1 रन",i$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e$e():t==="fa"?t$e():t==="ar"?n$e():t==="es"?r$e():t==="hi"?s$e():JIe()}),a$e=()=>"Open logs",o$e=()=>"打开日志",c$e=()=>"باز کردن گزارش‌ها",l$e=()=>"فتح السجلات",u$e=()=>"Abrir logs",_$e=()=>"लॉग खोलें",f$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o$e():t==="fa"?c$e():t==="ar"?l$e():t==="es"?u$e():t==="hi"?_$e():a$e()}),d$e=e=>`${e==null?void 0:e.count} runs`,h$e=e=>`${e==null?void 0:e.count} 次运行`,p$e=e=>`${e==null?void 0:e.count} اجرا`,m$e=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,g$e=e=>`${e==null?void 0:e.count} ejecuciones`,v$e=e=>`${e==null?void 0:e.count} रन`,b$e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?h$e(e):t==="fa"?p$e(e):t==="ar"?m$e(e):t==="es"?g$e(e):t==="hi"?v$e(e):d$e(e)}),y$e=()=>"Stop requested",x$e=()=>"已请求停止",w$e=()=>"درخواست توقف ثبت شد",k$e=()=>"طُلب الإيقاف",S$e=()=>"Detención solicitada",C$e=()=>"रोकने का अनुरोध किया गया",E$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x$e():t==="fa"?w$e():t==="ar"?k$e():t==="es"?S$e():t==="hi"?C$e():y$e()}),N$e=()=>"Stop run",z$e=()=>"停止运行",j$e=()=>"توقف اجرا",A$e=()=>"إيقاف التشغيل",T$e=()=>"Detener ejecución",R$e=()=>"रन रोकें",M$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z$e():t==="fa"?j$e():t==="ar"?A$e():t==="es"?T$e():t==="hi"?R$e():N$e()}),O$e=()=>"Code",D$e=()=>"代码",L$e=()=>"کد",I$e=()=>"الشيفرة",$$e=()=>"Código",B$e=()=>"कोड",P$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D$e():t==="fa"?L$e():t==="ar"?I$e():t==="es"?$$e():t==="hi"?B$e():O$e()}),F$e=()=>"Experiments",H$e=()=>"实验",q$e=()=>"آزمایش‌ها",U$e=()=>"التجارب",G$e=()=>"Experimentos",V$e=()=>"प्रयोग",K$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H$e():t==="fa"?q$e():t==="ar"?U$e():t==="es"?G$e():t==="hi"?V$e():F$e()}),W$e=()=>"Logs",Q$e=()=>"日志",X$e=()=>"گزارش‌ها",Y$e=()=>"السجلات",Z$e=()=>"Logs",J$e=()=>"लॉग",C3=((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()}),eBe=()=>"Stop failed:",tBe=()=>"停止失败:",nBe=()=>"توقف ناموفق بود:",rBe=()=>"فشل الإيقاف:",sBe=()=>"Error al detener:",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=()=>"Download this chat as Markdown",cBe=()=>"将此聊天下载为 Markdown",lBe=()=>"دانلود این گفت‌وگو به‌صورت Markdown",uBe=()=>"تنزيل هذه المحادثة بتنسيق Markdown",_Be=()=>"Descarga este chat en Markdown",fBe=()=>"इस चैट को Markdown के रूप में डाउनलोड करें",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=()=>"Clipboard access is unavailable.",pBe=()=>"无法访问剪贴板。",mBe=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",gBe=()=>"الوصول إلى الحافظة غير متاح.",vBe=()=>"El acceso al portapapeles no está disponible.",bBe=()=>"क्लिपबोर्ड एक्सेस उपलब्ध नहीं है।",cL=((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=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,xBe=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,wBe=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,kBe=e=>`حذف «${e==null?void 0:e.path}»؟ لا يمكن التراجع عن هذا الإجراء.`,SBe=e=>`¿Eliminar “${e==null?void 0:e.path}”? Esta acción no se puede deshacer.`,CBe=e=>`“${e==null?void 0:e.path}” हटाएं? इसे वापस नहीं लाया जा सकता।`,EBe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xBe(e):t==="fa"?wBe(e):t==="ar"?kBe(e):t==="es"?SBe(e):t==="hi"?CBe(e):yBe(e)}),NBe=()=>"Duplicate",zBe=()=>"创建副本",jBe=()=>"ایجاد نسخهٔ تکراری",ABe=()=>"تكرار",TBe=()=>"Duplicar",RBe=()=>"डुप्लिकेट करें",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=e=>`File actions for ${e==null?void 0:e.path}`,DBe=e=>`${e==null?void 0:e.path} 的文件操作`,LBe=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,IBe=e=>`إجراءات الملف لـ ${e==null?void 0:e.path}`,$Be=e=>`Acciones de archivo para ${e==null?void 0:e.path}`,BBe=e=>`${e==null?void 0:e.path} के लिए फ़ाइल क्रियाएं`,PBe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DBe(e):t==="fa"?LBe(e):t==="ar"?IBe(e):t==="es"?$Be(e):t==="hi"?BBe(e):OBe(e)}),FBe=()=>"Open",HBe=()=>"打开",qBe=()=>"باز کردن",UBe=()=>"فتح",GBe=()=>"Abrir",VBe=()=>"खोलें",KBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HBe():t==="fa"?qBe():t==="ar"?UBe():t==="es"?GBe():t==="hi"?VBe():FBe()}),WBe=e=>`Rename ${e==null?void 0:e.path}`,QBe=e=>`重命名 ${e==null?void 0:e.path}`,XBe=e=>`تغییر نام ${e==null?void 0:e.path}`,YBe=e=>`إعادة تسمية ${e==null?void 0:e.path}`,ZBe=e=>`Renombrar ${e==null?void 0:e.path}`,JBe=e=>`${e==null?void 0:e.path} का नाम बदलें`,ePe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QBe(e):t==="fa"?XBe(e):t==="ar"?YBe(e):t==="es"?ZBe(e):t==="hi"?JBe(e):WBe(e)}),tPe=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,nPe=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,rPe=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,sPe=e=>`ليس في ${e==null?void 0:e.root} — عرض النسخة من مُخرَجات المشروع.`,iPe=e=>`No está en ${e==null?void 0:e.root} — se muestra la copia de los artefactos del proyecto.`,aPe=e=>`${e==null?void 0:e.root} में नहीं — प्रोजेक्ट के आर्टिफ़ैक्ट से कॉपी दिखाई जा रही है।`,oPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nPe(e):t==="fa"?rPe(e):t==="ar"?sPe(e):t==="es"?iPe(e):t==="hi"?aPe(e):tPe(e)}),cPe=()=>"Binary file — no inline preview.",lPe=()=>"二进制文件——无法内嵌预览。",uPe=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",_Pe=()=>"ملف ثنائي — لا توجد معاينة مضمّنة.",fPe=()=>"Archivo binario — sin vista previa.",dPe=()=>"बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।",hPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lPe():t==="fa"?uPe():t==="ar"?_Pe():t==="es"?fPe():t==="hi"?dPe():cPe()}),pPe=()=>"This file changed on disk. Your edits have not been overwritten.",mPe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",gPe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",vPe=()=>"تغيّر هذا الملف على القرص. لم تُستبدل تعديلاتك.",bPe=()=>"Este archivo cambió en disco. Tus cambios no se han sobrescrito.",yPe=()=>"यह फ़ाइल डिस्क पर बदल गई है। आपके बदलाव अधिलेखित नहीं हुए हैं।",ZN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mPe():t==="fa"?gPe():t==="ar"?vPe():t==="es"?bPe():t==="hi"?yPe():pPe()}),xPe=()=>"Compile failed",wPe=()=>"编译失败",kPe=()=>"کامپایل ناموفق بود",SPe=()=>"فشل التجميع",CPe=()=>"Error al compilar",EPe=()=>"कंपाइल विफल",NPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wPe():t==="fa"?kPe():t==="ar"?SPe():t==="es"?CPe():t==="hi"?EPe():xPe()}),zPe=()=>"Compile PDF",jPe=()=>"编译 PDF",APe=()=>"کامپایل PDF",TPe=()=>"تجميع PDF",RPe=()=>"Compilar PDF",MPe=()=>"PDF कंपाइल करें",JN=((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()}),OPe=()=>"Compiled, but the engine reported errors — check the output below.",DPe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",LPe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",IPe=()=>"اكتمل التجميع، لكن المحرك أبلغ عن أخطاء — راجع المُخرَجات أدناه.",$Pe=()=>"Compilado, pero el motor informó de errores — revisa la salida de abajo.",BPe=()=>"कंपाइल हुआ, पर इंजन ने त्रुटियाँ बताईं — नीचे आउटपुट जाँचें।",PPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DPe():t==="fa"?LPe():t==="ar"?IPe():t==="es"?$Pe():t==="hi"?BPe():OPe()}),FPe=()=>"Copy command",HPe=()=>"复制命令",qPe=()=>"کپی فرمان",UPe=()=>"نسخ الأمر",GPe=()=>"Copiar comando",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=()=>"Copy file contents",QPe=()=>"复制文件内容",XPe=()=>"کپی محتوای فایل",YPe=()=>"نسخ محتوى الملف",ZPe=()=>"Copiar contenido del archivo",JPe=()=>"फ़ाइल की सामग्री कॉपी करें",ez=((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=()=>"Could not copy file contents",tFe=()=>"无法复制文件内容",nFe=()=>"کپی محتوای فایل ممکن نشد",rFe=()=>"تعذّر نسخ محتوى الملف",sFe=()=>"No se pudo copiar el contenido del archivo",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 install command",cFe=()=>"复制安装命令",lFe=()=>"کپی فرمان نصب",uFe=()=>"نسخ أمر التثبيت",_Fe=()=>"Copiar comando de instalación",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=()=>"This file was deleted on disk. Your edits have not been discarded.",pFe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",mFe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",gFe=()=>"حُذف هذا الملف من القرص. لم تُتجاهل تعديلاتك.",vFe=()=>"Este archivo se eliminó del disco. Tus cambios no se han descartado.",bFe=()=>"यह फ़ाइल डिस्क से हटा दी गई थी। आपके बदलाव मिटाए नहीं गए हैं।",tz=((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=()=>"Discard my edits and reload",xFe=()=>"放弃我的编辑并重新加载",wFe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",kFe=()=>"تجاهل تعديلاتي وإعادة التحميل",SFe=()=>"Descartar mis cambios y recargar",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=()=>"Discard unsaved changes and close this file?",zFe=()=>"要丢弃未保存的更改并关闭此文件吗?",jFe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",AFe=()=>"تجاهل التغييرات غير المحفوظة وإغلاق هذا الملف؟",TFe=()=>"¿Descartar los cambios sin guardar y cerrar este archivo?",RFe=()=>"सेव न किए गए बदलाव छोड़ें और यह फ़ाइल बंद करें?",nz=((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()}),MFe=()=>"Dismiss",OFe=()=>"关闭",DFe=()=>"بستن",LFe=()=>"تجاهل",IFe=()=>"Cerrar",$Fe=()=>"खारिज करें",BFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OFe():t==="fa"?DFe():t==="ar"?LFe():t==="es"?IFe():t==="hi"?$Fe():MFe()}),PFe=()=>"Dismiss compile message",FFe=()=>"关闭编译消息",HFe=()=>"بستن پیام کامپایل",qFe=()=>"تجاهل رسالة التجميع",UFe=()=>"Cerrar mensaje de compilación",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=()=>"Dismiss Overleaf message",WFe=()=>"关闭 Overleaf 消息",QFe=()=>"بستن پیام Overleaf",XFe=()=>"تجاهل رسالة Overleaf",YFe=()=>"Cerrar mensaje de Overleaf",ZFe=()=>"Overleaf संदेश खारिज करें",JFe=((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()}),eHe=()=>"Download",tHe=()=>"下载",nHe=()=>"بارگیری",rHe=()=>"تنزيل",sHe=()=>"Descargar",iHe=()=>"डाउनलोड करें",lL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tHe():t==="fa"?nHe():t==="ar"?rHe():t==="es"?sHe():t==="hi"?iHe():eHe()}),aHe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,oHe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,cHe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,lHe=e=>`تنزيل ${e==null?void 0:e.name} (غير محدَّث — أعِد التجميع أولًا)`,uHe=e=>`Descargar ${e==null?void 0:e.name} (desactualizado — vuelve a compilar antes)`,_He=e=>`${e==null?void 0:e.name} डाउनलोड करें (पुरानी — पहले फिर से कंपाइल करें)`,fHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oHe(e):t==="fa"?cHe(e):t==="ar"?lHe(e):t==="es"?uHe(e):t==="hi"?_He(e):aHe(e)}),dHe=()=>"Failed to load file:",hHe=()=>"加载文件失败:",pHe=()=>"بارگیری فایل ناموفق بود:",mHe=()=>"تعذّر تحميل الملف:",gHe=()=>"Error al cargar el archivo:",vHe=()=>"फ़ाइल लोड नहीं हो सकी:",rz=((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()}),bHe=()=>"File truncated — showing the first 512 KB.",yHe=()=>"文件已截断——仅显示前 512 KB。",xHe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",wHe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",kHe=()=>"Archivo truncado — se muestran los primeros 512 KB.",SHe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",CHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yHe():t==="fa"?xHe():t==="ar"?wHe():t==="es"?kHe():t==="hi"?SHe():bHe()}),EHe=()=>"The page below stops partway — the full file could not be loaded.",NHe=()=>"下方页面在中途结束——无法加载完整文件。",zHe=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",jHe=()=>"عرض الصفحة أدناه غير مكتمل — تعذّر تحميل الملف كاملًا.",AHe=()=>"La página se corta a mitad — no se pudo cargar el archivo completo.",THe=()=>"नीचे का पेज बीच में रुक जाता है — पूरी फ़ाइल लोड नहीं हो सकी।",RHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NHe():t==="fa"?zHe():t==="ar"?jHe():t==="es"?AHe():t==="hi"?THe():EHe()}),MHe=e=>`Rendered HTML: ${e==null?void 0:e.name}`,OHe=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,DHe=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,LHe=e=>`HTML المعروض: ${e==null?void 0:e.name}`,IHe=e=>`HTML renderizado: ${e==null?void 0:e.name}`,$He=e=>`रेंडर किया गया HTML: ${e==null?void 0:e.name}`,BHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OHe(e):t==="fa"?DHe(e):t==="ar"?LHe(e):t==="es"?IHe(e):t==="hi"?$He(e):MHe(e)}),PHe=()=>"Loading…",FHe=()=>"正在加载…",HHe=()=>"در حال بارگیری…",qHe=()=>"جارٍ التحميل…",UHe=()=>"Cargando…",GHe=()=>"लोड हो रहा है…",uL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FHe():t==="fa"?HHe():t==="ar"?qHe():t==="es"?UHe():t==="hi"?GHe():PHe()}),VHe=()=>"File not found.",KHe=()=>"找不到文件。",WHe=()=>"فایل پیدا نشد.",QHe=()=>"لم يُعثر على الملف.",XHe=()=>"No se encontró el archivo.",YHe=()=>"फ़ाइल नहीं मिली।",sz=((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()}),ZHe=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,JHe=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,eqe=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,tqe=e=>`لم يُعثر على الملف في مُخرَجات المشروع أو في ${e==null?void 0:e.root}.`,nqe=e=>`No se encontró el archivo en los artefactos del proyecto ni en ${e==null?void 0:e.root}.`,rqe=e=>`फ़ाइल प्रोजेक्ट के आर्टिफ़ैक्ट या ${e==null?void 0:e.root} में नहीं मिली।`,sqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JHe(e):t==="fa"?eqe(e):t==="ar"?tqe(e):t==="es"?nqe(e):t==="hi"?rqe(e):ZHe(e)}),iqe=e=>`File not found on branch ${e==null?void 0:e.branch}.`,aqe=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,oqe=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,cqe=e=>`لم يُعثر على الملف في الفرع ${e==null?void 0:e.branch}.`,lqe=e=>`No se encontró el archivo en la rama ${e==null?void 0:e.branch}.`,uqe=e=>`फ़ाइल ${e==null?void 0:e.branch} ब्रांच पर नहीं मिली।`,_qe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aqe(e):t==="fa"?oqe(e):t==="ar"?cqe(e):t==="es"?lqe(e):t==="hi"?uqe(e):iqe(e)}),fqe=()=>"File not found on disk.",dqe=()=>"磁盘上找不到此文件。",hqe=()=>"فایل روی دیسک پیدا نشد.",pqe=()=>"لم يُعثر على الملف على القرص.",mqe=()=>"No se encontró el archivo en disco.",gqe=()=>"फ़ाइल डिस्क पर नहीं मिली।",vqe=((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()}),bqe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,yqe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,xqe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,wqe=e=>`لم يُعثر على الملف في ${e==null?void 0:e.root} ولا في مُخرَجات المشروع.`,kqe=e=>`No se encontró el archivo en ${e==null?void 0:e.root} ni en los artefactos del proyecto.`,Sqe=e=>`फ़ाइल ${e==null?void 0:e.root} या प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं मिली।`,Cqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yqe(e):t==="fa"?xqe(e):t==="ar"?wqe(e):t==="es"?kqe(e):t==="hi"?Sqe(e):bqe(e)}),Eqe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,Nqe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,zqe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,jqe=e=>`ليس في مُخرَجات المشروع — عرض النسخة من ${e==null?void 0:e.root}.`,Aqe=e=>`No está en los artefactos del proyecto — se muestra la copia que hay en ${e==null?void 0:e.root}.`,Tqe=e=>`प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं — ${e==null?void 0:e.root} से कॉपी दिखाई जा रही है।`,Rqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nqe(e):t==="fa"?zqe(e):t==="ar"?jqe(e):t==="es"?Aqe(e):t==="hi"?Tqe(e):Eqe(e)}),Mqe=()=>"Open in default editor",Oqe=()=>"在默认编辑器中打开",Dqe=()=>"باز کردن در ویرایشگر پیش‌فرض",Lqe=()=>"فتح في المحرر الافتراضي",Iqe=()=>"Abrir en el editor predeterminado",$qe=()=>"डिफ़ॉल्ट एडिटर में खोलें",iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oqe():t==="fa"?Dqe():t==="ar"?Lqe():t==="es"?Iqe():t==="hi"?$qe():Mqe()}),Bqe=e=>`Committed copy from ${e==null?void 0:e.branch}, not on disk`,Pqe=e=>`${e==null?void 0:e.branch} 上已提交的副本,不在磁盘上`,Fqe=e=>`نسخهٔ کامیت‌شده از ${e==null?void 0:e.branch}، نه روی دیسک`,Hqe=e=>`نسخة مودعة من ${e==null?void 0:e.branch}، ليست على القرص`,qqe=e=>`Copia confirmada de ${e==null?void 0:e.branch}, no en disco`,Uqe=e=>`${e==null?void 0:e.branch} की कमिट की गई कॉपी, डिस्क पर नहीं`,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=()=>"Only for projects on this computer",Kqe=()=>"仅适用于此电脑上的项目",Wqe=()=>"فقط برای پروژه‌های این رایانه",Qqe=()=>"فقط للمشاريع على هذا الكمبيوتر",Xqe=()=>"Solo para proyectos en este equipo",Yqe=()=>"केवल इस कंप्यूटर के प्रोजेक्ट के लिए",Zqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kqe():t==="fa"?Wqe():t==="ar"?Qqe():t==="es"?Xqe():t==="hi"?Yqe():Vqe()}),Jqe=()=>"Only for files in the project folder",eUe=()=>"仅适用于项目文件夹中的文件",tUe=()=>"فقط برای فایل‌های پوشهٔ پروژه",nUe=()=>"فقط لملفات مجلد المشروع",rUe=()=>"Solo para archivos de la carpeta del proyecto",sUe=()=>"केवल प्रोजेक्ट फ़ोल्डर की फ़ाइलों के लिए",iUe=((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()}),aUe=()=>"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.",oUe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",cUe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",lUe=()=>"تم سحب نسخة Overleaf من هذا الملف بينما كانت لديك تعديلات غير محفوظة، لذا ما تراه لم يعد مطابقًا لما هو على القرص. الحفظ الآن يرسل هذه المسودة إلى Overleaf بدلًا من ذلك.",uUe=()=>"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.",_Ue=()=>"इस फ़ाइल की Overleaf कॉपी तब खींची गई जब आपके पास सेव न किए गए बदलाव थे, इसलिए जो आप देख रहे हैं वह अब डिस्क पर मौजूद चीज़ नहीं है। अभी सेव करने पर यह ड्राफ़्ट सीधे Overleaf को भेज दिया जाएगा।",fUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oUe():t==="fa"?cUe():t==="ar"?lUe():t==="es"?uUe():t==="hi"?_Ue():aUe()}),dUe=()=>"Overwrite disk file",hUe=()=>"覆盖磁盘文件",pUe=()=>"بازنویسی فایل روی دیسک",mUe=()=>"استبدال الملف على القرص",gUe=()=>"Sobrescribir el archivo en disco",vUe=()=>"डिस्क फ़ाइल अधिलेखित करें",bUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hUe():t==="fa"?pUe():t==="ar"?mUe():t==="es"?gUe():t==="hi"?vUe():dUe()}),yUe=()=>"Compiled PDF is out of date",xUe=()=>"已编译的 PDF 不是最新版本",wUe=()=>"PDF کامپایل‌شده به‌روز نیست",kUe=()=>"ملف PDF المُجمَّع غير محدَّث",SUe=()=>"El PDF compilado está desactualizado",CUe=()=>"कंपाइल की गई PDF पुरानी है",EUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xUe():t==="fa"?wUe():t==="ar"?kUe():t==="es"?SUe():t==="hi"?CUe():yUe()}),NUe=()=>"project clone",zUe=()=>"项目克隆",jUe=()=>"کلون پروژه",AUe=()=>"نسخة المشروع المستنسخة",TUe=()=>"el clon del proyecto",RUe=()=>"प्रोजेक्ट क्लोन",a1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zUe():t==="fa"?jUe():t==="ar"?AUe():t==="es"?TUe():t==="hi"?RUe():NUe()}),MUe=()=>"Recompile PDF",OUe=()=>"重新编译 PDF",DUe=()=>"کامپایل دوبارهٔ PDF",LUe=()=>"إعادة تجميع PDF",IUe=()=>"Volver a compilar el PDF",$Ue=()=>"PDF फिर से कंपाइल करें",az=((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()}),BUe=()=>"Reload from disk",PUe=()=>"从磁盘重新加载",FUe=()=>"بارگذاری مجدد از دیسک",HUe=()=>"إعادة التحميل من القرص",qUe=()=>"Recargar desde el disco",UUe=()=>"डिस्क से फिर से लोड करें",GUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PUe():t==="fa"?FUe():t==="ar"?HUe():t==="es"?qUe():t==="hi"?UUe():BUe()}),VUe=()=>"Reveal in file manager",KUe=()=>"在文件管理器中显示",WUe=()=>"نمایش در مدیر فایل",QUe=()=>"إظهار في مدير الملفات",XUe=()=>"Mostrar en el administrador de archivos",YUe=()=>"फ़ाइल मैनेजर में दिखाएँ",oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KUe():t==="fa"?WUe():t==="ar"?QUe():t==="es"?XUe():t==="hi"?YUe():VUe()}),ZUe=()=>"Save failed",JUe=()=>"保存失败",eGe=()=>"ذخیره ناموفق بود",tGe=()=>"فشل الحفظ",nGe=()=>"Error al guardar",rGe=()=>"सेव विफल",sGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JUe():t==="fa"?eGe():t==="ar"?tGe():t==="es"?nGe():t==="hi"?rGe():ZUe()}),iGe=()=>"Saving…",aGe=()=>"正在保存…",oGe=()=>"در حال ذخیره…",cGe=()=>"جارٍ الحفظ…",lGe=()=>"Guardando…",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=()=>"Selected — press ⌘C",dGe=()=>"已选中 — 按 ⌘C 复制",hGe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",pGe=()=>"محدد — اضغط ⌘C",mGe=()=>"Seleccionado — pulsa ⌘C",gGe=()=>"चयनित — ⌘C दबाएं",vGe=((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()}),bGe=()=>"session’s worktree",yGe=()=>"会话工作树",xGe=()=>"درخت کاری نشست",wGe=()=>"شجرة عمل الجلسة",kGe=()=>"el árbol de trabajo de la sesión",SGe=()=>"सेशन की वर्कट्री",o1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yGe():t==="fa"?xGe():t==="ar"?wGe():t==="es"?kGe():t==="hi"?SGe():bGe()}),CGe=()=>"Show compiled PDF",EGe=()=>"显示已编译的 PDF",NGe=()=>"نمایش PDF کامپایل‌شده",zGe=()=>"عرض ملف PDF المُجمَّع",jGe=()=>"Mostrar el PDF compilado",AGe=()=>"कंपाइल की गई PDF दिखाएं",cz=((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()}),TGe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",RGe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",MGe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",OGe=()=>"أُنشئ ملف PDF هذا من نسخة أقدم من المصدر — أعِد تجميعه لتحديثه.",DGe=()=>"Este PDF se compiló a partir de una versión anterior del código fuente — vuelve a compilar para actualizarlo.",LGe=()=>"यह PDF सोर्स के पुराने वर्शन से कंपाइल हुआ था — अपडेट करने के लिए फिर से कंपाइल करें।",IGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RGe():t==="fa"?MGe():t==="ar"?OGe():t==="es"?DGe():t==="hi"?LGe():TGe()}),$Ge=()=>"This session's worktree isn't available — showing the project clone's copy.",BGe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",PGe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",FGe=()=>"شجرة عمل هذه الجلسة غير متاحة — عرض الملف من نسخة المشروع المستنسخة.",HGe=()=>"El árbol de trabajo de esta sesión no está disponible — se muestra la copia del clon del proyecto.",qGe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है — प्रोजेक्ट क्लोन की कॉपी दिखाई जा रही है।",UGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BGe():t==="fa"?PGe():t==="ar"?FGe():t==="es"?HGe():t==="hi"?qGe():$Ge()}),GGe=()=>"Unsaved",VGe=()=>"未保存",KGe=()=>"ذخیره نشده",WGe=()=>"غير محفوظ",QGe=()=>"Sin guardar",XGe=()=>"सेव नहीं हुआ",_L=((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=()=>"Unsaved — ⌘S to save",ZGe=()=>"未保存 — 按 ⌘S 保存",JGe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",eVe=()=>"غير محفوظ — ⌘S للحفظ",tVe=()=>"Sin guardar — ⌘S para guardar",nVe=()=>"सेव नहीं हुआ — सेव करने के लिए ⌘S दबाएं",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=()=>"Update orx on the remote machine to edit this file safely.",iVe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",aVe=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",oVe=()=>"حدّث orx على الجهاز البعيد لتعديل هذا الملف بأمان.",cVe=()=>"Actualiza orx en la máquina remota para editar este archivo de forma segura.",lVe=()=>"इस फ़ाइल को सुरक्षित रूप से संपादित करने के लिए रिमोट मशीन पर orx अपडेट करें।",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=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",fVe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",dVe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",hVe=()=>"شجرة عمل هذه الجلسة غير متاحة، والملف ليس في نسخة المشروع المستنسخة ولا في مُخرَجاته.",pVe=()=>"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.",mVe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है, और फ़ाइल प्रोजेक्ट क्लोन या उसके आर्टिफ़ैक्ट में नहीं है।",gVe=((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()}),vVe=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",bVe=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",yVe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",xVe=()=>"ستظهر ملفات مساحة العمل هنا. اطلب من الوكيل إنشاء ملف للبدء.",wVe=()=>"Los archivos de este espacio de trabajo aparecerán aquí. Pídele al agente que cree un archivo para empezar.",kVe=()=>"इस वर्कस्पेस की फ़ाइलें यहाँ दिखेंगी। शुरू करने के लिए एजेंट से एक फ़ाइल बनाने को कहें।",SVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bVe():t==="fa"?yVe():t==="ar"?xVe():t==="es"?wVe():t==="hi"?kVe():vVe()}),CVe=()=>"Back to preview",EVe=()=>"返回预览",NVe=()=>"بازگشت به پیش‌نمایش",zVe=()=>"العودة إلى المعاينة",jVe=()=>"Volver a la vista previa",AVe=()=>"प्रीव्यू पर वापस जाएं",TVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EVe():t==="fa"?NVe():t==="ar"?zVe():t==="es"?jVe():t==="hi"?AVe():CVe()}),RVe=e=>`${e==null?void 0:e.count} changed files`,MVe=e=>`${e==null?void 0:e.count} 个已更改文件`,OVe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,DVe=e=>`الملفات المعدَّلة: ${e==null?void 0:e.count}`,LVe=e=>`${e==null?void 0:e.count} archivos modificados`,IVe=e=>`${e==null?void 0:e.count} बदली गई फ़ाइलें`,fL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MVe(e):t==="fa"?OVe(e):t==="ar"?DVe(e):t==="es"?LVe(e):t==="hi"?IVe(e):RVe(e)}),$Ve=()=>"Changed files",BVe=()=>"已更改文件",PVe=()=>"فایل‌های تغییرکرده",FVe=()=>"الملفات المتغيّرة",HVe=()=>"Archivos modificados",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=()=>"Diff preview truncated",VVe=()=>"差异预览已截断",KVe=()=>"پیش‌نمایش تفاوت کوتاه شده است",WVe=()=>"معاينة الفروق مقتطعة",QVe=()=>"Vista previa del diff truncada",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} files shown (partial)`,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 mostrados (parcial)`,rKe=e=>`${e==null?void 0:e.count} फ़ाइलें दिखाई गईं (आंशिक)`,sKe=((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)}),iKe=()=>"No changes.",aKe=()=>"没有更改。",oKe=()=>"تغییری وجود ندارد.",cKe=()=>"لا توجد تغييرات.",lKe=()=>"No hay cambios.",uKe=()=>"कोई बदलाव नहीं।",_Ke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aKe():t==="fa"?oKe():t==="ar"?cKe():t==="es"?lKe():t==="hi"?uKe():iKe()}),fKe=()=>"No complete file preview was available before the cutoff.",dKe=()=>"在截断位置之前没有完整的文件预览。",hKe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",pKe=()=>"لم تتوفر معاينة كاملة للملف قبل الحد الأقصى.",mKe=()=>"No se pudo previsualizar ningún archivo completo antes del límite.",gKe=()=>"कटऑफ़ से पहले कोई पूरा फ़ाइल प्रीव्यू उपलब्ध नहीं था।",vKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dKe():t==="fa"?hKe():t==="ar"?pKe():t==="es"?mKe():t==="hi"?gKe():fKe()}),bKe=()=>"No textual diff for this file.",yKe=()=>"此文件没有文本差异。",xKe=()=>"برای این فایل تفاوت متنی وجود ندارد.",wKe=()=>"لا يوجد فرق نصّي لهذا الملف.",kKe=()=>"No hay diff de texto para este archivo.",SKe=()=>"इस फ़ाइल के लिए कोई टेक्स्ट डिफ़ नहीं है।",CKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yKe():t==="fa"?xKe():t==="ar"?wKe():t==="es"?kKe():t==="hi"?SKe():bKe()}),EKe=()=>"1 changed file",NKe=()=>"1 个已更改文件",zKe=()=>"۱ فایل تغییرکرده",jKe=()=>"ملف واحد معدَّل",AKe=()=>"1 archivo modificado",TKe=()=>"1 बदली गई फ़ाइल",dL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NKe():t==="fa"?zKe():t==="ar"?jKe():t==="es"?AKe():t==="hi"?TKe():EKe()}),RKe=()=>"1 file shown (partial)",MKe=()=>"显示 1 个文件(部分)",OKe=()=>"۱ فایل نمایش داده شده (ناقص)",DKe=()=>"عُرض ملف واحد (جزئيًا)",LKe=()=>"1 archivo mostrado (parcial)",IKe=()=>"1 फ़ाइल दिखाई गई (आंशिक)",$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=()=>"Unable to parse this diff.",PKe=()=>"无法解析此差异。",FKe=()=>"خواندن این تفاوت ممکن نبود.",HKe=()=>"تعذّر تحليل هذا الفرق.",qKe=()=>"No se pudo interpretar este diff.",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=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,KKe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,WKe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,QKe=e=>`عرض أول ${e==null?void 0:e.limit} (قُرئ ${e==null?void 0:e.read}). اطّلع على الفرق الكامل محليًا عبر git.`,XKe=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.`,YKe=e=>`पहले ${e==null?void 0:e.limit} दिखाए जा रहे हैं (${e==null?void 0:e.read} पढ़े गए)। git के साथ लोकल रूप से पूरा डिफ़ देखें।`,ZKe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KKe(e):t==="fa"?WKe(e):t==="ar"?QKe(e):t==="es"?XKe(e):t==="hi"?YKe(e):VKe(e)}),JKe=()=>"View full diff",eWe=()=>"查看完整差异",tWe=()=>"نمایش تفاوت کامل",nWe=()=>"عرض الفرق الكامل",rWe=()=>"Ver diff completo",sWe=()=>"पूरा डिफ़ देखें",iWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eWe():t==="fa"?tWe():t==="ar"?nWe():t==="es"?rWe():t==="hi"?sWe():JKe()}),aWe=()=>"Create a token ↗",oWe=()=>"创建令牌 ↗",cWe=()=>"ساخت توکن ↗",lWe=()=>"إنشاء رمز ↗",uWe=()=>"Crear un token ↗",_We=()=>"एक टोकन बनाएं ↗",fWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oWe():t==="fa"?cWe():t==="ar"?lWe():t==="es"?uWe():t==="hi"?_We():aWe()}),dWe=()=>"Keep the agent working toward a goal",hWe=()=>"让智能体持续朝目标推进",pWe=()=>"عامل را در مسیر یک هدف نگه دارید",mWe=()=>"اجعل الوكيل يعمل نحو هدف",gWe=()=>"Mantén al agente trabajando hacia un objetivo",vWe=()=>"एजेंट को एक लक्ष्य की ओर काम पर रखें",bWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hWe():t==="fa"?pWe():t==="ar"?mWe():t==="es"?gWe():t==="hi"?vWe():dWe()}),yWe=()=>"Approve and run",xWe=()=>"批准并运行",wWe=()=>"تأیید و اجرا",kWe=()=>"الموافقة والتشغيل",SWe=()=>"Aprobar y ejecutar",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=()=>"Cancel setup",zWe=()=>"取消设置",jWe=()=>"لغو راه‌اندازی",AWe=()=>"إلغاء الإعداد",TWe=()=>"Cancelar configuración",RWe=()=>"सेटअप रद्द करें",MWe=((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()}),OWe=()=>"Checking connection…",DWe=()=>"正在检查连接…",LWe=()=>"در حال بررسی اتصال…",IWe=()=>"جارٍ التحقق من الإعداد…",$We=()=>"Comprobando conexión…",BWe=()=>"कनेक्शन जाँचा जा रहा है…",PWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DWe():t==="fa"?LWe():t==="ar"?IWe():t==="es"?$We():t==="hi"?BWe():OWe()}),FWe=e=>`${e==null?void 0:e.agent} is connected.`,HWe=e=>`${e==null?void 0:e.agent} 已连接。`,qWe=e=>`${e==null?void 0:e.agent} متصل است.`,UWe=e=>`أصبح ${e==null?void 0:e.agent} جاهزًا.`,GWe=e=>`${e==null?void 0:e.agent} está conectado.`,VWe=e=>`${e==null?void 0:e.agent} कनेक्टेड है।`,KWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HWe(e):t==="fa"?qWe(e):t==="ar"?UWe(e):t==="es"?GWe(e):t==="hi"?VWe(e):FWe(e)}),WWe=()=>"Setup needs attention.",QWe=()=>"设置需要处理。",XWe=()=>"راه‌اندازی نیاز به بررسی دارد.",YWe=()=>"تعذّر إكمال الإعداد.",ZWe=()=>"La configuración requiere atención.",JWe=()=>"सेटअप पर ध्यान देने की ज़रूरत है।",hL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QWe():t==="fa"?XWe():t==="ar"?YWe():t==="es"?ZWe():t==="hi"?JWe():WWe()}),eQe=()=>"Install",tQe=()=>"安装",nQe=()=>"نصب",rQe=()=>"تثبيت",sQe=()=>"Instalar",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=>`Approve the command below to download and install ${e==null?void 0:e.agent} on your computer.`,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=>`Aprueba el siguiente comando para descargar e instalar ${e==null?void 0:e.agent} en tu equipo.`,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=()=>"Could not load setup commands.",pQe=()=>"无法加载设置命令。",mQe=()=>"بارگیری دستورهای راه‌اندازی ناموفق بود.",gQe=()=>"تعذّر تحميل أوامر الإعداد.",vQe=()=>"No se pudieron cargar los comandos de configuración.",bQe=()=>"सेटअप कमांड लोड नहीं हो सके।",yQe=((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()}),xQe=()=>"Sign in",wQe=()=>"登录",kQe=()=>"ورود",SQe=()=>"تسجيل الدخول",CQe=()=>"Iniciar sesión",EQe=()=>"साइन इन करें",pL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wQe():t==="fa"?kQe():t==="ar"?SQe():t==="es"?CQe():t==="hi"?EQe():xQe()}),NQe=()=>"The agent is not ready yet. Re-check or retry sign-in.",zQe=()=>"代理尚未就绪。请重新检查或重试登录。",jQe=()=>"عامل هنوز آماده نیست. دوباره بررسی کنید یا ورود را تکرار کنید.",AQe=()=>"وكيل البرمجة غير جاهز بعد. أعد التحقق ثم حاول مجددًا.",TQe=()=>"El agente aún no está listo. Vuelve a comprobarlo o intenta iniciar sesión de nuevo.",RQe=()=>"एजेंट अभी तैयार नहीं है। फिर से जाँचें या साइन-इन फिर से कोशिश करें।",mL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zQe():t==="fa"?jQe():t==="ar"?AQe():t==="es"?TQe():t==="hi"?RQe():NQe()}),MQe=()=>"Install, update, and sign-in buttons open a terminal here in OpenResearch.",OQe=()=>"安装、更新和登录按钮会在 OpenResearch 内打开终端。",DQe=()=>"دکمه‌های نصب، به‌روزرسانی و ورود، ترمینالی در همین OpenResearch باز می‌کنند.",LQe=()=>"يفتح طرفية هنا",IQe=()=>"Los botones de instalación, actualización e inicio de sesión abren un terminal aquí, en OpenResearch.",$Qe=()=>"इंस्टॉल, अपडेट और साइन-इन बटन OpenResearch में यहीं एक टर्मिनल खोलते हैं।",BQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OQe():t==="fa"?DQe():t==="ar"?LQe():t==="es"?IQe():t==="hi"?$Qe():MQe()}),PQe=()=>"This install command requires Node.js and npm.",FQe=()=>"此安装命令需要 Node.js 和 npm。",HQe=()=>"این دستور نصب به Node.js و npm نیاز دارد.",qQe=()=>"يلزم تثبيت Node.js وnpm لتشغيل هذا الأمر.",UQe=()=>"Este comando de instalación requiere Node.js y npm.",GQe=()=>"इस इंस्टॉल कमांड के लिए Node.js और npm ज़रूरी हैं।",VQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FQe():t==="fa"?HQe():t==="ar"?qQe():t==="es"?UQe():t==="hi"?GQe():PQe()}),KQe=e=>`Running \`${e==null?void 0:e.command}\` in the terminal:`,WQe=e=>`正在终端中运行 \`${e==null?void 0:e.command}\`:`,QQe=e=>`در حال اجرای \`${e==null?void 0:e.command}\` در ترمینال:`,XQe=e=>`جارٍ تشغيل \`${e==null?void 0:e.command}\` في الطرفية:`,YQe=e=>`Ejecutando \`${e==null?void 0:e.command}\` en el terminal:`,ZQe=e=>`टर्मिनल में \`${e==null?void 0:e.command}\` चलाया जा रहा है:`,JQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WQe(e):t==="fa"?QQe(e):t==="ar"?XQe(e):t==="es"?YQe(e):t==="hi"?ZQe(e):KQe(e)}),eXe=e=>`Set up ${e==null?void 0:e.agent}`,tXe=e=>`设置 ${e==null?void 0:e.agent}`,nXe=e=>`راه‌اندازی ${e==null?void 0:e.agent}`,rXe=e=>`إعداد ${e==null?void 0:e.agent}`,sXe=e=>`Configurar ${e==null?void 0:e.agent}`,iXe=e=>`${e==null?void 0:e.agent} सेट अप करें`,lz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tXe(e):t==="fa"?nXe(e):t==="ar"?rXe(e):t==="es"?sXe(e):t==="hi"?iXe(e):eXe(e)}),aXe=()=>"Update",oXe=()=>"更新",cXe=()=>"به‌روزرسانی",lXe=()=>"تحديث",uXe=()=>"Actualizar",_Xe=()=>"अपडेट करें",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=>`Approve the command below to update ${e==null?void 0:e.agent} on your computer.`,hXe=e=>`批准以下命令以在您的电脑上更新 ${e==null?void 0:e.agent}。`,pXe=e=>`برای به‌روزرسانی ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,mXe=e=>`سيؤدي هذا إلى تحديث ${e==null?void 0:e.agent} على جهازك. وافق لتشغيل الأمر أدناه.`,gXe=e=>`Aprueba el siguiente comando para actualizar ${e==null?void 0:e.agent} en tu equipo.`,vXe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} अपडेट करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,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=()=>"All projects",xXe=()=>"所有项目",wXe=()=>"همهٔ پروژه‌ها",kXe=()=>"كل المشاريع",SXe=()=>"Todos los proyectos",CXe=()=>"सभी प्रोजेक्ट",uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xXe():t==="fa"?wXe():t==="ar"?kXe():t==="es"?SXe():t==="hi"?CXe():yXe()}),EXe=()=>"Configure Repository",NXe=()=>"配置仓库",zXe=()=>"پیکربندی مخزن",jXe=()=>"إعداد المستودع",AXe=()=>"Configurar repositorio",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=()=>"Create a new project",OXe=()=>"新建项目",DXe=()=>"ایجاد پروژهٔ جدید",LXe=()=>"إنشاء مشروع جديد",IXe=()=>"Crear un proyecto nuevo",$Xe=()=>"नया प्रोजेक्ट बनाएं",BXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OXe():t==="fa"?DXe():t==="ar"?LXe():t==="es"?IXe():t==="hi"?$Xe():MXe()}),PXe=()=>"Hide sidebar",FXe=()=>"隐藏侧边栏",HXe=()=>"پنهان کردن نوار کناری",qXe=()=>"إخفاء الشريط الجانبي",UXe=()=>"Ocultar barra lateral",GXe=()=>"साइडबार छिपाएं",_z=((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=()=>"प्रोजेक्ट",gL=((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()}),ZXe=e=>`${e==null?void 0:e.count} cancelled`,JXe=e=>`${e==null?void 0:e.count} 次取消`,eYe=e=>`${e==null?void 0:e.count} لغوشده`,tYe=e=>`الملغاة: ${e==null?void 0:e.count}`,nYe=e=>`${e==null?void 0:e.count} canceladas`,rYe=e=>`${e==null?void 0:e.count} रद्द`,sYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JXe(e):t==="fa"?eYe(e):t==="ar"?tYe(e):t==="es"?nYe(e):t==="hi"?rYe(e):ZXe(e)}),iYe=e=>`${e==null?void 0:e.count} done`,aYe=e=>`${e==null?void 0:e.count} 次完成`,oYe=e=>`${e==null?void 0:e.count} تمام‌شده`,cYe=e=>`المكتملة: ${e==null?void 0:e.count}`,lYe=e=>`${e==null?void 0:e.count} completadas`,uYe=e=>`${e==null?void 0:e.count} पूरे`,_Ye=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aYe(e):t==="fa"?oYe(e):t==="ar"?cYe(e):t==="es"?lYe(e):t==="hi"?uYe(e):iYe(e)}),fYe=e=>`${e==null?void 0:e.count} failed`,dYe=e=>`${e==null?void 0:e.count} 次失败`,hYe=e=>`${e==null?void 0:e.count} ناموفق`,pYe=e=>`الفاشلة: ${e==null?void 0:e.count}`,mYe=e=>`${e==null?void 0:e.count} con error`,gYe=e=>`${e==null?void 0:e.count} विफल`,vYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dYe(e):t==="fa"?hYe(e):t==="ar"?pYe(e):t==="es"?mYe(e):t==="hi"?gYe(e):fYe(e)}),bYe=e=>`${e==null?void 0:e.count} files`,yYe=e=>`${e==null?void 0:e.count} 个文件`,xYe=e=>`${e==null?void 0:e.count} فایل`,wYe=e=>`الملفات: ${e==null?void 0:e.count}`,kYe=e=>`${e==null?void 0:e.count} archivos`,SYe=e=>`${e==null?void 0:e.count} फ़ाइलें`,CYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yYe(e):t==="fa"?xYe(e):t==="ar"?wYe(e):t==="es"?kYe(e):t==="hi"?SYe(e):bYe(e)}),EYe=e=>`${e==null?void 0:e.count}+ files`,NYe=e=>`至少 ${e==null?void 0:e.count} 个文件`,zYe=e=>`بیش از ${e==null?void 0:e.count} فایل`,jYe=e=>`الملفات: ${e==null?void 0:e.count} على الأقل`,AYe=e=>`${e==null?void 0:e.count}+ archivos`,TYe=e=>`${e==null?void 0:e.count}+ फ़ाइलें`,RYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NYe(e):t==="fa"?zYe(e):t==="ar"?jYe(e):t==="es"?AYe(e):t==="hi"?TYe(e):EYe(e)}),MYe=e=>`${e==null?void 0:e.count} live`,OYe=e=>`${e==null?void 0:e.count} 次进行中`,DYe=e=>`${e==null?void 0:e.count} فعال`,LYe=e=>`النشطة: ${e==null?void 0:e.count}`,IYe=e=>`${e==null?void 0:e.count} en curso`,$Ye=e=>`${e==null?void 0:e.count} लाइव`,BYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OYe(e):t==="fa"?DYe(e):t==="ar"?LYe(e):t==="es"?IYe(e):t==="hi"?$Ye(e):MYe(e)}),PYe=()=>"1 file",FYe=()=>"1 个文件",HYe=()=>"۱ فایل",qYe=()=>"ملف واحد",UYe=()=>"1 archivo",GYe=()=>"1 फ़ाइल",VYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FYe():t==="fa"?HYe():t==="ar"?qYe():t==="es"?UYe():t==="hi"?GYe():PYe()}),KYe=()=>"1 run",WYe=()=>"1 次运行",QYe=()=>"۱ اجرا",XYe=()=>"تشغيل واحد",YYe=()=>"1 ejecución",ZYe=()=>"1 रन",JYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WYe():t==="fa"?QYe():t==="ar"?XYe():t==="es"?YYe():t==="hi"?ZYe():KYe()}),eZe=e=>`${e==null?void 0:e.count} runs`,tZe=e=>`${e==null?void 0:e.count} 次运行`,nZe=e=>`${e==null?void 0:e.count} اجرا`,rZe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,sZe=e=>`${e==null?void 0:e.count} ejecuciones`,iZe=e=>`${e==null?void 0:e.count} रन`,aZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tZe(e):t==="fa"?nZe(e):t==="ar"?rZe(e):t==="es"?sZe(e):t==="hi"?iZe(e):eZe(e)}),oZe=()=>"Zoom in",cZe=()=>"放大",lZe=()=>"بزرگ‌نمایی",uZe=()=>"تكبير",_Ze=()=>"Acercar",fZe=()=>"ज़ूम इन",fz=((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()}),dZe=()=>"Zoom out",hZe=()=>"缩小",pZe=()=>"کوچک‌نمایی",mZe=()=>"تصغير",gZe=()=>"Alejar",vZe=()=>"ज़ूम आउट",dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hZe():t==="fa"?pZe():t==="ar"?mZe():t==="es"?gZe():t==="hi"?vZe():dZe()}),bZe=()=>"Reset zoom to fit",yZe=()=>"重置为适合窗口",xZe=()=>"بازنشانی بزرگ‌نمایی برای جا شدن",wZe=()=>"إعادة ضبط التكبير للملاءمة",kZe=()=>"Restablecer zoom para ajustar",SZe=()=>"फ़िट करने के लिए ज़ूम रीसेट करें",hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yZe():t==="fa"?xZe():t==="ar"?wZe():t==="es"?kZe():t==="hi"?SZe():bZe()}),CZe=()=>"No instances yet.",EZe=()=>"还没有实例。",NZe=()=>"هنوز نمونه‌ای وجود ندارد.",zZe=()=>"لا توجد مثيلات بعد.",jZe=()=>"Aún no hay instancias.",AZe=()=>"अभी तक कोई इंस्टेंस नहीं।",TZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EZe():t==="fa"?NZe():t==="ar"?zZe():t==="es"?jZe():t==="hi"?AZe():CZe()}),RZe=()=>"Nothing running right now.",MZe=()=>"当前没有运行中的实例。",OZe=()=>"اکنون چیزی در حال اجرا نیست.",DZe=()=>"لا شيء قيد التشغيل الآن.",LZe=()=>"No hay nada en ejecución ahora mismo.",IZe=()=>"अभी कुछ नहीं चल रहा।",$Ze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MZe():t==="fa"?OZe():t==="ar"?DZe():t==="es"?LZe():t==="hi"?IZe():RZe()}),BZe=()=>"Select a project to see its history.",PZe=()=>"请选择一个项目以查看其历史记录。",FZe=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",HZe=()=>"اختر مشروعًا لرؤية سجله.",qZe=()=>"Selecciona un proyecto para ver su historial.",UZe=()=>"इसका इतिहास देखने के लिए एक प्रोजेक्ट चुनें।",GZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PZe():t==="fa"?FZe():t==="ar"?HZe():t==="es"?qZe():t==="hi"?UZe():BZe()}),VZe=()=>"Select a project to see its runs.",KZe=()=>"请选择一个项目以查看其运行。",WZe=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",QZe=()=>"اختر مشروعًا لرؤية عمليات تشغيله.",XZe=()=>"Selecciona un proyecto para ver sus ejecuciones.",YZe=()=>"इसके रन देखने के लिए एक प्रोजेक्ट चुनें।",ZZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KZe():t==="fa"?WZe():t==="ar"?QZe():t==="es"?XZe():t==="hi"?YZe():VZe()}),JZe=()=>"View history",eJe=()=>"查看历史记录",tJe=()=>"مشاهدهٔ تاریخچه",nJe=()=>"عرض السجل",rJe=()=>"Ver historial",sJe=()=>"इतिहास देखें",iJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eJe():t==="fa"?tJe():t==="ar"?nJe():t==="es"?rJe():t==="hi"?sJe():JZe()}),aJe=e=>`View history (${e==null?void 0:e.count})`,oJe=e=>`查看历史记录(${e==null?void 0:e.count})`,cJe=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,lJe=e=>`عرض السجل (${e==null?void 0:e.count})`,uJe=e=>`Ver historial (${e==null?void 0:e.count})`,_Je=e=>`इतिहास देखें (${e==null?void 0:e.count})`,fJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oJe(e):t==="fa"?cJe(e):t==="ar"?lJe(e):t==="es"?uJe(e):t==="hi"?_Je(e):aJe(e)}),dJe=()=>"The engine exited without producing a PDF or a log.",hJe=()=>"引擎已退出,但没有生成 PDF 或日志。",pJe=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",mJe=()=>"خرج المحرك دون إنتاج ملف PDF أو سجل.",gJe=()=>"El motor terminó sin generar un PDF ni un log.",vJe=()=>"इंजन बिना PDF या लॉग बनाए बाहर निकल गया।",bJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hJe():t==="fa"?pJe():t==="ar"?mJe():t==="es"?gJe():t==="hi"?vJe():dJe()}),yJe=()=>"Loading…",xJe=()=>"正在加载…",wJe=()=>"در حال بارگیری…",kJe=()=>"جارٍ التحميل…",SJe=()=>"Cargando…",CJe=()=>"लोड हो रहा है…",EJe=((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()}),NJe=()=>"Add local model",zJe=()=>"添加本地模型",jJe=()=>"افزودن مدل محلی",AJe=()=>"إضافة نموذج محلي",TJe=()=>"Añadir modelo local",RJe=()=>"लोकल मॉडल जोड़ें",vL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zJe():t==="fa"?jJe():t==="ar"?AJe():t==="es"?TJe():t==="hi"?RJe():NJe()}),MJe=()=>"Local server address",OJe=()=>"本地服务器地址",DJe=()=>"نشانی سرور محلی",LJe=()=>"عنوان الخادم المحلي",IJe=()=>"Dirección del servidor local",$Je=()=>"लोकल सर्वर पता",BJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OJe():t==="fa"?DJe():t==="ar"?LJe():t==="es"?IJe():t==="hi"?$Je():MJe()}),PJe=()=>"Find models",FJe=()=>"查找模型",HJe=()=>"یافتن مدل‌ها",qJe=()=>"العثور على النماذج",UJe=()=>"Buscar modelos",GJe=()=>"मॉडल खोजें",VJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FJe():t==="fa"?HJe():t==="ar"?qJe():t==="es"?UJe():t==="hi"?GJe():PJe()}),KJe=()=>"(OpenAI compatible)",WJe=()=>"(兼容 OpenAI)",QJe=()=>"(سازگار با OpenAI)",XJe=()=>"(متوافق مع OpenAI)",YJe=()=>"(compatible con OpenAI)",ZJe=()=>"(OpenAI संगत)",bL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WJe():t==="fa"?QJe():t==="ar"?XJe():t==="es"?YJe():t==="hi"?ZJe():KJe()}),JJe=()=>"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.",eet=()=>"已保存,但 OpenCode 未列出该模型。请重新检查已安装的智能体。如果 OpenCode 配置限制了启用的提供商,请先允许此连接。",tet=()=>"ذخیره شد، اما OpenCode این مدل را فهرست نکرد. عامل‌های نصب‌شده را دوباره بررسی کنید. اگر پیکربندی OpenCode ارائه‌دهندگان فعال را محدود کرده، ابتدا این اتصال را مجاز کنید.",net=()=>"تم الحفظ، لكن OpenCode لم يُدرج هذا النموذج. تحقق من الوكلاء المثبّتين مجددًا. إذا كان إعداد OpenCode يقيّد المزوّدين المفعّلين، فاسمح بهذا الاتصال قبل استخدامه.",ret=()=>"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.",set=()=>"सेव हो गया, पर OpenCode ने इस मॉडल की सूची नहीं दी। इंस्टॉल किए गए एजेंट फिर से जाँचें। अगर आपका OpenCode कॉन्फ़िग चालू प्रोवाइडर सीमित करता है, तो इस्तेमाल से पहले इस कनेक्शन की अनुमति दें।",iet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eet():t==="fa"?tet():t==="ar"?net():t==="es"?ret():t==="hi"?set():JJe()}),aet=()=>"Connected",oet=()=>"已连接",cet=()=>"متصل شد",uet=()=>"متصل",_et=()=>"Conectado",fet=()=>"कनेक्टेड",det=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oet():t==="fa"?cet():t==="ar"?uet():t==="es"?_et():t==="hi"?fet():aet()}),het=()=>"Context window",pet=()=>"上下文窗口",met=()=>"پنجرهٔ زمینه",get=()=>"نافذة السياق",vet=()=>"Ventana de contexto",bet=()=>"कॉन्टेक्स्ट विंडो",yet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pet():t==="fa"?met():t==="ar"?get():t==="es"?vet():t==="hi"?bet():het()}),xet=()=>"Match the context window loaded in your model app. 32K is a useful starting point for tools; larger contexts use more memory.",wet=()=>"请与模型应用中加载的上下文窗口保持一致。使用工具时可从 32K 开始;更大的上下文需要更多内存。",ket=()=>"اندازهٔ زمینه را با تنظیم بارگذاری‌شده در برنامهٔ مدل هماهنگ کنید. ۳۲هزار توکن نقطهٔ شروع مناسبی برای ابزارهاست؛ زمینهٔ بزرگ‌تر حافظهٔ بیشتری مصرف می‌کند.",Cet=()=>"استخدم حجم نافذة السياق نفسه المحدد في تطبيق النموذج. يُعدّ 32 ألف رمز نقطة بداية مناسبة لاستخدام الأدوات؛ وتستهلك النوافذ الأكبر ذاكرة أكثر.",Eet=()=>"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.",Net=()=>"अपने मॉडल ऐप में लोड कॉन्टेक्स्ट विंडो से मेल खाएं। टूल के लिए 32K एक अच्छा शुरुआती बिंदु है; बड़े कॉन्टेक्स्ट ज़्यादा मेमोरी इस्तेमाल करते हैं।",zet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wet():t==="fa"?ket():t==="ar"?Cet():t==="es"?Eet():t==="hi"?Net():xet()}),jet=()=>"Custom Endpoint",Aet=()=>"自定义端点",Tet=()=>"نقطهٔ اتصال سفارشی",Ret=()=>"نقطة نهاية مخصصة",Met=()=>"Endpoint personalizado",Oet=()=>"कस्टम एंडपॉइंट",pS=((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()}),Det=e=>`Disconnect ${e==null?void 0:e.name}`,Let=e=>`断开 ${e==null?void 0:e.name}`,Iet=e=>`قطع اتصال ${e==null?void 0:e.name}`,$et=e=>`قطع اتصال ${e==null?void 0:e.name}`,Bet=e=>`Desconectar ${e==null?void 0:e.name}`,Pet=e=>`${e==null?void 0:e.name} डिस्कनेक्ट करें`,Fet=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Let(e):t==="fa"?Iet(e):t==="ar"?$et(e):t==="es"?Bet(e):t==="hi"?Pet(e):Det(e)}),Het=()=>"Get OpenCode",qet=()=>"获取 OpenCode",Uet=()=>"دریافت OpenCode",Get=()=>"الحصول على OpenCode",Vet=()=>"Obtener OpenCode",Ket=()=>"OpenCode लें",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=()=>"Install OpenCode to run tools with your local model, then re-check installed agents. No cloud account is required.",Xet=()=>"安装 OpenCode 以使用本地模型执行工具,然后重新检查已安装的智能体。无需云端账户。",Yet=()=>"برای اجرای ابزارها با مدل محلی، OpenCode را نصب کنید و عامل‌های نصب‌شده را دوباره بررسی کنید. حساب ابری لازم نیست.",Zet=()=>"ثبّت OpenCode لتشغيل الأدوات مع نموذجك المحلي، ثم أعد فحص الوكلاء المثبّتين. لا يلزم حساب سحابي.",Jet=()=>"Instala OpenCode para usar herramientas con tu modelo local y vuelve a comprobar los agentes instalados. No necesitas una cuenta en la nube.",ett=()=>"अपने लोकल मॉडल से टूल चलाने के लिए OpenCode इंस्टॉल करें, फिर इंस्टॉल किए गए एजेंट फिर से जाँचें। किसी क्लाउड खाते की ज़रूरत नहीं है।",ttt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xet():t==="fa"?Yet():t==="ar"?Zet():t==="es"?Jet():t==="hi"?ett():Qet()}),ntt=()=>"API key (optional)",rtt=()=>"API 密钥(可选)",stt=()=>"کلید API (اختیاری)",itt=()=>"مفتاح API (اختياري)",att=()=>"Clave de API (opcional)",ott=()=>"API की (वैकल्पिक)",ctt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rtt():t==="fa"?stt():t==="ar"?itt():t==="es"?att():t==="hi"?ott():ntt()}),ltt=()=>"Save model",utt=()=>"保存模型",_tt=()=>"ذخیرهٔ مدل",ftt=()=>"حفظ النموذج",dtt=()=>"Guardar modelo",htt=()=>"मॉडल सेव करें",ptt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?utt():t==="fa"?_tt():t==="ar"?ftt():t==="es"?dtt():t==="hi"?htt():ltt()}),mtt=()=>"Model server",gtt=()=>"模型服务器",vtt=()=>"سرور مدل",btt=()=>"خادم النموذج",ytt=()=>"Servidor del modelo",xtt=()=>"मॉडल सर्वर",pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gtt():t==="fa"?vtt():t==="ar"?btt():t==="es"?ytt():t==="hi"?xtt():mtt()}),wtt=()=>"Local models",ktt=()=>"本地模型",Stt=()=>"مدل‌های محلی",Ctt=()=>"النماذج المحلية",Ett=()=>"Modelos locales",Ntt=()=>"लोकल मॉडल",mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ktt():t==="fa"?Stt():t==="ar"?Ctt():t==="es"?Ett():t==="hi"?Ntt():wtt()}),ztt=()=>"API token (optional)",jtt=()=>"API 令牌(可选)",Att=()=>"توکن API (اختیاری)",Ttt=()=>"رمز API (اختياري)",Rtt=()=>"Token de API (opcional)",Mtt=()=>"API टोकन (वैकल्पिक)",Ott=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jtt():t==="fa"?Att():t==="ar"?Ttt():t==="es"?Rtt():t==="hi"?Mtt():ztt()}),Dtt=()=>"Copy",Ltt=()=>"复制",Itt=()=>"کپی",$tt=()=>"نسخ",Btt=()=>"Copiar",Ptt=()=>"कॉपी करें",mS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ltt():t==="fa"?Itt():t==="ar"?$tt():t==="es"?Btt():t==="hi"?Ptt():Dtt()}),Ftt=()=>"Copy code",Htt=()=>"复制代码",qtt=()=>"کپی کد",Utt=()=>"نسخ الشيفرة",Gtt=()=>"Copiar código",Vtt=()=>"कोड कॉपी करें",Ktt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Htt():t==="fa"?qtt():t==="ar"?Utt():t==="es"?Gtt():t==="hi"?Vtt():Ftt()}),Wtt=()=>"Download",Qtt=()=>"下载",Xtt=()=>"بارگیری",Ytt=()=>"تنزيل",Ztt=()=>"Descargar",Jtt=()=>"डाउनलोड करें",E3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qtt():t==="fa"?Xtt():t==="ar"?Ytt():t==="es"?Ztt():t==="hi"?Jtt():Wtt()}),ent=()=>"This browser can’t preview this media format.",tnt=()=>"此浏览器无法预览该媒体格式。",nnt=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",rnt=()=>"لا يستطيع هذا المتصفح معاينة صيغة الوسائط هذه.",snt=()=>"Este navegador no puede mostrar este formato multimedia.",int=()=>"यह ब्राउज़र इस मीडिया फ़ॉर्मैट का प्रीव्यू नहीं दिखा सकता।",ant=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tnt():t==="fa"?nnt():t==="ar"?rnt():t==="es"?snt():t==="hi"?int():ent()}),ont=()=>"Choose the model for this chat",cnt=()=>"选择此聊天的模型",lnt=()=>"انتخاب مدل این گفت‌وگو",unt=()=>"اختيار نموذج هذه المحادثة",_nt=()=>"Elige el modelo de este chat",fnt=()=>"इस चैट के लिए मॉडल चुनें",dnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cnt():t==="fa"?lnt():t==="ar"?unt():t==="es"?_nt():t==="hi"?fnt():ont()}),hnt=()=>"Add Local Model",pnt=()=>"添加本地模型",mnt=()=>"افزودن مدل محلی",gnt=()=>"إضافة نموذج محلي",vnt=()=>"Añadir modelo local",bnt=()=>"लोकल मॉडल जोड़ें",ynt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pnt():t==="fa"?mnt():t==="ar"?gnt():t==="es"?vnt():t==="hi"?bnt():hnt()}),xnt=()=>"Autonomy",wnt=()=>"自主程度",knt=()=>"خودمختاری",Snt=()=>"الاستقلالية",Cnt=()=>"Autonomía",Ent=()=>"स्वायत्तता",gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wnt():t==="fa"?knt():t==="ar"?Snt():t==="es"?Cnt():t==="hi"?Ent():xnt()}),Nnt=()=>"Agentic",znt=()=>"自主",jnt=()=>"خودکار",Ant=()=>"وكيل مستقل",Tnt=()=>"Agéntico",Rnt=()=>"एजेंटिक",Mnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?znt():t==="fa"?jnt():t==="ar"?Ant():t==="es"?Tnt():t==="hi"?Rnt():Nnt()}),Ont=()=>"Runs the research on its own and checks in when needed.",Dnt=()=>"独立推进研究,必要时再与你确认。",Lnt=()=>"پژوهش را خودش پیش می‌برد و در صورت نیاز با شما هماهنگ می‌کند.",Int=()=>"يدير البحث بنفسه ويراجعك عند الحاجة.",$nt=()=>"Dirige la investigación por su cuenta y consulta cuando hace falta.",Bnt=()=>"शोध खुद चलाता है और ज़रूरत पड़ने पर पूछता है।",Pnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dnt():t==="fa"?Lnt():t==="ar"?Int():t==="es"?$nt():t==="hi"?Bnt():Ont()}),Fnt=()=>"Copilot",Hnt=()=>"副驾驶",qnt=()=>"کمک‌خلبان",Unt=()=>"مساعد",Gnt=()=>"Copiloto",Vnt=()=>"कोपायलट",Knt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hnt():t==="fa"?qnt():t==="ar"?Unt():t==="es"?Gnt():t==="hi"?Vnt():Fnt()}),Wnt=()=>"Explains its reasoning and asks before acting.",Qnt=()=>"解释思路,行动前先征得你的同意。",Xnt=()=>"استدلالش را توضیح می‌دهد و پیش از اقدام اجازه می‌گیرد.",Ynt=()=>"يشرح منطقه ويطلب موافقتك قبل التنفيذ.",Znt=()=>"Explica su razonamiento y pide aprobación antes de actuar.",Jnt=()=>"अपना तर्क समझाता है और कार्य करने से पहले अनुमति लेता है।",ert=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qnt():t==="fa"?Xnt():t==="ar"?Ynt():t==="es"?Znt():t==="hi"?Jnt():Wnt()}),trt=()=>" · CLI configuration",nrt=()=>" · CLI 配置",rrt=()=>" · پیکربندی CLI",srt=()=>" · إعداد واجهة سطر الأوامر",irt=()=>" · Configuración de la CLI",art=()=>" · CLI कॉन्फ़िगरेशन",ort=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nrt():t==="fa"?rrt():t==="ar"?srt():t==="es"?irt():t==="hi"?art():trt()}),crt=()=>"· Default",lrt=()=>"· 默认",urt=()=>"· پیش‌فرض",_rt=()=>"· الافتراضي",frt=()=>"· Predeterminado",drt=()=>"· डिफ़ॉल्ट",yL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lrt():t==="fa"?urt():t==="ar"?_rt():t==="es"?frt():t==="hi"?drt():crt()}),hrt=()=>"Default model",prt=()=>"默认模型",mrt=()=>"مدل پیش‌فرض",grt=()=>"النموذج الافتراضي",vrt=()=>"Modelo predeterminado",brt=()=>"डिफ़ॉल्ट मॉडल",N3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?prt():t==="fa"?mrt():t==="ar"?grt():t==="es"?vrt():t==="hi"?brt():hrt()}),yrt=()=>"Detecting harnesses…",xrt=()=>"正在检测智能体工具…",wrt=()=>"در حال شناسایی ابزارهای عامل…",krt=()=>"جارٍ اكتشاف أدوات البرمجة…",Srt=()=>"Detectando agentes…",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=()=>"Effort",zrt=()=>"推理强度",jrt=()=>"میزان استدلال",Art=()=>"الجهد",Trt=()=>"Esfuerzo",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=()=>"Fast speed ·",Drt=()=>"快速 ·",Lrt=()=>"سرعت بالا ·",Irt=()=>"سرعة عالية ·",$rt=()=>"Modo rápido ·",Brt=()=>"तेज़ गति ·",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=()=>"Mode",Hrt=()=>"模式",qrt=()=>"حالت",Urt=()=>"الوضع",Grt=()=>"Modo",Vrt=()=>"मोड",vz=((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()}),Krt=()=>"Model",Wrt=()=>"模型",Qrt=()=>"مدل",Xrt=()=>"النموذج",Yrt=()=>"Modelo",Zrt=()=>"मॉडल",v0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wrt():t==="fa"?Qrt():t==="ar"?Xrt():t==="es"?Yrt():t==="hi"?Zrt():Krt()}),Jrt=e=>`${e==null?void 0:e.count} more — search to find`,est=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,tst=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,nst=e=>`نماذج إضافية: ${e==null?void 0:e.count} — ابحث للعثور عليها`,rst=e=>`${e==null?void 0:e.count} más — busca para encontrarlos`,sst=e=>`${e==null?void 0:e.count} और — खोजने के लिए टाइप करें`,ist=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?est(e):t==="fa"?tst(e):t==="ar"?nst(e):t==="es"?rst(e):t==="hi"?sst(e):Jrt(e)}),ast=()=>"Not available",ost=()=>"不可用",cst=()=>"در دسترس نیست",lst=()=>"غير متاح",ust=()=>"No disponible",_st=()=>"उपलब्ध नहीं",fst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ost():t==="fa"?cst():t==="ar"?lst():t==="es"?ust():t==="hi"?_st():ast()}),dst=()=>"Search models…",hst=()=>"搜索模型…",pst=()=>"جست‌وجوی مدل‌ها…",mst=()=>"البحث في النماذج…",gst=()=>"Buscar modelos…",vst=()=>"मॉडल खोजें…",bst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hst():t==="fa"?pst():t==="ar"?mst():t==="es"?gst():t==="hi"?vst():dst()}),yst=()=>"Search or enter model ID…",xst=()=>"搜索或输入模型 ID…",wst=()=>"جست‌وجو یا ورود شناسه مدل…",kst=()=>"ابحث أو أدخل معرّف النموذج…",Sst=()=>"Buscar o introducir ID…",Cst=()=>"खोजें या मॉडल ID डालें…",Est=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xst():t==="fa"?wst():t==="ar"?kst():t==="es"?Sst():t==="hi"?Cst():yst()}),Nst=()=>"Sessions keep their harness. Start a new chat to switch.",zst=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",jst=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",Ast=()=>"تحتفظ كل جلسة بأداة البرمجة الخاصة بها. ابدأ محادثة جديدة للتبديل.",Tst=()=>"Cada sesión mantiene su agente. Inicia un chat nuevo para cambiarlo.",Rst=()=>"सेशन अपना हार्नेस बनाए रखते हैं। बदलने के लिए नई चैट शुरू करें।",Mst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zst():t==="fa"?jst():t==="ar"?Ast():t==="es"?Tst():t==="hi"?Rst():Nst()}),Ost=()=>"Speed",Dst=()=>"速度",Lst=()=>"سرعت",Ist=()=>"السرعة",$st=()=>"Velocidad",Bst=()=>"गति",bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dst():t==="fa"?Lst():t==="ar"?Ist():t==="es"?$st():t==="hi"?Bst():Ost()}),Pst=()=>"Unavailable",Fst=()=>"不可用",Hst=()=>"در دسترس نیست",qst=()=>"غير متاح",Ust=()=>"No disponible",Gst=()=>"उपलब्ध नहीं",po=((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()}),Vst=()=>"Unverified",Kst=()=>"未经验证",Wst=()=>"تأییدنشده",Qst=()=>"غير مُتحقَّق منه",Xst=()=>"Sin verificar",Yst=()=>"सत्यापित नहीं",yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kst():t==="fa"?Wst():t==="ar"?Qst():t==="es"?Xst():t==="hi"?Yst():Vst()}),Zst=e=>`Use “${e==null?void 0:e.id}” as the model ID`,Jst=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,eit=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,tit=e=>`استخدام «${e==null?void 0:e.id}» معرّفًا للنموذج`,nit=e=>`Usar “${e==null?void 0:e.id}” como ID del modelo`,rit=e=>`मॉडल ID के रूप में “${e==null?void 0:e.id}” इस्तेमाल करें`,sit=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jst(e):t==="fa"?eit(e):t==="ar"?tit(e):t==="es"?nit(e):t==="hi"?rit(e):Zst(e)}),iit=()=>"Variant",ait=()=>"变体",oit=()=>"گونه",cit=()=>"الصنف",lit=()=>"Variante",uit=()=>"वेरिएंट",_it=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ait():t==="fa"?oit():t==="ar"?cit():t==="es"?lit():t==="hi"?uit():iit()}),fit=()=>"Start a new chat",dit=()=>"开始新聊天",hit=()=>"شروع گفت‌وگوی جدید",pit=()=>"بدء محادثة جديدة",mit=()=>"Inicia un chat nuevo",git=()=>"नई चैट शुरू करें",vit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dit():t==="fa"?hit():t==="ar"?pit():t==="es"?mit():t==="hi"?git():fit()}),bit=()=>"Advanced",yit=()=>"高级",xit=()=>"پیشرفته",wit=()=>"متقدم",kit=()=>"Avanzado",Sit=()=>"उन्नत",xL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yit():t==="fa"?xit():t==="ar"?wit():t==="es"?kit():t==="hi"?Sit():bit()}),Cit=()=>"Advanced · Connect GitHub",Eit=()=>"高级 · 连接 GitHub",Nit=()=>"پیشرفته · اتصال GitHub",zit=()=>"متقدم · ربط GitHub",jit=()=>"Avanzado · Conectar GitHub",Ait=()=>"उन्नत · GitHub कनेक्ट करें",Tit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eit():t==="fa"?Nit():t==="ar"?zit():t==="es"?jit():t==="hi"?Ait():Cit()}),Rit=()=>"Advanced · GitHub sync on",Mit=()=>"高级 · GitHub 同步已开启",Oit=()=>"پیشرفته · همگام‌سازی GitHub روشن است",Dit=()=>"متقدم · مزامنة GitHub مفعّلة",Lit=()=>"Avanzado · Sincronización con GitHub activada",Iit=()=>"उन्नत · GitHub सिंक चालू",$it=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mit():t==="fa"?Oit():t==="ar"?Dit():t==="es"?Lit():t==="hi"?Iit():Rit()}),Bit=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",Pit=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",Fit=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",Hit=()=>"اختر وجهة مختلفة. يحتاج مشروع الورقة إلى مجلد جديد أو فارغ خاص به.",qit=()=>"Elige otro destino. Un proyecto de paper necesita su propia carpeta nueva o vacía.",Uit=()=>"अलग गंतव्य चुनें। पेपर प्रोजेक्ट को अपना एक नया या खाली फ़ोल्डर चाहिए।",Git=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pit():t==="fa"?Fit():t==="ar"?Hit():t==="es"?qit():t==="hi"?Uit():Bit()}),Vit=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,Kit=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,Wit=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,Qit=e=>`تغيير مجلد المشروع؛ المجلد الحالي: ${e==null?void 0:e.path}`,Xit=e=>`Cambiar la carpeta del proyecto; carpeta actual: ${e==null?void 0:e.path}`,Yit=e=>`प्रोजेक्ट फ़ोल्डर बदलें; मौजूदा फ़ोल्डर: ${e==null?void 0:e.path}`,Zit=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kit(e):t==="fa"?Wit(e):t==="ar"?Qit(e):t==="es"?Xit(e):t==="hi"?Yit(e):Vit(e)}),Jit=()=>"Choose an existing project folder",eat=()=>"选择现有项目文件夹",tat=()=>"انتخاب پوشهٔ موجود پروژه",nat=()=>"اختر مجلد مشروع موجود",rat=()=>"Elige una carpeta de proyecto existente",sat=()=>"एक मौजूदा प्रोजेक्ट फ़ोल्डर चुनें",xz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eat():t==="fa"?tat():t==="ar"?nat():t==="es"?rat():t==="hi"?sat():Jit()}),iat=()=>"Choosing…",aat=()=>"正在选择…",oat=()=>"در حال انتخاب…",cat=()=>"جارٍ الاختيار…",lat=()=>"Eligiendo…",uat=()=>"चुना जा रहा है…",_at=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aat():t==="fa"?oat():t==="ar"?cat():t==="es"?lat():t==="hi"?uat():iat()}),fat=()=>"Clone destination",dat=()=>"克隆位置",hat=()=>"مقصد کلون",pat=()=>"وجهة الاستنساخ",mat=()=>"Destino del clon",gat=()=>"क्लोन गंतव्य",vat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dat():t==="fa"?hat():t==="ar"?pat():t==="es"?mat():t==="hi"?gat():fat()}),bat=()=>"Clone paper project",yat=()=>"克隆论文项目",xat=()=>"کلون پروژهٔ مقاله",wat=()=>"استنساخ مشروع الورقة",kat=()=>"Clonar proyecto del paper",Sat=()=>"पेपर प्रोजेक्ट क्लोन करें",Cat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yat():t==="fa"?xat():t==="ar"?wat():t==="es"?kat():t==="hi"?Sat():bat()}),Eat=()=>"Create project",Nat=()=>"创建项目",zat=()=>"ایجاد پروژه",jat=()=>"إنشاء المشروع",Aat=()=>"Crear proyecto",Tat=()=>"प्रोजेक्ट बनाएं",wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nat():t==="fa"?zat():t==="ar"?jat():t==="es"?Aat():t==="hi"?Tat():Eat()}),Rat=()=>"Creating…",Mat=()=>"正在创建…",Oat=()=>"در حال ایجاد…",Dat=()=>"جارٍ الإنشاء…",Lat=()=>"Creando…",Iat=()=>"बनाया जा रहा है…",$at=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mat():t==="fa"?Oat():t==="ar"?Dat():t==="es"?Lat():t==="hi"?Iat():Rat()}),Bat=()=>"Choose a different destination. This path is a file, not a folder.",Pat=()=>"请选择其他位置。此路径是文件,不是文件夹。",Fat=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",Hat=()=>"اختر وجهة مختلفة. هذا المسار ملف وليس مجلدًا.",qat=()=>"Elige otro destino. Esta ruta es un archivo, no una carpeta.",Uat=()=>"अलग गंतव्य चुनें। यह पथ एक फ़ाइल है, फ़ोल्डर नहीं।",lw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pat():t==="fa"?Fat():t==="ar"?Hat():t==="es"?qat():t==="hi"?Uat():Bat()}),Gat=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Vat=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",Kat=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",Wat=()=>"يوجد مجلد هنا بالفعل. اختر اسمًا أو موقعًا مختلفًا، أو استخدم «مجلد موجود».",Qat=()=>"Ya existe una carpeta aquí. Elige otro nombre u otra ubicación, o usa Carpeta existente.",Xat=()=>"यहाँ पहले से एक फ़ोल्डर मौजूद है। अलग नाम या स्थान चुनें, या मौजूदा फ़ोल्डर का इस्तेमाल करें।",kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vat():t==="fa"?Kat():t==="ar"?Wat():t==="es"?Qat():t==="hi"?Xat():Gat()}),Yat=()=>"Blank project",Zat=()=>"空白项目",Jat=()=>"پروژهٔ خالی",eot=()=>"مشروع فارغ",tot=()=>"Proyecto en blanco",not=()=>"खाली प्रोजेक्ट",rot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zat():t==="fa"?Jat():t==="ar"?eot():t==="es"?tot():t==="hi"?not():Yat()}),sot=()=>"Cancel",iot=()=>"取消",aot=()=>"لغو",oot=()=>"إلغاء",cot=()=>"Cancelar",lot=()=>"रद्द करें",uot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iot():t==="fa"?aot():t==="ar"?oot():t==="es"?cot():t==="hi"?lot():sot()}),_ot=()=>"Change",fot=()=>"更改",dot=()=>"تغییر",hot=()=>"تغيير",pot=()=>"Cambiar",mot=()=>"बदलें",got=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fot():t==="fa"?dot():t==="ar"?hot():t==="es"?pot():t==="hi"?mot():_ot()}),vot=()=>"Change selected paper",bot=()=>"更改所选论文",yot=()=>"تغییر مقالهٔ انتخاب‌شده",xot=()=>"تغيير الورقة المحددة",wot=()=>"Cambiar el paper seleccionado",kot=()=>"चयनित पेपर बदलें",Sot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bot():t==="fa"?yot():t==="ar"?xot():t==="es"?wot():t==="hi"?kot():vot()}),Cot=()=>"Check out a Git branch before using this folder.",Eot=()=>"使用此文件夹前,请先检出一个 Git 分支。",Not=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",zot=()=>"انتقل إلى فرع Git قبل استخدام هذا المجلد.",jot=()=>"Haz checkout de una rama de Git antes de usar esta carpeta.",Aot=()=>"इस फ़ोल्डर का उपयोग करने से पहले एक Git ब्रांच चेक आउट करें।",Tot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eot():t==="fa"?Not():t==="ar"?zot():t==="es"?jot():t==="hi"?Aot():Cot()}),Rot=()=>"Checking project location.",Mot=()=>"正在检查项目位置。",Oot=()=>"در حال بررسی محل پروژه.",Dot=()=>"جارٍ التحقق من موقع المشروع.",Lot=()=>"Comprobando la ubicación del proyecto.",Iot=()=>"प्रोजेक्ट स्थान जाँचा जा रहा है।",Sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mot():t==="fa"?Oot():t==="ar"?Dot():t==="es"?Lot():t==="hi"?Iot():Rot()}),$ot=()=>"Existing folder",Bot=()=>"现有文件夹",Pot=()=>"پوشهٔ موجود",Fot=()=>"مجلد موجود",Hot=()=>"Carpeta existente",qot=()=>"मौजूदा फ़ोल्डर",Uot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bot():t==="fa"?Pot():t==="ar"?Fot():t==="es"?Hot():t==="hi"?qot():$ot()}),Got=()=>"Experiment branches will be pushed to the remote GitHub repository.",Vot=()=>"实验分支将推送到远程 GitHub 仓库。",Kot=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",Wot=()=>"ستُرفع فروع التجارب إلى مستودع GitHub البعيد.",Qot=()=>"Las ramas de los experimentos se subirán al repositorio remoto de GitHub.",Xot=()=>"प्रयोग ब्रांच रिमोट GitHub रिपॉज़िटरी पर पुश की जाएंगी।",Yot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vot():t==="fa"?Kot():t==="ar"?Wot():t==="es"?Qot():t==="hi"?Xot():Got()}),Zot=()=>"From a paper",Jot=()=>"从论文创建",ect=()=>"از یک مقاله",tct=()=>"من ورقة بحثية",nct=()=>"A partir de un paper",rct=()=>"एक पेपर से",sct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jot():t==="fa"?ect():t==="ar"?tct():t==="es"?nct():t==="hi"?rct():Zot()}),ict=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",act=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",oct=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",cct=()=>"‏Git مطلوب للتجارب لكنه غير مثبّت. ثبّت Git ثم أعد تشغيل OpenResearch.",lct=()=>"Git es necesario para los experimentos, pero no está instalado. Instala Git y reinicia OpenResearch.",uct=()=>"प्रयोगों के लिए Git ज़रूरी है पर इंस्टॉल नहीं है। Git इंस्टॉल करें, फिर OpenResearch फिर से शुरू करें।",_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=()=>"my-research",dct=()=>"my-research",hct=()=>"my-research",pct=()=>"my-research",mct=()=>"mi-investigacion",gct=()=>"मेरा-शोध",Cz=((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()}),vct=()=>"No papers found. Try an arXiv ID, URL, or a different title.",bct=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",yct=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",xct=()=>"لم يُعثر على أوراق. جرّب معرّف arXiv أو رابطًا أو عنوانًا مختلفًا.",wct=()=>"No se encontraron papers. Prueba con un ID de arXiv, una URL u otro título.",kct=()=>"कोई पेपर नहीं मिला। एक arXiv ID, URL, या अलग शीर्षक आज़माएं।",Sct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bct():t==="fa"?yct():t==="ar"?xct():t==="es"?wct():t==="hi"?kct():vct()}),Cct=()=>"No public repository found on alphaXiv",Ect=()=>"在 alphaXiv 上未找到公开仓库",Nct=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",zct=()=>"لم يُعثر على مستودع عام على alphaXiv",jct=()=>"No se encontró ningún repositorio público en alphaXiv",Act=()=>"alphaXiv पर कोई सार्वजनिक रिपॉज़िटरी नहीं मिली",Tct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ect():t==="fa"?Nct():t==="ar"?zct():t==="es"?jct():t==="hi"?Act():Cct()}),Rct=()=>"OpenResearch will start a blank project with this paper's PDF.",Mct=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Oct=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",Dct=()=>"سيبدأ OpenResearch مشروعًا فارغًا مع ملف PDF لهذه الورقة.",Lct=()=>"OpenResearch creará un proyecto en blanco con el PDF de este paper.",Ict=()=>"OpenResearch इस पेपर की PDF के साथ एक खाली प्रोजेक्ट शुरू करेगा।",$ct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mct():t==="fa"?Oct():t==="ar"?Dct():t==="es"?Lct():t==="hi"?Ict():Rct()}),Bct=()=>"Paper",Pct=()=>"论文",Fct=()=>"مقاله",Hct=()=>"ورقة بحثية",qct=()=>"Paper",Uct=()=>"पेपर",Gct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pct():t==="fa"?Fct():t==="ar"?Hct():t==="es"?qct():t==="hi"?Uct():Bct()}),Vct=()=>"Project location",Kct=()=>"项目位置",Wct=()=>"محل پروژه",Qct=()=>"موقع المشروع",Xct=()=>"Ubicación del proyecto",Yct=()=>"प्रोजेक्ट स्थान",uw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kct():t==="fa"?Wct():t==="ar"?Qct():t==="es"?Xct():t==="hi"?Yct():Vct()}),Zct=()=>"Project name",Jct=()=>"项目名称",elt=()=>"نام پروژه",tlt=()=>"اسم المشروع",nlt=()=>"Nombre del proyecto",rlt=()=>"प्रोजेक्ट नाम",Ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jct():t==="fa"?elt():t==="ar"?tlt():t==="es"?nlt():t==="hi"?rlt():Zct()}),slt=()=>"Search for a paper by arXiv ID, URL, or title",ilt=()=>"按 arXiv ID、网址或标题搜索论文",alt=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",olt=()=>"ابحث عن ورقة بمعرّف arXiv أو رابط أو عنوان",clt=()=>"Busca un paper por ID de arXiv, URL o título",llt=()=>"arXiv ID, URL, या शीर्षक से पेपर खोजें",ult=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ilt():t==="fa"?alt():t==="ar"?olt():t==="es"?clt():t==="hi"?llt():slt()}),_lt=()=>"Sync experiments to GitHub",flt=()=>"将实验同步到 GitHub",dlt=()=>"همگام‌سازی آزمایش‌ها با GitHub",hlt=()=>"مزامنة التجارب مع GitHub",plt=()=>"Sincronizar experimentos con GitHub",mlt=()=>"प्रयोग GitHub पर सिंक करें",glt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?flt():t==="fa"?dlt():t==="ar"?hlt():t==="es"?plt():t==="hi"?mlt():_lt()}),vlt=()=>"That folder no longer exists. Choose it again.",blt=()=>"该文件夹已不存在。请重新选择。",ylt=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",xlt=()=>"لم يعد ذلك المجلد موجودًا. اختره مجددًا.",wlt=()=>"Esa carpeta ya no existe. Vuelve a elegirla.",klt=()=>"वह फ़ोल्डर अब मौजूद नहीं है। इसे फिर से चुनें।",Slt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?blt():t==="fa"?ylt():t==="ar"?xlt():t==="es"?wlt():t==="hi"?klt():vlt()}),Clt=()=>"The selected folder contains an invalid Git repository.",Elt=()=>"所选文件夹包含无效的 Git 仓库。",Nlt=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",zlt=()=>"يحتوي المجلد المحدد على مستودع Git غير صالح.",jlt=()=>"La carpeta seleccionada contiene un repositorio de Git no válido.",Alt=()=>"चयनित फ़ोल्डर में एक अमान्य Git रिपॉज़िटरी है।",Tlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Elt():t==="fa"?Nlt():t==="ar"?zlt():t==="es"?jlt():t==="hi"?Alt():Clt()}),Rlt=()=>"The selected path is not a folder.",Mlt=()=>"所选路径不是文件夹。",Olt=()=>"مسیر انتخاب‌شده پوشه نیست.",Dlt=()=>"المسار المحدد ليس مجلدًا.",Llt=()=>"La ruta seleccionada no es una carpeta.",Ilt=()=>"चयनित पथ एक फ़ोल्डर नहीं है।",$lt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mlt():t==="fa"?Olt():t==="ar"?Dlt():t==="es"?Llt():t==="hi"?Ilt():Rlt()}),Blt=e=>`Checking ${e==null?void 0:e.repository}.`,Plt=e=>`正在检查 ${e==null?void 0:e.repository}。`,Flt=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,Hlt=e=>`جارٍ التحقق من ${e==null?void 0:e.repository}.`,qlt=e=>`Comprobando ${e==null?void 0:e.repository}.`,Ult=e=>`${e==null?void 0:e.repository} जाँची जा रही है।`,Glt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Plt(e):t==="fa"?Flt(e):t==="ar"?Hlt(e):t==="es"?qlt(e):t==="hi"?Ult(e):Blt(e)}),Vlt=e=>`Creates ${e==null?void 0:e.repository}.`,Klt=e=>`将创建 ${e==null?void 0:e.repository}。`,Wlt=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,Qlt=e=>`ينشئ ${e==null?void 0:e.repository}.`,Xlt=e=>`Crea ${e==null?void 0:e.repository}.`,Ylt=e=>`${e==null?void 0:e.repository} बनाता है।`,Zlt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Klt(e):t==="fa"?Wlt(e):t==="ar"?Qlt(e):t==="es"?Xlt(e):t==="hi"?Ylt(e):Vlt(e)}),Jlt=e=>`Pushes to ${e==null?void 0:e.repository}.`,eut=e=>`将推送到 ${e==null?void 0:e.repository}。`,tut=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,nut=e=>`يرفع التغييرات إلى ${e==null?void 0:e.repository}.`,rut=e=>`Sube los cambios a ${e==null?void 0:e.repository}.`,sut=e=>`${e==null?void 0:e.repository} पर पुश करता है।`,iut=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eut(e):t==="fa"?tut(e):t==="ar"?nut(e):t==="es"?rut(e):t==="hi"?sut(e):Jlt(e)}),aut=()=>"Project location is required.",out=()=>"必须填写项目位置。",cut=()=>"محل پروژه الزامی است.",lut=()=>"موقع المشروع مطلوب.",uut=()=>"La ubicación del proyecto es obligatoria.",_ut=()=>"प्रोजेक्ट स्थान ज़रूरी है।",Nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?out():t==="fa"?cut():t==="ar"?lut():t==="es"?uut():t==="hi"?_ut():aut()}),fut=()=>"Choose a different destination. The paper repository needs a new or empty folder.",dut=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",hut=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",put=()=>"اختر وجهة مختلفة. يحتاج مستودع الورقة إلى مجلد جديد أو فارغ.",mut=()=>"Elige otro destino. El repositorio del paper necesita una carpeta nueva o vacía.",gut=()=>"अलग गंतव्य चुनें। पेपर रिपॉज़िटरी को एक नए या खाली फ़ोल्डर की ज़रूरत है।",zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dut():t==="fa"?hut():t==="ar"?put():t==="es"?mut():t==="hi"?gut():fut()}),vut=()=>"A linked public code repository is cloned without credentials.",but=()=>"关联的公开代码仓库无需凭据即可克隆。",yut=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",xut=()=>"يُستنسخ مستودع شيفرة عام مرتبط دون بيانات اعتماد.",wut=()=>"El repositorio de código público vinculado se clona sin credenciales.",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=e=>`Run ${e==null?void 0:e.command} before creating the project.`,Eut=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,Nut=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,zut=e=>`نفّذ ${e==null?void 0:e.command} قبل إنشاء المشروع.`,jut=e=>`Ejecuta ${e==null?void 0:e.command} antes de crear el proyecto.`,Aut=e=>`प्रोजेक्ट बनाने से पहले ${e==null?void 0:e.command} चलाएं।`,Tut=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Eut(e):t==="fa"?Nut(e):t==="ar"?zut(e):t==="es"?jut(e):t==="hi"?Aut(e):Cut(e)}),Rut=()=>"Searching alphaXiv…",Mut=()=>"正在搜索 alphaXiv…",Out=()=>"در حال جست‌وجوی alphaXiv…",Dut=()=>"جارٍ البحث في alphaXiv…",Lut=()=>"Buscando en alphaXiv…",Iut=()=>"alphaXiv खोजा जा रहा है…",$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=()=>"Use folder",Put=()=>"使用文件夹",Fut=()=>"استفاده از پوشه",Hut=()=>"استخدام المجلد",qut=()=>"Usar carpeta",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=()=>"Can’t reach OpenResearch. This page is no longer live.",Kut=()=>"无法连接 OpenResearch。此页面已不再实时同步。",Wut=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",Qut=()=>"تعذّر الاتصال بـ OpenResearch. لم تعد هذه الصفحة تُحدَّث تلقائيًا.",Xut=()=>"No se puede conectar con OpenResearch. Esta página ya no se actualiza.",Yut=()=>"OpenResearch तक नहीं पहुँच सके। यह पेज अब लाइव नहीं है।",z3=((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()}),Zut=()=>"A workspace for your research agents",Jut=()=>"面向研究智能体的工作空间",e_t=()=>"فضای کاری برای عامل‌های پژوهشی شما",t_t=()=>"مساحة عمل لوكلاء بحثك",n_t=()=>"Un espacio de trabajo para tus agentes de investigación",r_t=()=>"आपके शोध एजेंटों के लिए एक वर्कस्पेस",s_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jut():t==="fa"?e_t():t==="ar"?t_t():t==="es"?n_t():t==="hi"?r_t():Zut()}),i_t=()=>"Add papers that represent your research interests, including papers by other authors.",a_t=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",o_t=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",c_t=()=>"أضِف أوراقًا تمثّل اهتماماتك البحثية، بما في ذلك أوراق لمؤلفين آخرين.",l_t=()=>"Añade papers que representen tus intereses de investigación, incluidos papers de otros autores.",u_t=()=>"ऐसे पेपर जोड़ें जो आपकी शोध रुचियों को दर्शाते हों, चाहे वे किसी और लेखक के ही क्यों न हों।",__t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a_t():t==="fa"?o_t():t==="ar"?c_t():t==="es"?l_t():t==="hi"?u_t():i_t()}),f_t=()=>"API key",d_t=()=>"API 密钥",h_t=()=>"کلید API",p_t=()=>"مفتاح API",m_t=()=>"Clave de API",g_t=()=>"API की",gS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d_t():t==="fa"?h_t():t==="ar"?p_t():t==="es"?m_t():t==="hi"?g_t():f_t()}),v_t=()=>"AI/ML",b_t=()=>"人工智能与机器学习",y_t=()=>"هوش مصنوعی و یادگیری ماشین",x_t=()=>"الذكاء الاصطناعي/تعلّم الآلة",w_t=()=>"IA/ML",k_t=()=>"AI/ML",S_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b_t():t==="fa"?y_t():t==="ar"?x_t():t==="es"?w_t():t==="hi"?k_t():v_t()}),C_t=()=>"Biology",E_t=()=>"生物学",N_t=()=>"زیست‌شناسی",z_t=()=>"الأحياء",j_t=()=>"Biología",A_t=()=>"जीव विज्ञान",T_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E_t():t==="fa"?N_t():t==="ar"?z_t():t==="es"?j_t():t==="hi"?A_t():C_t()}),R_t=()=>"Other",M_t=()=>"其他",O_t=()=>"سایر",D_t=()=>"أخرى",L_t=()=>"Otra",I_t=()=>"अन्य",$_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M_t():t==="fa"?O_t():t==="ar"?D_t():t==="es"?L_t():t==="hi"?I_t():R_t()}),B_t=()=>"Physics",P_t=()=>"物理学",F_t=()=>"فیزیک",H_t=()=>"الفيزياء",q_t=()=>"Física",U_t=()=>"भौतिकी",G_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P_t():t==="fa"?F_t():t==="ar"?H_t():t==="es"?q_t():t==="hi"?U_t():B_t()}),V_t=()=>"Back",K_t=()=>"返回",W_t=()=>"بازگشت",Q_t=()=>"رجوع",X_t=()=>"Atrás",Y_t=()=>"वापस",jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K_t():t==="fa"?W_t():t==="ar"?Q_t():t==="es"?X_t():t==="hi"?Y_t():V_t()}),Z_t=()=>"Check failed",J_t=()=>"检查失败",eft=()=>"بررسی ناموفق بود",tft=()=>"فشل الفحص",nft=()=>"Error en la comprobación",rft=()=>"जाँच विफल",sft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J_t():t==="fa"?eft():t==="ar"?tft():t==="es"?nft():t==="hi"?rft():Z_t()}),ift=()=>"Checking",aft=()=>"正在检查",oft=()=>"در حال بررسی",cft=()=>"جارٍ الفحص",lft=()=>"Comprobando",uft=()=>"जाँचा जा रहा है",ff=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aft():t==="fa"?oft():t==="ar"?cft():t==="es"?lft():t==="hi"?uft():ift()}),_ft=()=>"Checking Git…",fft=()=>"正在检查 Git…",dft=()=>"در حال بررسی Git…",hft=()=>"جارٍ فحص Git…",pft=()=>"Comprobando Git…",mft=()=>"Git जाँचा जा रहा है…",gft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fft():t==="fa"?dft():t==="ar"?hft():t==="es"?pft():t==="hi"?mft():_ft()}),vft=()=>"Choose a coding agent",bft=()=>"选择编程智能体",yft=()=>"یک عامل کدنویسی انتخاب کنید",xft=()=>"اختر وكيل برمجة",wft=()=>"Elige un agente de programación",kft=()=>"एक कोडिंग एजेंट चुनें",Sft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bft():t==="fa"?yft():t==="ar"?xft():t==="es"?wft():t==="hi"?kft():vft()}),Cft=()=>"Choose a coding agent to continue.",Eft=()=>"选择一个编程智能体以继续。",Nft=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",zft=()=>"اختر وكيل برمجة للمتابعة.",jft=()=>"Elige un agente de programación para continuar.",Aft=()=>"जारी रखने के लिए एक कोडिंग एजेंट चुनें।",Tft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eft():t==="fa"?Nft():t==="ar"?zft():t==="es"?jft():t==="hi"?Aft():Cft()}),Rft=()=>"Choose another coding agent",Mft=()=>"选择其他编程智能体",Oft=()=>"انتخاب یک عامل برنامه‌نویسی دیگر",Dft=()=>"اختيار وكيل برمجة آخر",Lft=()=>"Elegir otro agente de programación",Ift=()=>"दूसरा कोडिंग एजेंट चुनें",$ft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mft():t==="fa"?Oft():t==="ar"?Dft():t==="es"?Lft():t==="hi"?Ift():Rft()}),Bft=()=>"Choose at least one research area to continue.",Pft=()=>"请至少选择一个研究领域后再继续。",Fft=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",Hft=()=>"اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.",qft=()=>"Elige al menos un área de investigación para continuar.",Uft=()=>"जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।",Gft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pft():t==="fa"?Fft():t==="ar"?Hft():t==="es"?qft():t==="hi"?Uft():Bft()}),Vft=()=>"Choose one or more.",Kft=()=>"请选择一项或多项。",Wft=()=>"یک یا چند مورد را انتخاب کنید.",Qft=()=>"اختر واحدًا أو أكثر.",Xft=()=>"Elige una o varias.",Yft=()=>"एक या अधिक चुनें।",Zft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kft():t==="fa"?Wft():t==="ar"?Qft():t==="es"?Xft():t==="hi"?Yft():Vft()}),Jft=()=>"Choose your preferred coding agent",edt=()=>"请选择首选编程智能体",tdt=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",ndt=()=>"اختر وكيل البرمجة المفضّل لديك",rdt=()=>"Elige tu agente de programación preferido",sdt=()=>"अपना पसंदीदा कोडिंग एजेंट चुनें",idt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?edt():t==="fa"?tdt():t==="ar"?ndt():t==="es"?rdt():t==="hi"?sdt():Jft()}),adt=()=>"Consolidate your research",odt=()=>"集中管理研究",cdt=()=>"پژوهش خود را یکپارچه کنید",ldt=()=>"وحّد أبحاثك",udt=()=>"Consolida tu investigación",_dt=()=>"अपने शोध को एक जगह लाएं",fdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?odt():t==="fa"?cdt():t==="ar"?ldt():t==="es"?udt():t==="hi"?_dt():adt()}),ddt=()=>"Continue",hdt=()=>"继续",pdt=()=>"ادامه",mdt=()=>"متابعة",gdt=()=>"Continuar",vdt=()=>"जारी रखें",Az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hdt():t==="fa"?pdt():t==="ar"?mdt():t==="es"?gdt():t==="hi"?vdt():ddt()}),bdt=()=>"Describe your research area to continue.",ydt=()=>"请描述你的研究领域后再继续。",xdt=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",wdt=()=>"صِف مجالك البحثي للمتابعة.",kdt=()=>"Describe tu área de investigación para continuar.",Sdt=()=>"जारी रखने के लिए अपना शोध क्षेत्र बताएं।",Cdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ydt():t==="fa"?xdt():t==="ar"?wdt():t==="es"?kdt():t==="hi"?Sdt():bdt()}),Edt=()=>"Detecting Claude Code, Codex, OpenCode, Cursor, Antigravity…",Ndt=()=>"正在检测 Claude Code、Codex、OpenCode、Cursor、Antigravity…",zdt=()=>"در حال شناسایی Claude Code، Codex، OpenCode و Cursor و Antigravity…",jdt=()=>"جارٍ اكتشاف Claude Code وCodex وOpenCode وCursor وAntigravity…",Adt=()=>"Detectando Claude Code, Codex, OpenCode, Cursor, Google Antigravity…",Tdt=()=>"Claude Code, Codex, OpenCode, Cursor, Google Antigravity पहचाने जा रहे हैं…",Rdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ndt():t==="fa"?zdt():t==="ar"?jdt():t==="es"?Adt():t==="hi"?Tdt():Edt()}),Mdt=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",Odt=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",Ddt=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",Ldt=()=>"مثال: أعمل على تعلّم معزّز عالي الكفاءة في العيّنات لِما بعد تدريب نماذج اللغة الكبيرة، مع التركيز على الطرق التي لا تعتمد على نماذج المكافأة.",Idt=()=>"p. ej., trabajo en RL eficiente en muestras para el post-entrenamiento de LLM, centrado en métodos sin modelo de recompensa.",$dt=()=>"जैसे: मैं LLM पोस्ट-ट्रेनिंग के लिए सैंपल-एफ़िशिएंट RL पर काम करता/करती हूँ, रिवॉर्ड-मॉडल-फ्री तरीकों पर ध्यान केंद्रित करते हुए।",Bdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Odt():t==="fa"?Ddt():t==="ar"?Ldt():t==="es"?Idt():t==="hi"?$dt():Mdt()}),Pdt=()=>"Error details",Fdt=()=>"错误详情",Hdt=()=>"جزئیات خطا",qdt=()=>"تفاصيل الخطأ",Udt=()=>"Detalles del error",Gdt=()=>"त्रुटि विवरण",Vdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fdt():t==="fa"?Hdt():t==="ar"?qdt():t==="es"?Udt():t==="hi"?Gdt():Pdt()}),Kdt=()=>"Everything stays local",Wdt=()=>"一切都保留在本地",Qdt=()=>"همه‌چیز محلی می‌ماند",Xdt=()=>"كل شيء يبقى محليًا",Ydt=()=>"Todo se queda en local",Zdt=()=>"सब कुछ लोकल ही रहता है",Jdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wdt():t==="fa"?Qdt():t==="ar"?Xdt():t==="es"?Ydt():t==="hi"?Zdt():Kdt()}),eht=()=>"Get started",tht=()=>"开始使用",nht=()=>"شروع",rht=()=>"ابدأ الآن",sht=()=>"Empezar",iht=()=>"शुरू करें",aht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tht():t==="fa"?nht():t==="ar"?rht():t==="es"?sht():t==="hi"?iht():eht()}),oht=()=>"Git is required for local experiments. Install Git, then re-check.",cht=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",lht=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",uht=()=>"‏Git مطلوب للتجارب المحلية. ثبّت Git ثم أعد الفحص.",_ht=()=>"Git es necesario para los experimentos locales. Instala Git y vuelve a comprobarlo.",fht=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। Git इंस्टॉल करें, फिर फिर से जाँचें।",Tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cht():t==="fa"?lht():t==="ar"?uht():t==="es"?_ht():t==="hi"?fht():oht()}),dht=()=>"Ground your agents",hht=()=>"为智能体提供可靠依据",pht=()=>"عامل‌هایتان را به منابع متصل کنید",mht=()=>"زوّد وكلاءك بأساس بحثي",ght=()=>"Dale contexto a tus agentes",vht=()=>"अपने एजेंटों को आधार दें",bht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hht():t==="fa"?pht():t==="ar"?mht():t==="es"?ght():t==="hi"?vht():dht()}),yht=()=>"Install broken",xht=()=>"安装损坏",wht=()=>"نصب خراب است",kht=()=>"التثبيت معطوب",Sht=()=>"Instalación dañada",Cht=()=>"इंस्टॉल खराब है",Eht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xht():t==="fa"?wht():t==="ar"?kht():t==="es"?Sht():t==="hi"?Cht():yht()}),Nht=()=>"Install Git to continue",zht=()=>"请安装 Git 后再继续",jht=()=>"برای ادامه Git را نصب کنید",Aht=()=>"ثبّت Git للمتابعة",Tht=()=>"Instala Git para continuar",Rht=()=>"जारी रखने के लिए Git इंस्टॉल करें",Mht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zht():t==="fa"?jht():t==="ar"?Aht():t==="es"?Tht():t==="hi"?Rht():Nht()}),Oht=()=>"Loading account details…",Dht=()=>"正在加载账户信息…",Lht=()=>"در حال بارگذاری اطلاعات حساب…",Iht=()=>"جارٍ تحميل تفاصيل الحساب…",$ht=()=>"Cargando los datos de la cuenta…",Bht=()=>"खाता विवरण लोड हो रहा है…",Pht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dht():t==="fa"?Lht():t==="ar"?Iht():t==="es"?$ht():t==="hi"?Bht():Oht()}),Fht=()=>"Local Git",Hht=()=>"本地 Git",qht=()=>"Git محلی",Uht=()=>"Git محلي",Ght=()=>"Git local",Vht=()=>"लोकल Git",Kht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hht():t==="fa"?qht():t==="ar"?Uht():t==="es"?Ght():t==="hi"?Vht():Fht()}),Wht=()=>"Install needed",Qht=()=>"需要安装",Xht=()=>"نیاز به نصب",Yht=()=>"التثبيت مطلوب",Zht=()=>"No detectado",Jht=()=>"इंस्टॉल ज़रूरी है",Rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qht():t==="fa"?Xht():t==="ar"?Yht():t==="es"?Zht():t==="hi"?Jht():Wht()}),ept=()=>"Not found",tpt=()=>"未找到",npt=()=>"پیدا نشد",rpt=()=>"غير موجود",spt=()=>"No encontrado",ipt=()=>"नहीं मिला",wL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tpt():t==="fa"?npt():t==="ar"?rpt():t==="es"?spt():t==="hi"?ipt():ept()}),apt=()=>"Signed out",opt=()=>"未登录",cpt=()=>"وارد نشده",lpt=()=>"غير مسجل الدخول",upt=()=>"Sin iniciar sesión",_pt=()=>"साइन आउट",kL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?opt():t==="fa"?cpt():t==="ar"?lpt():t==="es"?upt():t==="hi"?_pt():apt()}),fpt=()=>"OpenResearch uses a coding agent already installed on this machine.",dpt=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",hpt=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",ppt=()=>"يستخدم OpenResearch وكيل برمجة مثبّتًا مسبقًا على هذا الجهاز.",mpt=()=>"OpenResearch usa un agente de programación que ya esté instalado en este equipo.",gpt=()=>"OpenResearch इस मशीन पर पहले से इंस्टॉल किसी कोडिंग एजेंट का उपयोग करता है।",vpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dpt():t==="fa"?hpt():t==="ar"?ppt():t==="es"?mpt():t==="hi"?gpt():fpt()}),bpt=()=>"Couldn’t verify OpenCode is ready. Retry to check its installation and models.",ypt=()=>"无法确认 OpenCode 已就绪。请重试以检查安装和模型。",xpt=()=>"آماده بودن OpenCode تأیید نشد. برای بررسی نصب و مدل‌ها دوباره تلاش کنید.",wpt=()=>"تعذّر التحقق من جاهزية OpenCode. أعد المحاولة للتحقق من التثبيت والنماذج.",kpt=()=>"No se pudo verificar que OpenCode esté listo. Vuelve a intentarlo para comprobar su instalación y sus modelos.",Spt=()=>"यह सत्यापित नहीं हो सका कि OpenCode तैयार है। इसके इंस्टॉलेशन और मॉडल जाँचने के लिए फिर से कोशिश करें।",Cpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ypt():t==="fa"?xpt():t==="ar"?wpt():t==="es"?kpt():t==="hi"?Spt():bpt()}),Ept=()=>"Other research area",Npt=()=>"其他研究领域",zpt=()=>"حوزهٔ پژوهشی دیگر",jpt=()=>"مجال بحثي آخر",Apt=()=>"Otra área de investigación",Tpt=()=>"अन्य शोध क्षेत्र",Rpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Npt():t==="fa"?zpt():t==="ar"?jpt():t==="es"?Apt():t==="hi"?Tpt():Ept()}),Mpt=()=>"Re-check",Opt=()=>"重新检查",Dpt=()=>"بررسی دوباره",Lpt=()=>"إعادة الفحص",Ipt=()=>"Volver a comprobar",$pt=()=>"फिर से जाँचें",Lv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Opt():t==="fa"?Dpt():t==="ar"?Lpt():t==="es"?Ipt():t==="hi"?$pt():Mpt()}),Bpt=()=>"Ready",Ppt=()=>"已就绪",Fpt=()=>"آماده",Hpt=()=>"جاهز",qpt=()=>"Listo",Upt=()=>"तैयार",vS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ppt():t==="fa"?Fpt():t==="ar"?Hpt():t==="es"?qpt():t==="hi"?Upt():Bpt()}),Gpt=()=>"Re-check Git before continuing",Vpt=()=>"请重新检查 Git 后再继续",Kpt=()=>"پیش از ادامه Git را دوباره بررسی کنید",Wpt=()=>"أعد فحص Git قبل المتابعة",Qpt=()=>"Vuelve a comprobar Git antes de continuar",Xpt=()=>"जारी रखने से पहले Git फिर से जाँचें",Ypt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vpt():t==="fa"?Kpt():t==="ar"?Wpt():t==="es"?Qpt():t==="hi"?Xpt():Gpt()}),Zpt=()=>"Representative papers",Jpt=()=>"代表性论文",e0t=()=>"مقاله‌های شاخص",t0t=()=>"أوراق تمثّل اهتماماتك البحثية",n0t=()=>"Papers representativos",r0t=()=>"प्रतिनिधि पेपर",s0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jpt():t==="fa"?e0t():t==="ar"?t0t():t==="es"?n0t():t==="hi"?r0t():Zpt()}),i0t=()=>"Research background",a0t=()=>"研究背景",o0t=()=>"پیشینهٔ پژوهشی",c0t=()=>"الخلفية البحثية",l0t=()=>"Trayectoria de investigación",u0t=()=>"शोध पृष्ठभूमि",_0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a0t():t==="fa"?o0t():t==="ar"?c0t():t==="es"?l0t():t==="hi"?u0t():i0t()}),f0t=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",d0t=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",h0t=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",p0t=()=>"تعذّر الوصول إلى orx. تأكد من أنه لا يزال يعمل، ثم أعد الفحص.",m0t=()=>"No se pudo conectar con orx. Comprueba que sigue en ejecución y vuelve a comprobarlo.",g0t=()=>"orx तक नहीं पहुँच सके। जाँचें कि यह अभी भी चल रहा है, फिर फिर से जाँचें।",_w=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d0t():t==="fa"?h0t():t==="ar"?p0t():t==="es"?m0t():t==="hi"?g0t():f0t()}),v0t=()=>"Search alphaXiv by title to link a paper…",b0t=()=>"按标题搜索 alphaXiv 以关联论文…",y0t=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",x0t=()=>"ابحث في alphaXiv بالعنوان لربط ورقة…",w0t=()=>"Busca en alphaXiv por título para vincular un paper…",k0t=()=>"एक पेपर लिंक करने के लिए शीर्षक से alphaXiv खोजें…",S0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b0t():t==="fa"?y0t():t==="ar"?x0t():t==="es"?w0t():t==="hi"?k0t():v0t()}),C0t=()=>"Searching alphaXiv…",E0t=()=>"正在搜索 alphaXiv…",N0t=()=>"در حال جست‌وجوی alphaXiv…",z0t=()=>"جارٍ البحث في alphaXiv…",j0t=()=>"Buscando en alphaXiv…",A0t=()=>"alphaXiv खोजा जा रहा है…",T0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E0t():t==="fa"?N0t():t==="ar"?z0t():t==="es"?j0t():t==="hi"?A0t():C0t()}),R0t=()=>"Selected",M0t=()=>"已选择",O0t=()=>"انتخاب‌شده",D0t=()=>"محدد",L0t=()=>"Seleccionado",I0t=()=>"चयनित",$0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M0t():t==="fa"?O0t():t==="ar"?D0t():t==="es"?L0t():t==="hi"?I0t():R0t()}),B0t=()=>"Local model unavailable",P0t=()=>"本地模型不可用",F0t=()=>"مدل محلی در دسترس نیست",H0t=()=>"النموذج المحلي غير متاح",q0t=()=>"Modelo local no disponible",U0t=()=>"लोकल मॉडल उपलब्ध नहीं",SL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P0t():t==="fa"?F0t():t==="ar"?H0t():t==="es"?q0t():t==="hi"?U0t():B0t()}),G0t=()=>"Setting things up…",V0t=()=>"正在设置…",K0t=()=>"در حال راه‌اندازی…",W0t=()=>"جارٍ التهيئة…",Q0t=()=>"Preparando todo…",X0t=()=>"सेट अप किया जा रहा है…",Y0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V0t():t==="fa"?K0t():t==="ar"?W0t():t==="es"?Q0t():t==="hi"?X0t():G0t()}),Z0t=()=>"Connect a local model or sign in to a coding agent to continue",J0t=()=>"连接本地模型或登录编码智能体以继续",emt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل کدنویسی وارد شوید",tmt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل برمجة للمتابعة",nmt=()=>"Conecta un modelo local o inicia sesión en un agente de programación para continuar",rmt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी कोडिंग एजेंट में साइन इन करें",smt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J0t():t==="fa"?emt():t==="ar"?tmt():t==="es"?nmt():t==="hi"?rmt():Z0t()}),imt=()=>"Connect a local model or sign in to an agent to continue.",amt=()=>"连接本地模型或登录一个智能体以继续。",omt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل وارد شوید.",cmt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل للمتابعة.",lmt=()=>"Conecta un modelo local o inicia sesión en un agente para continuar.",umt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी एजेंट में साइन इन करें।",_mt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?amt():t==="fa"?omt():t==="ar"?cmt():t==="es"?lmt():t==="hi"?umt():imt()}),fmt=()=>"Signed in",dmt=()=>"已登录",hmt=()=>"وارد شده",pmt=()=>"تم تسجيل الدخول",mmt=()=>"Sesión iniciada",gmt=()=>"साइन इन",vmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dmt():t==="fa"?hmt():t==="ar"?pmt():t==="es"?mmt():t==="hi"?gmt():fmt()}),bmt=()=>"Connected to alphaXiv, bioRxiv, OpenAlex, and PubMed to ground your agents in the latest research.",ymt=()=>"已连接 alphaXiv、bioRxiv、OpenAlex 和 PubMed,让智能体以最新研究为依据。",xmt=()=>"به alphaXiv، bioRxiv، OpenAlex و PubMed متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",wmt=()=>"متصل بـ alphaXiv وbioRxiv وOpenAlex وPubMed ليستند وكلاؤك إلى أحدث الأبحاث.",kmt=()=>"Conectado a alphaXiv, bioRxiv, OpenAlex y PubMed para que tus agentes trabajen con la investigación más reciente.",Smt=()=>"आपके एजेंटों को नवीनतम शोध पर आधारित रखने के लिए alphaXiv, bioRxiv, OpenAlex और PubMed से कनेक्ट किया गया।",Cmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ymt():t==="fa"?xmt():t==="ar"?wmt():t==="es"?kmt():t==="hi"?Smt():bmt()}),Emt=()=>"· Step 1 of 2",Nmt=()=>"· 第 1 步,共 2 步",zmt=()=>"· مرحلهٔ ۱ از ۲",jmt=()=>"· الخطوة 1 من 2",Amt=()=>"· Paso 1 de 2",Tmt=()=>"· चरण 1 / 2",Rmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nmt():t==="fa"?zmt():t==="ar"?jmt():t==="es"?Amt():t==="hi"?Tmt():Emt()}),Mmt=()=>"· Step 2 of 2",Omt=()=>"· 第 2 步,共 2 步",Dmt=()=>"· مرحلهٔ ۲ از ۲",Lmt=()=>"· الخطوة 2 من 2",Imt=()=>"· Paso 2 de 2",$mt=()=>"· चरण 2 / 2",Bmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Omt():t==="fa"?Dmt():t==="ar"?Lmt():t==="es"?Imt():t==="hi"?$mt():Mmt()}),Pmt=()=>"Tell us about your research",Fmt=()=>"介绍一下你的研究",Hmt=()=>"از پژوهش خود بگویید",qmt=()=>"أخبرنا عن بحثك",Umt=()=>"Cuéntanos sobre tu investigación",Gmt=()=>"हमें अपने शोध के बारे में बताएं",Vmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fmt():t==="fa"?Hmt():t==="ar"?qmt():t==="es"?Umt():t==="hi"?Gmt():Pmt()}),Kmt=()=>"Tell us your other research area",Wmt=()=>"告诉我们你的其他研究领域",Qmt=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",Xmt=()=>"أخبرنا عن مجالك البحثي الآخر",Ymt=()=>"Cuéntanos cuál es tu otra área de investigación",Zmt=()=>"हमें अपना अन्य शोध क्षेत्र बताएं",Jmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wmt():t==="fa"?Qmt():t==="ar"?Xmt():t==="es"?Ymt():t==="hi"?Zmt():Kmt()}),egt=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",tgt=()=>"在一处跟踪实验、产物、算力、技能和代码。",ngt=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",rgt=()=>"تتبّع التجارب والمُخرَجات والحوسبة والمهارات والشيفرة في مكان واحد.",sgt=()=>"Gestiona experimentos, artefactos, cómputo, skills y código en un solo lugar.",igt=()=>"प्रयोग, आर्टिफ़ैक्ट, कंप्यूट, स्किल और कोड — सब एक ही जगह ट्रैक करें।",agt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tgt():t==="fa"?ngt():t==="ar"?rgt():t==="es"?sgt():t==="hi"?igt():egt()}),ogt=()=>"Unable to verify",cgt=()=>"无法验证",lgt=()=>"تأیید ممکن نیست",ugt=()=>"تعذّر التحقق",_gt=()=>"No se pudo verificar",fgt=()=>"सत्यापित नहीं हो सका",fw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cgt():t==="fa"?lgt():t==="ar"?ugt():t==="es"?_gt():t==="hi"?fgt():ogt()}),dgt=()=>"Update required",hgt=()=>"需要更新",pgt=()=>"نیازمند به‌روزرسانی",mgt=()=>"مطلوب تحديث",ggt=()=>"Actualización necesaria",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=()=>"Waiting for the Git check",xgt=()=>"正在等待 Git 检查",wgt=()=>"در انتظار بررسی Git",kgt=()=>"في انتظار فحص Git",Sgt=()=>"Esperando la comprobación de Git",Cgt=()=>"Git जाँच का इंतज़ार है",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=()=>"Waiting for the local tool checks",zgt=()=>"正在等待本地工具检查",jgt=()=>"در انتظار بررسی ابزارهای محلی",Agt=()=>"في انتظار فحوص الأدوات المحلية",Tgt=()=>"Esperando las comprobaciones de las herramientas locales",Rgt=()=>"लोकल टूल जाँच का इंतज़ार है",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=()=>"What areas are you interested in?",Dgt=()=>"你对哪些领域感兴趣?",Lgt=()=>"به چه حوزه‌هایی علاقه دارید؟",Igt=()=>"ما المجالات التي تهتم بها؟",$gt=()=>"¿Qué áreas te interesan?",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=()=>"Your code, data, and experiment history stay on your machine.",Hgt=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",qgt=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",Ugt=()=>"تبقى شيفرتك وبياناتك وسجل تجاربك على جهازك.",Ggt=()=>"Tu código, tus datos y tu historial de experimentos se quedan en tu equipo.",Vgt=()=>"आपका कोड, डेटा और प्रयोग इतिहास आपकी मशीन पर ही रहता है।",Kgt=((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()}),Wgt=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",Qgt=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",Xgt=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",Ygt=()=>"لم يعد الوكيل الذي اخترته جاهزًا. ارجع إلى الخطوة 1 واختر غيره.",Zgt=()=>"El agente que elegiste ya no está listo. Vuelve al paso 1 y elige otro.",Jgt=()=>"आपका चुना हुआ एजेंट अब तैयार नहीं है। चरण 1 पर वापस जाएं और दूसरा चुनें।",e1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qgt():t==="fa"?Xgt():t==="ar"?Ygt():t==="es"?Zgt():t==="hi"?Jgt():Wgt()}),t1t=()=>"Add cookie",n1t=()=>"添加 cookie",r1t=()=>"افزودن کوکی",s1t=()=>"إضافة ملف تعريف الارتباط",i1t=()=>"Añadir cookie",a1t=()=>"कुकी जोड़ें",o1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n1t():t==="fa"?r1t():t==="ar"?s1t():t==="es"?i1t():t==="hi"?a1t():t1t()}),c1t=()=>"Changed here and on Overleaf — choose which copy to keep",l1t=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",u1t=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",_1t=()=>"تغيّر هنا وعلى Overleaf — اختر أي نسخة تحتفظ بها",f1t=()=>"Cambió aquí y en Overleaf — elige qué copia conservar",d1t=()=>"यहाँ और Overleaf दोनों जगह बदला गया — चुनें कि कौन सी कॉपी रखनी है",h1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l1t():t==="fa"?u1t():t==="ar"?_1t():t==="es"?f1t():t==="hi"?d1t():c1t()}),p1t=()=>"Create a token ↗",m1t=()=>"创建令牌 ↗",g1t=()=>"ساخت توکن ↗",v1t=()=>"إنشاء رمز ↗",b1t=()=>"Crear un token ↗",y1t=()=>"एक टोकन बनाएं ↗",x1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m1t():t==="fa"?g1t():t==="ar"?v1t():t==="es"?b1t():t==="hi"?y1t():p1t()}),w1t=()=>"Overleaf Git token",k1t=()=>"Overleaf Git 令牌",S1t=()=>"توکن Git در Overleaf",C1t=()=>"رمز Git لـ Overleaf",E1t=()=>"Token de Git de Overleaf",N1t=()=>"Overleaf Git टोकन",Mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k1t():t==="fa"?S1t():t==="ar"?C1t():t==="es"?E1t():t==="hi"?N1t():w1t()}),z1t=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",j1t=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",A1t=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",T1t=()=>"تابِع Overleaf أثناء كتابة الآخرين بإضافة ملف تعريف ارتباط جلسة Overleaf.",R1t=()=>"Sigue los cambios de Overleaf mientras se escribe añadiendo tu cookie de sesión de Overleaf.",M1t=()=>"अपनी Overleaf सेशन कुकी जोड़कर लोगों के टाइप करते ही Overleaf को फ़ॉलो करें।",O1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j1t():t==="fa"?A1t():t==="ar"?T1t():t==="es"?R1t():t==="hi"?M1t():z1t()}),D1t=()=>"Import from browser",L1t=()=>"从浏览器导入",I1t=()=>"وارد کردن از مرورگر",$1t=()=>"الاستيراد من المتصفح",B1t=()=>"Importar desde el navegador",P1t=()=>"ब्राउज़र से इंपोर्ट करें",F1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L1t():t==="fa"?I1t():t==="ar"?$1t():t==="es"?B1t():t==="hi"?P1t():D1t()}),H1t=()=>"In step with Overleaf",q1t=()=>"已与 Overleaf 同步",U1t=()=>"با Overleaf همگام است",G1t=()=>"متزامن مع Overleaf",V1t=()=>"Sincronizado con Overleaf",K1t=()=>"Overleaf के साथ मेल में",CL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q1t():t==="fa"?U1t():t==="ar"?G1t():t==="es"?V1t():t==="hi"?K1t():H1t()}),W1t=()=>"The last sync did not finish.",Q1t=()=>"上次同步未完成。",X1t=()=>"آخرین همگام‌سازی کامل نشد.",Y1t=()=>"لم تكتمل آخر مزامنة.",Z1t=()=>"La última sincronización no terminó.",J1t=()=>"पिछला सिंक पूरा नहीं हुआ।",evt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q1t():t==="fa"?X1t():t==="ar"?Y1t():t==="es"?Z1t():t==="hi"?J1t():W1t()}),tvt=()=>"Link and sync",nvt=()=>"关联并同步",rvt=()=>"پیوند و همگام‌سازی",svt=()=>"الربط والمزامنة",ivt=()=>"Vincular y sincronizar",avt=()=>"लिंक करें और सिंक करें",ovt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nvt():t==="fa"?rvt():t==="ar"?svt():t==="es"?ivt():t==="hi"?avt():tvt()}),cvt=()=>"Connecting to Overleaf…",lvt=()=>"正在连接 Overleaf…",uvt=()=>"در حال اتصال به Overleaf…",_vt=()=>"جارٍ الاتصال بـ Overleaf…",fvt=()=>"Conectando con Overleaf…",dvt=()=>"Overleaf से कनेक्ट हो रहा है…",hvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lvt():t==="fa"?uvt():t==="ar"?_vt():t==="es"?fvt():t==="hi"?dvt():cvt()}),pvt=()=>"Edits are live on Overleaf",mvt=()=>"编辑已在 Overleaf 实时同步",gvt=()=>"ویرایش‌ها روی Overleaf زنده‌اند",vvt=()=>"تظهر التعديلات فورًا على Overleaf",bvt=()=>"Los cambios se sincronizan en directo con Overleaf",yvt=()=>"बदलाव Overleaf पर लाइव हैं",xvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mvt():t==="fa"?gvt():t==="ar"?vvt():t==="es"?bvt():t==="hi"?yvt():pvt()}),wvt=()=>"Retry",kvt=()=>"重试",Svt=()=>"تلاش دوباره",Cvt=()=>"إعادة المحاولة",Evt=()=>"Reintentar",Nvt=()=>"फिर से कोशिश करें",zvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kvt():t==="fa"?Svt():t==="ar"?Cvt():t==="es"?Evt():t==="hi"?Nvt():wvt()}),jvt=()=>"Live sync stopped.",Avt=()=>"实时同步已停止。",Tvt=()=>"همگام‌سازی زنده متوقف شد.",Rvt=()=>"توقفت المزامنة المباشرة.",Mvt=()=>"Sincronización en directo detenida.",Ovt=()=>"लाइव सिंक रुक गया।",Dvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Avt():t==="fa"?Tvt():t==="ar"?Rvt():t==="es"?Mvt():t==="hi"?Ovt():jvt()}),Lvt=()=>"Live sync starts once the paper is in step with Overleaf.",Ivt=()=>"论文与 Overleaf 同步后,实时同步即会开始。",$vt=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",Bvt=()=>"تبدأ المزامنة المباشرة بمجرد أن تتزامن الورقة مع Overleaf.",Pvt=()=>"La sincronización en directo empieza cuando el paper esté sincronizado con Overleaf.",Fvt=()=>"पेपर Overleaf के साथ मेल में आते ही लाइव सिंक शुरू होगा।",Hvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ivt():t==="fa"?$vt():t==="ar"?Bvt():t==="es"?Pvt():t==="hi"?Fvt():Lvt()}),qvt=()=>"My projects ↗",Uvt=()=>"我的项目 ↗",Gvt=()=>"پروژه‌های من ↗",Vvt=()=>"مشاريعي ↗",Kvt=()=>"Mis proyectos ↗",Wvt=()=>"मेरे प्रोजेक्ट ↗",Oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uvt():t==="fa"?Gvt():t==="ar"?Vvt():t==="es"?Kvt():t==="hi"?Wvt():qvt()}),Qvt=()=>"Nothing could be synced.",Xvt=()=>"没有内容可以同步。",Yvt=()=>"هیچ موردی قابل همگام‌سازی نبود.",Zvt=()=>"تعذّرت مزامنة أي شيء.",Jvt=()=>"No se pudo sincronizar nada.",ebt=()=>"कुछ भी सिंक नहीं हो सका।",tbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xvt():t==="fa"?Yvt():t==="ar"?Zvt():t==="es"?Jvt():t==="hi"?ebt():Qvt()}),nbt=()=>"Open Overleaf ↗",rbt=()=>"打开 Overleaf ↗",sbt=()=>"باز کردن Overleaf ↗",ibt=()=>"فتح Overleaf ↗",abt=()=>"Abrir Overleaf ↗",obt=()=>"Overleaf खोलें ↗",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=()=>"Cancel",ubt=()=>"取消",_bt=()=>"لغو",fbt=()=>"إلغاء",dbt=()=>"Cancelar",hbt=()=>"रद्द करें",EL=((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()}),pbt=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",mbt=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",gbt=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",vbt=()=>"تغيّر هنا وعلى Overleaf. كلا النسختين لم تُمسّا — اختر أيّهما تحتفظ به.",bbt=()=>"cambió aquí y en Overleaf. No se ha tocado ninguna de las dos copias — elige cuál conservar.",ybt=()=>"यहाँ और Overleaf दोनों जगह बदला गया। दोनों कॉपी सुरक्षित हैं — चुनें कि कौन सी रखनी है।",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=()=>"Keep this copy",kbt=()=>"保留此副本",Sbt=()=>"نگه داشتن این نسخه",Cbt=()=>"الاحتفاظ بهذه النسخة",Ebt=()=>"Conservar esta copia",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=()=>"Open in Overleaf",Abt=()=>"在 Overleaf 中打开",Tbt=()=>"باز کردن در Overleaf",Rbt=()=>"فتح في Overleaf",Mbt=()=>"Abrir en Overleaf",Obt=()=>"Overleaf में खोलें",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=()=>"Replace the Overleaf token",Ibt=()=>"替换 Overleaf 令牌",$bt=()=>"جایگزینی توکن Overleaf",Bbt=()=>"استبدال رمز Overleaf",Pbt=()=>"Reemplazar el token de Overleaf",Fbt=()=>"Overleaf टोकन बदलें",Dz=((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()}),Hbt=()=>"Sync files",qbt=()=>"同步文件",Ubt=()=>"همگام‌سازی فایل‌ها",Gbt=()=>"مزامنة الملفات",Vbt=()=>"Sincronizar archivos",Kbt=()=>"फ़ाइलें सिंक करें",Wbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qbt():t==="fa"?Ubt():t==="ar"?Gbt():t==="es"?Vbt():t==="hi"?Kbt():Hbt()}),Qbt=()=>"Unlink",Xbt=()=>"取消关联",Ybt=()=>"قطع پیوند",Zbt=()=>"إلغاء الربط",Jbt=()=>"Desvincular",eyt=()=>"लिंक हटाएं",tyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xbt():t==="fa"?Ybt():t==="ar"?Zbt():t==="es"?Jbt():t==="hi"?eyt():Qbt()}),nyt=()=>"Upload a copy as a new project ↗",ryt=()=>"上传副本作为新项目 ↗",syt=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",iyt=()=>"رفع نسخة كمشروع جديد ↗",ayt=()=>"Subir una copia como proyecto nuevo ↗",oyt=()=>"नए प्रोजेक्ट के रूप में एक कॉपी अपलोड करें ↗",NL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ryt():t==="fa"?syt():t==="ar"?iyt():t==="es"?ayt():t==="hi"?oyt():nyt()}),cyt=()=>"Use Overleaf's",lyt=()=>"使用 Overleaf 的副本",uyt=()=>"استفاده از نسخهٔ Overleaf",_yt=()=>"استخدام نسخة Overleaf",fyt=()=>"Usar la de Overleaf",dyt=()=>"Overleaf का इस्तेमाल करें",hyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lyt():t==="fa"?uyt():t==="ar"?_yt():t==="es"?fyt():t==="hi"?dyt():cyt()}),pyt=()=>"This paper stays in step with Overleaf.",myt=()=>"此论文将与 Overleaf 保持同步。",gyt=()=>"این مقاله با Overleaf همگام می‌ماند.",vyt=()=>"تبقى هذه الورقة متزامنة مع Overleaf.",byt=()=>"Este paper se mantiene sincronizado con Overleaf.",yyt=()=>"यह पेपर Overleaf के साथ मेल में रहता है।",xyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?myt():t==="fa"?gyt():t==="ar"?vyt():t==="es"?byt():t==="hi"?yyt():pyt()}),wyt=()=>"Paste it instead",kyt=()=>"改为粘贴",Syt=()=>"به‌جایش بچسبانید",Cyt=()=>"الصقه بدلًا من ذلك",Eyt=()=>"Pegarla manualmente",Nyt=()=>"इसके बजाय पेस्ट करें",zyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kyt():t==="fa"?Syt():t==="ar"?Cyt():t==="es"?Eyt():t==="hi"?Nyt():wyt()}),jyt=e=>`Pulled ${e==null?void 0:e.paths}.`,Ayt=e=>`已拉取 ${e==null?void 0:e.paths}。`,Tyt=e=>`${e==null?void 0:e.paths} دریافت شد.`,Ryt=e=>`سُحب ${e==null?void 0:e.paths}.`,Myt=e=>`Descargado: ${e==null?void 0:e.paths}.`,Oyt=e=>`${e==null?void 0:e.paths} पुल किया।`,Dyt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ayt(e):t==="fa"?Tyt(e):t==="ar"?Ryt(e):t==="es"?Myt(e):t==="hi"?Oyt(e):jyt(e)}),Lyt=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,Iyt=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${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=>`Descargado: ${e==null?void 0:e.pulled}; subido: ${e==null?void 0:e.pushed}.`,Fyt=e=>`${e==null?void 0:e.pulled} पुल किया; ${e==null?void 0:e.pushed} पुश किया।`,Hyt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Iyt(e):t==="fa"?$yt(e):t==="ar"?Byt(e):t==="es"?Pyt(e):t==="hi"?Fyt(e):Lyt(e)}),qyt=e=>`Pushed ${e==null?void 0:e.paths}.`,Uyt=e=>`已推送 ${e==null?void 0:e.paths}。`,Gyt=e=>`${e==null?void 0:e.paths} ارسال شد.`,Vyt=e=>`رُفع ${e==null?void 0:e.paths}.`,Kyt=e=>`Subido: ${e==null?void 0:e.paths}.`,Wyt=e=>`${e==null?void 0:e.paths} पुश किया।`,Qyt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Uyt(e):t==="fa"?Gyt(e):t==="ar"?Vyt(e):t==="es"?Kyt(e):t==="hi"?Wyt(e):qyt(e)}),Xyt=()=>"Add a fresh Overleaf session cookie to start following again.",Yyt=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",Zyt=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",Jyt=()=>"أضِف ملف تعريف ارتباط جلسة Overleaf جديدًا لبدء المتابعة مجددًا.",ext=()=>"Añade una nueva cookie de sesión de Overleaf para volver a seguir los cambios.",txt=()=>"फिर से फ़ॉलो करना शुरू करने के लिए एक नई Overleaf सेशन कुकी जोड़ें।",nxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yyt():t==="fa"?Zyt():t==="ar"?Jyt():t==="es"?ext():t==="hi"?txt():Xyt()}),rxt=()=>"Save the file first",sxt=()=>"请先保存文件",ixt=()=>"ابتدا فایل را ذخیره کنید",axt=()=>"احفظ الملف أولًا",oxt=()=>"Guarda el archivo primero",cxt=()=>"पहले फ़ाइल सेव करें",lxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sxt():t==="fa"?ixt():t==="ar"?axt():t==="es"?oxt():t==="hi"?cxt():rxt()}),uxt=()=>"Save this file to sync it with Overleaf",_xt=()=>"保存此文件以与 Overleaf 同步",fxt=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",dxt=()=>"احفظ هذا الملف لمزامنته مع Overleaf",hxt=()=>"Guarda este archivo para sincronizarlo con Overleaf",pxt=()=>"Overleaf के साथ सिंक करने के लिए इस फ़ाइल को सेव करें",zL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_xt():t==="fa"?fxt():t==="ar"?dxt():t==="es"?hxt():t==="hi"?pxt():uxt()}),mxt=()=>"Save token",gxt=()=>"保存令牌",vxt=()=>"ذخیرهٔ توکن",bxt=()=>"حفظ الرمز",yxt=()=>"Guardar token",xxt=()=>"टोकन सेव करें",wxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gxt():t==="fa"?vxt():t==="ar"?bxt():t==="es"?yxt():t==="hi"?xxt():mxt()}),kxt=()=>"Send this paper to Overleaf",Sxt=()=>"将此论文发送到 Overleaf",Cxt=()=>"ارسال مقاله به Overleaf",Ext=()=>"أرسل هذه الورقة إلى Overleaf",Nxt=()=>"Enviar este paper a Overleaf",zxt=()=>"यह पेपर Overleaf को भेजें",jxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sxt():t==="fa"?Cxt():t==="ar"?Ext():t==="es"?Nxt():t==="hi"?zxt():kxt()}),Axt=()=>"Overleaf session cookie",Txt=()=>"Overleaf 会话 cookie",Rxt=()=>"کوکی نشست Overleaf",Mxt=()=>"ملف تعريف ارتباط جلسة Overleaf",Oxt=()=>"Cookie de sesión de Overleaf",Dxt=()=>"Overleaf सेशन कुकी",j3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Txt():t==="fa"?Rxt():t==="ar"?Mxt():t==="es"?Oxt():t==="hi"?Dxt():Axt()}),Lxt=()=>"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.",Ixt=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",$xt=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",Bxt=()=>"لمتابعة Overleaf أثناء كتابة الآخرين، الصق ملف تعريف ارتباط جلسة Overleaf: في متصفح مسجّل الدخول إلى Overleaf، افتح أدوات المطوّر، وابحث عن ملف تعريف الارتباط overleaf_session2، وانسخ قيمته. يبقى على هذا الجهاز.",Pxt=()=>"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.",Fxt=()=>"लोगों के टाइप करते ही Overleaf को फ़ॉलो करने के लिए, अपनी Overleaf सेशन कुकी पेस्ट करें: Overleaf में साइन इन ब्राउज़र में, डेवलपर टूल खोलें, overleaf_session2 कुकी खोजें, और उसकी वैल्यू कॉपी करें। यह इसी मशीन पर रहती है।",Hxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ixt():t==="fa"?$xt():t==="ar"?Bxt():t==="es"?Pxt():t==="hi"?Fxt():Lxt()}),qxt=()=>"Overleaf sync failed",Uxt=()=>"Overleaf 同步失败",Gxt=()=>"همگام‌سازی با Overleaf ناموفق بود",Vxt=()=>"فشلت مزامنة Overleaf",Kxt=()=>"Error al sincronizar con Overleaf",Wxt=()=>"Overleaf सिंक विफल",A3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uxt():t==="fa"?Gxt():t==="ar"?Vxt():t==="es"?Kxt():t==="hi"?Wxt():qxt()}),Qxt=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",Xxt=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",Yxt=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",Zxt=()=>"يتزامن النص مباشرةً. ينقل هذا الأشكال والملفات الأخرى، ويحسم التعارضات.",Jxt=()=>"El texto se sincroniza en directo. Esto mueve las figuras y otros archivos, y resuelve conflictos.",e2t=()=>"टेक्स्ट लाइव सिंक होता है। यह फ़िगर और अन्य फ़ाइलें ले जाता है, और टकराव सुलझाता है।",t2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xxt():t==="fa"?Yxt():t==="ar"?Zxt():t==="es"?Jxt():t==="hi"?e2t():Qxt()}),n2t=()=>"Syncing with Overleaf…",r2t=()=>"正在与 Overleaf 同步…",s2t=()=>"در حال همگام‌سازی با Overleaf…",i2t=()=>"جارٍ المزامنة مع Overleaf…",a2t=()=>"Sincronizando con Overleaf…",o2t=()=>"Overleaf के साथ सिंक हो रहा है…",jL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r2t():t==="fa"?s2t():t==="ar"?i2t():t==="es"?a2t():t==="hi"?o2t():n2t()}),c2t=()=>"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.",l2t=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",u2t=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",_2t=()=>"الصق رمز مصادقة Git لـ Overleaf لإبقاء هذه الورقة متزامنة مع مشروع Overleaf. أنشئ واحدًا في Overleaf ضمن إعدادات الحساب — يأتي تكامل Git مع خطة Overleaf مدفوعة.",f2t=()=>"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 प्लान के साथ आता है।",h2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l2t():t==="fa"?u2t():t==="ar"?_2t():t==="es"?f2t():t==="hi"?d2t():c2t()}),p2t=()=>"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.",m2t=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",g2t=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",v2t=()=>"الصق رابط مشروع Overleaf الذي تنتمي إليه هذه الورقة. لا يستطيع Overleaf إنشاء مشروع عبر Git، لذا افتح المشروع أو أنشئه هناك أولًا.",b2t=()=>"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.",y2t=()=>"उस Overleaf प्रोजेक्ट का URL पेस्ट करें जिससे यह पेपर संबंधित है। Overleaf Git के ज़रिए एक नहीं बना सकता, इसलिए पहले वहाँ प्रोजेक्ट खोलें या बनाएं।",x2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m2t():t==="fa"?g2t():t==="ar"?v2t():t==="es"?b2t():t==="hi"?y2t():p2t()}),w2t=()=>"Toggle Plan mode for this chat",k2t=()=>"切换此聊天的计划模式",S2t=()=>"تغییر حالت طرح این گفت‌وگو",C2t=()=>"تبديل وضع التخطيط لهذه المحادثة",E2t=()=>"Activa o desactiva el modo Plan en este chat",N2t=()=>"इस चैट के लिए प्लान मोड टॉगल करें",z2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k2t():t==="fa"?S2t():t==="ar"?C2t():t==="es"?E2t():t==="hi"?N2t():w2t()}),j2t=()=>"Accept and auto mode",A2t=()=>"接受并使用自动模式",T2t=()=>"پذیرش و حالت خودکار",R2t=()=>"قبول وتفعيل الوضع التلقائي",M2t=()=>"Aceptar en modo automático",O2t=()=>"स्वीकार करें और ऑटो मोड",D2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A2t():t==="fa"?T2t():t==="ar"?R2t():t==="es"?M2t():t==="hi"?O2t():j2t()}),L2t=()=>"Accept and bypass all",I2t=()=>"接受并跳过所有审批",$2t=()=>"پذیرش و عبور از همهٔ تأییدها",B2t=()=>"القبول وتجاوز الكل",P2t=()=>"Aceptar y omitir permisos",F2t=()=>"स्वीकार करें और सब बायपास करें",H2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I2t():t==="fa"?$2t():t==="ar"?B2t():t==="es"?P2t():t==="hi"?F2t():L2t()}),q2t=()=>"Accept plan",U2t=()=>"接受计划",G2t=()=>"پذیرش طرح",V2t=()=>"قبول الخطة",K2t=()=>"Aceptar plan",W2t=()=>"प्लान स्वीकार करें",Q2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U2t():t==="fa"?G2t():t==="ar"?V2t():t==="es"?K2t():t==="hi"?W2t():q2t()}),X2t=e=>`${e==null?void 0:e.agent} proposed a plan`,Y2t=e=>`${e==null?void 0:e.agent} 提出了一个计划`,Z2t=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,J2t=e=>`${e==null?void 0:e.agent} اقترح خطة`,ewt=e=>`${e==null?void 0:e.agent} propuso un plan`,twt=e=>`${e==null?void 0:e.agent} ने एक प्लान प्रस्तावित किया`,nwt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Y2t(e):t==="fa"?Z2t(e):t==="ar"?J2t(e):t==="es"?ewt(e):t==="hi"?twt(e):X2t(e)}),rwt=e=>`${e==null?void 0:e.agent} is ready to proceed`,swt=e=>`${e==null?void 0:e.agent} 已准备好继续`,iwt=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,awt=e=>`${e==null?void 0:e.agent} جاهز للمتابعة`,owt=e=>`${e==null?void 0:e.agent} está listo para continuar`,cwt=e=>`${e==null?void 0:e.agent} आगे बढ़ने के लिए तैयार है`,lwt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?swt(e):t==="fa"?iwt(e):t==="ar"?awt(e):t==="es"?owt(e):t==="hi"?cwt(e):rwt(e)}),uwt=()=>"Back",_wt=()=>"返回",fwt=()=>"بازگشت",dwt=()=>"رجوع",hwt=()=>"Atrás",pwt=()=>"वापस",AL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_wt():t==="fa"?fwt():t==="ar"?dwt():t==="es"?hwt():t==="hi"?pwt():uwt()}),mwt=()=>"More approval options",gwt=()=>"更多批准选项",vwt=()=>"گزینه‌های تأیید بیشتر",bwt=()=>"خيارات موافقة إضافية",ywt=()=>"Más opciones de aprobación",xwt=()=>"और स्वीकृति विकल्प",wwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gwt():t==="fa"?vwt():t==="ar"?bwt():t==="es"?ywt():t==="hi"?xwt():mwt()}),kwt=()=>"Open plan",Swt=()=>"打开计划",Cwt=()=>"باز کردن طرح",Ewt=()=>"فتح الخطة",Nwt=()=>"Abrir plan",zwt=()=>"प्लान खोलें",jwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Swt():t==="fa"?Cwt():t==="ar"?Ewt():t==="es"?Nwt():t==="hi"?zwt():kwt()}),Awt=()=>"Reject",Twt=()=>"拒绝",Rwt=()=>"رد کردن",Mwt=()=>"رفض",Owt=()=>"Rechazar",Dwt=()=>"अस्वीकार करें",Lwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Twt():t==="fa"?Rwt():t==="ar"?Mwt():t==="es"?Owt():t==="hi"?Dwt():Awt()}),Iwt=()=>"Revise",$wt=()=>"修改",Bwt=()=>"بازنگری",Pwt=()=>"طلب تعديل",Fwt=()=>"Pedir cambios",Hwt=()=>"संशोधित करें",qwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$wt():t==="fa"?Bwt():t==="ar"?Pwt():t==="es"?Fwt():t==="hi"?Hwt():Iwt()}),Uwt=()=>"Revise…",Gwt=()=>"修改…",Vwt=()=>"بازنگری…",Kwt=()=>"طلب تعديل…",Wwt=()=>"Pedir cambios…",Qwt=()=>"संशोधित करें…",Xwt=((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()}),Ywt=()=>"What should change? (optional)",Zwt=()=>"需要更改什么?(可选)",Jwt=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",e4t=()=>"ما الذي ينبغي تغييره؟ (اختياري)",t4t=()=>"¿Qué debería cambiar? (opcional)",n4t=()=>"क्या बदलना चाहिए? (वैकल्पिक)",r4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zwt():t==="fa"?Jwt():t==="ar"?e4t():t==="es"?t4t():t==="hi"?n4t():Ywt()}),s4t=e=>`${e==null?void 0:e.count} active`,i4t=e=>`${e==null?void 0:e.count} 个活跃`,a4t=e=>`${e==null?void 0:e.count} فعال`,o4t=e=>`الوكلاء النشطون: ${e==null?void 0:e.count}`,c4t=e=>`${e==null?void 0:e.count} activos`,l4t=e=>`${e==null?void 0:e.count} सक्रिय`,u4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?i4t(e):t==="fa"?a4t(e):t==="ar"?o4t(e):t==="es"?c4t(e):t==="hi"?l4t(e):s4t(e)}),_4t=e=>`${e==null?void 0:e.count} total agents`,f4t=e=>`共 ${e==null?void 0:e.count} 个智能体`,d4t=e=>`در مجموع ${e==null?void 0:e.count} عامل`,h4t=e=>`إجمالي الوكلاء: ${e==null?void 0:e.count}`,p4t=e=>`${e==null?void 0:e.count} agentes en total`,m4t=e=>`${e==null?void 0:e.count} कुल एजेंट`,g4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f4t(e):t==="fa"?d4t(e):t==="ar"?h4t(e):t==="es"?p4t(e):t==="hi"?m4t(e):_4t(e)}),v4t=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,b4t=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,y4t=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,x4t=e=>`حذف ${e==null?void 0:e.name} من OpenResearch؟ ستُزال تجاربه وعمليات تشغيله ومحادثاته نهائيًا.`,w4t=e=>`¿Eliminar ${e==null?void 0:e.name} de OpenResearch? Sus experimentos, ejecuciones y chats se eliminarán de forma permanente.`,k4t=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं? इसके प्रयोग, रन और चैट स्थायी रूप से हट जाएंगे।`,S4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b4t(e):t==="fa"?y4t(e):t==="ar"?x4t(e):t==="es"?w4t(e):t==="hi"?k4t(e):v4t(e)}),C4t=()=>"Agents",E4t=()=>"智能体",N4t=()=>"عامل‌ها",z4t=()=>"الوكلاء",j4t=()=>"Agentes",A4t=()=>"एजेंट",Lz=((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()}),T4t=()=>"arXiv paper ID:",R4t=()=>"arXiv 论文 ID:",M4t=()=>"شناسهٔ مقالهٔ arXiv:",O4t=()=>"معرّف ورقة arXiv:",D4t=()=>"ID del paper en arXiv:",L4t=()=>"arXiv पेपर ID:",I4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R4t():t==="fa"?M4t():t==="ar"?O4t():t==="es"?D4t():t==="hi"?L4t():T4t()}),$4t=()=>"Cancel",B4t=()=>"取消",P4t=()=>"لغو",F4t=()=>"إلغاء",H4t=()=>"Cancelar",q4t=()=>"रद्द करें",U4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B4t():t==="fa"?P4t():t==="ar"?F4t():t==="es"?H4t():t==="hi"?q4t():$4t()}),G4t=()=>"Created",V4t=()=>"创建时间",K4t=()=>"ایجادشده",W4t=()=>"أُنشئ",Q4t=()=>"Creado",X4t=()=>"बनाया गया",Y4t=((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()}),Z4t=()=>"Delete project?",J4t=()=>"删除项目?",e3t=()=>"پروژه حذف شود؟",t3t=()=>"حذف المشروع؟",n3t=()=>"¿Eliminar el proyecto?",r3t=()=>"प्रोजेक्ट हटाएं?",s3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J4t():t==="fa"?e3t():t==="ar"?t3t():t==="es"?n3t():t==="hi"?r3t():Z4t()}),i3t=()=>"Delete project",a3t=()=>"删除项目",o3t=()=>"حذف پروژه",c3t=()=>"حذف المشروع",l3t=()=>"Eliminar proyecto",u3t=()=>"प्रोजेक्ट हटाएं",_3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a3t():t==="fa"?o3t():t==="ar"?c3t():t==="es"?l3t():t==="hi"?u3t():i3t()}),f3t=()=>"Deleting…",d3t=()=>"正在删除…",h3t=()=>"در حال حذف…",p3t=()=>"جارٍ الحذف…",m3t=()=>"Eliminando…",g3t=()=>"हटाया जा रहा है…",v3t=((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()}),b3t=()=>"Experiments",y3t=()=>"实验",x3t=()=>"آزمایش‌ها",w3t=()=>"التجارب",k3t=()=>"Experimentos",S3t=()=>"प्रयोग",Iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y3t():t==="fa"?x3t():t==="ar"?w3t():t==="es"?k3t():t==="hi"?S3t():b3t()}),C3t=()=>"The local folder and linked GitHub repository are kept.",E3t=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",N3t=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",z3t=()=>"يُحتفظ بالمجلد المحلي ومستودع GitHub المرتبط.",j3t=()=>"Se conservan la carpeta local y el repositorio de GitHub vinculado.",A3t=()=>"लोकल फ़ोल्डर और लिंक की गई GitHub रिपॉज़िटरी दोनों सुरक्षित रहती हैं।",T3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E3t():t==="fa"?N3t():t==="ar"?z3t():t==="es"?j3t():t==="hi"?A3t():C3t()}),R3t=()=>"The local folder is kept.",M3t=()=>"本地文件夹会保留。",O3t=()=>"پوشهٔ محلی نگه داشته می‌شود.",D3t=()=>"يُحتفظ بالمجلد المحلي.",L3t=()=>"La carpeta local se conserva.",I3t=()=>"लोकल फ़ोल्डर सुरक्षित रहता है।",$3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M3t():t==="fa"?O3t():t==="ar"?D3t():t==="es"?L3t():t==="hi"?I3t():R3t()}),B3t=()=>"New project",P3t=()=>"新建项目",F3t=()=>"پروژهٔ جدید",H3t=()=>"مشروع جديد",q3t=()=>"Nuevo proyecto",U3t=()=>"नया प्रोजेक्ट",TL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P3t():t==="fa"?F3t():t==="ar"?H3t():t==="es"?q3t():t==="hi"?U3t():B3t()}),G3t=()=>"No projects yet — create one to get started.",V3t=()=>"尚无项目——新建一个即可开始。",K3t=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",W3t=()=>"لا توجد مشاريع بعد — أنشئ واحدًا للبدء.",Q3t=()=>"Aún no hay proyectos — crea uno para empezar.",X3t=()=>"अभी तक कोई प्रोजेक्ट नहीं — शुरू करने के लिए एक बनाएं।",Y3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V3t():t==="fa"?K3t():t==="ar"?W3t():t==="es"?Q3t():t==="hi"?X3t():G3t()}),Z3t=()=>"Project",J3t=()=>"项目",e5t=()=>"پروژه",t5t=()=>"المشروع",n5t=()=>"Proyecto",r5t=()=>"प्रोजेक्ट",s5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J3t():t==="fa"?e5t():t==="ar"?t5t():t==="es"?n5t():t==="hi"?r5t():Z3t()}),i5t=()=>"Projects",a5t=()=>"项目",o5t=()=>"پروژه‌ها",c5t=()=>"المشاريع",l5t=()=>"Proyectos",u5t=()=>"प्रोजेक्ट",_5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a5t():t==="fa"?o5t():t==="ar"?c5t():t==="es"?l5t():t==="hi"?u5t():i5t()}),f5t=()=>"Repository",d5t=()=>"仓库",h5t=()=>"مخزن",p5t=()=>"المستودع",m5t=()=>"Repositorio",g5t=()=>"रिपॉज़िटरी",$z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d5t():t==="fa"?h5t():t==="ar"?p5t():t==="es"?m5t():t==="hi"?g5t():f5t()}),v5t=()=>"Idle",b5t=()=>"空闲",y5t=()=>"بیکار",x5t=()=>"خامل",w5t=()=>"Inactivo",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=()=>"Local",E5t=()=>"本地",N5t=()=>"محلی",z5t=()=>"محلي",j5t=()=>"Local",A5t=()=>"लोकल",Iv=((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()}),T5t=()=>"1 total agent",R5t=()=>"共 1 个智能体",M5t=()=>"در مجموع ۱ عامل",O5t=()=>"وكيل واحد إجمالًا",D5t=()=>"1 agente en total",L5t=()=>"1 कुल एजेंट",I5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R5t():t==="fa"?M5t():t==="ar"?O5t():t==="es"?D5t():t==="hi"?L5t():T5t()}),$5t=e=>`${e==null?void 0:e.count} running`,B5t=e=>`${e==null?void 0:e.count} 个运行中`,P5t=e=>`${e==null?void 0:e.count} در حال اجرا`,F5t=e=>`${e==null?void 0:e.count} قيد التشغيل`,H5t=e=>`${e==null?void 0:e.count} en ejecución`,q5t=e=>`${e==null?void 0:e.count} चल रहे`,U5t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?B5t(e):t==="fa"?P5t(e):t==="ar"?F5t(e):t==="es"?H5t(e):t==="hi"?q5t(e):$5t(e)}),G5t=e=>`${e==null?void 0:e.count} total`,V5t=e=>`共 ${e==null?void 0:e.count} 个`,K5t=e=>`در مجموع ${e==null?void 0:e.count}`,W5t=e=>`${e==null?void 0:e.count} إجمالًا`,Q5t=e=>`${e==null?void 0:e.count} en total`,X5t=e=>`${e==null?void 0:e.count} कुल`,Bz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?V5t(e):t==="fa"?K5t(e):t==="ar"?W5t(e):t==="es"?Q5t(e):t==="hi"?X5t(e):G5t(e)}),Y5t=()=>"Installing the compatible binary. This may take a few minutes.",Z5t=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",J5t=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",ekt=()=>"جارٍ تثبيت الملف التنفيذي المتوافق. قد يستغرق هذا بضع دقائق.",tkt=()=>"Instalando el binario compatible. Puede tardar unos minutos.",nkt=()=>"संगत बाइनरी इंस्टॉल हो रही है। इसमें कुछ मिनट लग सकते हैं।",rkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z5t():t==="fa"?J5t():t==="ar"?ekt():t==="es"?tkt():t==="hi"?nkt():Y5t()}),skt=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,ikt=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,akt=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,okt=e=>`جارٍ إعداد OpenResearch على ${e==null?void 0:e.host}`,ckt=e=>`Configurando OpenResearch en ${e==null?void 0:e.host}`,lkt=e=>`${e==null?void 0:e.host} पर OpenResearch सेट अप हो रहा है`,ukt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ikt(e):t==="fa"?akt(e):t==="ar"?okt(e):t==="es"?ckt(e):t==="hi"?lkt(e):skt(e)}),_kt=()=>"Check again",fkt=()=>"再次检查",dkt=()=>"بررسی دوباره",hkt=()=>"تحقق مجددًا",pkt=()=>"Volver a comprobar",mkt=()=>"फिर से जाँचें",Pz=((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=()=>"Closing…",vkt=()=>"正在关闭…",bkt=()=>"در حال بستن…",ykt=()=>"جارٍ الإغلاق…",xkt=()=>"Cerrando…",wkt=()=>"बंद हो रहा है…",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=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,Ckt=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,Ekt=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,Nkt=e=>`متصل بـ ${e==null?void 0:e.host} باسم ${e==null?void 0:e.user}`,zkt=e=>`Conectado a ${e==null?void 0:e.host} como ${e==null?void 0:e.user}`,jkt=e=>`${e==null?void 0:e.host} से ${e==null?void 0:e.user} के रूप में कनेक्टेड`,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=()=>"Preparing your remote workspace…",Rkt=()=>"正在准备远程工作区…",Mkt=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",Okt=()=>"جارٍ تحضير مساحة عملك البعيدة…",Dkt=()=>"Preparando tu espacio de trabajo remoto…",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=e=>`Connecting to ${e==null?void 0:e.host}`,Bkt=e=>`正在连接到 ${e==null?void 0:e.host}`,Pkt=e=>`در حال اتصال به ${e==null?void 0:e.host}`,Fkt=e=>`جارٍ الاتصال بـ ${e==null?void 0:e.host}`,Hkt=e=>`Conectando a ${e==null?void 0:e.host}`,qkt=e=>`${e==null?void 0:e.host} से कनेक्ट हो रहा है`,Ukt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bkt(e):t==="fa"?Pkt(e):t==="ar"?Fkt(e):t==="es"?Hkt(e):t==="hi"?qkt(e):$kt(e)}),Gkt=()=>"Close remote host picker",Vkt=()=>"关闭远程主机选择器",Kkt=()=>"بستن انتخاب‌گر میزبان راه‌دور",Wkt=()=>"إغلاق مُنتقي المضيف البعيد",Qkt=()=>"Cerrar el selector de hosts remotos",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=()=>"Choose a configured SSH host.",Jkt=()=>"选择已配置的 SSH 主机。",eSt=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",tSt=()=>"اختر مضيف SSH مُعدًّا.",nSt=()=>"Elige un host SSH configurado.",rSt=()=>"एक कॉन्फ़िगर किया गया SSH होस्ट चुनें।",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=()=>"Connect to remote",aSt=()=>"连接到远程主机",oSt=()=>"اتصال به میزبان راه‌دور",cSt=()=>"الاتصال بجهاز بعيد",lSt=()=>"Conectar a un host remoto",uSt=()=>"रिमोट से कनेक्ट करें",T3=((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()}),_St=()=>"Disconnect",fSt=()=>"断开连接",dSt=()=>"قطع اتصال",hSt=()=>"قطع الاتصال",pSt=()=>"Desconectar",mSt=()=>"डिस्कनेक्ट करें",R3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fSt():t==="fa"?dSt():t==="ar"?hSt():t==="es"?pSt():t==="hi"?mSt():_St()}),gSt=()=>"Your remote work is still running. Reconnect when you’re ready.",vSt=()=>"你的远程工作仍在运行。准备好后可以重新连接。",bSt=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",ySt=()=>"لا يزال عملك البعيد قيد التشغيل. أعد الاتصال عندما تكون جاهزًا.",xSt=()=>"Tu trabajo remoto sigue en ejecución. Vuelve a conectarte cuando quieras.",wSt=()=>"आपका रिमोट काम अभी भी चल रहा है। तैयार होने पर फिर से कनेक्ट करें।",kSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vSt():t==="fa"?bSt():t==="ar"?ySt():t==="es"?xSt():t==="hi"?wSt():gSt()}),SSt=e=>`Disconnected from ${e==null?void 0:e.host}`,CSt=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,ESt=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,NSt=e=>`انقطع الاتصال بـ ${e==null?void 0:e.host}`,zSt=e=>`Desconectado de ${e==null?void 0:e.host}`,jSt=e=>`${e==null?void 0:e.host} से डिस्कनेक्ट हो गया`,RL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CSt(e):t==="fa"?ESt(e):t==="ar"?NSt(e):t==="es"?zSt(e):t==="hi"?jSt(e):SSt(e)}),ASt=e=>`Could not connect to ${e==null?void 0:e.host}`,TSt=e=>`无法连接到 ${e==null?void 0:e.host}`,RSt=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,MSt=e=>`تعذّر الاتصال بـ ${e==null?void 0:e.host}`,OSt=e=>`No se pudo conectar a ${e==null?void 0:e.host}`,DSt=e=>`${e==null?void 0:e.host} से कनेक्ट नहीं हो सका`,LSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TSt(e):t==="fa"?RSt(e):t==="ar"?MSt(e):t==="es"?OSt(e):t==="hi"?DSt(e):ASt(e)}),ISt=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",$St=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",BSt=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",PSt=()=>"أعد تشغيل OpenResearch المحلي واختر مضيف SSH هذا مجددًا. يستمر العمل على المضيف البعيد.",FSt=()=>"Reinicia OpenResearch en local y vuelve a seleccionar este host SSH. El trabajo en el host remoto continúa.",HSt=()=>"लोकल OpenResearch फिर से शुरू करें और इस SSH होस्ट को फिर से चुनें। रिमोट होस्ट पर काम जारी रहता है।",qSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$St():t==="fa"?BSt():t==="ar"?PSt():t==="es"?FSt():t==="hi"?HSt():ISt()}),USt=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",GSt=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",VSt=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",KSt=()=>"توقّف وكلاء OpenResearch. قد تظل التجارب المُرسَلة قيد التشغيل.",WSt=()=>"Los agentes de OpenResearch se han detenido. Puede que los experimentos enviados sigan en ejecución.",QSt=()=>"OpenResearch एजेंट रुक गए हैं। सबमिट किए गए प्रयोग अभी भी चल सकते हैं।",XSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GSt():t==="fa"?VSt():t==="ar"?KSt():t==="es"?WSt():t==="hi"?QSt():USt()}),YSt=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,ZSt=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,JSt=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,e6t=e=>`‏OpenResearch لا يعمل على ${e==null?void 0:e.host}`,t6t=e=>`OpenResearch no se está ejecutando en ${e==null?void 0:e.host}`,n6t=e=>`${e==null?void 0:e.host} पर OpenResearch नहीं चल रहा`,r6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZSt(e):t==="fa"?JSt(e):t==="ar"?e6t(e):t==="es"?t6t(e):t==="hi"?n6t(e):YSt(e)}),s6t=()=>"OpenResearch binary",i6t=()=>"OpenResearch 二进制文件",a6t=()=>"فایل اجرایی OpenResearch",o6t=()=>"الملف التنفيذي لـ OpenResearch",c6t=()=>"Binario de OpenResearch",l6t=()=>"OpenResearch बाइनरी",u6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i6t():t==="fa"?a6t():t==="ar"?o6t():t==="es"?c6t():t==="hi"?l6t():s6t()}),_6t=()=>"OpenResearch Database",f6t=()=>"OpenResearch 数据库",d6t=()=>"پایگاه دادهٔ OpenResearch",h6t=()=>"قاعدة بيانات OpenResearch",p6t=()=>"Base de datos 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=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",b6t=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",y6t=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",x6t=()=>"سيستخدم OpenResearch هذه المواقع لمستخدم SSH البعيد ولا يتطلب sudo.",w6t=()=>"OpenResearch usará estas ubicaciones para tu usuario SSH remoto y no necesita sudo.",k6t=()=>"OpenResearch आपके रिमोट SSH यूज़र के लिए इन स्थानों का इस्तेमाल करेगा और sudo की ज़रूरत नहीं है।",S6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b6t():t==="fa"?y6t():t==="ar"?x6t():t==="es"?w6t():t==="hi"?k6t():v6t()}),C6t=()=>"Install OpenResearch?",E6t=()=>"安装 OpenResearch?",N6t=()=>"OpenResearch نصب شود؟",z6t=()=>"تثبيت OpenResearch؟",j6t=()=>"¿Instalar 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=()=>"Installing…",M6t=()=>"正在安装…",O6t=()=>"در حال نصب…",D6t=()=>"جارٍ التثبيت…",L6t=()=>"Instalando…",I6t=()=>"इंस्टॉल हो रहा है…",$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=()=>"No matching SSH hosts",P6t=()=>"没有匹配的 SSH 主机",F6t=()=>"میزبان SSH منطبقی پیدا نشد",H6t=()=>"لا توجد مضيفات SSH مطابقة",q6t=()=>"No hay hosts SSH que coincidan",U6t=()=>"कोई मेल खाता SSH होस्ट नहीं",G6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P6t():t==="fa"?F6t():t==="ar"?H6t():t==="es"?q6t():t==="hi"?U6t():B6t()}),V6t=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,K6t=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,W6t=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,Q6t=e=>`‏OpenResearch غير مثبّت للمستخدم ${e==null?void 0:e.user} على ${e==null?void 0:e.host}. هل تريد تثبيته الآن؟`,X6t=e=>`OpenResearch no está instalado para ${e==null?void 0:e.user} en ${e==null?void 0:e.host}. ¿Instalarlo ahora?`,Y6t=e=>`${e==null?void 0:e.host} पर ${e==null?void 0:e.user} के लिए OpenResearch इंस्टॉल नहीं है। अभी इंस्टॉल करें?`,Z6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?K6t(e):t==="fa"?W6t(e):t==="ar"?Q6t(e):t==="es"?X6t(e):t==="hi"?Y6t(e):V6t(e)}),J6t=()=>"Open remote",eCt=()=>"打开远程工作区",tCt=()=>"باز کردن راه‌دور",nCt=()=>"فتح مساحة العمل البعيدة",rCt=()=>"Abrir remoto",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():J6t()}),aCt=()=>"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.",oCt=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",cCt=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",lCt=()=>"إغلاق هذا التبويب أو قطع الاتصال يُبقي الوكلاء والتجارب قيد التشغيل. تبقى طلبات الموافقة معلّقة لمدة تصل إلى 55 دقيقة. قد تتسبب إعادة تشغيل المضيف أو سياسة المسؤول في إيقاف OpenResearch.",uCt=()=>"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.",_Ct=()=>"यह टैब बंद करने या डिस्कनेक्ट करने पर भी एजेंट और प्रयोग चलते रहते हैं। स्वीकृति अनुरोध 55 मिनट तक लंबित रहते हैं। होस्ट रीस्टार्ट या एडमिन नीति 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=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",hCt=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",pCt=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",mCt=()=>"حجب متصفحك تبويب مساحة العمل البعيدة. اسمح بالنوافذ المنبثقة وحاول مجددًا.",gCt=()=>"Tu navegador bloqueó la pestaña del espacio de trabajo remoto. Permite las ventanas emergentes y vuelve a intentarlo.",vCt=()=>"आपके ब्राउज़र ने रिमोट वर्कस्पेस टैब को ब्लॉक कर दिया। पॉप-अप की अनुमति दें और फिर से कोशिश करें।",bCt=((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()}),yCt=()=>"Preparing remote workspace…",xCt=()=>"正在准备远程工作区…",wCt=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",kCt=()=>"جارٍ تحضير مساحة العمل البعيدة…",SCt=()=>"Preparando el espacio de trabajo remoto…",CCt=()=>"रिमोट वर्कस्पेस तैयार हो रहा है…",ECt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xCt():t==="fa"?wCt():t==="ar"?kCt():t==="es"?SCt():t==="hi"?CCt():yCt()}),NCt=()=>"Reconnect",zCt=()=>"重新连接",jCt=()=>"اتصال دوباره",ACt=()=>"إعادة الاتصال",TCt=()=>"Reconectar",RCt=()=>"फिर से कनेक्ट करें",Fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zCt():t==="fa"?jCt():t==="ar"?ACt():t==="es"?TCt():t==="hi"?RCt():NCt()}),MCt=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",OCt=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",DCt=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",LCt=()=>"انقطع الاتصال. يبقى عملك البعيد قيد التشغيل بينما يعيد OpenResearch الاتصال.",ICt=()=>"Se perdió la conexión. Tu trabajo remoto sigue en ejecución mientras OpenResearch se reconecta.",$Ct=()=>"कनेक्शन टूट गया। OpenResearch के फिर से कनेक्ट होने के दौरान आपका रिमोट काम चलता रहता है।",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=>`Reconnecting to ${e==null?void 0:e.host}`,FCt=e=>`正在重新连接到 ${e==null?void 0:e.host}`,HCt=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,qCt=e=>`جارٍ إعادة الاتصال بـ ${e==null?void 0:e.host}`,UCt=e=>`Reconectando a ${e==null?void 0:e.host}`,GCt=e=>`${e==null?void 0:e.host} से फिर से कनेक्ट हो रहा है`,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=()=>"Search SSH hosts",WCt=()=>"搜索 SSH 主机",QCt=()=>"جستجوی میزبان‌های SSH",XCt=()=>"البحث في مضيفات SSH",YCt=()=>"Buscar hosts SSH",ZCt=()=>"SSH होस्ट खोजें",Hz=((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=e=>`SSH: ${e==null?void 0:e.host}`,e7t=e=>`SSH:${e==null?void 0:e.host}`,t7t=e=>`SSH: ${e==null?void 0:e.host}`,n7t=e=>`SSH: ${e==null?void 0:e.host}`,r7t=e=>`SSH: ${e==null?void 0:e.host}`,s7t=e=>`SSH: ${e==null?void 0:e.host}`,dw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?e7t(e):t==="fa"?t7t(e):t==="ar"?n7t(e):t==="es"?r7t(e):t==="hi"?s7t(e):JCt(e)}),i7t=()=>"Start a new OpenResearch host",a7t=()=>"启动新的 OpenResearch 主机",o7t=()=>"راه‌اندازی میزبان جدید OpenResearch",c7t=()=>"بدء مضيف OpenResearch جديد",l7t=()=>"Iniciar un nuevo host de OpenResearch",u7t=()=>"एक नया OpenResearch होस्ट शुरू करें",_7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a7t():t==="fa"?o7t():t==="ar"?c7t():t==="es"?l7t():t==="hi"?u7t():i7t()}),f7t=e=>`End ${e==null?void 0:e.count} pending approvals.`,d7t=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,h7t=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,p7t=e=>`إنهاء طلبات الموافقة المعلّقة (${e==null?void 0:e.count}).`,m7t=e=>`Cancelará ${e==null?void 0:e.count} aprobaciones pendientes.`,g7t=e=>`${e==null?void 0:e.count} लंबित स्वीकृतियाँ खत्म होंगी।`,v7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?d7t(e):t==="fa"?h7t(e):t==="ar"?p7t(e):t==="es"?m7t(e):t==="hi"?g7t(e):f7t(e)}),b7t=()=>"Stop OpenResearch",y7t=()=>"停止 OpenResearch",x7t=()=>"توقف OpenResearch",w7t=()=>"إيقاف OpenResearch",k7t=()=>"Detener OpenResearch",S7t=()=>"OpenResearch रोकें",C7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y7t():t==="fa"?x7t():t==="ar"?w7t():t==="es"?k7t():t==="hi"?S7t():b7t()}),E7t=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,N7t=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,z7t=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,j7t=e=>`إيقاف OpenResearch على ${e==null?void 0:e.host}؟`,A7t=e=>`¿Detener OpenResearch en ${e==null?void 0:e.host}?`,T7t=e=>`${e==null?void 0:e.host} पर OpenResearch रोकें?`,R7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?N7t(e):t==="fa"?z7t(e):t==="ar"?j7t(e):t==="es"?A7t(e):t==="hi"?T7t(e):E7t(e)}),M7t=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,O7t=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,D7t=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,L7t=e=>`إبقاء التجارب المُرسَلة قيد التشغيل (${e==null?void 0:e.count}).`,I7t=e=>`Dejará ${e==null?void 0:e.count} experimentos enviados en ejecución.`,$7t=e=>`${e==null?void 0:e.count} सबमिट किए गए प्रयोग चलते रहेंगे।`,B7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?O7t(e):t==="fa"?D7t(e):t==="ar"?L7t(e):t==="es"?I7t(e):t==="hi"?$7t(e):M7t(e)}),P7t=()=>"Stop OpenResearch on host",F7t=()=>"停止主机上的 OpenResearch",H7t=()=>"توقف OpenResearch روی میزبان",q7t=()=>"إيقاف OpenResearch على المضيف",U7t=()=>"Detener OpenResearch en el host",G7t=()=>"होस्ट पर OpenResearch रोकें",ML=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F7t():t==="fa"?H7t():t==="ar"?q7t():t==="es"?U7t():t==="hi"?G7t():P7t()}),V7t=()=>"This will also:",K7t=()=>"这还将:",W7t=()=>"این کار همچنین:",Q7t=()=>"سيؤدي هذا أيضًا إلى:",X7t=()=>"Esto también:",Y7t=()=>"इससे यह भी होगा:",Z7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K7t():t==="fa"?W7t():t==="ar"?Q7t():t==="es"?X7t():t==="hi"?Y7t():V7t()}),J7t=()=>"End 1 pending approval.",e8t=()=>"结束 1 个待审批请求。",t8t=()=>"۱ تأیید در انتظار را پایان می‌دهد.",n8t=()=>"إنهاء طلب موافقة معلّق واحد.",r8t=()=>"Cancelará 1 aprobación pendiente.",s8t=()=>"1 लंबित स्वीकृति खत्म होगी।",i8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e8t():t==="fa"?t8t():t==="ar"?n8t():t==="es"?r8t():t==="hi"?s8t():J7t()}),a8t=()=>"Leave 1 submitted experiment running.",o8t=()=>"让 1 个已提交实验继续运行。",c8t=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",l8t=()=>"ترك تجربة مُرسَلة واحدة قيد التشغيل.",u8t=()=>"Dejará 1 experimento enviado en ejecución.",_8t=()=>"1 सबमिट किया गया प्रयोग चलता रहेगा।",f8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o8t():t==="fa"?c8t():t==="ar"?l8t():t==="es"?u8t():t==="hi"?_8t():a8t()}),d8t=()=>"Disconnect 1 other client.",h8t=()=>"断开 1 个其他客户端。",p8t=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",m8t=()=>"قطع اتصال عميل آخر واحد.",g8t=()=>"Desconectará a otro cliente.",v8t=()=>"1 अन्य क्लाइंट डिस्कनेक्ट होगा।",b8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h8t():t==="fa"?p8t():t==="ar"?m8t():t==="es"?g8t():t==="hi"?v8t():d8t()}),y8t=()=>"Keep 1 queued message saved.",x8t=()=>"保留 1 条排队消息。",w8t=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",k8t=()=>"إبقاء رسالة واحدة محفوظة في قائمة الانتظار.",S8t=()=>"Conservará 1 mensaje en cola.",C8t=()=>"1 कतार में लगा संदेश सुरक्षित रहेगा।",E8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x8t():t==="fa"?w8t():t==="ar"?k8t():t==="es"?S8t():t==="hi"?C8t():y8t()}),N8t=()=>"Interrupt 1 active agent turn.",z8t=()=>"中断 1 个活动代理任务。",j8t=()=>"۱ نوبت فعال عامل را قطع می‌کند.",A8t=()=>"مقاطعة جولة وكيل نشطة واحدة.",T8t=()=>"Interrumpirá 1 turno activo de un agente.",R8t=()=>"1 सक्रिय एजेंट टर्न बाधित होगा।",M8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z8t():t==="fa"?j8t():t==="ar"?A8t():t==="es"?T8t():t==="hi"?R8t():N8t()}),O8t=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,D8t=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,L8t=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,I8t=e=>`قطع اتصال العملاء الآخرين (${e==null?void 0:e.count}).`,$8t=e=>`Desconectará otros ${e==null?void 0:e.count} clientes.`,B8t=e=>`${e==null?void 0:e.count} अन्य क्लाइंट डिस्कनेक्ट होंगे।`,P8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?D8t(e):t==="fa"?L8t(e):t==="ar"?I8t(e):t==="es"?$8t(e):t==="hi"?B8t(e):O8t(e)}),F8t=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,H8t=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,q8t=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,U8t=e=>`إبقاء الرسائل في قائمة الانتظار محفوظة (${e==null?void 0:e.count}).`,G8t=e=>`Conservará ${e==null?void 0:e.count} mensajes en cola.`,V8t=e=>`${e==null?void 0:e.count} कतार में लगे संदेश सुरक्षित रहेंगे।`,K8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?H8t(e):t==="fa"?q8t(e):t==="ar"?U8t(e):t==="es"?G8t(e):t==="hi"?V8t(e):F8t(e)}),W8t=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,Q8t=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,X8t=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,Y8t=e=>`مقاطعة جولات الوكلاء النشطة (${e==null?void 0:e.count}).`,Z8t=e=>`Interrumpirá ${e==null?void 0:e.count} turnos activos de agentes.`,J8t=e=>`${e==null?void 0:e.count} सक्रिय एजेंट टर्न बाधित होंगे।`,e9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Q8t(e):t==="fa"?X8t(e):t==="ar"?Y8t(e):t==="es"?Z8t(e):t==="hi"?J8t(e):W8t(e)}),t9t=()=>"Stopping host…",n9t=()=>"正在停止主机…",r9t=()=>"در حال توقف میزبان…",s9t=()=>"جارٍ إيقاف المضيف…",i9t=()=>"Deteniendo el host…",a9t=()=>"होस्ट रोका जा रहा है…",o9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n9t():t==="fa"?r9t():t==="ar"?s9t():t==="es"?i9t():t==="hi"?a9t():t9t()}),c9t=()=>"Update",l9t=()=>"更新",u9t=()=>"به‌روزرسانی",_9t=()=>"تحديث",f9t=()=>"Actualizar",d9t=()=>"अपडेट करें",qz=((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=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,p9t=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,m9t=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,g9t=e=>`نسخة OpenResearch المثبّتة على ${e==null?void 0:e.host} غير متوافقة مع هذه اللوحة. هل تريد تحديثها الآن؟`,v9t=e=>`La instalación de OpenResearch en ${e==null?void 0:e.host} no es compatible con este dashboard. ¿Actualizarla ahora?`,b9t=e=>`${e==null?void 0:e.host} पर OpenResearch इंस्टॉलेशन इस डैशबोर्ड के साथ संगत नहीं है। अभी अपडेट करें?`,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=()=>"Update OpenResearch?",w9t=()=>"更新 OpenResearch?",k9t=()=>"OpenResearch به‌روزرسانی شود؟",S9t=()=>"تحديث OpenResearch؟",C9t=()=>"¿Actualizar OpenResearch?",E9t=()=>"OpenResearch अपडेट करें?",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=()=>"Updating…",j9t=()=>"正在更新…",A9t=()=>"در حال به‌روزرسانی…",T9t=()=>"جارٍ التحديث…",R9t=()=>"Actualizando…",M9t=()=>"अपडेट हो रहा है…",O9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j9t():t==="fa"?A9t():t==="ar"?T9t():t==="es"?R9t():t==="hi"?M9t():z9t()}),D9t=()=>"Disable syncing",L9t=()=>"关闭同步",I9t=()=>"غیرفعال کردن همگام‌سازی",$9t=()=>"تعطيل المزامنة",B9t=()=>"Desactivar sincronización",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=()=>"Enable GitHub syncing",q9t=()=>"启用 GitHub 同步",U9t=()=>"فعال‌سازی همگام‌سازی GitHub",G9t=()=>"تفعيل مزامنة GitHub",V9t=()=>"Activar sincronización con GitHub",K9t=()=>"GitHub सिंकिंग चालू करें",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=()=>"Enabling…",X9t=()=>"正在启用…",Y9t=()=>"در حال فعال‌سازی…",Z9t=()=>"جارٍ التفعيل…",J9t=()=>"Activando…",eEt=()=>"चालू हो रहा है…",tEt=((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()}),nEt=()=>"Updating…",rEt=()=>"正在更新…",sEt=()=>"در حال به‌روزرسانی…",iEt=()=>"جارٍ التحديث…",aEt=()=>"Actualizando…",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=()=>"Reopen a previous chat",uEt=()=>"重新打开之前的聊天",_Et=()=>"بازکردن دوبارهٔ گفت‌وگوی قبلی",fEt=()=>"إعادة فتح محادثة سابقة",dEt=()=>"Vuelve a abrir un chat anterior",hEt=()=>"पिछली चैट फिर से खोलें",pEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uEt():t==="fa"?_Et():t==="ar"?fEt():t==="es"?dEt():t==="hi"?hEt():lEt()}),mEt=()=>"No chats to resume",gEt=()=>"没有可恢复的聊天",vEt=()=>"گفت‌وگویی برای ادامه وجود ندارد",bEt=()=>"لا توجد محادثات لاستئنافها",yEt=()=>"No hay chats que reanudar",xEt=()=>"फिर से शुरू करने के लिए कोई चैट नहीं है",wEt=((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()}),kEt=()=>"From your terminal — adopting copies the transcript, and new turns continue there",SEt=()=>"来自你的终端 — 采用会复制记录,新的回合将在那里继续",CEt=()=>"از ترمینال شما — با پذیرفتن، رونوشت گفت‌وگو کپی می‌شود و نوبت‌های جدید همان‌جا ادامه می‌یابند",EEt=()=>"من طرفيتك — التبنّي ينسخ النص، والجولات الجديدة تتابع هناك",NEt=()=>"Desde tu terminal — al adoptarlo se copia la transcripción y los turnos nuevos continúan allí",zEt=()=>"आपके टर्मिनल से — अपनाने पर ट्रांसक्रिप्ट कॉपी होती है और नए टर्न वहीं जारी रहते हैं",Uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SEt():t==="fa"?CEt():t==="ar"?EEt():t==="es"?NEt():t==="hi"?zEt():kEt()}),jEt=()=>"Search chats",AEt=()=>"搜索聊天",TEt=()=>"جست‌وجوی گفت‌وگوها",REt=()=>"البحث في المحادثات",MEt=()=>"Buscar chats",OEt=()=>"चैट खोजें",Gz=((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()}),DEt=()=>"Resume a chat",LEt=()=>"恢复聊天",IEt=()=>"ادامهٔ یک گفت‌وگو",$Et=()=>"استئناف محادثة",BEt=()=>"Reanudar un chat",PEt=()=>"चैट फिर से शुरू करें",Vz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LEt():t==="fa"?IEt():t==="ar"?$Et():t==="es"?BEt():t==="hi"?PEt():DEt()}),FEt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,HEt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,qEt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,UEt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}`,GEt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}`,VEt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}`,KEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HEt(e):t==="fa"?qEt(e):t==="ar"?UEt(e):t==="es"?GEt(e):t==="hi"?VEt(e):FEt(e)}),WEt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,QEt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,XEt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,YEt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,ZEt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,JEt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,eNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QEt(e):t==="fa"?XEt(e):t==="ar"?YEt(e):t==="es"?ZEt(e):t==="hi"?JEt(e):WEt(e)}),tNt=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`,nNt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,rNt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,sNt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,iNt=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`,aNt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,oNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nNt(e):t==="fa"?rNt(e):t==="ar"?sNt(e):t==="es"?iNt(e):t==="hi"?aNt(e):tNt(e)}),cNt=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,lNt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,uNt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,_Nt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,fNt=e=>`Reintentando · intento ${e==null?void 0:e.attempt} · siguiente intento en ${e==null?void 0:e.seconds} s`,dNt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,hNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lNt(e):t==="fa"?uNt(e):t==="ar"?_Nt(e):t==="es"?fNt(e):t==="hi"?dNt(e):cNt(e)}),pNt=()=>"CLI is retrying…",mNt=()=>"CLI 正在重试…",gNt=()=>"CLI در حال تلاش دوباره است…",vNt=()=>"تعيد واجهة سطر الأوامر المحاولة…",bNt=()=>"La CLI está reintentando…",yNt=()=>"CLI फिर से कोशिश कर रहा है…",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=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,kNt=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,SNt=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,CNt=e=>`إعادة المحاولة · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,ENt=e=>`Reintentando · siguiente intento en ${e==null?void 0:e.seconds} s`,NNt=e=>`फिर से कोशिश · अगला प्रयास ${e==null?void 0:e.seconds}से में`,zNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kNt(e):t==="fa"?SNt(e):t==="ar"?CNt(e):t==="es"?ENt(e):t==="hi"?NNt(e):wNt(e)}),jNt=()=>"Sending again…",ANt=()=>"正在重新发送…",TNt=()=>"در حال ارسال دوباره…",RNt=()=>"جارٍ إعادة الإرسال…",MNt=()=>"Reenviando…",ONt=()=>"फिर से भेजा जा रहा है…",DNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ANt():t==="fa"?TNt():t==="ar"?RNt():t==="es"?MNt():t==="hi"?ONt():jNt()}),LNt=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,INt=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,$Nt=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,BNt=e=>`إعادة الإرسال بعد ${e==null?void 0:e.seconds}ث…`,PNt=e=>`Reenviando en ${e==null?void 0:e.seconds} s…`,FNt=e=>`${e==null?void 0:e.seconds}से में फिर से भेजा जाएगा…`,HNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?INt(e):t==="fa"?$Nt(e):t==="ar"?BNt(e):t==="es"?PNt(e):t==="hi"?FNt(e):LNt(e)}),qNt=()=>"Retrying…",UNt=()=>"正在重试…",GNt=()=>"در حال تلاش دوباره…",VNt=()=>"جارٍ إعادة المحاولة…",KNt=()=>"Reintentando…",WNt=()=>"फिर से कोशिश हो रही है…",OL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UNt():t==="fa"?GNt():t==="ar"?VNt():t==="es"?KNt():t==="hi"?WNt():qNt()}),QNt=()=>"Default speed",XNt=()=>"默认速度",YNt=()=>"سرعت پیش‌فرض",ZNt=()=>"السرعة الافتراضية",JNt=()=>"Velocidad predeterminada",ezt=()=>"डिफ़ॉल्ट गति",tzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XNt():t==="fa"?YNt():t==="ar"?ZNt():t==="es"?JNt():t==="hi"?ezt():QNt()}),nzt=()=>"Standard",rzt=()=>"标准",szt=()=>"استاندارد",izt=()=>"قياسي",azt=()=>"Estándar",ozt=()=>"स्टैंडर्ड",czt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rzt():t==="fa"?szt():t==="ar"?izt():t==="es"?azt():t==="hi"?ozt():nzt()}),lzt=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,uzt=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,_zt=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,fzt=e=>` أضِف ${e==null?void 0:e.directory} إلى PATH لاستخدامه.`,dzt=e=>` Añade ${e==null?void 0:e.directory} a tu PATH para usarlo.`,hzt=e=>` इसे इस्तेमाल करने के लिए ${e==null?void 0:e.directory} को अपने PATH में जोड़ें।`,pzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uzt(e):t==="fa"?_zt(e):t==="ar"?fzt(e):t==="es"?dzt(e):t==="hi"?hzt(e):lzt(e)}),mzt=()=>"Appearance",gzt=()=>"外观",vzt=()=>"ظاهر",bzt=()=>"المظهر",yzt=()=>"Apariencia",xzt=()=>"रूप-रंग",wzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gzt():t==="fa"?vzt():t==="ar"?bzt():t==="es"?yzt():t==="hi"?xzt():mzt()}),kzt=()=>"Check",Szt=()=>"检查",Czt=()=>"بررسی",Ezt=()=>"فحص",Nzt=()=>"Comprobar",zzt=()=>"जाँचें",jzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Szt():t==="fa"?Czt():t==="ar"?Ezt():t==="es"?Nzt():t==="hi"?zzt():kzt()}),Azt=()=>"Check again",Tzt=()=>"再次检查",Rzt=()=>"بررسی دوباره",Mzt=()=>"تحقق مجددًا",Ozt=()=>"Volver a comprobar",Dzt=()=>"फिर से जाँचें",Am=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tzt():t==="fa"?Rzt():t==="ar"?Mzt():t==="es"?Ozt():t==="hi"?Dzt():Azt()}),Lzt=()=>"Check for updates",Izt=()=>"检查更新",$zt=()=>"بررسی به‌روزرسانی",Bzt=()=>"التحقق من التحديثات",Pzt=()=>"Buscar actualizaciones",Fzt=()=>"अपडेट के लिए जाँचें",Hzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Izt():t==="fa"?$zt():t==="ar"?Bzt():t==="es"?Pzt():t==="hi"?Fzt():Lzt()}),qzt=()=>"Check now",Uzt=()=>"立即检查",Gzt=()=>"اکنون بررسی کن",Vzt=()=>"التحقق الآن",Kzt=()=>"Comprobar ahora",Wzt=()=>"अभी जाँचें",Qzt=((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()}),Xzt=()=>"Check setup",Yzt=()=>"检查设置",Zzt=()=>"بررسی راه‌اندازی",Jzt=()=>"فحص الإعداد",ejt=()=>"Comprobar configuración",tjt=()=>"सेटअप जाँचें",njt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yzt():t==="fa"?Zzt():t==="ar"?Jzt():t==="es"?ejt():t==="hi"?tjt():Xzt()}),rjt=()=>"orx checks a few times a day on its own.",sjt=()=>"orx 每天会自动检查几次。",ijt=()=>"orx روزی چند بار خودکار بررسی می‌کند.",ajt=()=>"يتحقق orx بضع مرات يوميًا تلقائيًا.",ojt=()=>"orx lo comprueba por sí solo varias veces al día.",cjt=()=>"orx खुद दिन में कुछ बार जाँच करता है।",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=()=>"Choose a flavor",_jt=()=>"选择配置",fjt=()=>"انتخاب پیکربندی",djt=()=>"اختر تكوين الموارد",hjt=()=>"Elige una opción",pjt=()=>"एक फ़्लेवर चुनें",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=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,vjt=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,bjt=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,yjt=e=>`اختر تكوين الموارد لاستخدام ${e==null?void 0:e.destination} في عمليات التشغيل الجديدة.`,xjt=e=>`Elige una opción para usar ${e==null?void 0:e.destination} en las nuevas ejecuciones.`,wjt=e=>`नए रन के लिए ${e==null?void 0:e.destination} इस्तेमाल करने के लिए एक फ़्लेवर चुनें।`,kjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vjt(e):t==="fa"?bjt(e):t==="ar"?yjt(e):t==="es"?xjt(e):t==="hi"?wjt(e):gjt(e)}),Sjt=()=>"clean",Cjt=()=>"无更改",Ejt=()=>"بدون تغییر",Njt=()=>"نظيف",zjt=()=>"sin cambios",jjt=()=>"साफ़",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=e=>`Already linked at ${e==null?void 0:e.link}.`,Rjt=e=>`已链接到 ${e==null?void 0:e.link}。`,Mjt=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,Ojt=e=>`مرتبط بالفعل في ${e==null?void 0:e.link}.`,Djt=e=>`Ya está enlazado en ${e==null?void 0:e.link}.`,Ljt=e=>`पहले से ${e==null?void 0:e.link} पर लिंक है।`,Ijt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Rjt(e):t==="fa"?Mjt(e):t==="ar"?Ojt(e):t==="es"?Djt(e):t==="hi"?Ljt(e):Tjt(e)}),$jt=e=>`Linked ${e==null?void 0:e.link}.`,Bjt=e=>`已链接 ${e==null?void 0:e.link}。`,Pjt=e=>`${e==null?void 0:e.link} پیوند شد.`,Fjt=e=>`تم إنشاء الرابط ${e==null?void 0:e.link}.`,Hjt=e=>`Enlazado en ${e==null?void 0:e.link}.`,qjt=e=>`${e==null?void 0:e.link} लिंक किया गया।`,Ujt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bjt(e):t==="fa"?Pjt(e):t==="ar"?Fjt(e):t==="es"?Hjt(e):t==="hi"?qjt(e):$jt(e)}),Gjt=()=>"Close terminal",Vjt=()=>"关闭终端",Kjt=()=>"بستن ترمینال",Wjt=()=>"إغلاق الطرفية",Qjt=()=>"Cerrar la terminal",Xjt=()=>"टर्मिनल बंद करें",Kz=((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=()=>"Terminal closed",Zjt=()=>"终端已关闭",Jjt=()=>"ترمینال بسته شد",eAt=()=>"أُغلقت الطرفية",tAt=()=>"Terminal cerrada",nAt=()=>"टर्मिनल बंद हो गया",rAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zjt():t==="fa"?Jjt():t==="ar"?eAt():t==="es"?tAt():t==="hi"?nAt():Yjt()}),sAt=()=>"Finished",iAt=()=>"已完成",aAt=()=>"انجام شد",oAt=()=>"اكتمل",cAt=()=>"Finalizado",lAt=()=>"पूर्ण",uAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iAt():t==="fa"?aAt():t==="ar"?oAt():t==="es"?cAt():t==="hi"?lAt():sAt()}),_At=()=>"Command failed",fAt=()=>"命令失败",dAt=()=>"دستور ناموفق بود",hAt=()=>"فشل الأمر",pAt=()=>"El comando falló",mAt=()=>"कमांड विफल रही",gAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fAt():t==="fa"?dAt():t==="ar"?hAt():t==="es"?pAt():t==="hi"?mAt():_At()}),vAt=()=>"Running…",bAt=()=>"运行中…",yAt=()=>"در حال اجرا…",xAt=()=>"قيد التشغيل…",wAt=()=>"Ejecutando…",kAt=()=>"चल रहा है…",SAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bAt():t==="fa"?yAt():t==="ar"?xAt():t==="es"?wAt():t==="hi"?kAt():vAt()}),CAt=()=>"Connect",EAt=()=>"连接",NAt=()=>"اتصال",zAt=()=>"اتصال",jAt=()=>"Conectar",AAt=()=>"कनेक्ट करें",bS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EAt():t==="fa"?NAt():t==="ar"?zAt():t==="es"?jAt():t==="hi"?AAt():CAt()}),TAt=()=>"Connected via GitHub CLI",RAt=()=>"已通过 GitHub CLI 连接",MAt=()=>"از طریق GitHub CLI متصل است",OAt=()=>"متصل عبر واجهة GitHub لسطر الأوامر",DAt=()=>"Conectado mediante GitHub CLI",LAt=()=>"GitHub CLI के ज़रिए कनेक्टेड",DL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RAt():t==="fa"?MAt():t==="ar"?OAt():t==="es"?DAt():t==="hi"?LAt():TAt()}),IAt=()=>"Connecting…",$At=()=>"正在连接…",BAt=()=>"در حال اتصال…",PAt=()=>"جارٍ الاتصال…",FAt=()=>"Conectando…",HAt=()=>"कनेक्ट हो रहा है…",LL=((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()}),qAt=e=>`CPU cores: ${e==null?void 0:e.count}`,UAt=e=>`${e==null?void 0:e.count} 个 CPU 核心`,GAt=e=>`${e==null?void 0:e.count} هستهٔ CPU`,VAt=e=>`أنوية المعالج: ${e==null?void 0:e.count}`,KAt=e=>`Núcleos de CPU: ${e==null?void 0:e.count}`,WAt=e=>`CPU कोर: ${e==null?void 0:e.count}`,QAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UAt(e):t==="fa"?GAt(e):t==="ar"?VAt(e):t==="es"?KAt(e):t==="hi"?WAt(e):qAt(e)}),XAt=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",YAt=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",ZAt=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",JAt=()=>"أنشئ مستودعًا خاصًا وارفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون.",eTt=()=>"Crear un repositorio privado y subir automáticamente las ramas de los experimentos para que las vean tus colaboradores.",tTt=()=>"एक निजी रिपॉज़िटरी बनाएं और सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश करें।",nTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YAt():t==="fa"?ZAt():t==="ar"?JAt():t==="es"?eTt():t==="hi"?tTt():XAt()}),rTt=()=>"the current project",sTt=()=>"当前项目",iTt=()=>"پروژهٔ فعلی",aTt=()=>"المشروع الحالي",oTt=()=>"el proyecto actual",cTt=()=>"मौजूदा प्रोजेक्ट",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=e=>`${e==null?void 0:e.value} (custom)`,_Tt=e=>`${e==null?void 0:e.value}(自定义)`,fTt=e=>`${e==null?void 0:e.value} (سفارشی)`,dTt=e=>`${e==null?void 0:e.value} (مخصص)`,hTt=e=>`${e==null?void 0:e.value} (personalizado)`,pTt=e=>`${e==null?void 0:e.value} (कस्टम)`,mTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_Tt(e):t==="fa"?fTt(e):t==="ar"?dTt(e):t==="es"?hTt(e):t==="hi"?pTt(e):uTt(e)}),gTt=()=>"detached",vTt=()=>"分离头指针",bTt=()=>"جدا از شاخه",yTt=()=>"منفصل",xTt=()=>"desacoplado",wTt=()=>"डिटैच्ड",yS=((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=()=>"Disconnected",STt=()=>"已断开连接",CTt=()=>"قطع اتصال",ETt=()=>"غير متصل",NTt=()=>"Desconectado",zTt=()=>"डिस्कनेक्ट हो गया",IL=((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=()=>"Environment tab",ATt=()=>"环境标签页",TTt=()=>"زبانهٔ محیط",RTt=()=>"تبويب البيئة",MTt=()=>"pestaña Entorno",OTt=()=>"एनवायरनमेंट टैब",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=()=>"Free models · No sign-in required",ITt=()=>"免费模型 · 无需登录",$Tt=()=>"مدل‌های رایگان · بدون نیاز به ورود",BTt=()=>"نماذج مجانية · لا يلزم تسجيل الدخول",PTt=()=>"Modelos gratuitos · No es necesario iniciar sesión",FTt=()=>"मुफ़्त मॉडल · साइन-इन ज़रूरी नहीं",HTt=((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()}),qTt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,UTt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,GTt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,VTt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,KTt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,WTt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,QTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UTt(e):t==="fa"?GTt(e):t==="ar"?VTt(e):t==="es"?KTt(e):t==="hi"?WTt(e):qTt(e)}),XTt=()=>"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.",YTt=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",ZTt=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",JTt=()=>"رفض GitHub رفع التغييرات لأن هذا المستودع مؤرشف وللقراءة فقط. لا يزال المشروع المحلي متاحًا. ألغِ أرشفة المستودع على GitHub، ثم فعّل المزامنة هنا.",eRt=()=>"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í.",tRt=()=>"GitHub ने पुश अस्वीकार कर दिया क्योंकि यह रिपॉज़िटरी आर्काइव और रीड-ओनली है। लोकल प्रोजेक्ट अब भी उपलब्ध है। GitHub पर रिपॉज़िटरी को अनआर्काइव करें, फिर यहाँ सिंकिंग चालू करें।",nRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YTt():t==="fa"?ZTt():t==="ar"?JTt():t==="es"?eRt():t==="hi"?tRt():XTt()}),rRt=()=>"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.",sRt=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",iRt=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",aRt=()=>"يحتوي GitHub على تغييرات ليست في هذا المشروع المحلي. اسحب أحدث تغييرات GitHub وحُلّ أي تعارضات في Git، ثم أعد محاولة تفعيل المزامنة.",oRt=()=>"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.",cRt=()=>"GitHub में ऐसे बदलाव हैं जो इस लोकल प्रोजेक्ट में नहीं हैं। नवीनतम GitHub बदलाव पुल करें और Git में किसी भी टकराव को सुलझाएं, फिर सिंकिंग फिर से चालू करने की कोशिश करें।",lRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sRt():t==="fa"?iRt():t==="ar"?aRt():t==="es"?oRt():t==="hi"?cRt():rRt()}),uRt=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",_Rt=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",fRt=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",dRt=()=>"رفض GitHub رفع التغييرات. تأكد من أن حسابك المتصل يملك صلاحية الكتابة على هذا المستودع، ثم حاول مجددًا.",hRt=()=>"GitHub rechazó el push. Asegúrate de que tu cuenta conectada tiene permiso de escritura en este repositorio y vuelve a intentarlo.",pRt=()=>"GitHub ने पुश अस्वीकार कर दिया। सुनिश्चित करें कि आपके कनेक्टेड खाते के पास इस रिपॉज़िटरी में राइट एक्सेस है, फिर फिर से कोशिश करें।",mRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Rt():t==="fa"?fRt():t==="ar"?dRt():t==="es"?hRt():t==="hi"?pRt():uRt()}),gRt=e=>`GPU × ${e==null?void 0:e.count}`,vRt=e=>`${e==null?void 0:e.count} 个 GPU`,bRt=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,yRt=e=>`معالج رسومات × ${e==null?void 0:e.count}`,xRt=e=>`GPU × ${e==null?void 0:e.count}`,wRt=e=>`GPU × ${e==null?void 0:e.count}`,kRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vRt(e):t==="fa"?bRt(e):t==="ar"?yRt(e):t==="es"?xRt(e):t==="hi"?wRt(e):gRt(e)}),SRt=()=>"has changes",CRt=()=>"有更改",ERt=()=>"دارای تغییر",NRt=()=>"به تغييرات",zRt=()=>"con cambios",jRt=()=>"बदलाव हैं",ARt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CRt():t==="fa"?ERt():t==="ar"?NRt():t==="es"?zRt():t==="hi"?jRt():SRt()}),TRt=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}.`,RRt=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,MRt=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,ORt=e=>`هذا الرمز صالح لكنه لا يبيّن ما إن كان قادرًا على إطلاق المهام؛ ورموز OAuth من ${e==null?void 0:e.login} لا تبيّن ذلك أبدًا. قد ينجح الإطلاق رغم ذلك. للتحقق القاطع، احفظ رمزًا بصلاحية الكتابة من ${e==null?void 0:e.url}.`,DRt=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}.`,LRt=e=>`यह टोकन मान्य है पर यह नहीं बताता कि यह Jobs लॉन्च कर सकता है या नहीं; ${e==null?void 0:e.login} से मिले OAuth टोकन कभी नहीं बताते। लॉन्च फिर भी काम कर सकता है। निश्चित जाँच के लिए, ${e==null?void 0:e.url} से एक राइट-स्कोप्ड टोकन सेव करें।`,IRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RRt(e):t==="fa"?MRt(e):t==="ar"?ORt(e):t==="es"?DRt(e):t==="hi"?LRt(e):TRt(e)}),$Rt=()=>"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.",BRt=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",PRt=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",FRt=()=>"هذا الرمز صالح لكنه لا يستطيع إرسال مهام Hugging Face. أنشئ رمزًا بصلاحية كتابة المهام في إعدادات رموز Hugging Face، ثم استبدله هنا.",HRt=()=>"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í.",qRt=()=>"यह टोकन मान्य है, पर Hugging Face Jobs सबमिट नहीं कर सकता। Hugging Face टोकन सेटिंग्स में Jobs राइट अनुमति वाला टोकन बनाएं, फिर इसे यहाँ बदलें।",URt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BRt():t==="fa"?PRt():t==="ar"?FRt():t==="es"?HRt():t==="hi"?qRt():$Rt()}),GRt=()=>"Install",VRt=()=>"安装",KRt=()=>"نصب",WRt=()=>"تثبيت",QRt=()=>"Instalar",XRt=()=>"इंस्टॉल करें",YRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VRt():t==="fa"?KRt():t==="ar"?WRt():t==="es"?QRt():t==="hi"?XRt():GRt()}),ZRt=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.`,JRt=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,eMt=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,tMt=e=>`يضيف ${e==null?void 0:e.command} إلى طرفيتك موجّهًا إلى هذا التطبيق، بحيث تكون واجهة سطر الأوامر والتطبيق دائمًا بالإصدار نفسه.`,nMt=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.`,rMt=e=>`आपके टर्मिनल में ${e==null?void 0:e.command} जोड़ता है, जो इसी ऐप की ओर इशारा करता है, ताकि CLI और ऐप हमेशा एक ही वर्शन के रहें।`,sMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JRt(e):t==="fa"?eMt(e):t==="ar"?tMt(e):t==="es"?nMt(e):t==="hi"?rMt(e):ZRt(e)}),iMt=e=>`Install the ${e==null?void 0:e.command} command`,aMt=e=>`安装 ${e==null?void 0:e.command} 命令`,oMt=e=>`نصب فرمان ${e==null?void 0:e.command}`,cMt=e=>`تثبيت أمر ${e==null?void 0:e.command}`,lMt=e=>`Instalar el comando ${e==null?void 0:e.command}`,uMt=e=>`${e==null?void 0:e.command} कमांड इंस्टॉल करें`,_Mt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aMt(e):t==="fa"?oMt(e):t==="ar"?cMt(e):t==="es"?lMt(e):t==="hi"?uMt(e):iMt(e)}),fMt=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",dMt=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",hMt=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",pMt=()=>"ثبّت واجهة GitHub لسطر الأوامر، ثم نفّذ `gh auth login` في طرفيتك.",mMt=()=>"Instala GitHub CLI y ejecuta `gh auth login` en tu terminal.",gMt=()=>"GitHub CLI इंस्टॉल करें, फिर अपने टर्मिनल में `gh auth login` चलाएं।",vMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dMt():t==="fa"?hMt():t==="ar"?pMt():t==="es"?mMt():t==="hi"?gMt():fMt()}),bMt=()=>"Install the new release now instead of waiting for the background update.",yMt=()=>"立即安装新版本,无需等待后台更新。",xMt=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",wMt=()=>"ثبّت الإصدار الجديد الآن بدلًا من انتظار التحديث في الخلفية.",kMt=()=>"Instala la nueva versión ahora en lugar de esperar a la actualización en segundo plano.",SMt=()=>"बैकग्राउंड अपडेट का इंतज़ार करने की बजाय अभी नया रिलीज़ इंस्टॉल करें।",CMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yMt():t==="fa"?xMt():t==="ar"?wMt():t==="es"?kMt():t==="hi"?SMt():bMt()}),EMt=()=>"Discard your unsaved Kubernetes changes?",NMt=()=>"要放弃未保存的 Kubernetes 更改吗?",zMt=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",jMt=()=>"تجاهل تغييرات Kubernetes غير المحفوظة؟",AMt=()=>"¿Descartar los cambios sin guardar de Kubernetes?",TMt=()=>"आपके सेव न किए गए Kubernetes बदलाव छोड़ें?",RMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NMt():t==="fa"?zMt():t==="ar"?jMt():t==="es"?AMt():t==="hi"?TMt():EMt()}),MMt=()=>"Key from",OMt=()=>"密钥来自",DMt=()=>"کلید از",LMt=()=>"المفتاح من",IMt=()=>"Clave tomada de la",$Mt=()=>"की स्रोत",BMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OMt():t==="fa"?DMt():t==="ar"?LMt():t==="es"?IMt():t==="hi"?$Mt():MMt()}),PMt=()=>"Use current kubectl context",FMt=()=>"使用当前 kubectl 上下文",HMt=()=>"استفاده از کانتکست فعلی kubectl",qMt=()=>"استخدام سياق kubectl الحالي",UMt=()=>"Usar el contexto actual de kubectl",GMt=()=>"मौजूदा kubectl कॉन्टेक्स्ट इस्तेमाल करें",VMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FMt():t==="fa"?HMt():t==="ar"?qMt():t==="es"?UMt():t==="hi"?GMt():PMt()}),KMt=e=>`Use current context (${e==null?void 0:e.context})`,WMt=e=>`使用当前上下文(${e==null?void 0:e.context})`,QMt=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,XMt=e=>`استخدام السياق الحالي (${e==null?void 0:e.context})`,YMt=e=>`Usar el contexto actual (${e==null?void 0:e.context})`,ZMt=e=>`मौजूदा कॉन्टेक्स्ट इस्तेमाल करें (${e==null?void 0:e.context})`,JMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WMt(e):t==="fa"?QMt(e):t==="ar"?XMt(e):t==="es"?YMt(e):t==="hi"?ZMt(e):KMt(e)}),eOt=()=>"Language",tOt=()=>"语言",nOt=()=>"زبان",rOt=()=>"اللغة",sOt=()=>"Idioma",iOt=()=>"भाषा",aOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tOt():t==="fa"?nOt():t==="ar"?rOt():t==="es"?sOt():t==="hi"?iOt():eOt()}),oOt=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,cOt=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,lOt=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,uOt=e=>`نفّذ ${e==null?void 0:e.command} في الطرفية لتسجيل الدخول.`,_Ot=e=>`Ejecuta ${e==null?void 0:e.command} en una terminal para iniciar sesión.`,fOt=e=>`साइन इन करने के लिए टर्मिनल में ${e==null?void 0:e.command} चलाएं।`,dOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cOt(e):t==="fa"?lOt(e):t==="ar"?uOt(e):t==="es"?_Ot(e):t==="hi"?fOt(e):oOt(e)}),hOt=()=>"Make default",pOt=()=>"设为默认值",mOt=()=>"پیش‌فرض شود",gOt=()=>"جعله افتراضيًا",vOt=()=>"Establecer como predeterminado",bOt=()=>"डिफ़ॉल्ट बनाएं",yOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pOt():t==="fa"?mOt():t==="ar"?gOt():t==="es"?vOt():t==="hi"?bOt():hOt()}),xOt=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",wOt=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",kOt=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",SOt=()=>"بيانات اعتماد Modal مضبوطة في بيئة العملية. أزِل تلك التجاوزات قبل استبدال الرمز هنا.",COt=()=>"Las credenciales de Modal están definidas en el entorno del proceso. Elimínalas antes de reemplazar el token aquí.",EOt=()=>"Modal क्रेडेंशियल प्रोसेस एनवायरनमेंट में सेट हैं। यहाँ सेव टोकन बदलने से पहले उन ओवरराइड को हटाएं।",NOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wOt():t==="fa"?kOt():t==="ar"?SOt():t==="es"?COt():t==="hi"?EOt():xOt()}),zOt=()=>"Replace token ID",jOt=()=>"替换令牌 ID",AOt=()=>"جایگزینی شناسهٔ توکن",TOt=()=>"استبدال معرّف الرمز",ROt=()=>"Reemplazar ID del token",MOt=()=>"टोकन ID बदलें",OOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jOt():t==="fa"?AOt():t==="ar"?TOt():t==="es"?ROt():t==="hi"?MOt():zOt()}),DOt=()=>"Replace token secret",LOt=()=>"替换令牌密钥",IOt=()=>"جایگزینی رمز توکن",$Ot=()=>"استبدال سرّ الرمز",BOt=()=>"Reemplazar secreto del token",POt=()=>"टोकन सीक्रेट बदलें",FOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LOt():t==="fa"?IOt():t==="ar"?$Ot():t==="es"?BOt():t==="hi"?POt():DOt()}),HOt=()=>"How to get a Modal token",qOt=()=>"如何获取 Modal 令牌",UOt=()=>"روش دریافت توکن Modal",GOt=()=>"كيفية الحصول على رمز Modal",VOt=()=>"Cómo obtener un token de Modal",KOt=()=>"Modal टोकन कैसे लें",WOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qOt():t==="fa"?UOt():t==="ar"?GOt():t==="es"?VOt():t==="hi"?KOt():HOt()}),QOt=()=>"Token ID",XOt=()=>"令牌 ID",YOt=()=>"شناسهٔ توکن",ZOt=()=>"معرّف الرمز",JOt=()=>"ID del token",eDt=()=>"टोकन ID",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=()=>"Token secret",rDt=()=>"令牌密钥",sDt=()=>"رمز توکن",iDt=()=>"سرّ الرمز",aDt=()=>"Secreto del token",oDt=()=>"टोकन सीक्रेट",cDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rDt():t==="fa"?sDt():t==="ar"?iDt():t==="es"?aDt():t==="hi"?oDt():nDt()}),lDt=e=>`${e==null?void 0:e.count} models available — ${e==null?void 0:e.models}`,uDt=e=>`${e==null?void 0:e.count} 个模型可用 — ${e==null?void 0:e.models}`,_Dt=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,fDt=e=>`النماذج المتاحة: ${e==null?void 0:e.count} — ${e==null?void 0:e.models}`,dDt=e=>`Modelos disponibles (${e==null?void 0:e.count}): ${e==null?void 0:e.models}`,hDt=e=>`${e==null?void 0:e.count} मॉडल उपलब्ध — ${e==null?void 0:e.models}`,pDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uDt(e):t==="fa"?_Dt(e):t==="ar"?fDt(e):t==="es"?dDt(e):t==="hi"?hDt(e):lDt(e)}),mDt=e=>`Needs ${e==null?void 0:e.tool}`,gDt=e=>`需要 ${e==null?void 0:e.tool}`,vDt=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,bDt=e=>`يحتاج إلى ${e==null?void 0:e.tool}`,yDt=e=>`Requiere ${e==null?void 0:e.tool}`,xDt=e=>`${e==null?void 0:e.tool} की ज़रूरत है`,wDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gDt(e):t==="fa"?vDt(e):t==="ar"?bDt(e):t==="es"?yDt(e):t==="hi"?xDt(e):mDt(e)}),kDt=()=>"Needs tools",SDt=()=>"缺少工具",CDt=()=>"به ابزارها نیاز دارد",EDt=()=>"يحتاج إلى أدوات",NDt=()=>"Requiere herramientas",zDt=()=>"टूल की ज़रूरत है",jDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SDt():t==="fa"?CDt():t==="ar"?EDt():t==="es"?NDt():t==="hi"?zDt():kDt()}),ADt=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,TDt=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,RDt=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,MDt=e=>`تستخدم عمليات التشغيل الجديدة ${e==null?void 0:e.destination} ما لم تُحدَّد بيئة تنفيذ أخرى.`,ODt=e=>`Las nuevas ejecuciones usan ${e==null?void 0:e.destination}, salvo que se indique otro backend.`,DDt=e=>`जब तक कोई और बैकएंड न बताया जाए, नए रन ${e==null?void 0:e.destination} इस्तेमाल करते हैं।`,LDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TDt(e):t==="fa"?RDt(e):t==="ar"?MDt(e):t==="es"?ODt(e):t==="hi"?DDt(e):ADt(e)}),IDt=()=>"New runs use SSH; choose a host when launching.",$Dt=()=>"新运行将使用 SSH;启动时请选择主机。",BDt=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",PDt=()=>"تستخدم عمليات التشغيل الجديدة SSH؛ اختر مضيفًا عند الإطلاق.",FDt=()=>"Las nuevas ejecuciones usan SSH; elige un host al lanzarlas.",HDt=()=>"नए रन SSH इस्तेमाल करते हैं; लॉन्च करते समय एक होस्ट चुनें।",qDt=((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()}),UDt=()=>"New token",GDt=()=>"新令牌",VDt=()=>"توکن جدید",KDt=()=>"رمز جديد",WDt=()=>"Nuevo token",QDt=()=>"नया टोकन",XDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GDt():t==="fa"?VDt():t==="ar"?KDt():t==="es"?WDt():t==="hi"?QDt():UDt()}),YDt=()=>"No default flavor",ZDt=()=>"不设默认配置",JDt=()=>"بدون پیکربندی پیش‌فرض",eLt=()=>"لا يوجد تكوين افتراضي للموارد",tLt=()=>"Sin opción predeterminada",nLt=()=>"कोई डिफ़ॉल्ट फ़्लेवर नहीं",rLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZDt():t==="fa"?JDt():t==="ar"?eLt():t==="es"?tLt():t==="hi"?nLt():YDt()}),sLt=()=>"none",iLt=()=>"无",aLt=()=>"هیچ‌کدام",oLt=()=>"لا شيء",cLt=()=>"ninguno",lLt=()=>"कोई नहीं",xS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iLt():t==="fa"?aLt():t==="ar"?oLt():t==="es"?cLt():t==="hi"?lLt():sLt()}),uLt=()=>"Not connected",_Lt=()=>"未连接",fLt=()=>"متصل نیست",dLt=()=>"غير متصل",hLt=()=>"No conectado",pLt=()=>"कनेक्टेड नहीं",$L=((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=()=>"not found on PATH",gLt=()=>"在 PATH 中未找到",vLt=()=>"در PATH پیدا نشد",bLt=()=>"غير موجود في PATH",yLt=()=>"no se encontró en el PATH",xLt=()=>"PATH पर नहीं मिला",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=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,SLt=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,CLt=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,ELt=e=>`${e==null?void 0:e.context} (ليس في kubeconfig)`,NLt=e=>`${e==null?void 0:e.context} (no está en kubeconfig)`,zLt=e=>`${e==null?void 0:e.context} (kubeconfig में नहीं)`,jLt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SLt(e):t==="fa"?CLt(e):t==="ar"?ELt(e):t==="es"?NLt(e):t==="hi"?zLt(e):kLt(e)}),ALt=()=>"not initialized",TLt=()=>"尚未初始化",RLt=()=>"راه‌اندازی نشده",MLt=()=>"غير مهيّأ",OLt=()=>"sin inicializar",DLt=()=>"शुरू नहीं किया गया",LLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TLt():t==="fa"?RLt():t==="ar"?MLt():t==="es"?OLt():t==="hi"?DLt():ALt()}),ILt=()=>"Not set",$Lt=()=>"未设置",BLt=()=>"تنظیم نشده",PLt=()=>"غير مضبوط",FLt=()=>"Sin definir",HLt=()=>"सेट नहीं",M3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Lt():t==="fa"?BLt():t==="ar"?PLt():t==="es"?FLt():t==="hi"?HLt():ILt()}),qLt=()=>"OAuth (subscription login)",ULt=()=>"OAuth(订阅登录)",GLt=()=>"OAuth (ورود با اشتراک)",VLt=()=>"OAuth (تسجيل دخول الاشتراك)",KLt=()=>"OAuth (inicio de sesión con suscripción)",WLt=()=>"OAuth (सब्सक्रिप्शन लॉगिन)",QLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ULt():t==="fa"?GLt():t==="ar"?VLt():t==="es"?KLt():t==="hi"?WLt():qLt()}),XLt=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.`,YLt=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,ZLt=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,JLt=e=>`تُركت النسخة القديمة في ${e==null?void 0:e.path} على قرص مختلف. يمكنك حذفها بعد التأكد من أن كل شيء يعمل.`,eIt=e=>`La copia anterior se dejó en ${e==null?void 0:e.path}, en otro disco. Puedes eliminarla cuando confirmes que todo funciona.`,tIt=e=>`पुरानी कॉपी एक अलग डिस्क पर ${e==null?void 0:e.path} पर छोड़ दी गई थी। सब कुछ ठीक होने की पुष्टि के बाद आप इसे हटा सकते हैं।`,nIt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YLt(e):t==="fa"?ZLt(e):t==="ar"?JLt(e):t==="es"?eIt(e):t==="hi"?tIt(e):XLt(e)}),rIt=()=>"Setting up…",sIt=()=>"正在设置…",iIt=()=>"در حال راه‌اندازی…",aIt=()=>"جارٍ الإعداد…",oIt=()=>"Configurando…",cIt=()=>"सेट अप हो रहा है…",lIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sIt():t==="fa"?iIt():t==="ar"?aIt():t==="es"?oIt():t==="hi"?cIt():rIt()}),uIt=()=>"Account",_It=()=>"账户",fIt=()=>"حساب",dIt=()=>"الحساب",hIt=()=>"Cuenta",pIt=()=>"खाता",wS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_It():t==="fa"?fIt():t==="ar"?dIt():t==="es"?hIt():t==="hi"?pIt():uIt()}),mIt=()=>"Add one with",gIt=()=>"使用以下命令添加:",vIt=()=>"یکی با این فرمان اضافه کنید:",bIt=()=>"أضِف واحدًا عبر",yIt=()=>"Añade una con",xIt=()=>"इसके साथ एक जोड़ें",wIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gIt():t==="fa"?vIt():t==="ar"?bIt():t==="es"?yIt():t==="hi"?xIt():mIt()}),kIt=()=>"Add variable",SIt=()=>"添加变量",CIt=()=>"افزودن متغیر",EIt=()=>"إضافة متغيّر",NIt=()=>"Añadir variable",zIt=()=>"वेरिएबल जोड़ें",jIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SIt():t==="fa"?CIt():t==="ar"?EIt():t==="es"?NIt():t==="hi"?zIt():kIt()}),AIt=()=>"Agent models",TIt=()=>"智能体模型",RIt=()=>"مدل‌های عامل",MIt=()=>"نماذج الوكيل",OIt=()=>"Modelos de los agentes",DIt=()=>"एजेंट मॉडल",LIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TIt():t==="fa"?RIt():t==="ar"?MIt():t==="es"?OIt():t==="hi"?DIt():AIt()}),IIt=()=>"Anonymous usage analytics",$It=()=>"匿名使用情况分析",BIt=()=>"تحلیل ناشناس استفاده",PIt=()=>"تحليلات استخدام مجهولة الهوية",FIt=()=>"Estadísticas de uso anónimas",HIt=()=>"अनाम उपयोग एनालिटिक्स",Wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$It():t==="fa"?BIt():t==="ar"?PIt():t==="es"?FIt():t==="hi"?HIt():IIt()}),qIt=()=>"Auth",UIt=()=>"身份验证",GIt=()=>"احراز هویت",VIt=()=>"المصادقة",KIt=()=>"Autenticación",WIt=()=>"ऑथ",QIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UIt():t==="fa"?GIt():t==="ar"?VIt():t==="es"?KIt():t==="hi"?WIt():qIt()}),XIt=()=>"Authentication",YIt=()=>"身份验证",ZIt=()=>"احراز هویت",JIt=()=>"المصادقة",e$t=()=>"Autenticación",t$t=()=>"प्रमाणीकरण",BL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YIt():t==="fa"?ZIt():t==="ar"?JIt():t==="es"?e$t():t==="hi"?t$t():XIt()}),n$t=()=>"Back to Compute",r$t=()=>"返回算力设置",s$t=()=>"بازگشت به رایانش",i$t=()=>"العودة إلى الحوسبة",a$t=()=>"Volver a Cómputo",o$t=()=>"कंप्यूट पर वापस जाएं",PL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r$t():t==="fa"?s$t():t==="ar"?i$t():t==="es"?a$t():t==="hi"?o$t():n$t()}),c$t=()=>"Backend",l$t=()=>"后端",u$t=()=>"بک‌اند",_$t=()=>"بيئة التنفيذ",f$t=()=>"Backend",d$t=()=>"बैकएंड",h$t=((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()}),p$t=()=>"Baseline",m$t=()=>"基线",g$t=()=>"خط مبنا",v$t=()=>"الأساس المرجعي",b$t=()=>"Rama base",y$t=()=>"बेसलाइन",x$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m$t():t==="fa"?g$t():t==="ar"?v$t():t==="es"?b$t():t==="hi"?y$t():p$t()}),w$t=()=>"Binary",k$t=()=>"可执行文件",S$t=()=>"فایل اجرایی",C$t=()=>"الملف التنفيذي",E$t=()=>"Binario",N$t=()=>"बाइनरी",z$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k$t():t==="fa"?S$t():t==="ar"?C$t():t==="es"?E$t():t==="hi"?N$t():w$t()}),j$t=()=>"Cancel",A$t=()=>"取消",T$t=()=>"لغو",R$t=()=>"إلغاء",M$t=()=>"Cancelar",O$t=()=>"रद्द करें",df=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A$t():t==="fa"?T$t():t==="ar"?R$t():t==="es"?M$t():t==="hi"?O$t():j$t()}),D$t=()=>"Cancel new variable",L$t=()=>"取消新变量",I$t=()=>"لغو متغیر جدید",$$t=()=>"إلغاء المتغيّر الجديد",B$t=()=>"Cancelar nueva variable",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=()=>"Checking compute targets…",q$t=()=>"正在检查算力目标…",U$t=()=>"در حال بررسی مقصدهای رایانشی…",G$t=()=>"جارٍ التحقق من أهداف الحوسبة…",V$t=()=>"Comprobando destinos de cómputo…",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=()=>"Checking kubectl…",X$t=()=>"正在检查 kubectl…",Y$t=()=>"در حال بررسی kubectl…",Z$t=()=>"جارٍ التحقق من kubectl…",J$t=()=>"Comprobando kubectl…",eBt=()=>"kubectl जाँचा जा रहा है…",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=()=>"Checking Modal…",rBt=()=>"正在检查 Modal…",sBt=()=>"در حال بررسی Modal…",iBt=()=>"جارٍ التحقق من Modal…",aBt=()=>"Comprobando Modal…",oBt=()=>"Modal जाँचा जा रहा है…",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=()=>"Choose a preset flavor",uBt=()=>"选择预设规格",_Bt=()=>"یک پیکربندی آماده انتخاب کنید",fBt=()=>"اختر تكوينًا محددًا مسبقًا للموارد",dBt=()=>"Elige una opción predefinida",hBt=()=>"एक प्रीसेट फ़्लेवर चुनें",Qz=((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()}),pBt=()=>"cluster default",mBt=()=>"集群默认值",gBt=()=>"پیش‌فرض خوشه",vBt=()=>"افتراضي العنقود",bBt=()=>"valor predeterminado del clúster",yBt=()=>"क्लस्टर डिफ़ॉल्ट",Xz=((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()}),xBt=()=>"cluster default (e.g. 4h, 30m)",wBt=()=>"集群默认值(例如 4h、30m)",kBt=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",SBt=()=>"افتراضي العنقود (مثل 4h أو 30m)",CBt=()=>"valor predeterminado del clúster (p. ej., 4h, 30m)",EBt=()=>"क्लस्टर डिफ़ॉल्ट (जैसे 4h, 30m)",NBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wBt():t==="fa"?kBt():t==="ar"?SBt():t==="es"?CBt():t==="hi"?EBt():xBt()}),zBt=()=>"Cluster unreachable",jBt=()=>"无法连接集群",ABt=()=>"خوشه در دسترس نیست",TBt=()=>"تعذّر الوصول إلى العنقود",RBt=()=>"Clúster inaccesible",MBt=()=>"क्लस्टर तक नहीं पहुँचा जा सका",OBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jBt():t==="fa"?ABt():t==="ar"?TBt():t==="es"?RBt():t==="hi"?MBt():zBt()}),DBt=()=>"Compute",LBt=()=>"算力",IBt=()=>"رایانش",$Bt=()=>"الحوسبة",BBt=()=>"Cómputo",PBt=()=>"कंप्यूट",FL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LBt():t==="fa"?IBt():t==="ar"?$Bt():t==="es"?BBt():t==="hi"?PBt():DBt()}),FBt=()=>"Connect compute backends and choose where new runs execute.",HBt=()=>"连接算力后端,并选择新运行的执行位置。",qBt=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",UBt=()=>"اربط بيئات التنفيذ واختر أين تُنفَّذ عمليات التشغيل الجديدة.",GBt=()=>"Conecta backends de cómputo y elige dónde se lanzan las nuevas ejecuciones.",VBt=()=>"कंप्यूट बैकएंड कनेक्ट करें और चुनें कि नए रन कहाँ चलेंगे।",KBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HBt():t==="fa"?qBt():t==="ar"?UBt():t==="es"?GBt():t==="hi"?VBt():FBt()}),WBt=()=>"Connected",QBt=()=>"已连接",XBt=()=>"متصل",YBt=()=>"متصل",ZBt=()=>"Conectado",JBt=()=>"कनेक्टेड",ePt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QBt():t==="fa"?XBt():t==="ar"?YBt():t==="es"?ZBt():t==="hi"?JBt():WBt()}),tPt=()=>"Context",nPt=()=>"上下文",rPt=()=>"زمینه",sPt=()=>"السياق",iPt=()=>"Contexto",aPt=()=>"कॉन्टेक्स्ट",oPt=((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()}),cPt=()=>"Current",lPt=()=>"当前",uPt=()=>"فعلی",_Pt=()=>"الحالي",fPt=()=>"Actual",dPt=()=>"मौजूदा",hPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lPt():t==="fa"?uPt():t==="ar"?_Pt():t==="es"?fPt():t==="hi"?dPt():cPt()}),pPt=()=>"Currently off:",mPt=()=>"当前已关闭:",gPt=()=>"اکنون خاموش است:",vPt=()=>"معطّل حاليًا:",bPt=()=>"Desactivado actualmente:",yPt=()=>"फ़िलहाल बंद:",xPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mPt():t==="fa"?gPt():t==="ar"?vPt():t==="es"?bPt():t==="hi"?yPt():pPt()}),wPt=()=>"Custom flavor",kPt=()=>"自定义规格",SPt=()=>"پیکربندی سفارشی",CPt=()=>"تكوين موارد مخصّص",EPt=()=>"Opción personalizada",NPt=()=>"कस्टम फ़्लेवर",zPt=((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()}),jPt=()=>"Custom flavor…",APt=()=>"自定义规格…",TPt=()=>"پیکربندی سفارشی…",RPt=()=>"تكوين موارد مخصّص…",MPt=()=>"Opción personalizada…",OPt=()=>"कस्टम फ़्लेवर…",DPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?APt():t==="fa"?TPt():t==="ar"?RPt():t==="es"?MPt():t==="hi"?OPt():jPt()}),LPt=()=>"Data directory",IPt=()=>"数据目录",$Pt=()=>"پوشهٔ داده",BPt=()=>"دليل البيانات",PPt=()=>"Directorio de datos",FPt=()=>"डेटा डायरेक्टरी",HPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IPt():t==="fa"?$Pt():t==="ar"?BPt():t==="es"?PPt():t==="hi"?FPt():LPt()}),qPt=()=>"default",UPt=()=>"默认",GPt=()=>"پیش‌فرض",VPt=()=>"افتراضي",KPt=()=>"predeterminado",WPt=()=>"डिफ़ॉल्ट",QPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UPt():t==="fa"?GPt():t==="ar"?VPt():t==="es"?KPt():t==="hi"?WPt():qPt()}),XPt=()=>"Default",YPt=()=>"默认",ZPt=()=>"پیش‌فرض",JPt=()=>"الافتراضي",eFt=()=>"Predeterminado",tFt=()=>"डिफ़ॉल्ट",HL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YPt():t==="fa"?ZPt():t==="ar"?JPt():t==="es"?eFt():t==="hi"?tFt():XPt()}),nFt=()=>"Default destination",rFt=()=>"默认目标",sFt=()=>"مقصد پیش‌فرض",iFt=()=>"الوجهة الافتراضية",aFt=()=>"Destino predeterminado",oFt=()=>"डिफ़ॉल्ट गंतव्य",cFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rFt():t==="fa"?sFt():t==="ar"?iFt():t==="es"?aFt():t==="hi"?oFt():nFt()}),lFt=()=>"Detecting hardware…",uFt=()=>"正在检测硬件…",_Ft=()=>"در حال شناسایی سخت‌افزار…",fFt=()=>"جارٍ اكتشاف العتاد…",dFt=()=>"Detectando hardware…",hFt=()=>"हार्डवेयर पहचाना जा रहा है…",pFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uFt():t==="fa"?_Ft():t==="ar"?fFt():t==="es"?dFt():t==="hi"?hFt():lFt()}),mFt=()=>"Detecting harnesses…",gFt=()=>"正在检测智能体工具…",vFt=()=>"در حال شناسایی ابزارهای عامل…",bFt=()=>"جارٍ اكتشاف أدوات البرمجة…",yFt=()=>"Detectando agentes…",xFt=()=>"हार्नेस पहचाने जा रहे हैं…",wFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gFt():t==="fa"?vFt():t==="ar"?bFt():t==="es"?yFt():t==="hi"?xFt():mFt()}),kFt=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",SFt=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",CFt=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",EFt=()=>"يوقف تعطيل المزامنة عمليات الرفع التلقائية. تواصل الحوسبة استخدام لقطات المصدر المباشرة. لا يحذف هذا مستودع GitHub أو الشيفرة التي رُفعت إليه مسبقًا.",NFt=()=>"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ó.",zFt=()=>"सिंकिंग बंद करने से ऑटोमैटिक पुश रुक जाते हैं। कंप्यूट सीधे सोर्स स्नैपशॉट का इस्तेमाल करता रहेगा। इससे GitHub रिपॉज़िटरी या पहले से पुश किया गया कोड नहीं मिटता।",jFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SFt():t==="fa"?CFt():t==="ar"?EFt():t==="es"?NFt():t==="hi"?zFt():kFt()}),AFt=()=>"Effective URL",TFt=()=>"实际使用的网址",RFt=()=>"نشانی مؤثر",MFt=()=>"الرابط الفعّال",OFt=()=>"URL efectiva",DFt=()=>"प्रभावी URL",LFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TFt():t==="fa"?RFt():t==="ar"?MFt():t==="es"?OFt():t==="hi"?DFt():AFt()}),IFt=()=>"Enable GitHub syncing for new projects",$Ft=()=>"为新项目启用 GitHub 同步",BFt=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",PFt=()=>"تفعيل مزامنة GitHub للمشاريع الجديدة",FFt=()=>"Activar la sincronización con GitHub en proyectos nuevos",HFt=()=>"नए प्रोजेक्ट के लिए GitHub सिंकिंग चालू करें",Yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ft():t==="fa"?BFt():t==="ar"?PFt():t==="es"?FFt():t==="hi"?HFt():IFt()}),qFt=()=>"Environment",UFt=()=>"环境",GFt=()=>"محیط",VFt=()=>"البيئة",KFt=()=>"Entorno",WFt=()=>"एनवायरनमेंट",qL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UFt():t==="fa"?GFt():t==="ar"?VFt():t==="es"?KFt():t==="hi"?WFt():qFt()}),QFt=()=>"Failed",XFt=()=>"失败",YFt=()=>"ناموفق",ZFt=()=>"فشل",JFt=()=>"Error",eHt=()=>"विफल",kS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XFt():t==="fa"?YFt():t==="ar"?ZFt():t==="es"?JFt():t==="hi"?eHt():QFt()}),tHt=()=>"General",nHt=()=>"常规",rHt=()=>"عمومی",sHt=()=>"عام",iHt=()=>"General",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=()=>"GitHub publishing",lHt=()=>"GitHub 发布",uHt=()=>"انتشار در GitHub",_Ht=()=>"النشر على GitHub",fHt=()=>"Publicación en GitHub",dHt=()=>"GitHub प्रकाशन",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=()=>"Git token",mHt=()=>"Git 令牌",gHt=()=>"توکن Git",vHt=()=>"رمز Git",bHt=()=>"Token de Git",yHt=()=>"Git टोकन",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=()=>"Harnesses",kHt=()=>"智能体工具",SHt=()=>"ابزارهای عامل",CHt=()=>"أدوات البرمجة",EHt=()=>"Agentes",NHt=()=>"हार्नेस",O3=((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()}),zHt=()=>"hf_…",jHt=()=>"hf_…",AHt=()=>"hf_…",THt=()=>"hf_…",RHt=()=>"hf_…",MHt=()=>"hf_…",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=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",LHt=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",IHt=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",$Ht=()=>"‏HF_TOKEN مضبوط في البيئة ويتجاوز أي رمز محفوظ هنا.",BHt=()=>"HF_TOKEN está definido en el entorno y tiene prioridad sobre cualquier token guardado aquí.",PHt=()=>"HF_TOKEN एनवायरनमेंट में सेट है और यहाँ सेव किसी भी टोकन को ओवरराइड करता है।",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=()=>"Initialize Git",qHt=()=>"初始化 Git",UHt=()=>"راه‌اندازی Git",GHt=()=>"تهيئة Git",VHt=()=>"Inicializar Git",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",XHt=()=>"安装",YHt=()=>"نصب",ZHt=()=>"تثبيت",JHt=()=>"Instalar",eqt=()=>"इंस्टॉल करें",UL=((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()}),tqt=()=>"Install broken",nqt=()=>"安装损坏",rqt=()=>"نصب خراب است",sqt=()=>"التثبيت معطوب",iqt=()=>"Instalación dañada",aqt=()=>"इंस्टॉल खराब है",oqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nqt():t==="fa"?rqt():t==="ar"?sqt():t==="es"?iqt():t==="hi"?aqt():tqt()}),cqt=()=>"Install GitHub CLI",lqt=()=>"安装 GitHub CLI",uqt=()=>"نصب GitHub CLI",_qt=()=>"تثبيت واجهة GitHub لسطر الأوامر",fqt=()=>"Instalar GitHub CLI",dqt=()=>"GitHub CLI इंस्टॉल करें",hqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lqt():t==="fa"?uqt():t==="ar"?_qt():t==="es"?fqt():t==="hi"?dqt():cqt()}),pqt=()=>"Install updates automatically",mqt=()=>"自动安装更新",gqt=()=>"نصب خودکار به‌روزرسانی‌ها",vqt=()=>"تثبيت التحديثات تلقائيًا",bqt=()=>"Instalar actualizaciones automáticamente",yqt=()=>"अपडेट अपने आप इंस्टॉल करें",Zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mqt():t==="fa"?gqt():t==="ar"?vqt():t==="es"?bqt():t==="hi"?yqt():pqt()}),xqt=()=>"Instance history",wqt=()=>"实例历史",kqt=()=>"تاریخچهٔ نمونه‌ها",Sqt=()=>"سجل المثيلات",Cqt=()=>"Historial de instancias",Eqt=()=>"इंस्टेंस इतिहास",Nqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wqt():t==="fa"?kqt():t==="ar"?Sqt():t==="es"?Cqt():t==="hi"?Eqt():xqt()}),zqt=()=>"Invalid Token",jqt=()=>"令牌无效",Aqt=()=>"توکن نامعتبر",Tqt=()=>"رمز غير صالح",Rqt=()=>"Token no válido",Mqt=()=>"अमान्य टोकन",Oqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jqt():t==="fa"?Aqt():t==="ar"?Tqt():t==="es"?Rqt():t==="hi"?Mqt():zqt()}),Dqt=()=>"Jobs / Dashboard URL",Lqt=()=>"Jobs / 控制台网址",Iqt=()=>"نشانی Jobs / داشبورد",$qt=()=>"رابط المهام / لوحة التحكم",Bqt=()=>"URL de jobs / dashboard",Pqt=()=>"Jobs / डैशबोर्ड URL",Fqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lqt():t==="fa"?Iqt():t==="ar"?$qt():t==="es"?Bqt():t==="hi"?Pqt():Dqt()}),Hqt=()=>"kubectl not found",qqt=()=>"未找到 kubectl",Uqt=()=>"kubectl پیدا نشد",Gqt=()=>"لم يُعثر على kubectl",Vqt=()=>"No se encontró kubectl",Kqt=()=>"kubectl नहीं मिला",Wqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qqt():t==="fa"?Uqt():t==="ar"?Gqt():t==="es"?Vqt():t==="hi"?Kqt():Hqt()}),Qqt=()=>"Latest",Xqt=()=>"最新版本",Yqt=()=>"جدیدترین",Zqt=()=>"الأحدث",Jqt=()=>"Última",eUt=()=>"नवीनतम",tUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xqt():t==="fa"?Yqt():t==="ar"?Zqt():t==="es"?Jqt():t==="hi"?eUt():Qqt()}),nUt=()=>"Loading…",rUt=()=>"正在加载…",sUt=()=>"در حال بارگیری…",iUt=()=>"جارٍ التحميل…",aUt=()=>"Cargando…",oUt=()=>"लोड हो रहा है…",Qu=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rUt():t==="fa"?sUt():t==="ar"?iUt():t==="es"?aUt():t==="hi"?oUt():nUt()}),cUt=()=>"Loading Ray settings…",lUt=()=>"正在加载 Ray 设置…",uUt=()=>"در حال بارگیری تنظیمات Ray…",_Ut=()=>"جارٍ تحميل إعدادات Ray…",fUt=()=>"Cargando configuración de Ray…",dUt=()=>"Ray सेटिंग्स लोड हो रही हैं…",hUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lUt():t==="fa"?uUt():t==="ar"?_Ut():t==="es"?fUt():t==="hi"?dUt():cUt()}),pUt=()=>"Loading slurm settings…",mUt=()=>"正在加载 Slurm 设置…",gUt=()=>"در حال بارگیری تنظیمات Slurm…",vUt=()=>"جارٍ تحميل إعدادات slurm…",bUt=()=>"Cargando configuración de Slurm…",yUt=()=>"Slurm सेटिंग्स लोड हो रही हैं…",xUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mUt():t==="fa"?gUt():t==="ar"?vUt():t==="es"?bUt():t==="hi"?yUt():pUt()}),wUt=()=>"Loading status…",kUt=()=>"正在加载状态…",SUt=()=>"در حال بارگیری وضعیت…",CUt=()=>"جارٍ تحميل الحالة…",EUt=()=>"Cargando estado…",NUt=()=>"स्थिति लोड हो रही है…",zUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kUt():t==="fa"?SUt():t==="ar"?CUt():t==="es"?EUt():t==="hi"?NUt():wUt()}),jUt=()=>"Local only",AUt=()=>"仅本地",TUt=()=>"فقط محلی",RUt=()=>"محلي فقط",MUt=()=>"Solo local",OUt=()=>"केवल लोकल",DUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AUt():t==="fa"?TUt():t==="ar"?RUt():t==="es"?MUt():t==="hi"?OUt():jUt()}),LUt=()=>"Local repository",IUt=()=>"本地仓库",$Ut=()=>"مخزن محلی",BUt=()=>"مستودع محلي",PUt=()=>"Repositorio local",FUt=()=>"लोकल रिपॉज़िटरी",HUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IUt():t==="fa"?$Ut():t==="ar"?BUt():t==="es"?PUt():t==="hi"?FUt():LUt()}),qUt=()=>"Login node",UUt=()=>"登录节点",GUt=()=>"گرهٔ ورود",VUt=()=>"عقدة الدخول",KUt=()=>"Nodo de acceso",WUt=()=>"लॉगिन नोड",QUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UUt():t==="fa"?GUt():t==="ar"?VUt():t==="es"?KUt():t==="hi"?WUt():qUt()}),XUt=()=>"Make GitHub syncing the default?",YUt=()=>"将 GitHub 同步设为默认值?",ZUt=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",JUt=()=>"جعل مزامنة GitHub افتراضية؟",eGt=()=>"¿Activar la sincronización con GitHub de forma predeterminada?",tGt=()=>"GitHub सिंकिंग को डिफ़ॉल्ट बनाएं?",nGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YUt():t==="fa"?ZUt():t==="ar"?JUt():t==="es"?eGt():t==="hi"?tGt():XUt()}),rGt=()=>"Missing bash/tar",sGt=()=>"缺少 bash/tar",iGt=()=>"bash/tar موجود نیست",aGt=()=>"‏bash/tar مفقودان",oGt=()=>"Falta bash/tar",cGt=()=>"bash/tar गुम है",lGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sGt():t==="fa"?iGt():t==="ar"?aGt():t==="es"?oGt():t==="hi"?cGt():rGt()}),uGt=()=>"More compute options",_Gt=()=>"更多算力选项",fGt=()=>"گزینه‌های رایانشی بیشتر",dGt=()=>"خيارات حوسبة إضافية",hGt=()=>"Más opciones de cómputo",pGt=()=>"और कंप्यूट विकल्प",mGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Gt():t==="fa"?fGt():t==="ar"?dGt():t==="es"?hGt():t==="hi"?pGt():uGt()}),gGt=()=>"Move failed:",vGt=()=>"移动失败:",bGt=()=>"انتقال ناموفق بود:",yGt=()=>"فشل النقل:",xGt=()=>"Error al mover:",wGt=()=>"स्थानांतरण विफल:",kGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vGt():t==="fa"?bGt():t==="ar"?yGt():t==="es"?xGt():t==="hi"?wGt():gGt()}),SGt=()=>"Moved. orx is now using the new location.",CGt=()=>"已移动。orx 现在使用新位置。",EGt=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",NGt=()=>"تم النقل. يستخدم orx الآن الموقع الجديد.",zGt=()=>"Movido. orx ya usa la nueva ubicación.",jGt=()=>"स्थानांतरित हो गया। orx अब नए स्थान का उपयोग कर रहा है।",AGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CGt():t==="fa"?EGt():t==="ar"?NGt():t==="es"?zGt():t==="hi"?jGt():SGt()}),TGt=()=>"Namespace",RGt=()=>"命名空间",MGt=()=>"فضای نام",OGt=()=>"مساحة الأسماء",DGt=()=>"Namespace",LGt=()=>"नेमस्पेस",IGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RGt():t==="fa"?MGt():t==="ar"?OGt():t==="es"?DGt():t==="hi"?LGt():TGt()}),$Gt=()=>"New location",BGt=()=>"新位置",PGt=()=>"محل جدید",FGt=()=>"الموقع الجديد",HGt=()=>"Nueva ubicación",qGt=()=>"नया स्थान",UGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BGt():t==="fa"?PGt():t==="ar"?FGt():t==="es"?HGt():t==="hi"?qGt():$Gt()}),GGt=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",VGt=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",KGt=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",WGt=()=>"تُنزَّل الإصدارات الجديدة وتُثبَّت في الخلفية. إيقاف هذا يبقي الإشعار لكنه يترك التثبيت لك.",QGt=()=>"Las nuevas versiones se descargan e instalan en segundo plano. Si lo desactivas, verás el aviso, pero tendrás que instalarlas tú.",XGt=()=>"नए रिलीज़ बैकग्राउंड में डाउनलोड और इंस्टॉल होते हैं। इसे बंद करने पर सूचना बनी रहेगी, पर इंस्टॉल करना आप पर निर्भर होगा।",YGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VGt():t==="fa"?KGt():t==="ar"?WGt():t==="es"?QGt():t==="hi"?XGt():GGt()}),ZGt=()=>"New variable key",JGt=()=>"新变量键名",eVt=()=>"کلید متغیر جدید",tVt=()=>"مفتاح المتغيّر الجديد",nVt=()=>"Nombre de la nueva variable",rVt=()=>"नई वेरिएबल की",sVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JGt():t==="fa"?eVt():t==="ar"?tVt():t==="es"?nVt():t==="hi"?rVt():ZGt()}),iVt=()=>"New variable value",aVt=()=>"新变量值",oVt=()=>"مقدار متغیر جدید",cVt=()=>"قيمة المتغيّر الجديد",lVt=()=>"Valor de la nueva variable",uVt=()=>"नई वेरिएबल वैल्यू",_Vt=((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()}),fVt=()=>"No code, prompts, file contents, or account identifiers are sent.",dVt=()=>"不会发送代码、提示词、文件内容或账户标识符。",hVt=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",pVt=()=>"لا تُرسَل أي شيفرة أو طلبات أو محتويات ملفات أو معرّفات حسابات.",mVt=()=>"No se envía código, prompts, contenido de archivos ni identificadores de cuenta.",gVt=()=>"कोई कोड, प्रॉम्प्ट, फ़ाइल सामग्री, या खाता पहचानकर्ता नहीं भेजे जाते।",vVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dVt():t==="fa"?hVt():t==="ar"?pVt():t==="es"?mVt():t==="hi"?gVt():fVt()}),bVt=()=>"No hosts found in ~/.ssh/config.",yVt=()=>"在 ~/.ssh/config 中未找到主机。",xVt=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",wVt=()=>"لم يُعثر على مضيفين في ‎~/.ssh/config.",kVt=()=>"No se encontraron hosts en ~/.ssh/config.",SVt=()=>"~/.ssh/config में कोई होस्ट नहीं मिला।",CVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yVt():t==="fa"?xVt():t==="ar"?wVt():t==="es"?kVt():t==="hi"?SVt():bVt()}),EVt=()=>"No job-create permission",NVt=()=>"没有创建 Job 的权限",zVt=()=>"مجوز ساخت Job وجود ندارد",jVt=()=>"لا صلاحية لإنشاء المهام",AVt=()=>"Sin permiso para crear jobs",TVt=()=>"जॉब बनाने की अनुमति नहीं",RVt=((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()}),MVt=()=>"No Write Permissions",OVt=()=>"无写入权限",DVt=()=>"بدون مجوز نوشتن",LVt=()=>"لا صلاحيات كتابة",IVt=()=>"Sin permisos de escritura",$Vt=()=>"लिखने की अनुमति नहीं",BVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OVt():t==="fa"?DVt():t==="ar"?LVt():t==="es"?IVt():t==="hi"?$Vt():MVt()}),PVt=()=>"No key on this computer to register — load a registered key with",FVt=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",HVt=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",qVt=()=>"لا مفتاح على هذا الحاسوب لتسجيله — حمّل مفتاحًا مسجّلًا عبر",UVt=()=>"No hay ninguna clave en este equipo para registrar — carga una clave registrada con",GVt=()=>"इस कंप्यूटर पर रजिस्टर करने के लिए कोई की नहीं है — इसके साथ एक रजिस्टर्ड की लोड करें",VVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FVt():t==="fa"?HVt():t==="ar"?qVt():t==="es"?UVt():t==="hi"?GVt():PVt()}),KVt=()=>"No key on this computer yet — create one with",WVt=()=>"此计算机上还没有密钥——使用以下命令创建:",QVt=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",XVt=()=>"لا مفتاح على هذا الحاسوب بعد — أنشئ واحدًا عبر",YVt=()=>"Aún no hay ninguna clave en este equipo — crea una con",ZVt=()=>"इस कंप्यूटर पर अभी तक कोई की नहीं है — इसके साथ एक बनाएं",JVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WVt():t==="fa"?QVt():t==="ar"?XVt():t==="es"?YVt():t==="hi"?ZVt():KVt()}),eKt=()=>"No Slurm CLI",tKt=()=>"无 Slurm CLI",nKt=()=>"بدون CLI اسلورم",rKt=()=>"لا توجد واجهة Slurm لسطر الأوامر",sKt=()=>"Sin CLI de Slurm",iKt=()=>"कोई Slurm CLI नहीं",aKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tKt():t==="fa"?nKt():t==="ar"?rKt():t==="es"?sKt():t==="hi"?iKt():eKt()}),oKt=()=>"None registered",cKt=()=>"未注册任何密钥",lKt=()=>"هیچ‌کدام ثبت نشده",uKt=()=>"لا شيء مسجّل",_Kt=()=>"Ninguna registrada",fKt=()=>"कोई रजिस्टर्ड नहीं",dKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cKt():t==="fa"?lKt():t==="ar"?uKt():t==="es"?_Kt():t==="hi"?fKt():oKt()}),hKt=()=>"Not checked",pKt=()=>"未检查",mKt=()=>"بررسی نشده",gKt=()=>"لم يُفحص",vKt=()=>"Sin comprobar",bKt=()=>"जाँचा नहीं गया",GL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pKt():t==="fa"?mKt():t==="ar"?gKt():t==="es"?vKt():t==="hi"?bKt():hKt()}),yKt=()=>"Not configured",xKt=()=>"未配置",wKt=()=>"پیکربندی نشده",kKt=()=>"غير مُعَد",SKt=()=>"Sin configurar",CKt=()=>"कॉन्फ़िगर नहीं किया गया",Pb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xKt():t==="fa"?wKt():t==="ar"?kKt():t==="es"?SKt():t==="hi"?CKt():yKt()}),EKt=()=>"Not installed",NKt=()=>"未安装",zKt=()=>"نصب نیست",jKt=()=>"غير مثبّت",AKt=()=>"No instalado",TKt=()=>"इंस्टॉल नहीं है",RKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NKt():t==="fa"?zKt():t==="ar"?jKt():t==="es"?AKt():t==="hi"?TKt():EKt()}),MKt=()=>"Not now",OKt=()=>"暂不",DKt=()=>"اکنون نه",LKt=()=>"ليس الآن",IKt=()=>"Ahora no",$Kt=()=>"अभी नहीं",BKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OKt():t==="fa"?DKt():t==="ar"?LKt():t==="es"?IKt():t==="hi"?$Kt():MKt()}),PKt=()=>"Not on this computer",FKt=()=>"不在此计算机上",HKt=()=>"روی این رایانه نیست",qKt=()=>"ليس على هذا الحاسوب",UKt=()=>"No en este equipo",GKt=()=>"इस कंप्यूटर पर नहीं",VKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FKt():t==="fa"?HKt():t==="ar"?qKt():t==="es"?UKt():t==="hi"?GKt():PKt()}),KKt=()=>"Not set (pass --host per launch)",WKt=()=>"未设置(每次启动时传入 --host)",QKt=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",XKt=()=>"غير مضبوط (مرّر ‎--host‎ عند كل تشغيل)",YKt=()=>"Sin definir (pasa --host en cada lanzamiento)",ZKt=()=>"सेट नहीं (हर लॉन्च पर --host दें)",VL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WKt():t==="fa"?QKt():t==="ar"?XKt():t==="es"?YKt():t==="hi"?ZKt():KKt()}),JKt=()=>"Not signed in",eWt=()=>"未登录",tWt=()=>"وارد نشده",nWt=()=>"لم يتم تسجيل الدخول",rWt=()=>"Sin iniciar sesión",sWt=()=>"साइन इन नहीं है",KL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eWt():t==="fa"?tWt():t==="ar"?nWt():t==="es"?rWt():t==="hi"?sWt():JKt()}),iWt=()=>"On this computer",aWt=()=>"在此计算机上",oWt=()=>"روی این رایانه",cWt=()=>"على هذا الحاسوب",lWt=()=>"En este equipo",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=()=>"Open a project to inspect its repository and GitHub publication state.",dWt=()=>"打开项目以查看其仓库和 GitHub 发布状态。",hWt=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",pWt=()=>"افتح مشروعًا لفحص مستودعه وحالة نشره على GitHub.",mWt=()=>"Abre un proyecto para ver su repositorio y su estado de publicación en GitHub.",gWt=()=>"इसकी रिपॉज़िटरी और GitHub प्रकाशन स्थिति देखने के लिए एक प्रोजेक्ट खोलें।",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=()=>"Open job page",yWt=()=>"打开作业页面",xWt=()=>"باز کردن صفحهٔ کار",wWt=()=>"فتح صفحة المهمة",kWt=()=>"Abrir página del job",SWt=()=>"जॉब पेज खोलें",Jz=((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=()=>"Open on GitHub",EWt=()=>"在 GitHub 上打开",NWt=()=>"باز کردن در GitHub",zWt=()=>"فتح على GitHub",jWt=()=>"Abrir en GitHub",AWt=()=>"GitHub पर खोलें",ej=((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=()=>", or create one with",RWt=()=>",或使用以下命令创建:",MWt=()=>"، یا با این فرمان یکی بسازید:",OWt=()=>"، أو أنشئ واحدًا عبر",DWt=()=>", o crea una con",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=()=>"Org",BWt=()=>"组织",PWt=()=>"سازمان",FWt=()=>"المؤسسة",HWt=()=>"Org.",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=()=>"Orgs",VWt=()=>"组织",KWt=()=>"سازمان‌ها",WWt=()=>"المؤسسات",QWt=()=>"Orgs.",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=()=>"orx can't update this install",JWt=()=>"orx 无法更新此安装",eQt=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",tQt=()=>"لا يستطيع orx تحديث هذا التثبيت",nQt=()=>"orx no puede actualizar esta instalación",rQt=()=>"orx इस इंस्टॉल को अपडेट नहीं कर सकता",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=()=>"Overleaf",aQt=()=>"Overleaf",oQt=()=>"Overleaf",cQt=()=>"Overleaf",lQt=()=>"Overleaf",uQt=()=>"Overleaf",WL=((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=()=>"Overleaf Git authentication token",fQt=()=>"Overleaf Git 身份验证令牌",dQt=()=>"توکن احراز هویت Git در Overleaf",hQt=()=>"رمز مصادقة Git لـ Overleaf",pQt=()=>"Token de autenticación de Git de Overleaf",mQt=()=>"Overleaf Git प्रमाणीकरण टोकन",gQt=((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()}),vQt=()=>"Overridden by env",bQt=()=>"已被环境变量覆盖",yQt=()=>"بازنویسی‌شده توسط محیط",xQt=()=>"متجاوَز عبر متغيّر البيئة",wQt=()=>"Sobrescrito por el entorno",kQt=()=>"env द्वारा ओवरराइड किया गया",SQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bQt():t==="fa"?yQt():t==="ar"?xQt():t==="es"?wQt():t==="hi"?kQt():vQt()}),CQt=()=>"Partition",EQt=()=>"分区",NQt=()=>"پارتیشن",zQt=()=>"القسم",jQt=()=>"Partición",AQt=()=>"पार्टीशन",TQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EQt():t==="fa"?NQt():t==="ar"?zQt():t==="es"?jQt():t==="hi"?AQt():CQt()}),RQt=()=>"Path",MQt=()=>"路径",OQt=()=>"مسیر",DQt=()=>"المسار",LQt=()=>"Ruta",IQt=()=>"पथ",$Qt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MQt():t==="fa"?OQt():t==="ar"?DQt():t==="es"?LQt():t==="hi"?IQt():RQt()}),BQt=()=>"Plan",PQt=()=>"方案",FQt=()=>"سطح اشتراک",HQt=()=>"الخطة",qQt=()=>"Plan",UQt=()=>"प्लान",GQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PQt():t==="fa"?FQt():t==="ar"?HQt():t==="es"?qQt():t==="hi"?UQt():BQt()}),VQt=()=>"Project",KQt=()=>"项目",WQt=()=>"پروژه",QQt=()=>"المشروع",XQt=()=>"Proyecto",YQt=()=>"प्रोजेक्ट",ZQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KQt():t==="fa"?WQt():t==="ar"?QQt():t==="es"?XQt():t==="hi"?YQt():VQt()}),JQt=()=>"Ray version",eXt=()=>"Ray 版本",tXt=()=>"نسخهٔ Ray",nXt=()=>"إصدار Ray",rXt=()=>"Versión de Ray",sXt=()=>"Ray वर्शन",iXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eXt():t==="fa"?tXt():t==="ar"?nXt():t==="es"?rXt():t==="hi"?sXt():JQt()}),aXt=()=>"Reachable",oXt=()=>"可访问",cXt=()=>"در دسترس",lXt=()=>"يمكن الوصول إليه",uXt=()=>"Accesible",_Xt=()=>"पहुँच योग्य",fXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oXt():t==="fa"?cXt():t==="ar"?lXt():t==="es"?uXt():t==="hi"?_Xt():aXt()}),dXt=()=>"Reading ~/.ssh/config…",hXt=()=>"正在读取 ~/.ssh/config…",pXt=()=>"در حال خواندن ‎~/.ssh/config…",mXt=()=>"جارٍ قراءة ‎~/.ssh/config…",gXt=()=>"Leyendo ~/.ssh/config…",vXt=()=>"~/.ssh/config पढ़ा जा रहा है…",QL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hXt():t==="fa"?pXt():t==="ar"?mXt():t==="es"?gXt():t==="hi"?vXt():dXt()}),bXt=()=>"Ready",yXt=()=>"就绪",xXt=()=>"آماده",wXt=()=>"جاهز",kXt=()=>"Listo",SXt=()=>"तैयार",Tm=((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=()=>"Ready to move",EXt=()=>"可以移动",NXt=()=>"آمادهٔ انتقال",zXt=()=>"جاهز للنقل",jXt=()=>"Listo para mover",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=()=>"Configured",MXt=()=>"已配置",OXt=()=>"پیکربندی‌شده",DXt=()=>"مُعَد",LXt=()=>"Configurado",IXt=()=>"कॉन्फ़िगर किया गया",Rm=((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=()=>"Refresh",BXt=()=>"刷新",PXt=()=>"تازه‌سازی",FXt=()=>"تحديث",HXt=()=>"Actualizar",qXt=()=>"रीफ़्रेश करें",Mm=((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=()=>"Remotes",GXt=()=>"远程仓库",VXt=()=>"مخزن‌های دوردست",KXt=()=>"المستودعات البعيدة",WXt=()=>"Remotos",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=()=>"Repository",ZXt=()=>"仓库",JXt=()=>"مخزن",eYt=()=>"المستودع",tYt=()=>"Repositorio",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=()=>"Restart to finish updating",iYt=()=>"重新启动以完成更新",aYt=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",oYt=()=>"أعد التشغيل لإكمال التحديث",cYt=()=>"Reinicia para terminar la actualización",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=()=>"Running instances",fYt=()=>"正在运行的实例",dYt=()=>"نمونه‌های در حال اجرا",hYt=()=>"المثيلات قيد التشغيل",pYt=()=>"Instancias en ejecució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=()=>"Runtime",bYt=()=>"运行时间",yYt=()=>"زمان اجرا",xYt=()=>"مدة التشغيل",wYt=()=>"Runtime",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=()=>". Save it under that key if it's meant for HF Jobs.",EYt=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",NYt=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",zYt=()=>"‏. احفظه تحت ذلك المفتاح إن كان مخصصًا لمهام HF.",jYt=()=>". Guárdalo con ese nombre si es para HF Jobs.",AYt=()=>"। यदि यह HF Jobs के लिए है तो इसे उस की के तहत सेव करें।",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=()=>"Session cookie",MYt=()=>"会话 cookie",OYt=()=>"کوکی نشست",DYt=()=>"ملف تعريف ارتباط الجلسة",LYt=()=>"Cookie de sesió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=()=>"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.",PYt=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",FYt=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",HYt=()=>"مع حفظ ملف تعريف ارتباط الجلسة، تتابع الورقة المرتبطة Overleaf أثناء كتابة الآخرين وترسل عمليات الحفظ مباشرةً. لا تزال الأشكال تُنقَل عبر مزامنة Git الأبطأ. انسخ ملف تعريف الارتباط overleaf_session2 من متصفح مسجّل الدخول إلى Overleaf؛ ويتوقف عن العمل عند انتهاء ذلك الدخول.",qYt=()=>"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.",UYt=()=>"सेशन कुकी सेव होने पर, एक लिंक किया गया पेपर लोगों के टाइप करते ही Overleaf को फ़ॉलो करता है और सेव सीधे वापस भेजता है। फ़िगर अभी भी धीमे Git सिंक पर चलती हैं। Overleaf में साइन इन ब्राउज़र से overleaf_session2 कुकी कॉपी करें; वह साइन-इन खत्म होने पर काम करना बंद कर देती है।",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=()=>"Settings",KYt=()=>"设置",WYt=()=>"تنظیمات",QYt=()=>"الإعدادات",XYt=()=>"Configuración",YYt=()=>"सेटिंग्स",SS=((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()}),ZYt=()=>"Signed in",JYt=()=>"已登录",eZt=()=>"وارد شده",tZt=()=>"تم تسجيل الدخول",nZt=()=>"Sesión iniciada",rZt=()=>"साइन इन है",sZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JYt():t==="fa"?eZt():t==="ar"?tZt():t==="es"?nZt():t==="hi"?rZt():ZYt()}),iZt=()=>"Source",aZt=()=>"来源",oZt=()=>"منبع",cZt=()=>"المصدر",lZt=()=>"Origen",uZt=()=>"स्रोत",XL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aZt():t==="fa"?oZt():t==="ar"?cZt():t==="es"?lZt():t==="hi"?uZt():iZt()}),_Zt=()=>"SSH Key",fZt=()=>"SSH 密钥",dZt=()=>"کلید SSH",hZt=()=>"مفتاح SSH",pZt=()=>"Clave SSH",mZt=()=>"SSH की",gZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fZt():t==="fa"?dZt():t==="ar"?hZt():t==="es"?pZt():t==="hi"?mZt():_Zt()}),vZt=()=>"Started",bZt=()=>"开始时间",yZt=()=>"آغاز",xZt=()=>"بدأ",wZt=()=>"Inicio",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=()=>"State",EZt=()=>"状态",NZt=()=>"وضعیت",zZt=()=>"الحالة",jZt=()=>"Estado",AZt=()=>"स्थिति",TZt=((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()}),RZt=()=>"Status",MZt=()=>"状态",OZt=()=>"وضعیت",DZt=()=>"الحالة",LZt=()=>"Estado",IZt=()=>"स्थिति",Wh=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MZt():t==="fa"?OZt():t==="ar"?DZt():t==="es"?LZt():t==="hi"?IZt():RZt()}),$Zt=()=>"Storage",BZt=()=>"存储",PZt=()=>"ذخیره‌سازی",FZt=()=>"التخزين",HZt=()=>"Almacenamiento",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=()=>"Sync",VZt=()=>"同步",KZt=()=>"همگام‌سازی",WZt=()=>"مزامنة",QZt=()=>"Sincronización",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=()=>"Syncing off",JZt=()=>"同步已关闭",eJt=()=>"همگام‌سازی خاموش",tJt=()=>"المزامنة معطّلة",nJt=()=>"Sincronización desactivada",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=()=>"Test connection",aJt=()=>"测试连接",oJt=()=>"آزمایش اتصال",cJt=()=>"اختبار الاتصال",lJt=()=>"Probar conexión",uJt=()=>"कनेक्शन जाँचें",_Jt=((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()}),fJt=()=>"Testing…",dJt=()=>"正在测试…",hJt=()=>"در حال آزمایش…",pJt=()=>"جارٍ الاختبار…",mJt=()=>"Probando…",gJt=()=>"जाँचा जा रहा है…",vJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dJt():t==="fa"?hJt():t==="ar"?pJt():t==="es"?mJt():t==="hi"?gJt():fJt()}),bJt=()=>", then add it with",yJt=()=>",然后使用以下命令添加:",xJt=()=>"، سپس با این فرمان اضافه‌اش کنید:",wJt=()=>"، ثم أضِفه عبر",kJt=()=>" y luego añádela con",SJt=()=>", फिर इसे इसके साथ जोड़ें",CJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yJt():t==="fa"?xJt():t==="ar"?wJt():t==="es"?kJt():t==="hi"?SJt():bJt()}),EJt=()=>"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.",NJt=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",zJt=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",jJt=()=>"هذا مفيد عندما يتابع المتعاونون تغييرات المشروع على GitHub. ستفعّل المشاريع الجديدة المزامنة تلقائيًا، مع إنشاء مستودع خاص عند الحاجة ورفع فروع التجارب لإتاحة الاطلاع عليها.",AJt=()=>"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.",TJt=()=>"यह तब उपयोगी है जब सहयोगी GitHub पर प्रोजेक्ट के बदलावों को फ़ॉलो करते हों। नए प्रोजेक्ट में सिंकिंग अपने आप चालू हो जाएगी, ज़रूरत पड़ने पर एक निजी रिपॉज़िटरी बनेगी और प्रयोग ब्रांच दृश्यता के लिए पुश की जाएंगी।",RJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NJt():t==="fa"?zJt():t==="ar"?jJt():t==="es"?AJt():t==="hi"?TJt():EJt()}),MJt=()=>"This saved destination is not configured. Set it up below or choose another backend.",OJt=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",DJt=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",LJt=()=>"هذه الوجهة المحفوظة غير مُعدّة. أعِدّها أدناه أو اختر بيئة تنفيذ أخرى.",IJt=()=>"Este destino guardado no está configurado. Configúralo abajo o elige otro backend.",$Jt=()=>"यह सेव किया गया गंतव्य कॉन्फ़िगर नहीं है। इसे नीचे सेट अप करें या कोई और बैकएंड चुनें।",BJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OJt():t==="fa"?DJt():t==="ar"?LJt():t==="es"?IJt():t==="hi"?$Jt():MJt()}),PJt=()=>"This value looks like a Hugging Face token — compute runs only read it from",FJt=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",HJt=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",qJt=()=>"تبدو هذه القيمة كرمز Hugging Face — لا تقرؤه عمليات التشغيل الحوسبية إلا من",UJt=()=>"Este valor parece un token de Hugging Face — las ejecuciones de cómputo solo lo leen de",GJt=()=>"यह वैल्यू एक Hugging Face टोकन जैसी लगती है — कंप्यूट रन इसे केवल यहाँ से पढ़ते हैं",VJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FJt():t==="fa"?HJt():t==="ar"?qJt():t==="es"?UJt():t==="hi"?GJt():PJt()}),KJt=()=>"Time limit",WJt=()=>"时间限制",QJt=()=>"محدودیت زمانی",XJt=()=>"الحد الزمني",YJt=()=>"Límite de tiempo",ZJt=()=>"समय सीमा",JJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WJt():t==="fa"?QJt():t==="ar"?XJt():t==="es"?YJt():t==="hi"?ZJt():KJt()}),een=()=>"Unable to verify",ten=()=>"无法验证",nen=()=>"تأیید ممکن نیست",ren=()=>"تعذّر التحقق",sen=()=>"No se pudo verificar",ien=()=>"सत्यापित नहीं हो सका",$v=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ten():t==="fa"?nen():t==="ar"?ren():t==="es"?sen():t==="hi"?ien():een()}),aen=()=>"Unknown",oen=()=>"未知",cen=()=>"نامشخص",len=()=>"غير معروف",uen=()=>"Desconocido",_en=()=>"अज्ञात",YL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oen():t==="fa"?cen():t==="ar"?len():t==="es"?uen():t==="hi"?_en():aen()}),fen=()=>"Update required",den=()=>"需要更新",hen=()=>"نیازمند به‌روزرسانی",pen=()=>"مطلوب تحديث",men=()=>"Actualización necesaria",gen=()=>"अपडेट ज़रूरी है",ven=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?den():t==="fa"?hen():t==="ar"?pen():t==="es"?men():t==="hi"?gen():fen()}),ben=()=>"Updates",yen=()=>"更新",xen=()=>"به‌روزرسانی‌ها",wen=()=>"التحديثات",ken=()=>"Actualizaciones",Sen=()=>"अपडेट",tj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yen():t==="fa"?xen():t==="ar"?wen():t==="es"?ken():t==="hi"?Sen():ben()}),Cen=()=>"Usage analytics",Een=()=>"使用情况分析",Nen=()=>"تحلیل استفاده",zen=()=>"تحليلات الاستخدام",jen=()=>"Estadísticas de uso",Aen=()=>"उपयोग एनालिटिक्स",Ten=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Een():t==="fa"?Nen():t==="ar"?zen():t==="es"?jen():t==="hi"?Aen():Cen()}),Ren=()=>"value",Men=()=>"值",Oen=()=>"مقدار",Den=()=>"القيمة",Len=()=>"valor",Ien=()=>"वैल्यू",ZL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Men():t==="fa"?Oen():t==="ar"?Den():t==="es"?Len():t==="hi"?Ien():Ren()}),$en=()=>"Variables available to runs and the research agent (API keys, tokens).",Ben=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",Pen=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",Fen=()=>"متغيّرات متاحة لعمليات التشغيل ولوكيل البحث (مفاتيح API والرموز).",Hen=()=>"Variables disponibles para las ejecuciones y el agente de investigación (claves de API, tokens).",qen=()=>"रन और शोध एजेंट के लिए उपलब्ध वेरिएबल (API की, टोकन)।",Uen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ben():t==="fa"?Pen():t==="ar"?Fen():t==="es"?Hen():t==="hi"?qen():$en()}),Gen=()=>"Version",Ven=()=>"版本",Ken=()=>"نسخه",Wen=()=>"الإصدار",Qen=()=>"Versión",Xen=()=>"वर्शन",JL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ven():t==="fa"?Ken():t==="ar"?Wen():t==="es"?Qen():t==="hi"?Xen():Gen()}),Yen=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",Zen=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",Jen=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",etn=()=>"عند التفعيل، يحصل كل مشروع جديد على مستودع GitHub خاص. تُرفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون. تستخدم الحوسبة دائمًا لقطات المصدر المباشرة.",ttn=()=>"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.",ntn=()=>"चालू होने पर, हर नए प्रोजेक्ट को एक निजी GitHub रिपॉज़िटरी मिलती है। सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश होती हैं। कंप्यूट हमेशा सीधे सोर्स स्नैपशॉट का उपयोग करता है।",rtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zen():t==="fa"?Jen():t==="ar"?etn():t==="es"?ttn():t==="hi"?ntn():Yen()}),stn=()=>"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.",itn=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",atn=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",otn=()=>"مع حفظ رمز، يمكن إبقاء ورقة مفتوحة في لوحة التحكم متزامنة مع مشروع Overleaf في الاتجاهين. يأتي تكامل Git في Overleaf مع خطة Overleaf مدفوعة؛ وبدونها لا يزال بالإمكان رفع ورقة إلى Overleaf كمشروع جديد. يبقى الرمز على هذا الجهاز ولا يُرسَل إلى بيئات التنفيذ.",ctn=()=>"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.",ltn=()=>"टोकन सेव होने पर, डैशबोर्ड में खुला कोई पेपर दोनों दिशाओं में Overleaf प्रोजेक्ट के साथ मेल खाता रहता है। Overleaf का Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है; उसके बिना, एक पेपर को अब भी नए प्रोजेक्ट के रूप में Overleaf पर अपलोड किया जा सकता है। टोकन इसी मशीन पर रहता है और कंप्यूट बैकएंड को नहीं भेजा जाता।",utn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?itn():t==="fa"?atn():t==="ar"?otn():t==="es"?ctn():t==="hi"?ltn():stn()}),_tn=()=>"Pick a login node first",ftn=()=>"请先选择登录节点",dtn=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",htn=()=>"اختر عقدة دخول أولًا",ptn=()=>"Elige primero un nodo de acceso",mtn=()=>"पहले एक लॉगिन नोड चुनें",gtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ftn():t==="fa"?dtn():t==="ar"?htn():t==="es"?ptn():t==="hi"?mtn():_tn()}),vtn=()=>"Providers",btn=()=>"提供商",ytn=()=>"ارائه‌دهندگان",xtn=()=>"المزوّدون",wtn=()=>"Proveedores",ktn=()=>"प्रोवाइडर",eI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?btn():t==="fa"?ytn():t==="ar"?xtn():t==="es"?wtn():t==="hi"?ktn():vtn()}),Stn=()=>"Reconnect",Ctn=()=>"重新连接",Etn=()=>"اتصال دوباره",Ntn=()=>"إعادة الاتصال",ztn=()=>"Reconectar",jtn=()=>"फिर से कनेक्ट करें",tI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ctn():t==="fa"?Etn():t==="ar"?Ntn():t==="es"?ztn():t==="hi"?jtn():Stn()}),Atn=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,Ttn=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,Rtn=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,Mtn=e=>`سجّل هذا الحاسوب عبر ${e==null?void 0:e.register}، أو حمّل مفتاحًا مسجّلًا عبر ${e==null?void 0:e.load}.`,Otn=e=>`Registra este equipo con ${e==null?void 0:e.register} o carga una clave registrada con ${e==null?void 0:e.load}.`,Dtn=e=>`इस कंप्यूटर को ${e==null?void 0:e.register} से रजिस्टर करें, या ${e==null?void 0:e.load} से एक रजिस्टर्ड की लोड करें।`,Ltn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ttn(e):t==="fa"?Rtn(e):t==="ar"?Mtn(e):t==="es"?Otn(e):t==="hi"?Dtn(e):Atn(e)}),Itn=()=>"Reinstall with the orx installer to get automatic updates.",$tn=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",Btn=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",Ptn=()=>"أعد التثبيت عبر مُثبّت orx للحصول على التحديثات التلقائية.",Ftn=()=>"Reinstala con el instalador de orx para recibir actualizaciones automáticas.",Htn=()=>"ऑटोमैटिक अपडेट पाने के लिए orx इंस्टॉलर से फिर से इंस्टॉल करें।",qtn=((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()}),Utn=()=>"Release notes",Gtn=()=>"版本说明",Vtn=()=>"یادداشت‌های انتشار",Ktn=()=>"ملاحظات الإصدار",Wtn=()=>"Notas de la versión",Qtn=()=>"रिलीज़ नोट्स",nI=((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()}),Xtn=()=>"Re-link",Ytn=()=>"重新链接",Ztn=()=>"پیوند دوباره",Jtn=()=>"إعادة الربط",enn=()=>"Volver a enlazar",tnn=()=>"फिर से लिंक करें",nnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ytn():t==="fa"?Ztn():t==="ar"?Jtn():t==="es"?enn():t==="hi"?tnn():Xtn()}),rnn=()=>"Remove cookie",snn=()=>"移除 cookie",inn=()=>"حذف کوکی",ann=()=>"إزالة ملف تعريف الارتباط",onn=()=>"Quitar cookie",cnn=()=>"कुकी हटाएं",lnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?snn():t==="fa"?inn():t==="ar"?ann():t==="es"?onn():t==="hi"?cnn():rnn()}),unn=()=>"Remove token",_nn=()=>"移除令牌",fnn=()=>"حذف توکن",dnn=()=>"إزالة الرمز",hnn=()=>"Quitar token",pnn=()=>"टोकन हटाएं",mnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_nn():t==="fa"?fnn():t==="ar"?dnn():t==="es"?hnn():t==="hi"?pnn():unn()}),gnn=()=>"Removing…",vnn=()=>"正在移除…",bnn=()=>"در حال حذف…",ynn=()=>"جارٍ الإزالة…",xnn=()=>"Quitando…",wnn=()=>"हटाया जा रहा है…",nj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vnn():t==="fa"?bnn():t==="ar"?ynn():t==="es"?xnn():t==="hi"?wnn():gnn()}),knn=()=>"Replace anyway",Snn=()=>"仍要替换",Cnn=()=>"به‌هرحال جایگزین کن",Enn=()=>"الاستبدال على أي حال",Nnn=()=>"Reemplazar de todos modos",znn=()=>"फिर भी बदलें",jnn=((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()}),Ann=()=>"Replace key",Tnn=()=>"替换密钥",Rnn=()=>"جایگزینی کلید",Mnn=()=>"استبدال المفتاح",Onn=()=>"Reemplazar clave",Dnn=()=>"की बदलें",Lnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tnn():t==="fa"?Rnn():t==="ar"?Mnn():t==="es"?Onn():t==="hi"?Dnn():Ann()}),Inn=()=>"Replace token",$nn=()=>"替换令牌",Bnn=()=>"جایگزینی توکن",Pnn=()=>"استبدال الرمز",Fnn=()=>"Reemplazar token",Hnn=()=>"टोकन बदलें",qnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$nn():t==="fa"?Bnn():t==="ar"?Pnn():t==="es"?Fnn():t==="hi"?Hnn():Inn()}),Unn=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,Gnn=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,Vnn=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,Knn=e=>`إعدادات Git وGitHub لـ ${e==null?void 0:e.project}. تعتمد التجارب على Git المحلي؛ والنشر اختياري.`,Wnn=e=>`Configuración de Git y GitHub de ${e==null?void 0:e.project}. Git local hace posibles los experimentos; publicar es opcional.`,Qnn=e=>`${e==null?void 0:e.project} के लिए Git और GitHub सेटिंग्स। लोकल Git प्रयोगों को चलाता है; प्रकाशन वैकल्पिक है।`,Xnn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gnn(e):t==="fa"?Vnn(e):t==="ar"?Knn(e):t==="es"?Wnn(e):t==="hi"?Qnn(e):Unn(e)}),Ynn=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,Znn=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,Jnn=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,ern=e=>`الإصدار ${e==null?void 0:e.installed} مثبّت. لا تزال هذه النافذة تعمل بالإصدار ${e==null?void 0:e.current}.`,trn=e=>`La versión ${e==null?void 0:e.installed} está instalada. Esta ventana sigue ejecutando la ${e==null?void 0:e.current}.`,nrn=e=>`वर्शन ${e==null?void 0:e.installed} इंस्टॉल है। यह विंडो अभी भी ${e==null?void 0:e.current} चला रही है।`,rrn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Znn(e):t==="fa"?Jnn(e):t==="ar"?ern(e):t==="es"?trn(e):t==="hi"?nrn(e):Ynn(e)}),srn=()=>"Run `gh auth login` in your terminal.",irn=()=>"请在终端中运行 `gh auth login`。",arn=()=>"در پایانه `gh auth login` را اجرا کنید.",orn=()=>"نفّذ `gh auth login` في طرفيتك.",crn=()=>"Ejecuta `gh auth login` en tu terminal.",lrn=()=>"अपने टर्मिनल में `gh auth login` चलाएं।",urn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?irn():t==="fa"?arn():t==="ar"?orn():t==="es"?crn():t==="hi"?lrn():srn()}),_rn=()=>"Saved",frn=()=>"已保存",drn=()=>"ذخیره شده",hrn=()=>"تم الحفظ",prn=()=>"Guardado",mrn=()=>"सेव हो गया",rj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?frn():t==="fa"?drn():t==="ar"?hrn():t==="es"?prn():t==="hi"?mrn():_rn()}),grn=()=>"Set up",vrn=()=>"设置",brn=()=>"راه‌اندازی",yrn=()=>"إعداد",xrn=()=>"Configurar",wrn=()=>"सेट अप करें",krn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vrn():t==="fa"?brn():t==="ar"?yrn():t==="es"?xrn():t==="hi"?wrn():grn()}),Srn=()=>"Set up SSH key",Crn=()=>"设置 SSH 密钥",Ern=()=>"راه‌اندازی کلید SSH",Nrn=()=>"إعداد مفتاح SSH",zrn=()=>"Configurar clave SSH",jrn=()=>"SSH की सेट अप करें",Arn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Crn():t==="fa"?Ern():t==="ar"?Nrn():t==="es"?zrn():t==="hi"?jrn():Srn()}),Trn=()=>"Sign in",Rrn=()=>"登录",Mrn=()=>"ورود",Orn=()=>"تسجيل الدخول",Drn=()=>"Iniciar sesión",Lrn=()=>"साइन इन करें",rI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rrn():t==="fa"?Mrn():t==="ar"?Orn():t==="es"?Drn():t==="hi"?Lrn():Trn()}),Irn=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,$rn=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,Brn=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,Prn=e=>`طرفية اتصال SSH لـ ${e==null?void 0:e.host}`,Frn=e=>`Terminal de conexión SSH para ${e==null?void 0:e.host}`,Hrn=e=>`${e==null?void 0:e.host} के लिए SSH कनेक्शन टर्मिनल`,sI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$rn(e):t==="fa"?Brn(e):t==="ar"?Prn(e):t==="es"?Frn(e):t==="hi"?Hrn(e):Irn(e)}),qrn=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",Urn=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",Grn=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",Vrn=()=>"قاعدة البيانات المحلية وسجلات التشغيل والمُخرَجات ومرفقات المحادثة. نقل هذا الدليل ينسخ المخزن بالكامل.",Krn=()=>"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.",Wrn=()=>"लोकल डेटाबेस, रन लॉग, आर्टिफ़ैक्ट और चैट अटैचमेंट। इस डायरेक्टरी को स्थानांतरित करने पर पूरा स्टोर कॉपी होता है।",Qrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Urn():t==="fa"?Grn():t==="ar"?Vrn():t==="es"?Krn():t==="hi"?Wrn():qrn()}),Xrn=()=>"The terminal disconnected before setup completed. Try again.",Yrn=()=>"设置完成前终端连接已断开。请重试。",Zrn=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",Jrn=()=>"انقطعت الطرفية قبل اكتمال الإعداد. حاول مجددًا.",esn=()=>"La terminal se desconectó antes de completar la configuración. Inténtalo de nuevo.",tsn=()=>"सेटअप पूरा होने से पहले टर्मिनल डिस्कनेक्ट हो गया। फिर से कोशिश करें।",Bv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yrn():t==="fa"?Zrn():t==="ar"?Jrn():t==="es"?esn():t==="hi"?tsn():Xrn()}),nsn=()=>"Dark",rsn=()=>"深色",ssn=()=>"تیره",isn=()=>"داكن",asn=()=>"Oscuro",osn=()=>"डार्क",csn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rsn():t==="fa"?ssn():t==="ar"?isn():t==="es"?asn():t==="hi"?osn():nsn()}),lsn=()=>"Theme",usn=()=>"主题",_sn=()=>"پوسته",fsn=()=>"السمة",dsn=()=>"Tema",hsn=()=>"थीम",sj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?usn():t==="fa"?_sn():t==="ar"?fsn():t==="es"?dsn():t==="hi"?hsn():lsn()}),psn=()=>"Light",msn=()=>"浅色",gsn=()=>"روشن",vsn=()=>"فاتح",bsn=()=>"Claro",ysn=()=>"लाइट",xsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?msn():t==="fa"?gsn():t==="ar"?vsn():t==="es"?bsn():t==="hi"?ysn():psn()}),wsn=()=>"System",ksn=()=>"系统",Ssn=()=>"سیستم",Csn=()=>"النظام",Esn=()=>"Sistema",Nsn=()=>"सिस्टम",zsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ksn():t==="fa"?Ssn():t==="ar"?Csn():t==="es"?Esn():t==="hi"?Nsn():wsn()}),jsn=()=>"Set up billing in the Tinker console",Asn=()=>"在 Tinker 控制台设置账单",Tsn=()=>"تنظیم پرداخت در کنسول Tinker",Rsn=()=>"أعِدّ الفوترة في وحدة تحكم Tinker",Msn=()=>"Configura la facturación en la consola de Tinker",Osn=()=>"Tinker कंसोल में बिलिंग सेट अप करें",Dsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Asn():t==="fa"?Tsn():t==="ar"?Rsn():t==="es"?Msn():t==="hi"?Osn():jsn()}),Lsn=()=>"Billing setup required",Isn=()=>"需要设置账单",$sn=()=>"تنظیم پرداخت لازم است",Bsn=()=>"مطلوب إعداد الفوترة",Psn=()=>"Hay que configurar la facturación",Fsn=()=>"बिलिंग सेटअप ज़रूरी है",Hsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Isn():t==="fa"?$sn():t==="ar"?Bsn():t==="es"?Psn():t==="hi"?Fsn():Lsn()}),qsn=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",Usn=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",Gsn=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",Vsn=()=>"‏TINKER_API_KEY مضبوط في بيئة العملية ويتجاوز المفاتيح المحفوظة هنا. تعكس الحالة ذلك المفتاح.",Ksn=()=>"TINKER_API_KEY está definida en el entorno del proceso y tiene prioridad sobre las claves guardadas aquí. El estado corresponde a esa clave.",Wsn=()=>"TINKER_API_KEY प्रोसेस एनवायरनमेंट में सेट है और यहाँ सेव की को ओवरराइड करता है। स्थिति उसी की को दर्शाती है।",Qsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Usn():t==="fa"?Gsn():t==="ar"?Vsn():t==="es"?Ksn():t==="hi"?Wsn():qsn()}),Xsn=()=>"Invalid Key",Ysn=()=>"密钥无效",Zsn=()=>"کلید نامعتبر",Jsn=()=>"مفتاح غير صالح",ein=()=>"Clave no válida",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=()=>"Token from",sin=()=>"令牌来自",iin=()=>"توکن از",ain=()=>"الرمز من",oin=()=>"Token tomado de la",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=()=>"Update now",_in=()=>"立即更新",fin=()=>"اکنون به‌روزرسانی کن",din=()=>"التحديث الآن",hin=()=>"Actualizar ahora",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=e=>`Update to ${e==null?void 0:e.version}`,vin=e=>`更新到 ${e==null?void 0:e.version}`,bin=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,yin=e=>`التحديث إلى ${e==null?void 0:e.version}`,xin=e=>`Actualizar a ${e==null?void 0:e.version}`,win=e=>`वर्शन ${e==null?void 0:e.version} पर अपडेट करें`,kin=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vin(e):t==="fa"?bin(e):t==="ar"?yin(e):t==="es"?xin(e):t==="hi"?win(e):gin(e)}),Sin=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",Cin=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",Ein=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",Nin=()=>" التحديثات معطّلة لهذه البيئة عبر ORX_NO_UPDATE_CHECK، لذا ليس لهذا الإعداد أثر.",zin=()=>" ORX_NO_UPDATE_CHECK desactiva las actualizaciones en este entorno, así que este ajuste no tiene efecto.",jin=()=>" इस एनवायरनमेंट के लिए ORX_NO_UPDATE_CHECK द्वारा अपडेट बंद कर दिए गए हैं, इसलिए इस सेटिंग का कोई असर नहीं है।",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=()=>"Updating default destination…",Rin=()=>"正在更新默认运行位置…",Min=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",Oin=()=>"جارٍ تحديث الوجهة الافتراضية…",Din=()=>"Actualizando el destino predeterminado…",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=()=>"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.",Bin=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",Pin=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",Fin=()=>"استخدم هذا المستودع لرفع فروع التجارب تلقائيًا عندما يملك حسابك المتصل صلاحية الكتابة فيه. وإلا، ينشئ OpenResearch مستودعًا خاصًا منفصلًا للتعاون.",Hin=()=>"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.",qin=()=>"जब आपका कनेक्टेड खाता इसमें लिख सकता है तो ऑटोमैटिक प्रयोग-ब्रांच पुश के लिए इस रिपॉज़िटरी का इस्तेमाल करें। नहीं तो, OpenResearch सहयोग के लिए एक अलग निजी रिपॉज़िटरी बनाता है।",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=()=>"Validating…",Vin=()=>"正在验证…",Kin=()=>"در حال اعتبارسنجی…",Win=()=>"جارٍ التحقق…",Qin=()=>"Validando…",Xin=()=>"सत्यापित हो रहा है…",iI=((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()}),Yin=()=>"View settings",Zin=()=>"查看设置",Jin=()=>"مشاهدهٔ تنظیمات",ean=()=>"عرض الإعدادات",tan=()=>"Ver configuración",nan=()=>"सेटिंग्स देखें",ran=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zin():t==="fa"?Jin():t==="ar"?ean():t==="es"?tan():t==="hi"?nan():Yin()}),san=e=>`Couldn't delete the side chat: ${e==null?void 0:e.error}`,ian=e=>`无法删除侧边对话:${e==null?void 0:e.error}`,aan=e=>`حذف گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,oan=e=>`تعذّر حذف المحادثة الجانبية: ${e==null?void 0:e.error}`,can=e=>`No se pudo eliminar el chat lateral: ${e==null?void 0:e.error}`,lan=e=>`साइड चैट हटाई नहीं जा सकी: ${e==null?void 0:e.error}`,ij=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ian(e):t==="fa"?aan(e):t==="ar"?oan(e):t==="es"?can(e):t==="hi"?lan(e):san(e)}),uan=()=>"Side chats are deleted when you close them or quit the app.",_an=()=>"关闭侧边对话或退出应用后,侧边对话会被删除。",fan=()=>"گفت‌وگوهای جانبی با بستن آن‌ها یا خروج از برنامه حذف می‌شوند.",dan=()=>"تُحذف المحادثات الجانبية عند إغلاقها أو الخروج من التطبيق.",han=()=>"Los chats laterales se eliminan cuando los cierras o sales de la app.",pan=()=>"साइड चैट उन्हें बंद करने या ऐप से बाहर निकलने पर हटा दी जाती हैं।",man=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_an():t==="fa"?fan():t==="ar"?dan():t==="es"?han():t==="hi"?pan():uan()}),gan=()=>"Open a chat first, then start a side chat from it.",van=()=>"请先打开一个对话,再从中开启侧边对话。",ban=()=>"ابتدا یک گفت‌وگو باز کنید، سپس از آن گفت‌وگوی جانبی شروع کنید.",yan=()=>"افتح محادثة أولًا، ثم ابدأ منها محادثة جانبية.",xan=()=>"Abre primero un chat y luego inicia un chat lateral desde él.",wan=()=>"पहले कोई चैट खोलें, फिर उससे साइड चैट शुरू करें।",kan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?van():t==="fa"?ban():t==="ar"?yan():t==="es"?xan():t==="hi"?wan():gan()}),San=()=>"A side chat can't open its own side chat.",Can=()=>"侧边对话不能再开启自己的侧边对话。",Ean=()=>"گفت‌وگوی جانبی نمی‌تواند گفت‌وگوی جانبی خودش را باز کند.",Nan=()=>"لا يمكن للمحادثة الجانبية فتح محادثة جانبية خاصة بها.",zan=()=>"Un chat lateral no puede abrir su propio chat lateral.",jan=()=>"साइड चैट अपनी खुद की साइड चैट नहीं खोल सकती।",Aan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Can():t==="fa"?Ean():t==="ar"?Nan():t==="es"?zan():t==="hi"?jan():San()}),Tan=()=>"Side chat",Ran=()=>"侧边对话",Man=()=>"گفت‌وگوی جانبی",Oan=()=>"محادثة جانبية",Dan=()=>"Chat lateral",Lan=()=>"साइड चैट",D3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ran():t==="fa"?Man():t==="ar"?Oan():t==="es"?Dan():t==="hi"?Lan():Tan()}),Ian=e=>`Couldn't open a side chat: ${e==null?void 0:e.error}`,$an=e=>`无法打开侧边对话:${e==null?void 0:e.error}`,Ban=e=>`باز کردن گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,Pan=e=>`تعذّر فتح محادثة جانبية: ${e==null?void 0:e.error}`,Fan=e=>`No se pudo abrir un chat lateral: ${e==null?void 0:e.error}`,Han=e=>`साइड चैट नहीं खुल सकी: ${e==null?void 0:e.error}`,qan=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$an(e):t==="fa"?Ban(e):t==="ar"?Pan(e):t==="es"?Fan(e):t==="hi"?Han(e):Ian(e)}),Uan=()=>"Ask a quick question in a temporary side chat",Gan=()=>"在临时侧边对话中快速提问",Van=()=>"یک پرسش کوتاه را در گفت‌وگوی جانبی موقت بپرسید",Kan=()=>"اطرح سؤالًا سريعًا في محادثة جانبية مؤقتة",Wan=()=>"Haz una pregunta rápida en un chat lateral temporal",Qan=()=>"अस्थायी साइड चैट में एक छोटा सवाल पूछें",Xan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gan():t==="fa"?Van():t==="ar"?Kan():t==="es"?Wan():t==="hi"?Qan():Uan()}),Yan=()=>"Skill",Zan=()=>"技能",Jan=()=>"مهارت",eon=()=>"مهارة",ton=()=>"Skill",non=()=>"स्किल",ron=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zan():t==="fa"?Jan():t==="ar"?eon():t==="es"?ton():t==="hi"?non():Yan()}),son=()=>"Loading skill…",ion=()=>"正在加载技能…",aon=()=>"در حال بارگیری مهارت…",oon=()=>"جارٍ تحميل المهارة…",con=()=>"Cargando skill…",lon=()=>"स्किल लोड हो रही है…",uon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ion():t==="fa"?aon():t==="ar"?oon():t==="es"?con():t==="hi"?lon():son()}),_on=()=>"Personal",fon=()=>"个人",don=()=>"شخصی",hon=()=>"شخصي",pon=()=>"Personal",mon=()=>"व्यक्तिगत",gon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fon():t==="fa"?don():t==="ar"?hon():t==="es"?pon():t==="hi"?mon():_on()}),von=()=>"Alternatively, tell your agent to save a reusable skill for you.",bon=()=>"或者,请你的智能体为你保存可重复使用的技能。",yon=()=>"یا از عامل خود بخواهید یک مهارت قابل استفادهٔ مجدد برایتان ذخیره کند.",xon=()=>"أو بدلًا من ذلك، اطلب من وكيلك حفظ مهارة قابلة لإعادة الاستخدام لك.",won=()=>"También puedes pedirle a tu agente que guarde una skill reutilizable por ti.",kon=()=>"या अपने एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल सेव करने को कहें।",Son=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bon():t==="fa"?yon():t==="ar"?xon():t==="es"?won():t==="hi"?kon():von()}),Con=e=>`Delete the “${e==null?void 0:e.name}” skill?`,Eon=e=>`删除技能“${e==null?void 0:e.name}”?`,Non=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,zon=e=>`حذف مهارة «${e==null?void 0:e.name}»؟`,jon=e=>`¿Eliminar la skill “${e==null?void 0:e.name}”?`,Aon=e=>`“${e==null?void 0:e.name}” स्किल हटाएं?`,Ton=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Eon(e):t==="fa"?Non(e):t==="ar"?zon(e):t==="es"?jon(e):t==="hi"?Aon(e):Con(e)}),Ron=e=>`Delete skill ${e==null?void 0:e.name}`,Mon=e=>`删除技能 ${e==null?void 0:e.name}`,Oon=e=>`حذف مهارت ${e==null?void 0:e.name}`,Don=e=>`حذف المهارة ${e==null?void 0:e.name}`,Lon=e=>`Eliminar la skill ${e==null?void 0:e.name}`,Ion=e=>`${e==null?void 0:e.name} स्किल हटाएं`,$on=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Mon(e):t==="fa"?Oon(e):t==="ar"?Don(e):t==="es"?Lon(e):t==="hi"?Ion(e):Ron(e)}),Bon=e=>`Delete the “${e==null?void 0:e.name}” template?`,Pon=e=>`删除模板“${e==null?void 0:e.name}”?`,Fon=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,Hon=e=>`حذف قالب «${e==null?void 0:e.name}»؟`,qon=e=>`¿Eliminar la plantilla “${e==null?void 0:e.name}”?`,Uon=e=>`“${e==null?void 0:e.name}” टेम्पलेट हटाएं?`,Gon=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Pon(e):t==="fa"?Fon(e):t==="ar"?Hon(e):t==="es"?qon(e):t==="hi"?Uon(e):Bon(e)}),Von=e=>`Delete template ${e==null?void 0:e.name}`,Kon=e=>`删除模板 ${e==null?void 0:e.name}`,Won=e=>`حذف قالب ${e==null?void 0:e.name}`,Qon=e=>`حذف القالب ${e==null?void 0:e.name}`,Xon=e=>`Eliminar la plantilla ${e==null?void 0:e.name}`,Yon=e=>`${e==null?void 0:e.name} टेम्पलेट हटाएं`,Zon=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Kon(e):t==="fa"?Won(e):t==="ar"?Qon(e):t==="es"?Xon(e):t==="hi"?Yon(e):Von(e)}),Jon=()=>"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.",ecn=()=>"在聊天中使用 /name 调用技能。来自编程代理的技能会先经过研究相关性筛选,再导入。您也可以自行上传技能,或让 OpenResearch 代理为您创建并添加可复用技能。",tcn=()=>"مهارت‌ها را با /name در گفتگو فراخوانی کنید. مهارت‌های عامل‌های برنامه‌نویسی پیش از وارد شدن از نظر ارتباط با پژوهش بررسی می‌شوند. می‌توانید مهارت را خودتان بارگذاری کنید یا از عامل OpenResearch بخواهید یک مهارت قابل استفادهٔ مجدد بسازد و اضافه کند.",ncn=()=>"استدعِ المهارات عبر ‎/name‎ في المحادثة. تُفحَص مهارات وكلاء البرمجة لديك للتأكد من صلتها بالبحث قبل استيرادها. ارفع مهارة لتضمينها بنفسك. أو بدلًا من ذلك، اطلب من وكيل OpenResearch إنشاء مهارة قابلة لإعادة الاستخدام وإضافتها لك.",rcn=()=>"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.",scn=()=>"चैट में /नाम से स्किल इस्तेमाल करें। आपके कोडिंग एजेंटों की स्किल इंपोर्ट करने से पहले शोध प्रासंगिकता के लिए जाँची जाती हैं। खुद स्किल शामिल करने के लिए एक अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल बनाने और जोड़ने को कहें।",icn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ecn():t==="fa"?tcn():t==="ar"?ncn():t==="es"?rcn():t==="hi"?scn():Jon()}),acn=()=>"Drop a SKILL.md or .zip here, or click to choose",ocn=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",ccn=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",lcn=()=>"أفلِت ملف ‎SKILL.md‎ أو ‎.zip‎ هنا، أو انقر للاختيار",ucn=()=>"Suelta aquí un SKILL.md o un .zip, o haz clic para elegirlo",_cn=()=>"यहाँ एक SKILL.md या .zip छोड़ें, या चुनने के लिए क्लिक करें",fcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ocn():t==="fa"?ccn():t==="ar"?lcn():t==="es"?ucn():t==="hi"?_cn():acn()}),dcn=()=>"Drop a .tex or .zip here, or click to choose",hcn=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",pcn=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",mcn=()=>"أفلِت ملف ‎.tex‎ أو ‎.zip‎ هنا، أو انقر للاختيار",gcn=()=>"Suelta aquí un .tex o un .zip, o haz clic para elegirlo",vcn=()=>"यहाँ एक .tex या .zip छोड़ें, या चुनने के लिए क्लिक करें",bcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hcn():t==="fa"?pcn():t==="ar"?mcn():t==="es"?gcn():t==="hi"?vcn():dcn()}),ycn=()=>"File too large (max 20 MB).",xcn=()=>"文件过大(最大 20 MB)。",wcn=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",kcn=()=>"الملف كبير جدًا (بحد أقصى 20 ميغابايت).",Scn=()=>"Archivo demasiado grande (máx. 20 MB).",Ccn=()=>"फ़ाइल बहुत बड़ी है (अधिकतम 20 MB)।",aI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xcn():t==="fa"?wcn():t==="ar"?kcn():t==="es"?Scn():t==="hi"?Ccn():ycn()}),Ecn=()=>" + 1 file",Ncn=()=>" + 1 个文件",zcn=()=>" + ۱ فایل",jcn=()=>" + ملف واحد",Acn=()=>" + 1 archivo",Tcn=()=>" + 1 फ़ाइल",Rcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ncn():t==="fa"?zcn():t==="ar"?jcn():t==="es"?Acn():t==="hi"?Tcn():Ecn()}),Mcn=()=>"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.",Ocn=()=>"自定义所有项目中可用的技能和 LaTeX 模板。在此上传,或让 OpenResearch 代理为您创建并添加。",Dcn=()=>"مهارت‌ها و قالب‌های LaTeX قابل استفاده در همهٔ پروژه‌ها را سفارشی کنید. آن‌ها را اینجا بارگذاری کنید یا از عامل OpenResearch بخواهید برایتان بسازد و اضافه کند.",Lcn=()=>"خصّص المهارات وقوالب 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.",$cn=()=>"अपने प्रोजेक्ट में उपलब्ध स्किल और LaTeX टेम्पलेट कस्टमाइज़ करें। उन्हें यहाँ अपलोड करें, या किसी OpenResearch एजेंट से आपके लिए उन्हें बनाने और जोड़ने को कहें।",Bcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ocn():t==="fa"?Dcn():t==="ar"?Lcn():t==="es"?Icn():t==="hi"?$cn():Mcn()}),Pcn=()=>"Remove from OpenResearch",Fcn=()=>"从 OpenResearch 移除",Hcn=()=>"حذف از OpenResearch",qcn=()=>"إزالة من OpenResearch",Ucn=()=>"Quitar de OpenResearch",Gcn=()=>"OpenResearch से हटाएं",Vcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fcn():t==="fa"?Hcn():t==="ar"?qcn():t==="es"?Ucn():t==="hi"?Gcn():Pcn()}),Kcn=e=>`Remove “${e==null?void 0:e.name}” from OpenResearch? Its source files will remain in your coding agent.`,Wcn=e=>`从 OpenResearch 移除“${e==null?void 0:e.name}”?源文件将保留在你的编程智能体中。`,Qcn=e=>`«${e==null?void 0:e.name}» از OpenResearch حذف شود؟ فایل‌های اصلی در عامل برنامه‌نویسی شما باقی می‌مانند.`,Xcn=e=>`إزالة «${e==null?void 0:e.name}» من OpenResearch؟ ستبقى ملفاتها المصدرية في وكيل البرمجة الخاص بك.`,Ycn=e=>`¿Quitar “${e==null?void 0:e.name}” de OpenResearch? Sus archivos originales se conservarán en tu agente de programación.`,Zcn=e=>`“${e==null?void 0:e.name}” को OpenResearch से हटाएं? इसकी सोर्स फ़ाइलें आपके कोडिंग एजेंट में बनी रहेंगी।`,Jcn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Wcn(e):t==="fa"?Qcn(e):t==="ar"?Xcn(e):t==="es"?Ycn(e):t==="hi"?Zcn(e):Kcn(e)}),eln=e=>`Remove ${e==null?void 0:e.name} from OpenResearch`,tln=e=>`从 OpenResearch 移除 ${e==null?void 0:e.name}`,nln=e=>`حذف ${e==null?void 0:e.name} از OpenResearch`,rln=e=>`إزالة ${e==null?void 0:e.name} من OpenResearch`,sln=e=>`Quitar ${e==null?void 0:e.name} de OpenResearch`,iln=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं`,aln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tln(e):t==="fa"?nln(e):t==="ar"?rln(e):t==="es"?sln(e):t==="hi"?iln(e):eln(e)}),oln=e=>` + ${e==null?void 0:e.count} files`,cln=e=>` + ${e==null?void 0:e.count} 个文件`,lln=e=>` + ${e==null?void 0:e.count} فایل`,uln=e=>` + ملفات (${e==null?void 0:e.count})`,_ln=e=>` + ${e==null?void 0:e.count} archivos`,fln=e=>` + ${e==null?void 0:e.count} फ़ाइलें`,dln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cln(e):t==="fa"?lln(e):t==="ar"?uln(e):t==="es"?_ln(e):t==="hi"?fln(e):oln(e)}),hln=()=>"Could not load skills:",pln=()=>"无法加载技能:",mln=()=>"بارگیری مهارت‌ها ممکن نشد:",gln=()=>"تعذّر تحميل المهارات:",vln=()=>"No se pudieron cargar las skills:",bln=()=>"स्किल लोड नहीं हो सकीं:",yln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pln():t==="fa"?mln():t==="ar"?gln():t==="es"?vln():t==="hi"?bln():hln()}),xln=()=>"Could not load templates:",wln=()=>"无法加载模板:",kln=()=>"بارگیری قالب‌ها ممکن نشد:",Sln=()=>"تعذّر تحميل القوالب:",Cln=()=>"No se pudieron cargar las plantillas:",Eln=()=>"टेम्पलेट लोड नहीं हो सके:",Nln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wln():t==="fa"?kln():t==="ar"?Sln():t==="es"?Cln():t==="hi"?Eln():xln()}),zln=()=>"Customize",jln=()=>"自定义",Aln=()=>"سفارشی‌سازی",Tln=()=>"تخصيص",Rln=()=>"Personalizar",Mln=()=>"कस्टमाइज़ करें",Oln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jln():t==="fa"?Aln():t==="ar"?Tln():t==="es"?Rln():t==="hi"?Mln():zln()}),Dln=()=>"Delete skill",Lln=()=>"删除技能",Iln=()=>"حذف مهارت",$ln=()=>"حذف المهارة",Bln=()=>"Eliminar skill",Pln=()=>"स्किल हटाएं",Fln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lln():t==="fa"?Iln():t==="ar"?$ln():t==="es"?Bln():t==="hi"?Pln():Dln()}),Hln=()=>"Delete template",qln=()=>"删除模板",Uln=()=>"حذف قالب",Gln=()=>"حذف القالب",Vln=()=>"Eliminar plantilla",Kln=()=>"टेम्पलेट हटाएं",Wln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qln():t==="fa"?Uln():t==="ar"?Gln():t==="es"?Vln():t==="hi"?Kln():Hln()}),Qln=()=>"LaTeX templates",Xln=()=>"LaTeX 模板",Yln=()=>"قالب‌های LaTeX",Zln=()=>"قوالب LaTeX",Jln=()=>"Plantillas de LaTeX",eun=()=>"LaTeX टेम्पलेट",tun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xln():t==="fa"?Yln():t==="ar"?Zln():t==="es"?Jln():t==="hi"?eun():Qln()}),nun=()=>"Loading skills…",run=()=>"正在加载技能…",sun=()=>"در حال بارگیری مهارت‌ها…",iun=()=>"جارٍ تحميل المهارات…",aun=()=>"Cargando skills…",oun=()=>"स्किल लोड हो रही हैं…",cun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?run():t==="fa"?sun():t==="ar"?iun():t==="es"?aun():t==="hi"?oun():nun()}),lun=()=>"Loading templates…",uun=()=>"正在加载模板…",_un=()=>"در حال بارگیری قالب‌ها…",fun=()=>"جارٍ تحميل القوالب…",dun=()=>"Cargando plantillas…",hun=()=>"टेम्पलेट लोड हो रहे हैं…",pun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uun():t==="fa"?_un():t==="ar"?fun():t==="es"?dun():t==="hi"?hun():lun()}),mun=()=>"No skills yet.",gun=()=>"尚无技能。",vun=()=>"هنوز مهارتی وجود ندارد.",bun=()=>"لا توجد مهارات بعد.",yun=()=>"Aún no hay skills.",xun=()=>"अभी तक कोई स्किल नहीं।",wun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gun():t==="fa"?vun():t==="ar"?bun():t==="es"?yun():t==="hi"?xun():mun()}),kun=()=>"No templates yet.",Sun=()=>"尚无模板。",Cun=()=>"هنوز قالبی وجود ندارد.",Eun=()=>"لا توجد قوالب بعد.",Nun=()=>"Aún no hay plantillas.",zun=()=>"अभी तक कोई टेम्पलेट नहीं।",jun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sun():t==="fa"?Cun():t==="ar"?Eun():t==="es"?Nun():t==="hi"?zun():kun()}),Aun=()=>"Skills",Tun=()=>"技能",Run=()=>"مهارت‌ها",Mun=()=>"المهارات",Oun=()=>"Skills",Dun=()=>"स्किल",Lun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tun():t==="fa"?Run():t==="ar"?Mun():t==="es"?Oun():t==="hi"?Dun():Aun()}),Iun=()=>"Uploading…",$un=()=>"正在上传…",Bun=()=>"در حال بارگذاری…",Pun=()=>"جارٍ الرفع…",Fun=()=>"Subiendo…",Hun=()=>"अपलोड हो रहा है…",qun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$un():t==="fa"?Bun():t==="ar"?Pun():t==="es"?Fun():t==="hi"?Hun():Iun()}),Uun=()=>"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.",Gun=()=>"代理撰写论文时使用的会议格式或自定义样式,用于替代默认导言区。上传 .tex 文件或包含 .cls 和 .sty 文件的 .zip 压缩包,也可以让 OpenResearch 代理为您创建并添加 LaTeX 模板。只有一个模板可用时,代理会直接使用,无需询问。",Vun=()=>"قالب کنفرانس یا سبک اختصاصی که عامل به‌جای پیش‌گفتار پیش‌فرض برای نوشتن مقاله استفاده می‌کند. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید، یا از عامل OpenResearch بخواهید قالب LaTeX بسازد و اضافه کند. اگر تنها یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",Kun=()=>"قالب مؤتمر أو تنسيق خاص بالمؤسسة يستخدمه الوكيل لكتابة الأوراق بدلًا من إعدادات LaTeX الافتراضية. ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ يحتوي على ملفات ‎.cls‎ و‎.sty‎ الخاصة به. أو اطلب من وكيل OpenResearch إنشاء قالب LaTeX وإضافته لك. عند توفّر قالب واحد فقط، يستخدمه الوكيل دون سؤال.",Wun=()=>"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.",Qun=()=>"एक कॉन्फ़्रेंस क्लास या हाउस स्टाइल जिसमें एजेंट अपने डिफ़ॉल्ट प्रीएंबल की बजाय पेपर लिखता है। एक .tex फ़ाइल या उसकी .cls और .sty फ़ाइलों वाली .zip अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक LaTeX टेम्पलेट बनाने और जोड़ने को कहें। ठीक एक टेम्पलेट उपलब्ध होने पर, एजेंट बिना पूछे उसी का इस्तेमाल करता है।",Xun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gun():t==="fa"?Vun():t==="ar"?Kun():t==="es"?Wun():t==="hi"?Qun():Uun()}),Yun=()=>"Upload a SKILL.md file or a .zip of a skill folder.",Zun=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",Jun=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",e_n=()=>"ارفع ملف ‎SKILL.md‎ أو ملف ‎.zip‎ لمجلد مهارة.",t_n=()=>"Sube un archivo SKILL.md o un .zip con la carpeta de la skill.",n_n=()=>"एक SKILL.md फ़ाइल या स्किल फ़ोल्डर की .zip अपलोड करें।",r_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zun():t==="fa"?Jun():t==="ar"?e_n():t==="es"?t_n():t==="hi"?n_n():Yun()}),s_n=()=>"Upload a .tex file or a .zip of a template folder.",i_n=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",a_n=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",o_n=()=>"ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ لمجلد قالب.",c_n=()=>"Sube un archivo .tex o un .zip con la carpeta de la plantilla.",l_n=()=>"एक .tex फ़ाइल या टेम्पलेट फ़ोल्डर की .zip अपलोड करें।",u_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i_n():t==="fa"?a_n():t==="ar"?o_n():t==="es"?c_n():t==="hi"?l_n():s_n()}),__n=()=>"Close SSH config",f_n=()=>"关闭 SSH 配置",d_n=()=>"بستن پیکربندی SSH",h_n=()=>"إغلاق إعداد SSH",p_n=()=>"Cerrar la configuración SSH",m_n=()=>"SSH कॉन्फ़िग बंद करें",g_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f_n():t==="fa"?d_n():t==="ar"?h_n():t==="es"?p_n():t==="hi"?m_n():__n()}),v_n=()=>"Discard your unsaved SSH config changes?",b_n=()=>"要放弃未保存的 SSH 配置更改吗?",y_n=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",x_n=()=>"تجاهل تغييرات إعداد SSH غير المحفوظة؟",w_n=()=>"¿Descartar los cambios sin guardar en la configuración SSH?",k_n=()=>"आपके सेव न किए गए SSH कॉन्फ़िग बदलाव छोड़ें?",S_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b_n():t==="fa"?y_n():t==="ar"?x_n():t==="es"?w_n():t==="hi"?k_n():v_n()}),C_n=()=>"Loading SSH config…",E_n=()=>"正在加载 SSH 配置…",N_n=()=>"در حال بارگیری پیکربندی SSH…",z_n=()=>"جارٍ تحميل إعداد SSH…",j_n=()=>"Cargando la configuración SSH…",A_n=()=>"SSH कॉन्फ़िग लोड हो रहा है…",T_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E_n():t==="fa"?N_n():t==="ar"?z_n():t==="es"?j_n():t==="hi"?A_n():C_n()}),R_n=()=>"SSH config saved",M_n=()=>"SSH 配置已保存",O_n=()=>"پیکربندی SSH ذخیره شد",D_n=()=>"تم حفظ إعداد SSH",L_n=()=>"Configuración SSH guardada",I_n=()=>"SSH कॉन्फ़िग सेव हो गया",$_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M_n():t==="fa"?O_n():t==="ar"?D_n():t==="es"?L_n():t==="hi"?I_n():R_n()}),B_n=()=>"SSH config",P_n=()=>"SSH 配置",F_n=()=>"پیکربندی SSH",H_n=()=>"إعداد SSH",q_n=()=>"Configuración SSH",U_n=()=>"SSH कॉन्फ़िग",G_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P_n():t==="fa"?F_n():t==="ar"?H_n():t==="es"?q_n():t==="hi"?U_n():B_n()}),V_n=()=>"Configure SSH hosts…",K_n=()=>"配置 SSH 主机…",W_n=()=>"پیکربندی میزبان‌های SSH…",Q_n=()=>"إعداد مضيفات SSH…",X_n=()=>"Configurar hosts SSH…",Y_n=()=>"SSH होस्ट कॉन्फ़िगर करें…",oI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K_n():t==="fa"?W_n():t==="ar"?Q_n():t==="es"?X_n():t==="hi"?Y_n():V_n()}),Z_n=()=>"Container name or ID",J_n=()=>"容器名称或 ID",efn=()=>"نام یا شناسهٔ کانتینر",tfn=()=>"اسم الحاوية أو معرّفها",nfn=()=>"Nombre o ID del contenedor",rfn=()=>"कंटेनर का नाम या ID",sfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J_n():t==="fa"?efn():t==="ar"?tfn():t==="es"?nfn():t==="hi"?rfn():Z_n()}),ifn=()=>"Default SSH host",afn=()=>"默认 SSH 主机",ofn=()=>"میزبان پیش‌فرض SSH",cfn=()=>"مضيف SSH الافتراضي",lfn=()=>"Servidor SSH predeterminado",ufn=()=>"डिफ़ॉल्ट SSH होस्ट",_fn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?afn():t==="fa"?ofn():t==="ar"?cfn():t==="es"?lfn():t==="hi"?ufn():ifn()}),ffn=()=>"Direct host",dfn=()=>"直接在主机上",hfn=()=>"مستقیماً روی میزبان",pfn=()=>"المضيف مباشرة",mfn=()=>"Servidor directamente",gfn=()=>"सीधे होस्ट पर",vfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dfn():t==="fa"?hfn():t==="ar"?pfn():t==="es"?mfn():t==="hi"?gfn():ffn()}),bfn=()=>"Existing container",yfn=()=>"现有容器",xfn=()=>"کانتینر موجود",wfn=()=>"حاوية موجودة",kfn=()=>"Contenedor existente",Sfn=()=>"मौजूदा कंटेनर",Cfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yfn():t==="fa"?xfn():t==="ar"?wfn():t==="es"?kfn():t==="hi"?Sfn():bfn()}),Efn=()=>"Run in",Nfn=()=>"运行位置",zfn=()=>"اجرا در",jfn=()=>"التشغيل في",Afn=()=>"Ejecutar en",Tfn=()=>"यहाँ चलाएँ",Rfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nfn():t==="fa"?zfn():t==="ar"?jfn():t==="es"?Afn():t==="hi"?Tfn():Efn()}),Mfn=()=>"Cancelled",Ofn=()=>"已取消",Dfn=()=>"لغوشده",Lfn=()=>"ملغى",Ifn=()=>"Cancelado",$fn=()=>"रद्द किया गया",Bfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ofn():t==="fa"?Dfn():t==="ar"?Lfn():t==="es"?Ifn():t==="hi"?$fn():Mfn()}),Pfn=()=>"Cancelling",Ffn=()=>"正在取消",Hfn=()=>"در حال لغو",qfn=()=>"جارٍ الإلغاء",Ufn=()=>"Cancelando",Gfn=()=>"रद्द हो रहा है",Vfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ffn():t==="fa"?Hfn():t==="ar"?qfn():t==="es"?Ufn():t==="hi"?Gfn():Pfn()}),Kfn=()=>"Done",Wfn=()=>"已完成",Qfn=()=>"انجام‌شده",Xfn=()=>"تم",Yfn=()=>"Completado",Zfn=()=>"पूरा हुआ",cI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wfn():t==="fa"?Qfn():t==="ar"?Xfn():t==="es"?Yfn():t==="hi"?Zfn():Kfn()}),Jfn=()=>"Editing",edn=()=>"正在编辑",tdn=()=>"در حال ویرایش",ndn=()=>"قيد التعديل",rdn=()=>"Editando",sdn=()=>"संपादित हो रहा है",idn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?edn():t==="fa"?tdn():t==="ar"?ndn():t==="es"?rdn():t==="hi"?sdn():Jfn()}),adn=()=>"Failed",odn=()=>"失败",cdn=()=>"ناموفق",ldn=()=>"فشل",udn=()=>"Error",_dn=()=>"विफल",fdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?odn():t==="fa"?cdn():t==="ar"?ldn():t==="es"?udn():t==="hi"?_dn():adn()}),ddn=()=>"Idle",hdn=()=>"空闲",pdn=()=>"بی‌کار",mdn=()=>"خامل",gdn=()=>"Inactivo",vdn=()=>"निष्क्रिय",bdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hdn():t==="fa"?pdn():t==="ar"?mdn():t==="es"?gdn():t==="hi"?vdn():ddn()}),ydn=()=>"Running",xdn=()=>"运行中",wdn=()=>"در حال اجرا",kdn=()=>"قيد التشغيل",Sdn=()=>"En ejecución",Cdn=()=>"चल रहा है",Edn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xdn():t==="fa"?wdn():t==="ar"?kdn():t==="es"?Sdn():t==="hi"?Cdn():ydn()}),Ndn=()=>"Starting",zdn=()=>"正在启动",jdn=()=>"در حال آغاز",Adn=()=>"جارٍ البدء",Tdn=()=>"Iniciando",Rdn=()=>"शुरू हो रहा है",Mdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zdn():t==="fa"?jdn():t==="ar"?Adn():t==="es"?Tdn():t==="hi"?Rdn():Ndn()}),Odn=()=>"Copying…",Ddn=()=>"正在复制…",Ldn=()=>"در حال کپی…",Idn=()=>"جارٍ النسخ…",$dn=()=>"Copiando…",Bdn=()=>"कॉपी हो रहा है…",Pdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ddn():t==="fa"?Ldn():t==="ar"?Idn():t==="es"?$dn():t==="hi"?Bdn():Odn()}),Fdn=()=>"Finalizing…",Hdn=()=>"正在完成…",qdn=()=>"در حال نهایی‌سازی…",Udn=()=>"جارٍ الإنهاء…",Gdn=()=>"Finalizando…",Vdn=()=>"अंतिम रूप दिया जा रहा है…",Kdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hdn():t==="fa"?qdn():t==="ar"?Udn():t==="es"?Gdn():t==="hi"?Vdn():Fdn()}),Wdn=e=>`${e==null?void 0:e.size} free at target`,Qdn=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,Xdn=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,Ydn=e=>`${e==null?void 0:e.size} متاح في الوجهة`,Zdn=e=>`${e==null?void 0:e.size} libres en el destino`,Jdn=e=>`गंतव्य पर ${e==null?void 0:e.size} खाली`,ehn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qdn(e):t==="fa"?Xdn(e):t==="ar"?Ydn(e):t==="es"?Zdn(e):t==="hi"?Jdn(e):Wdn(e)}),thn=e=>`Move all orx data to: +इसका ट्रांसक्रिप्ट स्थायी रूप से हट जाएगा।`,Zge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vge(e):t==="fa"?Wge(e):t==="ar"?Qge(e):t==="es"?Xge(e):t==="hi"?Yge(e):Kge(e)}),Jge=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,e1e=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,t1e=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,n1e=e=>`تعذّر حذف «${e==null?void 0:e.title}»: ${e==null?void 0:e.error}`,r1e=e=>`No se pudo eliminar “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,s1e=e=>`“${e==null?void 0:e.title}” हटाने में विफल: ${e==null?void 0:e.error}`,i1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?e1e(e):t==="fa"?t1e(e):t==="ar"?n1e(e):t==="es"?r1e(e):t==="hi"?s1e(e):Jge(e)}),a1e=()=>"Could not exit Plan mode. Try again.",o1e=()=>"无法退出计划模式。请重试。",c1e=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",l1e=()=>"تعذّر الخروج من وضع التخطيط. حاول مجددًا.",u1e=()=>"No se pudo salir del modo Plan. Inténtalo de nuevo.",_1e=()=>"प्लान मोड से बाहर नहीं निकला जा सका। फिर से कोशिश करें।",f1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o1e():t==="fa"?c1e():t==="ar"?l1e():t==="es"?u1e():t==="hi"?_1e():a1e()}),d1e=()=>"Expand tool activity",h1e=()=>"展开工具活动",p1e=()=>"باز کردن فعالیت ابزارها",m1e=()=>"توسيع نشاط الأداة",g1e=()=>"Expandir actividad de herramientas",v1e=()=>"टूल गतिविधि फैलाएं",b1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h1e():t==="fa"?p1e():t==="ar"?m1e():t==="es"?g1e():t==="hi"?v1e():d1e()}),y1e=()=>"experiments",x1e=()=>"实验",w1e=()=>"آزمایش‌ها",k1e=()=>"التجارب",S1e=()=>"experimentos",C1e=()=>"प्रयोग",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=()=>"You",z1e=()=>"你",j1e=()=>"شما",A1e=()=>"أنت",T1e=()=>"Tú",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=()=>"Goal cleared",D1e=()=>"已清除目标",L1e=()=>"هدف پاک شد",I1e=()=>"تم مسح الهدف",$1e=()=>"Objetivo borrado",B1e=()=>"लक्ष्य हटाया गया",P1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D1e():t==="fa"?L1e():t==="ar"?I1e():t==="es"?$1e():t==="hi"?B1e():O1e()}),F1e=e=>`Current goal: ${e==null?void 0:e.goal}`,H1e=e=>`当前目标:${e==null?void 0:e.goal}`,q1e=e=>`هدف فعلی: ${e==null?void 0:e.goal}`,U1e=e=>`الهدف الحالي: ${e==null?void 0:e.goal}`,G1e=e=>`Objetivo actual: ${e==null?void 0:e.goal}`,K1e=e=>`मौजूदा लक्ष्य: ${e==null?void 0:e.goal}`,V1e=((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"?K1e(e):F1e(e)}),W1e=e=>`Setting the goal failed: ${e==null?void 0:e.error}`,Q1e=e=>`设置目标失败:${e==null?void 0:e.error}`,X1e=e=>`تنظیم هدف ناموفق بود: ${e==null?void 0:e.error}`,Y1e=e=>`فشل تعيين الهدف: ${e==null?void 0:e.error}`,Z1e=e=>`Error al definir el objetivo: ${e==null?void 0:e.error}`,J1e=e=>`लक्ष्य सेट करना विफल: ${e==null?void 0:e.error}`,ON=((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)}),eve=()=>"No goal set — add one after /goal",tve=()=>"尚未设置目标 — 在 /goal 后面写一个",nve=()=>"هدفی تنظیم نشده — یکی را بعد از /goal بنویسید",rve=()=>"لا يوجد هدف — أضف واحدًا بعد /goal",sve=()=>"Sin objetivo — añade uno después de /goal",ive=()=>"कोई लक्ष्य नहीं — /goal के बाद एक जोड़ें",ave=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tve():t==="fa"?nve():t==="ar"?rve():t==="es"?sve():t==="hi"?ive():eve()}),ove=()=>"Goal set",cve=()=>"已设置目标",lve=()=>"هدف تنظیم شد",uve=()=>"تم تعيين الهدف",_ve=()=>"Objetivo definido",fve=()=>"लक्ष्य सेट किया गया",dve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cve():t==="fa"?lve():t==="ar"?uve():t==="es"?_ve():t==="hi"?fve():ove()}),hve=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,pve=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,mve=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,gve=e=>`${e==null?void 0:e.harness} غير متاح — افتح مُنتقي النماذج`,vve=e=>`${e==null?void 0:e.harness} no está disponible — abre el selector de modelos`,bve=e=>`${e==null?void 0:e.harness} उपलब्ध नहीं है — मॉडल पिकर खोलें`,yve=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pve(e):t==="fa"?mve(e):t==="ar"?gve(e):t==="es"?vve(e):t==="hi"?bve(e):hve(e)}),xve=e=>`Importing that chat failed: ${e==null?void 0:e.error}`,wve=e=>`导入该聊天失败:${e==null?void 0:e.error}`,kve=e=>`وارد کردن آن گفت‌وگو ناموفق بود: ${e==null?void 0:e.error}`,Sve=e=>`فشل استيراد تلك المحادثة: ${e==null?void 0:e.error}`,Cve=e=>`Error al importar ese chat: ${e==null?void 0:e.error}`,Eve=e=>`उस चैट को इम्पोर्ट करना विफल: ${e==null?void 0:e.error}`,Nve=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wve(e):t==="fa"?kve(e):t==="ar"?Sve(e):t==="es"?Cve(e):t==="hi"?Eve(e):xve(e)}),zve=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,jve=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,Ave=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,Tve=e=>`راسِل ${e==null?void 0:e.harness}… (/ للأوامر والمهارات، ! للطرفية)`,Rve=e=>`Escribe a ${e==null?void 0:e.harness}… (/ para comandos y skills, ! para la shell)`,Mve=e=>`${e==null?void 0:e.harness} को संदेश भेजें… (कमांड और स्किल के लिए /, शेल के लिए !)`,Ove=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jve(e):t==="fa"?Ave(e):t==="ar"?Tve(e):t==="es"?Rve(e):t==="hi"?Mve(e):zve(e)}),Dve=e=>`Message not sent: ${e==null?void 0:e.error}`,Lve=e=>`消息未发送:${e==null?void 0:e.error}`,Ive=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,$ve=e=>`لم تُرسل الرسالة: ${e==null?void 0:e.error}`,Bve=e=>`Mensaje no enviado: ${e==null?void 0:e.error}`,Pve=e=>`संदेश नहीं भेजा गया: ${e==null?void 0:e.error}`,Fve=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lve(e):t==="fa"?Ive(e):t==="ar"?$ve(e):t==="es"?Bve(e):t==="hi"?Pve(e):Dve(e)}),Hve=()=>"Model unavailable",qve=()=>"模型不可用",Uve=()=>"مدل در دسترس نیست",Gve=()=>"النموذج غير متاح",Kve=()=>"Modelo no disponible",Vve=()=>"मॉडल उपलब्ध नहीं",Wve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qve():t==="fa"?Uve():t==="ar"?Gve():t==="es"?Kve():t==="hi"?Vve():Hve()}),Qve=()=>"New session",Xve=()=>"新会话",Yve=()=>"نشست جدید",Zve=()=>"جلسة جديدة",Jve=()=>"Nueva sesión",ebe=()=>"नया सेशन",DN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xve():t==="fa"?Yve():t==="ar"?Zve():t==="es"?Jve():t==="hi"?ebe():Qve()}),tbe=()=>"No active sessions",nbe=()=>"没有活跃会话",rbe=()=>"نشست فعالی وجود ندارد",sbe=()=>"لا توجد جلسات نشطة",ibe=()=>"No hay sesiones activas",abe=()=>"कोई सक्रिय सेशन नहीं",obe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nbe():t==="fa"?rbe():t==="ar"?sbe():t==="es"?ibe():t==="hi"?abe():tbe()}),cbe=()=>"No activity",lbe=()=>"无活动",ube=()=>"بدون فعالیت",_be=()=>"لا يوجد نشاط",fbe=()=>"Sin actividad",dbe=()=>"कोई गतिविधि नहीं",hbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lbe():t==="fa"?ube():t==="ar"?_be():t==="es"?fbe():t==="hi"?dbe():cbe()}),pbe=()=>"No archived sessions",mbe=()=>"没有已归档的会话",gbe=()=>"نشست بایگانی‌شده‌ای وجود ندارد",vbe=()=>"لا توجد جلسات مؤرشفة",bbe=()=>"No hay sesiones archivadas",ybe=()=>"कोई आर्काइव किया गया सेशन नहीं",xbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mbe():t==="fa"?gbe():t==="ar"?vbe():t==="es"?bbe():t==="hi"?ybe():pbe()}),wbe=()=>"No sessions yet",kbe=()=>"还没有会话",Sbe=()=>"هنوز نشستی وجود ندارد",Cbe=()=>"لا توجد جلسات بعد",Ebe=()=>"Aún no hay sesiones",Nbe=()=>"अभी तक कोई सेशन नहीं",zbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kbe():t==="fa"?Sbe():t==="ar"?Cbe():t==="es"?Ebe():t==="hi"?Nbe():wbe()}),jbe=()=>"There is nothing to compact yet",Abe=()=>"还没有可压缩的内容",Tbe=()=>"هنوز چیزی برای فشرده‌سازی وجود ندارد",Rbe=()=>"لا يوجد شيء لضغطه بعد",Mbe=()=>"Aún no hay nada que comprimir",Obe=()=>"छोटा करने के लिए अभी कुछ नहीं है",Dbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Abe():t==="fa"?Tbe():t==="ar"?Rbe():t==="es"?Mbe():t==="hi"?Obe():jbe()}),Lbe=()=>"No response to copy yet",Ibe=()=>"还没有可复制的回复",$be=()=>"هنوز پاسخی برای کپی وجود ندارد",Bbe=()=>"لا يوجد رد لنسخه بعد",Pbe=()=>"Aún no hay ninguna respuesta que copiar",Fbe=()=>"कॉपी करने के लिए अभी कोई जवाब नहीं है",Hbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ibe():t==="fa"?$be():t==="ar"?Bbe():t==="es"?Pbe():t==="hi"?Fbe():Lbe()}),qbe=()=>"Nothing to export yet",Ube=()=>"还没有可导出的内容",Gbe=()=>"هنوز چیزی برای خروجی گرفتن وجود ندارد",Kbe=()=>"لا يوجد شيء لتصديره بعد",Vbe=()=>"Aún no hay nada que exportar",Wbe=()=>"एक्सपोर्ट करने के लिए अभी कुछ नहीं है",Qbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ube():t==="fa"?Gbe():t==="ar"?Kbe():t==="es"?Vbe():t==="hi"?Wbe():qbe()}),Xbe=()=>"1 annotation",Ybe=()=>"1 条批注",Zbe=()=>"۱ یادداشت",Jbe=()=>"تعليق واحد",eye=()=>"1 anotación",tye=()=>"1 एनोटेशन",nye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ybe():t==="fa"?Zbe():t==="ar"?Jbe():t==="es"?eye():t==="hi"?tye():Xbe()}),rye=()=>"Open sub-agent transcript",sye=()=>"打开子智能体记录",iye=()=>"باز کردن متن گفت‌وگوی عامل فرعی",aye=()=>"فتح سجل محادثة الوكيل الفرعي",oye=()=>"Abrir la transcripción del subagente",cye=()=>"सब-एजेंट ट्रांसक्रिप्ट खोलें",lye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sye():t==="fa"?iye():t==="ar"?aye():t==="es"?oye():t==="hi"?cye():rye()}),uye=()=>"About this demo",_ye=()=>"关于此演示",fye=()=>"دربارهٔ این نسخهٔ نمایشی",dye=()=>"حول هذا العرض التوضيحي",hye=()=>"Acerca de esta demo",pye=()=>"इस डेमो के बारे में",LN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ye():t==="fa"?fye():t==="ar"?dye():t==="es"?hye():t==="hi"?pye():uye()}),mye=()=>"Accept and auto mode",gye=()=>"接受并使用自动模式",vye=()=>"پذیرش و حالت خودکار",bye=()=>"قبول وتفعيل الوضع التلقائي",yye=()=>"Aceptar en modo automático",xye=()=>"स्वीकार करें और ऑटो मोड",wye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gye():t==="fa"?vye():t==="ar"?bye():t==="es"?yye():t==="hi"?xye():mye()}),kye=()=>"Accept and bypass all",Sye=()=>"接受并跳过所有审批",Cye=()=>"پذیرش و عبور از همهٔ تأییدها",Eye=()=>"القبول وتجاوز الكل",Nye=()=>"Aceptar y omitir permisos",zye=()=>"स्वीकार करें और सब बायपास करें",jye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sye():t==="fa"?Cye():t==="ar"?Eye():t==="es"?Nye():t==="hi"?zye():kye()}),Aye=()=>"Active",Tye=()=>"活跃",Rye=()=>"فعال",Mye=()=>"نشط",Oye=()=>"Activas",Dye=()=>"सक्रिय",Lye=((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()}),Iye=()=>"All",$ye=()=>"全部",Bye=()=>"همه",Pye=()=>"الكل",Fye=()=>"Todas",Hye=()=>"सभी",qye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ye():t==="fa"?Bye():t==="ar"?Pye():t==="es"?Fye():t==="hi"?Hye():Iye()}),Uye=()=>"Allow",Gye=()=>"允许",Kye=()=>"اجازه دادن",Vye=()=>"السماح",Wye=()=>"Permitir",Qye=()=>"अनुमति दें",Xye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gye():t==="fa"?Kye():t==="ar"?Vye():t==="es"?Wye():t==="hi"?Qye():Uye()}),Yye=()=>"Approval required",Zye=()=>"需要批准",Jye=()=>"نیازمند تأیید",exe=()=>"الموافقة مطلوبة",txe=()=>"Aprobación necesaria",nxe=()=>"स्वीकृति ज़रूरी है",rxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zye():t==="fa"?Jye():t==="ar"?exe():t==="es"?txe():t==="hi"?nxe():Yye()}),sxe=()=>"Archived",ixe=()=>"已归档",axe=()=>"بایگانی‌شده",oxe=()=>"مؤرشف",cxe=()=>"Archivadas",lxe=()=>"आर्काइव किया गया",IN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ixe():t==="fa"?axe():t==="ar"?oxe():t==="es"?cxe():t==="hi"?lxe():sxe()}),uxe=()=>"Ask about this",_xe=()=>"询问此内容",fxe=()=>"دربارهٔ این بپرسید",dxe=()=>"اسأل عن هذا",hxe=()=>"Preguntar sobre esto",pxe=()=>"इसके बारे में पूछें",mxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_xe():t==="fa"?fxe():t==="ar"?dxe():t==="es"?hxe():t==="hi"?pxe():uxe()}),gxe=()=>"Attach a PDF or image",vxe=()=>"附加 PDF 或图片",bxe=()=>"پیوست PDF یا تصویر",yxe=()=>"إرفاق ملف PDF أو صورة",xxe=()=>"Adjuntar un PDF o una imagen",wxe=()=>"PDF या इमेज अटैच करें",$N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vxe():t==="fa"?bxe():t==="ar"?yxe():t==="es"?xxe():t==="hi"?wxe():gxe()}),kxe=()=>"Bash",Sxe=()=>"Bash",Cxe=()=>"Bash",Exe=()=>"Bash",Nxe=()=>"Bash",zxe=()=>"Bash",uL=((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=()=>"Browsed the web",Axe=()=>"已浏览网页",Txe=()=>"وب مرور شد",Rxe=()=>"تصفّح الويب",Mxe=()=>"Navegó por la web",Oxe=()=>"वेब ब्राउज़ किया",BN=((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()}),Dxe=()=>"Built the project",Lxe=()=>"已构建项目",Ixe=()=>"پروژه ساخته شد",$xe=()=>"بنى المشروع",Bxe=()=>"Compiló el proyecto",Pxe=()=>"प्रोजेक्ट बिल्ड किया",Fxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lxe():t==="fa"?Ixe():t==="ar"?$xe():t==="es"?Bxe():t==="hi"?Pxe():Dxe()}),Hxe=()=>"Cancel",qxe=()=>"取消",Uxe=()=>"لغو",Gxe=()=>"إلغاء",Kxe=()=>"Cancelar",Vxe=()=>"रद्द करें",Wxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qxe():t==="fa"?Uxe():t==="ar"?Gxe():t==="es"?Kxe():t==="hi"?Vxe():Hxe()}),Qxe=()=>"Cancelled an experiment run",Xxe=()=>"已取消实验运行",Yxe=()=>"اجرای آزمایش لغو شد",Zxe=()=>"ألغى تشغيل تجربة",Jxe=()=>"Canceló una ejecución de experimento",e2e=()=>"एक प्रयोग रन रद्द किया",t2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xxe():t==="fa"?Yxe():t==="ar"?Zxe():t==="es"?Jxe():t==="hi"?e2e():Qxe()}),n2e=()=>"Checked code style",r2e=()=>"已检查代码风格",s2e=()=>"سبک کد بررسی شد",i2e=()=>"فحص نمط الشيفرة",a2e=()=>"Revisó el estilo del código",o2e=()=>"कोड स्टाइल जाँची",c2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r2e():t==="fa"?s2e():t==="ar"?i2e():t==="es"?a2e():t==="hi"?o2e():n2e()}),l2e=()=>"Checked compute options",u2e=()=>"已检查算力选项",_2e=()=>"گزینه‌های رایانشی بررسی شد",f2e=()=>"فحص خيارات الحوسبة",d2e=()=>"Consultó las opciones de cómputo",h2e=()=>"कंप्यूट विकल्प जाँचे",p2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u2e():t==="fa"?_2e():t==="ar"?f2e():t==="es"?d2e():t==="hi"?h2e():l2e()}),m2e=()=>"Checked experiment status",g2e=()=>"已检查实验状态",v2e=()=>"وضعیت آزمایش بررسی شد",b2e=()=>"فحص حالة التجربة",y2e=()=>"Consultó el estado del experimento",x2e=()=>"प्रयोग की स्थिति जाँची",PN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g2e():t==="fa"?v2e():t==="ar"?b2e():t==="es"?y2e():t==="hi"?x2e():m2e()}),w2e=()=>"Checked Git status",k2e=()=>"已检查 Git 状态",S2e=()=>"وضعیت Git بررسی شد",C2e=()=>"فحص حالة Git",E2e=()=>"Consultó el estado de Git",N2e=()=>"Git स्थिति जाँची",z2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k2e():t==="fa"?S2e():t==="ar"?C2e():t==="es"?E2e():t==="hi"?N2e():w2e()}),j2e=()=>"Checked local times",A2e=()=>"已查询当地时间",T2e=()=>"زمان‌های محلی بررسی شد",R2e=()=>"فحص التوقيتات المحلية",M2e=()=>"Consultó horas locales",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=()=>"Checked market data",I2e=()=>"已查询市场数据",$2e=()=>"داده‌های بازار بررسی شد",B2e=()=>"فحص بيانات السوق",P2e=()=>"Consultó datos de mercado",F2e=()=>"बाज़ार डेटा जाँचा",H2e=((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()}),q2e=()=>"Checked sports data",U2e=()=>"已查询体育数据",G2e=()=>"داده‌های ورزشی بررسی شد",K2e=()=>"فحص البيانات الرياضية",V2e=()=>"Consultó datos deportivos",W2e=()=>"खेल डेटा जाँचा",Q2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U2e():t==="fa"?G2e():t==="ar"?K2e():t==="es"?V2e():t==="hi"?W2e():q2e()}),X2e=()=>"Checked the weather",Y2e=()=>"已查询天气",Z2e=()=>"آب‌وهوا بررسی شد",J2e=()=>"فحص حالة الطقس",ewe=()=>"Consultó el tiempo",twe=()=>"मौसम जाँचा",nwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y2e():t==="fa"?Z2e():t==="ar"?J2e():t==="es"?ewe():t==="hi"?twe():X2e()}),rwe=()=>"Checked types",swe=()=>"已检查类型",iwe=()=>"نوع‌ها بررسی شد",awe=()=>"فحص الأنواع",owe=()=>"Comprobó los tipos",cwe=()=>"टाइप जाँचे",lwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?swe():t==="fa"?iwe():t==="ar"?awe():t==="es"?owe():t==="hi"?cwe():rwe()}),uwe=()=>"Clear annotations",_we=()=>"清除批注",fwe=()=>"پاک کردن یادداشت‌ها",dwe=()=>"مسح التعليقات",hwe=()=>"Borrar anotaciones",pwe=()=>"एनोटेशन साफ़ करें",FN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_we():t==="fa"?fwe():t==="ar"?dwe():t==="es"?hwe():t==="hi"?pwe():uwe()}),mwe=e=>`Clear the goal: ${e==null?void 0:e.goal}`,gwe=e=>`清除目标:${e==null?void 0:e.goal}`,vwe=e=>`پاک‌کردن هدف: ${e==null?void 0:e.goal}`,bwe=e=>`مسح الهدف: ${e==null?void 0:e.goal}`,ywe=e=>`Borrar el objetivo: ${e==null?void 0:e.goal}`,xwe=e=>`लक्ष्य हटाएँ: ${e==null?void 0:e.goal}`,HN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gwe(e):t==="fa"?vwe(e):t==="ar"?bwe(e):t==="es"?ywe(e):t==="hi"?xwe(e):mwe(e)}),wwe=()=>"Customize",kwe=()=>"自定义",Swe=()=>"سفارشی‌سازی",Cwe=()=>"تخصيص",Ewe=()=>"Personalizar",Nwe=()=>"कस्टमाइज़ करें",zwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kwe():t==="fa"?Swe():t==="ar"?Cwe():t==="es"?Ewe():t==="hi"?Nwe():wwe()}),jwe=()=>"Data sources",Awe=()=>"数据源",Twe=()=>"منابع داده",Rwe=()=>"مصادر البيانات",Mwe=()=>"Fuentes de datos",Owe=()=>"डेटा स्रोत",fw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Awe():t==="fa"?Twe():t==="ar"?Rwe():t==="es"?Mwe():t==="hi"?Owe():jwe()}),Dwe=()=>"Delegated a task to a new agent",Lwe=()=>"已将任务委派给新智能体",Iwe=()=>"وظیفه به عامل جدید واگذار شد",$we=()=>"فوّض مهمة إلى وكيل جديد",Bwe=()=>"Delegó una tarea a un nuevo agente",Pwe=()=>"एक नए एजेंट को टास्क सौंपा",Fwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lwe():t==="fa"?Iwe():t==="ar"?$we():t==="es"?Bwe():t==="hi"?Pwe():Dwe()}),Hwe=()=>"Delete",qwe=()=>"删除",Uwe=()=>"حذف",Gwe=()=>"حذف",Kwe=()=>"Eliminar",Vwe=()=>"हटाएं",_L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qwe():t==="fa"?Uwe():t==="ar"?Gwe():t==="es"?Kwe():t==="hi"?Vwe():Hwe()}),Wwe=()=>"This prompt runs a small 200-step training probe on your machine. Hit enter to get started.",Qwe=()=>"这条提示会在你的机器上运行一个小型 200 步训练探测。按 Enter 开始。",Xwe=()=>"این پیام یک کاوش آموزشی کوچک ۲۰۰ مرحله‌ای روی دستگاه شما اجرا می‌کند. برای شروع Enter را بزنید.",Ywe=()=>"يشغّل هذا الطلب اختبار تدريب صغيرًا من 200 خطوة على جهازك. اضغط Enter للبدء.",Zwe=()=>"Este prompt ejecuta en tu equipo una pequeña prueba de entrenamiento de 200 pasos. Pulsa Intro para empezar.",Jwe=()=>"यह प्रॉम्प्ट आपकी मशीन पर एक छोटा 200-स्टेप ट्रेनिंग परीक्षण चलाता है। शुरू करने के लिए एंटर दबाएं।",e4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qwe():t==="fa"?Xwe():t==="ar"?Ywe():t==="es"?Zwe():t==="hi"?Jwe():Wwe()}),t4e=()=>"to monitor it.",n4e=()=>"以查看进度。",r4e=()=>"بزنید.",s4e=()=>"لمتابعتها.",i4e=()=>"para seguirlo.",a4e=()=>"इस पर नज़र रखने के लिए।",qN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n4e():t==="fa"?r4e():t==="ar"?s4e():t==="es"?i4e():t==="hi"?a4e():t4e()}),o4e=()=>"The experiment is now running. Tap",c4e=()=>"实验正在运行。点按",l4e=()=>"آزمایش اکنون در حال اجراست. برای پیگیری روی",u4e=()=>"التجربة قيد التشغيل الآن. اضغط على",_4e=()=>"El experimento ya se está ejecutando. Pulsa",f4e=()=>"प्रयोग अब चल रहा है। टैप करें",UN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c4e():t==="fa"?l4e():t==="ar"?u4e():t==="es"?_4e():t==="hi"?f4e():o4e()}),d4e=()=>"Deny",h4e=()=>"拒绝",p4e=()=>"رد کردن",m4e=()=>"رفض",g4e=()=>"Denegar",v4e=()=>"अस्वीकार करें",b4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h4e():t==="fa"?p4e():t==="ar"?m4e():t==="es"?g4e():t==="hi"?v4e():d4e()}),y4e=()=>"Dismiss",x4e=()=>"关闭",w4e=()=>"بستن",k4e=()=>"إغلاق",S4e=()=>"Cerrar",C4e=()=>"खारिज करें",s1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x4e():t==="fa"?w4e():t==="ar"?k4e():t==="es"?S4e():t==="hi"?C4e():y4e()}),E4e=()=>"Edit and re-send",N4e=()=>"编辑并重新发送",z4e=()=>"ویرایش و ارسال دوباره",j4e=()=>"تعديل وإعادة الإرسال",A4e=()=>"Editar y reenviar",T4e=()=>"संपादित करें और फिर भेजें",GN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N4e():t==="fa"?z4e():t==="ar"?j4e():t==="es"?A4e():t==="hi"?T4e():E4e()}),R4e=()=>"Edit message",M4e=()=>"编辑消息",O4e=()=>"ویرایش پیام",D4e=()=>"تعديل الرسالة",L4e=()=>"Editar mensaje",I4e=()=>"संदेश संपादित करें",$4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M4e():t==="fa"?O4e():t==="ar"?D4e():t==="es"?L4e():t==="hi"?I4e():R4e()}),B4e=()=>"Edited a file",P4e=()=>"已编辑文件",F4e=()=>"فایل ویرایش شد",H4e=()=>"عدّل ملفًا",q4e=()=>"Editó un archivo",U4e=()=>"एक फ़ाइल संपादित की",KN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P4e():t==="fa"?F4e():t==="ar"?H4e():t==="es"?q4e():t==="hi"?U4e():B4e()}),G4e=()=>"Exit Bash mode",K4e=()=>"退出 Bash 模式",V4e=()=>"خروج از حالت Bash",W4e=()=>"الخروج من وضع Bash",Q4e=()=>"Salir del modo Bash",X4e=()=>"Bash मोड से बाहर निकलें",VN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K4e():t==="fa"?V4e():t==="ar"?W4e():t==="es"?Q4e():t==="hi"?X4e():G4e()}),Y4e=()=>"Exit Plan mode",Z4e=()=>"退出计划模式",J4e=()=>"خروج از حالت طرح",e3e=()=>"الخروج من وضع التخطيط",t3e=()=>"Salir del modo Plan",n3e=()=>"प्लान मोड से बाहर निकलें",WN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z4e():t==="fa"?J4e():t==="ar"?e3e():t==="es"?t3e():t==="hi"?n3e():Y4e()}),r3e=()=>"Failed:",s3e=()=>"失败:",i3e=()=>"ناموفق:",a3e=()=>"فشل:",o3e=()=>"Error:",c3e=()=>"विफल:",vS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s3e():t==="fa"?i3e():t==="ar"?a3e():t==="es"?o3e():t==="hi"?c3e():r3e()}),l3e=()=>"Filter sessions",u3e=()=>"筛选会话",_3e=()=>"فیلتر نشست‌ها",f3e=()=>"تصفية الجلسات",d3e=()=>"Filtrar sesiones",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=()=>"Goal",m3e=()=>"目标",g3e=()=>"هدف",v3e=()=>"الهدف",b3e=()=>"Objetivo",y3e=()=>"लक्ष्य",x3e=((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()}),w3e=()=>"is unavailable.",k3e=()=>"不可用。",S3e=()=>"در دسترس نیست.",C3e=()=>"غير متاح.",E3e=()=>"no está disponible.",N3e=()=>"उपलब्ध नहीं है।",z3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k3e():t==="fa"?S3e():t==="ar"?C3e():t==="es"?E3e():t==="hi"?N3e():w3e()}),j3e=()=>"Later queued messages will wait until this is retried or removed.",A3e=()=>"后续排队的消息会等待此消息重试或移除。",T3e=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",R3e=()=>"ستنتظر الرسائل التالية في قائمة الانتظار حتى تُعاد المحاولة أو تُزال هذه الرسالة.",M3e=()=>"Los mensajes que están después en la cola esperarán hasta que este se reintente o se quite.",O3e=()=>"बाद में कतार में लगे संदेश तब तक रुके रहेंगे जब तक इसे फिर से कोशिश न किया जाए या हटाया न जाए।",D3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A3e():t==="fa"?T3e():t==="ar"?R3e():t==="es"?M3e():t==="hi"?O3e():j3e()}),L3e=()=>"Listed files",I3e=()=>"已列出文件",$3e=()=>"فایل‌ها فهرست شد",B3e=()=>"سرد الملفات",P3e=()=>"Listó archivos",F3e=()=>"फ़ाइलों की सूची बनाई",XN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I3e():t==="fa"?$3e():t==="ar"?B3e():t==="es"?P3e():t==="hi"?F3e():L3e()}),H3e=()=>"Listed project runs",q3e=()=>"已列出项目运行",U3e=()=>"اجراهای پروژه فهرست شد",G3e=()=>"سرد عمليات تشغيل المشروع",K3e=()=>"Listó las ejecuciones del proyecto",V3e=()=>"प्रोजेक्ट रन की सूची बनाई",W3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q3e():t==="fa"?U3e():t==="ar"?G3e():t==="es"?K3e():t==="hi"?V3e():H3e()}),Q3e=()=>"Listed projects",X3e=()=>"已列出项目",Y3e=()=>"پروژه‌ها فهرست شد",Z3e=()=>"سرد المشاريع",J3e=()=>"Listó proyectos",e5e=()=>"प्रोजेक्ट की सूची बनाई",t5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X3e():t==="fa"?Y3e():t==="ar"?Z3e():t==="es"?J3e():t==="hi"?e5e():Q3e()}),n5e=()=>"Loading conversation…",r5e=()=>"正在加载对话…",s5e=()=>"در حال بارگیری گفتگو…",i5e=()=>"جارٍ تحميل المحادثة…",a5e=()=>"Cargando conversación…",o5e=()=>"बातचीत लोड हो रही है…",c5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r5e():t==="fa"?s5e():t==="ar"?i5e():t==="es"?a5e():t==="hi"?o5e():n5e()}),l5e=()=>"New Chat",u5e=()=>"新对话",_5e=()=>"گفتگوی جدید",f5e=()=>"محادثة جديدة",d5e=()=>"Nuevo chat",h5e=()=>"नई चैट",p5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u5e():t==="fa"?_5e():t==="ar"?f5e():t==="es"?d5e():t==="hi"?h5e():l5e()}),m5e=()=>"Next version",g5e=()=>"下一版本",v5e=()=>"نسخهٔ بعدی",b5e=()=>"النسخة التالية",y5e=()=>"Siguiente versión",x5e=()=>"अगला वर्शन",YN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g5e():t==="fa"?v5e():t==="ar"?b5e():t==="es"?y5e():t==="hi"?x5e():m5e()}),w5e=()=>"Open the session this agent spawned",k5e=()=>"打开此智能体创建的会话",S5e=()=>"باز کردن نشست ساخته‌شده توسط این عامل",C5e=()=>"فتح الجلسة التي أنشأها هذا الوكيل",E5e=()=>"Abrir la sesión que creó este agente",N5e=()=>"इस एजेंट द्वारा शुरू किया गया सेशन खोलें",z5e=((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()}),j5e=()=>"Opened web pages",A5e=()=>"已打开网页",T5e=()=>"صفحه‌های وب باز شد",R5e=()=>"فتح صفحات ويب",M5e=()=>"Abrió páginas web",O5e=()=>"वेब पेज खोले",D5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A5e():t==="fa"?T5e():t==="ar"?R5e():t==="es"?M5e():t==="hi"?O5e():j5e()}),L5e=()=>"Plan",I5e=()=>"计划",$5e=()=>"طرح",B5e=()=>"خطة",P5e=()=>"Plan",F5e=()=>"प्लान",H5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I5e():t==="fa"?$5e():t==="ar"?B5e():t==="es"?P5e():t==="hi"?F5e():L5e()}),q5e=()=>"Plan approved",U5e=()=>"计划已批准",G5e=()=>"طرح تأیید شد",K5e=()=>"تمت الموافقة على الخطة",V5e=()=>"Plan aprobado",W5e=()=>"प्लान स्वीकृत",Q5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U5e():t==="fa"?G5e():t==="ar"?K5e():t==="es"?V5e():t==="hi"?W5e():q5e()}),X5e=()=>"Plan rejected",Y5e=()=>"计划已拒绝",Z5e=()=>"طرح رد شد",J5e=()=>"رُفضت الخطة",eke=()=>"Plan rechazado",tke=()=>"प्लान अस्वीकृत",nke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y5e():t==="fa"?Z5e():t==="ar"?J5e():t==="es"?eke():t==="hi"?tke():X5e()}),rke=()=>"Plan resolved",ske=()=>"计划已处理",ike=()=>"طرح تعیین تکلیف شد",ake=()=>"تمت معالجة الخطة",oke=()=>"Plan resuelto",cke=()=>"प्लान सुलझाया गया",lke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ske():t==="fa"?ike():t==="ar"?ake():t==="es"?oke():t==="hi"?cke():rke()}),uke=()=>"Plan revision requested",_ke=()=>"已请求修改计划",fke=()=>"درخواست بازنگری طرح ثبت شد",dke=()=>"طُلب تعديل الخطة",hke=()=>"Cambios en el plan solicitados",pke=()=>"प्लान में बदलाव का अनुरोध",mke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ke():t==="fa"?fke():t==="ar"?dke():t==="es"?hke():t==="hi"?pke():uke()}),gke=()=>"Previous version",vke=()=>"上一版本",bke=()=>"نسخهٔ قبلی",yke=()=>"النسخة السابقة",xke=()=>"Versión anterior",wke=()=>"पिछला वर्शन",ZN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vke():t==="fa"?bke():t==="ar"?yke():t==="es"?xke():t==="hi"?wke():gke()}),kke=()=>"Ran a command",Ske=()=>"已运行命令",Cke=()=>"فرمان اجرا شد",Eke=()=>"نفّذ أمرًا",Nke=()=>"Ejecutó un comando",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=()=>"Ran tests",Tke=()=>"已运行测试",Rke=()=>"آزمون‌ها اجرا شد",Mke=()=>"شغّل الاختبارات",Oke=()=>"Ejecutó tests",Dke=()=>"टेस्ट चलाए",Lke=((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()}),Ike=()=>"Read a file",$ke=()=>"已读取文件",Bke=()=>"فایل خوانده شد",Pke=()=>"قرأ ملفًا",Fke=()=>"Leyó un archivo",Hke=()=>"एक फ़ाइल पढ़ी",qke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ke():t==="fa"?Bke():t==="ar"?Pke():t==="es"?Fke():t==="hi"?Hke():Ike()}),Uke=()=>"Read Git history",Gke=()=>"已读取 Git 历史",Kke=()=>"تاریخچهٔ Git خوانده شد",Vke=()=>"قرأ سجل Git",Wke=()=>"Leyó el historial de Git",Qke=()=>"Git इतिहास पढ़ा",Xke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gke():t==="fa"?Kke():t==="ar"?Vke():t==="es"?Wke():t==="hi"?Qke():Uke()}),Yke=()=>"Read project details",Zke=()=>"已读取项目详情",Jke=()=>"جزئیات پروژه خوانده شد",eSe=()=>"قرأ تفاصيل المشروع",tSe=()=>"Leyó los detalles del proyecto",nSe=()=>"प्रोजेक्ट विवरण पढ़ा",rSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zke():t==="fa"?Jke():t==="ar"?eSe():t==="es"?tSe():t==="hi"?nSe():Yke()}),sSe=()=>"Reject",iSe=()=>"拒绝",aSe=()=>"رد کردن",oSe=()=>"رفض",cSe=()=>"Rechazar",lSe=()=>"अस्वीकार करें",uSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iSe():t==="fa"?aSe():t==="ar"?oSe():t==="es"?cSe():t==="hi"?lSe():sSe()}),_Se=()=>"Remove",fSe=()=>"移除",dSe=()=>"حذف",hSe=()=>"إزالة",pSe=()=>"Quitar",mSe=()=>"हटाएं",gSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fSe():t==="fa"?dSe():t==="ar"?hSe():t==="es"?pSe():t==="hi"?mSe():_Se()}),vSe=()=>"Remove annotation",bSe=()=>"移除批注",ySe=()=>"حذف یادداشت",xSe=()=>"إزالة التعليق",wSe=()=>"Quitar anotación",kSe=()=>"एनोटेशन हटाएं",SSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bSe():t==="fa"?ySe():t==="ar"?xSe():t==="es"?wSe():t==="hi"?kSe():vSe()}),CSe=()=>"Remove file",ESe=()=>"移除文件",NSe=()=>"حذف فایل",zSe=()=>"إزالة الملف",jSe=()=>"Quitar archivo",ASe=()=>"फ़ाइल हटाएं",JN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ESe():t==="fa"?NSe():t==="ar"?zSe():t==="es"?jSe():t==="hi"?ASe():CSe()}),TSe=()=>"Remove image",RSe=()=>"移除图片",MSe=()=>"حذف تصویر",OSe=()=>"إزالة الصورة",DSe=()=>"Quitar imagen",LSe=()=>"इमेज हटाएं",ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RSe():t==="fa"?MSe():t==="ar"?OSe():t==="es"?DSe():t==="hi"?LSe():TSe()}),ISe=()=>"Remove queued message",$Se=()=>"移除排队消息",BSe=()=>"حذف پیام صف",PSe=()=>"إزالة الرسالة من قائمة الانتظار",FSe=()=>"Quitar mensaje en cola",HSe=()=>"कतार में लगा संदेश हटाएं",tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Se():t==="fa"?BSe():t==="ar"?PSe():t==="es"?FSe():t==="hi"?HSe():ISe()}),qSe=()=>"Rename",USe=()=>"重命名",GSe=()=>"تغییر نام",KSe=()=>"إعادة تسمية",VSe=()=>"Renombrar",WSe=()=>"नाम बदलें",fL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?USe():t==="fa"?GSe():t==="ar"?KSe():t==="es"?VSe():t==="hi"?WSe():qSe()}),QSe=()=>"Reviewed code changes",XSe=()=>"已审查代码更改",YSe=()=>"تغییرات کد بازبینی شد",ZSe=()=>"راجع تغييرات الشيفرة",JSe=()=>"Revisó cambios en el código",e6e=()=>"कोड में बदलावों की समीक्षा की",t6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XSe():t==="fa"?YSe():t==="ar"?ZSe():t==="es"?JSe():t==="hi"?e6e():QSe()}),n6e=()=>"Run",r6e=()=>"运行",s6e=()=>"اجرا",i6e=()=>"تشغيل",a6e=()=>"Ejecutar",o6e=()=>"रन",nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r6e():t==="fa"?s6e():t==="ar"?i6e():t==="es"?a6e():t==="hi"?o6e():n6e()}),c6e=()=>"Selected chat text",l6e=()=>"已选聊天文本",u6e=()=>"متن انتخاب‌شدهٔ گفتگو",_6e=()=>"النص المحدد من المحادثة",f6e=()=>"Texto seleccionado del chat",d6e=()=>"चयनित चैट टेक्स्ट",h6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l6e():t==="fa"?u6e():t==="ar"?_6e():t==="es"?f6e():t==="hi"?d6e():c6e()}),p6e=()=>"Selected text:",m6e=()=>"已选文本:",g6e=()=>"متن انتخاب‌شده:",v6e=()=>"النص المحدد:",b6e=()=>"Texto seleccionado:",y6e=()=>"चयनित टेक्स्ट:",x6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m6e():t==="fa"?g6e():t==="ar"?v6e():t==="es"?b6e():t==="hi"?y6e():p6e()}),w6e=()=>"Send",k6e=()=>"发送",S6e=()=>"ارسال",C6e=()=>"إرسال رسالة",E6e=()=>"Enviar",N6e=()=>"भेजें",j3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k6e():t==="fa"?S6e():t==="ar"?C6e():t==="es"?E6e():t==="hi"?N6e():w6e()}),z6e=()=>"Session options",j6e=()=>"会话选项",A6e=()=>"گزینه‌های نشست",T6e=()=>"خيارات الجلسة",R6e=()=>"Opciones de la sesión",M6e=()=>"सेशन विकल्प",rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j6e():t==="fa"?A6e():t==="ar"?T6e():t==="es"?R6e():t==="hi"?M6e():z6e()}),O6e=()=>"Session title",D6e=()=>"会话标题",L6e=()=>"عنوان نشست",I6e=()=>"عنوان الجلسة",$6e=()=>"Título de la sesión",B6e=()=>"सेशन शीर्षक",P6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D6e():t==="fa"?L6e():t==="ar"?I6e():t==="es"?$6e():t==="hi"?B6e():O6e()}),F6e=()=>"Show sidebar",H6e=()=>"显示侧边栏",q6e=()=>"نمایش نوار کناری",U6e=()=>"إظهار الشريط الجانبي",G6e=()=>"Mostrar barra lateral",K6e=()=>"साइडबार दिखाएं",sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H6e():t==="fa"?q6e():t==="ar"?U6e():t==="es"?G6e():t==="hi"?K6e():F6e()}),V6e=()=>"Started an experiment run",W6e=()=>"已启动实验运行",Q6e=()=>"اجرای آزمایش آغاز شد",X6e=()=>"بدأ تشغيل تجربة",Y6e=()=>"Inició una ejecución de experimento",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():V6e()}),eCe=()=>"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.",tCe=()=>"我有一个想探索的粗略想法。请不断向我提问,直到我们得到一个具体、可检验的研究问题和第一个实验的计划。",nCe=()=>"یک ایدهٔ خام دارم که می‌خواهم بررسی کنم. از من سؤال بپرس تا به یک پرسش پژوهشی مشخص و قابل آزمون و یک برنامه برای اولین آزمایش برسیم.",rCe=()=>"لديّ فكرة أولية أريد استكشافها. اطرح عليّ أسئلة حتى نصل إلى سؤال بحثي محدد وقابل للاختبار وخطة للتجربة الأولى.",sCe=()=>"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.",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=()=>"Shape a research question",cCe=()=>"明确研究问题",lCe=()=>"شکل دادن به پرسش پژوهشی",uCe=()=>"صياغة سؤال بحثي",_Ce=()=>"Definir una pregunta de investigación",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=()=>"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.",pCe=()=>"先问我要研究的主题,然后检索相关文献,总结最强的基线方法和尚未解决的问题,并建议一个小实验可以在哪里做出贡献。",mCe=()=>"اول موضوع را از من بپرس، سپس ادبیات آن را جست‌وجو کن، قوی‌ترین خط‌های مبنا و مسائل باز را خلاصه کن و پیشنهاد بده یک آزمایش کوچک کجا می‌تواند مفید باشد.",gCe=()=>"اسألني عن الموضوع أولًا، ثم ابحث في الأدبيات حوله، ولخّص أقوى خطوط الأساس والمسائل المفتوحة، واقترح أين يمكن لتجربة صغيرة أن تسهم.",vCe=()=>"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.",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=()=>"Survey related work",wCe=()=>"调研相关工作",kCe=()=>"مرور کارهای مرتبط",SCe=()=>"استعراض الأعمال ذات الصلة",CCe=()=>"Revisar trabajos relacionados",ECe=()=>"संबंधित कार्य का सर्वेक्षण करें",NCe=((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()}),zCe=()=>"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.",jCe=()=>"搭建一个最小的训练脚本,包含配置、依赖和运行命令,能在单张 GPU 上几分钟内端到端训练一个小模型。",ACe=()=>"یک اسکریپت آموزش حداقلی با پیکربندی، وابستگی‌ها و دستور اجرا آماده کن که یک مدل کوچک را در چند دقیقه روی یک GPU به‌طور کامل آموزش دهد.",TCe=()=>"أنشئ أصغر سكربت تدريب ممكن مع إعدادات واعتماديات وأمر تشغيل يدرّب نموذجًا صغيرًا من البداية إلى النهاية في دقائق على وحدة GPU واحدة.",RCe=()=>"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.",MCe=()=>"एक न्यूनतम ट्रेनिंग स्क्रिप्ट सेट अप करें, जिसमें एक कॉन्फ़िग, डिपेंडेंसी और एक रन कमांड हो, जो एक GPU पर कुछ ही मिनटों में एक छोटे मॉडल को पूरी तरह ट्रेन कर दे।",OCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jCe():t==="fa"?ACe():t==="ar"?TCe():t==="es"?RCe():t==="hi"?MCe():zCe()}),DCe=()=>"Scaffold a baseline",LCe=()=>"搭建基线",ICe=()=>"ساخت خط مبنا",$Ce=()=>"بناء خط أساس",BCe=()=>"Crear un modelo de referencia",PCe=()=>"एक बेसलाइन तैयार करें",FCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LCe():t==="fa"?ICe():t==="ar"?$Ce():t==="es"?BCe():t==="hi"?PCe():DCe()}),HCe=()=>"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.",qCe=()=>"从我们的计划中选一个成本低、定义明确的假设,把它实现为基线的一个变体,并启动第一次运行来比较两者。",UCe=()=>"یک فرضیهٔ کم‌هزینه و مشخص از برنامه‌مان انتخاب کن، آن را به‌صورت یک نسخهٔ تغییریافته از خط مبنا پیاده کن و اولین اجرا را برای مقایسهٔ این دو شروع کن.",GCe=()=>"اختر فرضية واحدة منخفضة التكلفة ومحددة جيدًا من خطتنا، ونفّذها كنسخة معدّلة من خط الأساس، وابدأ أول تشغيل لمقارنة الاثنين.",KCe=()=>"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.",VCe=()=>"हमारी योजना से एक सस्ती, स्पष्ट रूप से परिभाषित परिकल्पना चुनें, इसे बेसलाइन के एक वेरिएंट के रूप में लागू करें, और दोनों की तुलना के लिए पहला रन शुरू करें।",WCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qCe():t==="fa"?UCe():t==="ar"?GCe():t==="es"?KCe():t==="hi"?VCe():HCe()}),QCe=()=>"Run a first experiment",XCe=()=>"运行第一个实验",YCe=()=>"اجرای اولین آزمایش",ZCe=()=>"تشغيل التجربة الأولى",JCe=()=>"Ejecutar un primer experimento",e7e=()=>"पहला प्रयोग चलाएं",t7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XCe():t==="fa"?YCe():t==="ar"?ZCe():t==="es"?JCe():t==="hi"?e7e():QCe()}),n7e=()=>"Reading the project to suggest where to start…",r7e=()=>"正在阅读项目以建议从哪里开始…",s7e=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",i7e=()=>"جارٍ قراءة المشروع لاقتراح نقطة البدء…",a7e=()=>"Leyendo el proyecto para sugerir por dónde empezar…",o7e=()=>"कहाँ से शुरू करें यह सुझाने के लिए प्रोजेक्ट पढ़ा जा रहा है…",c7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r7e():t==="fa"?s7e():t==="ar"?i7e():t==="es"?a7e():t==="hi"?o7e():n7e()}),l7e=()=>"Starter prompts",u7e=()=>"入门提示",_7e=()=>"پیشنهادهای شروع",f7e=()=>"اقتراحات للبدء",d7e=()=>"Prompts para empezar",h7e=()=>"शुरुआती प्रॉम्प्ट",p7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u7e():t==="fa"?_7e():t==="ar"?f7e():t==="es"?d7e():t==="hi"?h7e():l7e()}),m7e=()=>"Stop",g7e=()=>"停止",v7e=()=>"توقف",b7e=()=>"إيقاف",y7e=()=>"Detener",x7e=()=>"रोकें",iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g7e():t==="fa"?v7e():t==="ar"?b7e():t==="es"?y7e():t==="hi"?x7e():m7e()}),w7e=()=>"Submit",k7e=()=>"提交",S7e=()=>"ارسال",C7e=()=>"إرسال",E7e=()=>"Enviar",N7e=()=>"सबमिट करें",z7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k7e():t==="fa"?S7e():t==="ar"?C7e():t==="es"?E7e():t==="hi"?N7e():w7e()}),j7e=()=>"Tool failed",A7e=()=>"工具失败",T7e=()=>"ابزار ناموفق بود",R7e=()=>"فشلت الأداة",M7e=()=>"Error en la herramienta",O7e=()=>"टूल विफल",D7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A7e():t==="fa"?T7e():t==="ar"?R7e():t==="es"?M7e():t==="hi"?O7e():j7e()}),L7e=()=>"Used tools",I7e=()=>"已使用工具",$7e=()=>"ابزارها استفاده شد",B7e=()=>"استخدم الأدوات",P7e=()=>"Usó herramientas",F7e=()=>"टूल इस्तेमाल किए",dL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I7e():t==="fa"?$7e():t==="ar"?B7e():t==="es"?P7e():t==="hi"?F7e():L7e()}),H7e=()=>"View full plan",q7e=()=>"查看完整计划",U7e=()=>"مشاهدهٔ طرح کامل",G7e=()=>"عرض الخطة كاملة",K7e=()=>"Ver plan completo",V7e=()=>"पूरा प्लान देखें",W7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q7e():t==="fa"?U7e():t==="ar"?G7e():t==="es"?K7e():t==="hi"?V7e():H7e()}),Q7e=()=>"Waited for an experiment run",X7e=()=>"已等待实验运行",Y7e=()=>"برای اجرای آزمایش صبر شد",Z7e=()=>"انتظر تشغيل تجربة",J7e=()=>"Esperó a una ejecución de experimento",e8e=()=>"एक प्रयोग रन का इंतज़ार किया",t8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X7e():t==="fa"?Y7e():t==="ar"?Z7e():t==="es"?J7e():t==="hi"?e8e():Q7e()}),n8e=()=>"Waiting for your input…",r8e=()=>"正在等待你的输入…",s8e=()=>"منتظر ورودی شما…",i8e=()=>"في انتظار إدخالك…",a8e=()=>"Esperando tu respuesta…",o8e=()=>"आपके इनपुट का इंतज़ार है…",c8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r8e():t==="fa"?s8e():t==="ar"?i8e():t==="es"?a8e():t==="hi"?o8e():n8e()}),l8e=()=>"What should we research?",u8e=()=>"我们应该研究什么?",_8e=()=>"چه چیزی را پژوهش کنیم؟",f8e=()=>"ما الذي نبحثه؟",d8e=()=>"¿Qué investigamos?",h8e=()=>"हमें क्या शोध करना चाहिए?",p8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u8e():t==="fa"?_8e():t==="ar"?f8e():t==="es"?d8e():t==="hi"?h8e():l8e()}),m8e=()=>"You, mid-task",g8e=()=>"你(任务进行中)",v8e=()=>"شما، هنگام انجام وظیفه",b8e=()=>"أنت، أثناء المهمة",y8e=()=>"Tú, durante la tarea",x8e=()=>"आप, टास्क के बीच में",w8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g8e():t==="fa"?v8e():t==="ar"?b8e():t==="es"?y8e():t==="hi"?x8e():m8e()}),k8e=()=>"Pasted image",S8e=()=>"粘贴的图片",C8e=()=>"تصویر جای‌گذاری‌شده",E8e=()=>"صورة ملصقة",N8e=()=>"Imagen pegada",z8e=()=>"पेस्ट की गई इमेज",hL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S8e():t==="fa"?C8e():t==="ar"?E8e():t==="es"?N8e():t==="hi"?z8e():k8e()}),j8e=()=>"Plan",A8e=()=>"计划",T8e=()=>"طرح",R8e=()=>"خطة",M8e=()=>"Plan",O8e=()=>"प्लान",pL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A8e():t==="fa"?T8e():t==="ar"?R8e():t==="es"?M8e():t==="hi"?O8e():j8e()}),D8e=()=>"Plan mode — ready to proceed?",L8e=()=>"计划模式 — 准备好继续了吗?",I8e=()=>"حالت طرح — آماده‌اید ادامه دهید؟",$8e=()=>"وضع التخطيط — جاهز للمتابعة؟",B8e=()=>"Modo Plan — ¿listo para continuar?",P8e=()=>"प्लान मोड — आगे बढ़ने के लिए तैयार?",F8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L8e():t==="fa"?I8e():t==="ar"?$8e():t==="es"?B8e():t==="hi"?P8e():D8e()}),H8e=()=>"Proposed plan",q8e=()=>"提议的计划",U8e=()=>"طرح پیشنهادی",G8e=()=>"خطة مقترحة",K8e=()=>"Plan propuesto",V8e=()=>"प्रस्तावित प्लान",az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q8e():t==="fa"?U8e():t==="ar"?G8e():t==="es"?K8e():t==="hi"?V8e():H8e()}),W8e=()=>"Question",Q8e=()=>"问题",X8e=()=>"پرسش",Y8e=()=>"سؤال",Z8e=()=>"Pregunta",J8e=()=>"प्रश्न",e9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q8e():t==="fa"?X8e():t==="ar"?Y8e():t==="es"?Z8e():t==="hi"?J8e():W8e()}),t9e=()=>"Queued",n9e=()=>"已排队",r9e=()=>"در صف",s9e=()=>"في قائمة الانتظار",i9e=()=>"En cola",a9e=()=>"कतार में",o9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n9e():t==="fa"?r9e():t==="ar"?s9e():t==="es"?i9e():t==="hi"?a9e():t9e()}),c9e=()=>"Recents",l9e=()=>"最近",u9e=()=>"اخیر",_9e=()=>"الأخيرة",f9e=()=>"Recientes",d9e=()=>"हाल की",mL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l9e():t==="fa"?u9e():t==="ar"?_9e():t==="es"?f9e():t==="hi"?d9e():c9e()}),h9e=()=>"Re-check its setup.",p9e=()=>"请重新检查其设置。",m9e=()=>"راه‌اندازی آن را دوباره بررسی کنید.",g9e=()=>"أعد فحص إعداده.",v9e=()=>"Vuelve a comprobar su configuración.",b9e=()=>"इसका सेटअप फिर से जाँचें।",y9e=((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()}),x9e=()=>"Could not recover this turn. Try again.",w9e=()=>"无法恢复本轮。请重试。",k9e=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",S9e=()=>"تعذّرت استعادة هذه الجولة. حاول مجددًا.",C9e=()=>"No se pudo recuperar este turno. Inténtalo de nuevo.",E9e=()=>"यह टर्न रिकवर नहीं हो सका। फिर से कोशिश करें।",N9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w9e():t==="fa"?k9e():t==="ar"?S9e():t==="es"?C9e():t==="hi"?E9e():x9e()}),z9e=()=>"Could not remove the queued message. Try again.",j9e=()=>"无法移除排队消息。请重试。",A9e=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",T9e=()=>"تعذّرت إزالة الرسالة من قائمة الانتظار. حاول مجددًا.",R9e=()=>"No se pudo quitar el mensaje en cola. Inténtalo de nuevo.",M9e=()=>"कतार में लगा संदेश हटाया नहीं जा सका। फिर से कोशिश करें।",O9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j9e():t==="fa"?A9e():t==="ar"?T9e():t==="es"?R9e():t==="hi"?M9e():z9e()}),D9e=e=>`Could not re-send: ${e==null?void 0:e.error}`,L9e=e=>`无法重新发送:${e==null?void 0:e.error}`,I9e=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,$9e=e=>`تعذّرت إعادة الإرسال: ${e==null?void 0:e.error}`,B9e=e=>`No se pudo reenviar: ${e==null?void 0:e.error}`,P9e=e=>`फिर से नहीं भेजा जा सका: ${e==null?void 0:e.error}`,F9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?L9e(e):t==="fa"?I9e(e):t==="ar"?$9e(e):t==="es"?B9e(e):t==="hi"?P9e(e):D9e(e)}),H9e=()=>"Resolved",q9e=()=>"已处理",U9e=()=>"رسیدگی شد",G9e=()=>"مُعالَج",K9e=()=>"Resuelto",V9e=()=>"सुलझाया गया",W9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q9e():t==="fa"?U9e():t==="ar"?G9e():t==="es"?K9e():t==="hi"?V9e():H9e()}),Q9e=()=>"Could not retry the queued message. Try again.",X9e=()=>"无法重试排队消息。请重试。",Y9e=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",Z9e=()=>"تعذّرت إعادة محاولة إرسال الرسالة في قائمة الانتظار. حاول مجددًا.",J9e=()=>"No se pudo reintentar el mensaje en cola. Inténtalo de nuevo.",eEe=()=>"कतार में लगा संदेश फिर से नहीं भेजा जा सका। फिर से कोशिश करें।",tEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X9e():t==="fa"?Y9e():t==="ar"?Z9e():t==="es"?J9e():t==="hi"?eEe():Q9e()}),nEe=()=>"run logs",rEe=()=>"运行日志",sEe=()=>"گزارش‌های اجرا",iEe=()=>"سجلات التشغيل",aEe=()=>"logs de ejecución",oEe=()=>"रन लॉग",cEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rEe():t==="fa"?sEe():t==="ar"?iEe():t==="es"?aEe():t==="hi"?oEe():nEe()}),lEe=()=>"Scroll to bottom",uEe=()=>"滚动到底部",_Ee=()=>"رفتن به پایین گفتگو",fEe=()=>"التمرير إلى الأسفل",dEe=()=>"Ir al final",hEe=()=>"नीचे तक स्क्रॉल करें",oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uEe():t==="fa"?_Ee():t==="ar"?fEe():t==="es"?dEe():t==="hi"?hEe():lEe()}),pEe=()=>"The selected harness is unavailable",mEe=()=>"所选智能体工具不可用",gEe=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",vEe=()=>"أداة البرمجة المحددة غير متاحة",bEe=()=>"El agente seleccionado no está disponible",yEe=()=>"चुना गया हार्नेस उपलब्ध नहीं है",i1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mEe():t==="fa"?gEe():t==="ar"?vEe():t==="es"?bEe():t==="hi"?yEe():pEe()}),xEe=()=>"Session limit reached",wEe=()=>"已达到会话使用限额",kEe=()=>"به سقف مصرف نشست رسیده‌اید",SEe=()=>"تم بلوغ حد الاستخدام",CEe=()=>"Límite de la sesión alcanzado",EEe=()=>"सेशन सीमा पूरी हो गई",NEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wEe():t==="fa"?kEe():t==="ar"?SEe():t==="es"?CEe():t==="hi"?EEe():xEe()}),zEe=()=>"The chat session was not created",jEe=()=>"未能创建聊天会话",AEe=()=>"نشست گفت‌وگو ایجاد نشد",TEe=()=>"لم تُنشأ جلسة المحادثة",REe=()=>"No se creó la sesión de chat",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=()=>"Show full conversation",LEe=()=>"显示完整对话",IEe=()=>"نمایش کامل گفتگو",$Ee=()=>"عرض المحادثة كاملة",BEe=()=>"Mostrar la conversación completa",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=()=>" · Spawned by another agent",qEe=()=>" · 由另一个智能体创建",UEe=()=>" · ساخته‌شده به‌دست عامل دیگر",GEe=()=>" · أنشأه وكيل آخر",KEe=()=>" · Creada por otro agente",VEe=()=>" · किसी और एजेंट द्वारा शुरू किया गया",WEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qEe():t==="fa"?UEe():t==="ar"?GEe():t==="es"?KEe():t==="hi"?VEe():HEe()}),QEe=()=>"Starting…",XEe=()=>"正在启动…",YEe=()=>"در حال شروع…",ZEe=()=>"جارٍ البدء…",JEe=()=>"Iniciando…",eNe=()=>"शुरू हो रहा है…",tNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XEe():t==="fa"?YEe():t==="ar"?ZEe():t==="es"?JEe():t==="hi"?eNe():QEe()}),nNe=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,rNe=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,sNe=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,iNe=e=>`وجّه ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} للإضافة إلى قائمة الانتظار)`,aNe=e=>`Guía a ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} para poner en cola)`,oNe=e=>`${e==null?void 0:e.harness} को दिशा दें… (कतार में लगाने के लिए ${e==null?void 0:e.shortcut})`,cNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rNe(e):t==="fa"?sNe(e):t==="ar"?iNe(e):t==="es"?aNe(e):t==="hi"?oNe(e):nNe(e)}),lNe=()=>"Could not stop the turn. Try again.",uNe=()=>"无法停止本轮。请重试。",_Ne=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",fNe=()=>"تعذّر إيقاف الجولة. حاول مجددًا.",dNe=()=>"No se pudo detener el turno. Inténtalo de nuevo.",hNe=()=>"टर्न रोका नहीं जा सका। फिर से कोशिश करें।",pNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uNe():t==="fa"?_Ne():t==="ar"?fNe():t==="es"?dNe():t==="hi"?hNe():lNe()}),mNe=e=>`Could not switch fork: ${e==null?void 0:e.error}`,gNe=e=>`无法切换分支:${e==null?void 0:e.error}`,vNe=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,bNe=e=>`تعذّر تبديل التفرّع: ${e==null?void 0:e.error}`,yNe=e=>`No se pudo cambiar de bifurcación: ${e==null?void 0:e.error}`,xNe=e=>`फ़ोर्क नहीं बदला जा सका: ${e==null?void 0:e.error}`,wNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gNe(e):t==="fa"?vNe(e):t==="ar"?bNe(e):t==="es"?yNe(e):t==="hi"?xNe(e):mNe(e)}),kNe=()=>"The agent",SNe=()=>"智能体",CNe=()=>"عامل",ENe=()=>"الوكيل",NNe=()=>"El agente",zNe=()=>"एजेंट",jNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SNe():t==="fa"?CNe():t==="ar"?ENe():t==="es"?NNe():t==="hi"?zNe():kNe()}),ANe=()=>"Thinking",TNe=()=>"正在思考",RNe=()=>"در حال فکر کردن",MNe=()=>"جارٍ التفكير",ONe=()=>"Pensando",DNe=()=>"सोच रहा है",LNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TNe():t==="fa"?RNe():t==="ar"?MNe():t==="es"?ONe():t==="hi"?DNe():ANe()}),INe=()=>"Could not toggle Plan mode. Try again.",$Ne=()=>"无法切换计划模式。请重试。",BNe=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",PNe=()=>"تعذّر تبديل وضع التخطيط. حاول مجددًا.",FNe=()=>"No se pudo cambiar el modo Plan. Inténtalo de nuevo.",HNe=()=>"प्लान मोड टॉगल नहीं हो सका। फिर से कोशिश करें।",cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ne():t==="fa"?BNe():t==="ar"?PNe():t==="es"?FNe():t==="hi"?HNe():INe()}),qNe=()=>"This turn did not finish.",UNe=()=>"本轮未完成。",GNe=()=>"این نوبت کامل نشد.",KNe=()=>"لم تكتمل هذه الجولة.",VNe=()=>"Este turno no terminó.",WNe=()=>"यह टर्न पूरा नहीं हुआ।",lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UNe():t==="fa"?GNe():t==="ar"?KNe():t==="es"?VNe():t==="hi"?WNe():qNe()}),QNe=()=>"Type a custom answer…",XNe=()=>"输入自定义回答…",YNe=()=>"پاسخ دلخواه را بنویسید…",ZNe=()=>"اكتب إجابة مخصصة…",JNe=()=>"Escribe una respuesta personalizada…",eze=()=>"अपना जवाब टाइप करें…",tze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XNe():t==="fa"?YNe():t==="ar"?ZNe():t==="es"?JNe():t==="hi"?eze():QNe()}),nze=()=>"Unarchive",rze=()=>"取消归档",sze=()=>"خارج کردن از بایگانی",ize=()=>"إلغاء الأرشفة",aze=()=>"Desarchivar",oze=()=>"आर्काइव से निकालें",cze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rze():t==="fa"?sze():t==="ar"?ize():t==="es"?aze():t==="hi"?oze():nze()}),lze=()=>"Untitled",uze=()=>"未命名",_ze=()=>"بدون عنوان",fze=()=>"بدون عنوان",dze=()=>"Sin título",hze=()=>"बिना शीर्षक",Md=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uze():t==="fa"?_ze():t==="ar"?fze():t==="es"?dze():t==="hi"?hze():lze()}),pze=()=>"Could not update autonomy. Try again.",mze=()=>"无法更新自主程度。请重试。",gze=()=>"به‌روزرسانی خودمختاری انجام نشد. دوباره تلاش کنید.",vze=()=>"تعذّر تحديث الاستقلالية. حاول مجددًا.",bze=()=>"No se pudo actualizar la autonomía. Inténtalo de nuevo.",yze=()=>"स्वायत्तता अपडेट नहीं हो सकी। फिर से कोशिश करें।",xze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mze():t==="fa"?gze():t==="ar"?vze():t==="es"?bze():t==="hi"?yze():pze()}),wze=()=>"Could not update permissions. Try again.",kze=()=>"无法更新权限。请重试。",Sze=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",Cze=()=>"تعذّر تحديث الأذونات. حاول مجددًا.",Eze=()=>"No se pudieron actualizar los permisos. Inténtalo de nuevo.",Nze=()=>"अनुमतियाँ अपडेट नहीं हो सकीं। फिर से कोशिश करें।",zze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kze():t==="fa"?Sze():t==="ar"?Cze():t==="es"?Eze():t==="hi"?Nze():wze()}),jze=()=>"Work details",Aze=()=>"工作详情",Tze=()=>"جزئیات کار",Rze=()=>"تفاصيل العمل",Mze=()=>"Detalles del trabajo",Oze=()=>"काम का विवरण",Dze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aze():t==="fa"?Tze():t==="ar"?Rze():t==="es"?Mze():t==="hi"?Oze():jze()}),Lze=e=>`${e==null?void 0:e.minutes}m ${e==null?void 0:e.seconds}s`,Ize=e=>`${e==null?void 0:e.minutes}分${e==null?void 0:e.seconds}秒`,$ze=e=>`${e==null?void 0:e.minutes} دقیقه ${e==null?void 0:e.seconds} ثانیه`,Bze=e=>`${e==null?void 0:e.minutes}د ${e==null?void 0:e.seconds}ث`,Pze=e=>`${e==null?void 0:e.minutes} min ${e==null?void 0:e.seconds} s`,Fze=e=>`${e==null?void 0:e.minutes}मि ${e==null?void 0:e.seconds}से`,Hze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ize(e):t==="fa"?$ze(e):t==="ar"?Bze(e):t==="es"?Pze(e):t==="hi"?Fze(e):Lze(e)}),qze=e=>`Worked for ${e==null?void 0:e.duration}`,Uze=e=>`已工作 ${e==null?void 0:e.duration}`,Gze=e=>`به‌مدت ${e==null?void 0:e.duration} کار کرد`,Kze=e=>`عمل لمدة ${e==null?void 0:e.duration}`,Vze=e=>`Trabajó durante ${e==null?void 0:e.duration}`,Wze=e=>`${e==null?void 0:e.duration} तक काम किया`,Qze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Uze(e):t==="fa"?Gze(e):t==="ar"?Kze(e):t==="es"?Vze(e):t==="hi"?Wze(e):qze(e)}),Xze=()=>"Working…",Yze=()=>"正在工作…",Zze=()=>"در حال کار…",Jze=()=>"جارٍ العمل…",eje=()=>"Trabajando…",tje=()=>"काम हो रहा है…",bS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yze():t==="fa"?Zze():t==="ar"?Jze():t==="es"?eje():t==="hi"?tje():Xze()}),nje=()=>"Close tab",rje=()=>"关闭标签页",sje=()=>"بستن زبانه",ije=()=>"إغلاق التبويب",aje=()=>"Cerrar pestaña",oje=()=>"टैब बंद करें",cje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rje():t==="fa"?sje():t==="ar"?ije():t==="es"?aje():t==="hi"?oje():nje()}),lje=()=>"Changes",uje=()=>"更改",_je=()=>"تغییرات",fje=()=>"التغييرات",dje=()=>"Cambios",hje=()=>"बदलाव",gL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uje():t==="fa"?_je():t==="ar"?fje():t==="es"?dje():t==="hi"?hje():lje()}),pje=()=>"Code browser view",mje=()=>"代码浏览器视图",gje=()=>"نمای مرورگر کد",vje=()=>"عرض متصفح الشيفرة",bje=()=>"Vista del explorador de código",yje=()=>"कोड ब्राउज़र व्यू",xje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mje():t==="fa"?gje():t==="ar"?vje():t==="es"?bje():t==="hi"?yje():pje()}),wje=()=>"Files",kje=()=>"文件",Sje=()=>"فایل‌ها",Cje=()=>"الملفات",Eje=()=>"Archivos",Nje=()=>"फ़ाइलें",zje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kje():t==="fa"?Sje():t==="ar"?Cje():t==="es"?Eje():t==="hi"?Nje():wje()}),jje=()=>"Refresh",Aje=()=>"刷新",Tje=()=>"تازه‌سازی",Rje=()=>"تحديث",Mje=()=>"Actualizar",Oje=()=>"रीफ़्रेश करें",uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aje():t==="fa"?Tje():t==="ar"?Rje():t==="es"?Mje():t==="hi"?Oje():jje()}),Dje=()=>"listing truncated",Lje=()=>"列表已截断",Ije=()=>"فهرست کوتاه شده است",$je=()=>"القائمة مقتطعة",Bje=()=>"listado truncado",Pje=()=>"सूची छोटी की गई",Fje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lje():t==="fa"?Ije():t==="ar"?$je():t==="es"?Bje():t==="hi"?Pje():Dje()}),Hje=()=>"No files.",qje=()=>"没有文件。",Uje=()=>"فایلی وجود ندارد.",Gje=()=>"لا توجد ملفات.",Kje=()=>"No hay archivos.",Vje=()=>"कोई फ़ाइल नहीं।",Wje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qje():t==="fa"?Uje():t==="ar"?Gje():t==="es"?Kje():t==="hi"?Vje():Hje()}),Qje=()=>"Refresh failed:",Xje=()=>"刷新失败:",Yje=()=>"تازه‌سازی ناموفق بود:",Zje=()=>"فشل التحديث:",Jje=()=>"Error al actualizar:",eAe=()=>"रीफ़्रेश विफल:",tAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xje():t==="fa"?Yje():t==="ar"?Zje():t==="es"?Jje():t==="hi"?eAe():Qje()}),nAe=()=>"Cancelling…",rAe=()=>"正在取消…",sAe=()=>"در حال لغو…",iAe=()=>"جارٍ الإلغاء…",aAe=()=>"Cancelando…",oAe=()=>"रद्द हो रहा है…",cAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rAe():t==="fa"?sAe():t==="ar"?iAe():t==="es"?aAe():t==="hi"?oAe():nAe()}),lAe=()=>"Checking…",uAe=()=>"正在检查…",_Ae=()=>"در حال بررسی…",fAe=()=>"جارٍ التحقق…",dAe=()=>"Comprobando…",hAe=()=>"जाँचा जा रहा है…",ya=((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=()=>"Copied",mAe=()=>"已复制",gAe=()=>"کپی شد",vAe=()=>"تم النسخ",bAe=()=>"Copiado",yAe=()=>"कॉपी हो गया",uf=((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=e=>`Failed to load: ${e==null?void 0:e.error}`,wAe=e=>`加载失败:${e==null?void 0:e.error}`,kAe=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,SAe=e=>`تعذّر التحميل: ${e==null?void 0:e.error}`,CAe=e=>`Error al cargar: ${e==null?void 0:e.error}`,EAe=e=>`लोड नहीं हो सका: ${e==null?void 0:e.error}`,yS=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wAe(e):t==="fa"?kAe(e):t==="ar"?SAe(e):t==="es"?CAe(e):t==="hi"?EAe(e):xAe(e)}),NAe=()=>"Loading…",zAe=()=>"正在加载…",jAe=()=>"در حال بارگیری…",AAe=()=>"جارٍ التحميل…",TAe=()=>"Cargando…",RAe=()=>"लोड हो रहा है…",xS=((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()}),MAe=e=>`+ ${e==null?void 0:e.count} more`,OAe=e=>`另有 ${e==null?void 0:e.count} 项`,DAe=e=>`${e==null?void 0:e.count}+ مورد دیگر`,LAe=e=>`المزيد (+${e==null?void 0:e.count})`,IAe=e=>`+ ${e==null?void 0:e.count} más`,$Ae=e=>`+ ${e==null?void 0:e.count} और`,BAe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OAe(e):t==="fa"?DAe(e):t==="ar"?LAe(e):t==="es"?IAe(e):t==="hi"?$Ae(e):MAe(e)}),PAe=()=>"Rendered view",FAe=()=>"渲染视图",HAe=()=>"نمای رندرشده",qAe=()=>"العرض المُنسَّق",UAe=()=>"Vista renderizada",GAe=()=>"रेंडर किया गया व्यू",Dv=((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=()=>"Save",VAe=()=>"保存",WAe=()=>"ذخیره",QAe=()=>"حفظ",XAe=()=>"Guardar",YAe=()=>"सेव करें",pc=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VAe():t==="fa"?WAe():t==="ar"?QAe():t==="es"?XAe():t==="hi"?YAe():KAe()}),ZAe=()=>"Saving…",JAe=()=>"正在保存…",eTe=()=>"در حال ذخیره…",tTe=()=>"جارٍ الحفظ…",nTe=()=>"Guardando…",rTe=()=>"सेव हो रहा है…",Sa=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JAe():t==="fa"?eTe():t==="ar"?tTe():t==="es"?nTe():t==="hi"?rTe():ZAe()}),sTe=()=>"Show less",iTe=()=>"收起",aTe=()=>"نمایش کمتر",oTe=()=>"عرض أقل",cTe=()=>"Mostrar menos",lTe=()=>"कम दिखाएं",vL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iTe():t==="fa"?aTe():t==="ar"?oTe():t==="es"?cTe():t==="hi"?lTe():sTe()}),uTe=()=>"Show more",_Te=()=>"展开",fTe=()=>"نمایش بیشتر",dTe=()=>"عرض المزيد",hTe=()=>"Mostrar más",pTe=()=>"और दिखाएं",mTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Te():t==="fa"?fTe():t==="ar"?dTe():t==="es"?hTe():t==="hi"?pTe():uTe()}),gTe=()=>"Stop",vTe=()=>"停止",bTe=()=>"توقف",yTe=()=>"إيقاف",xTe=()=>"Detener",wTe=()=>"रोकें",bL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vTe():t==="fa"?bTe():t==="ar"?yTe():t==="es"?xTe():t==="hi"?wTe():gTe()}),kTe=()=>"Stopping…",STe=()=>"正在停止…",CTe=()=>"در حال توقف…",ETe=()=>"جارٍ الإيقاف…",NTe=()=>"Deteniendo…",zTe=()=>"रोका जा रहा है…",jTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?STe():t==="fa"?CTe():t==="ar"?ETe():t==="es"?NTe():t==="hi"?zTe():kTe()}),ATe=()=>"View source",TTe=()=>"查看源代码",RTe=()=>"نمایش متن منبع",MTe=()=>"عرض المصدر",OTe=()=>"Ver código fuente",DTe=()=>"स्रोत देखें",Pd=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TTe():t==="fa"?RTe():t==="ar"?MTe():t==="es"?OTe():t==="hi"?DTe():ATe()}),LTe=()=>"Shorten this chat's context",ITe=()=>"压缩此聊天的上下文",$Te=()=>"کوتاه‌کردن زمینهٔ این گفت‌وگو",BTe=()=>"اختصار سياق هذه المحادثة",PTe=()=>"Comprime el contexto de este chat",FTe=()=>"इस चैट का कॉन्टेक्स्ट छोटा करें",HTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ITe():t==="fa"?$Te():t==="ar"?BTe():t==="es"?PTe():t==="hi"?FTe():LTe()}),qTe=()=>"Runs as a remote Hugging Face Job",UTe=()=>"作为远程 Hugging Face Job 运行",GTe=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",KTe=()=>"يعمل كمهمة Hugging Face بعيدة",VTe=()=>"Se ejecuta como un Job remoto de Hugging Face",WTe=()=>"एक रिमोट Hugging Face Job के रूप में चलता है",QTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UTe():t==="fa"?GTe():t==="ar"?KTe():t==="es"?VTe():t==="hi"?WTe():qTe()}),XTe=()=>"Runs as a Job on your Kubernetes cluster",YTe=()=>"作为 Kubernetes 集群上的 Job 运行",ZTe=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",JTe=()=>"يعمل كمهمة على عنقود Kubernetes الخاص بك",eRe=()=>"Se ejecuta como un Job en tu clúster de Kubernetes",tRe=()=>"आपके Kubernetes क्लस्टर पर एक Job के रूप में चलता है",nRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YTe():t==="fa"?ZTe():t==="ar"?JTe():t==="es"?eRe():t==="hi"?tRe():XTe()}),rRe=()=>"Runs directly on this computer",sRe=()=>"直接在此计算机上运行",iRe=()=>"مستقیماً روی این رایانه اجرا می‌شود",aRe=()=>"يعمل مباشرة على هذا الحاسوب",oRe=()=>"Se ejecuta directamente en este equipo",cRe=()=>"सीधे इस कंप्यूटर पर चलता है",lRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sRe():t==="fa"?iRe():t==="ar"?aRe():t==="es"?oRe():t==="hi"?cRe():rRe()}),uRe=()=>"Runs in a remote Modal sandbox",_Re=()=>"在远程 Modal 沙箱中运行",fRe=()=>"در sandbox دوردست Modal اجرا می‌شود",dRe=()=>"يعمل في بيئة Modal معزولة عن بُعد",hRe=()=>"Se ejecuta en un sandbox remoto de Modal",pRe=()=>"एक रिमोट Modal सैंडबॉक्स में चलता है",mRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Re():t==="fa"?fRe():t==="ar"?dRe():t==="es"?hRe():t==="hi"?pRe():uRe()}),gRe=()=>"Runs on an ephemeral OpenResearch box",vRe=()=>"在临时 OpenResearch 主机上运行",bRe=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",yRe=()=>"يعمل على صندوق OpenResearch مؤقت",xRe=()=>"Se ejecuta en una máquina efímera de OpenResearch",wRe=()=>"एक अस्थायी OpenResearch बॉक्स पर चलता है",kRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vRe():t==="fa"?bRe():t==="ar"?yRe():t==="es"?xRe():t==="hi"?wRe():gRe()}),SRe=()=>"Runs on the connected Ray cluster",CRe=()=>"在已连接的 Ray 集群上运行",ERe=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",NRe=()=>"يعمل على عنقود Ray المتصل",zRe=()=>"Se ejecuta en el clúster de Ray conectado",jRe=()=>"कनेक्टेड Ray क्लस्टर पर चलता है",ARe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CRe():t==="fa"?ERe():t==="ar"?NRe():t==="es"?zRe():t==="hi"?jRe():SRe()}),TRe=()=>"Runs as a scheduled job on your Slurm cluster",RRe=()=>"作为 Slurm 集群上的调度作业运行",MRe=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",ORe=()=>"يعمل كمهمة مجدولة على عنقود Slurm الخاص بك",DRe=()=>"Se ejecuta como un job programado en tu clúster de Slurm",LRe=()=>"आपके Slurm क्लस्टर पर एक शेड्यूल्ड जॉब के रूप में चलता है",IRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RRe():t==="fa"?MRe():t==="ar"?ORe():t==="es"?DRe():t==="hi"?LRe():TRe()}),$Re=()=>"Runs on a host from your SSH config",BRe=()=>"在 SSH 配置中的主机上运行",PRe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",FRe=()=>"يعمل على مضيف من إعداد SSH الخاص بك",HRe=()=>"Se ejecuta en un host de tu configuración SSH",qRe=()=>"आपके SSH कॉन्फ़िग के किसी होस्ट पर चलता है",URe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BRe():t==="fa"?PRe():t==="ar"?FRe():t==="es"?HRe():t==="hi"?qRe():$Re()}),GRe=()=>"Runs through Tinker’s remote compute",KRe=()=>"通过 Tinker 远程算力运行",VRe=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",WRe=()=>"يعمل عبر حوسبة Tinker البعيدة",QRe=()=>"Se ejecuta en el cómputo remoto de Tinker",XRe=()=>"Tinker के रिमोट कंप्यूट के ज़रिए चलता है",YRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KRe():t==="fa"?VRe():t==="ar"?WRe():t==="es"?QRe():t==="hi"?XRe():GRe()}),ZRe=()=>"HF Jobs",JRe=()=>"HF Jobs",eMe=()=>"HF Jobs",tMe=()=>"HF Jobs",nMe=()=>"HF Jobs",rMe=()=>"HF Jobs",sMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JRe():t==="fa"?eMe():t==="ar"?tMe():t==="es"?nMe():t==="hi"?rMe():ZRe()}),iMe=()=>"Kubernetes",aMe=()=>"Kubernetes",oMe=()=>"Kubernetes",cMe=()=>"Kubernetes",lMe=()=>"Kubernetes",uMe=()=>"Kubernetes",_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=()=>"This machine",dMe=()=>"此计算机",hMe=()=>"این رایانه",pMe=()=>"هذا الجهاز",mMe=()=>"Este equipo",gMe=()=>"यह मशीन",yL=((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()}),vMe=()=>"Modal",bMe=()=>"Modal",yMe=()=>"Modal",xMe=()=>"Modal",wMe=()=>"Modal",kMe=()=>"Modal",SMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bMe():t==="fa"?yMe():t==="ar"?xMe():t==="es"?wMe():t==="hi"?kMe():vMe()}),CMe=()=>"OpenResearch",EMe=()=>"OpenResearch",NMe=()=>"OpenResearch",zMe=()=>"OpenResearch",jMe=()=>"OpenResearch",AMe=()=>"OpenResearch",TMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EMe():t==="fa"?NMe():t==="ar"?zMe():t==="es"?jMe():t==="hi"?AMe():CMe()}),RMe=()=>"Ray",MMe=()=>"Ray",OMe=()=>"Ray",DMe=()=>"Ray",LMe=()=>"Ray",IMe=()=>"Ray",$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=()=>"Slurm",PMe=()=>"Slurm",FMe=()=>"Slurm",HMe=()=>"Slurm",qMe=()=>"Slurm",UMe=()=>"Slurm",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()}),KMe=()=>"SSH",VMe=()=>"SSH",WMe=()=>"SSH",QMe=()=>"SSH",XMe=()=>"SSH",YMe=()=>"SSH",ZMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VMe():t==="fa"?WMe():t==="ar"?QMe():t==="es"?XMe():t==="hi"?YMe():KMe()}),JMe=()=>"Tinker",eOe=()=>"Tinker",tOe=()=>"Tinker",nOe=()=>"Tinker",rOe=()=>"Tinker",sOe=()=>"Tinker",iOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eOe():t==="fa"?tOe():t==="ar"?nOe():t==="es"?rOe():t==="hi"?sOe():JMe()}),aOe=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",oOe=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",cOe=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",lOe=()=>"تعمل مهمة Hugging Face عن بُعد في حسابك باستخدام العتاد المحدد. تتولى Hugging Face احتساب رسوم الاستخدام.",uOe=()=>"Un Hugging Face Job se ejecuta de forma remota en tu cuenta con el hardware seleccionado. Hugging Face factura el uso.",_Oe=()=>"एक Hugging Face Job चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है। इस्तेमाल का बिल Hugging Face करता है।",fOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oOe():t==="fa"?cOe():t==="ar"?lOe():t==="es"?uOe():t==="hi"?_Oe():aOe()}),dOe=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",hOe=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",pOe=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",mOe=()=>"تعمل بيئة Modal معزولة عن بُعد في حسابك باستخدام العتاد المحدد، وتُخفَّض مواردها إلى الصفر بعد انتهاء التشغيل.",gOe=()=>"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.",vOe=()=>"एक Modal सैंडबॉक्स चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है और रन के बाद शून्य पर स्केल हो जाता है।",bOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hOe():t==="fa"?pOe():t==="ar"?mOe():t==="es"?gOe():t==="hi"?vOe():dOe()}),yOe=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",xOe=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",wOe=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",kOe=()=>"تعمل التجربة على جهاز OpenResearch مؤقت، وتتحمل مؤسستك تكلفته، ويُحذف الجهاز عند انتهاء التشغيل.",SOe=()=>"Una máquina efímera de OpenResearch ejecuta el experimento, se factura a tu organización y se elimina al terminar la ejecución.",COe=()=>"एक अस्थायी OpenResearch बॉक्स प्रयोग चलाता है, आपके संगठन को बिल किया जाता है, और रन खत्म होने पर हटा दिया जाता है।",EOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xOe():t==="fa"?wOe():t==="ar"?kOe():t==="es"?SOe():t==="hi"?COe():yOe()}),NOe=()=>"This computer must stay awake and online while Tinker runs.",zOe=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",jOe=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",AOe=()=>"يجب أن يبقى هذا الحاسوب مستيقظًا ومتصلًا أثناء تشغيل Tinker.",TOe=()=>"Este equipo debe permanecer encendido y conectado mientras Tinker se ejecuta.",ROe=()=>"जब तक Tinker चल रहा है, इस कंप्यूटर को जागते और ऑनलाइन रहना होगा।",MOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zOe():t==="fa"?jOe():t==="ar"?AOe():t==="es"?TOe():t==="hi"?ROe():NOe()}),OOe=()=>"Context window",DOe=()=>"上下文窗口",LOe=()=>"پنجرهٔ زمینه",IOe=()=>"نافذة السياق",$Oe=()=>"Ventana de contexto",BOe=()=>"कॉन्टेक्स्ट विंडो",POe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DOe():t==="fa"?LOe():t==="ar"?IOe():t==="es"?$Oe():t==="hi"?BOe():OOe()}),FOe=()=>"Context window used",HOe=()=>"已使用的上下文窗口",qOe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",UOe=()=>"المستخدَم من نافذة السياق",GOe=()=>"Ventana de contexto usada",KOe=()=>"इस्तेमाल हुई कॉन्टेक्स्ट विंडो",VOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HOe():t==="fa"?qOe():t==="ar"?UOe():t==="es"?GOe():t==="hi"?KOe():FOe()}),WOe=e=>`${e==null?void 0:e.value} tokens`,QOe=e=>`${e==null?void 0:e.value} 个 token`,XOe=e=>`${e==null?void 0:e.value} توکن`,YOe=e=>`${e==null?void 0:e.value} رمز`,ZOe=e=>`${e==null?void 0:e.value} tokens`,JOe=e=>`${e==null?void 0:e.value} टोकन`,eDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QOe(e):t==="fa"?XOe(e):t==="ar"?YOe(e):t==="es"?ZOe(e):t==="hi"?JOe(e):WOe(e)}),tDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,nDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,rDe=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,sDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,iDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,aDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,oDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nDe(e):t==="fa"?rDe(e):t==="ar"?sDe(e):t==="es"?iDe(e):t==="hi"?aDe(e):tDe(e)}),cDe=()=>"Copy the last response",lDe=()=>"复制最新回复",uDe=()=>"کپی آخرین پاسخ",_De=()=>"نسخ آخر رد",fDe=()=>"Copia la última respuesta",dDe=()=>"आखिरी जवाब कॉपी करें",hDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lDe():t==="fa"?uDe():t==="ar"?_De():t==="es"?fDe():t==="hi"?dDe():cDe()}),pDe=()=>"No runs yet — ask the agent to launch one.",mDe=()=>"尚无运行——让智能体启动一个。",gDe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",vDe=()=>"لا توجد عمليات تشغيل بعد — اطلب من الوكيل بدء واحدة.",bDe=()=>"Aún no hay ejecuciones — pídele al agente que lance una.",yDe=()=>"अभी तक कोई रन नहीं — एजेंट से एक शुरू करने को कहें।",xDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mDe():t==="fa"?gDe():t==="ar"?vDe():t==="es"?bDe():t==="hi"?yDe():pDe()}),wDe=()=>"Run",kDe=()=>"运行",SDe=()=>"اجرا",CDe=()=>"تشغيل",EDe=()=>"Ejecución",NDe=()=>"रन",_z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kDe():t==="fa"?SDe():t==="ar"?CDe():t==="es"?EDe():t==="hi"?NDe():wDe()}),zDe=()=>"Switch run",jDe=()=>"切换运行",ADe=()=>"تغییر اجرا",TDe=()=>"تبديل التشغيل",RDe=()=>"Cambiar de ejecución",MDe=()=>"रन बदलें",ODe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jDe():t==="fa"?ADe():t==="ar"?TDe():t==="es"?RDe():t==="hi"?MDe():zDe()}),DDe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,LDe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,IDe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,$De=e=>`${e==null?void 0:e.days}ي ${e==null?void 0:e.hours}س`,BDe=e=>`${e==null?void 0:e.days} d ${e==null?void 0:e.hours} h`,PDe=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"?LDe(e):t==="fa"?IDe(e):t==="ar"?$De(e):t==="es"?BDe(e):t==="hi"?PDe(e):DDe(e)}),HDe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,qDe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,UDe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,GDe=e=>`${e==null?void 0:e.hours}س ${e==null?void 0:e.minutes}د`,KDe=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}मि`,WDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qDe(e):t==="fa"?UDe(e):t==="ar"?GDe(e):t==="es"?KDe(e):t==="hi"?VDe(e):HDe(e)}),QDe=e=>`${e==null?void 0:e.value}m`,XDe=e=>`${e==null?void 0:e.value} 分钟`,YDe=e=>`${e==null?void 0:e.value} دقیقه`,ZDe=e=>`${e==null?void 0:e.value}د`,JDe=e=>`${e==null?void 0:e.value} min`,eLe=e=>`${e==null?void 0:e.value}मि`,tLe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XDe(e):t==="fa"?YDe(e):t==="ar"?ZDe(e):t==="es"?JDe(e):t==="hi"?eLe(e):QDe(e)}),nLe=e=>`${e==null?void 0:e.value}s`,rLe=e=>`${e==null?void 0:e.value} 秒`,sLe=e=>`${e==null?void 0:e.value} ثانیه`,iLe=e=>`${e==null?void 0:e.value}ث`,aLe=e=>`${e==null?void 0:e.value} s`,oLe=e=>`${e==null?void 0:e.value}से`,cLe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rLe(e):t==="fa"?sLe(e):t==="ar"?iLe(e):t==="es"?aLe(e):t==="hi"?oLe(e):nLe(e)}),lLe=()=>"Code",uLe=()=>"代码",_Le=()=>"کد",fLe=()=>"الشيفرة",dLe=()=>"Código",hLe=()=>"कोड",pLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uLe():t==="fa"?_Le():t==="ar"?fLe():t==="es"?dLe():t==="hi"?hLe():lLe()}),mLe=()=>"created",gLe=()=>"创建于",vLe=()=>"ایجادشده",bLe=()=>"أُنشئ",yLe=()=>"creado",xLe=()=>"बनाया गया",wLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gLe():t==="fa"?vLe():t==="ar"?bLe():t==="es"?yLe():t==="hi"?xLe():mLe()}),kLe=()=>"from",SLe=()=>"来自",CLe=()=>"از",ELe=()=>"من",NLe=()=>"desde",zLe=()=>"से",jLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SLe():t==="fa"?CLe():t==="ar"?ELe():t==="es"?NLe():t==="hi"?zLe():kLe()}),ALe=()=>"Logs",TLe=()=>"日志",RLe=()=>"گزارش‌ها",MLe=()=>"السجلات",OLe=()=>"Logs",DLe=()=>"लॉग",LLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TLe():t==="fa"?RLe():t==="ar"?MLe():t==="es"?OLe():t==="hi"?DLe():ALe()}),ILe=()=>"Latest run",$Le=()=>"最新运行",BLe=()=>"آخرین اجرا",PLe=()=>"أحدث تشغيل",FLe=()=>"Última ejecución",HLe=()=>"नवीनतम रन",qLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Le():t==="fa"?BLe():t==="ar"?PLe():t==="es"?FLe():t==="hi"?HLe():ILe()}),ULe=()=>"Code",GLe=()=>"代码",KLe=()=>"کد",VLe=()=>"الشيفرة",WLe=()=>"Código",QLe=()=>"कोड",XLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GLe():t==="fa"?KLe():t==="ar"?VLe():t==="es"?WLe():t==="hi"?QLe():ULe()}),YLe=()=>"Commit",ZLe=()=>"提交",JLe=()=>"کامیت",eIe=()=>"إيداع",tIe=()=>"Commit",nIe=()=>"कमिट",rIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZLe():t==="fa"?JLe():t==="ar"?eIe():t==="es"?tIe():t==="hi"?nIe():YLe()}),sIe=()=>"created",iIe=()=>"创建于",aIe=()=>"ایجادشده",oIe=()=>"أُنشئ",cIe=()=>"creado",lIe=()=>"बनाया गया",uIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iIe():t==="fa"?aIe():t==="ar"?oIe():t==="es"?cIe():t==="hi"?lIe():sIe()}),_Ie=()=>"Description",fIe=()=>"说明",dIe=()=>"توضیحات",hIe=()=>"الوصف",pIe=()=>"Descripción",mIe=()=>"विवरण",gIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fIe():t==="fa"?dIe():t==="ar"?hIe():t==="es"?pIe():t==="hi"?mIe():_Ie()}),vIe=()=>"Duration",bIe=()=>"时长",yIe=()=>"مدت",xIe=()=>"المدة",wIe=()=>"Duración",kIe=()=>"अवधि",SIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bIe():t==="fa"?yIe():t==="ar"?xIe():t==="es"?wIe():t==="hi"?kIe():vIe()}),CIe=()=>"exit",EIe=()=>"退出码",NIe=()=>"خروج",zIe=()=>"رمز الخروج",jIe=()=>"salida",AIe=()=>"एग्ज़िट",TIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EIe():t==="fa"?NIe():t==="ar"?zIe():t==="es"?jIe():t==="hi"?AIe():CIe()}),RIe=()=>"from",MIe=()=>"来自",OIe=()=>"از",DIe=()=>"من",LIe=()=>"desde",IIe=()=>"से",$Ie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MIe():t==="fa"?OIe():t==="ar"?DIe():t==="es"?LIe():t==="hi"?IIe():RIe()}),BIe=()=>"Logs",PIe=()=>"日志",FIe=()=>"گزارش‌ها",HIe=()=>"السجلات",qIe=()=>"Logs",UIe=()=>"लॉग",GIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PIe():t==="fa"?FIe():t==="ar"?HIe():t==="es"?qIe():t==="hi"?UIe():BIe()}),KIe=()=>"Run",VIe=()=>"运行",WIe=()=>"اجرا",QIe=()=>"تشغيل",XIe=()=>"Ejecución",YIe=()=>"रन",ZIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VIe():t==="fa"?WIe():t==="ar"?QIe():t==="es"?XIe():t==="hi"?YIe():KIe()}),JIe=()=>"Run history",e$e=()=>"运行历史",t$e=()=>"تاریخچهٔ اجرا",n$e=()=>"سجل التشغيل",r$e=()=>"Historial de ejecuciones",s$e=()=>"रन इतिहास",i$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e$e():t==="fa"?t$e():t==="ar"?n$e():t==="es"?r$e():t==="hi"?s$e():JIe()}),a$e=()=>"Started",o$e=()=>"开始时间",c$e=()=>"آغاز",l$e=()=>"بدأ",u$e=()=>"Inicio",_$e=()=>"शुरू हुआ",f$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o$e():t==="fa"?c$e():t==="ar"?l$e():t==="es"?u$e():t==="hi"?_$e():a$e()}),d$e=()=>"Runs",h$e=()=>"运行",p$e=()=>"اجراها",m$e=()=>"عمليات التشغيل",g$e=()=>"Ejecuciones",v$e=()=>"रन",b$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h$e():t==="fa"?p$e():t==="ar"?m$e():t==="es"?g$e():t==="hi"?v$e():d$e()}),y$e=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",x$e=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",w$e=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",k$e=()=>"ستظهر التجارب وعمليات تشغيلها هنا. اطلب من الوكيل إعداد تجربة للبدء.",S$e=()=>"Los experimentos y sus ejecuciones aparecerán aquí. Pídele al agente que configure un experimento para empezar.",C$e=()=>"प्रयोग और उनके रन यहाँ दिखेंगे। शुरू करने के लिए एजेंट से एक प्रयोग सेट अप करने को कहें।",E$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x$e():t==="fa"?w$e():t==="ar"?k$e():t==="es"?S$e():t==="hi"?C$e():y$e()}),N$e=()=>"No runs yet",z$e=()=>"还没有运行",j$e=()=>"هنوز اجرایی وجود ندارد",A$e=()=>"لا عمليات تشغيل بعد",T$e=()=>"Aún no hay ejecuciones",R$e=()=>"अभी तक कोई रन नहीं",M$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z$e():t==="fa"?j$e():t==="ar"?A$e():t==="es"?T$e():t==="hi"?R$e():N$e()}),O$e=()=>"No experiments yet.",D$e=()=>"还没有实验。",L$e=()=>"هنوز آزمایشی وجود ندارد.",I$e=()=>"لا توجد تجارب بعد.",$$e=()=>"Aún no hay experimentos.",B$e=()=>"अभी तक कोई प्रयोग नहीं।",P$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D$e():t==="fa"?L$e():t==="ar"?I$e():t==="es"?$$e():t==="hi"?B$e():O$e()}),F$e=()=>"Not run yet",H$e=()=>"尚未运行",q$e=()=>"هنوز اجرا نشده",U$e=()=>"لم تُشغَّل بعد",G$e=()=>"Aún sin ejecutar",K$e=()=>"अभी तक नहीं चलाया गया",V$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H$e():t==="fa"?q$e():t==="ar"?U$e():t==="es"?G$e():t==="hi"?K$e():F$e()}),W$e=()=>"1 run",Q$e=()=>"1 次运行",X$e=()=>"۱ اجرا",Y$e=()=>"تشغيل واحد",Z$e=()=>"1 ejecución",J$e=()=>"1 रन",eBe=((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()}),tBe=()=>"Open logs",nBe=()=>"打开日志",rBe=()=>"باز کردن گزارش‌ها",sBe=()=>"فتح السجلات",iBe=()=>"Abrir logs",aBe=()=>"लॉग खोलें",oBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nBe():t==="fa"?rBe():t==="ar"?sBe():t==="es"?iBe():t==="hi"?aBe():tBe()}),cBe=e=>`${e==null?void 0:e.count} runs`,lBe=e=>`${e==null?void 0:e.count} 次运行`,uBe=e=>`${e==null?void 0:e.count} اجرا`,_Be=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,fBe=e=>`${e==null?void 0:e.count} ejecuciones`,dBe=e=>`${e==null?void 0:e.count} रन`,hBe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lBe(e):t==="fa"?uBe(e):t==="ar"?_Be(e):t==="es"?fBe(e):t==="hi"?dBe(e):cBe(e)}),pBe=()=>"Stop requested",mBe=()=>"已请求停止",gBe=()=>"درخواست توقف ثبت شد",vBe=()=>"طُلب الإيقاف",bBe=()=>"Detención solicitada",yBe=()=>"रोकने का अनुरोध किया गया",xBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mBe():t==="fa"?gBe():t==="ar"?vBe():t==="es"?bBe():t==="hi"?yBe():pBe()}),wBe=()=>"Stop run",kBe=()=>"停止运行",SBe=()=>"توقف اجرا",CBe=()=>"إيقاف التشغيل",EBe=()=>"Detener ejecución",NBe=()=>"रन रोकें",zBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kBe():t==="fa"?SBe():t==="ar"?CBe():t==="es"?EBe():t==="hi"?NBe():wBe()}),jBe=()=>"Code",ABe=()=>"代码",TBe=()=>"کد",RBe=()=>"الشيفرة",MBe=()=>"Código",OBe=()=>"कोड",DBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ABe():t==="fa"?TBe():t==="ar"?RBe():t==="es"?MBe():t==="hi"?OBe():jBe()}),LBe=()=>"Experiments",IBe=()=>"实验",$Be=()=>"آزمایش‌ها",BBe=()=>"التجارب",PBe=()=>"Experimentos",FBe=()=>"प्रयोग",HBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IBe():t==="fa"?$Be():t==="ar"?BBe():t==="es"?PBe():t==="hi"?FBe():LBe()}),qBe=()=>"Logs",UBe=()=>"日志",GBe=()=>"گزارش‌ها",KBe=()=>"السجلات",VBe=()=>"Logs",WBe=()=>"लॉग",A3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UBe():t==="fa"?GBe():t==="ar"?KBe():t==="es"?VBe():t==="hi"?WBe():qBe()}),QBe=()=>"Stop failed:",XBe=()=>"停止失败:",YBe=()=>"توقف ناموفق بود:",ZBe=()=>"فشل الإيقاف:",JBe=()=>"Error al detener:",ePe=()=>"रोकना विफल:",tPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XBe():t==="fa"?YBe():t==="ar"?ZBe():t==="es"?JBe():t==="hi"?ePe():QBe()}),nPe=()=>"Download this chat as Markdown",rPe=()=>"将此聊天下载为 Markdown",sPe=()=>"دانلود این گفت‌وگو به‌صورت Markdown",iPe=()=>"تنزيل هذه المحادثة بتنسيق Markdown",aPe=()=>"Descarga este chat en Markdown",oPe=()=>"इस चैट को Markdown के रूप में डाउनलोड करें",cPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rPe():t==="fa"?sPe():t==="ar"?iPe():t==="es"?aPe():t==="hi"?oPe():nPe()}),lPe=()=>"Copy absolute path",uPe=()=>"复制绝对路径",_Pe=()=>"کپی مسیر مطلق",fPe=()=>"نسخ المسار المطلق",dPe=()=>"Copiar ruta absoluta",hPe=()=>"पूर्ण पथ कॉपी करें",T3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uPe():t==="fa"?_Pe():t==="ar"?fPe():t==="es"?dPe():t==="hi"?hPe():lPe()}),pPe=()=>"Open in right-hand panel",mPe=()=>"在右侧面板打开",gPe=()=>"باز کردن در پنل راست",vPe=()=>"فتح في اللوحة اليمنى",bPe=()=>"Abrir en el panel derecho",yPe=()=>"दाएँ पैनल में खोलें",xPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mPe():t==="fa"?gPe():t==="ar"?vPe():t==="es"?bPe():t==="hi"?yPe():pPe()}),wPe=e=>`Remote path: ${e==null?void 0:e.path}`,kPe=e=>`远程路径:${e==null?void 0:e.path}`,SPe=e=>`مسیر راه دور: ${e==null?void 0:e.path}`,CPe=e=>`المسار البعيد: ${e==null?void 0:e.path}`,EPe=e=>`Ruta remota: ${e==null?void 0:e.path}`,NPe=e=>`दूरस्थ पथ: ${e==null?void 0:e.path}`,xL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kPe(e):t==="fa"?SPe(e):t==="ar"?CPe(e):t==="es"?EPe(e):t==="hi"?NPe(e):wPe(e)}),zPe=()=>"Resolving file location…",jPe=()=>"正在解析文件位置…",APe=()=>"در حال یافتن محل فایل…",TPe=()=>"جارٍ تحديد موقع الملف…",RPe=()=>"Resolviendo la ubicación del archivo…",MPe=()=>"फ़ाइल का स्थान खोजा जा रहा है…",wL=((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()}),OPe=()=>"Clipboard access is unavailable.",DPe=()=>"无法访问剪贴板。",LPe=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",IPe=()=>"الوصول إلى الحافظة غير متاح.",$Pe=()=>"El acceso al portapapeles no está disponible.",BPe=()=>"क्लिपबोर्ड एक्सेस उपलब्ध नहीं है।",kL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DPe():t==="fa"?LPe():t==="ar"?IPe():t==="es"?$Pe():t==="hi"?BPe():OPe()}),PPe=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,FPe=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,HPe=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,qPe=e=>`حذف «${e==null?void 0:e.path}»؟ لا يمكن التراجع عن هذا الإجراء.`,UPe=e=>`¿Eliminar “${e==null?void 0:e.path}”? Esta acción no se puede deshacer.`,GPe=e=>`“${e==null?void 0:e.path}” हटाएं? इसे वापस नहीं लाया जा सकता।`,KPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FPe(e):t==="fa"?HPe(e):t==="ar"?qPe(e):t==="es"?UPe(e):t==="hi"?GPe(e):PPe(e)}),VPe=()=>"Duplicate",WPe=()=>"创建副本",QPe=()=>"ایجاد نسخهٔ تکراری",XPe=()=>"تكرار",YPe=()=>"Duplicar",ZPe=()=>"डुप्लिकेट करें",JPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WPe():t==="fa"?QPe():t==="ar"?XPe():t==="es"?YPe():t==="hi"?ZPe():VPe()}),eFe=e=>`File actions for ${e==null?void 0:e.path}`,tFe=e=>`${e==null?void 0:e.path} 的文件操作`,nFe=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,rFe=e=>`إجراءات الملف لـ ${e==null?void 0:e.path}`,sFe=e=>`Acciones de archivo para ${e==null?void 0:e.path}`,iFe=e=>`${e==null?void 0:e.path} के लिए फ़ाइल क्रियाएं`,aFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tFe(e):t==="fa"?nFe(e):t==="ar"?rFe(e):t==="es"?sFe(e):t==="hi"?iFe(e):eFe(e)}),oFe=()=>"Open",cFe=()=>"打开",lFe=()=>"باز کردن",uFe=()=>"فتح",_Fe=()=>"Abrir",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=e=>`Rename ${e==null?void 0:e.path}`,pFe=e=>`重命名 ${e==null?void 0:e.path}`,mFe=e=>`تغییر نام ${e==null?void 0:e.path}`,gFe=e=>`إعادة تسمية ${e==null?void 0:e.path}`,vFe=e=>`Renombrar ${e==null?void 0:e.path}`,bFe=e=>`${e==null?void 0:e.path} का नाम बदलें`,yFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pFe(e):t==="fa"?mFe(e):t==="ar"?gFe(e):t==="es"?vFe(e):t==="hi"?bFe(e):hFe(e)}),xFe=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,wFe=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,kFe=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,SFe=e=>`ليس في ${e==null?void 0:e.root} — عرض النسخة من مُخرَجات المشروع.`,CFe=e=>`No está en ${e==null?void 0:e.root} — se muestra la copia de los artefactos del proyecto.`,EFe=e=>`${e==null?void 0:e.root} में नहीं — प्रोजेक्ट के आर्टिफ़ैक्ट से कॉपी दिखाई जा रही है।`,NFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wFe(e):t==="fa"?kFe(e):t==="ar"?SFe(e):t==="es"?CFe(e):t==="hi"?EFe(e):xFe(e)}),zFe=()=>"Binary file — no inline preview.",jFe=()=>"二进制文件——无法内嵌预览。",AFe=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",TFe=()=>"ملف ثنائي — لا توجد معاينة مضمّنة.",RFe=()=>"Archivo binario — sin vista previa.",MFe=()=>"बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।",OFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jFe():t==="fa"?AFe():t==="ar"?TFe():t==="es"?RFe():t==="hi"?MFe():zFe()}),DFe=()=>"This file changed on disk. Your edits have not been overwritten.",LFe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",IFe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",$Fe=()=>"تغيّر هذا الملف على القرص. لم تُستبدل تعديلاتك.",BFe=()=>"Este archivo cambió en disco. Tus cambios no se han sobrescrito.",PFe=()=>"यह फ़ाइल डिस्क पर बदल गई है। आपके बदलाव अधिलेखित नहीं हुए हैं।",fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LFe():t==="fa"?IFe():t==="ar"?$Fe():t==="es"?BFe():t==="hi"?PFe():DFe()}),FFe=()=>"Compile failed",HFe=()=>"编译失败",qFe=()=>"کامپایل ناموفق بود",UFe=()=>"فشل التجميع",GFe=()=>"Error al compilar",KFe=()=>"कंपाइल विफल",VFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HFe():t==="fa"?qFe():t==="ar"?UFe():t==="es"?GFe():t==="hi"?KFe():FFe()}),WFe=()=>"Compile PDF",QFe=()=>"编译 PDF",XFe=()=>"کامپایل PDF",YFe=()=>"تجميع PDF",ZFe=()=>"Compilar PDF",JFe=()=>"PDF कंपाइल करें",dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QFe():t==="fa"?XFe():t==="ar"?YFe():t==="es"?ZFe():t==="hi"?JFe():WFe()}),eHe=()=>"Compiled, but the engine reported errors — check the output below.",tHe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",nHe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",rHe=()=>"اكتمل التجميع، لكن المحرك أبلغ عن أخطاء — راجع المُخرَجات أدناه.",sHe=()=>"Compilado, pero el motor informó de errores — revisa la salida de abajo.",iHe=()=>"कंपाइल हुआ, पर इंजन ने त्रुटियाँ बताईं — नीचे आउटपुट जाँचें।",aHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tHe():t==="fa"?nHe():t==="ar"?rHe():t==="es"?sHe():t==="hi"?iHe():eHe()}),oHe=()=>"Copy command",cHe=()=>"复制命令",lHe=()=>"کپی فرمان",uHe=()=>"نسخ الأمر",_He=()=>"Copiar comando",fHe=()=>"कमांड कॉपी करें",dHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cHe():t==="fa"?lHe():t==="ar"?uHe():t==="es"?_He():t==="hi"?fHe():oHe()}),hHe=()=>"Copy file contents",pHe=()=>"复制文件内容",mHe=()=>"کپی محتوای فایل",gHe=()=>"نسخ محتوى الملف",vHe=()=>"Copiar contenido del archivo",bHe=()=>"फ़ाइल की सामग्री कॉपी करें",hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pHe():t==="fa"?mHe():t==="ar"?gHe():t==="es"?vHe():t==="hi"?bHe():hHe()}),yHe=()=>"Could not copy file contents",xHe=()=>"无法复制文件内容",wHe=()=>"کپی محتوای فایل ممکن نشد",kHe=()=>"تعذّر نسخ محتوى الملف",SHe=()=>"No se pudo copiar el contenido del archivo",CHe=()=>"फ़ाइल की सामग्री कॉपी नहीं हो सकी",EHe=((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()}),NHe=()=>"Copy install command",zHe=()=>"复制安装命令",jHe=()=>"کپی فرمان نصب",AHe=()=>"نسخ أمر التثبيت",THe=()=>"Copiar comando de instalación",RHe=()=>"इंस्टॉल कमांड कॉपी करें",MHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zHe():t==="fa"?jHe():t==="ar"?AHe():t==="es"?THe():t==="hi"?RHe():NHe()}),OHe=()=>"This file was deleted on disk. Your edits have not been discarded.",DHe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",LHe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",IHe=()=>"حُذف هذا الملف من القرص. لم تُتجاهل تعديلاتك.",$He=()=>"Este archivo se eliminó del disco. Tus cambios no se han descartado.",BHe=()=>"यह फ़ाइल डिस्क से हटा दी गई थी। आपके बदलाव मिटाए नहीं गए हैं।",pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DHe():t==="fa"?LHe():t==="ar"?IHe():t==="es"?$He():t==="hi"?BHe():OHe()}),PHe=()=>"Discard my edits and reload",FHe=()=>"放弃我的编辑并重新加载",HHe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",qHe=()=>"تجاهل تعديلاتي وإعادة التحميل",UHe=()=>"Descartar mis cambios y recargar",GHe=()=>"मेरे बदलाव छोड़ें और फिर से लोड करें",KHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FHe():t==="fa"?HHe():t==="ar"?qHe():t==="es"?UHe():t==="hi"?GHe():PHe()}),VHe=()=>"Discard unsaved changes and close this file?",WHe=()=>"要丢弃未保存的更改并关闭此文件吗?",QHe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",XHe=()=>"تجاهل التغييرات غير المحفوظة وإغلاق هذا الملف؟",YHe=()=>"¿Descartar los cambios sin guardar y cerrar este archivo?",ZHe=()=>"सेव न किए गए बदलाव छोड़ें और यह फ़ाइल बंद करें?",mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WHe():t==="fa"?QHe():t==="ar"?XHe():t==="es"?YHe():t==="hi"?ZHe():VHe()}),JHe=()=>"Dismiss",eqe=()=>"关闭",tqe=()=>"بستن",nqe=()=>"تجاهل",rqe=()=>"Cerrar",sqe=()=>"खारिज करें",iqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eqe():t==="fa"?tqe():t==="ar"?nqe():t==="es"?rqe():t==="hi"?sqe():JHe()}),aqe=()=>"Dismiss compile message",oqe=()=>"关闭编译消息",cqe=()=>"بستن پیام کامپایل",lqe=()=>"تجاهل رسالة التجميع",uqe=()=>"Cerrar mensaje de compilación",_qe=()=>"कंपाइल संदेश खारिज करें",fqe=((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()}),dqe=()=>"Dismiss Overleaf message",hqe=()=>"关闭 Overleaf 消息",pqe=()=>"بستن پیام Overleaf",mqe=()=>"تجاهل رسالة Overleaf",gqe=()=>"Cerrar mensaje de Overleaf",vqe=()=>"Overleaf संदेश खारिज करें",bqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hqe():t==="fa"?pqe():t==="ar"?mqe():t==="es"?gqe():t==="hi"?vqe():dqe()}),yqe=()=>"Download",xqe=()=>"下载",wqe=()=>"بارگیری",kqe=()=>"تنزيل",Sqe=()=>"Descargar",Cqe=()=>"डाउनलोड करें",SL=((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()}),Eqe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,Nqe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,zqe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,jqe=e=>`تنزيل ${e==null?void 0:e.name} (غير محدَّث — أعِد التجميع أولًا)`,Aqe=e=>`Descargar ${e==null?void 0:e.name} (desactualizado — vuelve a compilar antes)`,Tqe=e=>`${e==null?void 0:e.name} डाउनलोड करें (पुरानी — पहले फिर से कंपाइल करें)`,Rqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nqe(e):t==="fa"?zqe(e):t==="ar"?jqe(e):t==="es"?Aqe(e):t==="hi"?Tqe(e):Eqe(e)}),Mqe=()=>"Failed to load file:",Oqe=()=>"加载文件失败:",Dqe=()=>"بارگیری فایل ناموفق بود:",Lqe=()=>"تعذّر تحميل الملف:",Iqe=()=>"Error al cargar el archivo:",$qe=()=>"फ़ाइल लोड नहीं हो सकी:",gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oqe():t==="fa"?Dqe():t==="ar"?Lqe():t==="es"?Iqe():t==="hi"?$qe():Mqe()}),Bqe=()=>"File truncated — showing the first 512 KB.",Pqe=()=>"文件已截断——仅显示前 512 KB。",Fqe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",Hqe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",qqe=()=>"Archivo truncado — se muestran los primeros 512 KB.",Uqe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",Gqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pqe():t==="fa"?Fqe():t==="ar"?Hqe():t==="es"?qqe():t==="hi"?Uqe():Bqe()}),Kqe=()=>"The page below stops partway — the full file could not be loaded.",Vqe=()=>"下方页面在中途结束——无法加载完整文件。",Wqe=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",Qqe=()=>"عرض الصفحة أدناه غير مكتمل — تعذّر تحميل الملف كاملًا.",Xqe=()=>"La página se corta a mitad — no se pudo cargar el archivo completo.",Yqe=()=>"नीचे का पेज बीच में रुक जाता है — पूरी फ़ाइल लोड नहीं हो सकी।",Zqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vqe():t==="fa"?Wqe():t==="ar"?Qqe():t==="es"?Xqe():t==="hi"?Yqe():Kqe()}),Jqe=e=>`Rendered HTML: ${e==null?void 0:e.name}`,eUe=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,tUe=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,nUe=e=>`HTML المعروض: ${e==null?void 0:e.name}`,rUe=e=>`HTML renderizado: ${e==null?void 0:e.name}`,sUe=e=>`रेंडर किया गया HTML: ${e==null?void 0:e.name}`,iUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eUe(e):t==="fa"?tUe(e):t==="ar"?nUe(e):t==="es"?rUe(e):t==="hi"?sUe(e):Jqe(e)}),aUe=()=>"Loading…",oUe=()=>"正在加载…",cUe=()=>"در حال بارگیری…",lUe=()=>"جارٍ التحميل…",uUe=()=>"Cargando…",_Ue=()=>"लोड हो रहा है…",CL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oUe():t==="fa"?cUe():t==="ar"?lUe():t==="es"?uUe():t==="hi"?_Ue():aUe()}),fUe=()=>"File not found.",dUe=()=>"找不到文件。",hUe=()=>"فایل پیدا نشد.",pUe=()=>"لم يُعثر على الملف.",mUe=()=>"No se encontró el archivo.",gUe=()=>"फ़ाइल नहीं मिली।",Lv=((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()}),vUe=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,bUe=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,yUe=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,xUe=e=>`لم يُعثر على الملف في مُخرَجات المشروع أو في ${e==null?void 0:e.root}.`,wUe=e=>`No se encontró el archivo en los artefactos del proyecto ni en ${e==null?void 0:e.root}.`,kUe=e=>`फ़ाइल प्रोजेक्ट के आर्टिफ़ैक्ट या ${e==null?void 0:e.root} में नहीं मिली।`,SUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bUe(e):t==="fa"?yUe(e):t==="ar"?xUe(e):t==="es"?wUe(e):t==="hi"?kUe(e):vUe(e)}),CUe=e=>`File not found on branch ${e==null?void 0:e.branch}.`,EUe=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,NUe=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,zUe=e=>`لم يُعثر على الملف في الفرع ${e==null?void 0:e.branch}.`,jUe=e=>`No se encontró el archivo en la rama ${e==null?void 0:e.branch}.`,AUe=e=>`फ़ाइल ${e==null?void 0:e.branch} ब्रांच पर नहीं मिली।`,TUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EUe(e):t==="fa"?NUe(e):t==="ar"?zUe(e):t==="es"?jUe(e):t==="hi"?AUe(e):CUe(e)}),RUe=()=>"File not found on disk.",MUe=()=>"磁盘上找不到此文件。",OUe=()=>"فایل روی دیسک پیدا نشد.",DUe=()=>"لم يُعثر على الملف على القرص.",LUe=()=>"No se encontró el archivo en disco.",IUe=()=>"फ़ाइल डिस्क पर नहीं मिली।",$Ue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MUe():t==="fa"?OUe():t==="ar"?DUe():t==="es"?LUe():t==="hi"?IUe():RUe()}),BUe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,PUe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,FUe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,HUe=e=>`لم يُعثر على الملف في ${e==null?void 0:e.root} ولا في مُخرَجات المشروع.`,qUe=e=>`No se encontró el archivo en ${e==null?void 0:e.root} ni en los artefactos del proyecto.`,UUe=e=>`फ़ाइल ${e==null?void 0:e.root} या प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं मिली।`,GUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PUe(e):t==="fa"?FUe(e):t==="ar"?HUe(e):t==="es"?qUe(e):t==="hi"?UUe(e):BUe(e)}),KUe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,VUe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,WUe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,QUe=e=>`ليس في مُخرَجات المشروع — عرض النسخة من ${e==null?void 0:e.root}.`,XUe=e=>`No está en los artefactos del proyecto — se muestra la copia que hay en ${e==null?void 0:e.root}.`,YUe=e=>`प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं — ${e==null?void 0:e.root} से कॉपी दिखाई जा रही है।`,ZUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VUe(e):t==="fa"?WUe(e):t==="ar"?QUe(e):t==="es"?XUe(e):t==="hi"?YUe(e):KUe(e)}),JUe=()=>"Open in default editor",eGe=()=>"在默认编辑器中打开",tGe=()=>"باز کردن در ویرایشگر پیش‌فرض",nGe=()=>"فتح في المحرر الافتراضي",rGe=()=>"Abrir en el editor predeterminado",sGe=()=>"डिफ़ॉल्ट एडिटर में खोलें",vz=((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=e=>`Committed copy from ${e==null?void 0:e.branch}, not on disk`,aGe=e=>`${e==null?void 0:e.branch} 上已提交的副本,不在磁盘上`,oGe=e=>`نسخهٔ کامیت‌شده از ${e==null?void 0:e.branch}، نه روی دیسک`,cGe=e=>`نسخة مودعة من ${e==null?void 0:e.branch}، ليست على القرص`,lGe=e=>`Copia confirmada de ${e==null?void 0:e.branch}, no en disco`,uGe=e=>`${e==null?void 0:e.branch} की कमिट की गई कॉपी, डिस्क पर नहीं`,wS=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aGe(e):t==="fa"?oGe(e):t==="ar"?cGe(e):t==="es"?lGe(e):t==="hi"?uGe(e):iGe(e)}),_Ge=()=>"Only for projects on this computer",fGe=()=>"仅适用于此电脑上的项目",dGe=()=>"فقط برای پروژه‌های این رایانه",hGe=()=>"فقط للمشاريع على هذا الكمبيوتر",pGe=()=>"Solo para proyectos en este equipo",mGe=()=>"केवल इस कंप्यूटर के प्रोजेक्ट के लिए",gGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fGe():t==="fa"?dGe():t==="ar"?hGe():t==="es"?pGe():t==="hi"?mGe():_Ge()}),vGe=()=>"Only for files in the project folder",bGe=()=>"仅适用于项目文件夹中的文件",yGe=()=>"فقط برای فایل‌های پوشهٔ پروژه",xGe=()=>"فقط لملفات مجلد المشروع",wGe=()=>"Solo para archivos de la carpeta del proyecto",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=()=>"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.",EGe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",NGe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",zGe=()=>"تم سحب نسخة Overleaf من هذا الملف بينما كانت لديك تعديلات غير محفوظة، لذا ما تراه لم يعد مطابقًا لما هو على القرص. الحفظ الآن يرسل هذه المسودة إلى Overleaf بدلًا من ذلك.",jGe=()=>"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.",AGe=()=>"इस फ़ाइल की Overleaf कॉपी तब खींची गई जब आपके पास सेव न किए गए बदलाव थे, इसलिए जो आप देख रहे हैं वह अब डिस्क पर मौजूद चीज़ नहीं है। अभी सेव करने पर यह ड्राफ़्ट सीधे Overleaf को भेज दिया जाएगा।",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=()=>"Overwrite disk file",MGe=()=>"覆盖磁盘文件",OGe=()=>"بازنویسی فایل روی دیسک",DGe=()=>"استبدال الملف على القرص",LGe=()=>"Sobrescribir el archivo en disco",IGe=()=>"डिस्क फ़ाइल अधिलेखित करें",$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=()=>"Compiled PDF is out of date",PGe=()=>"已编译的 PDF 不是最新版本",FGe=()=>"PDF کامپایل‌شده به‌روز نیست",HGe=()=>"ملف PDF المُجمَّع غير محدَّث",qGe=()=>"El PDF compilado está desactualizado",UGe=()=>"कंपाइल की गई PDF पुरानी है",GGe=((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()}),KGe=()=>"project clone",VGe=()=>"项目克隆",WGe=()=>"کلون پروژه",QGe=()=>"نسخة المشروع المستنسخة",XGe=()=>"el clon del proyecto",YGe=()=>"प्रोजेक्ट क्लोन",a1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VGe():t==="fa"?WGe():t==="ar"?QGe():t==="es"?XGe():t==="hi"?YGe():KGe()}),ZGe=()=>"Recompile PDF",JGe=()=>"重新编译 PDF",eKe=()=>"کامپایل دوبارهٔ PDF",tKe=()=>"إعادة تجميع PDF",nKe=()=>"Volver a compilar el PDF",rKe=()=>"PDF फिर से कंपाइल करें",bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JGe():t==="fa"?eKe():t==="ar"?tKe():t==="es"?nKe():t==="hi"?rKe():ZGe()}),sKe=()=>"Reload from disk",iKe=()=>"从磁盘重新加载",aKe=()=>"بارگذاری مجدد از دیسک",oKe=()=>"إعادة التحميل من القرص",cKe=()=>"Recargar desde el disco",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=()=>"Reveal in file manager",fKe=()=>"在文件管理器中显示",dKe=()=>"نمایش در مدیر فایل",hKe=()=>"إظهار في مدير الملفات",pKe=()=>"Mostrar en el administrador de archivos",mKe=()=>"फ़ाइल मैनेजर में दिखाएँ",R3=((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()}),gKe=()=>"Save failed",vKe=()=>"保存失败",bKe=()=>"ذخیره ناموفق بود",yKe=()=>"فشل الحفظ",xKe=()=>"Error al guardar",wKe=()=>"सेव विफल",kKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vKe():t==="fa"?bKe():t==="ar"?yKe():t==="es"?xKe():t==="hi"?wKe():gKe()}),SKe=()=>"Saving…",CKe=()=>"正在保存…",EKe=()=>"در حال ذخیره…",NKe=()=>"جارٍ الحفظ…",zKe=()=>"Guardando…",jKe=()=>"सेव हो रहा है…",AKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CKe():t==="fa"?EKe():t==="ar"?NKe():t==="es"?zKe():t==="hi"?jKe():SKe()}),TKe=()=>"Selected — press ⌘C",RKe=()=>"已选中 — 按 ⌘C 复制",MKe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",OKe=()=>"محدد — اضغط ⌘C",DKe=()=>"Seleccionado — pulsa ⌘C",LKe=()=>"चयनित — ⌘C दबाएं",IKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RKe():t==="fa"?MKe():t==="ar"?OKe():t==="es"?DKe():t==="hi"?LKe():TKe()}),$Ke=()=>"session’s worktree",BKe=()=>"会话工作树",PKe=()=>"درخت کاری نشست",FKe=()=>"شجرة عمل الجلسة",HKe=()=>"el árbol de trabajo de la sesión",qKe=()=>"सेशन की वर्कट्री",o1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BKe():t==="fa"?PKe():t==="ar"?FKe():t==="es"?HKe():t==="hi"?qKe():$Ke()}),UKe=()=>"Show compiled PDF",GKe=()=>"显示已编译的 PDF",KKe=()=>"نمایش PDF کامپایل‌شده",VKe=()=>"عرض ملف PDF المُجمَّع",WKe=()=>"Mostrar el PDF compilado",QKe=()=>"कंपाइल की गई PDF दिखाएं",yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GKe():t==="fa"?KKe():t==="ar"?VKe():t==="es"?WKe():t==="hi"?QKe():UKe()}),XKe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",YKe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",ZKe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",JKe=()=>"أُنشئ ملف PDF هذا من نسخة أقدم من المصدر — أعِد تجميعه لتحديثه.",eVe=()=>"Este PDF se compiló a partir de una versión anterior del código fuente — vuelve a compilar para actualizarlo.",tVe=()=>"यह PDF सोर्स के पुराने वर्शन से कंपाइल हुआ था — अपडेट करने के लिए फिर से कंपाइल करें।",nVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YKe():t==="fa"?ZKe():t==="ar"?JKe():t==="es"?eVe():t==="hi"?tVe():XKe()}),rVe=()=>"This session's worktree isn't available — showing the project clone's copy.",sVe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",iVe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",aVe=()=>"شجرة عمل هذه الجلسة غير متاحة — عرض الملف من نسخة المشروع المستنسخة.",oVe=()=>"El árbol de trabajo de esta sesión no está disponible — se muestra la copia del clon del proyecto.",cVe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है — प्रोजेक्ट क्लोन की कॉपी दिखाई जा रही है।",lVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sVe():t==="fa"?iVe():t==="ar"?aVe():t==="es"?oVe():t==="hi"?cVe():rVe()}),uVe=()=>"Unsaved",_Ve=()=>"未保存",fVe=()=>"ذخیره نشده",dVe=()=>"غير محفوظ",hVe=()=>"Sin guardar",pVe=()=>"सेव नहीं हुआ",EL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ve():t==="fa"?fVe():t==="ar"?dVe():t==="es"?hVe():t==="hi"?pVe():uVe()}),mVe=()=>"Unsaved — ⌘S to save",gVe=()=>"未保存 — 按 ⌘S 保存",vVe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",bVe=()=>"غير محفوظ — ⌘S للحفظ",yVe=()=>"Sin guardar — ⌘S para guardar",xVe=()=>"सेव नहीं हुआ — सेव करने के लिए ⌘S दबाएं",wVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gVe():t==="fa"?vVe():t==="ar"?bVe():t==="es"?yVe():t==="hi"?xVe():mVe()}),kVe=()=>"Update orx on the remote machine to edit this file safely.",SVe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",CVe=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",EVe=()=>"حدّث orx على الجهاز البعيد لتعديل هذا الملف بأمان.",NVe=()=>"Actualiza orx en la máquina remota para editar este archivo de forma segura.",zVe=()=>"इस फ़ाइल को सुरक्षित रूप से संपादित करने के लिए रिमोट मशीन पर orx अपडेट करें।",jVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SVe():t==="fa"?CVe():t==="ar"?EVe():t==="es"?NVe():t==="hi"?zVe():kVe()}),AVe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",TVe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",RVe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",MVe=()=>"شجرة عمل هذه الجلسة غير متاحة، والملف ليس في نسخة المشروع المستنسخة ولا في مُخرَجاته.",OVe=()=>"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.",DVe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है, और फ़ाइल प्रोजेक्ट क्लोन या उसके आर्टिफ़ैक्ट में नहीं है।",LVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TVe():t==="fa"?RVe():t==="ar"?MVe():t==="es"?OVe():t==="hi"?DVe():AVe()}),IVe=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",$Ve=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",BVe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",PVe=()=>"ستظهر ملفات مساحة العمل هنا. اطلب من الوكيل إنشاء ملف للبدء.",FVe=()=>"Los archivos de este espacio de trabajo aparecerán aquí. Pídele al agente que cree un archivo para empezar.",HVe=()=>"इस वर्कस्पेस की फ़ाइलें यहाँ दिखेंगी। शुरू करने के लिए एजेंट से एक फ़ाइल बनाने को कहें।",qVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ve():t==="fa"?BVe():t==="ar"?PVe():t==="es"?FVe():t==="hi"?HVe():IVe()}),UVe=()=>"Back to preview",GVe=()=>"返回预览",KVe=()=>"بازگشت به پیش‌نمایش",VVe=()=>"العودة إلى المعاينة",WVe=()=>"Volver a la vista previa",QVe=()=>"प्रीव्यू पर वापस जाएं",XVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GVe():t==="fa"?KVe():t==="ar"?VVe():t==="es"?WVe():t==="hi"?QVe():UVe()}),YVe=e=>`${e==null?void 0:e.count} changed files`,ZVe=e=>`${e==null?void 0:e.count} 个已更改文件`,JVe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,eWe=e=>`الملفات المعدَّلة: ${e==null?void 0:e.count}`,tWe=e=>`${e==null?void 0:e.count} archivos modificados`,nWe=e=>`${e==null?void 0:e.count} बदली गई फ़ाइलें`,NL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZVe(e):t==="fa"?JVe(e):t==="ar"?eWe(e):t==="es"?tWe(e):t==="hi"?nWe(e):YVe(e)}),rWe=()=>"Changed files",sWe=()=>"已更改文件",iWe=()=>"فایل‌های تغییرکرده",aWe=()=>"الملفات المتغيّرة",oWe=()=>"Archivos modificados",cWe=()=>"बदली गई फ़ाइलें",lWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sWe():t==="fa"?iWe():t==="ar"?aWe():t==="es"?oWe():t==="hi"?cWe():rWe()}),uWe=()=>"Diff preview truncated",_We=()=>"差异预览已截断",fWe=()=>"پیش‌نمایش تفاوت کوتاه شده است",dWe=()=>"معاينة الفروق مقتطعة",hWe=()=>"Vista previa del diff truncada",pWe=()=>"डिफ़ प्रीव्यू छोटा किया गया",mWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_We():t==="fa"?fWe():t==="ar"?dWe():t==="es"?hWe():t==="hi"?pWe():uWe()}),gWe=e=>`${e==null?void 0:e.count} files shown (partial)`,vWe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,bWe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,yWe=e=>`الملفات المعروضة: ${e==null?void 0:e.count} (عرض جزئي)`,xWe=e=>`${e==null?void 0:e.count} archivos mostrados (parcial)`,wWe=e=>`${e==null?void 0:e.count} फ़ाइलें दिखाई गईं (आंशिक)`,kWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vWe(e):t==="fa"?bWe(e):t==="ar"?yWe(e):t==="es"?xWe(e):t==="hi"?wWe(e):gWe(e)}),SWe=()=>"No changes.",CWe=()=>"没有更改。",EWe=()=>"تغییری وجود ندارد.",NWe=()=>"لا توجد تغييرات.",zWe=()=>"No hay cambios.",jWe=()=>"कोई बदलाव नहीं।",AWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CWe():t==="fa"?EWe():t==="ar"?NWe():t==="es"?zWe():t==="hi"?jWe():SWe()}),TWe=()=>"No complete file preview was available before the cutoff.",RWe=()=>"在截断位置之前没有完整的文件预览。",MWe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",OWe=()=>"لم تتوفر معاينة كاملة للملف قبل الحد الأقصى.",DWe=()=>"No se pudo previsualizar ningún archivo completo antes del límite.",LWe=()=>"कटऑफ़ से पहले कोई पूरा फ़ाइल प्रीव्यू उपलब्ध नहीं था।",IWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RWe():t==="fa"?MWe():t==="ar"?OWe():t==="es"?DWe():t==="hi"?LWe():TWe()}),$We=()=>"No textual diff for this file.",BWe=()=>"此文件没有文本差异。",PWe=()=>"برای این فایل تفاوت متنی وجود ندارد.",FWe=()=>"لا يوجد فرق نصّي لهذا الملف.",HWe=()=>"No hay diff de texto para este archivo.",qWe=()=>"इस फ़ाइल के लिए कोई टेक्स्ट डिफ़ नहीं है।",UWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BWe():t==="fa"?PWe():t==="ar"?FWe():t==="es"?HWe():t==="hi"?qWe():$We()}),GWe=()=>"1 changed file",KWe=()=>"1 个已更改文件",VWe=()=>"۱ فایل تغییرکرده",WWe=()=>"ملف واحد معدَّل",QWe=()=>"1 archivo modificado",XWe=()=>"1 बदली गई फ़ाइल",zL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KWe():t==="fa"?VWe():t==="ar"?WWe():t==="es"?QWe():t==="hi"?XWe():GWe()}),YWe=()=>"1 file shown (partial)",ZWe=()=>"显示 1 个文件(部分)",JWe=()=>"۱ فایل نمایش داده شده (ناقص)",eQe=()=>"عُرض ملف واحد (جزئيًا)",tQe=()=>"1 archivo mostrado (parcial)",nQe=()=>"1 फ़ाइल दिखाई गई (आंशिक)",rQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZWe():t==="fa"?JWe():t==="ar"?eQe():t==="es"?tQe():t==="hi"?nQe():YWe()}),sQe=()=>"Unable to parse this diff.",iQe=()=>"无法解析此差异。",aQe=()=>"خواندن این تفاوت ممکن نبود.",oQe=()=>"تعذّر تحليل هذا الفرق.",cQe=()=>"No se pudo interpretar este diff.",lQe=()=>"यह डिफ़ पार्स नहीं हो सका।",uQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iQe():t==="fa"?aQe():t==="ar"?oQe():t==="es"?cQe():t==="hi"?lQe():sQe()}),_Qe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,fQe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,dQe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,hQe=e=>`عرض أول ${e==null?void 0:e.limit} (قُرئ ${e==null?void 0:e.read}). اطّلع على الفرق الكامل محليًا عبر git.`,pQe=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.`,mQe=e=>`पहले ${e==null?void 0:e.limit} दिखाए जा रहे हैं (${e==null?void 0:e.read} पढ़े गए)। git के साथ लोकल रूप से पूरा डिफ़ देखें।`,gQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fQe(e):t==="fa"?dQe(e):t==="ar"?hQe(e):t==="es"?pQe(e):t==="hi"?mQe(e):_Qe(e)}),vQe=()=>"View full diff",bQe=()=>"查看完整差异",yQe=()=>"نمایش تفاوت کامل",xQe=()=>"عرض الفرق الكامل",wQe=()=>"Ver diff completo",kQe=()=>"पूरा डिफ़ देखें",SQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bQe():t==="fa"?yQe():t==="ar"?xQe():t==="es"?wQe():t==="hi"?kQe():vQe()}),CQe=()=>"Create a token ↗",EQe=()=>"创建令牌 ↗",NQe=()=>"ساخت توکن ↗",zQe=()=>"إنشاء رمز ↗",jQe=()=>"Crear un token ↗",AQe=()=>"एक टोकन बनाएं ↗",TQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EQe():t==="fa"?NQe():t==="ar"?zQe():t==="es"?jQe():t==="hi"?AQe():CQe()}),RQe=()=>"Keep the agent working toward a goal",MQe=()=>"让智能体持续朝目标推进",OQe=()=>"عامل را در مسیر یک هدف نگه دارید",DQe=()=>"اجعل الوكيل يعمل نحو هدف",LQe=()=>"Mantén al agente trabajando hacia un objetivo",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=()=>"Approve and run",PQe=()=>"批准并运行",FQe=()=>"تأیید و اجرا",HQe=()=>"الموافقة والتشغيل",qQe=()=>"Aprobar y ejecutar",UQe=()=>"स्वीकार करें और चलाएं",GQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PQe():t==="fa"?FQe():t==="ar"?HQe():t==="es"?qQe():t==="hi"?UQe():BQe()}),KQe=()=>"Cancel setup",VQe=()=>"取消设置",WQe=()=>"لغو راه‌اندازی",QQe=()=>"إلغاء الإعداد",XQe=()=>"Cancelar configuración",YQe=()=>"सेटअप रद्द करें",ZQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VQe():t==="fa"?WQe():t==="ar"?QQe():t==="es"?XQe():t==="hi"?YQe():KQe()}),JQe=()=>"Checking connection…",eXe=()=>"正在检查连接…",tXe=()=>"در حال بررسی اتصال…",nXe=()=>"جارٍ التحقق من الإعداد…",rXe=()=>"Comprobando conexión…",sXe=()=>"कनेक्शन जाँचा जा रहा है…",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=e=>`${e==null?void 0:e.agent} is connected.`,oXe=e=>`${e==null?void 0:e.agent} 已连接。`,cXe=e=>`${e==null?void 0:e.agent} متصل است.`,lXe=e=>`أصبح ${e==null?void 0:e.agent} جاهزًا.`,uXe=e=>`${e==null?void 0:e.agent} está conectado.`,_Xe=e=>`${e==null?void 0:e.agent} कनेक्टेड है।`,fXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oXe(e):t==="fa"?cXe(e):t==="ar"?lXe(e):t==="es"?uXe(e):t==="hi"?_Xe(e):aXe(e)}),dXe=()=>"Setup needs attention.",hXe=()=>"设置需要处理。",pXe=()=>"راه‌اندازی نیاز به بررسی دارد.",mXe=()=>"تعذّر إكمال الإعداد.",gXe=()=>"La configuración requiere atención.",vXe=()=>"सेटअप पर ध्यान देने की ज़रूरत है।",jL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hXe():t==="fa"?pXe():t==="ar"?mXe():t==="es"?gXe():t==="hi"?vXe():dXe()}),bXe=()=>"Install",yXe=()=>"安装",xXe=()=>"نصب",wXe=()=>"تثبيت",kXe=()=>"Instalar",SXe=()=>"इंस्टॉल करें",CXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yXe():t==="fa"?xXe():t==="ar"?wXe():t==="es"?kXe():t==="hi"?SXe():bXe()}),EXe=e=>`Approve the command below to download and install ${e==null?void 0:e.agent} on your computer.`,NXe=e=>`批准以下命令以在您的电脑上下载并安装 ${e==null?void 0:e.agent}。`,zXe=e=>`برای دانلود و نصب ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,jXe=e=>`سيؤدي هذا إلى تنزيل ${e==null?void 0:e.agent} وتثبيته على جهازك. وافق لتشغيل الأمر أدناه.`,AXe=e=>`Aprueba el siguiente comando para descargar e instalar ${e==null?void 0:e.agent} en tu equipo.`,TXe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} डाउनलोड और इंस्टॉल करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,RXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NXe(e):t==="fa"?zXe(e):t==="ar"?jXe(e):t==="es"?AXe(e):t==="hi"?TXe(e):EXe(e)}),MXe=()=>"Could not load setup commands.",OXe=()=>"无法加载设置命令。",DXe=()=>"بارگیری دستورهای راه‌اندازی ناموفق بود.",LXe=()=>"تعذّر تحميل أوامر الإعداد.",IXe=()=>"No se pudieron cargar los comandos de configuración.",$Xe=()=>"सेटअप कमांड लोड नहीं हो सके।",BXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OXe():t==="fa"?DXe():t==="ar"?LXe():t==="es"?IXe():t==="hi"?$Xe():MXe()}),PXe=()=>"Sign in",FXe=()=>"登录",HXe=()=>"ورود",qXe=()=>"تسجيل الدخول",UXe=()=>"Iniciar sesión",GXe=()=>"साइन इन करें",AL=((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()}),KXe=()=>"The agent is not ready yet. Re-check or retry sign-in.",VXe=()=>"代理尚未就绪。请重新检查或重试登录。",WXe=()=>"عامل هنوز آماده نیست. دوباره بررسی کنید یا ورود را تکرار کنید.",QXe=()=>"وكيل البرمجة غير جاهز بعد. أعد التحقق ثم حاول مجددًا.",XXe=()=>"El agente aún no está listo. Vuelve a comprobarlo o intenta iniciar sesión de nuevo.",YXe=()=>"एजेंट अभी तैयार नहीं है। फिर से जाँचें या साइन-इन फिर से कोशिश करें।",TL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VXe():t==="fa"?WXe():t==="ar"?QXe():t==="es"?XXe():t==="hi"?YXe():KXe()}),ZXe=()=>"Install, update, and sign-in buttons open a terminal here in OpenResearch.",JXe=()=>"安装、更新和登录按钮会在 OpenResearch 内打开终端。",eYe=()=>"دکمه‌های نصب، به‌روزرسانی و ورود، ترمینالی در همین OpenResearch باز می‌کنند.",tYe=()=>"يفتح طرفية هنا",nYe=()=>"Los botones de instalación, actualización e inicio de sesión abren un terminal aquí, en OpenResearch.",rYe=()=>"इंस्टॉल, अपडेट और साइन-इन बटन OpenResearch में यहीं एक टर्मिनल खोलते हैं।",sYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JXe():t==="fa"?eYe():t==="ar"?tYe():t==="es"?nYe():t==="hi"?rYe():ZXe()}),iYe=()=>"This install command requires Node.js and npm.",aYe=()=>"此安装命令需要 Node.js 和 npm。",oYe=()=>"این دستور نصب به Node.js و npm نیاز دارد.",cYe=()=>"يلزم تثبيت Node.js وnpm لتشغيل هذا الأمر.",lYe=()=>"Este comando de instalación requiere Node.js y npm.",uYe=()=>"इस इंस्टॉल कमांड के लिए Node.js और npm ज़रूरी हैं।",_Ye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aYe():t==="fa"?oYe():t==="ar"?cYe():t==="es"?lYe():t==="hi"?uYe():iYe()}),fYe=e=>`Running \`${e==null?void 0:e.command}\` in the terminal:`,dYe=e=>`正在终端中运行 \`${e==null?void 0:e.command}\`:`,hYe=e=>`در حال اجرای \`${e==null?void 0:e.command}\` در ترمینال:`,pYe=e=>`جارٍ تشغيل \`${e==null?void 0:e.command}\` في الطرفية:`,mYe=e=>`Ejecutando \`${e==null?void 0:e.command}\` en el terminal:`,gYe=e=>`टर्मिनल में \`${e==null?void 0:e.command}\` चलाया जा रहा है:`,vYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dYe(e):t==="fa"?hYe(e):t==="ar"?pYe(e):t==="es"?mYe(e):t==="hi"?gYe(e):fYe(e)}),bYe=e=>`Set up ${e==null?void 0:e.agent}`,yYe=e=>`设置 ${e==null?void 0:e.agent}`,xYe=e=>`راه‌اندازی ${e==null?void 0:e.agent}`,wYe=e=>`إعداد ${e==null?void 0:e.agent}`,kYe=e=>`Configurar ${e==null?void 0:e.agent}`,SYe=e=>`${e==null?void 0:e.agent} सेट अप करें`,xz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yYe(e):t==="fa"?xYe(e):t==="ar"?wYe(e):t==="es"?kYe(e):t==="hi"?SYe(e):bYe(e)}),CYe=()=>"Update",EYe=()=>"更新",NYe=()=>"به‌روزرسانی",zYe=()=>"تحديث",jYe=()=>"Actualizar",AYe=()=>"अपडेट करें",TYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EYe():t==="fa"?NYe():t==="ar"?zYe():t==="es"?jYe():t==="hi"?AYe():CYe()}),RYe=e=>`Approve the command below to update ${e==null?void 0:e.agent} on your computer.`,MYe=e=>`批准以下命令以在您的电脑上更新 ${e==null?void 0:e.agent}。`,OYe=e=>`برای به‌روزرسانی ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,DYe=e=>`سيؤدي هذا إلى تحديث ${e==null?void 0:e.agent} على جهازك. وافق لتشغيل الأمر أدناه.`,LYe=e=>`Aprueba el siguiente comando para actualizar ${e==null?void 0:e.agent} en tu equipo.`,IYe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} अपडेट करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,$Ye=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MYe(e):t==="fa"?OYe(e):t==="ar"?DYe(e):t==="es"?LYe(e):t==="hi"?IYe(e):RYe(e)}),BYe=()=>"All projects",PYe=()=>"所有项目",FYe=()=>"همهٔ پروژه‌ها",HYe=()=>"كل المشاريع",qYe=()=>"Todos los proyectos",UYe=()=>"सभी प्रोजेक्ट",wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PYe():t==="fa"?FYe():t==="ar"?HYe():t==="es"?qYe():t==="hi"?UYe():BYe()}),GYe=()=>"Configure Repository",KYe=()=>"配置仓库",VYe=()=>"پیکربندی مخزن",WYe=()=>"إعداد المستودع",QYe=()=>"Configurar repositorio",XYe=()=>"रिपॉज़िटरी कॉन्फ़िगर करें",YYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KYe():t==="fa"?VYe():t==="ar"?WYe():t==="es"?QYe():t==="hi"?XYe():GYe()}),ZYe=()=>"Create a new project",JYe=()=>"新建项目",eZe=()=>"ایجاد پروژهٔ جدید",tZe=()=>"إنشاء مشروع جديد",nZe=()=>"Crear un proyecto nuevo",rZe=()=>"नया प्रोजेक्ट बनाएं",sZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JYe():t==="fa"?eZe():t==="ar"?tZe():t==="es"?nZe():t==="hi"?rZe():ZYe()}),iZe=()=>"Hide sidebar",aZe=()=>"隐藏侧边栏",oZe=()=>"پنهان کردن نوار کناری",cZe=()=>"إخفاء الشريط الجانبي",lZe=()=>"Ocultar barra lateral",uZe=()=>"साइडबार छिपाएं",kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aZe():t==="fa"?oZe():t==="ar"?cZe():t==="es"?lZe():t==="hi"?uZe():iZe()}),_Ze=()=>"Project",fZe=()=>"项目",dZe=()=>"پروژه",hZe=()=>"المشروع",pZe=()=>"Proyecto",mZe=()=>"प्रोजेक्ट",RL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fZe():t==="fa"?dZe():t==="ar"?hZe():t==="es"?pZe():t==="hi"?mZe():_Ze()}),gZe=e=>`${e==null?void 0:e.count} cancelled`,vZe=e=>`${e==null?void 0:e.count} 次取消`,bZe=e=>`${e==null?void 0:e.count} لغوشده`,yZe=e=>`الملغاة: ${e==null?void 0:e.count}`,xZe=e=>`${e==null?void 0:e.count} canceladas`,wZe=e=>`${e==null?void 0:e.count} रद्द`,kZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vZe(e):t==="fa"?bZe(e):t==="ar"?yZe(e):t==="es"?xZe(e):t==="hi"?wZe(e):gZe(e)}),SZe=e=>`${e==null?void 0:e.count} done`,CZe=e=>`${e==null?void 0:e.count} 次完成`,EZe=e=>`${e==null?void 0:e.count} تمام‌شده`,NZe=e=>`المكتملة: ${e==null?void 0:e.count}`,zZe=e=>`${e==null?void 0:e.count} completadas`,jZe=e=>`${e==null?void 0:e.count} पूरे`,AZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CZe(e):t==="fa"?EZe(e):t==="ar"?NZe(e):t==="es"?zZe(e):t==="hi"?jZe(e):SZe(e)}),TZe=e=>`${e==null?void 0:e.count} failed`,RZe=e=>`${e==null?void 0:e.count} 次失败`,MZe=e=>`${e==null?void 0:e.count} ناموفق`,OZe=e=>`الفاشلة: ${e==null?void 0:e.count}`,DZe=e=>`${e==null?void 0:e.count} con error`,LZe=e=>`${e==null?void 0:e.count} विफल`,IZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RZe(e):t==="fa"?MZe(e):t==="ar"?OZe(e):t==="es"?DZe(e):t==="hi"?LZe(e):TZe(e)}),$Ze=e=>`${e==null?void 0:e.count} files`,BZe=e=>`${e==null?void 0:e.count} 个文件`,PZe=e=>`${e==null?void 0:e.count} فایل`,FZe=e=>`الملفات: ${e==null?void 0:e.count}`,HZe=e=>`${e==null?void 0:e.count} archivos`,qZe=e=>`${e==null?void 0:e.count} फ़ाइलें`,UZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BZe(e):t==="fa"?PZe(e):t==="ar"?FZe(e):t==="es"?HZe(e):t==="hi"?qZe(e):$Ze(e)}),GZe=e=>`${e==null?void 0:e.count}+ files`,KZe=e=>`至少 ${e==null?void 0:e.count} 个文件`,VZe=e=>`بیش از ${e==null?void 0:e.count} فایل`,WZe=e=>`الملفات: ${e==null?void 0:e.count} على الأقل`,QZe=e=>`${e==null?void 0:e.count}+ archivos`,XZe=e=>`${e==null?void 0:e.count}+ फ़ाइलें`,YZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KZe(e):t==="fa"?VZe(e):t==="ar"?WZe(e):t==="es"?QZe(e):t==="hi"?XZe(e):GZe(e)}),ZZe=e=>`${e==null?void 0:e.count} live`,JZe=e=>`${e==null?void 0:e.count} 次进行中`,eJe=e=>`${e==null?void 0:e.count} فعال`,tJe=e=>`النشطة: ${e==null?void 0:e.count}`,nJe=e=>`${e==null?void 0:e.count} en curso`,rJe=e=>`${e==null?void 0:e.count} लाइव`,sJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JZe(e):t==="fa"?eJe(e):t==="ar"?tJe(e):t==="es"?nJe(e):t==="hi"?rJe(e):ZZe(e)}),iJe=()=>"1 file",aJe=()=>"1 个文件",oJe=()=>"۱ فایل",cJe=()=>"ملف واحد",lJe=()=>"1 archivo",uJe=()=>"1 फ़ाइल",_Je=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aJe():t==="fa"?oJe():t==="ar"?cJe():t==="es"?lJe():t==="hi"?uJe():iJe()}),fJe=()=>"1 run",dJe=()=>"1 次运行",hJe=()=>"۱ اجرا",pJe=()=>"تشغيل واحد",mJe=()=>"1 ejecución",gJe=()=>"1 रन",vJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dJe():t==="fa"?hJe():t==="ar"?pJe():t==="es"?mJe():t==="hi"?gJe():fJe()}),bJe=e=>`${e==null?void 0:e.count} runs`,yJe=e=>`${e==null?void 0:e.count} 次运行`,xJe=e=>`${e==null?void 0:e.count} اجرا`,wJe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,kJe=e=>`${e==null?void 0:e.count} ejecuciones`,SJe=e=>`${e==null?void 0:e.count} रन`,CJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yJe(e):t==="fa"?xJe(e):t==="ar"?wJe(e):t==="es"?kJe(e):t==="hi"?SJe(e):bJe(e)}),EJe=()=>"Zoom in",NJe=()=>"放大",zJe=()=>"بزرگ‌نمایی",jJe=()=>"تكبير",AJe=()=>"Acercar",TJe=()=>"ज़ूम इन",Sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NJe():t==="fa"?zJe():t==="ar"?jJe():t==="es"?AJe():t==="hi"?TJe():EJe()}),RJe=()=>"Zoom out",MJe=()=>"缩小",OJe=()=>"کوچک‌نمایی",DJe=()=>"تصغير",LJe=()=>"Alejar",IJe=()=>"ज़ूम आउट",Cz=((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=()=>"Reset zoom to fit",BJe=()=>"重置为适合窗口",PJe=()=>"بازنشانی بزرگ‌نمایی برای جا شدن",FJe=()=>"إعادة ضبط التكبير للملاءمة",HJe=()=>"Restablecer zoom para ajustar",qJe=()=>"फ़िट करने के लिए ज़ूम रीसेट करें",Ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BJe():t==="fa"?PJe():t==="ar"?FJe():t==="es"?HJe():t==="hi"?qJe():$Je()}),UJe=()=>"No instances yet.",GJe=()=>"还没有实例。",KJe=()=>"هنوز نمونه‌ای وجود ندارد.",VJe=()=>"لا توجد مثيلات بعد.",WJe=()=>"Aún no hay instancias.",QJe=()=>"अभी तक कोई इंस्टेंस नहीं।",XJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GJe():t==="fa"?KJe():t==="ar"?VJe():t==="es"?WJe():t==="hi"?QJe():UJe()}),YJe=()=>"Nothing running right now.",ZJe=()=>"当前没有运行中的实例。",JJe=()=>"اکنون چیزی در حال اجرا نیست.",eet=()=>"لا شيء قيد التشغيل الآن.",tet=()=>"No hay nada en ejecución ahora mismo.",net=()=>"अभी कुछ नहीं चल रहा।",ret=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZJe():t==="fa"?JJe():t==="ar"?eet():t==="es"?tet():t==="hi"?net():YJe()}),set=()=>"Select a project to see its history.",iet=()=>"请选择一个项目以查看其历史记录。",aet=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",oet=()=>"اختر مشروعًا لرؤية سجله.",cet=()=>"Selecciona un proyecto para ver su historial.",uet=()=>"इसका इतिहास देखने के लिए एक प्रोजेक्ट चुनें।",_et=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iet():t==="fa"?aet():t==="ar"?oet():t==="es"?cet():t==="hi"?uet():set()}),fet=()=>"Select a project to see its runs.",det=()=>"请选择一个项目以查看其运行。",het=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",pet=()=>"اختر مشروعًا لرؤية عمليات تشغيله.",met=()=>"Selecciona un proyecto para ver sus ejecuciones.",get=()=>"इसके रन देखने के लिए एक प्रोजेक्ट चुनें।",vet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?det():t==="fa"?het():t==="ar"?pet():t==="es"?met():t==="hi"?get():fet()}),bet=()=>"View history",yet=()=>"查看历史记录",xet=()=>"مشاهدهٔ تاریخچه",wet=()=>"عرض السجل",ket=()=>"Ver historial",Cet=()=>"इतिहास देखें",Eet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yet():t==="fa"?xet():t==="ar"?wet():t==="es"?ket():t==="hi"?Cet():bet()}),Net=e=>`View history (${e==null?void 0:e.count})`,zet=e=>`查看历史记录(${e==null?void 0:e.count})`,jet=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,Aet=e=>`عرض السجل (${e==null?void 0:e.count})`,Tet=e=>`Ver historial (${e==null?void 0:e.count})`,Ret=e=>`इतिहास देखें (${e==null?void 0:e.count})`,Met=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zet(e):t==="fa"?jet(e):t==="ar"?Aet(e):t==="es"?Tet(e):t==="hi"?Ret(e):Net(e)}),Oet=()=>"The engine exited without producing a PDF or a log.",Det=()=>"引擎已退出,但没有生成 PDF 或日志。",Let=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",Iet=()=>"خرج المحرك دون إنتاج ملف PDF أو سجل.",$et=()=>"El motor terminó sin generar un PDF ni un log.",Bet=()=>"इंजन बिना PDF या लॉग बनाए बाहर निकल गया।",Pet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Det():t==="fa"?Let():t==="ar"?Iet():t==="es"?$et():t==="hi"?Bet():Oet()}),Fet=()=>"Loading…",Het=()=>"正在加载…",qet=()=>"در حال بارگیری…",Uet=()=>"جارٍ التحميل…",Get=()=>"Cargando…",Ket=()=>"लोड हो रहा है…",Vet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Het():t==="fa"?qet():t==="ar"?Uet():t==="es"?Get():t==="hi"?Ket():Fet()}),Wet=()=>"Add local model",Qet=()=>"添加本地模型",Xet=()=>"افزودن مدل محلی",Yet=()=>"إضافة نموذج محلي",Zet=()=>"Añadir modelo local",Jet=()=>"लोकल मॉडल जोड़ें",ML=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qet():t==="fa"?Xet():t==="ar"?Yet():t==="es"?Zet():t==="hi"?Jet():Wet()}),ett=()=>"Local server address",ttt=()=>"本地服务器地址",ntt=()=>"نشانی سرور محلی",rtt=()=>"عنوان الخادم المحلي",stt=()=>"Dirección del servidor local",itt=()=>"लोकल सर्वर पता",att=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ttt():t==="fa"?ntt():t==="ar"?rtt():t==="es"?stt():t==="hi"?itt():ett()}),ott=()=>"Find models",ctt=()=>"查找模型",ltt=()=>"یافتن مدل‌ها",utt=()=>"العثور على النماذج",_tt=()=>"Buscar modelos",ftt=()=>"मॉडल खोजें",dtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ctt():t==="fa"?ltt():t==="ar"?utt():t==="es"?_tt():t==="hi"?ftt():ott()}),htt=()=>"(OpenAI compatible)",ptt=()=>"(兼容 OpenAI)",mtt=()=>"(سازگار با OpenAI)",gtt=()=>"(متوافق مع OpenAI)",vtt=()=>"(compatible con OpenAI)",btt=()=>"(OpenAI संगत)",OL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ptt():t==="fa"?mtt():t==="ar"?gtt():t==="es"?vtt():t==="hi"?btt():htt()}),ytt=()=>"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.",xtt=()=>"已保存,但 OpenCode 未列出该模型。请重新检查已安装的智能体。如果 OpenCode 配置限制了启用的提供商,请先允许此连接。",wtt=()=>"ذخیره شد، اما OpenCode این مدل را فهرست نکرد. عامل‌های نصب‌شده را دوباره بررسی کنید. اگر پیکربندی OpenCode ارائه‌دهندگان فعال را محدود کرده، ابتدا این اتصال را مجاز کنید.",ktt=()=>"تم الحفظ، لكن OpenCode لم يُدرج هذا النموذج. تحقق من الوكلاء المثبّتين مجددًا. إذا كان إعداد OpenCode يقيّد المزوّدين المفعّلين، فاسمح بهذا الاتصال قبل استخدامه.",Stt=()=>"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.",Ctt=()=>"सेव हो गया, पर OpenCode ने इस मॉडल की सूची नहीं दी। इंस्टॉल किए गए एजेंट फिर से जाँचें। अगर आपका OpenCode कॉन्फ़िग चालू प्रोवाइडर सीमित करता है, तो इस्तेमाल से पहले इस कनेक्शन की अनुमति दें।",Ett=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xtt():t==="fa"?wtt():t==="ar"?ktt():t==="es"?Stt():t==="hi"?Ctt():ytt()}),Ntt=()=>"Connected",ztt=()=>"已连接",jtt=()=>"متصل شد",Att=()=>"متصل",Ttt=()=>"Conectado",Rtt=()=>"कनेक्टेड",Mtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ztt():t==="fa"?jtt():t==="ar"?Att():t==="es"?Ttt():t==="hi"?Rtt():Ntt()}),Ott=()=>"Context window",Dtt=()=>"上下文窗口",Ltt=()=>"پنجرهٔ زمینه",Itt=()=>"نافذة السياق",$tt=()=>"Ventana de contexto",Btt=()=>"कॉन्टेक्स्ट विंडो",Ptt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dtt():t==="fa"?Ltt():t==="ar"?Itt():t==="es"?$tt():t==="hi"?Btt():Ott()}),Ftt=()=>"Match the context window loaded in your model app. 32K is a useful starting point for tools; larger contexts use more memory.",Htt=()=>"请与模型应用中加载的上下文窗口保持一致。使用工具时可从 32K 开始;更大的上下文需要更多内存。",qtt=()=>"اندازهٔ زمینه را با تنظیم بارگذاری‌شده در برنامهٔ مدل هماهنگ کنید. ۳۲هزار توکن نقطهٔ شروع مناسبی برای ابزارهاست؛ زمینهٔ بزرگ‌تر حافظهٔ بیشتری مصرف می‌کند.",Utt=()=>"استخدم حجم نافذة السياق نفسه المحدد في تطبيق النموذج. يُعدّ 32 ألف رمز نقطة بداية مناسبة لاستخدام الأدوات؛ وتستهلك النوافذ الأكبر ذاكرة أكثر.",Gtt=()=>"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.",Ktt=()=>"अपने मॉडल ऐप में लोड कॉन्टेक्स्ट विंडो से मेल खाएं। टूल के लिए 32K एक अच्छा शुरुआती बिंदु है; बड़े कॉन्टेक्स्ट ज़्यादा मेमोरी इस्तेमाल करते हैं।",Vtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Htt():t==="fa"?qtt():t==="ar"?Utt():t==="es"?Gtt():t==="hi"?Ktt():Ftt()}),Wtt=()=>"Custom Endpoint",Qtt=()=>"自定义端点",Xtt=()=>"نقطهٔ اتصال سفارشی",Ytt=()=>"نقطة نهاية مخصصة",Ztt=()=>"Endpoint personalizado",Jtt=()=>"कस्टम एंडपॉइंट",kS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qtt():t==="fa"?Xtt():t==="ar"?Ytt():t==="es"?Ztt():t==="hi"?Jtt():Wtt()}),ent=e=>`Disconnect ${e==null?void 0:e.name}`,tnt=e=>`断开 ${e==null?void 0:e.name}`,nnt=e=>`قطع اتصال ${e==null?void 0:e.name}`,rnt=e=>`قطع اتصال ${e==null?void 0:e.name}`,snt=e=>`Desconectar ${e==null?void 0:e.name}`,int=e=>`${e==null?void 0:e.name} डिस्कनेक्ट करें`,ant=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tnt(e):t==="fa"?nnt(e):t==="ar"?rnt(e):t==="es"?snt(e):t==="hi"?int(e):ent(e)}),ont=()=>"Get OpenCode",cnt=()=>"获取 OpenCode",lnt=()=>"دریافت OpenCode",unt=()=>"الحصول على OpenCode",_nt=()=>"Obtener OpenCode",fnt=()=>"OpenCode लें",dnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cnt():t==="fa"?lnt():t==="ar"?unt():t==="es"?_nt():t==="hi"?fnt():ont()}),hnt=()=>"Install OpenCode to run tools with your local model, then re-check installed agents. No cloud account is required.",pnt=()=>"安装 OpenCode 以使用本地模型执行工具,然后重新检查已安装的智能体。无需云端账户。",mnt=()=>"برای اجرای ابزارها با مدل محلی، OpenCode را نصب کنید و عامل‌های نصب‌شده را دوباره بررسی کنید. حساب ابری لازم نیست.",gnt=()=>"ثبّت OpenCode لتشغيل الأدوات مع نموذجك المحلي، ثم أعد فحص الوكلاء المثبّتين. لا يلزم حساب سحابي.",vnt=()=>"Instala OpenCode para usar herramientas con tu modelo local y vuelve a comprobar los agentes instalados. No necesitas una cuenta en la nube.",bnt=()=>"अपने लोकल मॉडल से टूल चलाने के लिए OpenCode इंस्टॉल करें, फिर इंस्टॉल किए गए एजेंट फिर से जाँचें। किसी क्लाउड खाते की ज़रूरत नहीं है।",ynt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pnt():t==="fa"?mnt():t==="ar"?gnt():t==="es"?vnt():t==="hi"?bnt():hnt()}),xnt=()=>"API key (optional)",wnt=()=>"API 密钥(可选)",knt=()=>"کلید API (اختیاری)",Snt=()=>"مفتاح API (اختياري)",Cnt=()=>"Clave de API (opcional)",Ent=()=>"API की (वैकल्पिक)",Nnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wnt():t==="fa"?knt():t==="ar"?Snt():t==="es"?Cnt():t==="hi"?Ent():xnt()}),znt=()=>"Save model",jnt=()=>"保存模型",Ant=()=>"ذخیرهٔ مدل",Tnt=()=>"حفظ النموذج",Rnt=()=>"Guardar modelo",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=()=>"Model server",Lnt=()=>"模型服务器",Int=()=>"سرور مدل",$nt=()=>"خادم النموذج",Bnt=()=>"Servidor del modelo",Pnt=()=>"मॉडल सर्वर",Nz=((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()}),Fnt=()=>"Local models",Hnt=()=>"本地模型",qnt=()=>"مدل‌های محلی",Unt=()=>"النماذج المحلية",Gnt=()=>"Modelos locales",Knt=()=>"लोकल मॉडल",zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hnt():t==="fa"?qnt():t==="ar"?Unt():t==="es"?Gnt():t==="hi"?Knt():Fnt()}),Vnt=()=>"API token (optional)",Wnt=()=>"API 令牌(可选)",Qnt=()=>"توکن API (اختیاری)",Xnt=()=>"رمز API (اختياري)",Ynt=()=>"Token de API (opcional)",Znt=()=>"API टोकन (वैकल्पिक)",Jnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wnt():t==="fa"?Qnt():t==="ar"?Xnt():t==="es"?Ynt():t==="hi"?Znt():Vnt()}),ert=()=>"Copy",trt=()=>"复制",nrt=()=>"کپی",rrt=()=>"نسخ",srt=()=>"Copiar",irt=()=>"कॉपी करें",SS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?trt():t==="fa"?nrt():t==="ar"?rrt():t==="es"?srt():t==="hi"?irt():ert()}),art=()=>"Copy code",ort=()=>"复制代码",crt=()=>"کپی کد",lrt=()=>"نسخ الشيفرة",urt=()=>"Copiar código",_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=()=>"Download",hrt=()=>"下载",prt=()=>"بارگیری",mrt=()=>"تنزيل",grt=()=>"Descargar",vrt=()=>"डाउनलोड करें",M3=((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()}),brt=()=>"This browser can’t preview this media format.",yrt=()=>"此浏览器无法预览该媒体格式。",xrt=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",wrt=()=>"لا يستطيع هذا المتصفح معاينة صيغة الوسائط هذه.",krt=()=>"Este navegador no puede mostrar este formato multimedia.",Srt=()=>"यह ब्राउज़र इस मीडिया फ़ॉर्मैट का प्रीव्यू नहीं दिखा सकता।",Crt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yrt():t==="fa"?xrt():t==="ar"?wrt():t==="es"?krt():t==="hi"?Srt():brt()}),Ert=()=>"Choose the model for this chat",Nrt=()=>"选择此聊天的模型",zrt=()=>"انتخاب مدل این گفت‌وگو",jrt=()=>"اختيار نموذج هذه المحادثة",Art=()=>"Elige el modelo de este chat",Trt=()=>"इस चैट के लिए मॉडल चुनें",Rrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nrt():t==="fa"?zrt():t==="ar"?jrt():t==="es"?Art():t==="hi"?Trt():Ert()}),Mrt=()=>"Add Local Model",Ort=()=>"添加本地模型",Drt=()=>"افزودن مدل محلی",Lrt=()=>"إضافة نموذج محلي",Irt=()=>"Añadir modelo local",$rt=()=>"लोकल मॉडल जोड़ें",Brt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ort():t==="fa"?Drt():t==="ar"?Lrt():t==="es"?Irt():t==="hi"?$rt():Mrt()}),Prt=()=>"Autonomy",Frt=()=>"自主程度",Hrt=()=>"خودمختاری",qrt=()=>"الاستقلالية",Urt=()=>"Autonomía",Grt=()=>"स्वायत्तता",jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Frt():t==="fa"?Hrt():t==="ar"?qrt():t==="es"?Urt():t==="hi"?Grt():Prt()}),Krt=()=>"Agentic",Vrt=()=>"自主",Wrt=()=>"خودکار",Qrt=()=>"وكيل مستقل",Xrt=()=>"Agéntico",Yrt=()=>"एजेंटिक",Zrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vrt():t==="fa"?Wrt():t==="ar"?Qrt():t==="es"?Xrt():t==="hi"?Yrt():Krt()}),Jrt=()=>"Runs the research on its own and checks in when needed.",est=()=>"独立推进研究,必要时再与你确认。",tst=()=>"پژوهش را خودش پیش می‌برد و در صورت نیاز با شما هماهنگ می‌کند.",nst=()=>"يدير البحث بنفسه ويراجعك عند الحاجة.",rst=()=>"Dirige la investigación por su cuenta y consulta cuando hace falta.",sst=()=>"शोध खुद चलाता है और ज़रूरत पड़ने पर पूछता है।",ist=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?est():t==="fa"?tst():t==="ar"?nst():t==="es"?rst():t==="hi"?sst():Jrt()}),ast=()=>"Copilot",ost=()=>"副驾驶",cst=()=>"کمک‌خلبان",lst=()=>"مساعد",ust=()=>"Copiloto",_st=()=>"कोपायलट",fst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ost():t==="fa"?cst():t==="ar"?lst():t==="es"?ust():t==="hi"?_st():ast()}),dst=()=>"Explains its reasoning and asks before acting.",hst=()=>"解释思路,行动前先征得你的同意。",pst=()=>"استدلالش را توضیح می‌دهد و پیش از اقدام اجازه می‌گیرد.",mst=()=>"يشرح منطقه ويطلب موافقتك قبل التنفيذ.",gst=()=>"Explica su razonamiento y pide aprobación antes de actuar.",vst=()=>"अपना तर्क समझाता है और कार्य करने से पहले अनुमति लेता है।",bst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hst():t==="fa"?pst():t==="ar"?mst():t==="es"?gst():t==="hi"?vst():dst()}),yst=()=>" · CLI configuration",xst=()=>" · CLI 配置",wst=()=>" · پیکربندی CLI",kst=()=>" · إعداد واجهة سطر الأوامر",Sst=()=>" · Configuración de la CLI",Cst=()=>" · CLI कॉन्फ़िगरेशन",Est=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xst():t==="fa"?wst():t==="ar"?kst():t==="es"?Sst():t==="hi"?Cst():yst()}),Nst=()=>"· Default",zst=()=>"· 默认",jst=()=>"· پیش‌فرض",Ast=()=>"· الافتراضي",Tst=()=>"· Predeterminado",Rst=()=>"· डिफ़ॉल्ट",DL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zst():t==="fa"?jst():t==="ar"?Ast():t==="es"?Tst():t==="hi"?Rst():Nst()}),Mst=()=>"Default model",Ost=()=>"默认模型",Dst=()=>"مدل پیش‌فرض",Lst=()=>"النموذج الافتراضي",Ist=()=>"Modelo predeterminado",$st=()=>"डिफ़ॉल्ट मॉडल",O3=((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=()=>"Detecting harnesses…",Pst=()=>"正在检测智能体工具…",Fst=()=>"در حال شناسایی ابزارهای عامل…",Hst=()=>"جارٍ اكتشاف أدوات البرمجة…",qst=()=>"Detectando agentes…",Ust=()=>"हार्नेस पहचाने जा रहे हैं…",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()}),Kst=()=>"Effort",Vst=()=>"推理强度",Wst=()=>"میزان استدلال",Qst=()=>"الجهد",Xst=()=>"Esfuerzo",Yst=()=>"प्रयास स्तर",Zst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vst():t==="fa"?Wst():t==="ar"?Qst():t==="es"?Xst():t==="hi"?Yst():Kst()}),Jst=()=>"Fast speed ·",eit=()=>"快速 ·",tit=()=>"سرعت بالا ·",nit=()=>"سرعة عالية ·",rit=()=>"Modo rápido ·",sit=()=>"तेज़ गति ·",iit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eit():t==="fa"?tit():t==="ar"?nit():t==="es"?rit():t==="hi"?sit():Jst()}),ait=()=>"Mode",oit=()=>"模式",cit=()=>"حالت",lit=()=>"الوضع",uit=()=>"Modo",_it=()=>"मोड",Az=((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()}),fit=()=>"Model",dit=()=>"模型",hit=()=>"مدل",pit=()=>"النموذج",mit=()=>"Modelo",git=()=>"मॉडल",b0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dit():t==="fa"?hit():t==="ar"?pit():t==="es"?mit():t==="hi"?git():fit()}),vit=e=>`${e==null?void 0:e.count} more — search to find`,bit=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,yit=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,xit=e=>`نماذج إضافية: ${e==null?void 0:e.count} — ابحث للعثور عليها`,wit=e=>`${e==null?void 0:e.count} más — busca para encontrarlos`,kit=e=>`${e==null?void 0:e.count} और — खोजने के लिए टाइप करें`,Sit=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bit(e):t==="fa"?yit(e):t==="ar"?xit(e):t==="es"?wit(e):t==="hi"?kit(e):vit(e)}),Cit=()=>"Not available",Eit=()=>"不可用",Nit=()=>"در دسترس نیست",zit=()=>"غير متاح",jit=()=>"No disponible",Ait=()=>"उपलब्ध नहीं",Tit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eit():t==="fa"?Nit():t==="ar"?zit():t==="es"?jit():t==="hi"?Ait():Cit()}),Rit=()=>"Search models…",Mit=()=>"搜索模型…",Oit=()=>"جست‌وجوی مدل‌ها…",Dit=()=>"البحث في النماذج…",Lit=()=>"Buscar modelos…",Iit=()=>"मॉडल खोजें…",$it=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mit():t==="fa"?Oit():t==="ar"?Dit():t==="es"?Lit():t==="hi"?Iit():Rit()}),Bit=()=>"Search or enter model ID…",Pit=()=>"搜索或输入模型 ID…",Fit=()=>"جست‌وجو یا ورود شناسه مدل…",Hit=()=>"ابحث أو أدخل معرّف النموذج…",qit=()=>"Buscar o introducir ID…",Uit=()=>"खोजें या मॉडल ID डालें…",Git=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pit():t==="fa"?Fit():t==="ar"?Hit():t==="es"?qit():t==="hi"?Uit():Bit()}),Kit=()=>"Sessions keep their harness. Start a new chat to switch.",Vit=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",Wit=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",Qit=()=>"تحتفظ كل جلسة بأداة البرمجة الخاصة بها. ابدأ محادثة جديدة للتبديل.",Xit=()=>"Cada sesión mantiene su agente. Inicia un chat nuevo para cambiarlo.",Yit=()=>"सेशन अपना हार्नेस बनाए रखते हैं। बदलने के लिए नई चैट शुरू करें।",Zit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vit():t==="fa"?Wit():t==="ar"?Qit():t==="es"?Xit():t==="hi"?Yit():Kit()}),Jit=()=>"Speed",eat=()=>"速度",tat=()=>"سرعت",nat=()=>"السرعة",rat=()=>"Velocidad",sat=()=>"गति",Tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eat():t==="fa"?tat():t==="ar"?nat():t==="es"?rat():t==="hi"?sat():Jit()}),iat=()=>"Unavailable",aat=()=>"不可用",oat=()=>"در دسترس نیست",cat=()=>"غير متاح",lat=()=>"No disponible",uat=()=>"उपलब्ध नहीं",fo=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aat():t==="fa"?oat():t==="ar"?cat():t==="es"?lat():t==="hi"?uat():iat()}),_at=()=>"Unverified",fat=()=>"未经验证",dat=()=>"تأییدنشده",hat=()=>"غير مُتحقَّق منه",pat=()=>"Sin verificar",mat=()=>"सत्यापित नहीं",Rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fat():t==="fa"?dat():t==="ar"?hat():t==="es"?pat():t==="hi"?mat():_at()}),gat=e=>`Use “${e==null?void 0:e.id}” as the model ID`,vat=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,bat=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,yat=e=>`استخدام «${e==null?void 0:e.id}» معرّفًا للنموذج`,xat=e=>`Usar “${e==null?void 0:e.id}” como ID del modelo`,wat=e=>`मॉडल ID के रूप में “${e==null?void 0:e.id}” इस्तेमाल करें`,kat=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vat(e):t==="fa"?bat(e):t==="ar"?yat(e):t==="es"?xat(e):t==="hi"?wat(e):gat(e)}),Sat=()=>"Variant",Cat=()=>"变体",Eat=()=>"گونه",Nat=()=>"الصنف",zat=()=>"Variante",jat=()=>"वेरिएंट",Aat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cat():t==="fa"?Eat():t==="ar"?Nat():t==="es"?zat():t==="hi"?jat():Sat()}),Tat=()=>"Start a new chat",Rat=()=>"开始新聊天",Mat=()=>"شروع گفت‌وگوی جدید",Oat=()=>"بدء محادثة جديدة",Dat=()=>"Inicia un chat nuevo",Lat=()=>"नई चैट शुरू करें",Iat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rat():t==="fa"?Mat():t==="ar"?Oat():t==="es"?Dat():t==="hi"?Lat():Tat()}),$at=()=>"Advanced",Bat=()=>"高级",Pat=()=>"پیشرفته",Fat=()=>"متقدم",Hat=()=>"Avanzado",qat=()=>"उन्नत",LL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bat():t==="fa"?Pat():t==="ar"?Fat():t==="es"?Hat():t==="hi"?qat():$at()}),Uat=()=>"Advanced · Connect GitHub",Gat=()=>"高级 · 连接 GitHub",Kat=()=>"پیشرفته · اتصال GitHub",Vat=()=>"متقدم · ربط GitHub",Wat=()=>"Avanzado · Conectar GitHub",Qat=()=>"उन्नत · GitHub कनेक्ट करें",Xat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gat():t==="fa"?Kat():t==="ar"?Vat():t==="es"?Wat():t==="hi"?Qat():Uat()}),Yat=()=>"Advanced · GitHub sync on",Zat=()=>"高级 · GitHub 同步已开启",Jat=()=>"پیشرفته · همگام‌سازی GitHub روشن است",eot=()=>"متقدم · مزامنة GitHub مفعّلة",tot=()=>"Avanzado · Sincronización con GitHub activada",not=()=>"उन्नत · GitHub सिंक चालू",rot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zat():t==="fa"?Jat():t==="ar"?eot():t==="es"?tot():t==="hi"?not():Yat()}),sot=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",iot=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",aot=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",oot=()=>"اختر وجهة مختلفة. يحتاج مشروع الورقة إلى مجلد جديد أو فارغ خاص به.",cot=()=>"Elige otro destino. Un proyecto de paper necesita su propia carpeta nueva o vacía.",lot=()=>"अलग गंतव्य चुनें। पेपर प्रोजेक्ट को अपना एक नया या खाली फ़ोल्डर चाहिए।",uot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iot():t==="fa"?aot():t==="ar"?oot():t==="es"?cot():t==="hi"?lot():sot()}),_ot=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,fot=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,dot=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,hot=e=>`تغيير مجلد المشروع؛ المجلد الحالي: ${e==null?void 0:e.path}`,pot=e=>`Cambiar la carpeta del proyecto; carpeta actual: ${e==null?void 0:e.path}`,mot=e=>`प्रोजेक्ट फ़ोल्डर बदलें; मौजूदा फ़ोल्डर: ${e==null?void 0:e.path}`,got=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fot(e):t==="fa"?dot(e):t==="ar"?hot(e):t==="es"?pot(e):t==="hi"?mot(e):_ot(e)}),vot=()=>"Choose an existing project folder",bot=()=>"选择现有项目文件夹",yot=()=>"انتخاب پوشهٔ موجود پروژه",xot=()=>"اختر مجلد مشروع موجود",wot=()=>"Elige una carpeta de proyecto existente",kot=()=>"एक मौजूदा प्रोजेक्ट फ़ोल्डर चुनें",Mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bot():t==="fa"?yot():t==="ar"?xot():t==="es"?wot():t==="hi"?kot():vot()}),Sot=()=>"Choosing…",Cot=()=>"正在选择…",Eot=()=>"در حال انتخاب…",Not=()=>"جارٍ الاختيار…",zot=()=>"Eligiendo…",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=()=>"Clone destination",Rot=()=>"克隆位置",Mot=()=>"مقصد کلون",Oot=()=>"وجهة الاستنساخ",Dot=()=>"Destino del clon",Lot=()=>"क्लोन गंतव्य",Iot=((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()}),$ot=()=>"Clone paper project",Bot=()=>"克隆论文项目",Pot=()=>"کلون پروژهٔ مقاله",Fot=()=>"استنساخ مشروع الورقة",Hot=()=>"Clonar proyecto del paper",qot=()=>"पेपर प्रोजेक्ट क्लोन करें",Uot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bot():t==="fa"?Pot():t==="ar"?Fot():t==="es"?Hot():t==="hi"?qot():$ot()}),Got=()=>"Create project",Kot=()=>"创建项目",Vot=()=>"ایجاد پروژه",Wot=()=>"إنشاء المشروع",Qot=()=>"Crear proyecto",Xot=()=>"प्रोजेक्ट बनाएं",Oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kot():t==="fa"?Vot():t==="ar"?Wot():t==="es"?Qot():t==="hi"?Xot():Got()}),Yot=()=>"Creating…",Zot=()=>"正在创建…",Jot=()=>"در حال ایجاد…",ect=()=>"جارٍ الإنشاء…",tct=()=>"Creando…",nct=()=>"बनाया जा रहा है…",rct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zot():t==="fa"?Jot():t==="ar"?ect():t==="es"?tct():t==="hi"?nct():Yot()}),sct=()=>"Choose a different destination. This path is a file, not a folder.",ict=()=>"请选择其他位置。此路径是文件,不是文件夹。",act=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",oct=()=>"اختر وجهة مختلفة. هذا المسار ملف وليس مجلدًا.",cct=()=>"Elige otro destino. Esta ruta es un archivo, no una carpeta.",lct=()=>"अलग गंतव्य चुनें। यह पथ एक फ़ाइल है, फ़ोल्डर नहीं।",dw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ict():t==="fa"?act():t==="ar"?oct():t==="es"?cct():t==="hi"?lct():sct()}),uct=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",_ct=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",fct=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",dct=()=>"يوجد مجلد هنا بالفعل. اختر اسمًا أو موقعًا مختلفًا، أو استخدم «مجلد موجود».",hct=()=>"Ya existe una carpeta aquí. Elige otro nombre u otra ubicación, o usa Carpeta existente.",pct=()=>"यहाँ पहले से एक फ़ोल्डर मौजूद है। अलग नाम या स्थान चुनें, या मौजूदा फ़ोल्डर का इस्तेमाल करें।",Dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ct():t==="fa"?fct():t==="ar"?dct():t==="es"?hct():t==="hi"?pct():uct()}),mct=()=>"Blank project",gct=()=>"空白项目",vct=()=>"پروژهٔ خالی",bct=()=>"مشروع فارغ",yct=()=>"Proyecto en blanco",xct=()=>"खाली प्रोजेक्ट",wct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gct():t==="fa"?vct():t==="ar"?bct():t==="es"?yct():t==="hi"?xct():mct()}),kct=()=>"Cancel",Sct=()=>"取消",Cct=()=>"لغو",Ect=()=>"إلغاء",Nct=()=>"Cancelar",zct=()=>"रद्द करें",jct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sct():t==="fa"?Cct():t==="ar"?Ect():t==="es"?Nct():t==="hi"?zct():kct()}),Act=()=>"Change",Tct=()=>"更改",Rct=()=>"تغییر",Mct=()=>"تغيير",Oct=()=>"Cambiar",Dct=()=>"बदलें",Lct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tct():t==="fa"?Rct():t==="ar"?Mct():t==="es"?Oct():t==="hi"?Dct():Act()}),Ict=()=>"Change selected paper",$ct=()=>"更改所选论文",Bct=()=>"تغییر مقالهٔ انتخاب‌شده",Pct=()=>"تغيير الورقة المحددة",Fct=()=>"Cambiar el paper seleccionado",Hct=()=>"चयनित पेपर बदलें",qct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ct():t==="fa"?Bct():t==="ar"?Pct():t==="es"?Fct():t==="hi"?Hct():Ict()}),Uct=()=>"Check out a Git branch before using this folder.",Gct=()=>"使用此文件夹前,请先检出一个 Git 分支。",Kct=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",Vct=()=>"انتقل إلى فرع Git قبل استخدام هذا المجلد.",Wct=()=>"Haz checkout de una rama de Git antes de usar esta carpeta.",Qct=()=>"इस फ़ोल्डर का उपयोग करने से पहले एक Git ब्रांच चेक आउट करें।",Xct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gct():t==="fa"?Kct():t==="ar"?Vct():t==="es"?Wct():t==="hi"?Qct():Uct()}),Yct=()=>"Checking project location.",Zct=()=>"正在检查项目位置。",Jct=()=>"در حال بررسی محل پروژه.",elt=()=>"جارٍ التحقق من موقع المشروع.",tlt=()=>"Comprobando la ubicación del proyecto.",nlt=()=>"प्रोजेक्ट स्थान जाँचा जा रहा है।",Lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zct():t==="fa"?Jct():t==="ar"?elt():t==="es"?tlt():t==="hi"?nlt():Yct()}),rlt=()=>"Existing folder",slt=()=>"现有文件夹",ilt=()=>"پوشهٔ موجود",alt=()=>"مجلد موجود",olt=()=>"Carpeta existente",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=()=>"Experiment branches will be pushed to the remote GitHub repository.",_lt=()=>"实验分支将推送到远程 GitHub 仓库。",flt=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",dlt=()=>"ستُرفع فروع التجارب إلى مستودع GitHub البعيد.",hlt=()=>"Las ramas de los experimentos se subirán al repositorio remoto de GitHub.",plt=()=>"प्रयोग ब्रांच रिमोट GitHub रिपॉज़िटरी पर पुश की जाएंगी।",mlt=((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()}),glt=()=>"From a paper",vlt=()=>"从论文创建",blt=()=>"از یک مقاله",ylt=()=>"من ورقة بحثية",xlt=()=>"A partir de un paper",wlt=()=>"एक पेपर से",klt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vlt():t==="fa"?blt():t==="ar"?ylt():t==="es"?xlt():t==="hi"?wlt():glt()}),Slt=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",Clt=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",Elt=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",Nlt=()=>"‏Git مطلوب للتجارب لكنه غير مثبّت. ثبّت Git ثم أعد تشغيل OpenResearch.",zlt=()=>"Git es necesario para los experimentos, pero no está instalado. Instala Git y reinicia OpenResearch.",jlt=()=>"प्रयोगों के लिए Git ज़रूरी है पर इंस्टॉल नहीं है। Git इंस्टॉल करें, फिर OpenResearch फिर से शुरू करें।",Alt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Clt():t==="fa"?Elt():t==="ar"?Nlt():t==="es"?zlt():t==="hi"?jlt():Slt()}),Tlt=()=>"my-research",Rlt=()=>"my-research",Mlt=()=>"my-research",Olt=()=>"my-research",Dlt=()=>"mi-investigacion",Llt=()=>"मेरा-शोध",Iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rlt():t==="fa"?Mlt():t==="ar"?Olt():t==="es"?Dlt():t==="hi"?Llt():Tlt()}),Ilt=()=>"No papers found. Try an arXiv ID, URL, or a different title.",$lt=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",Blt=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",Plt=()=>"لم يُعثر على أوراق. جرّب معرّف arXiv أو رابطًا أو عنوانًا مختلفًا.",Flt=()=>"No se encontraron papers. Prueba con un ID de arXiv, una URL u otro título.",Hlt=()=>"कोई पेपर नहीं मिला। एक arXiv ID, URL, या अलग शीर्षक आज़माएं।",qlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$lt():t==="fa"?Blt():t==="ar"?Plt():t==="es"?Flt():t==="hi"?Hlt():Ilt()}),Ult=()=>"No public repository found on alphaXiv",Glt=()=>"在 alphaXiv 上未找到公开仓库",Klt=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",Vlt=()=>"لم يُعثر على مستودع عام على alphaXiv",Wlt=()=>"No se encontró ningún repositorio público en alphaXiv",Qlt=()=>"alphaXiv पर कोई सार्वजनिक रिपॉज़िटरी नहीं मिली",Xlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Glt():t==="fa"?Klt():t==="ar"?Vlt():t==="es"?Wlt():t==="hi"?Qlt():Ult()}),Ylt=()=>"OpenResearch will start a blank project with this paper's PDF.",Zlt=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Jlt=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",eut=()=>"سيبدأ OpenResearch مشروعًا فارغًا مع ملف PDF لهذه الورقة.",tut=()=>"OpenResearch creará un proyecto en blanco con el PDF de este paper.",nut=()=>"OpenResearch इस पेपर की PDF के साथ एक खाली प्रोजेक्ट शुरू करेगा।",rut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zlt():t==="fa"?Jlt():t==="ar"?eut():t==="es"?tut():t==="hi"?nut():Ylt()}),sut=()=>"Paper",iut=()=>"论文",aut=()=>"مقاله",out=()=>"ورقة بحثية",cut=()=>"Paper",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=()=>"Project location",fut=()=>"项目位置",dut=()=>"محل پروژه",hut=()=>"موقع المشروع",put=()=>"Ubicación del proyecto",mut=()=>"प्रोजेक्ट स्थान",hw=((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()}),gut=()=>"Project name",vut=()=>"项目名称",but=()=>"نام پروژه",yut=()=>"اسم المشروع",xut=()=>"Nombre del proyecto",wut=()=>"प्रोजेक्ट नाम",$z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vut():t==="fa"?but():t==="ar"?yut():t==="es"?xut():t==="hi"?wut():gut()}),kut=()=>"Search for a paper by arXiv ID, URL, or title",Sut=()=>"按 arXiv ID、网址或标题搜索论文",Cut=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",Eut=()=>"ابحث عن ورقة بمعرّف arXiv أو رابط أو عنوان",Nut=()=>"Busca un paper por ID de arXiv, URL o título",zut=()=>"arXiv ID, URL, या शीर्षक से पेपर खोजें",jut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sut():t==="fa"?Cut():t==="ar"?Eut():t==="es"?Nut():t==="hi"?zut():kut()}),Aut=()=>"Sync experiments to GitHub",Tut=()=>"将实验同步到 GitHub",Rut=()=>"همگام‌سازی آزمایش‌ها با GitHub",Mut=()=>"مزامنة التجارب مع GitHub",Out=()=>"Sincronizar experimentos con GitHub",Dut=()=>"प्रयोग GitHub पर सिंक करें",Lut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tut():t==="fa"?Rut():t==="ar"?Mut():t==="es"?Out():t==="hi"?Dut():Aut()}),Iut=()=>"That folder no longer exists. Choose it again.",$ut=()=>"该文件夹已不存在。请重新选择。",But=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",Put=()=>"لم يعد ذلك المجلد موجودًا. اختره مجددًا.",Fut=()=>"Esa carpeta ya no existe. Vuelve a elegirla.",Hut=()=>"वह फ़ोल्डर अब मौजूद नहीं है। इसे फिर से चुनें।",qut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ut():t==="fa"?But():t==="ar"?Put():t==="es"?Fut():t==="hi"?Hut():Iut()}),Uut=()=>"The selected folder contains an invalid Git repository.",Gut=()=>"所选文件夹包含无效的 Git 仓库。",Kut=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",Vut=()=>"يحتوي المجلد المحدد على مستودع Git غير صالح.",Wut=()=>"La carpeta seleccionada contiene un repositorio de Git no válido.",Qut=()=>"चयनित फ़ोल्डर में एक अमान्य Git रिपॉज़िटरी है।",Xut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gut():t==="fa"?Kut():t==="ar"?Vut():t==="es"?Wut():t==="hi"?Qut():Uut()}),Yut=()=>"The selected path is not a folder.",Zut=()=>"所选路径不是文件夹。",Jut=()=>"مسیر انتخاب‌شده پوشه نیست.",e_t=()=>"المسار المحدد ليس مجلدًا.",t_t=()=>"La ruta seleccionada no es una carpeta.",n_t=()=>"चयनित पथ एक फ़ोल्डर नहीं है।",r_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zut():t==="fa"?Jut():t==="ar"?e_t():t==="es"?t_t():t==="hi"?n_t():Yut()}),s_t=e=>`Checking ${e==null?void 0:e.repository}.`,i_t=e=>`正在检查 ${e==null?void 0:e.repository}。`,a_t=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,o_t=e=>`جارٍ التحقق من ${e==null?void 0:e.repository}.`,c_t=e=>`Comprobando ${e==null?void 0:e.repository}.`,l_t=e=>`${e==null?void 0:e.repository} जाँची जा रही है।`,u_t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?i_t(e):t==="fa"?a_t(e):t==="ar"?o_t(e):t==="es"?c_t(e):t==="hi"?l_t(e):s_t(e)}),__t=e=>`Creates ${e==null?void 0:e.repository}.`,f_t=e=>`将创建 ${e==null?void 0:e.repository}。`,d_t=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,h_t=e=>`ينشئ ${e==null?void 0:e.repository}.`,p_t=e=>`Crea ${e==null?void 0:e.repository}.`,m_t=e=>`${e==null?void 0:e.repository} बनाता है।`,g_t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f_t(e):t==="fa"?d_t(e):t==="ar"?h_t(e):t==="es"?p_t(e):t==="hi"?m_t(e):__t(e)}),v_t=e=>`Pushes to ${e==null?void 0:e.repository}.`,b_t=e=>`将推送到 ${e==null?void 0:e.repository}。`,y_t=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,x_t=e=>`يرفع التغييرات إلى ${e==null?void 0:e.repository}.`,w_t=e=>`Sube los cambios a ${e==null?void 0:e.repository}.`,k_t=e=>`${e==null?void 0:e.repository} पर पुश करता है।`,S_t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b_t(e):t==="fa"?y_t(e):t==="ar"?x_t(e):t==="es"?w_t(e):t==="hi"?k_t(e):v_t(e)}),C_t=()=>"Project location is required.",E_t=()=>"必须填写项目位置。",N_t=()=>"محل پروژه الزامی است.",z_t=()=>"موقع المشروع مطلوب.",j_t=()=>"La ubicación del proyecto es obligatoria.",A_t=()=>"प्रोजेक्ट स्थान ज़रूरी है।",Bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E_t():t==="fa"?N_t():t==="ar"?z_t():t==="es"?j_t():t==="hi"?A_t():C_t()}),T_t=()=>"Choose a different destination. The paper repository needs a new or empty folder.",R_t=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",M_t=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",O_t=()=>"اختر وجهة مختلفة. يحتاج مستودع الورقة إلى مجلد جديد أو فارغ.",D_t=()=>"Elige otro destino. El repositorio del paper necesita una carpeta nueva o vacía.",L_t=()=>"अलग गंतव्य चुनें। पेपर रिपॉज़िटरी को एक नए या खाली फ़ोल्डर की ज़रूरत है।",Pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R_t():t==="fa"?M_t():t==="ar"?O_t():t==="es"?D_t():t==="hi"?L_t():T_t()}),I_t=()=>"A linked public code repository is cloned without credentials.",$_t=()=>"关联的公开代码仓库无需凭据即可克隆。",B_t=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",P_t=()=>"يُستنسخ مستودع شيفرة عام مرتبط دون بيانات اعتماد.",F_t=()=>"El repositorio de código público vinculado se clona sin credenciales.",H_t=()=>"एक लिंक की गई सार्वजनिक कोड रिपॉज़िटरी बिना क्रेडेंशियल के क्लोन की जाती है।",q_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$_t():t==="fa"?B_t():t==="ar"?P_t():t==="es"?F_t():t==="hi"?H_t():I_t()}),U_t=e=>`Run ${e==null?void 0:e.command} before creating the project.`,G_t=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,K_t=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,V_t=e=>`نفّذ ${e==null?void 0:e.command} قبل إنشاء المشروع.`,W_t=e=>`Ejecuta ${e==null?void 0:e.command} antes de crear el proyecto.`,Q_t=e=>`प्रोजेक्ट बनाने से पहले ${e==null?void 0:e.command} चलाएं।`,X_t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?G_t(e):t==="fa"?K_t(e):t==="ar"?V_t(e):t==="es"?W_t(e):t==="hi"?Q_t(e):U_t(e)}),Y_t=()=>"Searching alphaXiv…",Z_t=()=>"正在搜索 alphaXiv…",J_t=()=>"در حال جست‌وجوی alphaXiv…",eft=()=>"جارٍ البحث في alphaXiv…",tft=()=>"Buscando en alphaXiv…",nft=()=>"alphaXiv खोजा जा रहा है…",rft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z_t():t==="fa"?J_t():t==="ar"?eft():t==="es"?tft():t==="hi"?nft():Y_t()}),sft=()=>"Use folder",ift=()=>"使用文件夹",aft=()=>"استفاده از پوشه",oft=()=>"استخدام المجلد",cft=()=>"Usar carpeta",lft=()=>"फ़ोल्डर इस्तेमाल करें",uft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ift():t==="fa"?aft():t==="ar"?oft():t==="es"?cft():t==="hi"?lft():sft()}),_ft=()=>"Can’t reach OpenResearch. This page is no longer live.",fft=()=>"无法连接 OpenResearch。此页面已不再实时同步。",dft=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",hft=()=>"تعذّر الاتصال بـ OpenResearch. لم تعد هذه الصفحة تُحدَّث تلقائيًا.",pft=()=>"No se puede conectar con OpenResearch. Esta página ya no se actualiza.",mft=()=>"OpenResearch तक नहीं पहुँच सके। यह पेज अब लाइव नहीं है।",D3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fft():t==="fa"?dft():t==="ar"?hft():t==="es"?pft():t==="hi"?mft():_ft()}),gft=()=>"A workspace for your research agents",vft=()=>"面向研究智能体的工作空间",bft=()=>"فضای کاری برای عامل‌های پژوهشی شما",yft=()=>"مساحة عمل لوكلاء بحثك",xft=()=>"Un espacio de trabajo para tus agentes de investigación",wft=()=>"आपके शोध एजेंटों के लिए एक वर्कस्पेस",kft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vft():t==="fa"?bft():t==="ar"?yft():t==="es"?xft():t==="hi"?wft():gft()}),Sft=()=>"Add papers that represent your research interests, including papers by other authors.",Cft=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",Eft=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",Nft=()=>"أضِف أوراقًا تمثّل اهتماماتك البحثية، بما في ذلك أوراق لمؤلفين آخرين.",zft=()=>"Añade papers que representen tus intereses de investigación, incluidos papers de otros autores.",jft=()=>"ऐसे पेपर जोड़ें जो आपकी शोध रुचियों को दर्शाते हों, चाहे वे किसी और लेखक के ही क्यों न हों।",Aft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cft():t==="fa"?Eft():t==="ar"?Nft():t==="es"?zft():t==="hi"?jft():Sft()}),Tft=()=>"API key",Rft=()=>"API 密钥",Mft=()=>"کلید API",Oft=()=>"مفتاح API",Dft=()=>"Clave de API",Lft=()=>"API की",CS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rft():t==="fa"?Mft():t==="ar"?Oft():t==="es"?Dft():t==="hi"?Lft():Tft()}),Ift=()=>"AI/ML",$ft=()=>"人工智能与机器学习",Bft=()=>"هوش مصنوعی و یادگیری ماشین",Pft=()=>"الذكاء الاصطناعي/تعلّم الآلة",Fft=()=>"IA/ML",Hft=()=>"AI/ML",qft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ft():t==="fa"?Bft():t==="ar"?Pft():t==="es"?Fft():t==="hi"?Hft():Ift()}),Uft=()=>"Biology",Gft=()=>"生物学",Kft=()=>"زیست‌شناسی",Vft=()=>"الأحياء",Wft=()=>"Biología",Qft=()=>"जीव विज्ञान",Xft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gft():t==="fa"?Kft():t==="ar"?Vft():t==="es"?Wft():t==="hi"?Qft():Uft()}),Yft=()=>"Other",Zft=()=>"其他",Jft=()=>"سایر",edt=()=>"أخرى",tdt=()=>"Otra",ndt=()=>"अन्य",rdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zft():t==="fa"?Jft():t==="ar"?edt():t==="es"?tdt():t==="hi"?ndt():Yft()}),sdt=()=>"Physics",idt=()=>"物理学",adt=()=>"فیزیک",odt=()=>"الفيزياء",cdt=()=>"Física",ldt=()=>"भौतिकी",udt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?idt():t==="fa"?adt():t==="ar"?odt():t==="es"?cdt():t==="hi"?ldt():sdt()}),_dt=()=>"Back",fdt=()=>"返回",ddt=()=>"بازگشت",hdt=()=>"رجوع",pdt=()=>"Atrás",mdt=()=>"वापस",Fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fdt():t==="fa"?ddt():t==="ar"?hdt():t==="es"?pdt():t==="hi"?mdt():_dt()}),gdt=()=>"Check failed",vdt=()=>"检查失败",bdt=()=>"بررسی ناموفق بود",ydt=()=>"فشل الفحص",xdt=()=>"Error en la comprobación",wdt=()=>"जाँच विफल",kdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vdt():t==="fa"?bdt():t==="ar"?ydt():t==="es"?xdt():t==="hi"?wdt():gdt()}),Sdt=()=>"Checking",Cdt=()=>"正在检查",Edt=()=>"در حال بررسی",Ndt=()=>"جارٍ الفحص",zdt=()=>"Comprobando",jdt=()=>"जाँचा जा रहा है",_f=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cdt():t==="fa"?Edt():t==="ar"?Ndt():t==="es"?zdt():t==="hi"?jdt():Sdt()}),Adt=()=>"Checking Git…",Tdt=()=>"正在检查 Git…",Rdt=()=>"در حال بررسی Git…",Mdt=()=>"جارٍ فحص Git…",Odt=()=>"Comprobando Git…",Ddt=()=>"Git जाँचा जा रहा है…",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=()=>"Choose a coding agent",$dt=()=>"选择编程智能体",Bdt=()=>"یک عامل کدنویسی انتخاب کنید",Pdt=()=>"اختر وكيل برمجة",Fdt=()=>"Elige un agente de programación",Hdt=()=>"एक कोडिंग एजेंट चुनें",qdt=((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()}),Udt=()=>"Choose a coding agent to continue.",Gdt=()=>"选择一个编程智能体以继续。",Kdt=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",Vdt=()=>"اختر وكيل برمجة للمتابعة.",Wdt=()=>"Elige un agente de programación para continuar.",Qdt=()=>"जारी रखने के लिए एक कोडिंग एजेंट चुनें।",Xdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gdt():t==="fa"?Kdt():t==="ar"?Vdt():t==="es"?Wdt():t==="hi"?Qdt():Udt()}),Ydt=()=>"Choose another coding agent",Zdt=()=>"选择其他编程智能体",Jdt=()=>"انتخاب یک عامل برنامه‌نویسی دیگر",eht=()=>"اختيار وكيل برمجة آخر",tht=()=>"Elegir otro agente de programación",nht=()=>"दूसरा कोडिंग एजेंट चुनें",rht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zdt():t==="fa"?Jdt():t==="ar"?eht():t==="es"?tht():t==="hi"?nht():Ydt()}),sht=()=>"Choose at least one research area to continue.",iht=()=>"请至少选择一个研究领域后再继续。",aht=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",oht=()=>"اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.",cht=()=>"Elige al menos un área de investigación para continuar.",lht=()=>"जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।",uht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iht():t==="fa"?aht():t==="ar"?oht():t==="es"?cht():t==="hi"?lht():sht()}),_ht=()=>"Choose one or more.",fht=()=>"请选择一项或多项。",dht=()=>"یک یا چند مورد را انتخاب کنید.",hht=()=>"اختر واحدًا أو أكثر.",pht=()=>"Elige una o varias.",mht=()=>"एक या अधिक चुनें।",ght=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fht():t==="fa"?dht():t==="ar"?hht():t==="es"?pht():t==="hi"?mht():_ht()}),vht=()=>"Choose your preferred coding agent",bht=()=>"请选择首选编程智能体",yht=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",xht=()=>"اختر وكيل البرمجة المفضّل لديك",wht=()=>"Elige tu agente de programación preferido",kht=()=>"अपना पसंदीदा कोडिंग एजेंट चुनें",Sht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bht():t==="fa"?yht():t==="ar"?xht():t==="es"?wht():t==="hi"?kht():vht()}),Cht=()=>"Consolidate your research",Eht=()=>"集中管理研究",Nht=()=>"پژوهش خود را یکپارچه کنید",zht=()=>"وحّد أبحاثك",jht=()=>"Consolida tu investigación",Aht=()=>"अपने शोध को एक जगह लाएं",Tht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eht():t==="fa"?Nht():t==="ar"?zht():t==="es"?jht():t==="hi"?Aht():Cht()}),Rht=()=>"Continue",Mht=()=>"继续",Oht=()=>"ادامه",Dht=()=>"متابعة",Lht=()=>"Continuar",Iht=()=>"जारी रखें",Hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mht():t==="fa"?Oht():t==="ar"?Dht():t==="es"?Lht():t==="hi"?Iht():Rht()}),$ht=()=>"Describe your research area to continue.",Bht=()=>"请描述你的研究领域后再继续。",Pht=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",Fht=()=>"صِف مجالك البحثي للمتابعة.",Hht=()=>"Describe tu área de investigación para continuar.",qht=()=>"जारी रखने के लिए अपना शोध क्षेत्र बताएं।",Uht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bht():t==="fa"?Pht():t==="ar"?Fht():t==="es"?Hht():t==="hi"?qht():$ht()}),Ght=()=>"Detecting Claude Code, Codex, OpenCode, Cursor, Antigravity…",Kht=()=>"正在检测 Claude Code、Codex、OpenCode、Cursor、Antigravity…",Vht=()=>"در حال شناسایی Claude Code، Codex، OpenCode و Cursor و Antigravity…",Wht=()=>"جارٍ اكتشاف Claude Code وCodex وOpenCode وCursor وAntigravity…",Qht=()=>"Detectando Claude Code, Codex, OpenCode, Cursor, Google Antigravity…",Xht=()=>"Claude Code, Codex, OpenCode, Cursor, Google Antigravity पहचाने जा रहे हैं…",Yht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kht():t==="fa"?Vht():t==="ar"?Wht():t==="es"?Qht():t==="hi"?Xht():Ght()}),Zht=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",Jht=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",ept=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",tpt=()=>"مثال: أعمل على تعلّم معزّز عالي الكفاءة في العيّنات لِما بعد تدريب نماذج اللغة الكبيرة، مع التركيز على الطرق التي لا تعتمد على نماذج المكافأة.",npt=()=>"p. ej., trabajo en RL eficiente en muestras para el post-entrenamiento de LLM, centrado en métodos sin modelo de recompensa.",rpt=()=>"जैसे: मैं LLM पोस्ट-ट्रेनिंग के लिए सैंपल-एफ़िशिएंट RL पर काम करता/करती हूँ, रिवॉर्ड-मॉडल-फ्री तरीकों पर ध्यान केंद्रित करते हुए।",spt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jht():t==="fa"?ept():t==="ar"?tpt():t==="es"?npt():t==="hi"?rpt():Zht()}),ipt=()=>"Error details",apt=()=>"错误详情",opt=()=>"جزئیات خطا",cpt=()=>"تفاصيل الخطأ",lpt=()=>"Detalles del error",upt=()=>"त्रुटि विवरण",_pt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?apt():t==="fa"?opt():t==="ar"?cpt():t==="es"?lpt():t==="hi"?upt():ipt()}),fpt=()=>"Everything stays local",dpt=()=>"一切都保留在本地",hpt=()=>"همه‌چیز محلی می‌ماند",ppt=()=>"كل شيء يبقى محليًا",mpt=()=>"Todo se queda en local",gpt=()=>"सब कुछ लोकल ही रहता है",vpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dpt():t==="fa"?hpt():t==="ar"?ppt():t==="es"?mpt():t==="hi"?gpt():fpt()}),bpt=()=>"Get started",ypt=()=>"开始使用",xpt=()=>"شروع",wpt=()=>"ابدأ الآن",kpt=()=>"Empezar",Spt=()=>"शुरू करें",Cpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ypt():t==="fa"?xpt():t==="ar"?wpt():t==="es"?kpt():t==="hi"?Spt():bpt()}),Ept=()=>"Git is required for local experiments. Install Git, then re-check.",Npt=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",zpt=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",jpt=()=>"‏Git مطلوب للتجارب المحلية. ثبّت Git ثم أعد الفحص.",Apt=()=>"Git es necesario para los experimentos locales. Instala Git y vuelve a comprobarlo.",Tpt=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। Git इंस्टॉल करें, फिर फिर से जाँचें।",qz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Npt():t==="fa"?zpt():t==="ar"?jpt():t==="es"?Apt():t==="hi"?Tpt():Ept()}),Rpt=()=>"Ground your agents",Mpt=()=>"为智能体提供可靠依据",Opt=()=>"عامل‌هایتان را به منابع متصل کنید",Dpt=()=>"زوّد وكلاءك بأساس بحثي",Lpt=()=>"Dale contexto a tus agentes",Ipt=()=>"अपने एजेंटों को आधार दें",$pt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mpt():t==="fa"?Opt():t==="ar"?Dpt():t==="es"?Lpt():t==="hi"?Ipt():Rpt()}),Bpt=()=>"Install broken",Ppt=()=>"安装损坏",Fpt=()=>"نصب خراب است",Hpt=()=>"التثبيت معطوب",qpt=()=>"Instalación dañada",Upt=()=>"इंस्टॉल खराब है",Gpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ppt():t==="fa"?Fpt():t==="ar"?Hpt():t==="es"?qpt():t==="hi"?Upt():Bpt()}),Kpt=()=>"Install Git to continue",Vpt=()=>"请安装 Git 后再继续",Wpt=()=>"برای ادامه Git را نصب کنید",Qpt=()=>"ثبّت Git للمتابعة",Xpt=()=>"Instala Git para continuar",Ypt=()=>"जारी रखने के लिए Git इंस्टॉल करें",Zpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vpt():t==="fa"?Wpt():t==="ar"?Qpt():t==="es"?Xpt():t==="hi"?Ypt():Kpt()}),Jpt=()=>"Loading account details…",e0t=()=>"正在加载账户信息…",t0t=()=>"در حال بارگذاری اطلاعات حساب…",n0t=()=>"جارٍ تحميل تفاصيل الحساب…",r0t=()=>"Cargando los datos de la cuenta…",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=()=>"Local Git",o0t=()=>"本地 Git",c0t=()=>"Git محلی",l0t=()=>"Git محلي",u0t=()=>"Git local",_0t=()=>"लोकल Git",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=()=>"Install needed",h0t=()=>"需要安装",p0t=()=>"نیاز به نصب",m0t=()=>"التثبيت مطلوب",g0t=()=>"No detectado",v0t=()=>"इंस्टॉल ज़रूरी है",Uz=((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=()=>"Not found",y0t=()=>"未找到",x0t=()=>"پیدا نشد",w0t=()=>"غير موجود",k0t=()=>"No encontrado",S0t=()=>"नहीं मिला",IL=((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()}),C0t=()=>"Signed out",E0t=()=>"未登录",N0t=()=>"وارد نشده",z0t=()=>"غير مسجل الدخول",j0t=()=>"Sin iniciar sesión",A0t=()=>"साइन आउट",$L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E0t():t==="fa"?N0t():t==="ar"?z0t():t==="es"?j0t():t==="hi"?A0t():C0t()}),T0t=()=>"OpenResearch uses a coding agent already installed on this machine.",R0t=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",M0t=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",O0t=()=>"يستخدم OpenResearch وكيل برمجة مثبّتًا مسبقًا على هذا الجهاز.",D0t=()=>"OpenResearch usa un agente de programación que ya esté instalado en este equipo.",L0t=()=>"OpenResearch इस मशीन पर पहले से इंस्टॉल किसी कोडिंग एजेंट का उपयोग करता है।",I0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R0t():t==="fa"?M0t():t==="ar"?O0t():t==="es"?D0t():t==="hi"?L0t():T0t()}),$0t=()=>"Couldn’t verify OpenCode is ready. Retry to check its installation and models.",B0t=()=>"无法确认 OpenCode 已就绪。请重试以检查安装和模型。",P0t=()=>"آماده بودن OpenCode تأیید نشد. برای بررسی نصب و مدل‌ها دوباره تلاش کنید.",F0t=()=>"تعذّر التحقق من جاهزية OpenCode. أعد المحاولة للتحقق من التثبيت والنماذج.",H0t=()=>"No se pudo verificar que OpenCode esté listo. Vuelve a intentarlo para comprobar su instalación y sus modelos.",q0t=()=>"यह सत्यापित नहीं हो सका कि OpenCode तैयार है। इसके इंस्टॉलेशन और मॉडल जाँचने के लिए फिर से कोशिश करें।",U0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B0t():t==="fa"?P0t():t==="ar"?F0t():t==="es"?H0t():t==="hi"?q0t():$0t()}),G0t=()=>"Other research area",K0t=()=>"其他研究领域",V0t=()=>"حوزهٔ پژوهشی دیگر",W0t=()=>"مجال بحثي آخر",Q0t=()=>"Otra área de investigación",X0t=()=>"अन्य शोध क्षेत्र",Y0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K0t():t==="fa"?V0t():t==="ar"?W0t():t==="es"?Q0t():t==="hi"?X0t():G0t()}),Z0t=()=>"Re-check",J0t=()=>"重新检查",emt=()=>"بررسی دوباره",tmt=()=>"إعادة الفحص",nmt=()=>"Volver a comprobar",rmt=()=>"फिर से जाँचें",Iv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J0t():t==="fa"?emt():t==="ar"?tmt():t==="es"?nmt():t==="hi"?rmt():Z0t()}),smt=()=>"Ready",imt=()=>"已就绪",amt=()=>"آماده",omt=()=>"جاهز",cmt=()=>"Listo",lmt=()=>"तैयार",ES=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?imt():t==="fa"?amt():t==="ar"?omt():t==="es"?cmt():t==="hi"?lmt():smt()}),umt=()=>"Re-check Git before continuing",_mt=()=>"请重新检查 Git 后再继续",fmt=()=>"پیش از ادامه Git را دوباره بررسی کنید",dmt=()=>"أعد فحص Git قبل المتابعة",hmt=()=>"Vuelve a comprobar Git antes de continuar",pmt=()=>"जारी रखने से पहले Git फिर से जाँचें",mmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_mt():t==="fa"?fmt():t==="ar"?dmt():t==="es"?hmt():t==="hi"?pmt():umt()}),gmt=()=>"Representative papers",vmt=()=>"代表性论文",bmt=()=>"مقاله‌های شاخص",ymt=()=>"أوراق تمثّل اهتماماتك البحثية",xmt=()=>"Papers representativos",wmt=()=>"प्रतिनिधि पेपर",kmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vmt():t==="fa"?bmt():t==="ar"?ymt():t==="es"?xmt():t==="hi"?wmt():gmt()}),Smt=()=>"Research background",Cmt=()=>"研究背景",Emt=()=>"پیشینهٔ پژوهشی",Nmt=()=>"الخلفية البحثية",zmt=()=>"Trayectoria de investigación",jmt=()=>"शोध पृष्ठभूमि",Amt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cmt():t==="fa"?Emt():t==="ar"?Nmt():t==="es"?zmt():t==="hi"?jmt():Smt()}),Tmt=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",Rmt=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",Mmt=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",Omt=()=>"تعذّر الوصول إلى orx. تأكد من أنه لا يزال يعمل، ثم أعد الفحص.",Dmt=()=>"No se pudo conectar con orx. Comprueba que sigue en ejecución y vuelve a comprobarlo.",Lmt=()=>"orx तक नहीं पहुँच सके। जाँचें कि यह अभी भी चल रहा है, फिर फिर से जाँचें।",pw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rmt():t==="fa"?Mmt():t==="ar"?Omt():t==="es"?Dmt():t==="hi"?Lmt():Tmt()}),Imt=()=>"Search alphaXiv by title to link a paper…",$mt=()=>"按标题搜索 alphaXiv 以关联论文…",Bmt=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",Pmt=()=>"ابحث في alphaXiv بالعنوان لربط ورقة…",Fmt=()=>"Busca en alphaXiv por título para vincular un paper…",Hmt=()=>"एक पेपर लिंक करने के लिए शीर्षक से alphaXiv खोजें…",qmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$mt():t==="fa"?Bmt():t==="ar"?Pmt():t==="es"?Fmt():t==="hi"?Hmt():Imt()}),Umt=()=>"Searching alphaXiv…",Gmt=()=>"正在搜索 alphaXiv…",Kmt=()=>"در حال جست‌وجوی alphaXiv…",Vmt=()=>"جارٍ البحث في alphaXiv…",Wmt=()=>"Buscando en alphaXiv…",Qmt=()=>"alphaXiv खोजा जा रहा है…",Xmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gmt():t==="fa"?Kmt():t==="ar"?Vmt():t==="es"?Wmt():t==="hi"?Qmt():Umt()}),Ymt=()=>"Selected",Zmt=()=>"已选择",Jmt=()=>"انتخاب‌شده",egt=()=>"محدد",tgt=()=>"Seleccionado",ngt=()=>"चयनित",rgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zmt():t==="fa"?Jmt():t==="ar"?egt():t==="es"?tgt():t==="hi"?ngt():Ymt()}),sgt=()=>"Local model unavailable",igt=()=>"本地模型不可用",agt=()=>"مدل محلی در دسترس نیست",ogt=()=>"النموذج المحلي غير متاح",cgt=()=>"Modelo local no disponible",lgt=()=>"लोकल मॉडल उपलब्ध नहीं",BL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?igt():t==="fa"?agt():t==="ar"?ogt():t==="es"?cgt():t==="hi"?lgt():sgt()}),ugt=()=>"Setting things up…",_gt=()=>"正在设置…",fgt=()=>"در حال راه‌اندازی…",dgt=()=>"جارٍ التهيئة…",hgt=()=>"Preparando todo…",pgt=()=>"सेट अप किया जा रहा है…",mgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_gt():t==="fa"?fgt():t==="ar"?dgt():t==="es"?hgt():t==="hi"?pgt():ugt()}),ggt=()=>"Connect a local model or sign in to a coding agent to continue",vgt=()=>"连接本地模型或登录编码智能体以继续",bgt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل کدنویسی وارد شوید",ygt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل برمجة للمتابعة",xgt=()=>"Conecta un modelo local o inicia sesión en un agente de programación para continuar",wgt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी कोडिंग एजेंट में साइन इन करें",kgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vgt():t==="fa"?bgt():t==="ar"?ygt():t==="es"?xgt():t==="hi"?wgt():ggt()}),Sgt=()=>"Connect a local model or sign in to an agent to continue.",Cgt=()=>"连接本地模型或登录一个智能体以继续。",Egt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل وارد شوید.",Ngt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل للمتابعة.",zgt=()=>"Conecta un modelo local o inicia sesión en un agente para continuar.",jgt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी एजेंट में साइन इन करें।",Agt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cgt():t==="fa"?Egt():t==="ar"?Ngt():t==="es"?zgt():t==="hi"?jgt():Sgt()}),Tgt=()=>"Signed in",Rgt=()=>"已登录",Mgt=()=>"وارد شده",Ogt=()=>"تم تسجيل الدخول",Dgt=()=>"Sesión iniciada",Lgt=()=>"साइन इन",Igt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rgt():t==="fa"?Mgt():t==="ar"?Ogt():t==="es"?Dgt():t==="hi"?Lgt():Tgt()}),$gt=()=>"Connected to alphaXiv, bioRxiv, OpenAlex, and PubMed to ground your agents in the latest research.",Bgt=()=>"已连接 alphaXiv、bioRxiv、OpenAlex 和 PubMed,让智能体以最新研究为依据。",Pgt=()=>"به alphaXiv، bioRxiv، OpenAlex و PubMed متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",Fgt=()=>"متصل بـ alphaXiv وbioRxiv وOpenAlex وPubMed ليستند وكلاؤك إلى أحدث الأبحاث.",Hgt=()=>"Conectado a alphaXiv, bioRxiv, OpenAlex y PubMed para que tus agentes trabajen con la investigación más reciente.",qgt=()=>"आपके एजेंटों को नवीनतम शोध पर आधारित रखने के लिए alphaXiv, bioRxiv, OpenAlex और PubMed से कनेक्ट किया गया।",Ugt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bgt():t==="fa"?Pgt():t==="ar"?Fgt():t==="es"?Hgt():t==="hi"?qgt():$gt()}),Ggt=()=>"· Step 1 of 2",Kgt=()=>"· 第 1 步,共 2 步",Vgt=()=>"· مرحلهٔ ۱ از ۲",Wgt=()=>"· الخطوة 1 من 2",Qgt=()=>"· Paso 1 de 2",Xgt=()=>"· चरण 1 / 2",Ygt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kgt():t==="fa"?Vgt():t==="ar"?Wgt():t==="es"?Qgt():t==="hi"?Xgt():Ggt()}),Zgt=()=>"· Step 2 of 2",Jgt=()=>"· 第 2 步,共 2 步",e1t=()=>"· مرحلهٔ ۲ از ۲",t1t=()=>"· الخطوة 2 من 2",n1t=()=>"· Paso 2 de 2",r1t=()=>"· चरण 2 / 2",s1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jgt():t==="fa"?e1t():t==="ar"?t1t():t==="es"?n1t():t==="hi"?r1t():Zgt()}),i1t=()=>"Tell us about your research",a1t=()=>"介绍一下你的研究",o1t=()=>"از پژوهش خود بگویید",c1t=()=>"أخبرنا عن بحثك",l1t=()=>"Cuéntanos sobre tu investigación",u1t=()=>"हमें अपने शोध के बारे में बताएं",_1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a1t():t==="fa"?o1t():t==="ar"?c1t():t==="es"?l1t():t==="hi"?u1t():i1t()}),f1t=()=>"Tell us your other research area",d1t=()=>"告诉我们你的其他研究领域",h1t=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",p1t=()=>"أخبرنا عن مجالك البحثي الآخر",m1t=()=>"Cuéntanos cuál es tu otra área de investigación",g1t=()=>"हमें अपना अन्य शोध क्षेत्र बताएं",v1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d1t():t==="fa"?h1t():t==="ar"?p1t():t==="es"?m1t():t==="hi"?g1t():f1t()}),b1t=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",y1t=()=>"在一处跟踪实验、产物、算力、技能和代码。",x1t=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",w1t=()=>"تتبّع التجارب والمُخرَجات والحوسبة والمهارات والشيفرة في مكان واحد.",k1t=()=>"Gestiona experimentos, artefactos, cómputo, skills y código en un solo lugar.",S1t=()=>"प्रयोग, आर्टिफ़ैक्ट, कंप्यूट, स्किल और कोड — सब एक ही जगह ट्रैक करें।",C1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y1t():t==="fa"?x1t():t==="ar"?w1t():t==="es"?k1t():t==="hi"?S1t():b1t()}),E1t=()=>"Unable to verify",N1t=()=>"无法验证",z1t=()=>"تأیید ممکن نیست",j1t=()=>"تعذّر التحقق",A1t=()=>"No se pudo verificar",T1t=()=>"सत्यापित नहीं हो सका",mw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N1t():t==="fa"?z1t():t==="ar"?j1t():t==="es"?A1t():t==="hi"?T1t():E1t()}),R1t=()=>"Update required",M1t=()=>"需要更新",O1t=()=>"نیازمند به‌روزرسانی",D1t=()=>"مطلوب تحديث",L1t=()=>"Actualización necesaria",I1t=()=>"अपडेट ज़रूरी है",$1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M1t():t==="fa"?O1t():t==="ar"?D1t():t==="es"?L1t():t==="hi"?I1t():R1t()}),B1t=()=>"Waiting for the Git check",P1t=()=>"正在等待 Git 检查",F1t=()=>"در انتظار بررسی Git",H1t=()=>"في انتظار فحص Git",q1t=()=>"Esperando la comprobación de Git",U1t=()=>"Git जाँच का इंतज़ार है",G1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P1t():t==="fa"?F1t():t==="ar"?H1t():t==="es"?q1t():t==="hi"?U1t():B1t()}),K1t=()=>"Waiting for the local tool checks",V1t=()=>"正在等待本地工具检查",W1t=()=>"در انتظار بررسی ابزارهای محلی",Q1t=()=>"في انتظار فحوص الأدوات المحلية",X1t=()=>"Esperando las comprobaciones de las herramientas locales",Y1t=()=>"लोकल टूल जाँच का इंतज़ार है",Z1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V1t():t==="fa"?W1t():t==="ar"?Q1t():t==="es"?X1t():t==="hi"?Y1t():K1t()}),J1t=()=>"What areas are you interested in?",evt=()=>"你对哪些领域感兴趣?",tvt=()=>"به چه حوزه‌هایی علاقه دارید؟",nvt=()=>"ما المجالات التي تهتم بها؟",rvt=()=>"¿Qué áreas te interesan?",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():J1t()}),avt=()=>"Your code, data, and experiment history stay on your machine.",ovt=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",cvt=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",lvt=()=>"تبقى شيفرتك وبياناتك وسجل تجاربك على جهازك.",uvt=()=>"Tu código, tus datos y tu historial de experimentos se quedan en tu equipo.",_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=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",hvt=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",pvt=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",mvt=()=>"لم يعد الوكيل الذي اخترته جاهزًا. ارجع إلى الخطوة 1 واختر غيره.",gvt=()=>"El agente que elegiste ya no está listo. Vuelve al paso 1 y elige otro.",vvt=()=>"आपका चुना हुआ एजेंट अब तैयार नहीं है। चरण 1 पर वापस जाएं और दूसरा चुनें।",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=()=>"Add cookie",xvt=()=>"添加 cookie",wvt=()=>"افزودن کوکی",kvt=()=>"إضافة ملف تعريف الارتباط",Svt=()=>"Añadir cookie",Cvt=()=>"कुकी जोड़ें",Evt=((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()}),Nvt=()=>"Changed here and on Overleaf — choose which copy to keep",zvt=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",jvt=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",Avt=()=>"تغيّر هنا وعلى Overleaf — اختر أي نسخة تحتفظ بها",Tvt=()=>"Cambió aquí y en Overleaf — elige qué copia conservar",Rvt=()=>"यहाँ और Overleaf दोनों जगह बदला गया — चुनें कि कौन सी कॉपी रखनी है",Mvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zvt():t==="fa"?jvt():t==="ar"?Avt():t==="es"?Tvt():t==="hi"?Rvt():Nvt()}),Ovt=()=>"Create a token ↗",Dvt=()=>"创建令牌 ↗",Lvt=()=>"ساخت توکن ↗",Ivt=()=>"إنشاء رمز ↗",$vt=()=>"Crear un token ↗",Bvt=()=>"एक टोकन बनाएं ↗",Pvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dvt():t==="fa"?Lvt():t==="ar"?Ivt():t==="es"?$vt():t==="hi"?Bvt():Ovt()}),Fvt=()=>"Overleaf Git token",Hvt=()=>"Overleaf Git 令牌",qvt=()=>"توکن Git در Overleaf",Uvt=()=>"رمز Git لـ Overleaf",Gvt=()=>"Token de Git de Overleaf",Kvt=()=>"Overleaf Git टोकन",Gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hvt():t==="fa"?qvt():t==="ar"?Uvt():t==="es"?Gvt():t==="hi"?Kvt():Fvt()}),Vvt=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",Wvt=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",Qvt=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",Xvt=()=>"تابِع Overleaf أثناء كتابة الآخرين بإضافة ملف تعريف ارتباط جلسة Overleaf.",Yvt=()=>"Sigue los cambios de Overleaf mientras se escribe añadiendo tu cookie de sesión de Overleaf.",Zvt=()=>"अपनी Overleaf सेशन कुकी जोड़कर लोगों के टाइप करते ही Overleaf को फ़ॉलो करें।",Jvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wvt():t==="fa"?Qvt():t==="ar"?Xvt():t==="es"?Yvt():t==="hi"?Zvt():Vvt()}),ebt=()=>"Import from browser",tbt=()=>"从浏览器导入",nbt=()=>"وارد کردن از مرورگر",rbt=()=>"الاستيراد من المتصفح",sbt=()=>"Importar desde el navegador",ibt=()=>"ब्राउज़र से इंपोर्ट करें",abt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tbt():t==="fa"?nbt():t==="ar"?rbt():t==="es"?sbt():t==="hi"?ibt():ebt()}),obt=()=>"In step with Overleaf",cbt=()=>"已与 Overleaf 同步",lbt=()=>"با Overleaf همگام است",ubt=()=>"متزامن مع Overleaf",_bt=()=>"Sincronizado con Overleaf",fbt=()=>"Overleaf के साथ मेल में",PL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cbt():t==="fa"?lbt():t==="ar"?ubt():t==="es"?_bt():t==="hi"?fbt():obt()}),dbt=()=>"The last sync did not finish.",hbt=()=>"上次同步未完成。",pbt=()=>"آخرین همگام‌سازی کامل نشد.",mbt=()=>"لم تكتمل آخر مزامنة.",gbt=()=>"La última sincronización no terminó.",vbt=()=>"पिछला सिंक पूरा नहीं हुआ।",bbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hbt():t==="fa"?pbt():t==="ar"?mbt():t==="es"?gbt():t==="hi"?vbt():dbt()}),ybt=()=>"Link and sync",xbt=()=>"关联并同步",wbt=()=>"پیوند و همگام‌سازی",kbt=()=>"الربط والمزامنة",Sbt=()=>"Vincular y sincronizar",Cbt=()=>"लिंक करें और सिंक करें",Ebt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xbt():t==="fa"?wbt():t==="ar"?kbt():t==="es"?Sbt():t==="hi"?Cbt():ybt()}),Nbt=()=>"Connecting to Overleaf…",zbt=()=>"正在连接 Overleaf…",jbt=()=>"در حال اتصال به Overleaf…",Abt=()=>"جارٍ الاتصال بـ Overleaf…",Tbt=()=>"Conectando con Overleaf…",Rbt=()=>"Overleaf से कनेक्ट हो रहा है…",Mbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zbt():t==="fa"?jbt():t==="ar"?Abt():t==="es"?Tbt():t==="hi"?Rbt():Nbt()}),Obt=()=>"Edits are live on Overleaf",Dbt=()=>"编辑已在 Overleaf 实时同步",Lbt=()=>"ویرایش‌ها روی Overleaf زنده‌اند",Ibt=()=>"تظهر التعديلات فورًا على Overleaf",$bt=()=>"Los cambios se sincronizan en directo con Overleaf",Bbt=()=>"बदलाव Overleaf पर लाइव हैं",Pbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dbt():t==="fa"?Lbt():t==="ar"?Ibt():t==="es"?$bt():t==="hi"?Bbt():Obt()}),Fbt=()=>"Retry",Hbt=()=>"重试",qbt=()=>"تلاش دوباره",Ubt=()=>"إعادة المحاولة",Gbt=()=>"Reintentar",Kbt=()=>"फिर से कोशिश करें",Vbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hbt():t==="fa"?qbt():t==="ar"?Ubt():t==="es"?Gbt():t==="hi"?Kbt():Fbt()}),Wbt=()=>"Live sync stopped.",Qbt=()=>"实时同步已停止。",Xbt=()=>"همگام‌سازی زنده متوقف شد.",Ybt=()=>"توقفت المزامنة المباشرة.",Zbt=()=>"Sincronización en directo detenida.",Jbt=()=>"लाइव सिंक रुक गया।",eyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qbt():t==="fa"?Xbt():t==="ar"?Ybt():t==="es"?Zbt():t==="hi"?Jbt():Wbt()}),tyt=()=>"Live sync starts once the paper is in step with Overleaf.",nyt=()=>"论文与 Overleaf 同步后,实时同步即会开始。",ryt=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",syt=()=>"تبدأ المزامنة المباشرة بمجرد أن تتزامن الورقة مع Overleaf.",iyt=()=>"La sincronización en directo empieza cuando el paper esté sincronizado con Overleaf.",ayt=()=>"पेपर Overleaf के साथ मेल में आते ही लाइव सिंक शुरू होगा।",oyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nyt():t==="fa"?ryt():t==="ar"?syt():t==="es"?iyt():t==="hi"?ayt():tyt()}),cyt=()=>"My projects ↗",lyt=()=>"我的项目 ↗",uyt=()=>"پروژه‌های من ↗",_yt=()=>"مشاريعي ↗",fyt=()=>"Mis proyectos ↗",dyt=()=>"मेरे प्रोजेक्ट ↗",Kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lyt():t==="fa"?uyt():t==="ar"?_yt():t==="es"?fyt():t==="hi"?dyt():cyt()}),hyt=()=>"Nothing could be synced.",pyt=()=>"没有内容可以同步。",myt=()=>"هیچ موردی قابل همگام‌سازی نبود.",gyt=()=>"تعذّرت مزامنة أي شيء.",vyt=()=>"No se pudo sincronizar nada.",byt=()=>"कुछ भी सिंक नहीं हो सका।",yyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pyt():t==="fa"?myt():t==="ar"?gyt():t==="es"?vyt():t==="hi"?byt():hyt()}),xyt=()=>"Open Overleaf ↗",wyt=()=>"打开 Overleaf ↗",kyt=()=>"باز کردن Overleaf ↗",Syt=()=>"فتح Overleaf ↗",Cyt=()=>"Abrir Overleaf ↗",Eyt=()=>"Overleaf खोलें ↗",Nyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wyt():t==="fa"?kyt():t==="ar"?Syt():t==="es"?Cyt():t==="hi"?Eyt():xyt()}),zyt=()=>"Cancel",jyt=()=>"取消",Ayt=()=>"لغو",Tyt=()=>"إلغاء",Ryt=()=>"Cancelar",Myt=()=>"रद्द करें",FL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jyt():t==="fa"?Ayt():t==="ar"?Tyt():t==="es"?Ryt():t==="hi"?Myt():zyt()}),Oyt=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",Dyt=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",Lyt=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",Iyt=()=>"تغيّر هنا وعلى Overleaf. كلا النسختين لم تُمسّا — اختر أيّهما تحتفظ به.",$yt=()=>"cambió aquí y en Overleaf. No se ha tocado ninguna de las dos copias — elige cuál conservar.",Byt=()=>"यहाँ और Overleaf दोनों जगह बदला गया। दोनों कॉपी सुरक्षित हैं — चुनें कि कौन सी रखनी है।",Pyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dyt():t==="fa"?Lyt():t==="ar"?Iyt():t==="es"?$yt():t==="hi"?Byt():Oyt()}),Fyt=()=>"Keep this copy",Hyt=()=>"保留此副本",qyt=()=>"نگه داشتن این نسخه",Uyt=()=>"الاحتفاظ بهذه النسخة",Gyt=()=>"Conservar esta copia",Kyt=()=>"यह कॉपी रखें",Vyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hyt():t==="fa"?qyt():t==="ar"?Uyt():t==="es"?Gyt():t==="hi"?Kyt():Fyt()}),Wyt=()=>"Open in Overleaf",Qyt=()=>"在 Overleaf 中打开",Xyt=()=>"باز کردن در Overleaf",Yyt=()=>"فتح في Overleaf",Zyt=()=>"Abrir en Overleaf",Jyt=()=>"Overleaf में खोलें",ext=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qyt():t==="fa"?Xyt():t==="ar"?Yyt():t==="es"?Zyt():t==="hi"?Jyt():Wyt()}),txt=()=>"Replace the Overleaf token",nxt=()=>"替换 Overleaf 令牌",rxt=()=>"جایگزینی توکن Overleaf",sxt=()=>"استبدال رمز Overleaf",ixt=()=>"Reemplazar el token de Overleaf",axt=()=>"Overleaf टोकन बदलें",Vz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nxt():t==="fa"?rxt():t==="ar"?sxt():t==="es"?ixt():t==="hi"?axt():txt()}),oxt=()=>"Sync files",cxt=()=>"同步文件",lxt=()=>"همگام‌سازی فایل‌ها",uxt=()=>"مزامنة الملفات",_xt=()=>"Sincronizar archivos",fxt=()=>"फ़ाइलें सिंक करें",dxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cxt():t==="fa"?lxt():t==="ar"?uxt():t==="es"?_xt():t==="hi"?fxt():oxt()}),hxt=()=>"Unlink",pxt=()=>"取消关联",mxt=()=>"قطع پیوند",gxt=()=>"إلغاء الربط",vxt=()=>"Desvincular",bxt=()=>"लिंक हटाएं",yxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pxt():t==="fa"?mxt():t==="ar"?gxt():t==="es"?vxt():t==="hi"?bxt():hxt()}),xxt=()=>"Upload a copy as a new project ↗",wxt=()=>"上传副本作为新项目 ↗",kxt=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",Sxt=()=>"رفع نسخة كمشروع جديد ↗",Cxt=()=>"Subir una copia como proyecto nuevo ↗",Ext=()=>"नए प्रोजेक्ट के रूप में एक कॉपी अपलोड करें ↗",HL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wxt():t==="fa"?kxt():t==="ar"?Sxt():t==="es"?Cxt():t==="hi"?Ext():xxt()}),Nxt=()=>"Use Overleaf's",zxt=()=>"使用 Overleaf 的副本",jxt=()=>"استفاده از نسخهٔ Overleaf",Axt=()=>"استخدام نسخة Overleaf",Txt=()=>"Usar la de Overleaf",Rxt=()=>"Overleaf का इस्तेमाल करें",Mxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zxt():t==="fa"?jxt():t==="ar"?Axt():t==="es"?Txt():t==="hi"?Rxt():Nxt()}),Oxt=()=>"This paper stays in step with Overleaf.",Dxt=()=>"此论文将与 Overleaf 保持同步。",Lxt=()=>"این مقاله با Overleaf همگام می‌ماند.",Ixt=()=>"تبقى هذه الورقة متزامنة مع Overleaf.",$xt=()=>"Este paper se mantiene sincronizado con Overleaf.",Bxt=()=>"यह पेपर Overleaf के साथ मेल में रहता है।",Pxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dxt():t==="fa"?Lxt():t==="ar"?Ixt():t==="es"?$xt():t==="hi"?Bxt():Oxt()}),Fxt=()=>"Paste it instead",Hxt=()=>"改为粘贴",qxt=()=>"به‌جایش بچسبانید",Uxt=()=>"الصقه بدلًا من ذلك",Gxt=()=>"Pegarla manualmente",Kxt=()=>"इसके बजाय पेस्ट करें",Vxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hxt():t==="fa"?qxt():t==="ar"?Uxt():t==="es"?Gxt():t==="hi"?Kxt():Fxt()}),Wxt=e=>`Pulled ${e==null?void 0:e.paths}.`,Qxt=e=>`已拉取 ${e==null?void 0:e.paths}。`,Xxt=e=>`${e==null?void 0:e.paths} دریافت شد.`,Yxt=e=>`سُحب ${e==null?void 0:e.paths}.`,Zxt=e=>`Descargado: ${e==null?void 0:e.paths}.`,Jxt=e=>`${e==null?void 0:e.paths} पुल किया।`,e2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qxt(e):t==="fa"?Xxt(e):t==="ar"?Yxt(e):t==="es"?Zxt(e):t==="hi"?Jxt(e):Wxt(e)}),t2t=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,n2t=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,r2t=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,s2t=e=>`سُحب ${e==null?void 0:e.pulled}؛ ورُفع ${e==null?void 0:e.pushed}.`,i2t=e=>`Descargado: ${e==null?void 0:e.pulled}; subido: ${e==null?void 0:e.pushed}.`,a2t=e=>`${e==null?void 0:e.pulled} पुल किया; ${e==null?void 0:e.pushed} पुश किया।`,o2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?n2t(e):t==="fa"?r2t(e):t==="ar"?s2t(e):t==="es"?i2t(e):t==="hi"?a2t(e):t2t(e)}),c2t=e=>`Pushed ${e==null?void 0:e.paths}.`,l2t=e=>`已推送 ${e==null?void 0:e.paths}。`,u2t=e=>`${e==null?void 0:e.paths} ارسال شد.`,_2t=e=>`رُفع ${e==null?void 0:e.paths}.`,f2t=e=>`Subido: ${e==null?void 0:e.paths}.`,d2t=e=>`${e==null?void 0:e.paths} पुश किया।`,h2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?l2t(e):t==="fa"?u2t(e):t==="ar"?_2t(e):t==="es"?f2t(e):t==="hi"?d2t(e):c2t(e)}),p2t=()=>"Add a fresh Overleaf session cookie to start following again.",m2t=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",g2t=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",v2t=()=>"أضِف ملف تعريف ارتباط جلسة Overleaf جديدًا لبدء المتابعة مجددًا.",b2t=()=>"Añade una nueva cookie de sesión de Overleaf para volver a seguir los cambios.",y2t=()=>"फिर से फ़ॉलो करना शुरू करने के लिए एक नई Overleaf सेशन कुकी जोड़ें।",x2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m2t():t==="fa"?g2t():t==="ar"?v2t():t==="es"?b2t():t==="hi"?y2t():p2t()}),w2t=()=>"Save the file first",k2t=()=>"请先保存文件",S2t=()=>"ابتدا فایل را ذخیره کنید",C2t=()=>"احفظ الملف أولًا",E2t=()=>"Guarda el archivo primero",N2t=()=>"पहले फ़ाइल सेव करें",z2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k2t():t==="fa"?S2t():t==="ar"?C2t():t==="es"?E2t():t==="hi"?N2t():w2t()}),j2t=()=>"Save this file to sync it with Overleaf",A2t=()=>"保存此文件以与 Overleaf 同步",T2t=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",R2t=()=>"احفظ هذا الملف لمزامنته مع Overleaf",M2t=()=>"Guarda este archivo para sincronizarlo con Overleaf",O2t=()=>"Overleaf के साथ सिंक करने के लिए इस फ़ाइल को सेव करें",qL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A2t():t==="fa"?T2t():t==="ar"?R2t():t==="es"?M2t():t==="hi"?O2t():j2t()}),D2t=()=>"Save token",L2t=()=>"保存令牌",I2t=()=>"ذخیرهٔ توکن",$2t=()=>"حفظ الرمز",B2t=()=>"Guardar token",P2t=()=>"टोकन सेव करें",F2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L2t():t==="fa"?I2t():t==="ar"?$2t():t==="es"?B2t():t==="hi"?P2t():D2t()}),H2t=()=>"Send this paper to Overleaf",q2t=()=>"将此论文发送到 Overleaf",U2t=()=>"ارسال مقاله به Overleaf",G2t=()=>"أرسل هذه الورقة إلى Overleaf",K2t=()=>"Enviar este paper a Overleaf",V2t=()=>"यह पेपर Overleaf को भेजें",W2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q2t():t==="fa"?U2t():t==="ar"?G2t():t==="es"?K2t():t==="hi"?V2t():H2t()}),Q2t=()=>"Overleaf session cookie",X2t=()=>"Overleaf 会话 cookie",Y2t=()=>"کوکی نشست Overleaf",Z2t=()=>"ملف تعريف ارتباط جلسة Overleaf",J2t=()=>"Cookie de sesión de Overleaf",ewt=()=>"Overleaf सेशन कुकी",L3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X2t():t==="fa"?Y2t():t==="ar"?Z2t():t==="es"?J2t():t==="hi"?ewt():Q2t()}),twt=()=>"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.",nwt=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",rwt=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",swt=()=>"لمتابعة Overleaf أثناء كتابة الآخرين، الصق ملف تعريف ارتباط جلسة Overleaf: في متصفح مسجّل الدخول إلى Overleaf، افتح أدوات المطوّر، وابحث عن ملف تعريف الارتباط overleaf_session2، وانسخ قيمته. يبقى على هذا الجهاز.",iwt=()=>"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.",awt=()=>"लोगों के टाइप करते ही Overleaf को फ़ॉलो करने के लिए, अपनी Overleaf सेशन कुकी पेस्ट करें: Overleaf में साइन इन ब्राउज़र में, डेवलपर टूल खोलें, overleaf_session2 कुकी खोजें, और उसकी वैल्यू कॉपी करें। यह इसी मशीन पर रहती है।",owt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nwt():t==="fa"?rwt():t==="ar"?swt():t==="es"?iwt():t==="hi"?awt():twt()}),cwt=()=>"Overleaf sync failed",lwt=()=>"Overleaf 同步失败",uwt=()=>"همگام‌سازی با Overleaf ناموفق بود",_wt=()=>"فشلت مزامنة Overleaf",fwt=()=>"Error al sincronizar con Overleaf",dwt=()=>"Overleaf सिंक विफल",I3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lwt():t==="fa"?uwt():t==="ar"?_wt():t==="es"?fwt():t==="hi"?dwt():cwt()}),hwt=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",pwt=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",mwt=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",gwt=()=>"يتزامن النص مباشرةً. ينقل هذا الأشكال والملفات الأخرى، ويحسم التعارضات.",vwt=()=>"El texto se sincroniza en directo. Esto mueve las figuras y otros archivos, y resuelve conflictos.",bwt=()=>"टेक्स्ट लाइव सिंक होता है। यह फ़िगर और अन्य फ़ाइलें ले जाता है, और टकराव सुलझाता है।",ywt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pwt():t==="fa"?mwt():t==="ar"?gwt():t==="es"?vwt():t==="hi"?bwt():hwt()}),xwt=()=>"Syncing with Overleaf…",wwt=()=>"正在与 Overleaf 同步…",kwt=()=>"در حال همگام‌سازی با Overleaf…",Swt=()=>"جارٍ المزامنة مع Overleaf…",Cwt=()=>"Sincronizando con Overleaf…",Ewt=()=>"Overleaf के साथ सिंक हो रहा है…",UL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wwt():t==="fa"?kwt():t==="ar"?Swt():t==="es"?Cwt():t==="hi"?Ewt():xwt()}),Nwt=()=>"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.",zwt=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",jwt=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",Awt=()=>"الصق رمز مصادقة Git لـ Overleaf لإبقاء هذه الورقة متزامنة مع مشروع Overleaf. أنشئ واحدًا في Overleaf ضمن إعدادات الحساب — يأتي تكامل Git مع خطة Overleaf مدفوعة.",Twt=()=>"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.",Rwt=()=>"इस पेपर को किसी Overleaf प्रोजेक्ट के साथ मेल में रखने के लिए एक Overleaf Git प्रमाणीकरण टोकन पेस्ट करें। इसे Overleaf में Account Settings के तहत बनाएं — Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है।",Mwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zwt():t==="fa"?jwt():t==="ar"?Awt():t==="es"?Twt():t==="hi"?Rwt():Nwt()}),Owt=()=>"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.",Dwt=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",Lwt=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",Iwt=()=>"الصق رابط مشروع Overleaf الذي تنتمي إليه هذه الورقة. لا يستطيع Overleaf إنشاء مشروع عبر Git، لذا افتح المشروع أو أنشئه هناك أولًا.",$wt=()=>"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.",Bwt=()=>"उस Overleaf प्रोजेक्ट का URL पेस्ट करें जिससे यह पेपर संबंधित है। Overleaf Git के ज़रिए एक नहीं बना सकता, इसलिए पहले वहाँ प्रोजेक्ट खोलें या बनाएं।",Pwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dwt():t==="fa"?Lwt():t==="ar"?Iwt():t==="es"?$wt():t==="hi"?Bwt():Owt()}),Fwt=()=>"Toggle Plan mode for this chat",Hwt=()=>"切换此聊天的计划模式",qwt=()=>"تغییر حالت طرح این گفت‌وگو",Uwt=()=>"تبديل وضع التخطيط لهذه المحادثة",Gwt=()=>"Activa o desactiva el modo Plan en este chat",Kwt=()=>"इस चैट के लिए प्लान मोड टॉगल करें",Vwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hwt():t==="fa"?qwt():t==="ar"?Uwt():t==="es"?Gwt():t==="hi"?Kwt():Fwt()}),Wwt=()=>"Accept and auto mode",Qwt=()=>"接受并使用自动模式",Xwt=()=>"پذیرش و حالت خودکار",Ywt=()=>"قبول وتفعيل الوضع التلقائي",Zwt=()=>"Aceptar en modo automático",Jwt=()=>"स्वीकार करें और ऑटो मोड",e4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qwt():t==="fa"?Xwt():t==="ar"?Ywt():t==="es"?Zwt():t==="hi"?Jwt():Wwt()}),t4t=()=>"Accept and bypass all",n4t=()=>"接受并跳过所有审批",r4t=()=>"پذیرش و عبور از همهٔ تأییدها",s4t=()=>"القبول وتجاوز الكل",i4t=()=>"Aceptar y omitir permisos",a4t=()=>"स्वीकार करें और सब बायपास करें",o4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n4t():t==="fa"?r4t():t==="ar"?s4t():t==="es"?i4t():t==="hi"?a4t():t4t()}),c4t=()=>"Accept plan",l4t=()=>"接受计划",u4t=()=>"پذیرش طرح",_4t=()=>"قبول الخطة",f4t=()=>"Aceptar plan",d4t=()=>"प्लान स्वीकार करें",h4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l4t():t==="fa"?u4t():t==="ar"?_4t():t==="es"?f4t():t==="hi"?d4t():c4t()}),p4t=e=>`${e==null?void 0:e.agent} proposed a plan`,m4t=e=>`${e==null?void 0:e.agent} 提出了一个计划`,g4t=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,v4t=e=>`${e==null?void 0:e.agent} اقترح خطة`,b4t=e=>`${e==null?void 0:e.agent} propuso un plan`,y4t=e=>`${e==null?void 0:e.agent} ने एक प्लान प्रस्तावित किया`,x4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?m4t(e):t==="fa"?g4t(e):t==="ar"?v4t(e):t==="es"?b4t(e):t==="hi"?y4t(e):p4t(e)}),w4t=e=>`${e==null?void 0:e.agent} is ready to proceed`,k4t=e=>`${e==null?void 0:e.agent} 已准备好继续`,S4t=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,C4t=e=>`${e==null?void 0:e.agent} جاهز للمتابعة`,E4t=e=>`${e==null?void 0:e.agent} está listo para continuar`,N4t=e=>`${e==null?void 0:e.agent} आगे बढ़ने के लिए तैयार है`,z4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?k4t(e):t==="fa"?S4t(e):t==="ar"?C4t(e):t==="es"?E4t(e):t==="hi"?N4t(e):w4t(e)}),j4t=()=>"Back",A4t=()=>"返回",T4t=()=>"بازگشت",R4t=()=>"رجوع",M4t=()=>"Atrás",O4t=()=>"वापस",GL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A4t():t==="fa"?T4t():t==="ar"?R4t():t==="es"?M4t():t==="hi"?O4t():j4t()}),D4t=()=>"More approval options",L4t=()=>"更多批准选项",I4t=()=>"گزینه‌های تأیید بیشتر",$4t=()=>"خيارات موافقة إضافية",B4t=()=>"Más opciones de aprobación",P4t=()=>"और स्वीकृति विकल्प",F4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L4t():t==="fa"?I4t():t==="ar"?$4t():t==="es"?B4t():t==="hi"?P4t():D4t()}),H4t=()=>"Open plan",q4t=()=>"打开计划",U4t=()=>"باز کردن طرح",G4t=()=>"فتح الخطة",K4t=()=>"Abrir plan",V4t=()=>"प्लान खोलें",W4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q4t():t==="fa"?U4t():t==="ar"?G4t():t==="es"?K4t():t==="hi"?V4t():H4t()}),Q4t=()=>"Reject",X4t=()=>"拒绝",Y4t=()=>"رد کردن",Z4t=()=>"رفض",J4t=()=>"Rechazar",e3t=()=>"अस्वीकार करें",t3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X4t():t==="fa"?Y4t():t==="ar"?Z4t():t==="es"?J4t():t==="hi"?e3t():Q4t()}),n3t=()=>"Revise",r3t=()=>"修改",s3t=()=>"بازنگری",i3t=()=>"طلب تعديل",a3t=()=>"Pedir cambios",o3t=()=>"संशोधित करें",c3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r3t():t==="fa"?s3t():t==="ar"?i3t():t==="es"?a3t():t==="hi"?o3t():n3t()}),l3t=()=>"Revise…",u3t=()=>"修改…",_3t=()=>"بازنگری…",f3t=()=>"طلب تعديل…",d3t=()=>"Pedir cambios…",h3t=()=>"संशोधित करें…",p3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u3t():t==="fa"?_3t():t==="ar"?f3t():t==="es"?d3t():t==="hi"?h3t():l3t()}),m3t=()=>"What should change? (optional)",g3t=()=>"需要更改什么?(可选)",v3t=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",b3t=()=>"ما الذي ينبغي تغييره؟ (اختياري)",y3t=()=>"¿Qué debería cambiar? (opcional)",x3t=()=>"क्या बदलना चाहिए? (वैकल्पिक)",w3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g3t():t==="fa"?v3t():t==="ar"?b3t():t==="es"?y3t():t==="hi"?x3t():m3t()}),k3t=e=>`${e==null?void 0:e.count} active`,S3t=e=>`${e==null?void 0:e.count} 个活跃`,C3t=e=>`${e==null?void 0:e.count} فعال`,E3t=e=>`الوكلاء النشطون: ${e==null?void 0:e.count}`,N3t=e=>`${e==null?void 0:e.count} activos`,z3t=e=>`${e==null?void 0:e.count} सक्रिय`,j3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?S3t(e):t==="fa"?C3t(e):t==="ar"?E3t(e):t==="es"?N3t(e):t==="hi"?z3t(e):k3t(e)}),A3t=e=>`${e==null?void 0:e.count} total agents`,T3t=e=>`共 ${e==null?void 0:e.count} 个智能体`,R3t=e=>`در مجموع ${e==null?void 0:e.count} عامل`,M3t=e=>`إجمالي الوكلاء: ${e==null?void 0:e.count}`,O3t=e=>`${e==null?void 0:e.count} agentes en total`,D3t=e=>`${e==null?void 0:e.count} कुल एजेंट`,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=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,$3t=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,B3t=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,P3t=e=>`حذف ${e==null?void 0:e.name} من OpenResearch؟ ستُزال تجاربه وعمليات تشغيله ومحادثاته نهائيًا.`,F3t=e=>`¿Eliminar ${e==null?void 0:e.name} de OpenResearch? Sus experimentos, ejecuciones y chats se eliminarán de forma permanente.`,H3t=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं? इसके प्रयोग, रन और चैट स्थायी रूप से हट जाएंगे।`,q3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$3t(e):t==="fa"?B3t(e):t==="ar"?P3t(e):t==="es"?F3t(e):t==="hi"?H3t(e):I3t(e)}),U3t=()=>"Agents",G3t=()=>"智能体",K3t=()=>"عامل‌ها",V3t=()=>"الوكلاء",W3t=()=>"Agentes",Q3t=()=>"एजेंट",Wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G3t():t==="fa"?K3t():t==="ar"?V3t():t==="es"?W3t():t==="hi"?Q3t():U3t()}),X3t=()=>"arXiv paper ID:",Y3t=()=>"arXiv 论文 ID:",Z3t=()=>"شناسهٔ مقالهٔ arXiv:",J3t=()=>"معرّف ورقة arXiv:",e5t=()=>"ID del paper en arXiv:",t5t=()=>"arXiv पेपर ID:",n5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y3t():t==="fa"?Z3t():t==="ar"?J3t():t==="es"?e5t():t==="hi"?t5t():X3t()}),r5t=()=>"Cancel",s5t=()=>"取消",i5t=()=>"لغو",a5t=()=>"إلغاء",o5t=()=>"Cancelar",c5t=()=>"रद्द करें",l5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s5t():t==="fa"?i5t():t==="ar"?a5t():t==="es"?o5t():t==="hi"?c5t():r5t()}),u5t=()=>"Created",_5t=()=>"创建时间",f5t=()=>"ایجادشده",d5t=()=>"أُنشئ",h5t=()=>"Creado",p5t=()=>"बनाया गया",m5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_5t():t==="fa"?f5t():t==="ar"?d5t():t==="es"?h5t():t==="hi"?p5t():u5t()}),g5t=()=>"Delete project?",v5t=()=>"删除项目?",b5t=()=>"پروژه حذف شود؟",y5t=()=>"حذف المشروع؟",x5t=()=>"¿Eliminar el proyecto?",w5t=()=>"प्रोजेक्ट हटाएं?",k5t=((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()}),S5t=()=>"Delete project",C5t=()=>"删除项目",E5t=()=>"حذف پروژه",N5t=()=>"حذف المشروع",z5t=()=>"Eliminar proyecto",j5t=()=>"प्रोजेक्ट हटाएं",A5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C5t():t==="fa"?E5t():t==="ar"?N5t():t==="es"?z5t():t==="hi"?j5t():S5t()}),T5t=()=>"Deleting…",R5t=()=>"正在删除…",M5t=()=>"در حال حذف…",O5t=()=>"جارٍ الحذف…",D5t=()=>"Eliminando…",L5t=()=>"हटाया जा रहा है…",I5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R5t():t==="fa"?M5t():t==="ar"?O5t():t==="es"?D5t():t==="hi"?L5t():T5t()}),$5t=()=>"Experiments",B5t=()=>"实验",P5t=()=>"آزمایش‌ها",F5t=()=>"التجارب",H5t=()=>"Experimentos",q5t=()=>"प्रयोग",Qz=((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=()=>"The local folder and linked GitHub repository are kept.",G5t=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",K5t=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",V5t=()=>"يُحتفظ بالمجلد المحلي ومستودع GitHub المرتبط.",W5t=()=>"Se conservan la carpeta local y el repositorio de GitHub vinculado.",Q5t=()=>"लोकल फ़ोल्डर और लिंक की गई GitHub रिपॉज़िटरी दोनों सुरक्षित रहती हैं।",X5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G5t():t==="fa"?K5t():t==="ar"?V5t():t==="es"?W5t():t==="hi"?Q5t():U5t()}),Y5t=()=>"The local folder is kept.",Z5t=()=>"本地文件夹会保留。",J5t=()=>"پوشهٔ محلی نگه داشته می‌شود.",ekt=()=>"يُحتفظ بالمجلد المحلي.",tkt=()=>"La carpeta local se conserva.",nkt=()=>"लोकल फ़ोल्डर सुरक्षित रहता है।",rkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z5t():t==="fa"?J5t():t==="ar"?ekt():t==="es"?tkt():t==="hi"?nkt():Y5t()}),skt=()=>"New project",ikt=()=>"新建项目",akt=()=>"پروژهٔ جدید",okt=()=>"مشروع جديد",ckt=()=>"Nuevo proyecto",lkt=()=>"नया प्रोजेक्ट",KL=((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()}),ukt=()=>"No projects yet — create one to get started.",_kt=()=>"尚无项目——新建一个即可开始。",fkt=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",dkt=()=>"لا توجد مشاريع بعد — أنشئ واحدًا للبدء.",hkt=()=>"Aún no hay proyectos — crea uno para empezar.",pkt=()=>"अभी तक कोई प्रोजेक्ट नहीं — शुरू करने के लिए एक बनाएं।",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=()=>"Project",vkt=()=>"项目",bkt=()=>"پروژه",ykt=()=>"المشروع",xkt=()=>"Proyecto",wkt=()=>"प्रोजेक्ट",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=()=>"Projects",Ckt=()=>"项目",Ekt=()=>"پروژه‌ها",Nkt=()=>"المشاريع",zkt=()=>"Proyectos",jkt=()=>"प्रोजेक्ट",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=()=>"Repository",Rkt=()=>"仓库",Mkt=()=>"مخزن",Okt=()=>"المستودع",Dkt=()=>"Repositorio",Lkt=()=>"रिपॉज़िटरी",Xz=((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()}),Ikt=()=>"Idle",$kt=()=>"空闲",Bkt=()=>"بیکار",Pkt=()=>"خامل",Fkt=()=>"Inactivo",Hkt=()=>"निष्क्रिय",qkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$kt():t==="fa"?Bkt():t==="ar"?Pkt():t==="es"?Fkt():t==="hi"?Hkt():Ikt()}),Ukt=()=>"Local",Gkt=()=>"本地",Kkt=()=>"محلی",Vkt=()=>"محلي",Wkt=()=>"Local",Qkt=()=>"लोकल",$v=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gkt():t==="fa"?Kkt():t==="ar"?Vkt():t==="es"?Wkt():t==="hi"?Qkt():Ukt()}),Xkt=()=>"1 total agent",Ykt=()=>"共 1 个智能体",Zkt=()=>"در مجموع ۱ عامل",Jkt=()=>"وكيل واحد إجمالًا",eSt=()=>"1 agente en total",tSt=()=>"1 कुल एजेंट",nSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ykt():t==="fa"?Zkt():t==="ar"?Jkt():t==="es"?eSt():t==="hi"?tSt():Xkt()}),rSt=e=>`${e==null?void 0:e.count} running`,sSt=e=>`${e==null?void 0:e.count} 个运行中`,iSt=e=>`${e==null?void 0:e.count} در حال اجرا`,aSt=e=>`${e==null?void 0:e.count} قيد التشغيل`,oSt=e=>`${e==null?void 0:e.count} en ejecución`,cSt=e=>`${e==null?void 0:e.count} चल रहे`,lSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sSt(e):t==="fa"?iSt(e):t==="ar"?aSt(e):t==="es"?oSt(e):t==="hi"?cSt(e):rSt(e)}),uSt=e=>`${e==null?void 0:e.count} total`,_St=e=>`共 ${e==null?void 0:e.count} 个`,fSt=e=>`در مجموع ${e==null?void 0:e.count}`,dSt=e=>`${e==null?void 0:e.count} إجمالًا`,hSt=e=>`${e==null?void 0:e.count} en total`,pSt=e=>`${e==null?void 0:e.count} कुल`,Yz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_St(e):t==="fa"?fSt(e):t==="ar"?dSt(e):t==="es"?hSt(e):t==="hi"?pSt(e):uSt(e)}),mSt=()=>"Installing the compatible binary. This may take a few minutes.",gSt=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",vSt=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",bSt=()=>"جارٍ تثبيت الملف التنفيذي المتوافق. قد يستغرق هذا بضع دقائق.",ySt=()=>"Instalando el binario compatible. Puede tardar unos minutos.",xSt=()=>"संगत बाइनरी इंस्टॉल हो रही है। इसमें कुछ मिनट लग सकते हैं।",wSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gSt():t==="fa"?vSt():t==="ar"?bSt():t==="es"?ySt():t==="hi"?xSt():mSt()}),kSt=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,SSt=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,CSt=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,ESt=e=>`جارٍ إعداد OpenResearch على ${e==null?void 0:e.host}`,NSt=e=>`Configurando OpenResearch en ${e==null?void 0:e.host}`,zSt=e=>`${e==null?void 0:e.host} पर OpenResearch सेट अप हो रहा है`,jSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SSt(e):t==="fa"?CSt(e):t==="ar"?ESt(e):t==="es"?NSt(e):t==="hi"?zSt(e):kSt(e)}),ASt=()=>"Check again",TSt=()=>"再次检查",RSt=()=>"بررسی دوباره",MSt=()=>"تحقق مجددًا",OSt=()=>"Volver a comprobar",DSt=()=>"फिर से जाँचें",Zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TSt():t==="fa"?RSt():t==="ar"?MSt():t==="es"?OSt():t==="hi"?DSt():ASt()}),LSt=()=>"Closing…",ISt=()=>"正在关闭…",$St=()=>"در حال بستن…",BSt=()=>"جارٍ الإغلاق…",PSt=()=>"Cerrando…",FSt=()=>"बंद हो रहा है…",HSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ISt():t==="fa"?$St():t==="ar"?BSt():t==="es"?PSt():t==="hi"?FSt():LSt()}),qSt=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,USt=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,GSt=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,KSt=e=>`متصل بـ ${e==null?void 0:e.host} باسم ${e==null?void 0:e.user}`,VSt=e=>`Conectado a ${e==null?void 0:e.host} como ${e==null?void 0:e.user}`,WSt=e=>`${e==null?void 0:e.host} से ${e==null?void 0:e.user} के रूप में कनेक्टेड`,QSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?USt(e):t==="fa"?GSt(e):t==="ar"?KSt(e):t==="es"?VSt(e):t==="hi"?WSt(e):qSt(e)}),XSt=()=>"Preparing your remote workspace…",YSt=()=>"正在准备远程工作区…",ZSt=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",JSt=()=>"جارٍ تحضير مساحة عملك البعيدة…",e6t=()=>"Preparando tu espacio de trabajo remoto…",t6t=()=>"आपका रिमोट वर्कस्पेस तैयार किया जा रहा है…",n6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YSt():t==="fa"?ZSt():t==="ar"?JSt():t==="es"?e6t():t==="hi"?t6t():XSt()}),r6t=e=>`Connecting to ${e==null?void 0:e.host}`,s6t=e=>`正在连接到 ${e==null?void 0:e.host}`,i6t=e=>`در حال اتصال به ${e==null?void 0:e.host}`,a6t=e=>`جارٍ الاتصال بـ ${e==null?void 0:e.host}`,o6t=e=>`Conectando a ${e==null?void 0:e.host}`,c6t=e=>`${e==null?void 0:e.host} से कनेक्ट हो रहा है`,l6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?s6t(e):t==="fa"?i6t(e):t==="ar"?a6t(e):t==="es"?o6t(e):t==="hi"?c6t(e):r6t(e)}),u6t=()=>"Close remote host picker",_6t=()=>"关闭远程主机选择器",f6t=()=>"بستن انتخاب‌گر میزبان راه‌دور",d6t=()=>"إغلاق مُنتقي المضيف البعيد",h6t=()=>"Cerrar el selector de hosts remotos",p6t=()=>"रिमोट होस्ट पिकर बंद करें",m6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_6t():t==="fa"?f6t():t==="ar"?d6t():t==="es"?h6t():t==="hi"?p6t():u6t()}),g6t=()=>"Choose a configured SSH host.",v6t=()=>"选择已配置的 SSH 主机。",b6t=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",y6t=()=>"اختر مضيف SSH مُعدًّا.",x6t=()=>"Elige un host SSH configurado.",w6t=()=>"एक कॉन्फ़िगर किया गया SSH होस्ट चुनें।",k6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v6t():t==="fa"?b6t():t==="ar"?y6t():t==="es"?x6t():t==="hi"?w6t():g6t()}),S6t=()=>"Connect to remote",C6t=()=>"连接到远程主机",E6t=()=>"اتصال به میزبان راه‌دور",N6t=()=>"الاتصال بجهاز بعيد",z6t=()=>"Conectar a un host remoto",j6t=()=>"रिमोट से कनेक्ट करें",$3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C6t():t==="fa"?E6t():t==="ar"?N6t():t==="es"?z6t():t==="hi"?j6t():S6t()}),A6t=()=>"Disconnect",T6t=()=>"断开连接",R6t=()=>"قطع اتصال",M6t=()=>"قطع الاتصال",O6t=()=>"Desconectar",D6t=()=>"डिस्कनेक्ट करें",B3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T6t():t==="fa"?R6t():t==="ar"?M6t():t==="es"?O6t():t==="hi"?D6t():A6t()}),L6t=()=>"Your remote work is still running. Reconnect when you’re ready.",I6t=()=>"你的远程工作仍在运行。准备好后可以重新连接。",$6t=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",B6t=()=>"لا يزال عملك البعيد قيد التشغيل. أعد الاتصال عندما تكون جاهزًا.",P6t=()=>"Tu trabajo remoto sigue en ejecución. Vuelve a conectarte cuando quieras.",F6t=()=>"आपका रिमोट काम अभी भी चल रहा है। तैयार होने पर फिर से कनेक्ट करें।",H6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I6t():t==="fa"?$6t():t==="ar"?B6t():t==="es"?P6t():t==="hi"?F6t():L6t()}),q6t=e=>`Disconnected from ${e==null?void 0:e.host}`,U6t=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,G6t=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,K6t=e=>`انقطع الاتصال بـ ${e==null?void 0:e.host}`,V6t=e=>`Desconectado de ${e==null?void 0:e.host}`,W6t=e=>`${e==null?void 0:e.host} से डिस्कनेक्ट हो गया`,VL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?U6t(e):t==="fa"?G6t(e):t==="ar"?K6t(e):t==="es"?V6t(e):t==="hi"?W6t(e):q6t(e)}),Q6t=e=>`Could not connect to ${e==null?void 0:e.host}`,X6t=e=>`无法连接到 ${e==null?void 0:e.host}`,Y6t=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,Z6t=e=>`تعذّر الاتصال بـ ${e==null?void 0:e.host}`,J6t=e=>`No se pudo conectar a ${e==null?void 0:e.host}`,eCt=e=>`${e==null?void 0:e.host} से कनेक्ट नहीं हो सका`,tCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?X6t(e):t==="fa"?Y6t(e):t==="ar"?Z6t(e):t==="es"?J6t(e):t==="hi"?eCt(e):Q6t(e)}),nCt=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",rCt=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",sCt=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",iCt=()=>"أعد تشغيل OpenResearch المحلي واختر مضيف SSH هذا مجددًا. يستمر العمل على المضيف البعيد.",aCt=()=>"Reinicia OpenResearch en local y vuelve a seleccionar este host SSH. El trabajo en el host remoto continúa.",oCt=()=>"लोकल OpenResearch फिर से शुरू करें और इस SSH होस्ट को फिर से चुनें। रिमोट होस्ट पर काम जारी रहता है।",cCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rCt():t==="fa"?sCt():t==="ar"?iCt():t==="es"?aCt():t==="hi"?oCt():nCt()}),lCt=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",uCt=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",_Ct=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",fCt=()=>"توقّف وكلاء OpenResearch. قد تظل التجارب المُرسَلة قيد التشغيل.",dCt=()=>"Los agentes de OpenResearch se han detenido. Puede que los experimentos enviados sigan en ejecución.",hCt=()=>"OpenResearch एजेंट रुक गए हैं। सबमिट किए गए प्रयोग अभी भी चल सकते हैं।",pCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uCt():t==="fa"?_Ct():t==="ar"?fCt():t==="es"?dCt():t==="hi"?hCt():lCt()}),mCt=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,gCt=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,vCt=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,bCt=e=>`‏OpenResearch لا يعمل على ${e==null?void 0:e.host}`,yCt=e=>`OpenResearch no se está ejecutando en ${e==null?void 0:e.host}`,xCt=e=>`${e==null?void 0:e.host} पर OpenResearch नहीं चल रहा`,wCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gCt(e):t==="fa"?vCt(e):t==="ar"?bCt(e):t==="es"?yCt(e):t==="hi"?xCt(e):mCt(e)}),kCt=()=>"OpenResearch binary",SCt=()=>"OpenResearch 二进制文件",CCt=()=>"فایل اجرایی OpenResearch",ECt=()=>"الملف التنفيذي لـ OpenResearch",NCt=()=>"Binario de OpenResearch",zCt=()=>"OpenResearch बाइनरी",jCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SCt():t==="fa"?CCt():t==="ar"?ECt():t==="es"?NCt():t==="hi"?zCt():kCt()}),ACt=()=>"OpenResearch Database",TCt=()=>"OpenResearch 数据库",RCt=()=>"پایگاه دادهٔ OpenResearch",MCt=()=>"قاعدة بيانات OpenResearch",OCt=()=>"Base de datos de OpenResearch",DCt=()=>"OpenResearch डेटाबेस",LCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TCt():t==="fa"?RCt():t==="ar"?MCt():t==="es"?OCt():t==="hi"?DCt():ACt()}),ICt=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",$Ct=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",BCt=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",PCt=()=>"سيستخدم OpenResearch هذه المواقع لمستخدم SSH البعيد ولا يتطلب sudo.",FCt=()=>"OpenResearch usará estas ubicaciones para tu usuario SSH remoto y no necesita sudo.",HCt=()=>"OpenResearch आपके रिमोट SSH यूज़र के लिए इन स्थानों का इस्तेमाल करेगा और sudo की ज़रूरत नहीं है।",qCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ct():t==="fa"?BCt():t==="ar"?PCt():t==="es"?FCt():t==="hi"?HCt():ICt()}),UCt=()=>"Install OpenResearch?",GCt=()=>"安装 OpenResearch?",KCt=()=>"OpenResearch نصب شود؟",VCt=()=>"تثبيت OpenResearch؟",WCt=()=>"¿Instalar OpenResearch?",QCt=()=>"OpenResearch इंस्टॉल करें?",XCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GCt():t==="fa"?KCt():t==="ar"?VCt():t==="es"?WCt():t==="hi"?QCt():UCt()}),YCt=()=>"Installing…",ZCt=()=>"正在安装…",JCt=()=>"در حال نصب…",e7t=()=>"جارٍ التثبيت…",t7t=()=>"Instalando…",n7t=()=>"इंस्टॉल हो रहा है…",r7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZCt():t==="fa"?JCt():t==="ar"?e7t():t==="es"?t7t():t==="hi"?n7t():YCt()}),s7t=()=>"No matching SSH hosts",i7t=()=>"没有匹配的 SSH 主机",a7t=()=>"میزبان SSH منطبقی پیدا نشد",o7t=()=>"لا توجد مضيفات SSH مطابقة",c7t=()=>"No hay hosts SSH que coincidan",l7t=()=>"कोई मेल खाता SSH होस्ट नहीं",u7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i7t():t==="fa"?a7t():t==="ar"?o7t():t==="es"?c7t():t==="hi"?l7t():s7t()}),_7t=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,f7t=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,d7t=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,h7t=e=>`‏OpenResearch غير مثبّت للمستخدم ${e==null?void 0:e.user} على ${e==null?void 0:e.host}. هل تريد تثبيته الآن؟`,p7t=e=>`OpenResearch no está instalado para ${e==null?void 0:e.user} en ${e==null?void 0:e.host}. ¿Instalarlo ahora?`,m7t=e=>`${e==null?void 0:e.host} पर ${e==null?void 0:e.user} के लिए OpenResearch इंस्टॉल नहीं है। अभी इंस्टॉल करें?`,g7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f7t(e):t==="fa"?d7t(e):t==="ar"?h7t(e):t==="es"?p7t(e):t==="hi"?m7t(e):_7t(e)}),v7t=()=>"Open remote",b7t=()=>"打开远程工作区",y7t=()=>"باز کردن راه‌دور",x7t=()=>"فتح مساحة العمل البعيدة",w7t=()=>"Abrir remoto",k7t=()=>"रिमोट खोलें",S7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b7t():t==="fa"?y7t():t==="ar"?x7t():t==="es"?w7t():t==="hi"?k7t():v7t()}),C7t=()=>"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.",E7t=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",N7t=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",z7t=()=>"إغلاق هذا التبويب أو قطع الاتصال يُبقي الوكلاء والتجارب قيد التشغيل. تبقى طلبات الموافقة معلّقة لمدة تصل إلى 55 دقيقة. قد تتسبب إعادة تشغيل المضيف أو سياسة المسؤول في إيقاف OpenResearch.",j7t=()=>"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.",A7t=()=>"यह टैब बंद करने या डिस्कनेक्ट करने पर भी एजेंट और प्रयोग चलते रहते हैं। स्वीकृति अनुरोध 55 मिनट तक लंबित रहते हैं। होस्ट रीस्टार्ट या एडमिन नीति OpenResearch को रोक सकती है।",T7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E7t():t==="fa"?N7t():t==="ar"?z7t():t==="es"?j7t():t==="hi"?A7t():C7t()}),R7t=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",M7t=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",O7t=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",D7t=()=>"حجب متصفحك تبويب مساحة العمل البعيدة. اسمح بالنوافذ المنبثقة وحاول مجددًا.",L7t=()=>"Tu navegador bloqueó la pestaña del espacio de trabajo remoto. Permite las ventanas emergentes y vuelve a intentarlo.",I7t=()=>"आपके ब्राउज़र ने रिमोट वर्कस्पेस टैब को ब्लॉक कर दिया। पॉप-अप की अनुमति दें और फिर से कोशिश करें।",$7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M7t():t==="fa"?O7t():t==="ar"?D7t():t==="es"?L7t():t==="hi"?I7t():R7t()}),B7t=()=>"Preparing remote workspace…",P7t=()=>"正在准备远程工作区…",F7t=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",H7t=()=>"جارٍ تحضير مساحة العمل البعيدة…",q7t=()=>"Preparando el espacio de trabajo remoto…",U7t=()=>"रिमोट वर्कस्पेस तैयार हो रहा है…",G7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P7t():t==="fa"?F7t():t==="ar"?H7t():t==="es"?q7t():t==="hi"?U7t():B7t()}),K7t=()=>"Reconnect",V7t=()=>"重新连接",W7t=()=>"اتصال دوباره",Q7t=()=>"إعادة الاتصال",X7t=()=>"Reconectar",Y7t=()=>"फिर से कनेक्ट करें",Jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V7t():t==="fa"?W7t():t==="ar"?Q7t():t==="es"?X7t():t==="hi"?Y7t():K7t()}),Z7t=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",J7t=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",e8t=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",t8t=()=>"انقطع الاتصال. يبقى عملك البعيد قيد التشغيل بينما يعيد OpenResearch الاتصال.",n8t=()=>"Se perdió la conexión. Tu trabajo remoto sigue en ejecución mientras OpenResearch se reconecta.",r8t=()=>"कनेक्शन टूट गया। OpenResearch के फिर से कनेक्ट होने के दौरान आपका रिमोट काम चलता रहता है।",s8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J7t():t==="fa"?e8t():t==="ar"?t8t():t==="es"?n8t():t==="hi"?r8t():Z7t()}),i8t=e=>`Reconnecting to ${e==null?void 0:e.host}`,a8t=e=>`正在重新连接到 ${e==null?void 0:e.host}`,o8t=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,c8t=e=>`جارٍ إعادة الاتصال بـ ${e==null?void 0:e.host}`,l8t=e=>`Reconectando a ${e==null?void 0:e.host}`,u8t=e=>`${e==null?void 0:e.host} से फिर से कनेक्ट हो रहा है`,_8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?a8t(e):t==="fa"?o8t(e):t==="ar"?c8t(e):t==="es"?l8t(e):t==="hi"?u8t(e):i8t(e)}),f8t=()=>"Search SSH hosts",d8t=()=>"搜索 SSH 主机",h8t=()=>"جستجوی میزبان‌های SSH",p8t=()=>"البحث في مضيفات SSH",m8t=()=>"Buscar hosts SSH",g8t=()=>"SSH होस्ट खोजें",ej=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d8t():t==="fa"?h8t():t==="ar"?p8t():t==="es"?m8t():t==="hi"?g8t():f8t()}),v8t=e=>`SSH: ${e==null?void 0:e.host}`,b8t=e=>`SSH:${e==null?void 0:e.host}`,y8t=e=>`SSH: ${e==null?void 0:e.host}`,x8t=e=>`SSH: ${e==null?void 0:e.host}`,w8t=e=>`SSH: ${e==null?void 0:e.host}`,k8t=e=>`SSH: ${e==null?void 0:e.host}`,gw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b8t(e):t==="fa"?y8t(e):t==="ar"?x8t(e):t==="es"?w8t(e):t==="hi"?k8t(e):v8t(e)}),S8t=()=>"Start a new OpenResearch host",C8t=()=>"启动新的 OpenResearch 主机",E8t=()=>"راه‌اندازی میزبان جدید OpenResearch",N8t=()=>"بدء مضيف OpenResearch جديد",z8t=()=>"Iniciar un nuevo host de OpenResearch",j8t=()=>"एक नया OpenResearch होस्ट शुरू करें",A8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C8t():t==="fa"?E8t():t==="ar"?N8t():t==="es"?z8t():t==="hi"?j8t():S8t()}),T8t=e=>`End ${e==null?void 0:e.count} pending approvals.`,R8t=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,M8t=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,O8t=e=>`إنهاء طلبات الموافقة المعلّقة (${e==null?void 0:e.count}).`,D8t=e=>`Cancelará ${e==null?void 0:e.count} aprobaciones pendientes.`,L8t=e=>`${e==null?void 0:e.count} लंबित स्वीकृतियाँ खत्म होंगी।`,I8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?R8t(e):t==="fa"?M8t(e):t==="ar"?O8t(e):t==="es"?D8t(e):t==="hi"?L8t(e):T8t(e)}),$8t=()=>"Stop OpenResearch",B8t=()=>"停止 OpenResearch",P8t=()=>"توقف OpenResearch",F8t=()=>"إيقاف OpenResearch",H8t=()=>"Detener OpenResearch",q8t=()=>"OpenResearch रोकें",U8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B8t():t==="fa"?P8t():t==="ar"?F8t():t==="es"?H8t():t==="hi"?q8t():$8t()}),G8t=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,K8t=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,V8t=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,W8t=e=>`إيقاف OpenResearch على ${e==null?void 0:e.host}؟`,Q8t=e=>`¿Detener OpenResearch en ${e==null?void 0:e.host}?`,X8t=e=>`${e==null?void 0:e.host} पर OpenResearch रोकें?`,Y8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?K8t(e):t==="fa"?V8t(e):t==="ar"?W8t(e):t==="es"?Q8t(e):t==="hi"?X8t(e):G8t(e)}),Z8t=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,J8t=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,e9t=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,t9t=e=>`إبقاء التجارب المُرسَلة قيد التشغيل (${e==null?void 0:e.count}).`,n9t=e=>`Dejará ${e==null?void 0:e.count} experimentos enviados en ejecución.`,r9t=e=>`${e==null?void 0:e.count} सबमिट किए गए प्रयोग चलते रहेंगे।`,s9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?J8t(e):t==="fa"?e9t(e):t==="ar"?t9t(e):t==="es"?n9t(e):t==="hi"?r9t(e):Z8t(e)}),i9t=()=>"Stop OpenResearch on host",a9t=()=>"停止主机上的 OpenResearch",o9t=()=>"توقف OpenResearch روی میزبان",c9t=()=>"إيقاف OpenResearch على المضيف",l9t=()=>"Detener OpenResearch en el host",u9t=()=>"होस्ट पर OpenResearch रोकें",WL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a9t():t==="fa"?o9t():t==="ar"?c9t():t==="es"?l9t():t==="hi"?u9t():i9t()}),_9t=()=>"This will also:",f9t=()=>"这还将:",d9t=()=>"این کار همچنین:",h9t=()=>"سيؤدي هذا أيضًا إلى:",p9t=()=>"Esto también:",m9t=()=>"इससे यह भी होगा:",g9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f9t():t==="fa"?d9t():t==="ar"?h9t():t==="es"?p9t():t==="hi"?m9t():_9t()}),v9t=()=>"End 1 pending approval.",b9t=()=>"结束 1 个待审批请求。",y9t=()=>"۱ تأیید در انتظار را پایان می‌دهد.",x9t=()=>"إنهاء طلب موافقة معلّق واحد.",w9t=()=>"Cancelará 1 aprobación pendiente.",k9t=()=>"1 लंबित स्वीकृति खत्म होगी।",S9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b9t():t==="fa"?y9t():t==="ar"?x9t():t==="es"?w9t():t==="hi"?k9t():v9t()}),C9t=()=>"Leave 1 submitted experiment running.",E9t=()=>"让 1 个已提交实验继续运行。",N9t=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",z9t=()=>"ترك تجربة مُرسَلة واحدة قيد التشغيل.",j9t=()=>"Dejará 1 experimento enviado en ejecución.",A9t=()=>"1 सबमिट किया गया प्रयोग चलता रहेगा।",T9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E9t():t==="fa"?N9t():t==="ar"?z9t():t==="es"?j9t():t==="hi"?A9t():C9t()}),R9t=()=>"Disconnect 1 other client.",M9t=()=>"断开 1 个其他客户端。",O9t=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",D9t=()=>"قطع اتصال عميل آخر واحد.",L9t=()=>"Desconectará a otro cliente.",I9t=()=>"1 अन्य क्लाइंट डिस्कनेक्ट होगा।",$9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M9t():t==="fa"?O9t():t==="ar"?D9t():t==="es"?L9t():t==="hi"?I9t():R9t()}),B9t=()=>"Keep 1 queued message saved.",P9t=()=>"保留 1 条排队消息。",F9t=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",H9t=()=>"إبقاء رسالة واحدة محفوظة في قائمة الانتظار.",q9t=()=>"Conservará 1 mensaje en cola.",U9t=()=>"1 कतार में लगा संदेश सुरक्षित रहेगा।",G9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P9t():t==="fa"?F9t():t==="ar"?H9t():t==="es"?q9t():t==="hi"?U9t():B9t()}),K9t=()=>"Interrupt 1 active agent turn.",V9t=()=>"中断 1 个活动代理任务。",W9t=()=>"۱ نوبت فعال عامل را قطع می‌کند.",Q9t=()=>"مقاطعة جولة وكيل نشطة واحدة.",X9t=()=>"Interrumpirá 1 turno activo de un agente.",Y9t=()=>"1 सक्रिय एजेंट टर्न बाधित होगा।",Z9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V9t():t==="fa"?W9t():t==="ar"?Q9t():t==="es"?X9t():t==="hi"?Y9t():K9t()}),J9t=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,eEt=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,tEt=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,nEt=e=>`قطع اتصال العملاء الآخرين (${e==null?void 0:e.count}).`,rEt=e=>`Desconectará otros ${e==null?void 0:e.count} clientes.`,sEt=e=>`${e==null?void 0:e.count} अन्य क्लाइंट डिस्कनेक्ट होंगे।`,iEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eEt(e):t==="fa"?tEt(e):t==="ar"?nEt(e):t==="es"?rEt(e):t==="hi"?sEt(e):J9t(e)}),aEt=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,oEt=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,cEt=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,lEt=e=>`إبقاء الرسائل في قائمة الانتظار محفوظة (${e==null?void 0:e.count}).`,uEt=e=>`Conservará ${e==null?void 0:e.count} mensajes en cola.`,_Et=e=>`${e==null?void 0:e.count} कतार में लगे संदेश सुरक्षित रहेंगे।`,fEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oEt(e):t==="fa"?cEt(e):t==="ar"?lEt(e):t==="es"?uEt(e):t==="hi"?_Et(e):aEt(e)}),dEt=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,hEt=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,pEt=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,mEt=e=>`مقاطعة جولات الوكلاء النشطة (${e==null?void 0:e.count}).`,gEt=e=>`Interrumpirá ${e==null?void 0:e.count} turnos activos de agentes.`,vEt=e=>`${e==null?void 0:e.count} सक्रिय एजेंट टर्न बाधित होंगे।`,bEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hEt(e):t==="fa"?pEt(e):t==="ar"?mEt(e):t==="es"?gEt(e):t==="hi"?vEt(e):dEt(e)}),yEt=()=>"Stopping host…",xEt=()=>"正在停止主机…",wEt=()=>"در حال توقف میزبان…",kEt=()=>"جارٍ إيقاف المضيف…",SEt=()=>"Deteniendo el host…",CEt=()=>"होस्ट रोका जा रहा है…",EEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xEt():t==="fa"?wEt():t==="ar"?kEt():t==="es"?SEt():t==="hi"?CEt():yEt()}),NEt=()=>"Update",zEt=()=>"更新",jEt=()=>"به‌روزرسانی",AEt=()=>"تحديث",TEt=()=>"Actualizar",REt=()=>"अपडेट करें",tj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zEt():t==="fa"?jEt():t==="ar"?AEt():t==="es"?TEt():t==="hi"?REt():NEt()}),MEt=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,OEt=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,DEt=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,LEt=e=>`نسخة OpenResearch المثبّتة على ${e==null?void 0:e.host} غير متوافقة مع هذه اللوحة. هل تريد تحديثها الآن؟`,IEt=e=>`La instalación de OpenResearch en ${e==null?void 0:e.host} no es compatible con este dashboard. ¿Actualizarla ahora?`,$Et=e=>`${e==null?void 0:e.host} पर OpenResearch इंस्टॉलेशन इस डैशबोर्ड के साथ संगत नहीं है। अभी अपडेट करें?`,BEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OEt(e):t==="fa"?DEt(e):t==="ar"?LEt(e):t==="es"?IEt(e):t==="hi"?$Et(e):MEt(e)}),PEt=()=>"Update OpenResearch?",FEt=()=>"更新 OpenResearch?",HEt=()=>"OpenResearch به‌روزرسانی شود؟",qEt=()=>"تحديث OpenResearch؟",UEt=()=>"¿Actualizar OpenResearch?",GEt=()=>"OpenResearch अपडेट करें?",KEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FEt():t==="fa"?HEt():t==="ar"?qEt():t==="es"?UEt():t==="hi"?GEt():PEt()}),VEt=()=>"Updating…",WEt=()=>"正在更新…",QEt=()=>"در حال به‌روزرسانی…",XEt=()=>"جارٍ التحديث…",YEt=()=>"Actualizando…",ZEt=()=>"अपडेट हो रहा है…",JEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WEt():t==="fa"?QEt():t==="ar"?XEt():t==="es"?YEt():t==="hi"?ZEt():VEt()}),eNt=()=>"Disable syncing",tNt=()=>"关闭同步",nNt=()=>"غیرفعال کردن همگام‌سازی",rNt=()=>"تعطيل المزامنة",sNt=()=>"Desactivar sincronización",iNt=()=>"सिंकिंग बंद करें",aNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tNt():t==="fa"?nNt():t==="ar"?rNt():t==="es"?sNt():t==="hi"?iNt():eNt()}),oNt=()=>"Enable GitHub syncing",cNt=()=>"启用 GitHub 同步",lNt=()=>"فعال‌سازی همگام‌سازی GitHub",uNt=()=>"تفعيل مزامنة GitHub",_Nt=()=>"Activar sincronización con GitHub",fNt=()=>"GitHub सिंकिंग चालू करें",dNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cNt():t==="fa"?lNt():t==="ar"?uNt():t==="es"?_Nt():t==="hi"?fNt():oNt()}),hNt=()=>"Enabling…",pNt=()=>"正在启用…",mNt=()=>"در حال فعال‌سازی…",gNt=()=>"جارٍ التفعيل…",vNt=()=>"Activando…",bNt=()=>"चालू हो रहा है…",yNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pNt():t==="fa"?mNt():t==="ar"?gNt():t==="es"?vNt():t==="hi"?bNt():hNt()}),xNt=()=>"Updating…",wNt=()=>"正在更新…",kNt=()=>"در حال به‌روزرسانی…",SNt=()=>"جارٍ التحديث…",CNt=()=>"Actualizando…",ENt=()=>"अपडेट हो रहा है…",NNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wNt():t==="fa"?kNt():t==="ar"?SNt():t==="es"?CNt():t==="hi"?ENt():xNt()}),zNt=()=>"Reopen a previous chat",jNt=()=>"重新打开之前的聊天",ANt=()=>"بازکردن دوبارهٔ گفت‌وگوی قبلی",TNt=()=>"إعادة فتح محادثة سابقة",RNt=()=>"Vuelve a abrir un chat anterior",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=()=>"No chats to resume",LNt=()=>"没有可恢复的聊天",INt=()=>"گفت‌وگویی برای ادامه وجود ندارد",$Nt=()=>"لا توجد محادثات لاستئنافها",BNt=()=>"No hay chats que reanudar",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=()=>"From your terminal — adopting copies the transcript, and new turns continue there",qNt=()=>"来自你的终端 — 采用会复制记录,新的回合将在那里继续",UNt=()=>"از ترمینال شما — با پذیرفتن، رونوشت گفت‌وگو کپی می‌شود و نوبت‌های جدید همان‌جا ادامه می‌یابند",GNt=()=>"من طرفيتك — التبنّي ينسخ النص، والجولات الجديدة تتابع هناك",KNt=()=>"Desde tu terminal — al adoptarlo se copia la transcripción y los turnos nuevos continúan allí",VNt=()=>"आपके टर्मिनल से — अपनाने पर ट्रांसक्रिप्ट कॉपी होती है और नए टर्न वहीं जारी रहते हैं",nj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qNt():t==="fa"?UNt():t==="ar"?GNt():t==="es"?KNt():t==="hi"?VNt():HNt()}),WNt=()=>"Search chats",QNt=()=>"搜索聊天",XNt=()=>"جست‌وجوی گفت‌وگوها",YNt=()=>"البحث في المحادثات",ZNt=()=>"Buscar chats",JNt=()=>"चैट खोजें",rj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QNt():t==="fa"?XNt():t==="ar"?YNt():t==="es"?ZNt():t==="hi"?JNt():WNt()}),ezt=()=>"Resume a chat",tzt=()=>"恢复聊天",nzt=()=>"ادامهٔ یک گفت‌وگو",rzt=()=>"استئناف محادثة",szt=()=>"Reanudar un chat",izt=()=>"चैट फिर से शुरू करें",sj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tzt():t==="fa"?nzt():t==="ar"?rzt():t==="es"?szt():t==="hi"?izt():ezt()}),azt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,ozt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,czt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,lzt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}`,uzt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}`,_zt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}`,fzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ozt(e):t==="fa"?czt(e):t==="ar"?lzt(e):t==="es"?uzt(e):t==="hi"?_zt(e):azt(e)}),dzt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,hzt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,pzt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,mzt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,gzt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,vzt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,bzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hzt(e):t==="fa"?pzt(e):t==="ar"?mzt(e):t==="es"?gzt(e):t==="hi"?vzt(e):dzt(e)}),yzt=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`,xzt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,wzt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,kzt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,Szt=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`,Czt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,Ezt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xzt(e):t==="fa"?wzt(e):t==="ar"?kzt(e):t==="es"?Szt(e):t==="hi"?Czt(e):yzt(e)}),Nzt=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,zzt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,jzt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,Azt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,Tzt=e=>`Reintentando · intento ${e==null?void 0:e.attempt} · siguiente intento en ${e==null?void 0:e.seconds} s`,Rzt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,Mzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zzt(e):t==="fa"?jzt(e):t==="ar"?Azt(e):t==="es"?Tzt(e):t==="hi"?Rzt(e):Nzt(e)}),Ozt=()=>"CLI is retrying…",Dzt=()=>"CLI 正在重试…",Lzt=()=>"CLI در حال تلاش دوباره است…",Izt=()=>"تعيد واجهة سطر الأوامر المحاولة…",$zt=()=>"La CLI está reintentando…",Bzt=()=>"CLI फिर से कोशिश कर रहा है…",Pzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dzt():t==="fa"?Lzt():t==="ar"?Izt():t==="es"?$zt():t==="hi"?Bzt():Ozt()}),Fzt=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,Hzt=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,qzt=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,Uzt=e=>`إعادة المحاولة · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,Gzt=e=>`Reintentando · siguiente intento en ${e==null?void 0:e.seconds} s`,Kzt=e=>`फिर से कोशिश · अगला प्रयास ${e==null?void 0:e.seconds}से में`,Vzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hzt(e):t==="fa"?qzt(e):t==="ar"?Uzt(e):t==="es"?Gzt(e):t==="hi"?Kzt(e):Fzt(e)}),Wzt=()=>"Sending again…",Qzt=()=>"正在重新发送…",Xzt=()=>"در حال ارسال دوباره…",Yzt=()=>"جارٍ إعادة الإرسال…",Zzt=()=>"Reenviando…",Jzt=()=>"फिर से भेजा जा रहा है…",ejt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qzt():t==="fa"?Xzt():t==="ar"?Yzt():t==="es"?Zzt():t==="hi"?Jzt():Wzt()}),tjt=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,njt=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,rjt=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,sjt=e=>`إعادة الإرسال بعد ${e==null?void 0:e.seconds}ث…`,ijt=e=>`Reenviando en ${e==null?void 0:e.seconds} s…`,ajt=e=>`${e==null?void 0:e.seconds}से में फिर से भेजा जाएगा…`,ojt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?njt(e):t==="fa"?rjt(e):t==="ar"?sjt(e):t==="es"?ijt(e):t==="hi"?ajt(e):tjt(e)}),cjt=()=>"Retrying…",ljt=()=>"正在重试…",ujt=()=>"در حال تلاش دوباره…",_jt=()=>"جارٍ إعادة المحاولة…",fjt=()=>"Reintentando…",djt=()=>"फिर से कोशिश हो रही है…",QL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ljt():t==="fa"?ujt():t==="ar"?_jt():t==="es"?fjt():t==="hi"?djt():cjt()}),hjt=()=>"Default speed",pjt=()=>"默认速度",mjt=()=>"سرعت پیش‌فرض",gjt=()=>"السرعة الافتراضية",vjt=()=>"Velocidad predeterminada",bjt=()=>"डिफ़ॉल्ट गति",yjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pjt():t==="fa"?mjt():t==="ar"?gjt():t==="es"?vjt():t==="hi"?bjt():hjt()}),xjt=()=>"Standard",wjt=()=>"标准",kjt=()=>"استاندارد",Sjt=()=>"قياسي",Cjt=()=>"Estándar",Ejt=()=>"स्टैंडर्ड",Njt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wjt():t==="fa"?kjt():t==="ar"?Sjt():t==="es"?Cjt():t==="hi"?Ejt():xjt()}),zjt=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,jjt=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,Ajt=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,Tjt=e=>` أضِف ${e==null?void 0:e.directory} إلى PATH لاستخدامه.`,Rjt=e=>` Añade ${e==null?void 0:e.directory} a tu PATH para usarlo.`,Mjt=e=>` इसे इस्तेमाल करने के लिए ${e==null?void 0:e.directory} को अपने PATH में जोड़ें।`,Ojt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jjt(e):t==="fa"?Ajt(e):t==="ar"?Tjt(e):t==="es"?Rjt(e):t==="hi"?Mjt(e):zjt(e)}),Djt=()=>"Appearance",Ljt=()=>"外观",Ijt=()=>"ظاهر",$jt=()=>"المظهر",Bjt=()=>"Apariencia",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=()=>"Check",qjt=()=>"检查",Ujt=()=>"بررسی",Gjt=()=>"فحص",Kjt=()=>"Comprobar",Vjt=()=>"जाँचें",Wjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qjt():t==="fa"?Ujt():t==="ar"?Gjt():t==="es"?Kjt():t==="hi"?Vjt():Hjt()}),Qjt=()=>"Check again",Xjt=()=>"再次检查",Yjt=()=>"بررسی دوباره",Zjt=()=>"تحقق مجددًا",Jjt=()=>"Volver a comprobar",eAt=()=>"फिर से जाँचें",Am=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xjt():t==="fa"?Yjt():t==="ar"?Zjt():t==="es"?Jjt():t==="hi"?eAt():Qjt()}),tAt=()=>"Check for updates",nAt=()=>"检查更新",rAt=()=>"بررسی به‌روزرسانی",sAt=()=>"التحقق من التحديثات",iAt=()=>"Buscar actualizaciones",aAt=()=>"अपडेट के लिए जाँचें",oAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nAt():t==="fa"?rAt():t==="ar"?sAt():t==="es"?iAt():t==="hi"?aAt():tAt()}),cAt=()=>"Check now",lAt=()=>"立即检查",uAt=()=>"اکنون بررسی کن",_At=()=>"التحقق الآن",fAt=()=>"Comprobar ahora",dAt=()=>"अभी जाँचें",hAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lAt():t==="fa"?uAt():t==="ar"?_At():t==="es"?fAt():t==="hi"?dAt():cAt()}),pAt=()=>"Check setup",mAt=()=>"检查设置",gAt=()=>"بررسی راه‌اندازی",vAt=()=>"فحص الإعداد",bAt=()=>"Comprobar configuración",yAt=()=>"सेटअप जाँचें",xAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mAt():t==="fa"?gAt():t==="ar"?vAt():t==="es"?bAt():t==="hi"?yAt():pAt()}),wAt=()=>"orx checks a few times a day on its own.",kAt=()=>"orx 每天会自动检查几次。",SAt=()=>"orx روزی چند بار خودکار بررسی می‌کند.",CAt=()=>"يتحقق orx بضع مرات يوميًا تلقائيًا.",EAt=()=>"orx lo comprueba por sí solo varias veces al día.",NAt=()=>"orx खुद दिन में कुछ बार जाँच करता है।",zAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kAt():t==="fa"?SAt():t==="ar"?CAt():t==="es"?EAt():t==="hi"?NAt():wAt()}),jAt=()=>"Choose a flavor",AAt=()=>"选择配置",TAt=()=>"انتخاب پیکربندی",RAt=()=>"اختر تكوين الموارد",MAt=()=>"Elige una opción",OAt=()=>"एक फ़्लेवर चुनें",DAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AAt():t==="fa"?TAt():t==="ar"?RAt():t==="es"?MAt():t==="hi"?OAt():jAt()}),LAt=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,IAt=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,$At=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,BAt=e=>`اختر تكوين الموارد لاستخدام ${e==null?void 0:e.destination} في عمليات التشغيل الجديدة.`,PAt=e=>`Elige una opción para usar ${e==null?void 0:e.destination} en las nuevas ejecuciones.`,FAt=e=>`नए रन के लिए ${e==null?void 0:e.destination} इस्तेमाल करने के लिए एक फ़्लेवर चुनें।`,HAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IAt(e):t==="fa"?$At(e):t==="ar"?BAt(e):t==="es"?PAt(e):t==="hi"?FAt(e):LAt(e)}),qAt=()=>"clean",UAt=()=>"无更改",GAt=()=>"بدون تغییر",KAt=()=>"نظيف",VAt=()=>"sin cambios",WAt=()=>"साफ़",QAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UAt():t==="fa"?GAt():t==="ar"?KAt():t==="es"?VAt():t==="hi"?WAt():qAt()}),XAt=e=>`Already linked at ${e==null?void 0:e.link}.`,YAt=e=>`已链接到 ${e==null?void 0:e.link}。`,ZAt=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,JAt=e=>`مرتبط بالفعل في ${e==null?void 0:e.link}.`,eTt=e=>`Ya está enlazado en ${e==null?void 0:e.link}.`,tTt=e=>`पहले से ${e==null?void 0:e.link} पर लिंक है।`,nTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YAt(e):t==="fa"?ZAt(e):t==="ar"?JAt(e):t==="es"?eTt(e):t==="hi"?tTt(e):XAt(e)}),rTt=e=>`Linked ${e==null?void 0:e.link}.`,sTt=e=>`已链接 ${e==null?void 0:e.link}。`,iTt=e=>`${e==null?void 0:e.link} پیوند شد.`,aTt=e=>`تم إنشاء الرابط ${e==null?void 0:e.link}.`,oTt=e=>`Enlazado en ${e==null?void 0:e.link}.`,cTt=e=>`${e==null?void 0:e.link} लिंक किया गया।`,lTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sTt(e):t==="fa"?iTt(e):t==="ar"?aTt(e):t==="es"?oTt(e):t==="hi"?cTt(e):rTt(e)}),uTt=()=>"Close terminal",_Tt=()=>"关闭终端",fTt=()=>"بستن ترمینال",dTt=()=>"إغلاق الطرفية",hTt=()=>"Cerrar la terminal",pTt=()=>"टर्मिनल बंद करें",ij=((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()}),mTt=()=>"Terminal closed",gTt=()=>"终端已关闭",vTt=()=>"ترمینال بسته شد",bTt=()=>"أُغلقت الطرفية",yTt=()=>"Terminal cerrada",xTt=()=>"टर्मिनल बंद हो गया",wTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gTt():t==="fa"?vTt():t==="ar"?bTt():t==="es"?yTt():t==="hi"?xTt():mTt()}),kTt=()=>"Finished",STt=()=>"已完成",CTt=()=>"انجام شد",ETt=()=>"اكتمل",NTt=()=>"Finalizado",zTt=()=>"पूर्ण",jTt=((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()}),ATt=()=>"Command failed",TTt=()=>"命令失败",RTt=()=>"دستور ناموفق بود",MTt=()=>"فشل الأمر",OTt=()=>"El comando falló",DTt=()=>"कमांड विफल रही",LTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TTt():t==="fa"?RTt():t==="ar"?MTt():t==="es"?OTt():t==="hi"?DTt():ATt()}),ITt=()=>"Running…",$Tt=()=>"运行中…",BTt=()=>"در حال اجرا…",PTt=()=>"قيد التشغيل…",FTt=()=>"Ejecutando…",HTt=()=>"चल रहा है…",qTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Tt():t==="fa"?BTt():t==="ar"?PTt():t==="es"?FTt():t==="hi"?HTt():ITt()}),UTt=()=>"Connect",GTt=()=>"连接",KTt=()=>"اتصال",VTt=()=>"اتصال",WTt=()=>"Conectar",QTt=()=>"कनेक्ट करें",NS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GTt():t==="fa"?KTt():t==="ar"?VTt():t==="es"?WTt():t==="hi"?QTt():UTt()}),XTt=()=>"Connected via GitHub CLI",YTt=()=>"已通过 GitHub CLI 连接",ZTt=()=>"از طریق GitHub CLI متصل است",JTt=()=>"متصل عبر واجهة GitHub لسطر الأوامر",eRt=()=>"Conectado mediante GitHub CLI",tRt=()=>"GitHub CLI के ज़रिए कनेक्टेड",XL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YTt():t==="fa"?ZTt():t==="ar"?JTt():t==="es"?eRt():t==="hi"?tRt():XTt()}),nRt=()=>"Connecting…",rRt=()=>"正在连接…",sRt=()=>"در حال اتصال…",iRt=()=>"جارٍ الاتصال…",aRt=()=>"Conectando…",oRt=()=>"कनेक्ट हो रहा है…",YL=((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()}),cRt=e=>`CPU cores: ${e==null?void 0:e.count}`,lRt=e=>`${e==null?void 0:e.count} 个 CPU 核心`,uRt=e=>`${e==null?void 0:e.count} هستهٔ CPU`,_Rt=e=>`أنوية المعالج: ${e==null?void 0:e.count}`,fRt=e=>`Núcleos de CPU: ${e==null?void 0:e.count}`,dRt=e=>`CPU कोर: ${e==null?void 0:e.count}`,hRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lRt(e):t==="fa"?uRt(e):t==="ar"?_Rt(e):t==="es"?fRt(e):t==="hi"?dRt(e):cRt(e)}),pRt=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",mRt=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",gRt=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",vRt=()=>"أنشئ مستودعًا خاصًا وارفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون.",bRt=()=>"Crear un repositorio privado y subir automáticamente las ramas de los experimentos para que las vean tus colaboradores.",yRt=()=>"एक निजी रिपॉज़िटरी बनाएं और सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश करें।",xRt=((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()}),wRt=()=>"the current project",kRt=()=>"当前项目",SRt=()=>"پروژهٔ فعلی",CRt=()=>"المشروع الحالي",ERt=()=>"el proyecto actual",NRt=()=>"मौजूदा प्रोजेक्ट",zRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kRt():t==="fa"?SRt():t==="ar"?CRt():t==="es"?ERt():t==="hi"?NRt():wRt()}),jRt=e=>`${e==null?void 0:e.value} (custom)`,ARt=e=>`${e==null?void 0:e.value}(自定义)`,TRt=e=>`${e==null?void 0:e.value} (سفارشی)`,RRt=e=>`${e==null?void 0:e.value} (مخصص)`,MRt=e=>`${e==null?void 0:e.value} (personalizado)`,ORt=e=>`${e==null?void 0:e.value} (कस्टम)`,DRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ARt(e):t==="fa"?TRt(e):t==="ar"?RRt(e):t==="es"?MRt(e):t==="hi"?ORt(e):jRt(e)}),LRt=()=>"detached",IRt=()=>"分离头指针",$Rt=()=>"جدا از شاخه",BRt=()=>"منفصل",PRt=()=>"desacoplado",FRt=()=>"डिटैच्ड",zS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IRt():t==="fa"?$Rt():t==="ar"?BRt():t==="es"?PRt():t==="hi"?FRt():LRt()}),HRt=()=>"Disconnected",qRt=()=>"已断开连接",URt=()=>"قطع اتصال",GRt=()=>"غير متصل",KRt=()=>"Desconectado",VRt=()=>"डिस्कनेक्ट हो गया",ZL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qRt():t==="fa"?URt():t==="ar"?GRt():t==="es"?KRt():t==="hi"?VRt():HRt()}),WRt=()=>"Environment tab",QRt=()=>"环境标签页",XRt=()=>"زبانهٔ محیط",YRt=()=>"تبويب البيئة",ZRt=()=>"pestaña Entorno",JRt=()=>"एनवायरनमेंट टैब",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=()=>"Free models · No sign-in required",nMt=()=>"免费模型 · 无需登录",rMt=()=>"مدل‌های رایگان · بدون نیاز به ورود",sMt=()=>"نماذج مجانية · لا يلزم تسجيل الدخول",iMt=()=>"Modelos gratuitos · No es necesario iniciar sesión",aMt=()=>"मुफ़्त मॉडल · साइन-इन ज़रूरी नहीं",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=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,lMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,uMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,_Mt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,fMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,dMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,hMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lMt(e):t==="fa"?uMt(e):t==="ar"?_Mt(e):t==="es"?fMt(e):t==="hi"?dMt(e):cMt(e)}),pMt=()=>"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.",mMt=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",gMt=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",vMt=()=>"رفض GitHub رفع التغييرات لأن هذا المستودع مؤرشف وللقراءة فقط. لا يزال المشروع المحلي متاحًا. ألغِ أرشفة المستودع على GitHub، ثم فعّل المزامنة هنا.",bMt=()=>"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í.",yMt=()=>"GitHub ने पुश अस्वीकार कर दिया क्योंकि यह रिपॉज़िटरी आर्काइव और रीड-ओनली है। लोकल प्रोजेक्ट अब भी उपलब्ध है। GitHub पर रिपॉज़िटरी को अनआर्काइव करें, फिर यहाँ सिंकिंग चालू करें।",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=()=>"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.",kMt=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",SMt=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",CMt=()=>"يحتوي GitHub على تغييرات ليست في هذا المشروع المحلي. اسحب أحدث تغييرات GitHub وحُلّ أي تعارضات في Git، ثم أعد محاولة تفعيل المزامنة.",EMt=()=>"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.",NMt=()=>"GitHub में ऐसे बदलाव हैं जो इस लोकल प्रोजेक्ट में नहीं हैं। नवीनतम GitHub बदलाव पुल करें और Git में किसी भी टकराव को सुलझाएं, फिर सिंकिंग फिर से चालू करने की कोशिश करें।",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=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",AMt=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",TMt=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",RMt=()=>"رفض GitHub رفع التغييرات. تأكد من أن حسابك المتصل يملك صلاحية الكتابة على هذا المستودع، ثم حاول مجددًا.",MMt=()=>"GitHub rechazó el push. Asegúrate de que tu cuenta conectada tiene permiso de escritura en este repositorio y vuelve a intentarlo.",OMt=()=>"GitHub ने पुश अस्वीकार कर दिया। सुनिश्चित करें कि आपके कनेक्टेड खाते के पास इस रिपॉज़िटरी में राइट एक्सेस है, फिर फिर से कोशिश करें।",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=>`GPU × ${e==null?void 0:e.count}`,IMt=e=>`${e==null?void 0:e.count} 个 GPU`,$Mt=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,BMt=e=>`معالج رسومات × ${e==null?void 0:e.count}`,PMt=e=>`GPU × ${e==null?void 0:e.count}`,FMt=e=>`GPU × ${e==null?void 0:e.count}`,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=()=>"has changes",UMt=()=>"有更改",GMt=()=>"دارای تغییر",KMt=()=>"به تغييرات",VMt=()=>"con cambios",WMt=()=>"बदलाव हैं",QMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UMt():t==="fa"?GMt():t==="ar"?KMt():t==="es"?VMt():t==="hi"?WMt():qMt()}),XMt=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}.`,YMt=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,ZMt=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,JMt=e=>`هذا الرمز صالح لكنه لا يبيّن ما إن كان قادرًا على إطلاق المهام؛ ورموز OAuth من ${e==null?void 0:e.login} لا تبيّن ذلك أبدًا. قد ينجح الإطلاق رغم ذلك. للتحقق القاطع، احفظ رمزًا بصلاحية الكتابة من ${e==null?void 0:e.url}.`,eOt=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}.`,tOt=e=>`यह टोकन मान्य है पर यह नहीं बताता कि यह Jobs लॉन्च कर सकता है या नहीं; ${e==null?void 0:e.login} से मिले OAuth टोकन कभी नहीं बताते। लॉन्च फिर भी काम कर सकता है। निश्चित जाँच के लिए, ${e==null?void 0:e.url} से एक राइट-स्कोप्ड टोकन सेव करें।`,nOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YMt(e):t==="fa"?ZMt(e):t==="ar"?JMt(e):t==="es"?eOt(e):t==="hi"?tOt(e):XMt(e)}),rOt=()=>"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.",sOt=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",iOt=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",aOt=()=>"هذا الرمز صالح لكنه لا يستطيع إرسال مهام Hugging Face. أنشئ رمزًا بصلاحية كتابة المهام في إعدادات رموز Hugging Face، ثم استبدله هنا.",oOt=()=>"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í.",cOt=()=>"यह टोकन मान्य है, पर Hugging Face Jobs सबमिट नहीं कर सकता। Hugging Face टोकन सेटिंग्स में Jobs राइट अनुमति वाला टोकन बनाएं, फिर इसे यहाँ बदलें।",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=()=>"Install",_Ot=()=>"安装",fOt=()=>"نصب",dOt=()=>"تثبيت",hOt=()=>"Instalar",pOt=()=>"इंस्टॉल करें",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=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.`,vOt=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,bOt=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,yOt=e=>`يضيف ${e==null?void 0:e.command} إلى طرفيتك موجّهًا إلى هذا التطبيق، بحيث تكون واجهة سطر الأوامر والتطبيق دائمًا بالإصدار نفسه.`,xOt=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.`,wOt=e=>`आपके टर्मिनल में ${e==null?void 0:e.command} जोड़ता है, जो इसी ऐप की ओर इशारा करता है, ताकि CLI और ऐप हमेशा एक ही वर्शन के रहें।`,kOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vOt(e):t==="fa"?bOt(e):t==="ar"?yOt(e):t==="es"?xOt(e):t==="hi"?wOt(e):gOt(e)}),SOt=e=>`Install the ${e==null?void 0:e.command} command`,COt=e=>`安装 ${e==null?void 0:e.command} 命令`,EOt=e=>`نصب فرمان ${e==null?void 0:e.command}`,NOt=e=>`تثبيت أمر ${e==null?void 0:e.command}`,zOt=e=>`Instalar el comando ${e==null?void 0:e.command}`,jOt=e=>`${e==null?void 0:e.command} कमांड इंस्टॉल करें`,AOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?COt(e):t==="fa"?EOt(e):t==="ar"?NOt(e):t==="es"?zOt(e):t==="hi"?jOt(e):SOt(e)}),TOt=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",ROt=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",MOt=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",OOt=()=>"ثبّت واجهة GitHub لسطر الأوامر، ثم نفّذ `gh auth login` في طرفيتك.",DOt=()=>"Instala GitHub CLI y ejecuta `gh auth login` en tu terminal.",LOt=()=>"GitHub CLI इंस्टॉल करें, फिर अपने टर्मिनल में `gh auth login` चलाएं।",IOt=((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()}),$Ot=()=>"Install the new release now instead of waiting for the background update.",BOt=()=>"立即安装新版本,无需等待后台更新。",POt=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",FOt=()=>"ثبّت الإصدار الجديد الآن بدلًا من انتظار التحديث في الخلفية.",HOt=()=>"Instala la nueva versión ahora en lugar de esperar a la actualización en segundo plano.",qOt=()=>"बैकग्राउंड अपडेट का इंतज़ार करने की बजाय अभी नया रिलीज़ इंस्टॉल करें।",UOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BOt():t==="fa"?POt():t==="ar"?FOt():t==="es"?HOt():t==="hi"?qOt():$Ot()}),GOt=()=>"Discard your unsaved Kubernetes changes?",KOt=()=>"要放弃未保存的 Kubernetes 更改吗?",VOt=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",WOt=()=>"تجاهل تغييرات Kubernetes غير المحفوظة؟",QOt=()=>"¿Descartar los cambios sin guardar de Kubernetes?",XOt=()=>"आपके सेव न किए गए Kubernetes बदलाव छोड़ें?",YOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KOt():t==="fa"?VOt():t==="ar"?WOt():t==="es"?QOt():t==="hi"?XOt():GOt()}),ZOt=()=>"Key from",JOt=()=>"密钥来自",eDt=()=>"کلید از",tDt=()=>"المفتاح من",nDt=()=>"Clave tomada de la",rDt=()=>"की स्रोत",sDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JOt():t==="fa"?eDt():t==="ar"?tDt():t==="es"?nDt():t==="hi"?rDt():ZOt()}),iDt=()=>"Use current kubectl context",aDt=()=>"使用当前 kubectl 上下文",oDt=()=>"استفاده از کانتکست فعلی kubectl",cDt=()=>"استخدام سياق kubectl الحالي",lDt=()=>"Usar el contexto actual de kubectl",uDt=()=>"मौजूदा kubectl कॉन्टेक्स्ट इस्तेमाल करें",_Dt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aDt():t==="fa"?oDt():t==="ar"?cDt():t==="es"?lDt():t==="hi"?uDt():iDt()}),fDt=e=>`Use current context (${e==null?void 0:e.context})`,dDt=e=>`使用当前上下文(${e==null?void 0:e.context})`,hDt=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,pDt=e=>`استخدام السياق الحالي (${e==null?void 0:e.context})`,mDt=e=>`Usar el contexto actual (${e==null?void 0:e.context})`,gDt=e=>`मौजूदा कॉन्टेक्स्ट इस्तेमाल करें (${e==null?void 0:e.context})`,vDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dDt(e):t==="fa"?hDt(e):t==="ar"?pDt(e):t==="es"?mDt(e):t==="hi"?gDt(e):fDt(e)}),bDt=()=>"Language",yDt=()=>"语言",xDt=()=>"زبان",wDt=()=>"اللغة",kDt=()=>"Idioma",SDt=()=>"भाषा",CDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yDt():t==="fa"?xDt():t==="ar"?wDt():t==="es"?kDt():t==="hi"?SDt():bDt()}),EDt=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,NDt=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,zDt=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,jDt=e=>`نفّذ ${e==null?void 0:e.command} في الطرفية لتسجيل الدخول.`,ADt=e=>`Ejecuta ${e==null?void 0:e.command} en una terminal para iniciar sesión.`,TDt=e=>`साइन इन करने के लिए टर्मिनल में ${e==null?void 0:e.command} चलाएं।`,RDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NDt(e):t==="fa"?zDt(e):t==="ar"?jDt(e):t==="es"?ADt(e):t==="hi"?TDt(e):EDt(e)}),MDt=()=>"Make default",ODt=()=>"设为默认值",DDt=()=>"پیش‌فرض شود",LDt=()=>"جعله افتراضيًا",IDt=()=>"Establecer como predeterminado",$Dt=()=>"डिफ़ॉल्ट बनाएं",BDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ODt():t==="fa"?DDt():t==="ar"?LDt():t==="es"?IDt():t==="hi"?$Dt():MDt()}),PDt=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",FDt=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",HDt=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",qDt=()=>"بيانات اعتماد Modal مضبوطة في بيئة العملية. أزِل تلك التجاوزات قبل استبدال الرمز هنا.",UDt=()=>"Las credenciales de Modal están definidas en el entorno del proceso. Elimínalas antes de reemplazar el token aquí.",GDt=()=>"Modal क्रेडेंशियल प्रोसेस एनवायरनमेंट में सेट हैं। यहाँ सेव टोकन बदलने से पहले उन ओवरराइड को हटाएं।",KDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FDt():t==="fa"?HDt():t==="ar"?qDt():t==="es"?UDt():t==="hi"?GDt():PDt()}),VDt=()=>"Replace token ID",WDt=()=>"替换令牌 ID",QDt=()=>"جایگزینی شناسهٔ توکن",XDt=()=>"استبدال معرّف الرمز",YDt=()=>"Reemplazar ID del token",ZDt=()=>"टोकन ID बदलें",JDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WDt():t==="fa"?QDt():t==="ar"?XDt():t==="es"?YDt():t==="hi"?ZDt():VDt()}),eLt=()=>"Replace token secret",tLt=()=>"替换令牌密钥",nLt=()=>"جایگزینی رمز توکن",rLt=()=>"استبدال سرّ الرمز",sLt=()=>"Reemplazar secreto del token",iLt=()=>"टोकन सीक्रेट बदलें",aLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tLt():t==="fa"?nLt():t==="ar"?rLt():t==="es"?sLt():t==="hi"?iLt():eLt()}),oLt=()=>"How to get a Modal token",cLt=()=>"如何获取 Modal 令牌",lLt=()=>"روش دریافت توکن Modal",uLt=()=>"كيفية الحصول على رمز Modal",_Lt=()=>"Cómo obtener un token de Modal",fLt=()=>"Modal टोकन कैसे लें",dLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cLt():t==="fa"?lLt():t==="ar"?uLt():t==="es"?_Lt():t==="hi"?fLt():oLt()}),hLt=()=>"Token ID",pLt=()=>"令牌 ID",mLt=()=>"شناسهٔ توکن",gLt=()=>"معرّف الرمز",vLt=()=>"ID del token",bLt=()=>"टोकन ID",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=()=>"Token secret",wLt=()=>"令牌密钥",kLt=()=>"رمز توکن",SLt=()=>"سرّ الرمز",CLt=()=>"Secreto del token",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=e=>`${e==null?void 0:e.count} models available — ${e==null?void 0:e.models}`,jLt=e=>`${e==null?void 0:e.count} 个模型可用 — ${e==null?void 0:e.models}`,ALt=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,TLt=e=>`النماذج المتاحة: ${e==null?void 0:e.count} — ${e==null?void 0:e.models}`,RLt=e=>`Modelos disponibles (${e==null?void 0:e.count}): ${e==null?void 0:e.models}`,MLt=e=>`${e==null?void 0:e.count} मॉडल उपलब्ध — ${e==null?void 0:e.models}`,OLt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jLt(e):t==="fa"?ALt(e):t==="ar"?TLt(e):t==="es"?RLt(e):t==="hi"?MLt(e):zLt(e)}),DLt=e=>`Needs ${e==null?void 0:e.tool}`,LLt=e=>`需要 ${e==null?void 0:e.tool}`,ILt=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,$Lt=e=>`يحتاج إلى ${e==null?void 0:e.tool}`,BLt=e=>`Requiere ${e==null?void 0:e.tool}`,PLt=e=>`${e==null?void 0:e.tool} की ज़रूरत है`,FLt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LLt(e):t==="fa"?ILt(e):t==="ar"?$Lt(e):t==="es"?BLt(e):t==="hi"?PLt(e):DLt(e)}),HLt=()=>"Needs tools",qLt=()=>"缺少工具",ULt=()=>"به ابزارها نیاز دارد",GLt=()=>"يحتاج إلى أدوات",KLt=()=>"Requiere herramientas",VLt=()=>"टूल की ज़रूरत है",WLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qLt():t==="fa"?ULt():t==="ar"?GLt():t==="es"?KLt():t==="hi"?VLt():HLt()}),QLt=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,XLt=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,YLt=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,ZLt=e=>`تستخدم عمليات التشغيل الجديدة ${e==null?void 0:e.destination} ما لم تُحدَّد بيئة تنفيذ أخرى.`,JLt=e=>`Las nuevas ejecuciones usan ${e==null?void 0:e.destination}, salvo que se indique otro backend.`,eIt=e=>`जब तक कोई और बैकएंड न बताया जाए, नए रन ${e==null?void 0:e.destination} इस्तेमाल करते हैं।`,tIt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XLt(e):t==="fa"?YLt(e):t==="ar"?ZLt(e):t==="es"?JLt(e):t==="hi"?eIt(e):QLt(e)}),nIt=()=>"New runs use SSH; choose a host when launching.",rIt=()=>"新运行将使用 SSH;启动时请选择主机。",sIt=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",iIt=()=>"تستخدم عمليات التشغيل الجديدة SSH؛ اختر مضيفًا عند الإطلاق.",aIt=()=>"Las nuevas ejecuciones usan SSH; elige un host al lanzarlas.",oIt=()=>"नए रन SSH इस्तेमाल करते हैं; लॉन्च करते समय एक होस्ट चुनें।",cIt=((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()}),lIt=()=>"New token",uIt=()=>"新令牌",_It=()=>"توکن جدید",fIt=()=>"رمز جديد",dIt=()=>"Nuevo token",hIt=()=>"नया टोकन",pIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uIt():t==="fa"?_It():t==="ar"?fIt():t==="es"?dIt():t==="hi"?hIt():lIt()}),mIt=()=>"No default flavor",gIt=()=>"不设默认配置",vIt=()=>"بدون پیکربندی پیش‌فرض",bIt=()=>"لا يوجد تكوين افتراضي للموارد",yIt=()=>"Sin opción predeterminada",xIt=()=>"कोई डिफ़ॉल्ट फ़्लेवर नहीं",wIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gIt():t==="fa"?vIt():t==="ar"?bIt():t==="es"?yIt():t==="hi"?xIt():mIt()}),kIt=()=>"none",SIt=()=>"无",CIt=()=>"هیچ‌کدام",EIt=()=>"لا شيء",NIt=()=>"ninguno",zIt=()=>"कोई नहीं",jS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SIt():t==="fa"?CIt():t==="ar"?EIt():t==="es"?NIt():t==="hi"?zIt():kIt()}),jIt=()=>"Not connected",AIt=()=>"未连接",TIt=()=>"متصل نیست",RIt=()=>"غير متصل",MIt=()=>"No conectado",OIt=()=>"कनेक्टेड नहीं",JL=((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()}),DIt=()=>"not found on PATH",LIt=()=>"在 PATH 中未找到",IIt=()=>"در PATH پیدا نشد",$It=()=>"غير موجود في PATH",BIt=()=>"no se encontró en el PATH",PIt=()=>"PATH पर नहीं मिला",FIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LIt():t==="fa"?IIt():t==="ar"?$It():t==="es"?BIt():t==="hi"?PIt():DIt()}),HIt=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,qIt=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,UIt=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,GIt=e=>`${e==null?void 0:e.context} (ليس في kubeconfig)`,KIt=e=>`${e==null?void 0:e.context} (no está en kubeconfig)`,VIt=e=>`${e==null?void 0:e.context} (kubeconfig में नहीं)`,WIt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qIt(e):t==="fa"?UIt(e):t==="ar"?GIt(e):t==="es"?KIt(e):t==="hi"?VIt(e):HIt(e)}),QIt=()=>"not initialized",XIt=()=>"尚未初始化",YIt=()=>"راه‌اندازی نشده",ZIt=()=>"غير مهيّأ",JIt=()=>"sin inicializar",e$t=()=>"शुरू नहीं किया गया",t$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XIt():t==="fa"?YIt():t==="ar"?ZIt():t==="es"?JIt():t==="hi"?e$t():QIt()}),n$t=()=>"Not set",r$t=()=>"未设置",s$t=()=>"تنظیم نشده",i$t=()=>"غير مضبوط",a$t=()=>"Sin definir",o$t=()=>"सेट नहीं",P3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r$t():t==="fa"?s$t():t==="ar"?i$t():t==="es"?a$t():t==="hi"?o$t():n$t()}),c$t=()=>"OAuth (subscription login)",l$t=()=>"OAuth(订阅登录)",u$t=()=>"OAuth (ورود با اشتراک)",_$t=()=>"OAuth (تسجيل دخول الاشتراك)",f$t=()=>"OAuth (inicio de sesión con suscripción)",d$t=()=>"OAuth (सब्सक्रिप्शन लॉगिन)",h$t=((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()}),p$t=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.`,m$t=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,g$t=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,v$t=e=>`تُركت النسخة القديمة في ${e==null?void 0:e.path} على قرص مختلف. يمكنك حذفها بعد التأكد من أن كل شيء يعمل.`,b$t=e=>`La copia anterior se dejó en ${e==null?void 0:e.path}, en otro disco. Puedes eliminarla cuando confirmes que todo funciona.`,y$t=e=>`पुरानी कॉपी एक अलग डिस्क पर ${e==null?void 0:e.path} पर छोड़ दी गई थी। सब कुछ ठीक होने की पुष्टि के बाद आप इसे हटा सकते हैं।`,x$t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?m$t(e):t==="fa"?g$t(e):t==="ar"?v$t(e):t==="es"?b$t(e):t==="hi"?y$t(e):p$t(e)}),w$t=()=>"Setting up…",k$t=()=>"正在设置…",S$t=()=>"در حال راه‌اندازی…",C$t=()=>"جارٍ الإعداد…",E$t=()=>"Configurando…",N$t=()=>"सेट अप हो रहा है…",z$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k$t():t==="fa"?S$t():t==="ar"?C$t():t==="es"?E$t():t==="hi"?N$t():w$t()}),j$t=()=>"Account",A$t=()=>"账户",T$t=()=>"حساب",R$t=()=>"الحساب",M$t=()=>"Cuenta",O$t=()=>"खाता",AS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A$t():t==="fa"?T$t():t==="ar"?R$t():t==="es"?M$t():t==="hi"?O$t():j$t()}),D$t=()=>"Add one with",L$t=()=>"使用以下命令添加:",I$t=()=>"یکی با این فرمان اضافه کنید:",$$t=()=>"أضِف واحدًا عبر",B$t=()=>"Añade una con",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=()=>"Add variable",q$t=()=>"添加变量",U$t=()=>"افزودن متغیر",G$t=()=>"إضافة متغيّر",K$t=()=>"Añadir variable",V$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"?K$t():t==="hi"?V$t():H$t()}),Q$t=()=>"Agent models",X$t=()=>"智能体模型",Y$t=()=>"مدل‌های عامل",Z$t=()=>"نماذج الوكيل",J$t=()=>"Modelos de los agentes",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=()=>"Anonymous usage analytics",rBt=()=>"匿名使用情况分析",sBt=()=>"تحلیل ناشناس استفاده",iBt=()=>"تحليلات استخدام مجهولة الهوية",aBt=()=>"Estadísticas de uso anónimas",oBt=()=>"अनाम उपयोग एनालिटिक्स",aj=((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=()=>"Auth",lBt=()=>"身份验证",uBt=()=>"احراز هویت",_Bt=()=>"المصادقة",fBt=()=>"Autenticación",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=()=>"Authentication",mBt=()=>"身份验证",gBt=()=>"احراز هویت",vBt=()=>"المصادقة",bBt=()=>"Autenticación",yBt=()=>"प्रमाणीकरण",eI=((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()}),xBt=()=>"Back to Compute",wBt=()=>"返回算力设置",kBt=()=>"بازگشت به رایانش",SBt=()=>"العودة إلى الحوسبة",CBt=()=>"Volver a Cómputo",EBt=()=>"कंप्यूट पर वापस जाएं",tI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wBt():t==="fa"?kBt():t==="ar"?SBt():t==="es"?CBt():t==="hi"?EBt():xBt()}),NBt=()=>"Backend",zBt=()=>"后端",jBt=()=>"بک‌اند",ABt=()=>"بيئة التنفيذ",TBt=()=>"Backend",RBt=()=>"बैकएंड",MBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zBt():t==="fa"?jBt():t==="ar"?ABt():t==="es"?TBt():t==="hi"?RBt():NBt()}),OBt=()=>"Baseline",DBt=()=>"基线",LBt=()=>"خط مبنا",IBt=()=>"الأساس المرجعي",$Bt=()=>"Rama base",BBt=()=>"बेसलाइन",PBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DBt():t==="fa"?LBt():t==="ar"?IBt():t==="es"?$Bt():t==="hi"?BBt():OBt()}),FBt=()=>"Binary",HBt=()=>"可执行文件",qBt=()=>"فایل اجرایی",UBt=()=>"الملف التنفيذي",GBt=()=>"Binario",KBt=()=>"बाइनरी",VBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HBt():t==="fa"?qBt():t==="ar"?UBt():t==="es"?GBt():t==="hi"?KBt():FBt()}),WBt=()=>"Cancel",QBt=()=>"取消",XBt=()=>"لغو",YBt=()=>"إلغاء",ZBt=()=>"Cancelar",JBt=()=>"रद्द करें",ff=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QBt():t==="fa"?XBt():t==="ar"?YBt():t==="es"?ZBt():t==="hi"?JBt():WBt()}),ePt=()=>"Cancel new variable",tPt=()=>"取消新变量",nPt=()=>"لغو متغیر جدید",rPt=()=>"إلغاء المتغيّر الجديد",sPt=()=>"Cancelar nueva variable",iPt=()=>"नया वेरिएबल रद्द करें",aPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tPt():t==="fa"?nPt():t==="ar"?rPt():t==="es"?sPt():t==="hi"?iPt():ePt()}),oPt=()=>"Checking compute targets…",cPt=()=>"正在检查算力目标…",lPt=()=>"در حال بررسی مقصدهای رایانشی…",uPt=()=>"جارٍ التحقق من أهداف الحوسبة…",_Pt=()=>"Comprobando destinos de cómputo…",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=()=>"Checking kubectl…",pPt=()=>"正在检查 kubectl…",mPt=()=>"در حال بررسی kubectl…",gPt=()=>"جارٍ التحقق من kubectl…",vPt=()=>"Comprobando kubectl…",bPt=()=>"kubectl जाँचा जा रहा है…",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=()=>"Checking Modal…",wPt=()=>"正在检查 Modal…",kPt=()=>"در حال بررسی Modal…",SPt=()=>"جارٍ التحقق من Modal…",CPt=()=>"Comprobando Modal…",EPt=()=>"Modal जाँचा जा रहा है…",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=()=>"Choose a preset flavor",jPt=()=>"选择预设规格",APt=()=>"یک پیکربندی آماده انتخاب کنید",TPt=()=>"اختر تكوينًا محددًا مسبقًا للموارد",RPt=()=>"Elige una opción predefinida",MPt=()=>"एक प्रीसेट फ़्लेवर चुनें",oj=((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=()=>"cluster default",DPt=()=>"集群默认值",LPt=()=>"پیش‌فرض خوشه",IPt=()=>"افتراضي العنقود",$Pt=()=>"valor predeterminado del clúster",BPt=()=>"क्लस्टर डिफ़ॉल्ट",cj=((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=()=>"cluster default (e.g. 4h, 30m)",FPt=()=>"集群默认值(例如 4h、30m)",HPt=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",qPt=()=>"افتراضي العنقود (مثل 4h أو 30m)",UPt=()=>"valor predeterminado del clúster (p. ej., 4h, 30m)",GPt=()=>"क्लस्टर डिफ़ॉल्ट (जैसे 4h, 30m)",KPt=((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=()=>"Cluster unreachable",WPt=()=>"无法连接集群",QPt=()=>"خوشه در دسترس نیست",XPt=()=>"تعذّر الوصول إلى العنقود",YPt=()=>"Clúster inaccesible",ZPt=()=>"क्लस्टर तक नहीं पहुँचा जा सका",JPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WPt():t==="fa"?QPt():t==="ar"?XPt():t==="es"?YPt():t==="hi"?ZPt():VPt()}),eFt=()=>"Compute",tFt=()=>"算力",nFt=()=>"رایانش",rFt=()=>"الحوسبة",sFt=()=>"Cómputo",iFt=()=>"कंप्यूट",nI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tFt():t==="fa"?nFt():t==="ar"?rFt():t==="es"?sFt():t==="hi"?iFt():eFt()}),aFt=()=>"Connect compute backends and choose where new runs execute.",oFt=()=>"连接算力后端,并选择新运行的执行位置。",cFt=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",lFt=()=>"اربط بيئات التنفيذ واختر أين تُنفَّذ عمليات التشغيل الجديدة.",uFt=()=>"Conecta backends de cómputo y elige dónde se lanzan las nuevas ejecuciones.",_Ft=()=>"कंप्यूट बैकएंड कनेक्ट करें और चुनें कि नए रन कहाँ चलेंगे।",fFt=((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()}),dFt=()=>"Connected",hFt=()=>"已连接",pFt=()=>"متصل",mFt=()=>"متصل",gFt=()=>"Conectado",vFt=()=>"कनेक्टेड",bFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hFt():t==="fa"?pFt():t==="ar"?mFt():t==="es"?gFt():t==="hi"?vFt():dFt()}),yFt=()=>"Context",xFt=()=>"上下文",wFt=()=>"زمینه",kFt=()=>"السياق",SFt=()=>"Contexto",CFt=()=>"कॉन्टेक्स्ट",EFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xFt():t==="fa"?wFt():t==="ar"?kFt():t==="es"?SFt():t==="hi"?CFt():yFt()}),NFt=()=>"Current",zFt=()=>"当前",jFt=()=>"فعلی",AFt=()=>"الحالي",TFt=()=>"Actual",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=()=>"Currently off:",DFt=()=>"当前已关闭:",LFt=()=>"اکنون خاموش است:",IFt=()=>"معطّل حاليًا:",$Ft=()=>"Desactivado actualmente:",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=()=>"Custom flavor",HFt=()=>"自定义规格",qFt=()=>"پیکربندی سفارشی",UFt=()=>"تكوين موارد مخصّص",GFt=()=>"Opción personalizada",KFt=()=>"कस्टम फ़्लेवर",VFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HFt():t==="fa"?qFt():t==="ar"?UFt():t==="es"?GFt():t==="hi"?KFt():FFt()}),WFt=()=>"Custom flavor…",QFt=()=>"自定义规格…",XFt=()=>"پیکربندی سفارشی…",YFt=()=>"تكوين موارد مخصّص…",ZFt=()=>"Opción personalizada…",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=()=>"Data directory",nHt=()=>"数据目录",rHt=()=>"پوشهٔ داده",sHt=()=>"دليل البيانات",iHt=()=>"Directorio de datos",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=()=>"default",lHt=()=>"默认",uHt=()=>"پیش‌فرض",_Ht=()=>"افتراضي",fHt=()=>"predeterminado",dHt=()=>"डिफ़ॉल्ट",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=()=>"Default",mHt=()=>"默认",gHt=()=>"پیش‌فرض",vHt=()=>"الافتراضي",bHt=()=>"Predeterminado",yHt=()=>"डिफ़ॉल्ट",rI=((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()}),xHt=()=>"Default destination",wHt=()=>"默认目标",kHt=()=>"مقصد پیش‌فرض",SHt=()=>"الوجهة الافتراضية",CHt=()=>"Destino predeterminado",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=()=>"Detecting hardware…",jHt=()=>"正在检测硬件…",AHt=()=>"در حال شناسایی سخت‌افزار…",THt=()=>"جارٍ اكتشاف العتاد…",RHt=()=>"Detectando hardware…",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=()=>"Detecting harnesses…",LHt=()=>"正在检测智能体工具…",IHt=()=>"در حال شناسایی ابزارهای عامل…",$Ht=()=>"جارٍ اكتشاف أدوات البرمجة…",BHt=()=>"Detectando agentes…",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=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",qHt=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",UHt=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",GHt=()=>"يوقف تعطيل المزامنة عمليات الرفع التلقائية. تواصل الحوسبة استخدام لقطات المصدر المباشرة. لا يحذف هذا مستودع GitHub أو الشيفرة التي رُفعت إليه مسبقًا.",KHt=()=>"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ó.",VHt=()=>"सिंकिंग बंद करने से ऑटोमैटिक पुश रुक जाते हैं। कंप्यूट सीधे सोर्स स्नैपशॉट का इस्तेमाल करता रहेगा। इससे GitHub रिपॉज़िटरी या पहले से पुश किया गया कोड नहीं मिटता।",WHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qHt():t==="fa"?UHt():t==="ar"?GHt():t==="es"?KHt():t==="hi"?VHt():HHt()}),QHt=()=>"Effective URL",XHt=()=>"实际使用的网址",YHt=()=>"نشانی مؤثر",ZHt=()=>"الرابط الفعّال",JHt=()=>"URL efectiva",eqt=()=>"प्रभावी URL",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=()=>"Enable GitHub syncing for new projects",rqt=()=>"为新项目启用 GitHub 同步",sqt=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",iqt=()=>"تفعيل مزامنة GitHub للمشاريع الجديدة",aqt=()=>"Activar la sincronización con GitHub en proyectos nuevos",oqt=()=>"नए प्रोजेक्ट के लिए GitHub सिंकिंग चालू करें",lj=((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()}),cqt=()=>"Environment",lqt=()=>"环境",uqt=()=>"محیط",_qt=()=>"البيئة",fqt=()=>"Entorno",dqt=()=>"एनवायरनमेंट",sI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lqt():t==="fa"?uqt():t==="ar"?_qt():t==="es"?fqt():t==="hi"?dqt():cqt()}),hqt=()=>"Failed",pqt=()=>"失败",mqt=()=>"ناموفق",gqt=()=>"فشل",vqt=()=>"Error",bqt=()=>"विफल",TS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pqt():t==="fa"?mqt():t==="ar"?gqt():t==="es"?vqt():t==="hi"?bqt():hqt()}),yqt=()=>"General",xqt=()=>"常规",wqt=()=>"عمومی",kqt=()=>"عام",Sqt=()=>"General",Cqt=()=>"सामान्य",Eqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xqt():t==="fa"?wqt():t==="ar"?kqt():t==="es"?Sqt():t==="hi"?Cqt():yqt()}),Nqt=()=>"GitHub publishing",zqt=()=>"GitHub 发布",jqt=()=>"انتشار در GitHub",Aqt=()=>"النشر على GitHub",Tqt=()=>"Publicación en GitHub",Rqt=()=>"GitHub प्रकाशन",Mqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zqt():t==="fa"?jqt():t==="ar"?Aqt():t==="es"?Tqt():t==="hi"?Rqt():Nqt()}),Oqt=()=>"Git token",Dqt=()=>"Git 令牌",Lqt=()=>"توکن Git",Iqt=()=>"رمز Git",$qt=()=>"Token de Git",Bqt=()=>"Git टोकन",Pqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dqt():t==="fa"?Lqt():t==="ar"?Iqt():t==="es"?$qt():t==="hi"?Bqt():Oqt()}),Fqt=()=>"Harnesses",Hqt=()=>"智能体工具",qqt=()=>"ابزارهای عامل",Uqt=()=>"أدوات البرمجة",Gqt=()=>"Agentes",Kqt=()=>"हार्नेस",F3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hqt():t==="fa"?qqt():t==="ar"?Uqt():t==="es"?Gqt():t==="hi"?Kqt():Fqt()}),Vqt=()=>"hf_…",Wqt=()=>"hf_…",Qqt=()=>"hf_…",Xqt=()=>"hf_…",Yqt=()=>"hf_…",Zqt=()=>"hf_…",Jqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wqt():t==="fa"?Qqt():t==="ar"?Xqt():t==="es"?Yqt():t==="hi"?Zqt():Vqt()}),eUt=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",tUt=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",nUt=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",rUt=()=>"‏HF_TOKEN مضبوط في البيئة ويتجاوز أي رمز محفوظ هنا.",sUt=()=>"HF_TOKEN está definido en el entorno y tiene prioridad sobre cualquier token guardado aquí.",iUt=()=>"HF_TOKEN एनवायरनमेंट में सेट है और यहाँ सेव किसी भी टोकन को ओवरराइड करता है।",aUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tUt():t==="fa"?nUt():t==="ar"?rUt():t==="es"?sUt():t==="hi"?iUt():eUt()}),oUt=()=>"Initialize Git",cUt=()=>"初始化 Git",lUt=()=>"راه‌اندازی Git",uUt=()=>"تهيئة Git",_Ut=()=>"Inicializar Git",fUt=()=>"Git शुरू करें",dUt=((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()}),hUt=()=>"Install",pUt=()=>"安装",mUt=()=>"نصب",gUt=()=>"تثبيت",vUt=()=>"Instalar",bUt=()=>"इंस्टॉल करें",iI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pUt():t==="fa"?mUt():t==="ar"?gUt():t==="es"?vUt():t==="hi"?bUt():hUt()}),yUt=()=>"Install broken",xUt=()=>"安装损坏",wUt=()=>"نصب خراب است",kUt=()=>"التثبيت معطوب",SUt=()=>"Instalación dañada",CUt=()=>"इंस्टॉल खराब है",EUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xUt():t==="fa"?wUt():t==="ar"?kUt():t==="es"?SUt():t==="hi"?CUt():yUt()}),NUt=()=>"Install GitHub CLI",zUt=()=>"安装 GitHub CLI",jUt=()=>"نصب GitHub CLI",AUt=()=>"تثبيت واجهة GitHub لسطر الأوامر",TUt=()=>"Instalar GitHub CLI",RUt=()=>"GitHub CLI इंस्टॉल करें",MUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zUt():t==="fa"?jUt():t==="ar"?AUt():t==="es"?TUt():t==="hi"?RUt():NUt()}),OUt=()=>"Install updates automatically",DUt=()=>"自动安装更新",LUt=()=>"نصب خودکار به‌روزرسانی‌ها",IUt=()=>"تثبيت التحديثات تلقائيًا",$Ut=()=>"Instalar actualizaciones automáticamente",BUt=()=>"अपडेट अपने आप इंस्टॉल करें",uj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DUt():t==="fa"?LUt():t==="ar"?IUt():t==="es"?$Ut():t==="hi"?BUt():OUt()}),PUt=()=>"Instance history",FUt=()=>"实例历史",HUt=()=>"تاریخچهٔ نمونه‌ها",qUt=()=>"سجل المثيلات",UUt=()=>"Historial de instancias",GUt=()=>"इंस्टेंस इतिहास",KUt=((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()}),VUt=()=>"Invalid Token",WUt=()=>"令牌无效",QUt=()=>"توکن نامعتبر",XUt=()=>"رمز غير صالح",YUt=()=>"Token no válido",ZUt=()=>"अमान्य टोकन",JUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WUt():t==="fa"?QUt():t==="ar"?XUt():t==="es"?YUt():t==="hi"?ZUt():VUt()}),eGt=()=>"Jobs / Dashboard URL",tGt=()=>"Jobs / 控制台网址",nGt=()=>"نشانی Jobs / داشبورد",rGt=()=>"رابط المهام / لوحة التحكم",sGt=()=>"URL de jobs / dashboard",iGt=()=>"Jobs / डैशबोर्ड URL",aGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tGt():t==="fa"?nGt():t==="ar"?rGt():t==="es"?sGt():t==="hi"?iGt():eGt()}),oGt=()=>"kubectl not found",cGt=()=>"未找到 kubectl",lGt=()=>"kubectl پیدا نشد",uGt=()=>"لم يُعثر على kubectl",_Gt=()=>"No se encontró kubectl",fGt=()=>"kubectl नहीं मिला",dGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cGt():t==="fa"?lGt():t==="ar"?uGt():t==="es"?_Gt():t==="hi"?fGt():oGt()}),hGt=()=>"Latest",pGt=()=>"最新版本",mGt=()=>"جدیدترین",gGt=()=>"الأحدث",vGt=()=>"Última",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=()=>"Loading…",wGt=()=>"正在加载…",kGt=()=>"در حال بارگیری…",SGt=()=>"جارٍ التحميل…",CGt=()=>"Cargando…",EGt=()=>"लोड हो रहा है…",Wu=((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()}),NGt=()=>"Loading Ray settings…",zGt=()=>"正在加载 Ray 设置…",jGt=()=>"در حال بارگیری تنظیمات Ray…",AGt=()=>"جارٍ تحميل إعدادات Ray…",TGt=()=>"Cargando configuración de Ray…",RGt=()=>"Ray सेटिंग्स लोड हो रही हैं…",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=()=>"Loading slurm settings…",DGt=()=>"正在加载 Slurm 设置…",LGt=()=>"در حال بارگیری تنظیمات Slurm…",IGt=()=>"جارٍ تحميل إعدادات slurm…",$Gt=()=>"Cargando configuración de Slurm…",BGt=()=>"Slurm सेटिंग्स लोड हो रही हैं…",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=()=>"Loading status…",HGt=()=>"正在加载状态…",qGt=()=>"در حال بارگیری وضعیت…",UGt=()=>"جارٍ تحميل الحالة…",GGt=()=>"Cargando estado…",KGt=()=>"स्थिति लोड हो रही है…",VGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HGt():t==="fa"?qGt():t==="ar"?UGt():t==="es"?GGt():t==="hi"?KGt():FGt()}),WGt=()=>"Local only",QGt=()=>"仅本地",XGt=()=>"فقط محلی",YGt=()=>"محلي فقط",ZGt=()=>"Solo local",JGt=()=>"केवल लोकल",eKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QGt():t==="fa"?XGt():t==="ar"?YGt():t==="es"?ZGt():t==="hi"?JGt():WGt()}),tKt=()=>"Local repository",nKt=()=>"本地仓库",rKt=()=>"مخزن محلی",sKt=()=>"مستودع محلي",iKt=()=>"Repositorio local",aKt=()=>"लोकल रिपॉज़िटरी",oKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nKt():t==="fa"?rKt():t==="ar"?sKt():t==="es"?iKt():t==="hi"?aKt():tKt()}),cKt=()=>"Login node",lKt=()=>"登录节点",uKt=()=>"گرهٔ ورود",_Kt=()=>"عقدة الدخول",fKt=()=>"Nodo de acceso",dKt=()=>"लॉगिन नोड",hKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lKt():t==="fa"?uKt():t==="ar"?_Kt():t==="es"?fKt():t==="hi"?dKt():cKt()}),pKt=()=>"Make GitHub syncing the default?",mKt=()=>"将 GitHub 同步设为默认值?",gKt=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",vKt=()=>"جعل مزامنة GitHub افتراضية؟",bKt=()=>"¿Activar la sincronización con GitHub de forma predeterminada?",yKt=()=>"GitHub सिंकिंग को डिफ़ॉल्ट बनाएं?",xKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mKt():t==="fa"?gKt():t==="ar"?vKt():t==="es"?bKt():t==="hi"?yKt():pKt()}),wKt=()=>"Missing bash/tar",kKt=()=>"缺少 bash/tar",SKt=()=>"bash/tar موجود نیست",CKt=()=>"‏bash/tar مفقودان",EKt=()=>"Falta bash/tar",NKt=()=>"bash/tar गुम है",zKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kKt():t==="fa"?SKt():t==="ar"?CKt():t==="es"?EKt():t==="hi"?NKt():wKt()}),jKt=()=>"More compute options",AKt=()=>"更多算力选项",TKt=()=>"گزینه‌های رایانشی بیشتر",RKt=()=>"خيارات حوسبة إضافية",MKt=()=>"Más opciones de cómputo",OKt=()=>"और कंप्यूट विकल्प",DKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AKt():t==="fa"?TKt():t==="ar"?RKt():t==="es"?MKt():t==="hi"?OKt():jKt()}),LKt=()=>"Move failed:",IKt=()=>"移动失败:",$Kt=()=>"انتقال ناموفق بود:",BKt=()=>"فشل النقل:",PKt=()=>"Error al mover:",FKt=()=>"स्थानांतरण विफल:",HKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IKt():t==="fa"?$Kt():t==="ar"?BKt():t==="es"?PKt():t==="hi"?FKt():LKt()}),qKt=()=>"Moved. orx is now using the new location.",UKt=()=>"已移动。orx 现在使用新位置。",GKt=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",KKt=()=>"تم النقل. يستخدم orx الآن الموقع الجديد.",VKt=()=>"Movido. orx ya usa la nueva ubicación.",WKt=()=>"स्थानांतरित हो गया। orx अब नए स्थान का उपयोग कर रहा है।",QKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UKt():t==="fa"?GKt():t==="ar"?KKt():t==="es"?VKt():t==="hi"?WKt():qKt()}),XKt=()=>"Namespace",YKt=()=>"命名空间",ZKt=()=>"فضای نام",JKt=()=>"مساحة الأسماء",eVt=()=>"Namespace",tVt=()=>"नेमस्पेस",nVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YKt():t==="fa"?ZKt():t==="ar"?JKt():t==="es"?eVt():t==="hi"?tVt():XKt()}),rVt=()=>"New location",sVt=()=>"新位置",iVt=()=>"محل جدید",aVt=()=>"الموقع الجديد",oVt=()=>"Nueva ubicación",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=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",_Vt=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",fVt=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",dVt=()=>"تُنزَّل الإصدارات الجديدة وتُثبَّت في الخلفية. إيقاف هذا يبقي الإشعار لكنه يترك التثبيت لك.",hVt=()=>"Las nuevas versiones se descargan e instalan en segundo plano. Si lo desactivas, verás el aviso, pero tendrás que instalarlas tú.",pVt=()=>"नए रिलीज़ बैकग्राउंड में डाउनलोड और इंस्टॉल होते हैं। इसे बंद करने पर सूचना बनी रहेगी, पर इंस्टॉल करना आप पर निर्भर होगा।",mVt=((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()}),gVt=()=>"New variable key",vVt=()=>"新变量键名",bVt=()=>"کلید متغیر جدید",yVt=()=>"مفتاح المتغيّر الجديد",xVt=()=>"Nombre de la nueva variable",wVt=()=>"नई वेरिएबल की",kVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vVt():t==="fa"?bVt():t==="ar"?yVt():t==="es"?xVt():t==="hi"?wVt():gVt()}),SVt=()=>"New variable value",CVt=()=>"新变量值",EVt=()=>"مقدار متغیر جدید",NVt=()=>"قيمة المتغيّر الجديد",zVt=()=>"Valor de la nueva variable",jVt=()=>"नई वेरिएबल वैल्यू",AVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CVt():t==="fa"?EVt():t==="ar"?NVt():t==="es"?zVt():t==="hi"?jVt():SVt()}),TVt=()=>"No code, prompts, file contents, or account identifiers are sent.",RVt=()=>"不会发送代码、提示词、文件内容或账户标识符。",MVt=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",OVt=()=>"لا تُرسَل أي شيفرة أو طلبات أو محتويات ملفات أو معرّفات حسابات.",DVt=()=>"No se envía código, prompts, contenido de archivos ni identificadores de cuenta.",LVt=()=>"कोई कोड, प्रॉम्प्ट, फ़ाइल सामग्री, या खाता पहचानकर्ता नहीं भेजे जाते।",IVt=((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()}),$Vt=()=>"No hosts found in ~/.ssh/config.",BVt=()=>"在 ~/.ssh/config 中未找到主机。",PVt=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",FVt=()=>"لم يُعثر على مضيفين في ‎~/.ssh/config.",HVt=()=>"No se encontraron hosts en ~/.ssh/config.",qVt=()=>"~/.ssh/config में कोई होस्ट नहीं मिला।",UVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BVt():t==="fa"?PVt():t==="ar"?FVt():t==="es"?HVt():t==="hi"?qVt():$Vt()}),GVt=()=>"No job-create permission",KVt=()=>"没有创建 Job 的权限",VVt=()=>"مجوز ساخت Job وجود ندارد",WVt=()=>"لا صلاحية لإنشاء المهام",QVt=()=>"Sin permiso para crear jobs",XVt=()=>"जॉब बनाने की अनुमति नहीं",YVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KVt():t==="fa"?VVt():t==="ar"?WVt():t==="es"?QVt():t==="hi"?XVt():GVt()}),ZVt=()=>"No Write Permissions",JVt=()=>"无写入权限",eWt=()=>"بدون مجوز نوشتن",tWt=()=>"لا صلاحيات كتابة",nWt=()=>"Sin permisos de escritura",rWt=()=>"लिखने की अनुमति नहीं",sWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JVt():t==="fa"?eWt():t==="ar"?tWt():t==="es"?nWt():t==="hi"?rWt():ZVt()}),iWt=()=>"No key on this computer to register — load a registered key with",aWt=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",oWt=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",cWt=()=>"لا مفتاح على هذا الحاسوب لتسجيله — حمّل مفتاحًا مسجّلًا عبر",lWt=()=>"No hay ninguna clave en este equipo para registrar — carga una clave registrada con",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=()=>"No key on this computer yet — create one with",dWt=()=>"此计算机上还没有密钥——使用以下命令创建:",hWt=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",pWt=()=>"لا مفتاح على هذا الحاسوب بعد — أنشئ واحدًا عبر",mWt=()=>"Aún no hay ninguna clave en este equipo — crea una con",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=()=>"No Slurm CLI",yWt=()=>"无 Slurm CLI",xWt=()=>"بدون CLI اسلورم",wWt=()=>"لا توجد واجهة Slurm لسطر الأوامر",kWt=()=>"Sin CLI de Slurm",SWt=()=>"कोई Slurm CLI नहीं",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=()=>"None registered",NWt=()=>"未注册任何密钥",zWt=()=>"هیچ‌کدام ثبت نشده",jWt=()=>"لا شيء مسجّل",AWt=()=>"Ninguna registrada",TWt=()=>"कोई रजिस्टर्ड नहीं",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=()=>"Not checked",OWt=()=>"未检查",DWt=()=>"بررسی نشده",LWt=()=>"لم يُفحص",IWt=()=>"Sin comprobar",$Wt=()=>"जाँचा नहीं गया",aI=((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()}),BWt=()=>"Not configured",PWt=()=>"未配置",FWt=()=>"پیکربندی نشده",HWt=()=>"غير مُعَد",qWt=()=>"Sin configurar",UWt=()=>"कॉन्फ़िगर नहीं किया गया",Hb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PWt():t==="fa"?FWt():t==="ar"?HWt():t==="es"?qWt():t==="hi"?UWt():BWt()}),GWt=()=>"Not installed",KWt=()=>"未安装",VWt=()=>"نصب نیست",WWt=()=>"غير مثبّت",QWt=()=>"No instalado",XWt=()=>"इंस्टॉल नहीं है",YWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KWt():t==="fa"?VWt():t==="ar"?WWt():t==="es"?QWt():t==="hi"?XWt():GWt()}),ZWt=()=>"Not now",JWt=()=>"暂不",eQt=()=>"اکنون نه",tQt=()=>"ليس الآن",nQt=()=>"Ahora no",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=()=>"Not on this computer",aQt=()=>"不在此计算机上",oQt=()=>"روی این رایانه نیست",cQt=()=>"ليس على هذا الحاسوب",lQt=()=>"No en este equipo",uQt=()=>"इस कंप्यूटर पर नहीं",_Qt=((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()}),fQt=()=>"Not set (pass --host per launch)",dQt=()=>"未设置(每次启动时传入 --host)",hQt=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",pQt=()=>"غير مضبوط (مرّر ‎--host‎ عند كل تشغيل)",mQt=()=>"Sin definir (pasa --host en cada lanzamiento)",gQt=()=>"सेट नहीं (हर लॉन्च पर --host दें)",oI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dQt():t==="fa"?hQt():t==="ar"?pQt():t==="es"?mQt():t==="hi"?gQt():fQt()}),vQt=()=>"Not signed in",bQt=()=>"未登录",yQt=()=>"وارد نشده",xQt=()=>"لم يتم تسجيل الدخول",wQt=()=>"Sin iniciar sesión",kQt=()=>"साइन इन नहीं है",cI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bQt():t==="fa"?yQt():t==="ar"?xQt():t==="es"?wQt():t==="hi"?kQt():vQt()}),SQt=()=>"On this computer",CQt=()=>"在此计算机上",EQt=()=>"روی این رایانه",NQt=()=>"على هذا الحاسوب",zQt=()=>"En este equipo",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=()=>"Open a project to inspect its repository and GitHub publication state.",RQt=()=>"打开项目以查看其仓库和 GitHub 发布状态。",MQt=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",OQt=()=>"افتح مشروعًا لفحص مستودعه وحالة نشره على GitHub.",DQt=()=>"Abre un proyecto para ver su repositorio y su estado de publicación en GitHub.",LQt=()=>"इसकी रिपॉज़िटरी और GitHub प्रकाशन स्थिति देखने के लिए एक प्रोजेक्ट खोलें।",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=()=>"Open job page",BQt=()=>"打开作业页面",PQt=()=>"باز کردن صفحهٔ کار",FQt=()=>"فتح صفحة المهمة",HQt=()=>"Abrir página del job",qQt=()=>"जॉब पेज खोलें",_j=((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()}),UQt=()=>"Open on GitHub",GQt=()=>"在 GitHub 上打开",KQt=()=>"باز کردن در GitHub",VQt=()=>"فتح على GitHub",WQt=()=>"Abrir en GitHub",QQt=()=>"GitHub पर खोलें",fj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GQt():t==="fa"?KQt():t==="ar"?VQt():t==="es"?WQt():t==="hi"?QQt():UQt()}),XQt=()=>", or create one with",YQt=()=>",或使用以下命令创建:",ZQt=()=>"، یا با این فرمان یکی بسازید:",JQt=()=>"، أو أنشئ واحدًا عبر",eXt=()=>", o crea una con",tXt=()=>", या इसके साथ एक बनाएं",nXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YQt():t==="fa"?ZQt():t==="ar"?JQt():t==="es"?eXt():t==="hi"?tXt():XQt()}),rXt=()=>"Org",sXt=()=>"组织",iXt=()=>"سازمان",aXt=()=>"المؤسسة",oXt=()=>"Org.",cXt=()=>"संगठन",lXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sXt():t==="fa"?iXt():t==="ar"?aXt():t==="es"?oXt():t==="hi"?cXt():rXt()}),uXt=()=>"Orgs",_Xt=()=>"组织",fXt=()=>"سازمان‌ها",dXt=()=>"المؤسسات",hXt=()=>"Orgs.",pXt=()=>"संगठन",mXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Xt():t==="fa"?fXt():t==="ar"?dXt():t==="es"?hXt():t==="hi"?pXt():uXt()}),gXt=()=>"orx can't update this install",vXt=()=>"orx 无法更新此安装",bXt=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",yXt=()=>"لا يستطيع orx تحديث هذا التثبيت",xXt=()=>"orx no puede actualizar esta instalación",wXt=()=>"orx इस इंस्टॉल को अपडेट नहीं कर सकता",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=()=>"Overleaf",CXt=()=>"Overleaf",EXt=()=>"Overleaf",NXt=()=>"Overleaf",zXt=()=>"Overleaf",jXt=()=>"Overleaf",lI=((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()}),AXt=()=>"Overleaf Git authentication token",TXt=()=>"Overleaf Git 身份验证令牌",RXt=()=>"توکن احراز هویت Git در Overleaf",MXt=()=>"رمز مصادقة Git لـ Overleaf",OXt=()=>"Token de autenticación de Git de Overleaf",DXt=()=>"Overleaf Git प्रमाणीकरण टोकन",LXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TXt():t==="fa"?RXt():t==="ar"?MXt():t==="es"?OXt():t==="hi"?DXt():AXt()}),IXt=()=>"Overridden by env",$Xt=()=>"已被环境变量覆盖",BXt=()=>"بازنویسی‌شده توسط محیط",PXt=()=>"متجاوَز عبر متغيّر البيئة",FXt=()=>"Sobrescrito por el entorno",HXt=()=>"env द्वारा ओवरराइड किया गया",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=()=>"Partition",GXt=()=>"分区",KXt=()=>"پارتیشن",VXt=()=>"القسم",WXt=()=>"Partición",QXt=()=>"पार्टीशन",XXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GXt():t==="fa"?KXt():t==="ar"?VXt():t==="es"?WXt():t==="hi"?QXt():UXt()}),YXt=()=>"Path",ZXt=()=>"路径",JXt=()=>"مسیر",eYt=()=>"المسار",tYt=()=>"Ruta",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=()=>"Plan",iYt=()=>"方案",aYt=()=>"سطح اشتراک",oYt=()=>"الخطة",cYt=()=>"Plan",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=()=>"Project",fYt=()=>"项目",dYt=()=>"پروژه",hYt=()=>"المشروع",pYt=()=>"Proyecto",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=()=>"Ray version",bYt=()=>"Ray 版本",yYt=()=>"نسخهٔ Ray",xYt=()=>"إصدار Ray",wYt=()=>"Versión de Ray",kYt=()=>"Ray वर्शन",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=()=>"Reachable",EYt=()=>"可访问",NYt=()=>"در دسترس",zYt=()=>"يمكن الوصول إليه",jYt=()=>"Accesible",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=()=>"Reading ~/.ssh/config…",MYt=()=>"正在读取 ~/.ssh/config…",OYt=()=>"در حال خواندن ‎~/.ssh/config…",DYt=()=>"جارٍ قراءة ‎~/.ssh/config…",LYt=()=>"Leyendo ~/.ssh/config…",IYt=()=>"~/.ssh/config पढ़ा जा रहा है…",uI=((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()}),$Yt=()=>"Ready",BYt=()=>"就绪",PYt=()=>"آماده",FYt=()=>"جاهز",HYt=()=>"Listo",qYt=()=>"तैयार",Tm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BYt():t==="fa"?PYt():t==="ar"?FYt():t==="es"?HYt():t==="hi"?qYt():$Yt()}),UYt=()=>"Ready to move",GYt=()=>"可以移动",KYt=()=>"آمادهٔ انتقال",VYt=()=>"جاهز للنقل",WYt=()=>"Listo para mover",QYt=()=>"स्थानांतरण के लिए तैयार",XYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GYt():t==="fa"?KYt():t==="ar"?VYt():t==="es"?WYt():t==="hi"?QYt():UYt()}),YYt=()=>"Configured",ZYt=()=>"已配置",JYt=()=>"پیکربندی‌شده",eZt=()=>"مُعَد",tZt=()=>"Configurado",nZt=()=>"कॉन्फ़िगर किया गया",Rm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZYt():t==="fa"?JYt():t==="ar"?eZt():t==="es"?tZt():t==="hi"?nZt():YYt()}),rZt=()=>"Refresh",sZt=()=>"刷新",iZt=()=>"تازه‌سازی",aZt=()=>"تحديث",oZt=()=>"Actualizar",cZt=()=>"रीफ़्रेश करें",Mm=((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()}),lZt=()=>"Remotes",uZt=()=>"远程仓库",_Zt=()=>"مخزن‌های دوردست",fZt=()=>"المستودعات البعيدة",dZt=()=>"Remotos",hZt=()=>"रिमोट",pZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uZt():t==="fa"?_Zt():t==="ar"?fZt():t==="es"?dZt():t==="hi"?hZt():lZt()}),mZt=()=>"Repository",gZt=()=>"仓库",vZt=()=>"مخزن",bZt=()=>"المستودع",yZt=()=>"Repositorio",xZt=()=>"रिपॉज़िटरी",wZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gZt():t==="fa"?vZt():t==="ar"?bZt():t==="es"?yZt():t==="hi"?xZt():mZt()}),kZt=()=>"Restart to finish updating",SZt=()=>"重新启动以完成更新",CZt=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",EZt=()=>"أعد التشغيل لإكمال التحديث",NZt=()=>"Reinicia para terminar la actualización",zZt=()=>"अपडेट पूरा करने के लिए फिर से शुरू करें",jZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SZt():t==="fa"?CZt():t==="ar"?EZt():t==="es"?NZt():t==="hi"?zZt():kZt()}),AZt=()=>"Running instances",TZt=()=>"正在运行的实例",RZt=()=>"نمونه‌های در حال اجرا",MZt=()=>"المثيلات قيد التشغيل",OZt=()=>"Instancias en ejecución",DZt=()=>"चल रहे इंस्टेंस",LZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TZt():t==="fa"?RZt():t==="ar"?MZt():t==="es"?OZt():t==="hi"?DZt():AZt()}),IZt=()=>"Runtime",$Zt=()=>"运行时间",BZt=()=>"زمان اجرا",PZt=()=>"مدة التشغيل",FZt=()=>"Runtime",HZt=()=>"रनटाइम",qZt=((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()}),UZt=()=>". Save it under that key if it's meant for HF Jobs.",GZt=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",KZt=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",VZt=()=>"‏. احفظه تحت ذلك المفتاح إن كان مخصصًا لمهام HF.",WZt=()=>". Guárdalo con ese nombre si es para HF Jobs.",QZt=()=>"। यदि यह HF Jobs के लिए है तो इसे उस की के तहत सेव करें।",XZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GZt():t==="fa"?KZt():t==="ar"?VZt():t==="es"?WZt():t==="hi"?QZt():UZt()}),YZt=()=>"Session cookie",ZZt=()=>"会话 cookie",JZt=()=>"کوکی نشست",eJt=()=>"ملف تعريف ارتباط الجلسة",tJt=()=>"Cookie de sesión",nJt=()=>"सेशन कुकी",rJt=((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()}),sJt=()=>"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.",iJt=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",aJt=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",oJt=()=>"مع حفظ ملف تعريف ارتباط الجلسة، تتابع الورقة المرتبطة Overleaf أثناء كتابة الآخرين وترسل عمليات الحفظ مباشرةً. لا تزال الأشكال تُنقَل عبر مزامنة Git الأبطأ. انسخ ملف تعريف الارتباط overleaf_session2 من متصفح مسجّل الدخول إلى Overleaf؛ ويتوقف عن العمل عند انتهاء ذلك الدخول.",cJt=()=>"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.",lJt=()=>"सेशन कुकी सेव होने पर, एक लिंक किया गया पेपर लोगों के टाइप करते ही Overleaf को फ़ॉलो करता है और सेव सीधे वापस भेजता है। फ़िगर अभी भी धीमे Git सिंक पर चलती हैं। Overleaf में साइन इन ब्राउज़र से overleaf_session2 कुकी कॉपी करें; वह साइन-इन खत्म होने पर काम करना बंद कर देती है।",uJt=((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()}),_Jt=()=>"Settings",fJt=()=>"设置",dJt=()=>"تنظیمات",hJt=()=>"الإعدادات",pJt=()=>"Configuración",mJt=()=>"सेटिंग्स",RS=((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()}),gJt=()=>"Signed in",vJt=()=>"已登录",bJt=()=>"وارد شده",yJt=()=>"تم تسجيل الدخول",xJt=()=>"Sesión iniciada",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=()=>"Source",CJt=()=>"来源",EJt=()=>"منبع",NJt=()=>"المصدر",zJt=()=>"Origen",jJt=()=>"स्रोत",_I=((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=()=>"SSH Key",TJt=()=>"SSH 密钥",RJt=()=>"کلید SSH",MJt=()=>"مفتاح SSH",OJt=()=>"Clave SSH",DJt=()=>"SSH की",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=()=>"Started",$Jt=()=>"开始时间",BJt=()=>"آغاز",PJt=()=>"بدأ",FJt=()=>"Inicio",HJt=()=>"शुरू हुआ",qJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Jt():t==="fa"?BJt():t==="ar"?PJt():t==="es"?FJt():t==="hi"?HJt():IJt()}),UJt=()=>"State",GJt=()=>"状态",KJt=()=>"وضعیت",VJt=()=>"الحالة",WJt=()=>"Estado",QJt=()=>"स्थिति",XJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GJt():t==="fa"?KJt():t==="ar"?VJt():t==="es"?WJt():t==="hi"?QJt():UJt()}),YJt=()=>"Status",ZJt=()=>"状态",JJt=()=>"وضعیت",een=()=>"الحالة",ten=()=>"Estado",nen=()=>"स्थिति",Vh=((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=()=>"Storage",sen=()=>"存储",ien=()=>"ذخیره‌سازی",aen=()=>"التخزين",oen=()=>"Almacenamiento",cen=()=>"स्टोरेज",len=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sen():t==="fa"?ien():t==="ar"?aen():t==="es"?oen():t==="hi"?cen():ren()}),uen=()=>"Sync",_en=()=>"同步",fen=()=>"همگام‌سازی",den=()=>"مزامنة",hen=()=>"Sincronización",pen=()=>"सिंक",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=()=>"Syncing off",ven=()=>"同步已关闭",ben=()=>"همگام‌سازی خاموش",yen=()=>"المزامنة معطّلة",xen=()=>"Sincronización desactivada",wen=()=>"सिंकिंग बंद है",ken=((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()}),Sen=()=>"Test connection",Cen=()=>"测试连接",Een=()=>"آزمایش اتصال",Nen=()=>"اختبار الاتصال",zen=()=>"Probar conexión",jen=()=>"कनेक्शन जाँचें",Aen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cen():t==="fa"?Een():t==="ar"?Nen():t==="es"?zen():t==="hi"?jen():Sen()}),Ten=()=>"Testing…",Ren=()=>"正在测试…",Men=()=>"در حال آزمایش…",Oen=()=>"جارٍ الاختبار…",Den=()=>"Probando…",Len=()=>"जाँचा जा रहा है…",Ien=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ren():t==="fa"?Men():t==="ar"?Oen():t==="es"?Den():t==="hi"?Len():Ten()}),$en=()=>", then add it with",Ben=()=>",然后使用以下命令添加:",Pen=()=>"، سپس با این فرمان اضافه‌اش کنید:",Fen=()=>"، ثم أضِفه عبر",Hen=()=>" y luego añádela con",qen=()=>", फिर इसे इसके साथ जोड़ें",Uen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ben():t==="fa"?Pen():t==="ar"?Fen():t==="es"?Hen():t==="hi"?qen():$en()}),Gen=()=>"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.",Ken=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",Ven=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",Wen=()=>"هذا مفيد عندما يتابع المتعاونون تغييرات المشروع على GitHub. ستفعّل المشاريع الجديدة المزامنة تلقائيًا، مع إنشاء مستودع خاص عند الحاجة ورفع فروع التجارب لإتاحة الاطلاع عليها.",Qen=()=>"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.",Xen=()=>"यह तब उपयोगी है जब सहयोगी GitHub पर प्रोजेक्ट के बदलावों को फ़ॉलो करते हों। नए प्रोजेक्ट में सिंकिंग अपने आप चालू हो जाएगी, ज़रूरत पड़ने पर एक निजी रिपॉज़िटरी बनेगी और प्रयोग ब्रांच दृश्यता के लिए पुश की जाएंगी।",Yen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ken():t==="fa"?Ven():t==="ar"?Wen():t==="es"?Qen():t==="hi"?Xen():Gen()}),Zen=()=>"This saved destination is not configured. Set it up below or choose another backend.",Jen=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",etn=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",ttn=()=>"هذه الوجهة المحفوظة غير مُعدّة. أعِدّها أدناه أو اختر بيئة تنفيذ أخرى.",ntn=()=>"Este destino guardado no está configurado. Configúralo abajo o elige otro backend.",rtn=()=>"यह सेव किया गया गंतव्य कॉन्फ़िगर नहीं है। इसे नीचे सेट अप करें या कोई और बैकएंड चुनें।",stn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jen():t==="fa"?etn():t==="ar"?ttn():t==="es"?ntn():t==="hi"?rtn():Zen()}),itn=()=>"This value looks like a Hugging Face token — compute runs only read it from",atn=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",otn=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",ctn=()=>"تبدو هذه القيمة كرمز Hugging Face — لا تقرؤه عمليات التشغيل الحوسبية إلا من",ltn=()=>"Este valor parece un token de Hugging Face — las ejecuciones de cómputo solo lo leen de",utn=()=>"यह वैल्यू एक Hugging Face टोकन जैसी लगती है — कंप्यूट रन इसे केवल यहाँ से पढ़ते हैं",_tn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?atn():t==="fa"?otn():t==="ar"?ctn():t==="es"?ltn():t==="hi"?utn():itn()}),ftn=()=>"Time limit",dtn=()=>"时间限制",htn=()=>"محدودیت زمانی",ptn=()=>"الحد الزمني",mtn=()=>"Límite de tiempo",gtn=()=>"समय सीमा",vtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dtn():t==="fa"?htn():t==="ar"?ptn():t==="es"?mtn():t==="hi"?gtn():ftn()}),btn=()=>"Unable to verify",ytn=()=>"无法验证",xtn=()=>"تأیید ممکن نیست",wtn=()=>"تعذّر التحقق",ktn=()=>"No se pudo verificar",Stn=()=>"सत्यापित नहीं हो सका",Bv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ytn():t==="fa"?xtn():t==="ar"?wtn():t==="es"?ktn():t==="hi"?Stn():btn()}),Ctn=()=>"Unknown",Etn=()=>"未知",Ntn=()=>"نامشخص",ztn=()=>"غير معروف",jtn=()=>"Desconocido",Atn=()=>"अज्ञात",fI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Etn():t==="fa"?Ntn():t==="ar"?ztn():t==="es"?jtn():t==="hi"?Atn():Ctn()}),Ttn=()=>"Update required",Rtn=()=>"需要更新",Mtn=()=>"نیازمند به‌روزرسانی",Otn=()=>"مطلوب تحديث",Dtn=()=>"Actualización necesaria",Ltn=()=>"अपडेट ज़रूरी है",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=()=>"Updates",Btn=()=>"更新",Ptn=()=>"به‌روزرسانی‌ها",Ftn=()=>"التحديثات",Htn=()=>"Actualizaciones",qtn=()=>"अपडेट",dj=((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=()=>"Usage analytics",Gtn=()=>"使用情况分析",Ktn=()=>"تحلیل استفاده",Vtn=()=>"تحليلات الاستخدام",Wtn=()=>"Estadísticas de uso",Qtn=()=>"उपयोग एनालिटिक्स",Xtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gtn():t==="fa"?Ktn():t==="ar"?Vtn():t==="es"?Wtn():t==="hi"?Qtn():Utn()}),Ytn=()=>"value",Ztn=()=>"值",Jtn=()=>"مقدار",enn=()=>"القيمة",tnn=()=>"valor",nnn=()=>"वैल्यू",dI=((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()}),rnn=()=>"Variables available to runs and the research agent (API keys, tokens).",snn=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",inn=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",ann=()=>"متغيّرات متاحة لعمليات التشغيل ولوكيل البحث (مفاتيح API والرموز).",onn=()=>"Variables disponibles para las ejecuciones y el agente de investigación (claves de API, tokens).",cnn=()=>"रन और शोध एजेंट के लिए उपलब्ध वेरिएबल (API की, टोकन)।",lnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?snn():t==="fa"?inn():t==="ar"?ann():t==="es"?onn():t==="hi"?cnn():rnn()}),unn=()=>"Version",_nn=()=>"版本",fnn=()=>"نسخه",dnn=()=>"الإصدار",hnn=()=>"Versión",pnn=()=>"वर्शन",hI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_nn():t==="fa"?fnn():t==="ar"?dnn():t==="es"?hnn():t==="hi"?pnn():unn()}),mnn=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",gnn=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",vnn=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",bnn=()=>"عند التفعيل، يحصل كل مشروع جديد على مستودع GitHub خاص. تُرفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون. تستخدم الحوسبة دائمًا لقطات المصدر المباشرة.",ynn=()=>"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.",xnn=()=>"चालू होने पर, हर नए प्रोजेक्ट को एक निजी GitHub रिपॉज़िटरी मिलती है। सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश होती हैं। कंप्यूट हमेशा सीधे सोर्स स्नैपशॉट का उपयोग करता है।",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=()=>"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.",Snn=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",Cnn=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",Enn=()=>"مع حفظ رمز، يمكن إبقاء ورقة مفتوحة في لوحة التحكم متزامنة مع مشروع Overleaf في الاتجاهين. يأتي تكامل Git في Overleaf مع خطة Overleaf مدفوعة؛ وبدونها لا يزال بالإمكان رفع ورقة إلى Overleaf كمشروع جديد. يبقى الرمز على هذا الجهاز ولا يُرسَل إلى بيئات التنفيذ.",Nnn=()=>"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.",znn=()=>"टोकन सेव होने पर, डैशबोर्ड में खुला कोई पेपर दोनों दिशाओं में Overleaf प्रोजेक्ट के साथ मेल खाता रहता है। Overleaf का Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है; उसके बिना, एक पेपर को अब भी नए प्रोजेक्ट के रूप में Overleaf पर अपलोड किया जा सकता है। टोकन इसी मशीन पर रहता है और कंप्यूट बैकएंड को नहीं भेजा जाता।",jnn=((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()}),Ann=()=>"Pick a login node first",Tnn=()=>"请先选择登录节点",Rnn=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",Mnn=()=>"اختر عقدة دخول أولًا",Onn=()=>"Elige primero un nodo de acceso",Dnn=()=>"पहले एक लॉगिन नोड चुनें",Lnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tnn():t==="fa"?Rnn():t==="ar"?Mnn():t==="es"?Onn():t==="hi"?Dnn():Ann()}),Inn=()=>"Providers",$nn=()=>"提供商",Bnn=()=>"ارائه‌دهندگان",Pnn=()=>"المزوّدون",Fnn=()=>"Proveedores",Hnn=()=>"प्रोवाइडर",pI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$nn():t==="fa"?Bnn():t==="ar"?Pnn():t==="es"?Fnn():t==="hi"?Hnn():Inn()}),qnn=()=>"Reconnect",Unn=()=>"重新连接",Gnn=()=>"اتصال دوباره",Knn=()=>"إعادة الاتصال",Vnn=()=>"Reconectar",Wnn=()=>"फिर से कनेक्ट करें",mI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Unn():t==="fa"?Gnn():t==="ar"?Knn():t==="es"?Vnn():t==="hi"?Wnn():qnn()}),Qnn=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,Xnn=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,Ynn=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,Znn=e=>`سجّل هذا الحاسوب عبر ${e==null?void 0:e.register}، أو حمّل مفتاحًا مسجّلًا عبر ${e==null?void 0:e.load}.`,Jnn=e=>`Registra este equipo con ${e==null?void 0:e.register} o carga una clave registrada con ${e==null?void 0:e.load}.`,ern=e=>`इस कंप्यूटर को ${e==null?void 0:e.register} से रजिस्टर करें, या ${e==null?void 0:e.load} से एक रजिस्टर्ड की लोड करें।`,trn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Xnn(e):t==="fa"?Ynn(e):t==="ar"?Znn(e):t==="es"?Jnn(e):t==="hi"?ern(e):Qnn(e)}),nrn=()=>"Reinstall with the orx installer to get automatic updates.",rrn=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",srn=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",irn=()=>"أعد التثبيت عبر مُثبّت orx للحصول على التحديثات التلقائية.",arn=()=>"Reinstala con el instalador de orx para recibir actualizaciones automáticas.",orn=()=>"ऑटोमैटिक अपडेट पाने के लिए orx इंस्टॉलर से फिर से इंस्टॉल करें।",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=()=>"Release notes",urn=()=>"版本说明",_rn=()=>"یادداشت‌های انتشار",frn=()=>"ملاحظات الإصدار",drn=()=>"Notas de la versión",hrn=()=>"रिलीज़ नोट्स",gI=((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()}),prn=()=>"Re-link",mrn=()=>"重新链接",grn=()=>"پیوند دوباره",vrn=()=>"إعادة الربط",brn=()=>"Volver a enlazar",yrn=()=>"फिर से लिंक करें",xrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mrn():t==="fa"?grn():t==="ar"?vrn():t==="es"?brn():t==="hi"?yrn():prn()}),wrn=()=>"Remove cookie",krn=()=>"移除 cookie",Srn=()=>"حذف کوکی",Crn=()=>"إزالة ملف تعريف الارتباط",Ern=()=>"Quitar cookie",Nrn=()=>"कुकी हटाएं",zrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?krn():t==="fa"?Srn():t==="ar"?Crn():t==="es"?Ern():t==="hi"?Nrn():wrn()}),jrn=()=>"Remove token",Arn=()=>"移除令牌",Trn=()=>"حذف توکن",Rrn=()=>"إزالة الرمز",Mrn=()=>"Quitar token",Orn=()=>"टोकन हटाएं",Drn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Arn():t==="fa"?Trn():t==="ar"?Rrn():t==="es"?Mrn():t==="hi"?Orn():jrn()}),Lrn=()=>"Removing…",Irn=()=>"正在移除…",$rn=()=>"در حال حذف…",Brn=()=>"جارٍ الإزالة…",Prn=()=>"Quitando…",Frn=()=>"हटाया जा रहा है…",hj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Irn():t==="fa"?$rn():t==="ar"?Brn():t==="es"?Prn():t==="hi"?Frn():Lrn()}),Hrn=()=>"Replace anyway",qrn=()=>"仍要替换",Urn=()=>"به‌هرحال جایگزین کن",Grn=()=>"الاستبدال على أي حال",Krn=()=>"Reemplazar de todos modos",Vrn=()=>"फिर भी बदलें",Wrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qrn():t==="fa"?Urn():t==="ar"?Grn():t==="es"?Krn():t==="hi"?Vrn():Hrn()}),Qrn=()=>"Replace key",Xrn=()=>"替换密钥",Yrn=()=>"جایگزینی کلید",Zrn=()=>"استبدال المفتاح",Jrn=()=>"Reemplazar clave",esn=()=>"की बदलें",tsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xrn():t==="fa"?Yrn():t==="ar"?Zrn():t==="es"?Jrn():t==="hi"?esn():Qrn()}),nsn=()=>"Replace token",rsn=()=>"替换令牌",ssn=()=>"جایگزینی توکن",isn=()=>"استبدال الرمز",asn=()=>"Reemplazar token",osn=()=>"टोकन बदलें",csn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rsn():t==="fa"?ssn():t==="ar"?isn():t==="es"?asn():t==="hi"?osn():nsn()}),lsn=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,usn=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,_sn=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,fsn=e=>`إعدادات Git وGitHub لـ ${e==null?void 0:e.project}. تعتمد التجارب على Git المحلي؛ والنشر اختياري.`,dsn=e=>`Configuración de Git y GitHub de ${e==null?void 0:e.project}. Git local hace posibles los experimentos; publicar es opcional.`,hsn=e=>`${e==null?void 0:e.project} के लिए Git और GitHub सेटिंग्स। लोकल Git प्रयोगों को चलाता है; प्रकाशन वैकल्पिक है।`,psn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?usn(e):t==="fa"?_sn(e):t==="ar"?fsn(e):t==="es"?dsn(e):t==="hi"?hsn(e):lsn(e)}),msn=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,gsn=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,vsn=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,bsn=e=>`الإصدار ${e==null?void 0:e.installed} مثبّت. لا تزال هذه النافذة تعمل بالإصدار ${e==null?void 0:e.current}.`,ysn=e=>`La versión ${e==null?void 0:e.installed} está instalada. Esta ventana sigue ejecutando la ${e==null?void 0:e.current}.`,xsn=e=>`वर्शन ${e==null?void 0:e.installed} इंस्टॉल है। यह विंडो अभी भी ${e==null?void 0:e.current} चला रही है।`,wsn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gsn(e):t==="fa"?vsn(e):t==="ar"?bsn(e):t==="es"?ysn(e):t==="hi"?xsn(e):msn(e)}),ksn=()=>"Run `gh auth login` in your terminal.",Ssn=()=>"请在终端中运行 `gh auth login`。",Csn=()=>"در پایانه `gh auth login` را اجرا کنید.",Esn=()=>"نفّذ `gh auth login` في طرفيتك.",Nsn=()=>"Ejecuta `gh auth login` en tu terminal.",zsn=()=>"अपने टर्मिनल में `gh auth login` चलाएं।",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=()=>"Saved",Tsn=()=>"已保存",Rsn=()=>"ذخیره شده",Msn=()=>"تم الحفظ",Osn=()=>"Guardado",Dsn=()=>"सेव हो गया",pj=((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()}),Lsn=()=>"Set up",Isn=()=>"设置",$sn=()=>"راه‌اندازی",Bsn=()=>"إعداد",Psn=()=>"Configurar",Fsn=()=>"सेट अप करें",Hsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Isn():t==="fa"?$sn():t==="ar"?Bsn():t==="es"?Psn():t==="hi"?Fsn():Lsn()}),qsn=()=>"Set up SSH key",Usn=()=>"设置 SSH 密钥",Gsn=()=>"راه‌اندازی کلید SSH",Ksn=()=>"إعداد مفتاح SSH",Vsn=()=>"Configurar clave SSH",Wsn=()=>"SSH की सेट अप करें",Qsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Usn():t==="fa"?Gsn():t==="ar"?Ksn():t==="es"?Vsn():t==="hi"?Wsn():qsn()}),Xsn=()=>"Sign in",Ysn=()=>"登录",Zsn=()=>"ورود",Jsn=()=>"تسجيل الدخول",ein=()=>"Iniciar sesión",tin=()=>"साइन इन करें",vI=((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()}),nin=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,rin=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,sin=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,iin=e=>`طرفية اتصال SSH لـ ${e==null?void 0:e.host}`,ain=e=>`Terminal de conexión SSH para ${e==null?void 0:e.host}`,oin=e=>`${e==null?void 0:e.host} के लिए SSH कनेक्शन टर्मिनल`,bI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rin(e):t==="fa"?sin(e):t==="ar"?iin(e):t==="es"?ain(e):t==="hi"?oin(e):nin(e)}),cin=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",lin=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",uin=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",_in=()=>"قاعدة البيانات المحلية وسجلات التشغيل والمُخرَجات ومرفقات المحادثة. نقل هذا الدليل ينسخ المخزن بالكامل.",fin=()=>"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.",din=()=>"लोकल डेटाबेस, रन लॉग, आर्टिफ़ैक्ट और चैट अटैचमेंट। इस डायरेक्टरी को स्थानांतरित करने पर पूरा स्टोर कॉपी होता है।",hin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lin():t==="fa"?uin():t==="ar"?_in():t==="es"?fin():t==="hi"?din():cin()}),pin=()=>"The terminal disconnected before setup completed. Try again.",min=()=>"设置完成前终端连接已断开。请重试。",gin=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",vin=()=>"انقطعت الطرفية قبل اكتمال الإعداد. حاول مجددًا.",bin=()=>"La terminal se desconectó antes de completar la configuración. Inténtalo de nuevo.",yin=()=>"सेटअप पूरा होने से पहले टर्मिनल डिस्कनेक्ट हो गया। फिर से कोशिश करें।",Pv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?min():t==="fa"?gin():t==="ar"?vin():t==="es"?bin():t==="hi"?yin():pin()}),xin=()=>"Dark",win=()=>"深色",kin=()=>"تیره",Sin=()=>"داكن",Cin=()=>"Oscuro",Ein=()=>"डार्क",Nin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?win():t==="fa"?kin():t==="ar"?Sin():t==="es"?Cin():t==="hi"?Ein():xin()}),zin=()=>"Theme",jin=()=>"主题",Ain=()=>"پوسته",Tin=()=>"السمة",Rin=()=>"Tema",Min=()=>"थीम",mj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jin():t==="fa"?Ain():t==="ar"?Tin():t==="es"?Rin():t==="hi"?Min():zin()}),Oin=()=>"Light",Din=()=>"浅色",Lin=()=>"روشن",Iin=()=>"فاتح",$in=()=>"Claro",Bin=()=>"लाइट",Pin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Din():t==="fa"?Lin():t==="ar"?Iin():t==="es"?$in():t==="hi"?Bin():Oin()}),Fin=()=>"System",Hin=()=>"系统",qin=()=>"سیستم",Uin=()=>"النظام",Gin=()=>"Sistema",Kin=()=>"सिस्टम",Vin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hin():t==="fa"?qin():t==="ar"?Uin():t==="es"?Gin():t==="hi"?Kin():Fin()}),Win=()=>"Set up billing in the Tinker console",Qin=()=>"在 Tinker 控制台设置账单",Xin=()=>"تنظیم پرداخت در کنسول Tinker",Yin=()=>"أعِدّ الفوترة في وحدة تحكم Tinker",Zin=()=>"Configura la facturación en la consola de Tinker",Jin=()=>"Tinker कंसोल में बिलिंग सेट अप करें",ean=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qin():t==="fa"?Xin():t==="ar"?Yin():t==="es"?Zin():t==="hi"?Jin():Win()}),tan=()=>"Billing setup required",nan=()=>"需要设置账单",ran=()=>"تنظیم پرداخت لازم است",san=()=>"مطلوب إعداد الفوترة",ian=()=>"Hay que configurar la facturación",aan=()=>"बिलिंग सेटअप ज़रूरी है",oan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nan():t==="fa"?ran():t==="ar"?san():t==="es"?ian():t==="hi"?aan():tan()}),can=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",lan=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",uan=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",_an=()=>"‏TINKER_API_KEY مضبوط في بيئة العملية ويتجاوز المفاتيح المحفوظة هنا. تعكس الحالة ذلك المفتاح.",fan=()=>"TINKER_API_KEY está definida en el entorno del proceso y tiene prioridad sobre las claves guardadas aquí. El estado corresponde a esa clave.",dan=()=>"TINKER_API_KEY प्रोसेस एनवायरनमेंट में सेट है और यहाँ सेव की को ओवरराइड करता है। स्थिति उसी की को दर्शाती है।",han=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lan():t==="fa"?uan():t==="ar"?_an():t==="es"?fan():t==="hi"?dan():can()}),pan=()=>"Invalid Key",man=()=>"密钥无效",gan=()=>"کلید نامعتبر",van=()=>"مفتاح غير صالح",ban=()=>"Clave no válida",yan=()=>"अमान्य की",xan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?man():t==="fa"?gan():t==="ar"?van():t==="es"?ban():t==="hi"?yan():pan()}),wan=()=>"Token from",kan=()=>"令牌来自",San=()=>"توکن از",Can=()=>"الرمز من",Ean=()=>"Token tomado de la",Nan=()=>"टोकन स्रोत",zan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kan():t==="fa"?San():t==="ar"?Can():t==="es"?Ean():t==="hi"?Nan():wan()}),jan=()=>"Update now",Aan=()=>"立即更新",Tan=()=>"اکنون به‌روزرسانی کن",Ran=()=>"التحديث الآن",Man=()=>"Actualizar ahora",Oan=()=>"अभी अपडेट करें",Dan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aan():t==="fa"?Tan():t==="ar"?Ran():t==="es"?Man():t==="hi"?Oan():jan()}),Lan=e=>`Update to ${e==null?void 0:e.version}`,Ian=e=>`更新到 ${e==null?void 0:e.version}`,$an=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,Ban=e=>`التحديث إلى ${e==null?void 0:e.version}`,Pan=e=>`Actualizar a ${e==null?void 0:e.version}`,Fan=e=>`वर्शन ${e==null?void 0:e.version} पर अपडेट करें`,Han=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ian(e):t==="fa"?$an(e):t==="ar"?Ban(e):t==="es"?Pan(e):t==="hi"?Fan(e):Lan(e)}),qan=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",Uan=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",Gan=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",Kan=()=>" التحديثات معطّلة لهذه البيئة عبر ORX_NO_UPDATE_CHECK، لذا ليس لهذا الإعداد أثر.",Van=()=>" ORX_NO_UPDATE_CHECK desactiva las actualizaciones en este entorno, así que este ajuste no tiene efecto.",Wan=()=>" इस एनवायरनमेंट के लिए ORX_NO_UPDATE_CHECK द्वारा अपडेट बंद कर दिए गए हैं, इसलिए इस सेटिंग का कोई असर नहीं है।",Qan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uan():t==="fa"?Gan():t==="ar"?Kan():t==="es"?Van():t==="hi"?Wan():qan()}),Xan=()=>"Updating default destination…",Yan=()=>"正在更新默认运行位置…",Zan=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",Jan=()=>"جارٍ تحديث الوجهة الافتراضية…",eon=()=>"Actualizando el destino predeterminado…",ton=()=>"डिफ़ॉल्ट गंतव्य अपडेट हो रहा है…",non=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yan():t==="fa"?Zan():t==="ar"?Jan():t==="es"?eon():t==="hi"?ton():Xan()}),ron=()=>"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.",son=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",ion=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",aon=()=>"استخدم هذا المستودع لرفع فروع التجارب تلقائيًا عندما يملك حسابك المتصل صلاحية الكتابة فيه. وإلا، ينشئ OpenResearch مستودعًا خاصًا منفصلًا للتعاون.",oon=()=>"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.",con=()=>"जब आपका कनेक्टेड खाता इसमें लिख सकता है तो ऑटोमैटिक प्रयोग-ब्रांच पुश के लिए इस रिपॉज़िटरी का इस्तेमाल करें। नहीं तो, OpenResearch सहयोग के लिए एक अलग निजी रिपॉज़िटरी बनाता है।",lon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?son():t==="fa"?ion():t==="ar"?aon():t==="es"?oon():t==="hi"?con():ron()}),uon=()=>"Validating…",_on=()=>"正在验证…",fon=()=>"در حال اعتبارسنجی…",don=()=>"جارٍ التحقق…",hon=()=>"Validando…",pon=()=>"सत्यापित हो रहा है…",yI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_on():t==="fa"?fon():t==="ar"?don():t==="es"?hon():t==="hi"?pon():uon()}),mon=()=>"View settings",gon=()=>"查看设置",von=()=>"مشاهدهٔ تنظیمات",bon=()=>"عرض الإعدادات",yon=()=>"Ver configuración",xon=()=>"सेटिंग्स देखें",won=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gon():t==="fa"?von():t==="ar"?bon():t==="es"?yon():t==="hi"?xon():mon()}),kon=e=>`Couldn't delete the side chat: ${e==null?void 0:e.error}`,Son=e=>`无法删除侧边对话:${e==null?void 0:e.error}`,Con=e=>`حذف گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,Eon=e=>`تعذّر حذف المحادثة الجانبية: ${e==null?void 0:e.error}`,Non=e=>`No se pudo eliminar el chat lateral: ${e==null?void 0:e.error}`,zon=e=>`साइड चैट हटाई नहीं जा सकी: ${e==null?void 0:e.error}`,gj=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Son(e):t==="fa"?Con(e):t==="ar"?Eon(e):t==="es"?Non(e):t==="hi"?zon(e):kon(e)}),jon=()=>"Side chats are deleted when you close them or quit the app.",Aon=()=>"关闭侧边对话或退出应用后,侧边对话会被删除。",Ton=()=>"گفت‌وگوهای جانبی با بستن آن‌ها یا خروج از برنامه حذف می‌شوند.",Ron=()=>"تُحذف المحادثات الجانبية عند إغلاقها أو الخروج من التطبيق.",Mon=()=>"Los chats laterales se eliminan cuando los cierras o sales de la app.",Oon=()=>"साइड चैट उन्हें बंद करने या ऐप से बाहर निकलने पर हटा दी जाती हैं।",Don=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aon():t==="fa"?Ton():t==="ar"?Ron():t==="es"?Mon():t==="hi"?Oon():jon()}),Lon=()=>"Open a chat first, then start a side chat from it.",Ion=()=>"请先打开一个对话,再从中开启侧边对话。",$on=()=>"ابتدا یک گفت‌وگو باز کنید، سپس از آن گفت‌وگوی جانبی شروع کنید.",Bon=()=>"افتح محادثة أولًا، ثم ابدأ منها محادثة جانبية.",Pon=()=>"Abre primero un chat y luego inicia un chat lateral desde él.",Fon=()=>"पहले कोई चैट खोलें, फिर उससे साइड चैट शुरू करें।",Hon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ion():t==="fa"?$on():t==="ar"?Bon():t==="es"?Pon():t==="hi"?Fon():Lon()}),qon=()=>"A side chat can't open its own side chat.",Uon=()=>"侧边对话不能再开启自己的侧边对话。",Gon=()=>"گفت‌وگوی جانبی نمی‌تواند گفت‌وگوی جانبی خودش را باز کند.",Kon=()=>"لا يمكن للمحادثة الجانبية فتح محادثة جانبية خاصة بها.",Von=()=>"Un chat lateral no puede abrir su propio chat lateral.",Won=()=>"साइड चैट अपनी खुद की साइड चैट नहीं खोल सकती।",Qon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uon():t==="fa"?Gon():t==="ar"?Kon():t==="es"?Von():t==="hi"?Won():qon()}),Xon=()=>"Side chat",Yon=()=>"侧边对话",Zon=()=>"گفت‌وگوی جانبی",Jon=()=>"محادثة جانبية",ecn=()=>"Chat lateral",tcn=()=>"साइड चैट",H3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yon():t==="fa"?Zon():t==="ar"?Jon():t==="es"?ecn():t==="hi"?tcn():Xon()}),ncn=e=>`Couldn't open a side chat: ${e==null?void 0:e.error}`,rcn=e=>`无法打开侧边对话:${e==null?void 0:e.error}`,scn=e=>`باز کردن گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,icn=e=>`تعذّر فتح محادثة جانبية: ${e==null?void 0:e.error}`,acn=e=>`No se pudo abrir un chat lateral: ${e==null?void 0:e.error}`,ocn=e=>`साइड चैट नहीं खुल सकी: ${e==null?void 0:e.error}`,ccn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rcn(e):t==="fa"?scn(e):t==="ar"?icn(e):t==="es"?acn(e):t==="hi"?ocn(e):ncn(e)}),lcn=()=>"Ask a quick question in a temporary side chat",ucn=()=>"在临时侧边对话中快速提问",_cn=()=>"یک پرسش کوتاه را در گفت‌وگوی جانبی موقت بپرسید",fcn=()=>"اطرح سؤالًا سريعًا في محادثة جانبية مؤقتة",dcn=()=>"Haz una pregunta rápida en un chat lateral temporal",hcn=()=>"अस्थायी साइड चैट में एक छोटा सवाल पूछें",pcn=((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()}),mcn=()=>"Skill",gcn=()=>"技能",vcn=()=>"مهارت",bcn=()=>"مهارة",ycn=()=>"Skill",xcn=()=>"स्किल",wcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gcn():t==="fa"?vcn():t==="ar"?bcn():t==="es"?ycn():t==="hi"?xcn():mcn()}),kcn=()=>"Loading skill…",Scn=()=>"正在加载技能…",Ccn=()=>"در حال بارگیری مهارت…",Ecn=()=>"جارٍ تحميل المهارة…",Ncn=()=>"Cargando skill…",zcn=()=>"स्किल लोड हो रही है…",jcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Scn():t==="fa"?Ccn():t==="ar"?Ecn():t==="es"?Ncn():t==="hi"?zcn():kcn()}),Acn=()=>"Personal",Tcn=()=>"个人",Rcn=()=>"شخصی",Mcn=()=>"شخصي",Ocn=()=>"Personal",Dcn=()=>"व्यक्तिगत",Lcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tcn():t==="fa"?Rcn():t==="ar"?Mcn():t==="es"?Ocn():t==="hi"?Dcn():Acn()}),Icn=()=>"Alternatively, tell your agent to save a reusable skill for you.",$cn=()=>"或者,请你的智能体为你保存可重复使用的技能。",Bcn=()=>"یا از عامل خود بخواهید یک مهارت قابل استفادهٔ مجدد برایتان ذخیره کند.",Pcn=()=>"أو بدلًا من ذلك، اطلب من وكيلك حفظ مهارة قابلة لإعادة الاستخدام لك.",Fcn=()=>"También puedes pedirle a tu agente que guarde una skill reutilizable por ti.",Hcn=()=>"या अपने एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल सेव करने को कहें।",qcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$cn():t==="fa"?Bcn():t==="ar"?Pcn():t==="es"?Fcn():t==="hi"?Hcn():Icn()}),Ucn=e=>`Delete the “${e==null?void 0:e.name}” skill?`,Gcn=e=>`删除技能“${e==null?void 0:e.name}”?`,Kcn=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,Vcn=e=>`حذف مهارة «${e==null?void 0:e.name}»؟`,Wcn=e=>`¿Eliminar la skill “${e==null?void 0:e.name}”?`,Qcn=e=>`“${e==null?void 0:e.name}” स्किल हटाएं?`,Xcn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gcn(e):t==="fa"?Kcn(e):t==="ar"?Vcn(e):t==="es"?Wcn(e):t==="hi"?Qcn(e):Ucn(e)}),Ycn=e=>`Delete skill ${e==null?void 0:e.name}`,Zcn=e=>`删除技能 ${e==null?void 0:e.name}`,Jcn=e=>`حذف مهارت ${e==null?void 0:e.name}`,eln=e=>`حذف المهارة ${e==null?void 0:e.name}`,tln=e=>`Eliminar la skill ${e==null?void 0:e.name}`,nln=e=>`${e==null?void 0:e.name} स्किल हटाएं`,rln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zcn(e):t==="fa"?Jcn(e):t==="ar"?eln(e):t==="es"?tln(e):t==="hi"?nln(e):Ycn(e)}),sln=e=>`Delete the “${e==null?void 0:e.name}” template?`,iln=e=>`删除模板“${e==null?void 0:e.name}”?`,aln=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,oln=e=>`حذف قالب «${e==null?void 0:e.name}»؟`,cln=e=>`¿Eliminar la plantilla “${e==null?void 0:e.name}”?`,lln=e=>`“${e==null?void 0:e.name}” टेम्पलेट हटाएं?`,uln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iln(e):t==="fa"?aln(e):t==="ar"?oln(e):t==="es"?cln(e):t==="hi"?lln(e):sln(e)}),_ln=e=>`Delete template ${e==null?void 0:e.name}`,fln=e=>`删除模板 ${e==null?void 0:e.name}`,dln=e=>`حذف قالب ${e==null?void 0:e.name}`,hln=e=>`حذف القالب ${e==null?void 0:e.name}`,pln=e=>`Eliminar la plantilla ${e==null?void 0:e.name}`,mln=e=>`${e==null?void 0:e.name} टेम्पलेट हटाएं`,gln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fln(e):t==="fa"?dln(e):t==="ar"?hln(e):t==="es"?pln(e):t==="hi"?mln(e):_ln(e)}),vln=()=>"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.",bln=()=>"在聊天中使用 /name 调用技能。来自编程代理的技能会先经过研究相关性筛选,再导入。您也可以自行上传技能,或让 OpenResearch 代理为您创建并添加可复用技能。",yln=()=>"مهارت‌ها را با /name در گفتگو فراخوانی کنید. مهارت‌های عامل‌های برنامه‌نویسی پیش از وارد شدن از نظر ارتباط با پژوهش بررسی می‌شوند. می‌توانید مهارت را خودتان بارگذاری کنید یا از عامل OpenResearch بخواهید یک مهارت قابل استفادهٔ مجدد بسازد و اضافه کند.",xln=()=>"استدعِ المهارات عبر ‎/name‎ في المحادثة. تُفحَص مهارات وكلاء البرمجة لديك للتأكد من صلتها بالبحث قبل استيرادها. ارفع مهارة لتضمينها بنفسك. أو بدلًا من ذلك، اطلب من وكيل OpenResearch إنشاء مهارة قابلة لإعادة الاستخدام وإضافتها لك.",wln=()=>"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.",kln=()=>"चैट में /नाम से स्किल इस्तेमाल करें। आपके कोडिंग एजेंटों की स्किल इंपोर्ट करने से पहले शोध प्रासंगिकता के लिए जाँची जाती हैं। खुद स्किल शामिल करने के लिए एक अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल बनाने और जोड़ने को कहें।",Sln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bln():t==="fa"?yln():t==="ar"?xln():t==="es"?wln():t==="hi"?kln():vln()}),Cln=()=>"Drop a SKILL.md or .zip here, or click to choose",Eln=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",Nln=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",zln=()=>"أفلِت ملف ‎SKILL.md‎ أو ‎.zip‎ هنا، أو انقر للاختيار",jln=()=>"Suelta aquí un SKILL.md o un .zip, o haz clic para elegirlo",Aln=()=>"यहाँ एक SKILL.md या .zip छोड़ें, या चुनने के लिए क्लिक करें",Tln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eln():t==="fa"?Nln():t==="ar"?zln():t==="es"?jln():t==="hi"?Aln():Cln()}),Rln=()=>"Drop a .tex or .zip here, or click to choose",Mln=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",Oln=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",Dln=()=>"أفلِت ملف ‎.tex‎ أو ‎.zip‎ هنا، أو انقر للاختيار",Lln=()=>"Suelta aquí un .tex o un .zip, o haz clic para elegirlo",Iln=()=>"यहाँ एक .tex या .zip छोड़ें, या चुनने के लिए क्लिक करें",$ln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mln():t==="fa"?Oln():t==="ar"?Dln():t==="es"?Lln():t==="hi"?Iln():Rln()}),Bln=()=>"File too large (max 20 MB).",Pln=()=>"文件过大(最大 20 MB)。",Fln=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",Hln=()=>"الملف كبير جدًا (بحد أقصى 20 ميغابايت).",qln=()=>"Archivo demasiado grande (máx. 20 MB).",Uln=()=>"फ़ाइल बहुत बड़ी है (अधिकतम 20 MB)।",xI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pln():t==="fa"?Fln():t==="ar"?Hln():t==="es"?qln():t==="hi"?Uln():Bln()}),Gln=()=>" + 1 file",Kln=()=>" + 1 个文件",Vln=()=>" + ۱ فایل",Wln=()=>" + ملف واحد",Qln=()=>" + 1 archivo",Xln=()=>" + 1 फ़ाइल",Yln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kln():t==="fa"?Vln():t==="ar"?Wln():t==="es"?Qln():t==="hi"?Xln():Gln()}),Zln=()=>"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.",Jln=()=>"自定义所有项目中可用的技能和 LaTeX 模板。在此上传,或让 OpenResearch 代理为您创建并添加。",eun=()=>"مهارت‌ها و قالب‌های LaTeX قابل استفاده در همهٔ پروژه‌ها را سفارشی کنید. آن‌ها را اینجا بارگذاری کنید یا از عامل OpenResearch بخواهید برایتان بسازد و اضافه کند.",tun=()=>"خصّص المهارات وقوالب LaTeX المتاحة عبر مشاريعك. ارفعها هنا، أو اطلب من وكيل OpenResearch إنشاءها وإضافتها لك.",nun=()=>"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.",run=()=>"अपने प्रोजेक्ट में उपलब्ध स्किल और LaTeX टेम्पलेट कस्टमाइज़ करें। उन्हें यहाँ अपलोड करें, या किसी OpenResearch एजेंट से आपके लिए उन्हें बनाने और जोड़ने को कहें।",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=()=>"Remove from OpenResearch",aun=()=>"从 OpenResearch 移除",oun=()=>"حذف از OpenResearch",cun=()=>"إزالة من OpenResearch",lun=()=>"Quitar de OpenResearch",uun=()=>"OpenResearch से हटाएं",_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=e=>`Remove “${e==null?void 0:e.name}” from OpenResearch? Its source files will remain in your coding agent.`,dun=e=>`从 OpenResearch 移除“${e==null?void 0:e.name}”?源文件将保留在你的编程智能体中。`,hun=e=>`«${e==null?void 0:e.name}» از OpenResearch حذف شود؟ فایل‌های اصلی در عامل برنامه‌نویسی شما باقی می‌مانند.`,pun=e=>`إزالة «${e==null?void 0:e.name}» من OpenResearch؟ ستبقى ملفاتها المصدرية في وكيل البرمجة الخاص بك.`,mun=e=>`¿Quitar “${e==null?void 0:e.name}” de OpenResearch? Sus archivos originales se conservarán en tu agente de programación.`,gun=e=>`“${e==null?void 0:e.name}” को OpenResearch से हटाएं? इसकी सोर्स फ़ाइलें आपके कोडिंग एजेंट में बनी रहेंगी।`,vun=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dun(e):t==="fa"?hun(e):t==="ar"?pun(e):t==="es"?mun(e):t==="hi"?gun(e):fun(e)}),bun=e=>`Remove ${e==null?void 0:e.name} from OpenResearch`,yun=e=>`从 OpenResearch 移除 ${e==null?void 0:e.name}`,xun=e=>`حذف ${e==null?void 0:e.name} از OpenResearch`,wun=e=>`إزالة ${e==null?void 0:e.name} من OpenResearch`,kun=e=>`Quitar ${e==null?void 0:e.name} de OpenResearch`,Sun=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं`,Cun=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yun(e):t==="fa"?xun(e):t==="ar"?wun(e):t==="es"?kun(e):t==="hi"?Sun(e):bun(e)}),Eun=e=>` + ${e==null?void 0:e.count} files`,Nun=e=>` + ${e==null?void 0:e.count} 个文件`,zun=e=>` + ${e==null?void 0:e.count} فایل`,jun=e=>` + ملفات (${e==null?void 0:e.count})`,Aun=e=>` + ${e==null?void 0:e.count} archivos`,Tun=e=>` + ${e==null?void 0:e.count} फ़ाइलें`,Run=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nun(e):t==="fa"?zun(e):t==="ar"?jun(e):t==="es"?Aun(e):t==="hi"?Tun(e):Eun(e)}),Mun=()=>"Could not load skills:",Oun=()=>"无法加载技能:",Dun=()=>"بارگیری مهارت‌ها ممکن نشد:",Lun=()=>"تعذّر تحميل المهارات:",Iun=()=>"No se pudieron cargar las skills:",$un=()=>"स्किल लोड नहीं हो सकीं:",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=()=>"Could not load templates:",Fun=()=>"无法加载模板:",Hun=()=>"بارگیری قالب‌ها ممکن نشد:",qun=()=>"تعذّر تحميل القوالب:",Uun=()=>"No se pudieron cargar las plantillas:",Gun=()=>"टेम्पलेट लोड नहीं हो सके:",Kun=((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()}),Vun=()=>"Customize",Wun=()=>"自定义",Qun=()=>"سفارشی‌سازی",Xun=()=>"تخصيص",Yun=()=>"Personalizar",Zun=()=>"कस्टमाइज़ करें",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():Vun()}),e_n=()=>"Delete skill",t_n=()=>"删除技能",n_n=()=>"حذف مهارت",r_n=()=>"حذف المهارة",s_n=()=>"Eliminar skill",i_n=()=>"स्किल हटाएं",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=()=>"Delete template",c_n=()=>"删除模板",l_n=()=>"حذف قالب",u_n=()=>"حذف القالب",__n=()=>"Eliminar plantilla",f_n=()=>"टेम्पलेट हटाएं",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=()=>"LaTeX templates",p_n=()=>"LaTeX 模板",m_n=()=>"قالب‌های LaTeX",g_n=()=>"قوالب LaTeX",v_n=()=>"Plantillas de LaTeX",b_n=()=>"LaTeX टेम्पलेट",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=()=>"Loading skills…",w_n=()=>"正在加载技能…",k_n=()=>"در حال بارگیری مهارت‌ها…",S_n=()=>"جارٍ تحميل المهارات…",C_n=()=>"Cargando skills…",E_n=()=>"स्किल लोड हो रही हैं…",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=()=>"Loading templates…",j_n=()=>"正在加载模板…",A_n=()=>"در حال بارگیری قالب‌ها…",T_n=()=>"جارٍ تحميل القوالب…",R_n=()=>"Cargando plantillas…",M_n=()=>"टेम्पलेट लोड हो रहे हैं…",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=()=>"No skills yet.",L_n=()=>"尚无技能。",I_n=()=>"هنوز مهارتی وجود ندارد.",$_n=()=>"لا توجد مهارات بعد.",B_n=()=>"Aún no hay skills.",P_n=()=>"अभी तक कोई स्किल नहीं।",F_n=((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()}),H_n=()=>"No templates yet.",q_n=()=>"尚无模板。",U_n=()=>"هنوز قالبی وجود ندارد.",G_n=()=>"لا توجد قوالب بعد.",K_n=()=>"Aún no hay plantillas.",V_n=()=>"अभी तक कोई टेम्पलेट नहीं।",W_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q_n():t==="fa"?U_n():t==="ar"?G_n():t==="es"?K_n():t==="hi"?V_n():H_n()}),Q_n=()=>"Skills",X_n=()=>"技能",Y_n=()=>"مهارت‌ها",Z_n=()=>"المهارات",J_n=()=>"Skills",efn=()=>"स्किल",tfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X_n():t==="fa"?Y_n():t==="ar"?Z_n():t==="es"?J_n():t==="hi"?efn():Q_n()}),nfn=()=>"Uploading…",rfn=()=>"正在上传…",sfn=()=>"در حال بارگذاری…",ifn=()=>"جارٍ الرفع…",afn=()=>"Subiendo…",ofn=()=>"अपलोड हो रहा है…",cfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rfn():t==="fa"?sfn():t==="ar"?ifn():t==="es"?afn():t==="hi"?ofn():nfn()}),lfn=()=>"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.",ufn=()=>"代理撰写论文时使用的会议格式或自定义样式,用于替代默认导言区。上传 .tex 文件或包含 .cls 和 .sty 文件的 .zip 压缩包,也可以让 OpenResearch 代理为您创建并添加 LaTeX 模板。只有一个模板可用时,代理会直接使用,无需询问。",_fn=()=>"قالب کنفرانس یا سبک اختصاصی که عامل به‌جای پیش‌گفتار پیش‌فرض برای نوشتن مقاله استفاده می‌کند. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید، یا از عامل OpenResearch بخواهید قالب LaTeX بسازد و اضافه کند. اگر تنها یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",ffn=()=>"قالب مؤتمر أو تنسيق خاص بالمؤسسة يستخدمه الوكيل لكتابة الأوراق بدلًا من إعدادات LaTeX الافتراضية. ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ يحتوي على ملفات ‎.cls‎ و‎.sty‎ الخاصة به. أو اطلب من وكيل OpenResearch إنشاء قالب LaTeX وإضافته لك. عند توفّر قالب واحد فقط، يستخدمه الوكيل دون سؤال.",dfn=()=>"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.",hfn=()=>"एक कॉन्फ़्रेंस क्लास या हाउस स्टाइल जिसमें एजेंट अपने डिफ़ॉल्ट प्रीएंबल की बजाय पेपर लिखता है। एक .tex फ़ाइल या उसकी .cls और .sty फ़ाइलों वाली .zip अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक LaTeX टेम्पलेट बनाने और जोड़ने को कहें। ठीक एक टेम्पलेट उपलब्ध होने पर, एजेंट बिना पूछे उसी का इस्तेमाल करता है।",pfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ufn():t==="fa"?_fn():t==="ar"?ffn():t==="es"?dfn():t==="hi"?hfn():lfn()}),mfn=()=>"Upload a SKILL.md file or a .zip of a skill folder.",gfn=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",vfn=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",bfn=()=>"ارفع ملف ‎SKILL.md‎ أو ملف ‎.zip‎ لمجلد مهارة.",yfn=()=>"Sube un archivo SKILL.md o un .zip con la carpeta de la skill.",xfn=()=>"एक SKILL.md फ़ाइल या स्किल फ़ोल्डर की .zip अपलोड करें।",wfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gfn():t==="fa"?vfn():t==="ar"?bfn():t==="es"?yfn():t==="hi"?xfn():mfn()}),kfn=()=>"Upload a .tex file or a .zip of a template folder.",Sfn=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",Cfn=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",Efn=()=>"ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ لمجلد قالب.",Nfn=()=>"Sube un archivo .tex o un .zip con la carpeta de la plantilla.",zfn=()=>"एक .tex फ़ाइल या टेम्पलेट फ़ोल्डर की .zip अपलोड करें।",jfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sfn():t==="fa"?Cfn():t==="ar"?Efn():t==="es"?Nfn():t==="hi"?zfn():kfn()}),Afn=()=>"Close SSH config",Tfn=()=>"关闭 SSH 配置",Rfn=()=>"بستن پیکربندی SSH",Mfn=()=>"إغلاق إعداد SSH",Ofn=()=>"Cerrar la configuración SSH",Dfn=()=>"SSH कॉन्फ़िग बंद करें",Lfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tfn():t==="fa"?Rfn():t==="ar"?Mfn():t==="es"?Ofn():t==="hi"?Dfn():Afn()}),Ifn=()=>"Discard your unsaved SSH config changes?",$fn=()=>"要放弃未保存的 SSH 配置更改吗?",Bfn=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",Pfn=()=>"تجاهل تغييرات إعداد SSH غير المحفوظة؟",Ffn=()=>"¿Descartar los cambios sin guardar en la configuración SSH?",Hfn=()=>"आपके सेव न किए गए SSH कॉन्फ़िग बदलाव छोड़ें?",qfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$fn():t==="fa"?Bfn():t==="ar"?Pfn():t==="es"?Ffn():t==="hi"?Hfn():Ifn()}),Ufn=()=>"Loading SSH config…",Gfn=()=>"正在加载 SSH 配置…",Kfn=()=>"در حال بارگیری پیکربندی SSH…",Vfn=()=>"جارٍ تحميل إعداد SSH…",Wfn=()=>"Cargando la configuración SSH…",Qfn=()=>"SSH कॉन्फ़िग लोड हो रहा है…",Xfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gfn():t==="fa"?Kfn():t==="ar"?Vfn():t==="es"?Wfn():t==="hi"?Qfn():Ufn()}),Yfn=()=>"SSH config saved",Zfn=()=>"SSH 配置已保存",Jfn=()=>"پیکربندی SSH ذخیره شد",edn=()=>"تم حفظ إعداد SSH",tdn=()=>"Configuración SSH guardada",ndn=()=>"SSH कॉन्फ़िग सेव हो गया",rdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zfn():t==="fa"?Jfn():t==="ar"?edn():t==="es"?tdn():t==="hi"?ndn():Yfn()}),sdn=()=>"SSH config",idn=()=>"SSH 配置",adn=()=>"پیکربندی SSH",odn=()=>"إعداد SSH",cdn=()=>"Configuración SSH",ldn=()=>"SSH कॉन्फ़िग",udn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?idn():t==="fa"?adn():t==="ar"?odn():t==="es"?cdn():t==="hi"?ldn():sdn()}),_dn=()=>"Configure SSH hosts…",fdn=()=>"配置 SSH 主机…",ddn=()=>"پیکربندی میزبان‌های SSH…",hdn=()=>"إعداد مضيفات SSH…",pdn=()=>"Configurar hosts SSH…",mdn=()=>"SSH होस्ट कॉन्फ़िगर करें…",wI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fdn():t==="fa"?ddn():t==="ar"?hdn():t==="es"?pdn():t==="hi"?mdn():_dn()}),gdn=()=>"Container name or ID",vdn=()=>"容器名称或 ID",bdn=()=>"نام یا شناسهٔ کانتینر",ydn=()=>"اسم الحاوية أو معرّفها",xdn=()=>"Nombre o ID del contenedor",wdn=()=>"कंटेनर का नाम या ID",kdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vdn():t==="fa"?bdn():t==="ar"?ydn():t==="es"?xdn():t==="hi"?wdn():gdn()}),Sdn=()=>"Default SSH host",Cdn=()=>"默认 SSH 主机",Edn=()=>"میزبان پیش‌فرض SSH",Ndn=()=>"مضيف SSH الافتراضي",zdn=()=>"Servidor SSH predeterminado",jdn=()=>"डिफ़ॉल्ट SSH होस्ट",Adn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cdn():t==="fa"?Edn():t==="ar"?Ndn():t==="es"?zdn():t==="hi"?jdn():Sdn()}),Tdn=()=>"Direct host",Rdn=()=>"直接在主机上",Mdn=()=>"مستقیماً روی میزبان",Odn=()=>"المضيف مباشرة",Ddn=()=>"Servidor directamente",Ldn=()=>"सीधे होस्ट पर",Idn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rdn():t==="fa"?Mdn():t==="ar"?Odn():t==="es"?Ddn():t==="hi"?Ldn():Tdn()}),$dn=()=>"Existing container",Bdn=()=>"现有容器",Pdn=()=>"کانتینر موجود",Fdn=()=>"حاوية موجودة",Hdn=()=>"Contenedor existente",qdn=()=>"मौजूदा कंटेनर",Udn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bdn():t==="fa"?Pdn():t==="ar"?Fdn():t==="es"?Hdn():t==="hi"?qdn():$dn()}),Gdn=()=>"Run in",Kdn=()=>"运行位置",Vdn=()=>"اجرا در",Wdn=()=>"التشغيل في",Qdn=()=>"Ejecutar en",Xdn=()=>"यहाँ चलाएँ",Ydn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kdn():t==="fa"?Vdn():t==="ar"?Wdn():t==="es"?Qdn():t==="hi"?Xdn():Gdn()}),Zdn=()=>"Cancelled",Jdn=()=>"已取消",ehn=()=>"لغوشده",thn=()=>"ملغى",nhn=()=>"Cancelado",rhn=()=>"रद्द किया गया",shn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jdn():t==="fa"?ehn():t==="ar"?thn():t==="es"?nhn():t==="hi"?rhn():Zdn()}),ihn=()=>"Cancelling",ahn=()=>"正在取消",ohn=()=>"در حال لغو",chn=()=>"جارٍ الإلغاء",lhn=()=>"Cancelando",uhn=()=>"रद्द हो रहा है",_hn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ahn():t==="fa"?ohn():t==="ar"?chn():t==="es"?lhn():t==="hi"?uhn():ihn()}),fhn=()=>"Done",dhn=()=>"已完成",hhn=()=>"انجام‌شده",phn=()=>"تم",mhn=()=>"Completado",ghn=()=>"पूरा हुआ",kI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dhn():t==="fa"?hhn():t==="ar"?phn():t==="es"?mhn():t==="hi"?ghn():fhn()}),vhn=()=>"Editing",bhn=()=>"正在编辑",yhn=()=>"در حال ویرایش",xhn=()=>"قيد التعديل",whn=()=>"Editando",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=()=>"Failed",Ehn=()=>"失败",Nhn=()=>"ناموفق",zhn=()=>"فشل",jhn=()=>"Error",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=()=>"Idle",Mhn=()=>"空闲",Ohn=()=>"بی‌کار",Dhn=()=>"خامل",Lhn=()=>"Inactivo",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=()=>"Running",Phn=()=>"运行中",Fhn=()=>"در حال اجرا",Hhn=()=>"قيد التشغيل",qhn=()=>"En ejecución",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()}),Khn=()=>"Starting",Vhn=()=>"正在启动",Whn=()=>"در حال آغاز",Qhn=()=>"جارٍ البدء",Xhn=()=>"Iniciando",Yhn=()=>"शुरू हो रहा है",Zhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vhn():t==="fa"?Whn():t==="ar"?Qhn():t==="es"?Xhn():t==="hi"?Yhn():Khn()}),Jhn=()=>"Copying…",epn=()=>"正在复制…",tpn=()=>"در حال کپی…",npn=()=>"جارٍ النسخ…",rpn=()=>"Copiando…",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=()=>"Finalizing…",opn=()=>"正在完成…",cpn=()=>"در حال نهایی‌سازی…",lpn=()=>"جارٍ الإنهاء…",upn=()=>"Finalizando…",_pn=()=>"अंतिम रूप दिया जा रहा है…",fpn=((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()}),dpn=e=>`${e==null?void 0:e.size} free at target`,hpn=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,ppn=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,mpn=e=>`${e==null?void 0:e.size} متاح في الوجهة`,gpn=e=>`${e==null?void 0:e.size} libres en el destino`,vpn=e=>`गंतव्य पर ${e==null?void 0:e.size} खाली`,bpn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hpn(e):t==="fa"?ppn(e):t==="ar"?mpn(e):t==="es"?gpn(e):t==="hi"?vpn(e):dpn(e)}),ypn=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.`,nhn=e=>`将所有 orx 数据移动到: +The store is copied to the new location and activated there. Active runs or chats will block the move.`,xpn=e=>`将所有 orx 数据移动到: ${e==null?void 0:e.path} -存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,rhn=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ +存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,wpn=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ ${e==null?void 0:e.path} -مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,shn=e=>`نقل كل بيانات orx إلى: +مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,kpn=e=>`نقل كل بيانات orx إلى: ${e==null?void 0:e.path} -يُنسَخ المخزن إلى الموقع الجديد ويُفعَّل هناك. ستمنع عمليات التشغيل أو المحادثات النشطة النقل.`,ihn=e=>`¿Mover todos los datos de orx a esta ubicación? +يُنسَخ المخزن إلى الموقع الجديد ويُفعَّل هناك. ستمنع عمليات التشغيل أو المحادثات النشطة النقل.`,Spn=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.`,ahn=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.`,Cpn=e=>`सारा orx डेटा यहाँ ले जाएं: ${e==null?void 0:e.path} -स्टोर की एक कॉपी नए स्थान पर बनाई जाएगी और वहीं सक्रिय की जाएगी। सक्रिय रन या चैट स्थानांतरण को रोक सकते हैं।`,ohn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nhn(e):t==="fa"?rhn(e):t==="ar"?shn(e):t==="es"?ihn(e):t==="hi"?ahn(e):thn(e)}),chn=()=>"Move data here",lhn=()=>"将数据移动到此处",uhn=()=>"انتقال داده به اینجا",_hn=()=>"نقل البيانات إلى هنا",fhn=()=>"Mover los datos aquí",dhn=()=>"डेटा यहाँ ले जाएं",hhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lhn():t==="fa"?uhn():t==="ar"?_hn():t==="es"?fhn():t==="hi"?dhn():chn()}),phn=()=>"Moving…",mhn=()=>"正在移动…",ghn=()=>"در حال جابه‌جایی…",vhn=()=>"جارٍ النقل…",bhn=()=>"Moviendo…",yhn=()=>"स्थानांतरित हो रहा है…",xhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mhn():t==="fa"?ghn():t==="ar"?vhn():t==="es"?bhn():t==="hi"?yhn():phn()}),whn=()=>"Preparing…",khn=()=>"正在准备…",Shn=()=>"در حال آماده‌سازی…",Chn=()=>"جارٍ التحضير…",Ehn=()=>"Preparando…",Nhn=()=>"तैयार हो रहा है…",zhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?khn():t==="fa"?Shn():t==="ar"?Chn():t==="es"?Ehn():t==="hi"?Nhn():whn()}),jhn=()=>" (same disk, instant)",Ahn=()=>"(同一磁盘,可立即完成)",Thn=()=>" (روی همان دیسک، فوری)",Rhn=()=>" (القرص نفسه، فوري)",Mhn=()=>" (mismo disco, instantáneo)",Ohn=()=>" (उसी डिस्क पर, तुरंत)",Dhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ahn():t==="fa"?Thn():t==="ar"?Rhn():t==="es"?Mhn():t==="hi"?Ohn():jhn()}),Lhn=()=>"default location",Ihn=()=>"默认位置",$hn=()=>"محل پیش‌فرض",Bhn=()=>"الموقع الافتراضي",Phn=()=>"ubicación predeterminada",Fhn=()=>"डिफ़ॉल्ट स्थान",Hhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ihn():t==="fa"?$hn():t==="ar"?Bhn():t==="es"?Phn():t==="hi"?Fhn():Lhn()}),qhn=()=>"ORX_DATA_DIR environment variable",Uhn=()=>"ORX_DATA_DIR 环境变量",Ghn=()=>"متغیر محیطی ORX_DATA_DIR",Vhn=()=>"متغيّر البيئة ORX_DATA_DIR",Khn=()=>"variable de entorno ORX_DATA_DIR",Whn=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",Qhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uhn():t==="fa"?Ghn():t==="ar"?Vhn():t==="es"?Khn():t==="hi"?Whn():qhn()}),Xhn=()=>"your saved setting",Yhn=()=>"已保存的设置",Zhn=()=>"تنظیم ذخیره‌شدهٔ شما",Jhn=()=>"إعدادك المحفوظ",epn=()=>"tu ajuste guardado",tpn=()=>"आपकी सेव की गई सेटिंग",npn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yhn():t==="fa"?Zhn():t==="ar"?Jhn():t==="es"?epn():t==="hi"?tpn():Xhn()}),rpn=()=>"XDG_DATA_HOME",spn=()=>"XDG_DATA_HOME",ipn=()=>"XDG_DATA_HOME",apn=()=>"XDG_DATA_HOME",opn=()=>"XDG_DATA_HOME",cpn=()=>"XDG_DATA_HOME",lpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?spn():t==="fa"?ipn():t==="ar"?apn():t==="es"?opn():t==="hi"?cpn():rpn()}),upn=()=>"Verifying…",_pn=()=>"正在验证…",fpn=()=>"در حال بررسی…",dpn=()=>"جارٍ التحقق…",hpn=()=>"Verificando…",ppn=()=>"सत्यापित हो रहा है…",mpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_pn():t==="fa"?fpn():t==="ar"?dpn():t==="es"?hpn():t==="hi"?ppn():upn()}),gpn=()=>"Loading…",vpn=()=>"正在加载…",bpn=()=>"در حال بارگیری…",ypn=()=>"جارٍ التحميل…",xpn=()=>"Cargando…",wpn=()=>"लोड हो रहा है…",lI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vpn():t==="fa"?bpn():t==="ar"?ypn():t==="es"?xpn():t==="hi"?wpn():gpn()}),kpn=()=>"This sub-agent is no longer available.",Spn=()=>"此子智能体已不可用。",Cpn=()=>"این عامل فرعی دیگر در دسترس نیست.",Epn=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",Npn=()=>"Este subagente ya no está disponible.",zpn=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",jpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Spn():t==="fa"?Cpn():t==="ar"?Epn():t==="es"?Npn():t==="hi"?zpn():kpn()}),Apn=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,Tpn=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,Rpn=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,Mpn=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,Opn=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,Dpn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,Lpn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tpn(e):t==="fa"?Rpn(e):t==="ar"?Mpn(e):t==="es"?Opn(e):t==="hi"?Dpn(e):Apn(e)}),Ipn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,$pn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,Bpn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,Ppn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,Fpn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,Hpn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,qpn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$pn(e):t==="fa"?Bpn(e):t==="ar"?Ppn(e):t==="es"?Fpn(e):t==="hi"?Hpn(e):Ipn(e)}),Upn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",Gpn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",Vpn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",Kpn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",Wpn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",Qpn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",Xpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gpn():t==="fa"?Vpn():t==="ar"?Kpn():t==="es"?Wpn():t==="hi"?Qpn():Upn()}),Ypn=()=>", a repo for training a mini-GPT from scratch.",Zpn=()=>",一个从零训练迷你 GPT 的仓库。",Jpn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",e0n=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",t0n=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",n0n=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",r0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zpn():t==="fa"?Jpn():t==="ar"?e0n():t==="es"?t0n():t==="hi"?n0n():Ypn()}),s0n=()=>"Close",i0n=()=>"关闭",a0n=()=>"بستن",o0n=()=>"إغلاق",c0n=()=>"Cerrar",l0n=()=>"बंद करें",L3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i0n():t==="fa"?a0n():t==="ar"?o0n():t==="es"?c0n():t==="hi"?l0n():s0n()}),u0n=()=>"Create a new project",_0n=()=>"新建项目",f0n=()=>"ایجاد پروژهٔ جدید",d0n=()=>"إنشاء مشروع جديد",h0n=()=>"Crear un proyecto nuevo",p0n=()=>"नया प्रोजेक्ट बनाएं",m0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_0n():t==="fa"?f0n():t==="ar"?d0n():t==="es"?h0n():t==="hi"?p0n():u0n()}),g0n=()=>"Demo project",v0n=()=>"演示项目",b0n=()=>"پروژهٔ نمایشی",y0n=()=>"مشروع توضيحي",x0n=()=>"Proyecto de demostración",w0n=()=>"डेमो प्रोजेक्ट",k0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v0n():t==="fa"?b0n():t==="ar"?y0n():t==="es"?x0n():t==="hi"?w0n():g0n()}),S0n=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",C0n=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",E0n=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",N0n=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",z0n=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",j0n=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",A0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C0n():t==="fa"?E0n():t==="ar"?N0n():t==="es"?z0n():t==="hi"?j0n():S0n()}),T0n=()=>"nanochat",R0n=()=>"nanochat",M0n=()=>"nanochat",O0n=()=>"nanochat",D0n=()=>"nanochat",L0n=()=>"nanochat",I0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R0n():t==="fa"?M0n():t==="ar"?O0n():t==="es"?D0n():t==="hi"?L0n():T0n()}),$0n=()=>"Try the demo experiment",B0n=()=>"试试演示实验",P0n=()=>"آزمایش نمایشی را امتحان کنید",F0n=()=>"جرّب التجربة التوضيحية",H0n=()=>"Probar el experimento de demostración",q0n=()=>"डेमो प्रयोग आज़माएं",U0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B0n():t==="fa"?P0n():t==="ar"?F0n():t==="es"?H0n():t==="hi"?q0n():$0n()}),G0n=()=>"Couldn’t save your progress. Try again.",V0n=()=>"无法保存进度。请重试。",K0n=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",W0n=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",Q0n=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",X0n=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",Y0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V0n():t==="fa"?K0n():t==="ar"?W0n():t==="es"?Q0n():t==="hi"?X0n():G0n()}),Z0n=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",J0n=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",emn=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",tmn=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",nmn=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",rmn=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",smn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J0n():t==="fa"?emn():t==="ar"?tmn():t==="es"?nmn():t==="hi"?rmn():Z0n()}),imn=()=>"Welcome to OpenResearch",amn=()=>"欢迎使用 OpenResearch",omn=()=>"به OpenResearch خوش آمدید",cmn=()=>"مرحبًا بك في OpenResearch",lmn=()=>"Te damos la bienvenida a OpenResearch",umn=()=>"OpenResearch में आपका स्वागत है",_mn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?amn():t==="fa"?omn():t==="ar"?cmn():t==="es"?lmn():t==="hi"?umn():imn()}),fmn=()=>"All experiments are archived. Turn on Show archived to view them.",dmn=()=>"所有实验均已归档。开启“显示已归档”即可查看。",hmn=()=>"همه آزمایش‌ها بایگانی شده‌اند. برای دیدنشان نمایش بایگانی‌شده‌ها را فعال کنید.",pmn=()=>"جميع التجارب مؤرشفة. فعّل إظهار المؤرشف لعرضها.",mmn=()=>"Todos los experimentos están archivados. Activa Mostrar archivados para verlos.",gmn=()=>"सभी प्रयोग संग्रहीत हैं। उन्हें देखने के लिए संग्रहीत दिखाएँ चालू करें।",vmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dmn():t==="fa"?hmn():t==="ar"?pmn():t==="es"?mmn():t==="hi"?gmn():fmn()}),bmn=()=>"Archive ancestors",ymn=()=>"归档祖先节点",xmn=()=>"بایگانی نیاکان",wmn=()=>"أرشفة الأسلاف",kmn=()=>"Archivar antepasados",Smn=()=>"पूर्वजों को संग्रहीत करें",Cmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ymn():t==="fa"?xmn():t==="ar"?wmn():t==="es"?kmn():t==="hi"?Smn():bmn()}),Emn=()=>"Archive descendants",Nmn=()=>"归档后代节点",zmn=()=>"بایگانی نوادگان",jmn=()=>"أرشفة الفروع التابعة",Amn=()=>"Archivar descendientes",Tmn=()=>"वंशजों को संग्रहीत करें",Rmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nmn():t==="fa"?zmn():t==="ar"?jmn():t==="es"?Amn():t==="hi"?Tmn():Emn()}),Mmn=()=>"Manage",Omn=()=>"管理",Dmn=()=>"مدیریت",Lmn=()=>"إدارة",Imn=()=>"Gestionar",$mn=()=>"प्रबंधित करें",Bmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Omn():t==="fa"?Dmn():t==="ar"?Lmn():t==="es"?Imn():t==="hi"?$mn():Mmn()}),Pmn=e=>`Manage ${e==null?void 0:e.name}`,Fmn=e=>`管理 ${e==null?void 0:e.name}`,Hmn=e=>`مدیریت ${e==null?void 0:e.name}`,qmn=e=>`إدارة ${e==null?void 0:e.name}`,Umn=e=>`Gestionar ${e==null?void 0:e.name}`,Gmn=e=>`${e==null?void 0:e.name} प्रबंधित करें`,aj=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Fmn(e):t==="fa"?Hmn(e):t==="ar"?qmn(e):t==="es"?Umn(e):t==="hi"?Gmn(e):Pmn(e)}),Vmn=()=>"Archive this experiment",Kmn=()=>"归档此实验",Wmn=()=>"بایگانی این آزمایش",Qmn=()=>"أرشفة هذه التجربة",Xmn=()=>"Archivar este experimento",Ymn=()=>"इस प्रयोग को संग्रहीत करें",Zmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kmn():t==="fa"?Wmn():t==="ar"?Qmn():t==="es"?Xmn():t==="hi"?Ymn():Vmn()}),Jmn=()=>"Archived",egn=()=>"已归档",tgn=()=>"بایگانی‌شده",ngn=()=>"مؤرشف",rgn=()=>"Archivado",sgn=()=>"संग्रहीत",uI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?egn():t==="fa"?tgn():t==="ar"?ngn():t==="es"?rgn():t==="hi"?sgn():Jmn()}),ign=e=>`${e==null?void 0:e.count} archived`,agn=e=>`${e==null?void 0:e.count} 个已归档`,ogn=e=>`${e==null?void 0:e.count} بایگانی‌شده`,cgn=e=>`${e==null?void 0:e.count} مؤرشفة`,lgn=e=>`${e==null?void 0:e.count} archivados`,ugn=e=>`${e==null?void 0:e.count} संग्रहीत`,_gn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?agn(e):t==="fa"?ogn(e):t==="ar"?cgn(e):t==="es"?lgn(e):t==="hi"?ugn(e):ign(e)}),fgn=()=>"Baseline",dgn=()=>"基线",hgn=()=>"مبنا",pgn=()=>"الأساس",mgn=()=>"Base",ggn=()=>"बेसलाइन",vgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dgn():t==="fa"?hgn():t==="ar"?pgn():t==="es"?mgn():t==="hi"?ggn():fgn()}),bgn=()=>"Experiment",ygn=()=>"实验",xgn=()=>"آزمایش",wgn=()=>"تجربة",kgn=()=>"Experimento",Sgn=()=>"प्रयोग",nl=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ygn():t==="fa"?xgn():t==="ar"?wgn():t==="es"?kgn():t==="hi"?Sgn():bgn()}),Cgn=e=>`${e==null?void 0:e.count} experiments`,Egn=e=>`${e==null?void 0:e.count} 个实验`,Ngn=e=>`${e==null?void 0:e.count} آزمایش`,zgn=e=>`التجارب: ${e==null?void 0:e.count}`,jgn=e=>`${e==null?void 0:e.count} experimentos`,Agn=e=>`${e==null?void 0:e.count} प्रयोग`,Tgn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Egn(e):t==="fa"?Ngn(e):t==="ar"?zgn(e):t==="es"?jgn(e):t==="hi"?Agn(e):Cgn(e)}),Rgn=()=>"hidden",Mgn=()=>"已隐藏",Ogn=()=>"پنهان",Dgn=()=>"مخفية",Lgn=()=>"ocultos",Ign=()=>"छिपे हुए",$gn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mgn():t==="fa"?Ogn():t==="ar"?Dgn():t==="es"?Lgn():t==="hi"?Ign():Rgn()}),Bgn=()=>"1 experiment",Pgn=()=>"1 个实验",Fgn=()=>"۱ آزمایش",Hgn=()=>"تجربة واحدة",qgn=()=>"1 experimento",Ugn=()=>"1 प्रयोग",Ggn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pgn():t==="fa"?Fgn():t==="ar"?Hgn():t==="es"?qgn():t==="hi"?Ugn():Bgn()}),Vgn=()=>"Restore archived ancestors",Kgn=()=>"恢复已归档的祖先节点",Wgn=()=>"بازیابی نیاکان بایگانی‌شده",Qgn=()=>"استعادة الأسلاف المؤرشفين",Xgn=()=>"Restaurar antepasados archivados",Ygn=()=>"संग्रहीत पूर्वजों को पुनर्स्थापित करें",Zgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kgn():t==="fa"?Wgn():t==="ar"?Qgn():t==="es"?Xgn():t==="hi"?Ygn():Vgn()}),Jgn=e=>`Restore ${e==null?void 0:e.count} archived experiments`,e1n=e=>`恢复 ${e==null?void 0:e.count} 个已归档实验`,t1n=e=>`بازیابی ${e==null?void 0:e.count} آزمایش بایگانی‌شده`,n1n=e=>`استعادة ${e==null?void 0:e.count} تجارب مؤرشفة`,r1n=e=>`Restaurar ${e==null?void 0:e.count} experimentos archivados`,s1n=e=>`${e==null?void 0:e.count} संग्रहीत प्रयोग पुनर्स्थापित करें`,i1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?e1n(e):t==="fa"?t1n(e):t==="ar"?n1n(e):t==="es"?r1n(e):t==="hi"?s1n(e):Jgn(e)}),a1n=()=>"Restore descendants",o1n=()=>"恢复后代节点",c1n=()=>"بازیابی نوادگان",l1n=()=>"استعادة الفروع التابعة",u1n=()=>"Restaurar descendientes",_1n=()=>"वंशजों को पुनर्स्थापित करें",f1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o1n():t==="fa"?c1n():t==="ar"?l1n():t==="es"?u1n():t==="hi"?_1n():a1n()}),d1n=()=>"Restore this experiment",h1n=()=>"恢复此实验",p1n=()=>"بازیابی این آزمایش",m1n=()=>"استعادة هذه التجربة",g1n=()=>"Restaurar este experimento",v1n=()=>"इस प्रयोग को पुनर्स्थापित करें",_I=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h1n():t==="fa"?p1n():t==="ar"?m1n():t==="es"?g1n():t==="hi"?v1n():d1n()}),b1n=()=>"Running",y1n=()=>"运行中",x1n=()=>"در حال اجرا",w1n=()=>"قيد التشغيل",k1n=()=>"En ejecución",S1n=()=>"चल रहा है",C1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y1n():t==="fa"?x1n():t==="ar"?w1n():t==="es"?k1n():t==="hi"?S1n():b1n()}),E1n=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",N1n=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",z1n=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",j1n=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",A1n=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",T1n=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",R1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N1n():t==="fa"?z1n():t==="ar"?j1n():t==="es"?A1n():t==="hi"?T1n():E1n()}),M1n=()=>"Ask the agent in chat to create and run your first experiment.",O1n=()=>"在聊天中让智能体创建并运行你的第一个实验。",D1n=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",L1n=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",I1n=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",$1n=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",B1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O1n():t==="fa"?D1n():t==="ar"?L1n():t==="es"?I1n():t==="hi"?$1n():M1n()}),P1n=()=>"Code",F1n=()=>"代码",H1n=()=>"کد",q1n=()=>"الشيفرة",U1n=()=>"Código",G1n=()=>"कोड",V1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F1n():t==="fa"?H1n():t==="ar"?q1n():t==="es"?U1n():t==="hi"?G1n():P1n()}),K1n=()=>"Logs",W1n=()=>"日志",Q1n=()=>"گزارش‌ها",X1n=()=>"السجلات",Y1n=()=>"Logs",Z1n=()=>"लॉग",fI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W1n():t==="fa"?Q1n():t==="ar"?X1n():t==="es"?Y1n():t==="hi"?Z1n():K1n()}),J1n=()=>"No experiments from the current task yet",evn=()=>"当前任务尚无实验",tvn=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",nvn=()=>"لا توجد تجارب من المهمة الحالية بعد",rvn=()=>"Aún no hay experimentos de la tarea actual",svn=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",ivn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?evn():t==="fa"?tvn():t==="ar"?nvn():t==="es"?rvn():t==="hi"?svn():J1n()}),avn=()=>"No experiments yet",ovn=()=>"尚无实验",cvn=()=>"هنوز آزمایشی وجود ندارد",lvn=()=>"لا توجد تجارب بعد",uvn=()=>"Aún no hay experimentos",_vn=()=>"अभी तक कोई प्रयोग नहीं",fvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ovn():t==="fa"?cvn():t==="ar"?lvn():t==="es"?uvn():t==="hi"?_vn():avn()}),dvn=()=>"no runs",hvn=()=>"无运行",pvn=()=>"بدون اجرا",mvn=()=>"لا عمليات تشغيل",gvn=()=>"sin ejecuciones",vvn=()=>"कोई रन नहीं",bvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hvn():t==="fa"?pvn():t==="ar"?mvn():t==="es"?gvn():t==="hi"?vvn():dvn()}),yvn=()=>"Open logs",xvn=()=>"打开日志",wvn=()=>"باز کردن گزارش‌ها",kvn=()=>"فتح السجلات",Svn=()=>"Abrir logs",Cvn=()=>"लॉग खोलें",Evn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xvn():t==="fa"?wvn():t==="ar"?kvn():t==="es"?Svn():t==="hi"?Cvn():yvn()}),Nvn=()=>"Runs",zvn=()=>"运行",jvn=()=>"اجراها",Avn=()=>"عمليات التشغيل",Tvn=()=>"Ejecuciones",Rvn=()=>"रन",Mvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zvn():t==="fa"?jvn():t==="ar"?Avn():t==="es"?Tvn():t==="hi"?Rvn():Nvn()}),Ovn=()=>"Switch to Entire project to see all experiments",Dvn=()=>"切换到“整个项目”以查看所有实验",Lvn=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",Ivn=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",$vn=()=>"Cambia a Todo el proyecto para ver todos los experimentos",Bvn=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",Pvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dvn():t==="fa"?Lvn():t==="ar"?Ivn():t==="es"?$vn():t==="hi"?Bvn():Ovn()}),Fvn=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,Hvn=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,qvn=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,Uvn=e=>`تم التحديث إلى ${e==null?void 0:e.version}. أعد التشغيل لاستخدامه.`,Gvn=e=>`Actualizado a la versión ${e==null?void 0:e.version}. Reinicia para usarla.`,Vvn=e=>`${e==null?void 0:e.version} पर अपडेट हुआ। इस्तेमाल के लिए फिर से शुरू करें।`,Kvn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hvn(e):t==="fa"?qvn(e):t==="ar"?Uvn(e):t==="es"?Gvn(e):t==="hi"?Vvn(e):Fvn(e)}),Wvn=()=>"Dismiss",Qvn=()=>"关闭",Xvn=()=>"بستن",Yvn=()=>"تجاهل",Zvn=()=>"Descartar",Jvn=()=>"खारिज करें",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=()=>"Restart now",nbn=()=>"立即重新启动",rbn=()=>"هم‌اکنون دوباره راه‌اندازی کن",sbn=()=>"أعد التشغيل الآن",ibn=()=>"Reiniciar ahora",abn=()=>"अभी फिर से शुरू करें",dI=((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()}),obn=e=>`Could not restart: ${e==null?void 0:e.error}`,cbn=e=>`无法重新启动:${e==null?void 0:e.error}`,lbn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,ubn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,_bn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,fbn=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,hI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cbn(e):t==="fa"?lbn(e):t==="ar"?ubn(e):t==="es"?_bn(e):t==="hi"?fbn(e):obn(e)}),dbn=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",hbn=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",pbn=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",mbn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",gbn=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",vbn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",bbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hbn():t==="fa"?pbn():t==="ar"?mbn():t==="es"?gbn():t==="hi"?vbn():dbn()}),ybn=()=>"Restarting…",xbn=()=>"正在重新启动…",wbn=()=>"در حال راه‌اندازی مجدد…",kbn=()=>"جارٍ إعادة التشغيل…",Sbn=()=>"Reiniciando…",Cbn=()=>"फिर से शुरू हो रहा है…",pI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xbn():t==="fa"?wbn():t==="ar"?kbn():t==="es"?Sbn():t==="hi"?Cbn():ybn()}),Ebn=()=>"macOS app",Nbn=()=>"macOS 应用",zbn=()=>"برنامهٔ macOS",jbn=()=>"تطبيق macOS",Abn=()=>"App de macOS",Tbn=()=>"macOS ऐप",Rbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nbn():t==="fa"?zbn():t==="ar"?jbn():t==="es"?Abn():t==="hi"?Tbn():Ebn()}),Mbn=()=>"Linux app (AppImage)",Obn=()=>"Linux 应用(AppImage)",Dbn=()=>"برنامه لینوکس (AppImage)",Lbn=()=>"تطبيق Linux ‏(AppImage)",Ibn=()=>"Aplicación para Linux (AppImage)",$bn=()=>"Linux ऐप (AppImage)",Bbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Obn():t==="fa"?Dbn():t==="ar"?Lbn():t==="es"?Ibn():t==="hi"?$bn():Mbn()}),Pbn=()=>"Installed with cargo",Fbn=()=>"通过 cargo 安装",Hbn=()=>"نصب‌شده با cargo",qbn=()=>"مثبّت عبر cargo",Ubn=()=>"Instalado con cargo",Gbn=()=>"cargo से इंस्टॉल किया गया",Vbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fbn():t==="fa"?Hbn():t==="ar"?qbn():t==="es"?Ubn():t==="hi"?Gbn():Pbn()}),Kbn=()=>"Installed with Homebrew",Wbn=()=>"通过 Homebrew 安装",Qbn=()=>"نصب‌شده با Homebrew",Xbn=()=>"مثبّت عبر Homebrew",Ybn=()=>"Instalado con Homebrew",Zbn=()=>"Homebrew से इंस्टॉल किया गया",Jbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wbn():t==="fa"?Qbn():t==="ar"?Xbn():t==="es"?Ybn():t==="hi"?Zbn():Kbn()}),eyn=()=>"Installed with the orx installer",tyn=()=>"通过 orx 安装程序安装",nyn=()=>"نصب‌شده با نصب‌کنندهٔ orx",ryn=()=>"مثبّت عبر مُثبّت orx",syn=()=>"Instalado con el instalador de orx",iyn=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",ayn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tyn():t==="fa"?nyn():t==="ar"?ryn():t==="es"?syn():t==="hi"?iyn():eyn()}),oyn=()=>"Managed by Nix",cyn=()=>"由 Nix 管理",lyn=()=>"مدیریت‌شده با Nix",uyn=()=>"مُدار بواسطة Nix",_yn=()=>"Gestionado por Nix",fyn=()=>"Nix द्वारा प्रबंधित",dyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cyn():t==="fa"?lyn():t==="ar"?uyn():t==="es"?_yn():t==="hi"?fyn():oyn()}),hyn=()=>"Portable orx.exe",pyn=()=>"便携版 orx.exe",myn=()=>"orx.exe قابل‌حمل",gyn=()=>"‏orx.exe المحمول",vyn=()=>"orx.exe portable",byn=()=>"पोर्टेबल orx.exe",yyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pyn():t==="fa"?myn():t==="ar"?gyn():t==="es"?vyn():t==="hi"?byn():hyn()}),xyn=()=>"Unknown install",wyn=()=>"未知安装方式",kyn=()=>"روش نصب نامشخص",Syn=()=>"تثبيت غير معروف",Cyn=()=>"Instalación desconocida",Eyn=()=>"अज्ञात इंस्टॉल",Nyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wyn():t==="fa"?kyn():t==="ar"?Syn():t==="es"?Cyn():t==="hi"?Eyn():xyn()}),zyn=()=>"Re-run your cargo install to update.",jyn=()=>"重新运行 cargo 安装命令以更新。",Ayn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",Tyn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",Ryn=()=>"Vuelve a ejecutar cargo install para actualizar.",Myn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",Oyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jyn():t==="fa"?Ayn():t==="ar"?Tyn():t==="es"?Ryn():t==="hi"?Myn():zyn()}),Dyn=()=>"Run brew upgrade to update.",Lyn=()=>"运行 brew upgrade 以更新。",Iyn=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",$yn=()=>"نفّذ brew upgrade للتحديث.",Byn=()=>"Ejecuta brew upgrade para actualizar.",Pyn=()=>"अपडेट करने के लिए brew upgrade चलाएं।",Fyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lyn():t==="fa"?Iyn():t==="ar"?$yn():t==="es"?Byn():t==="hi"?Pyn():Dyn()}),Hyn=()=>"Update it through your Nix configuration.",qyn=()=>"通过 Nix 配置进行更新。",Uyn=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Gyn=()=>"حدّثه عبر إعداد Nix الخاص بك.",Vyn=()=>"Actualízalo desde tu configuración de Nix.",Kyn=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",Wyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qyn():t==="fa"?Uyn():t==="ar"?Gyn():t==="es"?Vyn():t==="hi"?Kyn():Hyn()}),Qyn=()=>"Close",Xyn=()=>"关闭",Yyn=()=>"بستن",Zyn=()=>"إغلاق",Jyn=()=>"Cerrar",exn=()=>"बंद करें",txn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xyn():t==="fa"?Yyn():t==="ar"?Zyn():t==="es"?Jyn():t==="hi"?exn():Qyn()}),nxn=()=>"Maximize",rxn=()=>"最大化",sxn=()=>"بزرگ کردن",ixn=()=>"تكبير",axn=()=>"Maximizar",oxn=()=>"बड़ा करें",cxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rxn():t==="fa"?sxn():t==="ar"?ixn():t==="es"?axn():t==="hi"?oxn():nxn()}),lxn=()=>"Minimize",uxn=()=>"最小化",_xn=()=>"کوچک کردن",fxn=()=>"تصغير",dxn=()=>"Minimizar",hxn=()=>"छोटा करें",pxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uxn():t==="fa"?_xn():t==="ar"?fxn():t==="es"?dxn():t==="hi"?hxn():lxn()}),mxn=()=>"Restore",gxn=()=>"还原",vxn=()=>"بازیابی",bxn=()=>"استعادة",yxn=()=>"Restaurar",xxn=()=>"पुनर्स्थापित करें",wxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gxn():t==="fa"?vxn():t==="ar"?bxn():t==="es"?yxn():t==="hi"?xxn():mxn()}),kxn=()=>"Active Experiments",Sxn=()=>"活跃实验",Cxn=()=>"آزمایش‌های فعال",Exn=()=>"التجارب النشطة",Nxn=()=>"Experimentos activos",zxn=()=>"सक्रिय प्रयोग",jxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sxn():t==="fa"?Cxn():t==="ar"?Exn():t==="es"?Nxn():t==="hi"?zxn():kxn()}),Axn=()=>"Default compute",Txn=()=>"默认计算目标",Rxn=()=>"محاسبات پیش‌فرض",Mxn=()=>"الحوسبة الافتراضية",Oxn=()=>"Cómputo predeterminado",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=()=>"More tools",$xn=()=>"更多工具",Bxn=()=>"ابزارهای بیشتر",Pxn=()=>"مزيد من الأدوات",Fxn=()=>"Más herramientas",Hxn=()=>"और टूल",oj=((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()}),qxn=()=>"Terminal",Uxn=()=>"终端",Gxn=()=>"ترمینال",Vxn=()=>"الطرفية",Kxn=()=>"Terminal",Wxn=()=>"टर्मिनल",Pv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uxn():t==="fa"?Gxn():t==="ar"?Vxn():t==="es"?Kxn():t==="hi"?Wxn():qxn()}),Qxn=()=>"The terminal disconnected.",Xxn=()=>"终端连接已断开。",Yxn=()=>"ارتباط ترمینال قطع شد.",Zxn=()=>"انقطعت الطرفية.",Jxn=()=>"La terminal se desconectó.",e2n=()=>"टर्मिनल डिस्कनेक्ट हो गया।",cj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xxn():t==="fa"?Yxn():t==="ar"?Zxn():t==="es"?Jxn():t==="hi"?e2n():Qxn()}),t2n=e=>`Shell exited with code ${e==null?void 0:e.code}.`,n2n=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,r2n=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,s2n=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,i2n=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,a2n=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,o2n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?n2n(e):t==="fa"?r2n(e):t==="ar"?s2n(e):t==="es"?i2n(e):t==="hi"?a2n(e):t2n(e)}),c2n=()=>"Restart shell",l2n=()=>"重新启动 Shell",u2n=()=>"راه‌اندازی دوباره پوسته",_2n=()=>"إعادة تشغيل Shell",f2n=()=>"Reiniciar shell",d2n=()=>"शेल फिर से शुरू करें",h2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l2n():t==="fa"?u2n():t==="ar"?_2n():t==="es"?f2n():t==="hi"?d2n():c2n()}),p2n=()=>"This worktree",m2n=()=>"当前工作树",g2n=()=>"این درخت کاری",v2n=()=>"شجرة العمل هذه",b2n=()=>"Este árbol de trabajo",y2n=()=>"यह वर्कट्री",x2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m2n():t==="fa"?g2n():t==="ar"?v2n():t==="es"?b2n():t==="hi"?y2n():p2n()}),w2n=()=>"Workspace",k2n=()=>"工作区",S2n=()=>"فضای کاری",C2n=()=>"مساحة العمل",E2n=()=>"Espacio de trabajo",N2n=()=>"वर्कस्पेस",hw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k2n():t==="fa"?S2n():t==="ar"?C2n():t==="es"?E2n():t==="hi"?N2n():w2n()}),z2n=e=>`Current worktree · ${e==null?void 0:e.branch}`,j2n=e=>`当前工作树 · ${e==null?void 0:e.branch}`,A2n=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,T2n=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,R2n=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,M2n=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,O2n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?j2n(e):t==="fa"?A2n(e):t==="ar"?T2n(e):t==="es"?R2n(e):t==="hi"?M2n(e):z2n(e)}),D2n=e=>`Default branch · ${e==null?void 0:e.branch}`,L2n=e=>`默认分支 · ${e==null?void 0:e.branch}`,I2n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,$2n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,B2n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,P2n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,F2n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?L2n(e):t==="fa"?I2n(e):t==="ar"?$2n(e):t==="es"?B2n(e):t==="hi"?P2n(e):D2n(e)}),H2n=e=>`detached at ${e==null?void 0:e.branch}`,q2n=e=>`分离于 ${e==null?void 0:e.branch}`,U2n=e=>`جدا در ${e==null?void 0:e.branch}`,G2n=e=>`منفصل عند ${e==null?void 0:e.branch}`,V2n=e=>`desacoplado en ${e==null?void 0:e.branch}`,K2n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,W2n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?q2n(e):t==="fa"?U2n(e):t==="ar"?G2n(e):t==="es"?V2n(e):t==="hi"?K2n(e):H2n(e)}),Q2n=()=>"Listing truncated.",X2n=()=>"列表已截断。",Y2n=()=>"فهرست کوتاه شده است.",Z2n=()=>"القائمة مقتطعة.",J2n=()=>"Listado truncado.",ewn=()=>"सूची छोटी की गई।",twn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X2n():t==="fa"?Y2n():t==="ar"?Z2n():t==="es"?J2n():t==="hi"?ewn():Q2n()}),nwn=()=>"Loading…",rwn=()=>"正在加载…",swn=()=>"در حال بارگیری…",iwn=()=>"جارٍ التحميل…",awn=()=>"Cargando…",own=()=>"लोड हो रहा है…",cwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rwn():t==="fa"?swn():t==="ar"?iwn():t==="es"?awn():t==="hi"?own():nwn()}),lwn=()=>"No changes yet.",uwn=()=>"尚无更改。",_wn=()=>"هنوز تغییری وجود ندارد.",fwn=()=>"لا توجد تغييرات بعد.",dwn=()=>"Aún no hay cambios.",hwn=()=>"अभी तक कोई बदलाव नहीं।",pwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uwn():t==="fa"?_wn():t==="ar"?fwn():t==="es"?dwn():t==="hi"?hwn():lwn()}),mwn=()=>"No files.",gwn=()=>"没有文件。",vwn=()=>"فایلی وجود ندارد.",bwn=()=>"لا توجد ملفات.",ywn=()=>"No hay archivos.",xwn=()=>"कोई फ़ाइल नहीं।",wwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gwn():t==="fa"?vwn():t==="ar"?bwn():t==="es"?ywn():t==="hi"?xwn():mwn()}),kwn=()=>"Refresh failed:",Swn=()=>"刷新失败:",Cwn=()=>"تازه‌سازی ناموفق بود:",Ewn=()=>"فشل التحديث:",Nwn=()=>"Error al actualizar:",zwn=()=>"रीफ़्रेश विफल:",jwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Swn():t==="fa"?Cwn():t==="ar"?Ewn():t==="es"?Nwn():t==="hi"?zwn():kwn()}),Ce=e=>`⁦${e}⁩`,ua=e=>`⁨${e}⁩`,Zt=e=>new Intl.NumberFormat(E()).format(e),Kp="demo_nanochat_v1",Vo=e=>e.startsWith("demo_"),Yd="chat_demo_nanochat_v1",Fb="chat_demo_nanochat_figures_v1",Hb="chat_demo_nanochat_literature_v1",Awn={[Yd]:"cpu_end_to_end",[Fb]:"figures",[Hb]:"literature"},pw="cpu-apple-silicon-pipeline-results.md",Twn={[Yd]:"msg_demo_nanochat_assistant_v1",[Fb]:"msg_demo_nanochat_figures_assistant_v1",[Hb]:"msg_demo_nanochat_literature_assistant_v1"},lj="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 I3 extends Error{constructor(t,r,s){super(t);Ys(this,"currentVersion");Ys(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function ha(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}function Rwn(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 mI(e){return[...e].sort((t,r)=>r.createdAt-t.createdAt).map(Rwn).find(t=>t!==null)??null}const gI=new WeakMap;async function wi(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 I3(s,a,i.exists)}}catch(i){if(i instanceof I3)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=gI.get(e);if(t&&!Gn(t))throw new DOMException("Workspace changed","AbortError");return n}const Lt=(e,n)=>fetch(e,{signal:n}).then(t=>wi(t));async function Sa(e,n){const t=Ga(),r=await fetch(e,n);if(!Gn(t))throw new DOMException("Workspace changed","AbortError");return gI.set(r,t),r.ok&&QQ(e,t),r}const vt=(e,n,t=!1)=>Sa(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>wi(r)),wl=(e,n)=>Sa(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>wi(t)),vI=(e,n)=>Sa(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>wi(t)),Mwn=e=>Lt("/api/projects",e).then(n=>n.projects),Own=e=>Lt("/api/projects/activity",e).then(n=>n.activity),$3="agentic",Dwn=e=>Lt("/api/settings/ui-state",e),Lwn=(e,n)=>Lt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),Iwn=(e,n,t=!1)=>vt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),$wn=(e,n=!1)=>vt("/api/settings/ui-state",{workspace:e},n),Bwn=e=>vt("/api/settings/ui-state",e),Pwn=(e,n)=>vt("/api/onboarding/complete",{...e,...n}),Fwn=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return Lt(`/api/project-path/status${t}`,n)},Hwn=()=>vt("/api/project-path/pick").then(e=>e.path),qwn=e=>vt("/api/projects",e),Uwn=(e,n)=>Lt(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),Gwn=e=>Lt("/api/github/account",e),Vwn=(e,n)=>Lt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),Kwn=(e,n,t)=>Lt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),Wwn=(e,n)=>Lt(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),Qwn=e=>vt("/api/projects/starter-prompts/prewarm",e),Xwn=(e,n,t,r,s)=>Lt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),Ywn=e=>vt(`/api/projects/${e}/open`).then(n=>n.project),Zwn=e=>Sa(`/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})`)}KQ(e)}),Jwn=(e,n)=>Lt(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),e4n=(e,n,t)=>wl(`/api/experiments/${e}/archive`,{direction:n,archived:t}),t4n=(e,n)=>Lt(`/api/projects/${e}/runs`,n).then(t=>t.runs),bI=e=>vt(`/api/runs/${e}/cancel`).then(()=>{}),n4n=(e,n)=>Lt(`/api/runs/${e}/log?offset=${n}`),r4n=(e,n)=>Lt(`/api/runs/${e}/diff`,n),s4n=(e,n)=>Lt(`/api/experiments/${e}/diff`,n),Xu=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),i4n=(e,n,t={},r)=>Lt(`/api/projects/${e}/file?${Xu(t,new URLSearchParams({path:n}))}`,r),B3=(e,n,t={})=>`/api/projects/${e}/file/raw?${Xu(t,new URLSearchParams({path:n}))}`,a4n=(e,n)=>Lt(`/api/files/abs?path=${encodeURIComponent(e)}`,n),yI=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,o4n=(e,n,t,r)=>vI(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),c4n=(e,n,t,r={})=>wl(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),l4n=(e,n,t={})=>vt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),u4n=(e,n,t={})=>vt(`/api/projects/${e}/file/reveal`,{path:n,sessionId:t.sessionId}),_4n=e=>Lt("/api/latex/engine",e),f4n=(e,n,t={})=>vt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),d4n=e=>Lt("/api/overleaf/settings",e),xI=e=>vt("/api/overleaf/token",{token:e}),h4n=()=>Sa("/api/overleaf/token",{method:"DELETE"}).then(e=>wi(e)),wI=(e,n={})=>vt("/api/overleaf/session",{session:e,host:n.host}),p4n=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>wi(e)),m4n=(e={})=>vt("/api/overleaf/session/import",{host:e.host}),g4n=(e,n,t={})=>vt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),v4n=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${Xu(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>wi(r)),b4n=(e,n,t={},r)=>Lt(`/api/projects/${e}/file/overleaf?${Xu(t,new URLSearchParams({path:n}))}`,r),y4n=(e,n,t)=>vt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),x4n=(e,n,t={})=>Sa(`/api/projects/${e}/file/overleaf?${Xu(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>wi(r)),w4n=(e,n,t={})=>vt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),k4n=(e,n,t={},r)=>Lt(`/api/projects/${e}/file/overleaf/status?${Xu(t,new URLSearchParams({path:n}))}`,r),S4n=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Xu(t,new URLSearchParams({path:n}))}`,C4n=(e,n={},t)=>{const r=Xu(n).toString();return Lt(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},E4n=(e,n)=>Lt(`/api/chat/sessions/${e}/worktree`,n),qb=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,N4n=e=>Lt("/api/settings/hf",e),z4n=e=>vt("/api/settings/hf",{token:e}),j4n=e=>Lt("/api/settings/tinker",e),A4n=e=>vt("/api/settings/tinker",{key:e}),T4n=e=>Lt("/api/update",e),R4n=()=>vt("/api/update/apply"),M4n=()=>vt("/api/update/restart"),O4n=e=>vt("/api/update/auto",{enabled:e}),D4n=(e=!1)=>vt("/api/update/install-cli",{force:e}),L4n=e=>Lt("/api/settings/k8s",e),I4n=e=>vt("/api/settings/k8s",e),$4n=e=>Lt("/api/settings/modal",e),B4n=(e,n)=>vt("/api/settings/modal",{tokenId:e,tokenSecret:n}),P4n=e=>Lt("/api/settings/env",e).then(n=>n.vars),kI=(e,n)=>vt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),F4n=e=>Sa(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n)).then(n=>n.vars),H4n=e=>Lt("/api/settings/data-dir",e),q4n=e=>vt("/api/settings/data-dir/validate",{path:e}),U4n=e=>vt("/api/settings/data-dir/move",{path:e}),G4n=e=>Lt("/api/settings/ssh",e),V4n=e=>vt("/api/settings/ssh",e),K4n=e=>vt("/api/settings/ssh/default",{host:e}),W4n=(e,n)=>vt("/api/settings/ssh/preflight",{host:e,container:n}),Q4n=e=>Lt("/api/settings/ssh/config",e),X4n=(e,n)=>vI("/api/settings/ssh/config",{content:e,previousContent:n}),Y4n=(e,n)=>Lt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),Z4n=e=>Lt("/_orx/runtime",e),J4n=e=>Lt("/api/remote/sessions",e).then(n=>n.sessions),e3n=(e,n)=>vt("/api/remote/sessions",{host:e,uiPreferences:n}),t3n=e=>vt("/_orx/install",e),n3n=()=>vt("/_orx/reconnect"),SI=()=>vt("/_orx/disconnect"),r3n=()=>vt("/_orx/start-host"),CI=()=>Lt("/_orx/stop-host"),EI=e=>vt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),s3n=e=>Lt("/api/settings/slurm",e),i3n=e=>vt("/api/settings/slurm",e),a3n=e=>Lt("/api/settings/ray",e),o3n=e=>vt("/api/settings/ray",e),c3n=e=>vt("/api/settings/ray/preflight",{address:e??null}),l3n=(e,n)=>Lt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),u3n=e=>vt("/api/settings/compute/default",e),_3n=e=>Lt("/api/settings/local",e),f3n=e=>Lt("/api/settings/openresearch",e),d3n=(e,n)=>Lt(`/api/projects/${e}/files`,n),h3n=(e,n)=>Sa(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>wi(t)),p3n=(e,n,t)=>wl(`/api/projects/${e}/files`,{path:n,...t}),hf=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,NI=512e3,m3n=(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}}},g3n=(e,n,t)=>fetch(hf(e,n),{signal:t,headers:{Range:`bytes=0-${NI-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=>m3n(a,Number.isFinite(s)&&s>a.byteLength))}),v3n=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",b3n=(e,n,t)=>fetch(hf(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:v3n(s)?s:"download"}}),y3n=e=>Lt("/api/settings/profile",e),x3n=e=>Lt("/api/settings/lit-sources",e),w3n=e=>vt("/api/settings/lit-sources",e),k3n=e=>Lt("/api/settings/projects",e),zI=(e,n)=>vt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),S3n=(e,n)=>Lt(`/api/projects/${e}/git`,n),C3n=e=>vt(`/api/projects/${e}/git/init`),E3n=e=>vt(`/api/projects/${e}/github`),N3n=e=>vt(`/api/projects/${e}/github/disable`),z3n=e=>Lt("/api/settings/telemetry",e),j3n=e=>vt("/api/settings/telemetry",{enabled:e}),bu=e=>{vt("/api/telemetry/event",e).catch(()=>{})},jI=e=>{vt("/api/telemetry/locale",{locale:e}).catch(()=>{})};function nv(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??F3(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"?pS():n,r=F3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${r} · ${t}`:r}const Fv="default";function Ub(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===Fv)?Fv:((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 P3="default";function AI(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:P3,label:czt(),description:tzt()},...t]:[]}function Hv(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=AI(e,n);return s.length===0?P3:t!=null&&s.some(a=>a.id===t)?t:P3}function TI(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Ub(e,n);return r.length===0?Fv:t&&r.some(i=>i.id===t)?t:s}const A3n=e=>Lt("/api/harnesses/setup/commands",e),RI=(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)},T3n=(e,n,t)=>{const r=new URLSearchParams({...n?{harness:n}:{},...t?{project:t}:{}});return Lt(`/api/skills${r.size?`?${r}`:""}`,e)},R3n=(e,n,t,r)=>Lt(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...n?{project:n}:{},...r?{harness:r}:{}})}`}`,t).then(s=>s.content),M3n=e=>Lt("/api/latex-templates",e).then(n=>n.templates),O3n=e=>vt("/api/latex-templates",e).then(n=>n.template),D3n=e=>Sa(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n)),L3n=e=>Lt("/api/user-skills",e),I3n=e=>vt("/api/user-skills",e).then(n=>n.skill),$3n=e=>Sa(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n));function F3(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 B3n=(e,n)=>Lt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),P3n=e=>Lt("/api/chat/native-sessions",e).then(n=>n.chats),F3n=(e,n)=>vt("/api/chat/native-sessions/import",{projectId:e,harness:n.harness,nativeId:n.nativeId,title:n.title}).then(t=>t.session),H3n=e=>Lt("/api/chat/sessions?scope=all",e).then(n=>n.sessions),q3n=(e,n,t={})=>vt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),H3=e=>Sa(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>wi(n).then(t=>(Bb(e),t))),U3n=(e,n)=>wl(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),G3n=(e,n)=>wl(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),V3n=(e,n)=>wl(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),K3n=e=>vt(`/api/chat/sessions/${e}/side`,{}).then(n=>n.session),W3n=(e,n)=>wl(`/api/chat/sessions/${e}`,{goal:n}).then(t=>t.session),Q3n=(e,n)=>wl(`/api/chat/sessions/${e}`,{autonomy:n}).then(t=>t.session),X3n=(e,n)=>wl(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),Y3n=(e,n)=>Lt(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),Z3n=(e,n)=>Sa(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>wi(t)),J3n=(e,n)=>vt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),e5n=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,q3=(e,n,t={},r,s,i,a)=>vt(`/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}),t5n=e=>vt(`/api/chat/sessions/${e}/compact`,{}),n5n=(e,n)=>vt(`/api/chat/sessions/${e}/shell`,{command:n}),r5n=(e,n,t,r={})=>vt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),s5n=(e,n,t)=>vt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),i5n=(e,n)=>vt(`/api/chat/sessions/${e}/branch`,{leafId:n}),a5n=e=>vt(`/api/chat/sessions/${e}/interrupt`),o5n=(e,n)=>vt(`/api/chat/sessions/${e}/respond`,n);function yo(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 I0(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return dDe({value:Zt(n)});const t=Math.floor(n/60);if(t<60)return aDe({value:Zt(t)});const r=Math.floor(t/60);return r<24?JOe({hours:Zt(r),minutes:Zt(t%60)}):VOe({days:Zt(Math.floor(r/24)),hours:Zt(r%24)})}function ul(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&rLt("/api/local-models",e),u5n=e=>vt("/api/local-models/discover",e),_5n=e=>vt("/api/local-models",e),f5n=e=>vt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),d5n=e=>Sa(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n)),uj=()=>({queryKey:zt("getHfSettings"),queryFn:({signal:e})=>N4n(e),staleTime:3e5}),_j=()=>({queryKey:zt("getTinkerSettings"),queryFn:({signal:e})=>j4n(e),staleTime:3e5}),fj=()=>({queryKey:zt("getK8sSettings"),queryFn:({signal:e})=>L4n(e),staleTime:3e4}),dj=()=>({queryKey:zt("getModalSettings"),queryFn:({signal:e})=>$4n(e),staleTime:3e5}),h5n=()=>({queryKey:zt("getSlurmSettings"),queryFn:({signal:e})=>s3n(e),staleTime:3e5}),p5n=()=>({queryKey:zt("getRaySettings"),queryFn:({signal:e})=>a3n(e),staleTime:3e5}),MI=e=>({queryKey:zt("getComputeSettings",e??null),queryFn:({signal:n})=>l3n(e,n),staleTime:3e4}),m5n=()=>({queryKey:zt("getLocalMachine"),queryFn:({signal:e})=>_3n(e),staleTime:3e5}),g5n=()=>({queryKey:zt("getOpenResearchSettings"),queryFn:({signal:e})=>f3n(e),staleTime:3e4}),v5n=()=>({queryKey:zt("getEnvVars"),queryFn:({signal:e})=>P4n(e),staleTime:3e5}),b5n=()=>({queryKey:zt("getDataDir"),queryFn:({signal:e})=>H4n(e),staleTime:3e5}),OI=()=>({queryKey:zt("getSshSettings"),queryFn:({signal:e})=>G4n(e),staleTime:3e4}),y5n=()=>({queryKey:zt("getSshConfig"),queryFn:({signal:e})=>Q4n(e),staleTime:3e5}),hj=e=>({queryKey:zt("getSshMasterStatus",e),queryFn:({signal:n})=>Y4n(e,n),staleTime:5e3}),x5n=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>Z4n(e),staleTime:2e3}),w5n=()=>({queryKey:zt("listRemoteSessions"),queryFn:({signal:e})=>J4n(e),staleTime:3e4}),qv=()=>({queryKey:zt("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>Kh(n,t,()=>T4n(e)),staleTime:3e4}),k5n=()=>({queryKey:zt("getProfile"),queryFn:({signal:e})=>y3n(e),staleTime:3e5}),S5n=()=>({queryKey:zt("getLitSources"),queryFn:({signal:e})=>x3n(e),staleTime:3e5}),ES=()=>({queryKey:zt("getProjectDefaults"),queryFn:({signal:e})=>k3n(e),staleTime:3e5}),C5n=e=>({queryKey:zt("getProjectGitStatus",e),queryFn:({signal:n})=>S3n(e,n),staleTime:3e4}),E5n=()=>({queryKey:zt("getTelemetry"),queryFn:({signal:e})=>z3n(e),staleTime:3e5}),DI=()=>({queryKey:zt("getHarnessSetupCommands"),queryFn:({signal:e})=>A3n(e),staleTime:1/0}),Pu=()=>({queryKey:zt("getHarnesses"),queryFn:({signal:e})=>RI(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),N5n=(e,n)=>({queryKey:zt("getSkills",e??null,n??null),queryFn:({signal:t})=>T3n(t,e,n),select:t=>t.skills,refetchInterval:t=>{var r;return(r=t.state.data)!=null&&r.importing?2e3:3e4},staleTime:3e5}),z5n=(e,n,t)=>({queryKey:zt("getSkillContent",e,n??null,t??null),queryFn:({signal:r})=>R3n(e,n,r,t),staleTime:3e5}),j5n=()=>({queryKey:zt("listLatexTemplates"),queryFn:({signal:e})=>M3n(e),refetchInterval:3e4,staleTime:3e5}),A5n=()=>({queryKey:zt("listUserSkills"),queryFn:({signal:e})=>L3n(e),select:e=>e.skills,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5});async function pf(e=!1,n=!1){const t=Pu();if(!e&&!n)return et.fetchQuery(t);await et.cancelQueries(t);const r=await RI(e,n);return Gn(t.queryKey)&&et.setQueryData(t.queryKey,r),r}const T5n=()=>({queryKey:zt("getLocalModels"),queryFn:({signal:e})=>l5n(e),staleTime:3e4}),Gi=e=>({queryKey:zt("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>Kh(t,r,async()=>{const s=await B3n(e,n),i=t.getQueryData(r);return s.filter(a=>!vl.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)}})},jm),staleTime:3e4}),LI=()=>({queryKey:zt("listNativeChats"),queryFn:({signal:e})=>P3n(e),staleTime:0}),R5n=()=>({queryKey:zt("listAllChatSessions"),queryFn:async({signal:e})=>(await H3n(e)).filter(n=>!vl.has(n.id)),staleTime:0}),ic=e=>({queryKey:zt("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var h;const s=t.getQueryData(r),i=await Kh(t,r,()=>Y3n(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:jm(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||!((h=a.activeLeafId)!=null&&h.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),sf="local-",II="bash";function pj(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(sf)),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(sf),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:pj(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:`${sf}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:II,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?pj(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:`${sf}${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 $I=0;function BI(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}et.getQueryCache().subscribe(e=>{BI(e)&&$I++});const O5n=e=>et.getQueryCache().subscribe(n=>{BI(n)&&e()}),D5n=()=>$I;function L5n(e,n){const t=et.getQueryData(Gi(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=et.getQueryData(ic(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function PI(e,n,t=!1){if(n.type==="busy"){lo(et,Gi(e).queryKey,n.sessionId),et.setQueryData(Gi(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=ic(n.sessionId);if(vl.has(n.sessionId))return;lo(et,r.queryKey,n.type==="upsertMessage"?`message:${n.message.id}`:n.type==="setQueued"?"queued":n.type==="activeLeaf"?"branch":"local");const s=et.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};et.setQueryData(r.queryKey,o)}function I5n(e,n){const t=!!n&&!vl.has(n??""),r=_t({...ic(n??""),enabled:t,subscribed:t}),s=T.useSyncExternalStore(O5n,D5n),i=T.useMemo(()=>L5n(e,n),[e,n,s]),a=Ga()[1],o=T.useCallback(c=>{Gn(["workspace",a])&&PI(e,c)},[e,a]);return[i,o,r]}const rv=new Map;function $5n(e,n){let t=rv.get(e);return t||(t=new Set,rv.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&rv.delete(e)}}function B5n(e){var n;(n=rv.get(e.runId))==null||n.forEach(t=>t(e))}const U3=new Set;function Uv(e){return U3.add(e),()=>{U3.delete(e)}}function Qc(e){U3.forEach(n=>n(e))}const G3=new Set;function P5n(e){return G3.add(e),()=>{G3.delete(e)}}function Xc(){G3.forEach(e=>e())}const V3=new Set;function F5n(e){return V3.add(e),()=>{V3.delete(e)}}const K3=new Set;function H5n(e){return K3.add(e),()=>{K3.delete(e)}}function q5n(){K3.forEach(e=>e())}function mj(e){V3.forEach(n=>n(e))}const W3=new Set;function FI(e){return W3.add(e),()=>{W3.delete(e)}}function mw(e){W3.forEach(n=>n(e))}const Q3=new Set;function U5n(e){return Q3.add(e),()=>{Q3.delete(e)}}function gj(e){Q3.forEach(n=>n(e))}const X3=new Set;function G5n(e){return X3.add(e),()=>{X3.delete(e)}}function V5n(e){X3.forEach(n=>n(e))}let Y3=!0;const Z3=new Set;function K5n(e){return Z3.add(e),()=>{Z3.delete(e)}}function vj(){return Y3}function bj(e){e!==Y3&&(Y3=e,Z3.forEach(n=>n()))}const W5n=8e3,Q5n=3e3;function X5n(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),W5n)),c.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},Q5n)))},c.onopen=()=>{var h,f;r||(window.clearTimeout(s),s=void 0,bj(!0),a&&(Qc({type:"reconnected"}),Xc(),mj({harness:"*",authState:"unknown"}),(f=(h=n.current).onReconnect)==null||f.call(h)),a=!0)};const u=h=>{try{return JSON.parse(h.data)}catch{return null}};c.addEventListener("resync.required",()=>{var h,f;Qc({type:"reconnected"}),Xc(),(f=(h=n.current).onReconnect)==null||f.call(h)}),c.addEventListener("run.updated",h=>{const f=u(h);f!=null&&f.run&&(Xc(),n.current.onRun(f.run))}),c.addEventListener("experiment.updated",h=>{var p,m;const f=u(h);f!=null&&f.experiment&&(Xc(),(m=(p=n.current).onExperiment)==null||m.call(p,f.experiment))}),c.addEventListener("project.updated",h=>{var p,m;const f=u(h);f!=null&&f.project&&(Xc(),(m=(p=n.current).onProject)==null||m.call(p,f.project))}),c.addEventListener("files.updated",h=>{var p,m;const f=u(h);f!=null&&f.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,f.projectId))}),c.addEventListener("run.log",h=>{const f=u(h);f!=null&&f.runId&&B5n(f)}),c.addEventListener("chat.session",h=>{const f=u(h);f!=null&&f.session&&(Xc(),Qc({type:"session",session:f.session}))}),c.addEventListener("chat.session.deleted",h=>{const f=u(h);f!=null&&f.sessionId&&(Xc(),Qc({type:"sessionDeleted",sessionId:f.sessionId}))}),c.addEventListener("chat.message",h=>{const f=u(h);f!=null&&f.message&&(Xc(),Qc({type:"message",sessionId:f.sessionId,message:f.message}))}),c.addEventListener("chat.busy",h=>{const f=u(h);f!=null&&f.sessionId&&(Xc(),Qc({type:"busy",sessionId:f.sessionId,busy:f.busy}))}),c.addEventListener("chat.usage",h=>{const f=u(h);f!=null&&f.sessionId&&f.usage&&Qc({type:"usage",sessionId:f.sessionId,usage:f.usage})}),c.addEventListener("chat.queued",h=>{const f=u(h);f!=null&&f.sessionId&&Qc({type:"queued",sessionId:f.sessionId,items:f.items??[]})}),c.addEventListener("chat.branch",h=>{const f=u(h);f!=null&&f.sessionId&&Qc({type:"branch",sessionId:f.sessionId,activeLeafId:f.activeLeafId??null})}),c.addEventListener("harness.auth",h=>{const f=u(h);f!=null&&f.harness&&f.authState&&mj(f)}),c.addEventListener("harness.catalog",()=>q5n()),c.addEventListener("datadir.move.progress",h=>{const f=u(h);f&&mw({type:"progress",...f})}),c.addEventListener("datadir.move.done",h=>{const f=u(h);f&&mw({type:"done",path:f.path,oldPathLeft:f.oldPathLeft})}),c.addEventListener("datadir.move.error",h=>{const f=u(h);f&&mw({type:"error",error:f.error})}),c.addEventListener("update.status",h=>{const f=u(h);f&&V5n(f)}),c.addEventListener("overleaf.live",h=>{const f=u(h);f!=null&&f.key&&f.status&&gj({type:"live",key:f.key,status:f.status})}),c.addEventListener("overleaf.pulled",h=>{const f=u(h);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 Gv=new Set;function Y5n(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 Gv.add(t),()=>{Gv.delete(t)}},[])}const yj={onRun:e=>Gv.forEach(n=>n.onRun(e)),onReconnect:()=>Gv.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},zh=()=>({queryKey:zt("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>Kh(n,t,()=>Mwn(e),jm),staleTime:3e4}),Z5n=()=>({queryKey:zt("listProjectActivity"),queryFn:({signal:e})=>Own(e),staleTime:3e4}),Om=()=>({queryKey:zt("getUiState"),queryFn:({signal:e})=>Dwn(e),staleTime:3e5}),NS=e=>({queryKey:zt("getProjectUiState",e),queryFn:({signal:n})=>Lwn(e,n),staleTime:3e5}),b0=(e="")=>({queryKey:zt("getProjectPathStatus",e),queryFn:({signal:n})=>Fwn(e,n),staleTime:3e4}),HI=e=>({queryKey:zt("searchPapers",e),queryFn:({signal:n})=>Uwn(e,n),staleTime:3e5}),J5n=()=>({queryKey:zt("githubAccount"),queryFn:({signal:e})=>Gwn(e),staleTime:3e5}),ekn=e=>({queryKey:zt("githubProjectRepoPreview",e),queryFn:({signal:n})=>Vwn(e,n),staleTime:3e4}),xj=(e,n)=>({queryKey:zt("repoAccess",e,n),queryFn:({signal:t})=>Kwn(e,n,t),staleTime:3e4}),J3=e=>({queryKey:zt("resolvePaper",e),queryFn:({signal:n})=>Wwn(e,n),staleTime:36e5}),tkn=(e,n,t,r)=>({queryKey:zt("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>Xwn(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),Vv=e=>({queryKey:zt("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>Kh(t,r,()=>Jwn(e,n),jm),staleTime:3e4}),Ru=e=>({queryKey:zt("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>Kh(t,r,()=>t4n(e,n),jm),staleTime:3e4});function l1(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 wj(){const e=Ga();return X5n({onRun(n){var r;if(!Gn(e))return;const t=(r=et.getQueryData(Ru(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);lo(et,Ru(n.projectId).queryKey,n.id),et.setQueryData(Ru(n.projectId).queryKey,s=>l1(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(Pa(["getRunDiff"],e,s=>s.queryKey[3]===n.id),Pa(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),yj.onRun(n)},onExperiment(n){Gn(e)&&(lo(et,Vv(n.projectId).queryKey,n.id),et.setQueryData(Vv(n.projectId).queryKey,t=>l1(t,n)),Pa(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),Pa(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),Pa(["getRunDiff"],e,t=>{var r;return((r=et.getQueryData(Ru(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){Gn(e)&&(lo(et,zh().queryKey,n.id),et.setQueryData(zh().queryKey,t=>l1(t,n)))},onArtifacts(n){Gn(e)&&(Pa(oS,e,t=>t.queryKey[3]===n),Pa(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){Gn(e)&&(Pa(GQ,e),yj.onReconnect())}}),T.useEffect(()=>{let n;const t=P5n(()=>{n??(n=setTimeout(()=>{n=void 0,Pa(["listProjectActivity"],e)},100))}),r=FI(c=>{c.type==="done"&&Pa(["getDataDir"],e)}),s=Uv(c=>{Gn(e)&&(c.type==="session"?lo(et,Gi(c.session.projectId).queryKey,c.session.id):(c.type==="busy"||c.type==="usage")&&lo(et,[...e,"listChatSessions"],c.sessionId),(c.type==="message"||c.type==="queued"||c.type==="branch")&&PI("",c.type==="message"?{type:"upsertMessage",sessionId:c.sessionId,message:c.message}:c.type==="queued"?{type:"setQueued",sessionId:c.sessionId,items:c.items}:{type:"activeLeaf",sessionId:c.sessionId,leafId:c.activeLeafId},!0),c.type==="session"&&!vl.has(c.session.id)?et.setQueryData(Gi(c.session.projectId).queryKey,u=>{if(!u)return;const h=u.find(f=>f.id===c.session.id);return h?l1(u,{...c.session,contextUsage:c.session.contextUsage??h.contextUsage}):[c.session,...u]}):c.type==="sessionDeleted"?Bb(c.sessionId):(c.type==="busy"||c.type==="usage")&&et.setQueriesData({queryKey:[...e,"listChatSessions"]},u=>u==null?void 0:u.map(h=>h.id!==c.sessionId?h:c.type==="busy"?{...h,busy:c.busy}:{...h,contextUsage:c.usage})))}),i=F5n(()=>{Gn(e)&&pf(!0).catch(()=>{})}),a=H5n(()=>{Gn(e)&&et.fetchQuery({...Pu(),staleTime:0}).catch(()=>{})}),o=G5n(c=>{Gn(e)&&(lo(et,qv().queryKey),et.setQueryData(qv().queryKey,c))});return()=>{clearTimeout(n),t(),r(),s(),i(),a(),o()}},[e[1]]),null}const e5=new Set;function qI(e){if(e!==E()){PD(e,{reload:!1}),document.documentElement.lang=e,jI(e);for(const n of e5)n()}}function nkn(e){return e5.add(e),()=>e5.delete(e)}function Yu(){return T.useSyncExternalStore(nkn,E,E)}const Gb="__ORX_MAC_TITLEBAR__"in window,UI="__ORX_WIN_TITLEBAR__"in window;let kj="system",Sj="",gw=!1;const Cd=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function Cj(e){if(!Cd)return null;Cd.clearRect(0,0,1,1),Cd.fillStyle="transparent",Cd.fillStyle=e,Cd.fillRect(0,0,1,1);const[n,t,r,s]=Cd.getImageData(0,0,1,1).data;return s!==255?null:[n,t,r].map(i=>i.toString(16).padStart(2,"0")).join("")}function rkn(){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=Cj(getComputedStyle(t).backgroundColor);if(r)return r}return Cj(getComputedStyle(document.documentElement).backgroundColor)}function t5(e){e&&(kj=e),!(!Gb||gw)&&(gw=!0,setTimeout(()=>{var r;gw=!1;const n=rkn(),t=`titlebar:${kj}:${n}`;!n||t===Sj||(Sj=t,(r=window.ipc)==null||r.postMessage(t))},100))}Gb&&(new MutationObserver(()=>t5()).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style","data-theme"]}),window.addEventListener("resize",()=>t5()));const skn="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'])",Ej=Gb?28:UI?32:0;if(Ej){document.documentElement.classList.add(Gb?"mac-titlebar":"win-titlebar");let e=!1;window.addEventListener("mousedown",n=>{var t;e=!1,!(n.button!==0||n.defaultPrevented||n.clientY>=Ej)&&(n.target instanceof Element&&n.target.closest(skn)||(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 GI="orx:theme";function ikn(){try{const e=localStorage.getItem(GI);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let mf=ikn();const n5=new Set;function akn(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function zS(){document.documentElement.dataset.theme=akn(mf),t5(mf)}function VI(e){mf=e;try{localStorage.setItem(GI,e)}catch{}zS();for(const n of n5)n()}function okn(){return mf}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{mf==="system"&&zS()});zS();function ckn(e){return n5.add(e),()=>n5.delete(e)}function KI(){return[T.useSyncExternalStore(ckn,()=>mf,()=>mf),VI]}const lkn=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),WI=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),Kv="-",Nj=[],_kn="arbitrary..",fkn=e=>{const n=hkn(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return dkn(a);const o=a.split(Kv),c=o[0]===""&&o.length>1?1:0;return QI(o,c,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const c=r[a],u=t[a];return c?u?lkn(u,c):c:u||Nj}return t[a]||Nj}}},QI=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=QI(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(Kv):e.slice(n).join(Kv),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?_kn+r:void 0})(),hkn=e=>{const{theme:n,classGroups:t}=e;return pkn(t,n)},pkn=(e,n)=>{const t=WI();for(const r in e){const s=e[r];jS(s,t,r,n)}return t},jS=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){gkn(e,n,t);return}if(typeof e=="function"){vkn(e,n,t,r);return}bkn(e,n,t,r)},gkn=(e,n,t)=>{const r=e===""?n:XI(n,e);r.classGroupId=t},vkn=(e,n,t,r)=>{if(ykn(e)){jS(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(ukn(t,e))},bkn=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(Kv),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,xkn=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)}}},r5="!",zj=":",wkn=[],jj=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),kkn=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,c=0,u;const h=s.length;for(let k=0;kc?u-c:void 0;return jj(i,m,p,w)};if(n){const s=n+zj,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):jj(wkn,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},Skn=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}},Ckn=e=>({cache:xkn(e.cacheSize),parseClassName:kkn(e),sortModifiers:Skn(e),postfixLookupClassGroupIds:Ekn(e),...fkn(e)}),Ekn=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(Nkn);let u="";for(let h=c.length-1;h>=0;h-=1){const f=c[h],{isExternal:p,modifiers:m,hasImportantModifier:w,baseClassName:k,maybePostfixModifierPosition:v}=t(f);if(p){u=f+(u.length>0?" "+u:u);continue}let b=!!v,y;if(b){const A=k.substring(0,v);y=r(A);const z=y&&a[y]?r(k):void 0;z&&z!==y&&(y=z,b=!1)}else y=r(k);if(!y){if(!b){u=f+(u.length>0?" "+u:u);continue}if(y=r(k),!y){u=f+(u.length>0?" "+u:u);continue}b=!1}const x=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=w?x+r5:x,N=C+y;if(o.indexOf(N)>-1)continue;o.push(N);const j=s(y,b);for(let A=0;A0?" "+u:u)}return u},jkn=(...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((h,f)=>f(h),e());return t=Ckn(u),r=t.cache.get,s=t.cache.set,i=o,o(c)},o=c=>{const u=r(c);if(u)return u;const h=zkn(c,t);return s(c,h),h};return i=a,(...c)=>i(jkn(...c))},Akn=[],xs=e=>{const n=t=>t[e]||Akn;return n.isThemeGetter=!0,n},ZI=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,JI=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Tkn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Rkn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Mkn=/\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$/,Okn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Dkn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Lkn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,_u=e=>Tkn.test(e),kn=e=>!!e&&!Number.isNaN(Number(e)),Fo=e=>!!e&&Number.isInteger(Number(e)),vw=e=>e.endsWith("%")&&kn(e.slice(0,-1)),Yc=e=>Rkn.test(e),e$=()=>!0,Ikn=e=>Mkn.test(e)&&!Okn.test(e),AS=()=>!1,$kn=e=>Dkn.test(e),Bkn=e=>Lkn.test(e),Pkn=e=>!gt(e)&&!xt(e),Fkn=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)),Hkn=e=>Zu(e,r$,AS),gt=e=>ZI.test(e),z_=e=>Zu(e,s$,Ikn),Tj=e=>Zu(e,Xkn,kn),qkn=e=>Zu(e,a$,e$),Ukn=e=>Zu(e,i$,AS),Rj=e=>Zu(e,t$,AS),Gkn=e=>Zu(e,n$,Bkn),u1=e=>Zu(e,o$,$kn),xt=e=>JI.test(e),Wp=e=>Rf(e,s$),Vkn=e=>Rf(e,i$),Mj=e=>Rf(e,t$),Kkn=e=>Rf(e,r$),Wkn=e=>Rf(e,n$),_1=e=>Rf(e,o$,!0),Qkn=e=>Rf(e,a$,!0),Zu=(e,n,t)=>{const r=ZI.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Rf=(e,n,t=!1)=>{const r=JI.exec(e);return r?r[1]?n(r[1]):t:!1},t$=e=>e==="position"||e==="percentage",n$=e=>e==="image"||e==="url",r$=e=>e==="length"||e==="size"||e==="bg-size",s$=e=>e==="length",Xkn=e=>e==="number",i$=e=>e==="family-name",a$=e=>e==="number"||e==="weight",o$=e=>e==="shadow",Oj=()=>{const e=xs("color"),n=xs("font"),t=xs("text"),r=xs("font-weight"),s=xs("tracking"),i=xs("leading"),a=xs("breakpoint"),o=xs("container"),c=xs("spacing"),u=xs("radius"),h=xs("shadow"),f=xs("inset-shadow"),p=xs("text-shadow"),m=xs("drop-shadow"),w=xs("blur"),k=xs("perspective"),v=xs("aspect"),b=xs("ease"),y=xs("animate"),x=()=>["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,gt],j=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],z=()=>[xt,gt,c],M=()=>[_u,"full","auto",...z()],D=()=>[Fo,"none","subgrid",xt,gt],I=()=>["auto",{span:["full",Fo,xt,gt]},Fo,xt,gt],B=()=>[Fo,"auto",xt,gt],G=()=>["auto","min","max","fr",xt,gt],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...z()],Z=()=>[_u,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],J=()=>[_u,"screen","full","dvw","lvw","svw","min","max","fit",...z()],$=()=>[_u,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],L=()=>[e,xt,gt],F=()=>[...C(),Mj,Rj,{position:[xt,gt]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",Kkn,Hkn,{size:[xt,gt]}],ae=()=>[vw,Wp,z_],ie=()=>["","none","full",u,xt,gt],ue=()=>["",kn,Wp,z_],re=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[kn,vw,Mj,Rj],ce=()=>["","none",w,xt,gt],me=()=>["none",kn,xt,gt],ve=()=>["none",kn,xt,gt],Re=()=>[kn,xt,gt],Fe=()=>[_u,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Yc],breakpoint:[Yc],color:[e$],container:[Yc],"drop-shadow":[Yc],ease:["in","out","in-out"],font:[Pkn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Yc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Yc],shadow:[Yc],spacing:["px",kn],text:[Yc],"text-shadow":[Yc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",_u,gt,xt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",xt,gt]}],"container-named":[Fkn],columns:[{columns:[kn,gt,xt,o]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],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:[Fo,"auto",xt,gt]}],basis:[{basis:[_u,"full","auto",o,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[kn,_u,"auto","initial","none",gt]}],grow:[{grow:["",kn,xt,gt]}],shrink:[{shrink:["",kn,xt,gt]}],order:[{order:[Fo,"first","last","none",xt,gt]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:I()}],"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":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],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":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...J()]}],"min-inline-size":[{"min-inline":["auto",...J()]}],"max-inline-size":[{"max-inline":["none",...J()]}],"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,Wp,z_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,Qkn,qkn]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vw,gt]}],"font-family":[{font:[Vkn,Ukn,n]}],"font-features":[{"font-features":[gt]}],"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,gt]}],"line-clamp":[{"line-clamp":[kn,"none",xt,Tj]}],leading:[{leading:[i,...z()]}],"list-image":[{"list-image":["none",xt,gt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",xt,gt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...re(),"wavy"]}],"text-decoration-thickness":[{decoration:[kn,"from-font","auto",xt,z_]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[kn,"auto",xt,gt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"tab-size":[{tab:[Fo,xt,gt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",xt,gt]}],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,gt]}],"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:U()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Fo,xt,gt],radial:["",xt,gt],conic:[Fo,xt,gt]},Wkn,Gkn]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:ae()}],"gradient-via-pos":[{via:ae()}],"gradient-to-pos":[{to:ae()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...re(),"hidden","none"]}],"divide-style":[{divide:[...re(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...re(),"none","hidden"]}],"outline-offset":[{"outline-offset":[kn,xt,gt]}],"outline-w":[{outline:["",kn,Wp,z_]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",h,_1,u1]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,_1,u1]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[kn,z_]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,_1,u1]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[kn,xt,gt]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"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":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[xt,gt]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",xt,gt]}],filter:[{filter:["","none",xt,gt]}],blur:[{blur:ce()}],brightness:[{brightness:[kn,xt,gt]}],contrast:[{contrast:[kn,xt,gt]}],"drop-shadow":[{"drop-shadow":["","none",m,_1,u1]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",kn,xt,gt]}],"hue-rotate":[{"hue-rotate":[kn,xt,gt]}],invert:[{invert:["",kn,xt,gt]}],saturate:[{saturate:[kn,xt,gt]}],sepia:[{sepia:["",kn,xt,gt]}],"backdrop-filter":[{"backdrop-filter":["","none",xt,gt]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[kn,xt,gt]}],"backdrop-contrast":[{"backdrop-contrast":[kn,xt,gt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",kn,xt,gt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[kn,xt,gt]}],"backdrop-invert":[{"backdrop-invert":["",kn,xt,gt]}],"backdrop-opacity":[{"backdrop-opacity":[kn,xt,gt]}],"backdrop-saturate":[{"backdrop-saturate":[kn,xt,gt]}],"backdrop-sepia":[{"backdrop-sepia":["",kn,xt,gt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",xt,gt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[kn,"initial",xt,gt]}],ease:[{ease:["linear","initial",b,xt,gt]}],delay:[{delay:[kn,xt,gt]}],animate:[{animate:["none",y,xt,gt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,xt,gt]}],"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:Re()}],"skew-x":[{"skew-x":Re()}],"skew-y":[{"skew-y":Re()}],transform:[{transform:[xt,gt,"","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:[Fo,xt,gt]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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,gt]}],"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":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"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,gt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[kn,Wp,z_,Tj]}],stroke:[{stroke:["none",...L()]}],"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"]}},Ykn=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(Dd(e,"cacheSize",n),Dd(e,"prefix",t),Dd(e,"experimentalParseClassName",r),f1(e.theme,i.theme),f1(e.classGroups,i.classGroups),f1(e.conflictingClassGroups,i.conflictingClassGroups),f1(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Dd(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),Dd(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),d1(e.theme,s.theme),d1(e.classGroups,s.classGroups),d1(e.conflictingClassGroups,s.conflictingClassGroups),d1(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),s5(e,s,"postfixLookupClassGroups"),s5(e,s,"orderSensitiveModifiers"),e),Dd=(e,n,t)=>{t!==void 0&&(e[n]=t)},f1=(e,n)=>{if(n)for(const t in n)Dd(e,t,n[t])},d1=(e,n)=>{if(n)for(const t in n)s5(e,n,t)},s5=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},Zkn=(e,...n)=>typeof e=="function"?Aj(Oj,e,...n):Aj(()=>Ykn(Oj(),e),...n),Jkn=Zkn({extend:{theme:{text:["menu"]}}});function Ss(...e){return Jkn(...e)}const eSn={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 Wt({variant:e="default",size:n="default",className:t,...r}){return _.jsx("span",{className:Ss("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",eSn[e],t),...r})}const tSn=["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(" "),nSn={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"},rSn={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 c$(e,n,t,r){return Ss(tSn,nSn[e],rSn[n],t&&"active",r)}function Ie({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return _.jsx("button",{className:c$(n,t,e,r),...s})}function jh({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return _.jsx("a",{className:c$(n,t,e,r),...s})}const sSn=["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(" "),iSn={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"},aSn={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function l$(e,n,t,r,s){return Ss(sSn,iSn[e],aSn[n],r==="circle"&&"rounded-full",t&&"active",s)}const $t=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:l$(s,r,n,t,i),...a})});function Qh({active:e=!1,shape:n="rounded",size:t="default",variant:r="default",className:s,...i}){return _.jsx("a",{className:l$(r,t,e,n,s),...i})}const oSn={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 Kr({variant:e="default",className:n,...t}){return _.jsx("input",{className:Ss("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",oSn[e],n),...t})}function yn({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return _.jsx("button",{className:Ss("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 Nt({className:e,...n}){return _.jsx("span",{className:Ss("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 Qr({className:e,...n}){return _.jsx("div",{className:Ss("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const cSn={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 Zd({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return _.jsxs("span",{className:Ss("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[_.jsx("span",{className:Ss("h-[7px] w-[7px] shrink-0 rounded-full bg-current",cSn[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const lSn=["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 u$(e,n){return Ss(lSn,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function TS({checked:e=!1,className:n,children:t,...r}){return _.jsx("button",{role:"switch","aria-checked":e,className:u$(e,n),...r,children:t??_.jsx("span",{})})}function uSn({checked:e=!1,className:n,...t}){return _.jsx("span",{className:u$(e,n),...t,children:_.jsx("span",{})})}var ai=rD();const _Sn=Em(ai);function fSn(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 dSn=e=>{switch(e){case"success":return mSn;case"info":return vSn;case"warning":return gSn;case"error":return bSn;default:return null}},hSn=Array(12).fill(0),pSn=({visible:e,className:n})=>st.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},st.createElement("div",{className:"sonner-spinner"},hSn.map((t,r)=>st.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),mSn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.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"})),gSn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.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"})),vSn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.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"})),bSn=st.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},st.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"})),ySn=st.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"},st.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),st.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),xSn=()=>{const[e,n]=st.useState(document.hidden);return st.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let wSn=1;const kSn=100,Dj=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:wSn++};class SSn{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-kSn;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=Dj(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],st.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(ESn(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"&&!st.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"&&!st.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"&&!st.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 h=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description,m=typeof h=="object"&&!st.isValidElement(h)?h:{message:h};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,h)=>o.then(()=>a[0]==="reject"?h(a[1]):u(a[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=Dj(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 Fi=new SSn,CSn=(e,n)=>Fi.message(e,n),ESn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",NSn=CSn,zSn=()=>Fi.toasts,jSn=()=>Fi.getActiveToasts(),ASn=Object.assign(NSn,{success:Fi.success,info:Fi.info,warning:Fi.warning,error:Fi.error,custom:Fi.custom,message:Fi.message,promise:Fi.promise,dismiss:Fi.dismiss,loading:Fi.loading},{getHistory:zSn,getToasts:jSn});fSn("[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 h1(e){return e.label!==void 0}const TSn=3,RSn="24px",MSn="16px",Lj=4e3,OSn=356,DSn=14,LSn=45,ISn=200;function Ho(...e){return e.filter(Boolean).join(" ")}function $Sn(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const BSn=e=>{var n,t,r,s,i,a,o,c,u;const{invert:h,toast:f,unstyled:p,interacting:m,setHeights:w,visibleToasts:k,heights:v,index:b,toasts:y,expanded:x,removeToast:C,defaultRichColors:N,closeButton:j,style:A,cancelButtonStyle:z,actionButtonStyle:M,className:D="",descriptionClassName:I="",duration:B,position:G,gap:q,expandByDefault:Q,classNames:K,icons:Z,closeButtonAriaLabel:J="Close toast"}=e,[$,L]=st.useState(null),[F,U]=st.useState(null),[H,ae]=st.useState(!1),[ie,ue]=st.useState(!1),[re,V]=st.useState(!1),[oe,ce]=st.useState(!1),[me,ve]=st.useState(!1),[Re,Fe]=st.useState(0),[Xe,Te]=st.useState(0),$e=st.useRef(f.duration||B||Lj),wt=st.useRef(null),ot=st.useRef(null),Mt=b===0,jt=b+1<=k,Ft=f.type,Le=Ft??"default",tt=f.dismissible!==!1,ke=f.className||"",ge=f.descriptionClassName||"",Ne=st.useMemo(()=>v.findIndex(bt=>bt.toastId===f.id)||0,[v,f.id]),qe=st.useMemo(()=>{var bt;return(bt=f.closeButton)!=null?bt:j},[f.closeButton,j]),nt=st.useMemo(()=>f.duration||B||Lj,[f.duration,B]),ht=st.useRef(0),rt=st.useRef(0),qt=st.useRef(0),Xt=st.useRef(null),[Jt,an]=G.split("-"),At=st.useMemo(()=>v.reduce((bt,ln,xn)=>xn>=Ne?bt:bt+ln.height,0),[v,Ne]),bn=xSn(),on=st.useMemo(()=>{var bt;return(bt=e.swipeDirections)!=null?bt:$Sn(G)},[e.swipeDirections,G]),Ot=f.invert||h,hn=Ft==="loading";rt.current=st.useMemo(()=>Ne*q+At,[Ne,At]),st.useEffect(()=>{$e.current=nt},[nt]),st.useEffect(()=>{ae(!0)},[]),st.useEffect(()=>{const bt=ot.current;if(bt){const ln=bt.getBoundingClientRect().height;return Te(ln),w(xn=>[{toastId:f.id,height:ln,position:f.position},...xn]),()=>w(xn=>xn.filter(un=>un.toastId!==f.id))}},[w,f.id]),st.useLayoutEffect(()=>{if(!H)return;const bt=ot.current,ln=bt.style.height;bt.style.height="auto";const xn=bt.getBoundingClientRect().height;bt.style.height=ln,Te(xn),w(un=>un.find(Rn=>Rn.toastId===f.id)?un.map(Rn=>Rn.toastId===f.id?{...Rn,height:xn}:Rn):[{toastId:f.id,height:xn,position:f.position},...un])},[H,f.title,f.description,w,f.id,f.jsx,f.action,f.cancel]);const cn=st.useCallback(()=>{ue(!0),Fe(rt.current),w(bt=>bt.filter(ln=>ln.toastId!==f.id)),setTimeout(()=>{C(f)},ISn)},[f,C,w,rt]);st.useEffect(()=>{if(f.promise&&Ft==="loading"||f.duration===1/0||f.type==="loading")return;let bt;return x||m||bn?(()=>{if(qt.current{$e.current!==1/0&&(ht.current=new Date().getTime(),bt=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),cn()},$e.current))})(),()=>clearTimeout(bt)},[x,m,f,Ft,bn,cn]),st.useEffect(()=>{f.delete&&(cn(),f.onDismiss==null||f.onDismiss.call(f,f))},[cn,f.delete]);function Sn(){var bt;if(Z!=null&&Z.loading){var ln;return st.createElement("div",{className:Ho(K==null?void 0:K.loader,f==null||(ln=f.classNames)==null?void 0:ln.loader,"sonner-loader"),"data-visible":Ft==="loading"},Z.loading)}return st.createElement(pSn,{className:Ho(K==null?void 0:K.loader,f==null||(bt=f.classNames)==null?void 0:bt.loader),visible:Ft==="loading"})}const Vn=f.icon||(Z==null?void 0:Z[Ft])||dSn(Ft);var hs,es;return st.createElement("li",{tabIndex:0,ref:ot,className:Ho(D,ke,K==null?void 0:K.toast,f==null||(n=f.classNames)==null?void 0:n.toast,K==null?void 0:K[Le],f==null||(t=f.classNames)==null?void 0:t[Le]),"data-sonner-toast":"","data-rich-colors":(hs=f.richColors)!=null?hs:N,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":H,"data-promise":!!f.promise,"data-swiped":me,"data-removed":ie,"data-visible":jt,"data-y-position":Jt,"data-x-position":an,"data-index":b,"data-front":Mt,"data-swiping":re,"data-dismissible":tt,"data-type":Ft,"data-invert":Ot,"data-swipe-out":oe,"data-swipe-direction":F,"data-expanded":!!(x||Q&&H),"data-testid":f.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${ie?Re:rt.current}px`,"--initial-height":Q?"auto":`${Xe}px`,...A,...f.style},onDragEnd:()=>{V(!1),L(null),Xt.current=null},onPointerDown:bt=>{bt.button!==2&&(hn||!tt||(wt.current=new Date,Fe(rt.current),bt.target.setPointerCapture(bt.pointerId),bt.target.tagName!=="BUTTON"&&(V(!0),Xt.current={x:bt.clientX,y:bt.clientY})))},onPointerUp:()=>{var bt,ln,xn;if(oe||!tt)return;Xt.current=null;const un=Number(((bt=ot.current)==null?void 0:bt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),ur=Number(((ln=ot.current)==null?void 0:ln.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Rn=new Date().getTime()-((xn=wt.current)==null?void 0:xn.getTime()),Kn=$==="x"?un:ur,rr=Math.abs(Kn)/Rn;if(($==="x"?on.includes(un>0?"right":"left"):on.includes(ur>0?"bottom":"top"))&&(Math.abs(Kn)>=LSn||rr>.11)){Fe(rt.current),f.onDismiss==null||f.onDismiss.call(f,f),U($==="x"?un>0?"right":"left":ur>0?"down":"up"),cn(),ce(!0);return}else{var It,ir;(It=ot.current)==null||It.style.setProperty("--swipe-amount-x","0px"),(ir=ot.current)==null||ir.style.setProperty("--swipe-amount-y","0px")}ve(!1),V(!1),L(null)},onPointerMove:bt=>{var ln,xn,un;if(!Xt.current||!tt||((ln=window.getSelection())==null?void 0:ln.toString().length)>0)return;const Rn=bt.clientY-Xt.current.y,Kn=bt.clientX-Xt.current.x;!$&&(Math.abs(Kn)>1||Math.abs(Rn)>1)&&L(Math.abs(Kn)>Math.abs(Rn)?"x":"y");let rr={x:0,y:0};const St=It=>1/(1.5+Math.abs(It)/20);if($==="y"){if(on.includes("top")||on.includes("bottom"))if(on.includes("top")&&Rn<0||on.includes("bottom")&&Rn>0)rr.y=Rn;else{const It=Rn*St(Rn);rr.y=Math.abs(It)0)rr.x=Kn;else{const It=Kn*St(Kn);rr.x=Math.abs(It)0||Math.abs(rr.y)>0)&&ve(!0),(xn=ot.current)==null||xn.style.setProperty("--swipe-amount-x",`${rr.x}px`),(un=ot.current)==null||un.style.setProperty("--swipe-amount-y",`${rr.y}px`)}},qe&&!f.jsx&&Ft!=="loading"?st.createElement("button",{"aria-label":J,"data-disabled":hn,"data-close-button":!0,onClick:hn||!tt?()=>{}:()=>{cn(),f.onDismiss==null||f.onDismiss.call(f,f)},className:Ho(K==null?void 0:K.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(es=Z==null?void 0:Z.close)!=null?es:ySn):null,(Ft||f.icon||f.promise)&&f.icon!==null&&((Z==null?void 0:Z[Ft])!==null||f.icon)?st.createElement("div",{"data-icon":"",className:Ho(K==null?void 0:K.icon,f==null||(s=f.classNames)==null?void 0:s.icon)},Ft==="loading"?f.icon||Sn():f.promise?Sn():null,Ft!=="loading"?Vn:null):null,st.createElement("div",{"data-content":"",className:Ho(K==null?void 0:K.content,f==null||(i=f.classNames)==null?void 0:i.content)},st.createElement("div",{"data-title":"",className:Ho(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?st.createElement("div",{"data-description":"",className:Ho(I,ge,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),st.isValidElement(f.cancel)?f.cancel:f.cancel&&h1(f.cancel)?st.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||z,onClick:bt=>{h1(f.cancel)&&tt&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,bt),cn())},className:Ho(K==null?void 0:K.cancelButton,f==null||(c=f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,st.isValidElement(f.action)?f.action:f.action&&h1(f.action)?st.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||M,onClick:bt=>{h1(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,bt),!bt.defaultPrevented&&cn())},className:Ho(K==null?void 0:K.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function Ij(){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 PSn(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?MSn:RSn;function c(u){["top","right","bottom","left"].forEach(h=>{t[`${a}-${h}`]=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 FSn=st.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:c,className:u,offset:h,mobileOffset:f,theme:p="light",richColors:m,duration:w,style:k,visibleToasts:v=TSn,toastOptions:b,dir:y=Ij(),gap:x=DSn,icons:C,customAriaLabel:N,containerAriaLabel:j="Notifications"}=n,[A,z]=st.useState([]),M=st.useMemo(()=>r?A.filter(ae=>ae.toasterId===r):A.filter(ae=>!ae.toasterId),[A,r]),D=st.useMemo(()=>Array.from(new Set([i].concat(M.filter(ae=>ae.position).map(ae=>ae.position)))),[M,i]),[I,B]=st.useState([]),[G,q]=st.useState(!1),[Q,K]=st.useState(!1),[Z,J]=st.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=st.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=st.useRef(null),U=st.useRef(!1),H=st.useCallback(ae=>{z(ie=>{var ue;return(ue=ie.find(re=>re.id===ae.id))!=null&&ue.delete||Fi.dismiss(ae.id),ie.filter(({id:re})=>re!==ae.id)})},[]);return st.useEffect(()=>Fi.subscribe(ae=>{if(ae.dismiss){requestAnimationFrame(()=>{z(ie=>ie.map(ue=>ue.id===ae.id?{...ue,delete:!0}:ue))});return}setTimeout(()=>{_Sn.flushSync(()=>{z(ie=>{const ue=ie.findIndex(re=>re.id===ae.id);return ue!==-1?[...ie.slice(0,ue),{...ie[ue],...ae},...ie.slice(ue+1)]:[ae,...ie]})})})}),[]),st.useEffect(()=>{if(p!=="system"){J(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const ae=window.matchMedia("(prefers-color-scheme: dark)");try{ae.addEventListener("change",({matches:ie})=>{J(ie?"dark":"light")})}catch{ae.addListener(({matches:ue})=>{try{J(ue?"dark":"light")}catch(re){console.error(re)}})}},[p]),st.useEffect(()=>{A.length<=1&&q(!1)},[A]),st.useEffect(()=>{const ae=ie=>{var ue;if(a.length>0&&a.every(oe=>ie[oe]||ie.code===oe)){var V;q(!0),(V=$.current)==null||V.focus()}ie.code==="Escape"&&(document.activeElement===$.current||(ue=$.current)!=null&&ue.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",ae),()=>document.removeEventListener("keydown",ae)},[a]),st.useEffect(()=>{if($.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,U.current=!1)}},[$.current]),st.createElement("section",{ref:t,"aria-label":N??`${j} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},D.map((ae,ie)=>{var ue;const[re,V]=ae.split("-");return M.length?st.createElement("ol",{key:ae,dir:y==="auto"?Ij():y,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":re,"data-x-position":V,style:{"--front-toast-height":`${((ue=I[0])==null?void 0:ue.height)||0}px`,"--width":`${OSn}px`,"--gap":`${x}px`,...k,...PSn(h,f)},onBlur:oe=>{U.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(U.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||U.current||(U.current=!0,F.current=oe.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{Q||q(!1)},onDragEnd:()=>q(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},M.filter(oe=>!oe.position&&ie===0||oe.position===ae).map((oe,ce)=>{var me,ve;return st.createElement(BSn,{key:oe.id,icons:C,index:ce,toast:oe,defaultRichColors:m,duration:(me=b==null?void 0:b.duration)!=null?me:w,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(ve=b==null?void 0:b.closeButton)!=null?ve:c,interacting:Q,position:ae,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:H,toasts:M.filter(Re=>Re.position==oe.position),heights:I.filter(Re=>Re.position==oe.position),setHeights:B,expandByDefault:o,gap:x,expanded:G,swipeDirections:n.swipeDirections})})):null}))});function HSn(e){const[n]=KI();return _.jsx(FSn,{theme:n,...e})}function sn(e,n,t){ASn[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function RS({content:e,children:n,className:t}){const r=T.useRef(null),s=T.useRef(null);function i(){const o=r.current,c=s.current;if(!o||!c)return;c.matches(":popover-open")||c.showPopover();const u=o.getBoundingClientRect(),h=c.getBoundingClientRect(),f=Math.max(8,Math.min(u.left+u.width/2-h.width/2,window.innerWidth-h.width-8));c.style.left=`${f}px`,c.style.top=`${Math.max(8,u.top-h.height-6)}px`}function a(){var o,c;(o=r.current)!=null&&o.matches(":hover, :focus")||(c=s.current)==null||c.hidePopover()}return T.useEffect(()=>{const o=()=>{var c;return(c=s.current)==null?void 0:c.hidePopover()};return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[]),_.jsxs("span",{ref:r,className:Ss("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:0,role:"img","aria-label":e,onMouseEnter:i,onMouseLeave:a,onFocus:i,onBlur:a,onKeyDown:o=>{var c;o.key==="Escape"&&((c=s.current)!=null&&c.matches(":popover-open"))&&(o.preventDefault(),o.stopPropagation(),s.current.hidePopover())},children:[n,_.jsx("span",{ref:s,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 qSn=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function Dm(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(qSn)];(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(),h=u[0],f=u.at(-1);!h||!f?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===h?(c.preventDefault(),f.focus()):!c.shiftKey&&document.activeElement===f&&(c.preventDefault(),h.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function _$({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?M8t():e9t({count:Zt(n.activeTurnCount)})),n.pendingPermissionCount>0&&c.push(n.pendingPermissionCount===1?i8t():v7t({count:Zt(n.pendingPermissionCount)})),o>0&&c.push(o===1?b8t():P8t({count:Zt(o)})),n.queuedMessageCount>0&&c.push(n.queuedMessageCount===1?E8t():K8t({count:Zt(n.queuedMessageCount)})),n.activeRunCount>0&&c.push(n.activeRunCount===1?f8t():B7t({count:Zt(n.activeRunCount)})),Dm(a,s),ai.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:R7t({host:Ce(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:Z7t()}),_.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(Ie,{disabled:r,onClick:s,children:df()}),_.jsx(Ie,{variant:"danger",disabled:r,onClick:i,children:r?o9t():C7t()})]})]})}),document.body)}/** +स्टोर की एक कॉपी नए स्थान पर बनाई जाएगी और वहीं सक्रिय की जाएगी। सक्रिय रन या चैट स्थानांतरण को रोक सकते हैं।`,Epn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xpn(e):t==="fa"?wpn(e):t==="ar"?kpn(e):t==="es"?Spn(e):t==="hi"?Cpn(e):ypn(e)}),Npn=()=>"Move data here",zpn=()=>"将数据移动到此处",jpn=()=>"انتقال داده به اینجا",Apn=()=>"نقل البيانات إلى هنا",Tpn=()=>"Mover los datos aquí",Rpn=()=>"डेटा यहाँ ले जाएं",Mpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zpn():t==="fa"?jpn():t==="ar"?Apn():t==="es"?Tpn():t==="hi"?Rpn():Npn()}),Opn=()=>"Moving…",Dpn=()=>"正在移动…",Lpn=()=>"در حال جابه‌جایی…",Ipn=()=>"جارٍ النقل…",$pn=()=>"Moviendo…",Bpn=()=>"स्थानांतरित हो रहा है…",Ppn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dpn():t==="fa"?Lpn():t==="ar"?Ipn():t==="es"?$pn():t==="hi"?Bpn():Opn()}),Fpn=()=>"Preparing…",Hpn=()=>"正在准备…",qpn=()=>"در حال آماده‌سازی…",Upn=()=>"جارٍ التحضير…",Gpn=()=>"Preparando…",Kpn=()=>"तैयार हो रहा है…",Vpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hpn():t==="fa"?qpn():t==="ar"?Upn():t==="es"?Gpn():t==="hi"?Kpn():Fpn()}),Wpn=()=>" (same disk, instant)",Qpn=()=>"(同一磁盘,可立即完成)",Xpn=()=>" (روی همان دیسک، فوری)",Ypn=()=>" (القرص نفسه، فوري)",Zpn=()=>" (mismo disco, instantáneo)",Jpn=()=>" (उसी डिस्क पर, तुरंत)",e0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qpn():t==="fa"?Xpn():t==="ar"?Ypn():t==="es"?Zpn():t==="hi"?Jpn():Wpn()}),t0n=()=>"default location",n0n=()=>"默认位置",r0n=()=>"محل پیش‌فرض",s0n=()=>"الموقع الافتراضي",i0n=()=>"ubicación predeterminada",a0n=()=>"डिफ़ॉल्ट स्थान",o0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n0n():t==="fa"?r0n():t==="ar"?s0n():t==="es"?i0n():t==="hi"?a0n():t0n()}),c0n=()=>"ORX_DATA_DIR environment variable",l0n=()=>"ORX_DATA_DIR 环境变量",u0n=()=>"متغیر محیطی ORX_DATA_DIR",_0n=()=>"متغيّر البيئة ORX_DATA_DIR",f0n=()=>"variable de entorno ORX_DATA_DIR",d0n=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",h0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l0n():t==="fa"?u0n():t==="ar"?_0n():t==="es"?f0n():t==="hi"?d0n():c0n()}),p0n=()=>"your saved setting",m0n=()=>"已保存的设置",g0n=()=>"تنظیم ذخیره‌شدهٔ شما",v0n=()=>"إعدادك المحفوظ",b0n=()=>"tu ajuste guardado",y0n=()=>"आपकी सेव की गई सेटिंग",x0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m0n():t==="fa"?g0n():t==="ar"?v0n():t==="es"?b0n():t==="hi"?y0n():p0n()}),w0n=()=>"XDG_DATA_HOME",k0n=()=>"XDG_DATA_HOME",S0n=()=>"XDG_DATA_HOME",C0n=()=>"XDG_DATA_HOME",E0n=()=>"XDG_DATA_HOME",N0n=()=>"XDG_DATA_HOME",z0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k0n():t==="fa"?S0n():t==="ar"?C0n():t==="es"?E0n():t==="hi"?N0n():w0n()}),j0n=()=>"Verifying…",A0n=()=>"正在验证…",T0n=()=>"در حال بررسی…",R0n=()=>"جارٍ التحقق…",M0n=()=>"Verificando…",O0n=()=>"सत्यापित हो रहा है…",D0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A0n():t==="fa"?T0n():t==="ar"?R0n():t==="es"?M0n():t==="hi"?O0n():j0n()}),L0n=()=>"Loading…",I0n=()=>"正在加载…",$0n=()=>"در حال بارگیری…",B0n=()=>"جارٍ التحميل…",P0n=()=>"Cargando…",F0n=()=>"लोड हो रहा है…",SI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I0n():t==="fa"?$0n():t==="ar"?B0n():t==="es"?P0n():t==="hi"?F0n():L0n()}),H0n=()=>"This sub-agent is no longer available.",q0n=()=>"此子智能体已不可用。",U0n=()=>"این عامل فرعی دیگر در دسترس نیست.",G0n=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",K0n=()=>"Este subagente ya no está disponible.",V0n=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",W0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q0n():t==="fa"?U0n():t==="ar"?G0n():t==="es"?K0n():t==="hi"?V0n():H0n()}),Q0n=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,X0n=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,Y0n=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,Z0n=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,J0n=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,emn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,tmn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?X0n(e):t==="fa"?Y0n(e):t==="ar"?Z0n(e):t==="es"?J0n(e):t==="hi"?emn(e):Q0n(e)}),nmn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,rmn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,smn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,imn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,amn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,omn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,cmn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rmn(e):t==="fa"?smn(e):t==="ar"?imn(e):t==="es"?amn(e):t==="hi"?omn(e):nmn(e)}),lmn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",umn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",_mn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",fmn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",dmn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",hmn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",pmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?umn():t==="fa"?_mn():t==="ar"?fmn():t==="es"?dmn():t==="hi"?hmn():lmn()}),mmn=()=>", a repo for training a mini-GPT from scratch.",gmn=()=>",一个从零训练迷你 GPT 的仓库。",vmn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",bmn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",ymn=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",xmn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",wmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gmn():t==="fa"?vmn():t==="ar"?bmn():t==="es"?ymn():t==="hi"?xmn():mmn()}),kmn=()=>"Close",Smn=()=>"关闭",Cmn=()=>"بستن",Emn=()=>"إغلاق",Nmn=()=>"Cerrar",zmn=()=>"बंद करें",q3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Smn():t==="fa"?Cmn():t==="ar"?Emn():t==="es"?Nmn():t==="hi"?zmn():kmn()}),jmn=()=>"Create a new project",Amn=()=>"新建项目",Tmn=()=>"ایجاد پروژهٔ جدید",Rmn=()=>"إنشاء مشروع جديد",Mmn=()=>"Crear un proyecto nuevo",Omn=()=>"नया प्रोजेक्ट बनाएं",Dmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Amn():t==="fa"?Tmn():t==="ar"?Rmn():t==="es"?Mmn():t==="hi"?Omn():jmn()}),Lmn=()=>"Demo project",Imn=()=>"演示项目",$mn=()=>"پروژهٔ نمایشی",Bmn=()=>"مشروع توضيحي",Pmn=()=>"Proyecto de demostración",Fmn=()=>"डेमो प्रोजेक्ट",Hmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Imn():t==="fa"?$mn():t==="ar"?Bmn():t==="es"?Pmn():t==="hi"?Fmn():Lmn()}),qmn=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",Umn=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Gmn=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Kmn=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",Vmn=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Wmn=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",Qmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Umn():t==="fa"?Gmn():t==="ar"?Kmn():t==="es"?Vmn():t==="hi"?Wmn():qmn()}),Xmn=()=>"nanochat",Ymn=()=>"nanochat",Zmn=()=>"nanochat",Jmn=()=>"nanochat",egn=()=>"nanochat",tgn=()=>"nanochat",ngn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ymn():t==="fa"?Zmn():t==="ar"?Jmn():t==="es"?egn():t==="hi"?tgn():Xmn()}),rgn=()=>"Try the demo experiment",sgn=()=>"试试演示实验",ign=()=>"آزمایش نمایشی را امتحان کنید",agn=()=>"جرّب التجربة التوضيحية",ogn=()=>"Probar el experimento de demostración",cgn=()=>"डेमो प्रयोग आज़माएं",lgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sgn():t==="fa"?ign():t==="ar"?agn():t==="es"?ogn():t==="hi"?cgn():rgn()}),ugn=()=>"Couldn’t save your progress. Try again.",_gn=()=>"无法保存进度。请重试。",fgn=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",dgn=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",hgn=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",pgn=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",mgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_gn():t==="fa"?fgn():t==="ar"?dgn():t==="es"?hgn():t==="hi"?pgn():ugn()}),ggn=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",vgn=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",bgn=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",ygn=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",xgn=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",wgn=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",kgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vgn():t==="fa"?bgn():t==="ar"?ygn():t==="es"?xgn():t==="hi"?wgn():ggn()}),Sgn=()=>"Welcome to OpenResearch",Cgn=()=>"欢迎使用 OpenResearch",Egn=()=>"به OpenResearch خوش آمدید",Ngn=()=>"مرحبًا بك في OpenResearch",zgn=()=>"Te damos la bienvenida a OpenResearch",jgn=()=>"OpenResearch में आपका स्वागत है",Agn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cgn():t==="fa"?Egn():t==="ar"?Ngn():t==="es"?zgn():t==="hi"?jgn():Sgn()}),Tgn=()=>"All experiments are archived. Turn on Show archived to view them.",Rgn=()=>"所有实验均已归档。开启“显示已归档”即可查看。",Mgn=()=>"همه آزمایش‌ها بایگانی شده‌اند. برای دیدنشان نمایش بایگانی‌شده‌ها را فعال کنید.",Ogn=()=>"جميع التجارب مؤرشفة. فعّل إظهار المؤرشف لعرضها.",Dgn=()=>"Todos los experimentos están archivados. Activa Mostrar archivados para verlos.",Lgn=()=>"सभी प्रयोग संग्रहीत हैं। उन्हें देखने के लिए संग्रहीत दिखाएँ चालू करें।",Ign=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rgn():t==="fa"?Mgn():t==="ar"?Ogn():t==="es"?Dgn():t==="hi"?Lgn():Tgn()}),$gn=()=>"Archive ancestors",Bgn=()=>"归档祖先节点",Pgn=()=>"بایگانی نیاکان",Fgn=()=>"أرشفة الأسلاف",Hgn=()=>"Archivar antepasados",qgn=()=>"पूर्वजों को संग्रहीत करें",Ugn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bgn():t==="fa"?Pgn():t==="ar"?Fgn():t==="es"?Hgn():t==="hi"?qgn():$gn()}),Ggn=()=>"Archive descendants",Kgn=()=>"归档后代节点",Vgn=()=>"بایگانی نوادگان",Wgn=()=>"أرشفة الفروع التابعة",Qgn=()=>"Archivar descendientes",Xgn=()=>"वंशजों को संग्रहीत करें",Ygn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kgn():t==="fa"?Vgn():t==="ar"?Wgn():t==="es"?Qgn():t==="hi"?Xgn():Ggn()}),Zgn=()=>"Manage",Jgn=()=>"管理",e1n=()=>"مدیریت",t1n=()=>"إدارة",n1n=()=>"Gestionar",r1n=()=>"प्रबंधित करें",s1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jgn():t==="fa"?e1n():t==="ar"?t1n():t==="es"?n1n():t==="hi"?r1n():Zgn()}),i1n=e=>`Manage ${e==null?void 0:e.name}`,a1n=e=>`管理 ${e==null?void 0:e.name}`,o1n=e=>`مدیریت ${e==null?void 0:e.name}`,c1n=e=>`إدارة ${e==null?void 0:e.name}`,l1n=e=>`Gestionar ${e==null?void 0:e.name}`,u1n=e=>`${e==null?void 0:e.name} प्रबंधित करें`,vj=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?a1n(e):t==="fa"?o1n(e):t==="ar"?c1n(e):t==="es"?l1n(e):t==="hi"?u1n(e):i1n(e)}),_1n=()=>"Archive this experiment",f1n=()=>"归档此实验",d1n=()=>"بایگانی این آزمایش",h1n=()=>"أرشفة هذه التجربة",p1n=()=>"Archivar este experimento",m1n=()=>"इस प्रयोग को संग्रहीत करें",g1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f1n():t==="fa"?d1n():t==="ar"?h1n():t==="es"?p1n():t==="hi"?m1n():_1n()}),v1n=()=>"Archived",b1n=()=>"已归档",y1n=()=>"بایگانی‌شده",x1n=()=>"مؤرشف",w1n=()=>"Archivado",k1n=()=>"संग्रहीत",CI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b1n():t==="fa"?y1n():t==="ar"?x1n():t==="es"?w1n():t==="hi"?k1n():v1n()}),S1n=e=>`${e==null?void 0:e.count} archived`,C1n=e=>`${e==null?void 0:e.count} 个已归档`,E1n=e=>`${e==null?void 0:e.count} بایگانی‌شده`,N1n=e=>`${e==null?void 0:e.count} مؤرشفة`,z1n=e=>`${e==null?void 0:e.count} archivados`,j1n=e=>`${e==null?void 0:e.count} संग्रहीत`,A1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?C1n(e):t==="fa"?E1n(e):t==="ar"?N1n(e):t==="es"?z1n(e):t==="hi"?j1n(e):S1n(e)}),T1n=()=>"Baseline",R1n=()=>"基线",M1n=()=>"مبنا",O1n=()=>"الأساس",D1n=()=>"Base",L1n=()=>"बेसलाइन",I1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R1n():t==="fa"?M1n():t==="ar"?O1n():t==="es"?D1n():t==="hi"?L1n():T1n()}),$1n=()=>"Experiment",B1n=()=>"实验",P1n=()=>"آزمایش",F1n=()=>"تجربة",H1n=()=>"Experimento",q1n=()=>"प्रयोग",rl=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B1n():t==="fa"?P1n():t==="ar"?F1n():t==="es"?H1n():t==="hi"?q1n():$1n()}),U1n=e=>`${e==null?void 0:e.count} experiments`,G1n=e=>`${e==null?void 0:e.count} 个实验`,K1n=e=>`${e==null?void 0:e.count} آزمایش`,V1n=e=>`التجارب: ${e==null?void 0:e.count}`,W1n=e=>`${e==null?void 0:e.count} experimentos`,Q1n=e=>`${e==null?void 0:e.count} प्रयोग`,X1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?G1n(e):t==="fa"?K1n(e):t==="ar"?V1n(e):t==="es"?W1n(e):t==="hi"?Q1n(e):U1n(e)}),Y1n=()=>"hidden",Z1n=()=>"已隐藏",J1n=()=>"پنهان",evn=()=>"مخفية",tvn=()=>"ocultos",nvn=()=>"छिपे हुए",rvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z1n():t==="fa"?J1n():t==="ar"?evn():t==="es"?tvn():t==="hi"?nvn():Y1n()}),svn=()=>"1 experiment",ivn=()=>"1 个实验",avn=()=>"۱ آزمایش",ovn=()=>"تجربة واحدة",cvn=()=>"1 experimento",lvn=()=>"1 प्रयोग",uvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ivn():t==="fa"?avn():t==="ar"?ovn():t==="es"?cvn():t==="hi"?lvn():svn()}),_vn=()=>"Restore archived ancestors",fvn=()=>"恢复已归档的祖先节点",dvn=()=>"بازیابی نیاکان بایگانی‌شده",hvn=()=>"استعادة الأسلاف المؤرشفين",pvn=()=>"Restaurar antepasados archivados",mvn=()=>"संग्रहीत पूर्वजों को पुनर्स्थापित करें",gvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fvn():t==="fa"?dvn():t==="ar"?hvn():t==="es"?pvn():t==="hi"?mvn():_vn()}),vvn=e=>`Restore ${e==null?void 0:e.count} archived experiments`,bvn=e=>`恢复 ${e==null?void 0:e.count} 个已归档实验`,yvn=e=>`بازیابی ${e==null?void 0:e.count} آزمایش بایگانی‌شده`,xvn=e=>`استعادة ${e==null?void 0:e.count} تجارب مؤرشفة`,wvn=e=>`Restaurar ${e==null?void 0:e.count} experimentos archivados`,kvn=e=>`${e==null?void 0:e.count} संग्रहीत प्रयोग पुनर्स्थापित करें`,Svn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bvn(e):t==="fa"?yvn(e):t==="ar"?xvn(e):t==="es"?wvn(e):t==="hi"?kvn(e):vvn(e)}),Cvn=()=>"Restore descendants",Evn=()=>"恢复后代节点",Nvn=()=>"بازیابی نوادگان",zvn=()=>"استعادة الفروع التابعة",jvn=()=>"Restaurar descendientes",Avn=()=>"वंशजों को पुनर्स्थापित करें",Tvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Evn():t==="fa"?Nvn():t==="ar"?zvn():t==="es"?jvn():t==="hi"?Avn():Cvn()}),Rvn=()=>"Restore this experiment",Mvn=()=>"恢复此实验",Ovn=()=>"بازیابی این آزمایش",Dvn=()=>"استعادة هذه التجربة",Lvn=()=>"Restaurar este experimento",Ivn=()=>"इस प्रयोग को पुनर्स्थापित करें",EI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mvn():t==="fa"?Ovn():t==="ar"?Dvn():t==="es"?Lvn():t==="hi"?Ivn():Rvn()}),$vn=()=>"Running",Bvn=()=>"运行中",Pvn=()=>"در حال اجرا",Fvn=()=>"قيد التشغيل",Hvn=()=>"En ejecución",qvn=()=>"चल रहा है",Uvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bvn():t==="fa"?Pvn():t==="ar"?Fvn():t==="es"?Hvn():t==="hi"?qvn():$vn()}),Gvn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",Kvn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",Vvn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Wvn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",Qvn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",Xvn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",Yvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kvn():t==="fa"?Vvn():t==="ar"?Wvn():t==="es"?Qvn():t==="hi"?Xvn():Gvn()}),Zvn=()=>"Ask the agent in chat to create and run your first experiment.",Jvn=()=>"在聊天中让智能体创建并运行你的第一个实验。",ebn=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",tbn=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",nbn=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",rbn=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",sbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jvn():t==="fa"?ebn():t==="ar"?tbn():t==="es"?nbn():t==="hi"?rbn():Zvn()}),ibn=()=>"Code",abn=()=>"代码",obn=()=>"کد",cbn=()=>"الشيفرة",lbn=()=>"Código",ubn=()=>"कोड",_bn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?abn():t==="fa"?obn():t==="ar"?cbn():t==="es"?lbn():t==="hi"?ubn():ibn()}),fbn=()=>"Logs",dbn=()=>"日志",hbn=()=>"گزارش‌ها",pbn=()=>"السجلات",mbn=()=>"Logs",gbn=()=>"लॉग",NI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dbn():t==="fa"?hbn():t==="ar"?pbn():t==="es"?mbn():t==="hi"?gbn():fbn()}),vbn=()=>"No experiments from the current task yet",bbn=()=>"当前任务尚无实验",ybn=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",xbn=()=>"لا توجد تجارب من المهمة الحالية بعد",wbn=()=>"Aún no hay experimentos de la tarea actual",kbn=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",Sbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bbn():t==="fa"?ybn():t==="ar"?xbn():t==="es"?wbn():t==="hi"?kbn():vbn()}),Cbn=()=>"No experiments yet",Ebn=()=>"尚无实验",Nbn=()=>"هنوز آزمایشی وجود ندارد",zbn=()=>"لا توجد تجارب بعد",jbn=()=>"Aún no hay experimentos",Abn=()=>"अभी तक कोई प्रयोग नहीं",Tbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ebn():t==="fa"?Nbn():t==="ar"?zbn():t==="es"?jbn():t==="hi"?Abn():Cbn()}),Rbn=()=>"no runs",Mbn=()=>"无运行",Obn=()=>"بدون اجرا",Dbn=()=>"لا عمليات تشغيل",Lbn=()=>"sin ejecuciones",Ibn=()=>"कोई रन नहीं",$bn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mbn():t==="fa"?Obn():t==="ar"?Dbn():t==="es"?Lbn():t==="hi"?Ibn():Rbn()}),Bbn=()=>"Open logs",Pbn=()=>"打开日志",Fbn=()=>"باز کردن گزارش‌ها",Hbn=()=>"فتح السجلات",qbn=()=>"Abrir logs",Ubn=()=>"लॉग खोलें",Gbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pbn():t==="fa"?Fbn():t==="ar"?Hbn():t==="es"?qbn():t==="hi"?Ubn():Bbn()}),Kbn=()=>"Runs",Vbn=()=>"运行",Wbn=()=>"اجراها",Qbn=()=>"عمليات التشغيل",Xbn=()=>"Ejecuciones",Ybn=()=>"रन",Zbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vbn():t==="fa"?Wbn():t==="ar"?Qbn():t==="es"?Xbn():t==="hi"?Ybn():Kbn()}),Jbn=()=>"Switch to Entire project to see all experiments",eyn=()=>"切换到“整个项目”以查看所有实验",tyn=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",nyn=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",ryn=()=>"Cambia a Todo el proyecto para ver todos los experimentos",syn=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",iyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eyn():t==="fa"?tyn():t==="ar"?nyn():t==="es"?ryn():t==="hi"?syn():Jbn()}),ayn=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,oyn=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,cyn=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,lyn=e=>`تم التحديث إلى ${e==null?void 0:e.version}. أعد التشغيل لاستخدامه.`,uyn=e=>`Actualizado a la versión ${e==null?void 0:e.version}. Reinicia para usarla.`,_yn=e=>`${e==null?void 0:e.version} पर अपडेट हुआ। इस्तेमाल के लिए फिर से शुरू करें।`,fyn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oyn(e):t==="fa"?cyn(e):t==="ar"?lyn(e):t==="es"?uyn(e):t==="hi"?_yn(e):ayn(e)}),dyn=()=>"Dismiss",hyn=()=>"关闭",pyn=()=>"بستن",myn=()=>"تجاهل",gyn=()=>"Descartar",vyn=()=>"खारिज करें",byn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hyn():t==="fa"?pyn():t==="ar"?myn():t==="es"?gyn():t==="hi"?vyn():dyn()}),yyn=()=>"Restart now",xyn=()=>"立即重新启动",wyn=()=>"هم‌اکنون دوباره راه‌اندازی کن",kyn=()=>"أعد التشغيل الآن",Syn=()=>"Reiniciar ahora",Cyn=()=>"अभी फिर से शुरू करें",zI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xyn():t==="fa"?wyn():t==="ar"?kyn():t==="es"?Syn():t==="hi"?Cyn():yyn()}),Eyn=e=>`Could not restart: ${e==null?void 0:e.error}`,Nyn=e=>`无法重新启动:${e==null?void 0:e.error}`,zyn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,jyn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,Ayn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,Tyn=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,jI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nyn(e):t==="fa"?zyn(e):t==="ar"?jyn(e):t==="es"?Ayn(e):t==="hi"?Tyn(e):Eyn(e)}),Ryn=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",Myn=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",Oyn=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",Dyn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",Lyn=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",Iyn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",$yn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Myn():t==="fa"?Oyn():t==="ar"?Dyn():t==="es"?Lyn():t==="hi"?Iyn():Ryn()}),Byn=()=>"Restarting…",Pyn=()=>"正在重新启动…",Fyn=()=>"در حال راه‌اندازی مجدد…",Hyn=()=>"جارٍ إعادة التشغيل…",qyn=()=>"Reiniciando…",Uyn=()=>"फिर से शुरू हो रहा है…",AI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pyn():t==="fa"?Fyn():t==="ar"?Hyn():t==="es"?qyn():t==="hi"?Uyn():Byn()}),Gyn=()=>"macOS app",Kyn=()=>"macOS 应用",Vyn=()=>"برنامهٔ macOS",Wyn=()=>"تطبيق macOS",Qyn=()=>"App de macOS",Xyn=()=>"macOS ऐप",Yyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kyn():t==="fa"?Vyn():t==="ar"?Wyn():t==="es"?Qyn():t==="hi"?Xyn():Gyn()}),Zyn=()=>"Linux app (AppImage)",Jyn=()=>"Linux 应用(AppImage)",exn=()=>"برنامه لینوکس (AppImage)",txn=()=>"تطبيق Linux ‏(AppImage)",nxn=()=>"Aplicación para Linux (AppImage)",rxn=()=>"Linux ऐप (AppImage)",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=()=>"Installed with cargo",axn=()=>"通过 cargo 安装",oxn=()=>"نصب‌شده با cargo",cxn=()=>"مثبّت عبر cargo",lxn=()=>"Instalado con cargo",uxn=()=>"cargo से इंस्टॉल किया गया",_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=()=>"Installed with Homebrew",dxn=()=>"通过 Homebrew 安装",hxn=()=>"نصب‌شده با Homebrew",pxn=()=>"مثبّت عبر Homebrew",mxn=()=>"Instalado con Homebrew",gxn=()=>"Homebrew से इंस्टॉल किया गया",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=()=>"Installed with the orx installer",yxn=()=>"通过 orx 安装程序安装",xxn=()=>"نصب‌شده با نصب‌کنندهٔ orx",wxn=()=>"مثبّت عبر مُثبّت orx",kxn=()=>"Instalado con el instalador de orx",Sxn=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",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=()=>"Managed by Nix",Nxn=()=>"由 Nix 管理",zxn=()=>"مدیریت‌شده با Nix",jxn=()=>"مُدار بواسطة Nix",Axn=()=>"Gestionado por Nix",Txn=()=>"Nix द्वारा प्रबंधित",Rxn=((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()}),Mxn=()=>"Portable orx.exe",Oxn=()=>"便携版 orx.exe",Dxn=()=>"orx.exe قابل‌حمل",Lxn=()=>"‏orx.exe المحمول",Ixn=()=>"orx.exe portable",$xn=()=>"पोर्टेबल orx.exe",Bxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oxn():t==="fa"?Dxn():t==="ar"?Lxn():t==="es"?Ixn():t==="hi"?$xn():Mxn()}),Pxn=()=>"Unknown install",Fxn=()=>"未知安装方式",Hxn=()=>"روش نصب نامشخص",qxn=()=>"تثبيت غير معروف",Uxn=()=>"Instalación desconocida",Gxn=()=>"अज्ञात इंस्टॉल",Kxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fxn():t==="fa"?Hxn():t==="ar"?qxn():t==="es"?Uxn():t==="hi"?Gxn():Pxn()}),Vxn=()=>"Re-run your cargo install to update.",Wxn=()=>"重新运行 cargo 安装命令以更新。",Qxn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",Xxn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",Yxn=()=>"Vuelve a ejecutar cargo install para actualizar.",Zxn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",Jxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wxn():t==="fa"?Qxn():t==="ar"?Xxn():t==="es"?Yxn():t==="hi"?Zxn():Vxn()}),e2n=()=>"Run brew upgrade to update.",t2n=()=>"运行 brew upgrade 以更新。",n2n=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",r2n=()=>"نفّذ brew upgrade للتحديث.",s2n=()=>"Ejecuta brew upgrade para actualizar.",i2n=()=>"अपडेट करने के लिए brew upgrade चलाएं।",a2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t2n():t==="fa"?n2n():t==="ar"?r2n():t==="es"?s2n():t==="hi"?i2n():e2n()}),o2n=()=>"Update it through your Nix configuration.",c2n=()=>"通过 Nix 配置进行更新。",l2n=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",u2n=()=>"حدّثه عبر إعداد Nix الخاص بك.",_2n=()=>"Actualízalo desde tu configuración de Nix.",f2n=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",d2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c2n():t==="fa"?l2n():t==="ar"?u2n():t==="es"?_2n():t==="hi"?f2n():o2n()}),h2n=()=>"Close",p2n=()=>"关闭",m2n=()=>"بستن",g2n=()=>"إغلاق",v2n=()=>"Cerrar",b2n=()=>"बंद करें",y2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p2n():t==="fa"?m2n():t==="ar"?g2n():t==="es"?v2n():t==="hi"?b2n():h2n()}),x2n=()=>"Maximize",w2n=()=>"最大化",k2n=()=>"بزرگ کردن",S2n=()=>"تكبير",C2n=()=>"Maximizar",E2n=()=>"बड़ा करें",N2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w2n():t==="fa"?k2n():t==="ar"?S2n():t==="es"?C2n():t==="hi"?E2n():x2n()}),z2n=()=>"Minimize",j2n=()=>"最小化",A2n=()=>"کوچک کردن",T2n=()=>"تصغير",R2n=()=>"Minimizar",M2n=()=>"छोटा करें",O2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j2n():t==="fa"?A2n():t==="ar"?T2n():t==="es"?R2n():t==="hi"?M2n():z2n()}),D2n=()=>"Restore",L2n=()=>"还原",I2n=()=>"بازیابی",$2n=()=>"استعادة",B2n=()=>"Restaurar",P2n=()=>"पुनर्स्थापित करें",F2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L2n():t==="fa"?I2n():t==="ar"?$2n():t==="es"?B2n():t==="hi"?P2n():D2n()}),H2n=()=>"Active Experiments",q2n=()=>"活跃实验",U2n=()=>"آزمایش‌های فعال",G2n=()=>"التجارب النشطة",K2n=()=>"Experimentos activos",V2n=()=>"सक्रिय प्रयोग",W2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q2n():t==="fa"?U2n():t==="ar"?G2n():t==="es"?K2n():t==="hi"?V2n():H2n()}),Q2n=()=>"Default compute",X2n=()=>"默认计算目标",Y2n=()=>"محاسبات پیش‌فرض",Z2n=()=>"الحوسبة الافتراضية",J2n=()=>"Cómputo predeterminado",ewn=()=>"डिफ़ॉल्ट कंप्यूट",twn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X2n():t==="fa"?Y2n():t==="ar"?Z2n():t==="es"?J2n():t==="hi"?ewn():Q2n()}),nwn=()=>"More tools",rwn=()=>"更多工具",swn=()=>"ابزارهای بیشتر",iwn=()=>"مزيد من الأدوات",awn=()=>"Más herramientas",own=()=>"और टूल",bj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rwn():t==="fa"?swn():t==="ar"?iwn():t==="es"?awn():t==="hi"?own():nwn()}),cwn=()=>"Terminal",lwn=()=>"终端",uwn=()=>"ترمینال",_wn=()=>"الطرفية",fwn=()=>"Terminal",dwn=()=>"टर्मिनल",Fv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lwn():t==="fa"?uwn():t==="ar"?_wn():t==="es"?fwn():t==="hi"?dwn():cwn()}),hwn=()=>"The terminal disconnected.",pwn=()=>"终端连接已断开。",mwn=()=>"ارتباط ترمینال قطع شد.",gwn=()=>"انقطعت الطرفية.",vwn=()=>"La terminal se desconectó.",bwn=()=>"टर्मिनल डिस्कनेक्ट हो गया।",yj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pwn():t==="fa"?mwn():t==="ar"?gwn():t==="es"?vwn():t==="hi"?bwn():hwn()}),ywn=e=>`Shell exited with code ${e==null?void 0:e.code}.`,xwn=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,wwn=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,kwn=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,Swn=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,Cwn=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,Ewn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xwn(e):t==="fa"?wwn(e):t==="ar"?kwn(e):t==="es"?Swn(e):t==="hi"?Cwn(e):ywn(e)}),Nwn=()=>"Restart shell",zwn=()=>"重新启动 Shell",jwn=()=>"راه‌اندازی دوباره پوسته",Awn=()=>"إعادة تشغيل Shell",Twn=()=>"Reiniciar shell",Rwn=()=>"शेल फिर से शुरू करें",Mwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zwn():t==="fa"?jwn():t==="ar"?Awn():t==="es"?Twn():t==="hi"?Rwn():Nwn()}),Own=()=>"This worktree",Dwn=()=>"当前工作树",Lwn=()=>"این درخت کاری",Iwn=()=>"شجرة العمل هذه",$wn=()=>"Este árbol de trabajo",Bwn=()=>"यह वर्कट्री",Pwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dwn():t==="fa"?Lwn():t==="ar"?Iwn():t==="es"?$wn():t==="hi"?Bwn():Own()}),Fwn=()=>"Workspace",Hwn=()=>"工作区",qwn=()=>"فضای کاری",Uwn=()=>"مساحة العمل",Gwn=()=>"Espacio de trabajo",Kwn=()=>"वर्कस्पेस",vw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hwn():t==="fa"?qwn():t==="ar"?Uwn():t==="es"?Gwn():t==="hi"?Kwn():Fwn()}),Vwn=e=>`Current worktree · ${e==null?void 0:e.branch}`,Wwn=e=>`当前工作树 · ${e==null?void 0:e.branch}`,Qwn=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,Xwn=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,Ywn=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,Zwn=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,Jwn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Wwn(e):t==="fa"?Qwn(e):t==="ar"?Xwn(e):t==="es"?Ywn(e):t==="hi"?Zwn(e):Vwn(e)}),e4n=e=>`Default branch · ${e==null?void 0:e.branch}`,t4n=e=>`默认分支 · ${e==null?void 0:e.branch}`,n4n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,r4n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,s4n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,i4n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,a4n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?t4n(e):t==="fa"?n4n(e):t==="ar"?r4n(e):t==="es"?s4n(e):t==="hi"?i4n(e):e4n(e)}),o4n=e=>`detached at ${e==null?void 0:e.branch}`,c4n=e=>`分离于 ${e==null?void 0:e.branch}`,l4n=e=>`جدا در ${e==null?void 0:e.branch}`,u4n=e=>`منفصل عند ${e==null?void 0:e.branch}`,_4n=e=>`desacoplado en ${e==null?void 0:e.branch}`,f4n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,d4n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c4n(e):t==="fa"?l4n(e):t==="ar"?u4n(e):t==="es"?_4n(e):t==="hi"?f4n(e):o4n(e)}),h4n=()=>"Listing truncated.",p4n=()=>"列表已截断。",m4n=()=>"فهرست کوتاه شده است.",g4n=()=>"القائمة مقتطعة.",v4n=()=>"Listado truncado.",b4n=()=>"सूची छोटी की गई।",y4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p4n():t==="fa"?m4n():t==="ar"?g4n():t==="es"?v4n():t==="hi"?b4n():h4n()}),x4n=()=>"Loading…",w4n=()=>"正在加载…",k4n=()=>"در حال بارگیری…",S4n=()=>"جارٍ التحميل…",C4n=()=>"Cargando…",E4n=()=>"लोड हो रहा है…",N4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w4n():t==="fa"?k4n():t==="ar"?S4n():t==="es"?C4n():t==="hi"?E4n():x4n()}),z4n=()=>"No changes yet.",j4n=()=>"尚无更改。",A4n=()=>"هنوز تغییری وجود ندارد.",T4n=()=>"لا توجد تغييرات بعد.",R4n=()=>"Aún no hay cambios.",M4n=()=>"अभी तक कोई बदलाव नहीं।",O4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j4n():t==="fa"?A4n():t==="ar"?T4n():t==="es"?R4n():t==="hi"?M4n():z4n()}),D4n=()=>"No files.",L4n=()=>"没有文件。",I4n=()=>"فایلی وجود ندارد.",$4n=()=>"لا توجد ملفات.",B4n=()=>"No hay archivos.",P4n=()=>"कोई फ़ाइल नहीं।",F4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L4n():t==="fa"?I4n():t==="ar"?$4n():t==="es"?B4n():t==="hi"?P4n():D4n()}),H4n=()=>"Refresh failed:",q4n=()=>"刷新失败:",U4n=()=>"تازه‌سازی ناموفق بود:",G4n=()=>"فشل التحديث:",K4n=()=>"Error al actualizar:",V4n=()=>"रीफ़्रेश विफल:",W4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q4n():t==="fa"?U4n():t==="ar"?G4n():t==="es"?K4n():t==="hi"?V4n():H4n()}),Ce=e=>`⁦${e}⁩`,_a=e=>`⁨${e}⁩`,Jt=e=>new Intl.NumberFormat(E()).format(e),Wp="demo_nanochat_v1",Vo=e=>e.startsWith("demo_"),Xd="chat_demo_nanochat_v1",qb="chat_demo_nanochat_figures_v1",Ub="chat_demo_nanochat_literature_v1",Q4n={[Xd]:"cpu_end_to_end",[qb]:"figures",[Ub]:"literature"},bw="cpu-apple-silicon-pipeline-results.md",X4n={[Xd]:"msg_demo_nanochat_assistant_v1",[qb]:"msg_demo_nanochat_figures_assistant_v1",[Ub]:"msg_demo_nanochat_literature_assistant_v1"},xj="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 U3 extends Error{constructor(t,r,s){super(t);Qs(this,"currentVersion");Qs(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function pa(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}function Y4n(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 TI(e){return[...e].sort((t,r)=>r.createdAt-t.createdAt).map(Y4n).find(t=>t!==null)??null}const RI=new WeakMap;async function wi(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 U3(s,a,i.exists)}}catch(i){if(i instanceof U3)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=RI.get(e);if(t&&!zn(t))throw new DOMException("Workspace changed","AbortError");return n}const zt=(e,n)=>fetch(e,{signal:n}).then(t=>wi(t));async function Ca(e,n){const t=yi(),r=await fetch(e,n);if(!zn(t))throw new DOMException("Workspace changed","AbortError");return RI.set(r,t),r.ok&&uX(e,t),r}const mt=(e,n,t=!1)=>Ca(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>wi(r)),kl=(e,n)=>Ca(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>wi(t)),MI=(e,n)=>Ca(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>wi(t)),Z4n=e=>zt("/api/projects",e).then(n=>n.projects),J4n=e=>zt("/api/projects/activity",e).then(n=>n.activity),G3="agentic",e3n=e=>zt("/api/settings/ui-state",e),t3n=(e,n)=>zt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),n3n=(e,n,t=!1)=>mt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),r3n=(e,n=!1)=>mt("/api/settings/ui-state",{workspace:e},n),s3n=e=>mt("/api/settings/ui-state",e),i3n=(e,n)=>mt("/api/onboarding/complete",{...e,...n}),a3n=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return zt(`/api/project-path/status${t}`,n)},o3n=()=>mt("/api/project-path/pick").then(e=>e.path),c3n=e=>mt("/api/projects",e),l3n=(e,n)=>zt(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),u3n=e=>zt("/api/github/account",e),_3n=(e,n)=>zt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),f3n=(e,n,t)=>zt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),d3n=(e,n)=>zt(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),h3n=e=>mt("/api/projects/starter-prompts/prewarm",e),p3n=(e,n,t,r,s)=>zt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),m3n=e=>mt(`/api/projects/${e}/open`).then(n=>n.project),g3n=e=>Ca(`/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})`)}cX(e)}),v3n=(e,n)=>zt(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),b3n=(e,n,t)=>kl(`/api/experiments/${e}/archive`,{direction:n,archived:t}),y3n=(e,n)=>zt(`/api/projects/${e}/runs`,n).then(t=>t.runs),OI=e=>mt(`/api/runs/${e}/cancel`).then(()=>{}),x3n=(e,n)=>zt(`/api/runs/${e}/log?offset=${n}`),w3n=(e,n)=>zt(`/api/runs/${e}/diff`,n),k3n=(e,n)=>zt(`/api/experiments/${e}/diff`,n),Sl=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),S3n=(e,n,t={},r)=>zt(`/api/projects/${e}/file?${Sl(t,new URLSearchParams({path:n}))}`,r),K3=(e,n,t={})=>`/api/projects/${e}/file/raw?${Sl(t,new URLSearchParams({path:n}))}`,C3n=(e,n)=>zt(`/api/files/abs?path=${encodeURIComponent(e)}`,n),DI=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,E3n=(e,n,t,r)=>MI(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),N3n=(e,n,t,r={})=>kl(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),z3n=(e,n,t={})=>mt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),MS=(e,n,t={})=>mt(`/api/projects/${e}/file/reveal`,{path:n,...t}),j3n=(e,n,t)=>zt(`/api/projects/${e}/file/location?${Sl(n,new URLSearchParams({path:n.path,source:n.source}))}`,t),A3n=(e,n,t,r)=>zt(`/api/projects/${e}/files/search?${new URLSearchParams({q:n,...t?{after:t}:{}})}`,r),T3n=e=>zt("/api/latex/engine",e),R3n=(e,n,t={})=>mt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),M3n=e=>zt("/api/overleaf/settings",e),LI=e=>mt("/api/overleaf/token",{token:e}),O3n=()=>Ca("/api/overleaf/token",{method:"DELETE"}).then(e=>wi(e)),II=(e,n={})=>mt("/api/overleaf/session",{session:e,host:n.host}),D3n=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>wi(e)),L3n=(e={})=>mt("/api/overleaf/session/import",{host:e.host}),I3n=(e,n,t={})=>mt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),$3n=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${Sl(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>wi(r)),B3n=(e,n,t={},r)=>zt(`/api/projects/${e}/file/overleaf?${Sl(t,new URLSearchParams({path:n}))}`,r),P3n=(e,n,t)=>mt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),F3n=(e,n,t={})=>Ca(`/api/projects/${e}/file/overleaf?${Sl(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>wi(r)),H3n=(e,n,t={})=>mt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),q3n=(e,n,t={},r)=>zt(`/api/projects/${e}/file/overleaf/status?${Sl(t,new URLSearchParams({path:n}))}`,r),U3n=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Sl(t,new URLSearchParams({path:n}))}`,G3n=(e,n={},t)=>{const r=Sl(n).toString();return zt(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},K3n=(e,n)=>zt(`/api/chat/sessions/${e}/worktree`,n),Gb=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,V3n=e=>zt("/api/settings/hf",e),W3n=e=>mt("/api/settings/hf",{token:e}),Q3n=e=>zt("/api/settings/tinker",e),X3n=e=>mt("/api/settings/tinker",{key:e}),Y3n=e=>zt("/api/update",e),Z3n=()=>mt("/api/update/apply"),J3n=()=>mt("/api/update/restart"),e5n=e=>mt("/api/update/auto",{enabled:e}),t5n=(e=!1)=>mt("/api/update/install-cli",{force:e}),n5n=e=>zt("/api/settings/k8s",e),r5n=e=>mt("/api/settings/k8s",e),s5n=e=>zt("/api/settings/modal",e),i5n=(e,n)=>mt("/api/settings/modal",{tokenId:e,tokenSecret:n}),a5n=e=>zt("/api/settings/env",e).then(n=>n.vars),$I=(e,n)=>mt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),o5n=e=>Ca(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n)).then(n=>n.vars),c5n=e=>zt("/api/settings/data-dir",e),l5n=e=>mt("/api/settings/data-dir/validate",{path:e}),u5n=e=>mt("/api/settings/data-dir/move",{path:e}),_5n=e=>zt("/api/settings/ssh",e),f5n=e=>mt("/api/settings/ssh",e),d5n=e=>mt("/api/settings/ssh/default",{host:e}),h5n=(e,n)=>mt("/api/settings/ssh/preflight",{host:e,container:n}),p5n=e=>zt("/api/settings/ssh/config",e),m5n=(e,n)=>MI("/api/settings/ssh/config",{content:e,previousContent:n}),g5n=(e,n)=>zt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),v5n=e=>zt("/_orx/runtime",e),b5n=e=>zt("/api/remote/sessions",e).then(n=>n.sessions),y5n=(e,n)=>mt("/api/remote/sessions",{host:e,uiPreferences:n}),x5n=e=>mt("/_orx/install",e),w5n=()=>mt("/_orx/reconnect"),BI=()=>mt("/_orx/disconnect"),k5n=()=>mt("/_orx/start-host"),PI=()=>zt("/_orx/stop-host"),FI=e=>mt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),S5n=e=>zt("/api/settings/slurm",e),C5n=e=>mt("/api/settings/slurm",e),E5n=e=>zt("/api/settings/ray",e),N5n=e=>mt("/api/settings/ray",e),z5n=e=>mt("/api/settings/ray/preflight",{address:e??null}),j5n=(e,n)=>zt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),A5n=e=>mt("/api/settings/compute/default",e),T5n=e=>zt("/api/settings/local",e),R5n=e=>zt("/api/settings/openresearch",e),M5n=(e,n)=>zt(`/api/projects/${e}/files`,n),O5n=(e,n)=>Ca(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>wi(t)),D5n=(e,n,t)=>kl(`/api/projects/${e}/files`,{path:n,...t}),df=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,HI=512e3,L5n=(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}}},I5n=(e,n,t)=>fetch(df(e,n),{signal:t,headers:{Range:`bytes=0-${HI-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=>L5n(a,Number.isFinite(s)&&s>a.byteLength))}),$5n=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",B5n=(e,n,t)=>fetch(df(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:$5n(s)?s:"download"}}),P5n=e=>zt("/api/settings/profile",e),F5n=e=>zt("/api/settings/lit-sources",e),H5n=e=>mt("/api/settings/lit-sources",e),q5n=e=>zt("/api/settings/projects",e),qI=(e,n)=>mt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),U5n=(e,n)=>zt(`/api/projects/${e}/git`,n),G5n=e=>mt(`/api/projects/${e}/git/init`),K5n=e=>mt(`/api/projects/${e}/github`),V5n=e=>mt(`/api/projects/${e}/github/disable`),W5n=e=>zt("/api/settings/telemetry",e),Q5n=e=>mt("/api/settings/telemetry",{enabled:e}),vu=e=>{mt("/api/telemetry/event",e).catch(()=>{})},UI=e=>{mt("/api/telemetry/locale",{locale:e}).catch(()=>{})};function nv(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??W3(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"?kS():n,r=W3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${r} · ${t}`:r}const Hv="default";function Kb(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===Hv)?Hv:((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 V3="default";function GI(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:V3,label:Njt(),description:yjt()},...t]:[]}function qv(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=GI(e,n);return s.length===0?V3:t!=null&&s.some(a=>a.id===t)?t:V3}function KI(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Kb(e,n);return r.length===0?Hv:t&&r.some(i=>i.id===t)?t:s}const X5n=e=>zt("/api/harnesses/setup/commands",e),VI=(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 zt(`/api/harnesses${s}`,t).then(i=>i.harnesses)},Y5n=(e,n,t)=>{const r=new URLSearchParams({...n?{harness:n}:{},...t?{project:t}:{}});return zt(`/api/skills${r.size?`?${r}`:""}`,e)},Z5n=(e,n,t,r)=>zt(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...n?{project:n}:{},...r?{harness:r}:{}})}`}`,t).then(s=>s.content),J5n=e=>zt("/api/latex-templates",e).then(n=>n.templates),ekn=e=>mt("/api/latex-templates",e).then(n=>n.template),tkn=e=>Ca(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n)),nkn=e=>zt("/api/user-skills",e),rkn=e=>mt("/api/user-skills",e).then(n=>n.skill),skn=e=>Ca(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n));function W3(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 ikn=(e,n)=>zt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),akn=e=>zt("/api/chat/native-sessions",e).then(n=>n.chats),okn=(e,n)=>mt("/api/chat/native-sessions/import",{projectId:e,harness:n.harness,nativeId:n.nativeId,title:n.title}).then(t=>t.session),ckn=e=>zt("/api/chat/sessions?scope=all",e).then(n=>n.sessions),lkn=(e,n,t={})=>mt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),Q3=e=>Ca(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>wi(n).then(t=>(Fb(e),t))),ukn=(e,n)=>kl(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),_kn=(e,n)=>kl(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),fkn=(e,n)=>kl(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),dkn=e=>mt(`/api/chat/sessions/${e}/side`,{}).then(n=>n.session),hkn=(e,n)=>kl(`/api/chat/sessions/${e}`,{goal:n}).then(t=>t.session),pkn=(e,n)=>kl(`/api/chat/sessions/${e}`,{autonomy:n}).then(t=>t.session),mkn=(e,n)=>kl(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),gkn=(e,n)=>zt(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),vkn=(e,n)=>Ca(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>wi(t)),bkn=(e,n)=>mt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),ykn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,X3=(e,n,t={},r,s,i,a)=>mt(`/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}),xkn=e=>mt(`/api/chat/sessions/${e}/compact`,{}),wkn=(e,n)=>mt(`/api/chat/sessions/${e}/shell`,{command:n}),kkn=(e,n,t,r={})=>mt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),Skn=(e,n,t)=>mt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),Ckn=(e,n)=>mt(`/api/chat/sessions/${e}/branch`,{leafId:n}),Ekn=e=>mt(`/api/chat/sessions/${e}/interrupt`),Nkn=(e,n)=>mt(`/api/chat/sessions/${e}/respond`,n);function vo(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 $0(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return cLe({value:Jt(n)});const t=Math.floor(n/60);if(t<60)return tLe({value:Jt(t)});const r=Math.floor(t/60);return r<24?WDe({hours:Jt(r),minutes:Jt(t%60)}):FDe({days:Jt(Math.floor(r/24)),hours:Jt(r%24)})}function _l(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&rzt("/api/local-models",e),Akn=e=>mt("/api/local-models/discover",e),Tkn=e=>mt("/api/local-models",e),Rkn=e=>mt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),Mkn=e=>Ca(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n)),wj=()=>({queryKey:kt("getHfSettings"),queryFn:({signal:e})=>V3n(e),staleTime:3e5}),kj=()=>({queryKey:kt("getTinkerSettings"),queryFn:({signal:e})=>Q3n(e),staleTime:3e5}),Sj=()=>({queryKey:kt("getK8sSettings"),queryFn:({signal:e})=>n5n(e),staleTime:3e4}),Cj=()=>({queryKey:kt("getModalSettings"),queryFn:({signal:e})=>s5n(e),staleTime:3e5}),Okn=()=>({queryKey:kt("getSlurmSettings"),queryFn:({signal:e})=>S5n(e),staleTime:3e5}),Dkn=()=>({queryKey:kt("getRaySettings"),queryFn:({signal:e})=>E5n(e),staleTime:3e5}),WI=e=>({queryKey:kt("getComputeSettings",e??null),queryFn:({signal:n})=>j5n(e,n),staleTime:3e4}),Lkn=()=>({queryKey:kt("getLocalMachine"),queryFn:({signal:e})=>T5n(e),staleTime:3e5}),Ikn=()=>({queryKey:kt("getOpenResearchSettings"),queryFn:({signal:e})=>R5n(e),staleTime:3e4}),$kn=()=>({queryKey:kt("getEnvVars"),queryFn:({signal:e})=>a5n(e),staleTime:3e5}),Bkn=()=>({queryKey:kt("getDataDir"),queryFn:({signal:e})=>c5n(e),staleTime:3e5}),QI=()=>({queryKey:kt("getSshSettings"),queryFn:({signal:e})=>_5n(e),staleTime:3e4}),Pkn=()=>({queryKey:kt("getSshConfig"),queryFn:({signal:e})=>p5n(e),staleTime:3e5}),Ej=e=>({queryKey:kt("getSshMasterStatus",e),queryFn:({signal:n})=>g5n(e,n),staleTime:5e3}),Fkn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>v5n(e),staleTime:2e3}),Hkn=()=>({queryKey:kt("listRemoteSessions"),queryFn:({signal:e})=>b5n(e),staleTime:3e4}),Uv=()=>({queryKey:kt("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>Kh(n,t,()=>Y3n(e)),staleTime:3e4}),qkn=()=>({queryKey:kt("getProfile"),queryFn:({signal:e})=>P5n(e),staleTime:3e5}),Ukn=()=>({queryKey:kt("getLitSources"),queryFn:({signal:e})=>F5n(e),staleTime:3e5}),DS=()=>({queryKey:kt("getProjectDefaults"),queryFn:({signal:e})=>q5n(e),staleTime:3e5}),Gkn=e=>({queryKey:kt("getProjectGitStatus",e),queryFn:({signal:n})=>U5n(e,n),staleTime:3e4}),Kkn=()=>({queryKey:kt("getTelemetry"),queryFn:({signal:e})=>W5n(e),staleTime:3e5}),XI=()=>({queryKey:kt("getHarnessSetupCommands"),queryFn:({signal:e})=>X5n(e),staleTime:1/0}),Bu=()=>({queryKey:kt("getHarnesses"),queryFn:({signal:e})=>VI(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),Vkn=(e,n)=>({queryKey:kt("getSkills",e??null,n??null),queryFn:({signal:t})=>Y5n(t,e,n),select:t=>t.skills,refetchInterval:t=>{var r;return(r=t.state.data)!=null&&r.importing?2e3:3e4},staleTime:3e5}),Wkn=(e,n,t)=>({queryKey:kt("getSkillContent",e,n??null,t??null),queryFn:({signal:r})=>Z5n(e,n,r,t),staleTime:3e5}),Qkn=()=>({queryKey:kt("listLatexTemplates"),queryFn:({signal:e})=>J5n(e),refetchInterval:3e4,staleTime:3e5}),Xkn=()=>({queryKey:kt("listUserSkills"),queryFn:({signal:e})=>nkn(e),select:e=>e.skills,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5});async function hf(e=!1,n=!1){const t=Bu();if(!e&&!n)return tt.fetchQuery(t);await tt.cancelQueries(t);const r=await VI(e,n);return zn(t.queryKey)&&tt.setQueryData(t.queryKey,r),r}const Ykn=()=>({queryKey:kt("getLocalModels"),queryFn:({signal:e})=>jkn(e),staleTime:3e4}),Gi=e=>({queryKey:kt("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>Kh(t,r,async()=>{const s=await ikn(e,n),i=t.getQueryData(r);return s.filter(a=>!bl.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)}})},jm),staleTime:3e4}),YI=()=>({queryKey:kt("listNativeChats"),queryFn:({signal:e})=>akn(e),staleTime:0}),Zkn=()=>({queryKey:kt("listAllChatSessions"),queryFn:async({signal:e})=>(await ckn(e)).filter(n=>!bl.has(n.id)),staleTime:0}),ac=e=>({queryKey:kt("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var h;const s=t.getQueryData(r),i=await Kh(t,r,()=>gkn(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:jm(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||!((h=a.activeLeafId)!=null&&h.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),rf="local-",ZI="bash";function Nj(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(rf)),n]}function Jkn(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(rf),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:Nj(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:`${rf}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:ZI,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?Nj(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:`${rf}${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 JI=0;function e$(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}tt.getQueryCache().subscribe(e=>{e$(e)&&JI++});const eSn=e=>tt.getQueryCache().subscribe(n=>{e$(n)&&e()}),tSn=()=>JI;function nSn(e,n){const t=tt.getQueryData(Gi(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=tt.getQueryData(ac(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function t$(e,n,t=!1){if(n.type==="busy"){oo(tt,Gi(e).queryKey,n.sessionId),tt.setQueryData(Gi(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=ac(n.sessionId);if(bl.has(n.sessionId))return;oo(tt,r.queryKey,n.type==="upsertMessage"?`message:${n.message.id}`:n.type==="setQueued"?"queued":n.type==="activeLeaf"?"branch":"local");const s=tt.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=Jkn(i,n),o={messages:a.messagesBySession[n.sessionId]??[],queued:a.queuedBySession[n.sessionId]??[],activeLeafId:a.activeLeafBySession[n.sessionId]??null};tt.setQueryData(r.queryKey,o)}function rSn(e,n){const t=!!n&&!bl.has(n??""),r=ut({...ac(n??""),enabled:t,subscribed:t}),s=T.useSyncExternalStore(eSn,tSn),i=T.useMemo(()=>nSn(e,n),[e,n,s]),a=yi()[1],o=T.useCallback(c=>{zn(["workspace",a])&&t$(e,c)},[e,a]);return[i,o,r]}const rv=new Map;function sSn(e,n){let t=rv.get(e);return t||(t=new Set,rv.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&rv.delete(e)}}function iSn(e){var n;(n=rv.get(e.runId))==null||n.forEach(t=>t(e))}const Y3=new Set;function Gv(e){return Y3.add(e),()=>{Y3.delete(e)}}function Xc(e){Y3.forEach(n=>n(e))}const Z3=new Set;function aSn(e){return Z3.add(e),()=>{Z3.delete(e)}}function Yc(){Z3.forEach(e=>e())}const J3=new Set;function oSn(e){return J3.add(e),()=>{J3.delete(e)}}const e5=new Set;function cSn(e){return e5.add(e),()=>{e5.delete(e)}}function lSn(){e5.forEach(e=>e())}function zj(e){J3.forEach(n=>n(e))}const t5=new Set;function n$(e){return t5.add(e),()=>{t5.delete(e)}}function yw(e){t5.forEach(n=>n(e))}const n5=new Set;function uSn(e){return n5.add(e),()=>{n5.delete(e)}}function jj(e){n5.forEach(n=>n(e))}const r5=new Set;function _Sn(e){return r5.add(e),()=>{r5.delete(e)}}function fSn(e){r5.forEach(n=>n(e))}let s5=!0;const i5=new Set;function dSn(e){return i5.add(e),()=>{i5.delete(e)}}function Aj(){return s5}function Tj(e){e!==s5&&(s5=e,i5.forEach(n=>n()))}const hSn=8e3,pSn=3e3;function mSn(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(()=>Tj(!1),hSn)),c.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},pSn)))},c.onopen=()=>{var h,f;r||(window.clearTimeout(s),s=void 0,Tj(!0),a&&(Xc({type:"reconnected"}),Yc(),zj({harness:"*",authState:"unknown"}),(f=(h=n.current).onReconnect)==null||f.call(h)),a=!0)};const u=h=>{try{return JSON.parse(h.data)}catch{return null}};c.addEventListener("resync.required",()=>{var h,f;Xc({type:"reconnected"}),Yc(),(f=(h=n.current).onReconnect)==null||f.call(h)}),c.addEventListener("run.updated",h=>{const f=u(h);f!=null&&f.run&&(Yc(),n.current.onRun(f.run))}),c.addEventListener("experiment.updated",h=>{var p,m;const f=u(h);f!=null&&f.experiment&&(Yc(),(m=(p=n.current).onExperiment)==null||m.call(p,f.experiment))}),c.addEventListener("project.updated",h=>{var p,m;const f=u(h);f!=null&&f.project&&(Yc(),(m=(p=n.current).onProject)==null||m.call(p,f.project))}),c.addEventListener("files.updated",h=>{var p,m;const f=u(h);f!=null&&f.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,f.projectId))}),c.addEventListener("run.log",h=>{const f=u(h);f!=null&&f.runId&&iSn(f)}),c.addEventListener("chat.session",h=>{const f=u(h);f!=null&&f.session&&(Yc(),Xc({type:"session",session:f.session}))}),c.addEventListener("chat.session.deleted",h=>{const f=u(h);f!=null&&f.sessionId&&(Yc(),Xc({type:"sessionDeleted",sessionId:f.sessionId}))}),c.addEventListener("chat.message",h=>{const f=u(h);f!=null&&f.message&&(Yc(),Xc({type:"message",sessionId:f.sessionId,message:f.message}))}),c.addEventListener("chat.busy",h=>{const f=u(h);f!=null&&f.sessionId&&(Yc(),Xc({type:"busy",sessionId:f.sessionId,busy:f.busy}))}),c.addEventListener("chat.usage",h=>{const f=u(h);f!=null&&f.sessionId&&f.usage&&Xc({type:"usage",sessionId:f.sessionId,usage:f.usage})}),c.addEventListener("chat.queued",h=>{const f=u(h);f!=null&&f.sessionId&&Xc({type:"queued",sessionId:f.sessionId,items:f.items??[]})}),c.addEventListener("chat.branch",h=>{const f=u(h);f!=null&&f.sessionId&&Xc({type:"branch",sessionId:f.sessionId,activeLeafId:f.activeLeafId??null})}),c.addEventListener("harness.auth",h=>{const f=u(h);f!=null&&f.harness&&f.authState&&zj(f)}),c.addEventListener("harness.catalog",()=>lSn()),c.addEventListener("datadir.move.progress",h=>{const f=u(h);f&&yw({type:"progress",...f})}),c.addEventListener("datadir.move.done",h=>{const f=u(h);f&&yw({type:"done",path:f.path,oldPathLeft:f.oldPathLeft})}),c.addEventListener("datadir.move.error",h=>{const f=u(h);f&&yw({type:"error",error:f.error})}),c.addEventListener("update.status",h=>{const f=u(h);f&&fSn(f)}),c.addEventListener("overleaf.live",h=>{const f=u(h);f!=null&&f.key&&f.status&&jj({type:"live",key:f.key,status:f.status})}),c.addEventListener("overleaf.pulled",h=>{const f=u(h);f!=null&&f.key&&Array.isArray(f.paths)&&jj({type:"pulled",key:f.key,paths:f.paths})})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const Kv=new Set;function gSn(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 Kv.add(t),()=>{Kv.delete(t)}},[])}const Rj={onRun:e=>Kv.forEach(n=>n.onRun(e)),onReconnect:()=>Kv.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},zh=()=>({queryKey:kt("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>Kh(n,t,()=>Z4n(e),jm),staleTime:3e4}),vSn=()=>({queryKey:kt("listProjectActivity"),queryFn:({signal:e})=>J4n(e),staleTime:3e4}),Om=()=>({queryKey:kt("getUiState"),queryFn:({signal:e})=>e3n(e),staleTime:3e5}),LS=e=>({queryKey:kt("getProjectUiState",e),queryFn:({signal:n})=>t3n(e,n),staleTime:3e5}),y0=(e="")=>({queryKey:kt("getProjectPathStatus",e),queryFn:({signal:n})=>a3n(e,n),staleTime:3e4}),r$=e=>({queryKey:kt("searchPapers",e),queryFn:({signal:n})=>l3n(e,n),staleTime:3e5}),bSn=()=>({queryKey:kt("githubAccount"),queryFn:({signal:e})=>u3n(e),staleTime:3e5}),ySn=e=>({queryKey:kt("githubProjectRepoPreview",e),queryFn:({signal:n})=>_3n(e,n),staleTime:3e4}),Mj=(e,n)=>({queryKey:kt("repoAccess",e,n),queryFn:({signal:t})=>f3n(e,n,t),staleTime:3e4}),a5=e=>({queryKey:kt("resolvePaper",e),queryFn:({signal:n})=>d3n(e,n),staleTime:36e5}),xSn=(e,n,t,r)=>({queryKey:kt("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>p3n(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),Vv=e=>({queryKey:kt("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>Kh(t,r,()=>v3n(e,n),jm),staleTime:3e4}),Tu=e=>({queryKey:kt("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>Kh(t,r,()=>y3n(e,n),jm),staleTime:3e4});function l1(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 Oj(){const e=yi();return mSn({onRun(n){var r;if(!zn(e))return;const t=(r=tt.getQueryData(Tu(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);oo(tt,Tu(n.projectId).queryKey,n.id),tt.setQueryData(Tu(n.projectId).queryKey,s=>l1(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(Pa(["getRunDiff"],e,s=>s.queryKey[3]===n.id),Pa(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),Rj.onRun(n)},onExperiment(n){zn(e)&&(oo(tt,Vv(n.projectId).queryKey,n.id),tt.setQueryData(Vv(n.projectId).queryKey,t=>l1(t,n)),Pa(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),Pa(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),Pa(["getRunDiff"],e,t=>{var r;return((r=tt.getQueryData(Tu(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){zn(e)&&(oo(tt,zh().queryKey,n.id),tt.setQueryData(zh().queryKey,t=>l1(t,n)))},onArtifacts(n){zn(e)&&(Pa(hS,e,t=>t.queryKey[3]===n),Pa(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){zn(e)&&(Pa(aX,e),Rj.onReconnect())}}),T.useEffect(()=>{let n;const t=aSn(()=>{n??(n=setTimeout(()=>{n=void 0,Pa(["listProjectActivity"],e)},100))}),r=n$(c=>{c.type==="done"&&Pa(["getDataDir"],e)}),s=Gv(c=>{zn(e)&&(c.type==="session"?oo(tt,Gi(c.session.projectId).queryKey,c.session.id):(c.type==="busy"||c.type==="usage")&&oo(tt,[...e,"listChatSessions"],c.sessionId),(c.type==="message"||c.type==="queued"||c.type==="branch")&&t$("",c.type==="message"?{type:"upsertMessage",sessionId:c.sessionId,message:c.message}:c.type==="queued"?{type:"setQueued",sessionId:c.sessionId,items:c.items}:{type:"activeLeaf",sessionId:c.sessionId,leafId:c.activeLeafId},!0),c.type==="session"&&!bl.has(c.session.id)?tt.setQueryData(Gi(c.session.projectId).queryKey,u=>{if(!u)return;const h=u.find(f=>f.id===c.session.id);return h?l1(u,{...c.session,contextUsage:c.session.contextUsage??h.contextUsage}):[c.session,...u]}):c.type==="sessionDeleted"?Fb(c.sessionId):(c.type==="busy"||c.type==="usage")&&tt.setQueriesData({queryKey:[...e,"listChatSessions"]},u=>u==null?void 0:u.map(h=>h.id!==c.sessionId?h:c.type==="busy"?{...h,busy:c.busy}:{...h,contextUsage:c.usage})))}),i=oSn(()=>{zn(e)&&hf(!0).catch(()=>{})}),a=cSn(()=>{zn(e)&&tt.fetchQuery({...Bu(),staleTime:0}).catch(()=>{})}),o=_Sn(c=>{zn(e)&&(oo(tt,Uv().queryKey),tt.setQueryData(Uv().queryKey,c))});return()=>{clearTimeout(n),t(),r(),s(),i(),a(),o()}},[e[1]]),null}const o5=new Set;function s$(e){if(e!==E()){JD(e,{reload:!1}),document.documentElement.lang=e,UI(e);for(const n of o5)n()}}function wSn(e){return o5.add(e),()=>o5.delete(e)}function Qu(){return T.useSyncExternalStore(wSn,E,E)}const Vb="__ORX_MAC_TITLEBAR__"in window,i$="__ORX_WIN_TITLEBAR__"in window;let Dj="system",Lj="",xw=!1;const Sd=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function Ij(e){if(!Sd)return null;Sd.clearRect(0,0,1,1),Sd.fillStyle="transparent",Sd.fillStyle=e,Sd.fillRect(0,0,1,1);const[n,t,r,s]=Sd.getImageData(0,0,1,1).data;return s!==255?null:[n,t,r].map(i=>i.toString(16).padStart(2,"0")).join("")}function kSn(){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=Ij(getComputedStyle(t).backgroundColor);if(r)return r}return Ij(getComputedStyle(document.documentElement).backgroundColor)}function c5(e){e&&(Dj=e),!(!Vb||xw)&&(xw=!0,setTimeout(()=>{var r;xw=!1;const n=kSn(),t=`titlebar:${Dj}:${n}`;!n||t===Lj||(Lj=t,(r=window.ipc)==null||r.postMessage(t))},100))}Vb&&(new MutationObserver(()=>c5()).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style","data-theme"]}),window.addEventListener("resize",()=>c5()));const SSn="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'])",$j=Vb?28:i$?32:0;if($j){document.documentElement.classList.add(Vb?"mac-titlebar":"win-titlebar");let e=!1;window.addEventListener("mousedown",n=>{var t;e=!1,!(n.button!==0||n.defaultPrevented||n.clientY>=$j)&&(n.target instanceof Element&&n.target.closest(SSn)||(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 a$="orx:theme";function CSn(){try{const e=localStorage.getItem(a$);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let pf=CSn();const l5=new Set;function ESn(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function IS(){document.documentElement.dataset.theme=ESn(pf),c5(pf)}function o$(e){pf=e;try{localStorage.setItem(a$,e)}catch{}IS();for(const n of l5)n()}function NSn(){return pf}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{pf==="system"&&IS()});IS();function zSn(e){return l5.add(e),()=>l5.delete(e)}function c$(){return[T.useSyncExternalStore(zSn,()=>pf,()=>pf),o$]}const jSn=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),l$=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),Wv="-",Bj=[],TSn="arbitrary..",RSn=e=>{const n=OSn(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return MSn(a);const o=a.split(Wv),c=o[0]===""&&o.length>1?1:0;return u$(o,c,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const c=r[a],u=t[a];return c?u?jSn(u,c):c:u||Bj}return t[a]||Bj}}},u$=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=u$(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(Wv):e.slice(n).join(Wv),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?TSn+r:void 0})(),OSn=e=>{const{theme:n,classGroups:t}=e;return DSn(t,n)},DSn=(e,n)=>{const t=l$();for(const r in e){const s=e[r];$S(s,t,r,n)}return t},$S=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){ISn(e,n,t);return}if(typeof e=="function"){$Sn(e,n,t,r);return}BSn(e,n,t,r)},ISn=(e,n,t)=>{const r=e===""?n:_$(n,e);r.classGroupId=t},$Sn=(e,n,t,r)=>{if(PSn(e)){$S(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(ASn(t,e))},BSn=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(Wv),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,FSn=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)}}},u5="!",Pj=":",HSn=[],Fj=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),qSn=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,c=0,u;const h=s.length;for(let k=0;kc?u-c:void 0;return Fj(i,m,p,w)};if(n){const s=n+Pj,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):Fj(HSn,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},USn=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}},GSn=e=>({cache:FSn(e.cacheSize),parseClassName:qSn(e),sortModifiers:USn(e),postfixLookupClassGroupIds:KSn(e),...RSn(e)}),KSn=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(VSn);let u="";for(let h=c.length-1;h>=0;h-=1){const f=c[h],{isExternal:p,modifiers:m,hasImportantModifier:w,baseClassName:k,maybePostfixModifierPosition:v}=t(f);if(p){u=f+(u.length>0?" "+u:u);continue}let b=!!v,y;if(b){const A=k.substring(0,v);y=r(A);const z=y&&a[y]?r(k):void 0;z&&z!==y&&(y=z,b=!1)}else y=r(k);if(!y){if(!b){u=f+(u.length>0?" "+u:u);continue}if(y=r(k),!y){u=f+(u.length>0?" "+u:u);continue}b=!1}const x=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=w?x+u5:x,N=C+y;if(o.indexOf(N)>-1)continue;o.push(N);const j=s(y,b);for(let A=0;A0?" "+u:u)}return u},QSn=(...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((h,f)=>f(h),e());return t=GSn(u),r=t.cache.get,s=t.cache.set,i=o,o(c)},o=c=>{const u=r(c);if(u)return u;const h=WSn(c,t);return s(c,h),h};return i=a,(...c)=>i(QSn(...c))},XSn=[],Ss=e=>{const n=t=>t[e]||XSn;return n.isThemeGetter=!0,n},d$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,h$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,YSn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ZSn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JSn=/\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$/,e6n=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,t6n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,n6n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,uu=e=>YSn.test(e),wn=e=>!!e&&!Number.isNaN(Number(e)),Ho=e=>!!e&&Number.isInteger(Number(e)),ww=e=>e.endsWith("%")&&wn(e.slice(0,-1)),Zc=e=>ZSn.test(e),p$=()=>!0,r6n=e=>JSn.test(e)&&!e6n.test(e),BS=()=>!1,s6n=e=>t6n.test(e),i6n=e=>n6n.test(e),a6n=e=>!pt(e)&&!bt(e),o6n=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)),c6n=e=>Xu(e,v$,BS),pt=e=>d$.test(e),N_=e=>Xu(e,b$,r6n),qj=e=>Xu(e,m6n,wn),l6n=e=>Xu(e,x$,p$),u6n=e=>Xu(e,y$,BS),Uj=e=>Xu(e,m$,BS),_6n=e=>Xu(e,g$,i6n),u1=e=>Xu(e,w$,s6n),bt=e=>h$.test(e),Qp=e=>Rf(e,b$),f6n=e=>Rf(e,y$),Gj=e=>Rf(e,m$),d6n=e=>Rf(e,v$),h6n=e=>Rf(e,g$),_1=e=>Rf(e,w$,!0),p6n=e=>Rf(e,x$,!0),Xu=(e,n,t)=>{const r=d$.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Rf=(e,n,t=!1)=>{const r=h$.exec(e);return r?r[1]?n(r[1]):t:!1},m$=e=>e==="position"||e==="percentage",g$=e=>e==="image"||e==="url",v$=e=>e==="length"||e==="size"||e==="bg-size",b$=e=>e==="length",m6n=e=>e==="number",y$=e=>e==="family-name",x$=e=>e==="number"||e==="weight",w$=e=>e==="shadow",Kj=()=>{const e=Ss("color"),n=Ss("font"),t=Ss("text"),r=Ss("font-weight"),s=Ss("tracking"),i=Ss("leading"),a=Ss("breakpoint"),o=Ss("container"),c=Ss("spacing"),u=Ss("radius"),h=Ss("shadow"),f=Ss("inset-shadow"),p=Ss("text-shadow"),m=Ss("drop-shadow"),w=Ss("blur"),k=Ss("perspective"),v=Ss("aspect"),b=Ss("ease"),y=Ss("animate"),x=()=>["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(),bt,pt],j=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],z=()=>[bt,pt,c],M=()=>[uu,"full","auto",...z()],D=()=>[Ho,"none","subgrid",bt,pt],I=()=>["auto",{span:["full",Ho,bt,pt]},Ho,bt,pt],B=()=>[Ho,"auto",bt,pt],G=()=>["auto","min","max","fr",bt,pt],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...z()],Z=()=>[uu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],J=()=>[uu,"screen","full","dvw","lvw","svw","min","max","fit",...z()],$=()=>[uu,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],L=()=>[e,bt,pt],q=()=>[...C(),Gj,Uj,{position:[bt,pt]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",d6n,c6n,{size:[bt,pt]}],re=()=>[ww,Qp,N_],ie=()=>["","none","full",u,bt,pt],ue=()=>["",wn,Qp,N_],se=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[wn,ww,Gj,Uj],ce=()=>["","none",w,bt,pt],pe=()=>["none",wn,bt,pt],ve=()=>["none",wn,bt,pt],Me=()=>[wn,bt,pt],Fe=()=>[uu,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Zc],breakpoint:[Zc],color:[p$],container:[Zc],"drop-shadow":[Zc],ease:["in","out","in-out"],font:[a6n],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Zc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Zc],shadow:[Zc],spacing:["px",wn],text:[Zc],"text-shadow":[Zc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",uu,pt,bt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",bt,pt]}],"container-named":[o6n],columns:[{columns:[wn,pt,bt,o]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],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:[Ho,"auto",bt,pt]}],basis:[{basis:[uu,"full","auto",o,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[wn,uu,"auto","initial","none",pt]}],grow:[{grow:["",wn,bt,pt]}],shrink:[{shrink:["",wn,bt,pt]}],order:[{order:[Ho,"first","last","none",bt,pt]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:I()}],"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":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...J()]}],"min-inline-size":[{"min-inline":["auto",...J()]}],"max-inline-size":[{"max-inline":["none",...J()]}],"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,Qp,N_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,p6n,l6n]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ww,pt]}],"font-family":[{font:[f6n,u6n,n]}],"font-features":[{"font-features":[pt]}],"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,bt,pt]}],"line-clamp":[{"line-clamp":[wn,"none",bt,qj]}],leading:[{leading:[i,...z()]}],"list-image":[{"list-image":["none",bt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",bt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[wn,"from-font","auto",bt,N_]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[wn,"auto",bt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"tab-size":[{tab:[Ho,bt,pt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",bt,pt]}],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",bt,pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ho,bt,pt],radial:["",bt,pt],conic:[Ho,bt,pt]},h6n,_6n]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[wn,bt,pt]}],"outline-w":[{outline:["",wn,Qp,N_]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",h,_1,u1]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,_1,u1]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[wn,N_]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,_1,u1]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[wn,bt,pt]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"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":[wn]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[bt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":[wn]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",bt,pt]}],filter:[{filter:["","none",bt,pt]}],blur:[{blur:ce()}],brightness:[{brightness:[wn,bt,pt]}],contrast:[{contrast:[wn,bt,pt]}],"drop-shadow":[{"drop-shadow":["","none",m,_1,u1]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",wn,bt,pt]}],"hue-rotate":[{"hue-rotate":[wn,bt,pt]}],invert:[{invert:["",wn,bt,pt]}],saturate:[{saturate:[wn,bt,pt]}],sepia:[{sepia:["",wn,bt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",bt,pt]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[wn,bt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[wn,bt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",wn,bt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[wn,bt,pt]}],"backdrop-invert":[{"backdrop-invert":["",wn,bt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[wn,bt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[wn,bt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",wn,bt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",bt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[wn,"initial",bt,pt]}],ease:[{ease:["linear","initial",b,bt,pt]}],delay:[{delay:[wn,bt,pt]}],animate:[{animate:["none",y,bt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,bt,pt]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:Me()}],"skew-x":[{"skew-x":Me()}],"skew-y":[{"skew-y":Me()}],transform:[{transform:[bt,pt,"","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:[Ho,bt,pt]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",bt,pt]}],"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":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"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",bt,pt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[wn,Qp,N_,qj]}],stroke:[{stroke:["none",...L()]}],"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"]}},g6n=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(Od(e,"cacheSize",n),Od(e,"prefix",t),Od(e,"experimentalParseClassName",r),f1(e.theme,i.theme),f1(e.classGroups,i.classGroups),f1(e.conflictingClassGroups,i.conflictingClassGroups),f1(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Od(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),Od(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),d1(e.theme,s.theme),d1(e.classGroups,s.classGroups),d1(e.conflictingClassGroups,s.conflictingClassGroups),d1(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),_5(e,s,"postfixLookupClassGroups"),_5(e,s,"orderSensitiveModifiers"),e),Od=(e,n,t)=>{t!==void 0&&(e[n]=t)},f1=(e,n)=>{if(n)for(const t in n)Od(e,t,n[t])},d1=(e,n)=>{if(n)for(const t in n)_5(e,n,t)},_5=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},v6n=(e,...n)=>typeof e=="function"?Hj(Kj,e,...n):Hj(()=>g6n(Kj(),e),...n),b6n=v6n({extend:{theme:{text:["menu"]}}});function Ns(...e){return b6n(...e)}const y6n={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 Wt({variant:e="default",size:n="default",className:t,...r}){return _.jsx("span",{className:Ns("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",y6n[e],t),...r})}const x6n=["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(" "),w6n={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"},k6n={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 k$(e,n,t,r){return Ns(x6n,w6n[e],k6n[n],t&&"active",r)}function Ie({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return _.jsx("button",{className:k$(n,t,e,r),...s})}function jh({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return _.jsx("a",{className:k$(n,t,e,r),...s})}const S6n=["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(" "),C6n={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"},E6n={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function S$(e,n,t,r,s){return Ns(S6n,C6n[e],E6n[n],r==="circle"&&"rounded-full",t&&"active",s)}const It=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:S$(s,r,n,t,i),...a})});function Wh({active:e=!1,shape:n="rounded",size:t="default",variant:r="default",className:s,...i}){return _.jsx("a",{className:S$(r,t,e,n,s),...i})}const N6n={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 Br({variant:e="default",className:n,...t}){return _.jsx("input",{className:Ns("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",N6n[e],n),...t})}function vn({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return _.jsx("button",{className:Ns("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 St({className:e,...n}){return _.jsx("span",{className:Ns("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 Pr({className:e,...n}){return _.jsx("div",{className:Ns("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const z6n={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 Yd({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return _.jsxs("span",{className:Ns("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[_.jsx("span",{className:Ns("h-[7px] w-[7px] shrink-0 rounded-full bg-current",z6n[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const j6n=["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 C$(e,n){return Ns(j6n,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function PS({checked:e=!1,className:n,children:t,...r}){return _.jsx("button",{role:"switch","aria-checked":e,className:C$(e,n),...r,children:t??_.jsx("span",{})})}function A6n({checked:e=!1,className:n,...t}){return _.jsx("span",{className:C$(e,n),...t,children:_.jsx("span",{})})}var si=mD();const T6n=Em(si);function R6n(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 M6n=e=>{switch(e){case"success":return L6n;case"info":return $6n;case"warning":return I6n;case"error":return B6n;default:return null}},O6n=Array(12).fill(0),D6n=({visible:e,className:n})=>it.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},it.createElement("div",{className:"sonner-spinner"},O6n.map((t,r)=>it.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),L6n=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),I6n=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),$6n=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),B6n=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),P6n=it.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"},it.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),it.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),F6n=()=>{const[e,n]=it.useState(document.hidden);return it.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let H6n=1;const q6n=100,Vj=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:H6n++};class U6n{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-q6n;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=Vj(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],it.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(K6n(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"&&!it.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"&&!it.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"&&!it.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 h=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description,m=typeof h=="object"&&!it.isValidElement(h)?h:{message:h};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,h)=>o.then(()=>a[0]==="reject"?h(a[1]):u(a[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=Vj(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 Fi=new U6n,G6n=(e,n)=>Fi.message(e,n),K6n=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",V6n=G6n,W6n=()=>Fi.toasts,Q6n=()=>Fi.getActiveToasts(),X6n=Object.assign(V6n,{success:Fi.success,info:Fi.info,warning:Fi.warning,error:Fi.error,custom:Fi.custom,message:Fi.message,promise:Fi.promise,dismiss:Fi.dismiss,loading:Fi.loading},{getHistory:W6n,getToasts:Q6n});R6n("[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 h1(e){return e.label!==void 0}const Y6n=3,Z6n="24px",J6n="16px",Wj=4e3,eCn=356,tCn=14,nCn=45,rCn=200;function qo(...e){return e.filter(Boolean).join(" ")}function sCn(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const iCn=e=>{var n,t,r,s,i,a,o,c,u;const{invert:h,toast:f,unstyled:p,interacting:m,setHeights:w,visibleToasts:k,heights:v,index:b,toasts:y,expanded:x,removeToast:C,defaultRichColors:N,closeButton:j,style:A,cancelButtonStyle:z,actionButtonStyle:M,className:D="",descriptionClassName:I="",duration:B,position:G,gap:U,expandByDefault:Q,classNames:V,icons:Z,closeButtonAriaLabel:J="Close toast"}=e,[$,L]=it.useState(null),[q,P]=it.useState(null),[F,re]=it.useState(!1),[ie,ue]=it.useState(!1),[se,K]=it.useState(!1),[oe,ce]=it.useState(!1),[pe,ve]=it.useState(!1),[Me,Fe]=it.useState(0),[Ye,Te]=it.useState(0),$e=it.useRef(f.duration||B||Wj),yt=it.useRef(null),ot=it.useRef(null),Mt=b===0,jt=b+1<=k,Pt=f.type,Le=Pt??"default",nt=f.dismissible!==!1,ke=f.className||"",me=f.descriptionClassName||"",je=it.useMemo(()=>v.findIndex(gt=>gt.toastId===f.id)||0,[v,f.id]),qe=it.useMemo(()=>{var gt;return(gt=f.closeButton)!=null?gt:j},[f.closeButton,j]),rt=it.useMemo(()=>f.duration||B||Wj,[f.duration,B]),dt=it.useRef(0),st=it.useRef(0),Ut=it.useRef(0),Xt=it.useRef(null),[en,an]=G.split("-"),At=it.useMemo(()=>v.reduce((gt,ln,bn)=>bn>=je?gt:gt+ln.height,0),[v,je]),gn=F6n(),on=it.useMemo(()=>{var gt;return(gt=e.swipeDirections)!=null?gt:sCn(G)},[e.swipeDirections,G]),Ot=f.invert||h,dn=Pt==="loading";st.current=it.useMemo(()=>je*U+At,[je,At]),it.useEffect(()=>{$e.current=rt},[rt]),it.useEffect(()=>{re(!0)},[]),it.useEffect(()=>{const gt=ot.current;if(gt){const ln=gt.getBoundingClientRect().height;return Te(ln),w(bn=>[{toastId:f.id,height:ln,position:f.position},...bn]),()=>w(bn=>bn.filter(un=>un.toastId!==f.id))}},[w,f.id]),it.useLayoutEffect(()=>{if(!F)return;const gt=ot.current,ln=gt.style.height;gt.style.height="auto";const bn=gt.getBoundingClientRect().height;gt.style.height=ln,Te(bn),w(un=>un.find(Mn=>Mn.toastId===f.id)?un.map(Mn=>Mn.toastId===f.id?{...Mn,height:bn}:Mn):[{toastId:f.id,height:bn,position:f.position},...un])},[F,f.title,f.description,w,f.id,f.jsx,f.action,f.cancel]);const cn=it.useCallback(()=>{ue(!0),Fe(st.current),w(gt=>gt.filter(ln=>ln.toastId!==f.id)),setTimeout(()=>{C(f)},rCn)},[f,C,w,st]);it.useEffect(()=>{if(f.promise&&Pt==="loading"||f.duration===1/0||f.type==="loading")return;let gt;return x||m||gn?(()=>{if(Ut.current{$e.current!==1/0&&(dt.current=new Date().getTime(),gt=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),cn()},$e.current))})(),()=>clearTimeout(gt)},[x,m,f,Pt,gn,cn]),it.useEffect(()=>{f.delete&&(cn(),f.onDismiss==null||f.onDismiss.call(f,f))},[cn,f.delete]);function kn(){var gt;if(Z!=null&&Z.loading){var ln;return it.createElement("div",{className:qo(V==null?void 0:V.loader,f==null||(ln=f.classNames)==null?void 0:ln.loader,"sonner-loader"),"data-visible":Pt==="loading"},Z.loading)}return it.createElement(D6n,{className:qo(V==null?void 0:V.loader,f==null||(gt=f.classNames)==null?void 0:gt.loader),visible:Pt==="loading"})}const Wn=f.icon||(Z==null?void 0:Z[Pt])||M6n(Pt);var gs,ns;return it.createElement("li",{tabIndex:0,ref:ot,className:qo(D,ke,V==null?void 0:V.toast,f==null||(n=f.classNames)==null?void 0:n.toast,V==null?void 0:V[Le],f==null||(t=f.classNames)==null?void 0:t[Le]),"data-sonner-toast":"","data-rich-colors":(gs=f.richColors)!=null?gs:N,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":F,"data-promise":!!f.promise,"data-swiped":pe,"data-removed":ie,"data-visible":jt,"data-y-position":en,"data-x-position":an,"data-index":b,"data-front":Mt,"data-swiping":se,"data-dismissible":nt,"data-type":Pt,"data-invert":Ot,"data-swipe-out":oe,"data-swipe-direction":q,"data-expanded":!!(x||Q&&F),"data-testid":f.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${ie?Me:st.current}px`,"--initial-height":Q?"auto":`${Ye}px`,...A,...f.style},onDragEnd:()=>{K(!1),L(null),Xt.current=null},onPointerDown:gt=>{gt.button!==2&&(dn||!nt||(yt.current=new Date,Fe(st.current),gt.target.setPointerCapture(gt.pointerId),gt.target.tagName!=="BUTTON"&&(K(!0),Xt.current={x:gt.clientX,y:gt.clientY})))},onPointerUp:()=>{var gt,ln,bn;if(oe||!nt)return;Xt.current=null;const un=Number(((gt=ot.current)==null?void 0:gt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),_r=Number(((ln=ot.current)==null?void 0:ln.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Mn=new Date().getTime()-((bn=yt.current)==null?void 0:bn.getTime()),Qn=$==="x"?un:_r,ar=Math.abs(Qn)/Mn;if(($==="x"?on.includes(un>0?"right":"left"):on.includes(_r>0?"bottom":"top"))&&(Math.abs(Qn)>=nCn||ar>.11)){Fe(st.current),f.onDismiss==null||f.onDismiss.call(f,f),P($==="x"?un>0?"right":"left":_r>0?"down":"up"),cn(),ce(!0);return}else{var Ht,vr;(Ht=ot.current)==null||Ht.style.setProperty("--swipe-amount-x","0px"),(vr=ot.current)==null||vr.style.setProperty("--swipe-amount-y","0px")}ve(!1),K(!1),L(null)},onPointerMove:gt=>{var ln,bn,un;if(!Xt.current||!nt||((ln=window.getSelection())==null?void 0:ln.toString().length)>0)return;const Mn=gt.clientY-Xt.current.y,Qn=gt.clientX-Xt.current.x;!$&&(Math.abs(Qn)>1||Math.abs(Mn)>1)&&L(Math.abs(Qn)>Math.abs(Mn)?"x":"y");let ar={x:0,y:0};const wt=Ht=>1/(1.5+Math.abs(Ht)/20);if($==="y"){if(on.includes("top")||on.includes("bottom"))if(on.includes("top")&&Mn<0||on.includes("bottom")&&Mn>0)ar.y=Mn;else{const Ht=Mn*wt(Mn);ar.y=Math.abs(Ht)0)ar.x=Qn;else{const Ht=Qn*wt(Qn);ar.x=Math.abs(Ht)0||Math.abs(ar.y)>0)&&ve(!0),(bn=ot.current)==null||bn.style.setProperty("--swipe-amount-x",`${ar.x}px`),(un=ot.current)==null||un.style.setProperty("--swipe-amount-y",`${ar.y}px`)}},qe&&!f.jsx&&Pt!=="loading"?it.createElement("button",{"aria-label":J,"data-disabled":dn,"data-close-button":!0,onClick:dn||!nt?()=>{}:()=>{cn(),f.onDismiss==null||f.onDismiss.call(f,f)},className:qo(V==null?void 0:V.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(ns=Z==null?void 0:Z.close)!=null?ns:P6n):null,(Pt||f.icon||f.promise)&&f.icon!==null&&((Z==null?void 0:Z[Pt])!==null||f.icon)?it.createElement("div",{"data-icon":"",className:qo(V==null?void 0:V.icon,f==null||(s=f.classNames)==null?void 0:s.icon)},Pt==="loading"?f.icon||kn():f.promise?kn():null,Pt!=="loading"?Wn:null):null,it.createElement("div",{"data-content":"",className:qo(V==null?void 0:V.content,f==null||(i=f.classNames)==null?void 0:i.content)},it.createElement("div",{"data-title":"",className:qo(V==null?void 0:V.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?it.createElement("div",{"data-description":"",className:qo(I,me,V==null?void 0:V.description,f==null||(o=f.classNames)==null?void 0:o.description)},typeof f.description=="function"?f.description():f.description):null),it.isValidElement(f.cancel)?f.cancel:f.cancel&&h1(f.cancel)?it.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||z,onClick:gt=>{h1(f.cancel)&&nt&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,gt),cn())},className:qo(V==null?void 0:V.cancelButton,f==null||(c=f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,it.isValidElement(f.action)?f.action:f.action&&h1(f.action)?it.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||M,onClick:gt=>{h1(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,gt),!gt.defaultPrevented&&cn())},className:qo(V==null?void 0:V.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function Qj(){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 aCn(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?J6n:Z6n;function c(u){["top","right","bottom","left"].forEach(h=>{t[`${a}-${h}`]=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 oCn=it.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:c,className:u,offset:h,mobileOffset:f,theme:p="light",richColors:m,duration:w,style:k,visibleToasts:v=Y6n,toastOptions:b,dir:y=Qj(),gap:x=tCn,icons:C,customAriaLabel:N,containerAriaLabel:j="Notifications"}=n,[A,z]=it.useState([]),M=it.useMemo(()=>r?A.filter(re=>re.toasterId===r):A.filter(re=>!re.toasterId),[A,r]),D=it.useMemo(()=>Array.from(new Set([i].concat(M.filter(re=>re.position).map(re=>re.position)))),[M,i]),[I,B]=it.useState([]),[G,U]=it.useState(!1),[Q,V]=it.useState(!1),[Z,J]=it.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=it.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),q=it.useRef(null),P=it.useRef(!1),F=it.useCallback(re=>{z(ie=>{var ue;return(ue=ie.find(se=>se.id===re.id))!=null&&ue.delete||Fi.dismiss(re.id),ie.filter(({id:se})=>se!==re.id)})},[]);return it.useEffect(()=>Fi.subscribe(re=>{if(re.dismiss){requestAnimationFrame(()=>{z(ie=>ie.map(ue=>ue.id===re.id?{...ue,delete:!0}:ue))});return}setTimeout(()=>{T6n.flushSync(()=>{z(ie=>{const ue=ie.findIndex(se=>se.id===re.id);return ue!==-1?[...ie.slice(0,ue),{...ie[ue],...re},...ie.slice(ue+1)]:[re,...ie]})})})}),[]),it.useEffect(()=>{if(p!=="system"){J(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const re=window.matchMedia("(prefers-color-scheme: dark)");try{re.addEventListener("change",({matches:ie})=>{J(ie?"dark":"light")})}catch{re.addListener(({matches:ue})=>{try{J(ue?"dark":"light")}catch(se){console.error(se)}})}},[p]),it.useEffect(()=>{A.length<=1&&U(!1)},[A]),it.useEffect(()=>{const re=ie=>{var ue;if(a.length>0&&a.every(oe=>ie[oe]||ie.code===oe)){var K;U(!0),(K=$.current)==null||K.focus()}ie.code==="Escape"&&(document.activeElement===$.current||(ue=$.current)!=null&&ue.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[a]),it.useEffect(()=>{if($.current)return()=>{q.current&&(q.current.focus({preventScroll:!0}),q.current=null,P.current=!1)}},[$.current]),it.createElement("section",{ref:t,"aria-label":N??`${j} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},D.map((re,ie)=>{var ue;const[se,K]=re.split("-");return M.length?it.createElement("ol",{key:re,dir:y==="auto"?Qj():y,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":se,"data-x-position":K,style:{"--front-toast-height":`${((ue=I[0])==null?void 0:ue.height)||0}px`,"--width":`${eCn}px`,"--gap":`${x}px`,...k,...aCn(h,f)},onBlur:oe=>{P.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(P.current=!1,q.current&&(q.current.focus({preventScroll:!0}),q.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||P.current||(P.current=!0,q.current=oe.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{Q||U(!1)},onDragEnd:()=>U(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},M.filter(oe=>!oe.position&&ie===0||oe.position===re).map((oe,ce)=>{var pe,ve;return it.createElement(iCn,{key:oe.id,icons:C,index:ce,toast:oe,defaultRichColors:m,duration:(pe=b==null?void 0:b.duration)!=null?pe:w,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(ve=b==null?void 0:b.closeButton)!=null?ve:c,interacting:Q,position:re,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:F,toasts:M.filter(Me=>Me.position==oe.position),heights:I.filter(Me=>Me.position==oe.position),setHeights:B,expandByDefault:o,gap:x,expanded:G,swipeDirections:n.swipeDirections})})):null}))});function cCn(e){const[n]=c$();return _.jsx(oCn,{theme:n,...e})}function Zt(e,n,t){X6n[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function FS({content:e,children:n,className:t}){const r=T.useRef(null),s=T.useRef(null);function i(){const o=r.current,c=s.current;if(!o||!c)return;c.matches(":popover-open")||c.showPopover();const u=o.getBoundingClientRect(),h=c.getBoundingClientRect(),f=Math.max(8,Math.min(u.left+u.width/2-h.width/2,window.innerWidth-h.width-8));c.style.left=`${f}px`,c.style.top=`${Math.max(8,u.top-h.height-6)}px`}function a(){var o,c;(o=r.current)!=null&&o.matches(":hover, :focus")||(c=s.current)==null||c.hidePopover()}return T.useEffect(()=>{const o=()=>{var c;return(c=s.current)==null?void 0:c.hidePopover()};return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[]),_.jsxs("span",{ref:r,className:Ns("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:0,role:"img","aria-label":e,onMouseEnter:i,onMouseLeave:a,onFocus:i,onBlur:a,onKeyDown:o=>{var c;o.key==="Escape"&&((c=s.current)!=null&&c.matches(":popover-open"))&&(o.preventDefault(),o.stopPropagation(),s.current.hidePopover())},children:[n,_.jsx("span",{ref:s,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 lCn=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function Dm(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(lCn)];(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(),h=u[0],f=u.at(-1);!h||!f?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===h?(c.preventDefault(),f.focus()):!c.shiftKey&&document.activeElement===f&&(c.preventDefault(),h.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function E$({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?Z9t():bEt({count:Jt(n.activeTurnCount)})),n.pendingPermissionCount>0&&c.push(n.pendingPermissionCount===1?S9t():I8t({count:Jt(n.pendingPermissionCount)})),o>0&&c.push(o===1?$9t():iEt({count:Jt(o)})),n.queuedMessageCount>0&&c.push(n.queuedMessageCount===1?G9t():fEt({count:Jt(n.queuedMessageCount)})),n.activeRunCount>0&&c.push(n.activeRunCount===1?T9t():s9t({count:Jt(n.activeRunCount)})),Dm(a,s),si.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:Y8t({host:Ce(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:g9t()}),_.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(Ie,{disabled:r,onClick:s,children:ff()}),_.jsx(Ie,{variant:"danger",disabled:r,onClick:i,children:r?EEt():U8t()})]})]})}),document.body)}/** * @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 f$=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim();/** + */const N$=(...e)=>e.filter((n,t,r)=>!!n&&n.trim()!==""&&r.indexOf(n)===t).join(" ").trim();/** * @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 USn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + */const uCn=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 GSn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase());/** + */const _Cn=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 $j=e=>{const n=GSn(e);return n.charAt(0).toUpperCase()+n.slice(1)};/** + */const Xj=e=>{const n=_Cn(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 bw={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 kw={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 VSn=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},KSn=T.createContext({}),WSn=()=>T.useContext(KSn),QSn=T.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>{const{size:u=24,strokeWidth:h=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:m=""}=WSn()??{},w=r??f?Number(t??h)*24/Number(n??u):t??h;return T.createElement("svg",{ref:c,...bw,width:n??u??bw.width,height:n??u??bw.height,stroke:e??p,strokeWidth:w,className:f$("lucide",m,s),...!i&&!VSn(o)&&{"aria-hidden":"true"},...o},[...a.map(([k,v])=>T.createElement(k,v)),...Array.isArray(i)?i:[i]])});/** + */const fCn=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},dCn=T.createContext({}),hCn=()=>T.useContext(dCn),pCn=T.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>{const{size:u=24,strokeWidth:h=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:m=""}=hCn()??{},w=r??f?Number(t??h)*24/Number(n??u):t??h;return T.createElement("svg",{ref:c,...kw,width:n??u??kw.width,height:n??u??kw.height,stroke:e??p,strokeWidth:w,className:N$("lucide",m,s),...!i&&!fCn(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 ct=(e,n)=>{const t=T.forwardRef(({className:r,...s},i)=>T.createElement(QSn,{ref:i,iconNode:n,className:f$(`lucide-${USn($j(e))}`,`lucide-${e}`,r),...s}));return t.displayName=$j(e),t};/** + */const ct=(e,n)=>{const t=T.forwardRef(({className:r,...s},i)=>T.createElement(pCn,{ref:i,iconNode:n,className:N$(`lucide-${uCn(Xj(e))}`,`lucide-${e}`,r),...s}));return t.displayName=Xj(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 XSn=[["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"}]],YSn=ct("archive",XSn);/** + */const mCn=[["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"}]],gCn=ct("archive",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 ZSn=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],JSn=ct("arrow-down",ZSn);/** + */const vCn=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],bCn=ct("arrow-down",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 e6n=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],$0=ct("arrow-left",e6n);/** + */const yCn=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],B0=ct("arrow-left",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 t6n=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],sv=ct("arrow-right",t6n);/** + */const xCn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],sv=ct("arrow-right",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 n6n=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],r6n=ct("arrow-up-right",n6n);/** + */const wCn=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],kCn=ct("arrow-up-right",wCn);/** * @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:"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"}]],d$=ct("blocks",s6n);/** + */const SCn=[["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"}]],z$=ct("blocks",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 i6n=[["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"}]],h$=ct("book-open",i6n);/** + */const CCn=[["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"}]],j$=ct("book-open",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 a6n=[["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"}]],o6n=ct("calendar-days",a6n);/** + */const ECn=[["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"}]],NCn=ct("calendar-days",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 c6n=[["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"}]],l6n=ct("chart-spline",c6n);/** + */const zCn=[["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"}]],jCn=ct("chart-spline",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 u6n=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yi=ct("check",u6n);/** + */const ACn=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],bi=ct("check",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 _6n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],pc=ct("chevron-down",_6n);/** + */const TCn=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],mc=ct("chevron-down",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 f6n=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],p$=ct("chevron-left",f6n);/** + */const RCn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],A$=ct("chevron-left",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 d6n=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ka=ct("chevron-right",d6n);/** + */const MCn=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ka=ct("chevron-right",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 h6n=[["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"}]],MS=ct("circle-alert",h6n);/** + */const OCn=[["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"}]],HS=ct("circle-alert",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=[["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"}]],m6n=ct("circle-question-mark",p6n);/** + */const DCn=[["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"}]],LCn=ct("circle-question-mark",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 g6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],m$=ct("circle-stop",g6n);/** + */const ICn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],T$=ct("circle-stop",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 v6n=[["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"}]],g$=ct("circle-x",v6n);/** + */const $Cn=[["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"}]],R$=ct("circle-x",$Cn);/** * @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=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],y6n=ct("clock-3",b6n);/** + */const BCn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],PCn=ct("clock-3",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 x6n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],w6n=ct("clock",x6n);/** + */const FCn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],HCn=ct("clock",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 k6n=[["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"}]],S6n=ct("cloud-upload",k6n);/** + */const qCn=[["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"}]],UCn=ct("cloud-upload",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 C6n=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],i5=ct("code",C6n);/** + */const GCn=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],f5=ct("code",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 E6n=[["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"}]],Mf=ct("copy",E6n);/** + */const KCn=[["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"}]],Yu=ct("copy",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 N6n=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],v$=ct("corner-down-left",N6n);/** + */const VCn=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],M$=ct("corner-down-left",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 z6n=[["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"}]],OS=ct("cpu",z6n);/** + */const WCn=[["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"}]],qS=ct("cpu",WCn);/** * @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:"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"}]],Vb=ct("download",j6n);/** + */const QCn=[["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"}]],Wb=ct("download",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 A6n=[["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"}]],Lm=ct("ellipsis",A6n);/** + */const XCn=[["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"}]],Lm=ct("ellipsis",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 T6n=[["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"}]],gf=ct("external-link",T6n);/** + */const YCn=[["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"}]],mf=ct("external-link",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 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 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]],b$=ct("file-code",R6n);/** + */const ZCn=[["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"}]],O$=ct("file-code",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 M6n=[["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"}]],O6n=ct("file-output",M6n);/** + */const JCn=[["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"}]],e7n=ct("file-output",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 D6n=[["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"}]],Kb=ct("file-text",D6n);/** + */const t7n=[["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"}]],Qb=ct("file-text",t7n);/** * @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:"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"}]],Ah=ct("flask-conical",L6n);/** + */const n7n=[["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"}]],Ah=ct("flask-conical",n7n);/** * @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"}]],$6n=ct("fold-vertical",I6n);/** + */const r7n=[["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"}]],s7n=ct("fold-vertical",r7n);/** * @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:"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"}]],y$=ct("folder-git-2",B6n);/** + */const i7n=[["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"}]],D$=ct("folder-git-2",i7n);/** * @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:"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"}]],Fu=ct("folder-open",P6n);/** + */const a7n=[["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"}]],Pu=ct("folder-open",a7n);/** * @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:"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"}]],H6n=ct("folder-plus",F6n);/** + */const o7n=[["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"}]],c7n=ct("folder-plus",o7n);/** * @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 q6n=[["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"}]],Wb=ct("folder-tree",q6n);/** + */const l7n=[["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"}]],Xb=ct("folder-tree",l7n);/** * @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:"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"}]],G6n=ct("funnel",U6n);/** + */const u7n=[["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"}]],_7n=ct("funnel",u7n);/** * @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:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],K6n=ct("gauge",V6n);/** + */const f7n=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],d7n=ct("gauge",f7n);/** * @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:"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"}]],Im=ct("git-branch",W6n);/** + */const h7n=[["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"}]],Im=ct("git-branch",h7n);/** * @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 Q6n=[["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"}]],X6n=ct("git-commit-horizontal",Q6n);/** + */const p7n=[["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"}]],m7n=ct("git-commit-horizontal",p7n);/** * @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"}]],x$=ct("goal",Y6n);/** + */const g7n=[["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"}]],L$=ct("goal",g7n);/** * @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=[["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"}]],J6n=ct("globe",Z6n);/** + */const v7n=[["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"}]],b7n=ct("globe",v7n);/** * @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 eCn=[["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"}]],w$=ct("history",eCn);/** + */const y7n=[["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"}]],I$=ct("history",y7n);/** * @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=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],DS=ct("info",tCn);/** + */const x7n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],US=ct("info",x7n);/** * @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:"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"}]],rCn=ct("laptop",nCn);/** + */const w7n=[["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"}]],k7n=ct("laptop",w7n);/** * @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:"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"}]],iCn=ct("lightbulb",sCn);/** + */const S7n=[["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"}]],C7n=ct("lightbulb",S7n);/** * @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:"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"}]],k$=ct("link-2",aCn);/** + */const E7n=[["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"}]],$$=ct("link-2",E7n);/** * @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:"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"}]],cCn=ct("list-checks",oCn);/** + */const N7n=[["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"}]],z7n=ct("list-checks",N7n);/** * @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 lCn=[["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"}]],Bj=ct("lock",lCn);/** + */const j7n=[["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"}]],Yj=ct("lock",j7n);/** * @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 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"}]],_Cn=ct("maximize-2",uCn);/** + */const A7n=[["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"}]],T7n=ct("maximize-2",A7n);/** * @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=[["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"}]],S$=ct("message-square-quote",fCn);/** + */const R7n=[["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"}]],B$=ct("message-square-quote",R7n);/** * @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:"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"}]],B0=ct("messages-square",dCn);/** + */const M7n=[["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"}]],P0=ct("messages-square",M7n);/** * @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:"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"}]],pCn=ct("minimize-2",hCn);/** + */const O7n=[["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"}]],D7n=ct("minimize-2",O7n);/** * @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 mCn=[["path",{d:"M5 12h14",key:"1ays0h"}]],gCn=ct("minus",mCn);/** + */const L7n=[["path",{d:"M5 12h14",key:"1ays0h"}]],I7n=ct("minus",L7n);/** * @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=[["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"}]],bCn=ct("monitor",vCn);/** + */const $7n=[["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"}]],B7n=ct("monitor",$7n);/** * @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:"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"}]],xCn=ct("moon",yCn);/** + */const P7n=[["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"}]],F7n=ct("moon",P7n);/** * @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 wCn=[["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"}]],kCn=ct("mouse-pointer-click",wCn);/** + */const H7n=[["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"}]],q7n=ct("mouse-pointer-click",H7n);/** * @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:"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"}]],LS=ct("package",SCn);/** + */const U7n=[["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"}]],GS=ct("package",U7n);/** * @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=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],C$=ct("panel-left",CCn);/** + */const G7n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],P$=ct("panel-left",G7n);/** * @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 ECn=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],E$=ct("panel-right",ECn);/** + */const K7n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],F$=ct("panel-right",K7n);/** * @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 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"}]],zCn=ct("paperclip",NCn);/** + */const V7n=[["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"}]],W7n=ct("paperclip",V7n);/** * @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 jCn=[["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"}]],IS=ct("pencil",jCn);/** + */const Q7n=[["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"}]],KS=ct("pencil",Q7n);/** * @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 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"}]],TCn=ct("play",ACn);/** + */const X7n=[["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"}]],Y7n=ct("play",X7n);/** * @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 RCn=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Xh=ct("plus",RCn);/** + */const Z7n=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Qh=ct("plus",Z7n);/** * @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 MCn=[["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"}]],Wa=ct("refresh-cw",MCn);/** + */const J7n=[["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"}]],Va=ct("refresh-cw",J7n);/** * @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:"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"}]],DCn=ct("rotate-cw",OCn);/** + */const e8n=[["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"}]],t8n=ct("rotate-cw",e8n);/** * @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 LCn=[["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"}]],$S=ct("scroll-text",LCn);/** + */const n8n=[["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"}]],VS=ct("scroll-text",n8n);/** * @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 ICn=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],N$=ct("search",ICn);/** + */const r8n=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],H$=ct("search",r8n);/** * @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=[["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"}]],Pj=ct("server",$Cn);/** + */const s8n=[["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"}]],Zj=ct("server",s8n);/** * @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 BCn=[["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"}]],BS=ct("settings",BCn);/** + */const i8n=[["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"}]],WS=ct("settings",i8n);/** * @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:"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"}]],z$=ct("sliders-horizontal",PCn);/** + */const a8n=[["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"}]],q$=ct("sliders-horizontal",a8n);/** * @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=[["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"}]],HCn=ct("square-pen",FCn);/** + */const o8n=[["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"}]],c8n=ct("square-pen",o8n);/** * @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 qCn=[["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"}]],Of=ct("square-terminal",qCn);/** + */const l8n=[["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"}]],Mf=ct("square-terminal",l8n);/** * @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=[["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"}]],GCn=ct("sun",UCn);/** + */const u8n=[["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"}]],_8n=ct("sun",u8n);/** * @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=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],xo=ct("terminal",VCn);/** + */const f8n=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],bo=ct("terminal",f8n);/** * @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=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],WCn=ct("toggle-right",KCn);/** + */const d8n=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],h8n=ct("toggle-right",d8n);/** * @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 QCn=[["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"}]],Df=ct("trash-2",QCn);/** + */const p8n=[["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"}]],Of=ct("trash-2",p8n);/** * @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=[["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"}]],PS=ct("triangle-alert",XCn);/** + */const m8n=[["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"}]],QS=ct("triangle-alert",m8n);/** * @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 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"}]],ZCn=ct("upload",YCn);/** + */const g8n=[["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"}]],v8n=ct("upload",g8n);/** * @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 JCn=[["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"}]],FS=ct("users",JCn);/** + */const b8n=[["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"}]],XS=ct("users",b8n);/** * @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 e7n=[["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"}]],t7n=ct("wand-sparkles",e7n);/** + */const y8n=[["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"}]],x8n=ct("wand-sparkles",y8n);/** * @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 n7n=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],br=ct("x",n7n);/** + */const w8n=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xr=ct("x",w8n);/** * @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 r7n=[["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"}]],s7n=ct("zap",r7n);function Iu(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const i7n=["settings","harnesses","projects","compute","instances","environment","git","storage"],a7n=e=>i7n.some(n=>n===e),Lf=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),$i=e=>typeof e=="string"&&e.length>0,p1=e=>e==null||$i(e);function HS(e){if(!Lf(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")&&$i(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&p1(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...$i(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&$i(e.path)&&p1(e.sessionId)&&p1(e.ref)&&p1(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}:{},...$i(e.sessionId)?{sessionId:e.sessionId}:{},...$i(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...$i(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&$i(e.experimentId)&&$i(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")&&$i(e.sessionId)&&$i(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&$i(e.sessionId)&&$i(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};break;case"side":if(n("kind","sessionId")&&$i(e.sessionId))return{kind:"side",sessionId:e.sessionId}}}function vf(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"&&a7n(r)?{kind:"settings",projectId:t,section:r}:null:null}function Qb(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=vf(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(!HS(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function iv(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const Fj=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function j$(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 h=i;i=!1;try{await e(u,h),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 yw={exports:{}},Hj;function o7n(){return Hj||(Hj=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"))),h=window.getComputedStyle(this._terminal.element),f=c-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),p=u-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.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})()))})(yw)),yw.exports}var c7n=o7n(),xw={exports:{}},qj;function l7n(){return qj||(qj=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function c(h){try{const f=new URL(h),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 h.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(h,f,p,m={}){this._terminal=h,this._regex=f,this._handler=p,this._options=m}provideLinks(h,f){const p=u.computeLink(h,this._regex,this._terminal,this._handler);f(this._addCallbacks(p))}_addCallbacks(h){return h.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,b]=u._getWindowedLineStrings(f-1,m),y=v.join("");let x;const C=[];for(;x=k.exec(y);){const N=x[0];if(!c(N))continue;const[j,A]=u._mapStrIdx(m,b,0,x.index),[z,M]=u._mapStrIdx(m,j,A,N.length);if(j===-1||A===-1||z===-1||M===-1)continue;const D={start:{x:A+1,y:j+1},end:{x:M,y:z+1}};C.push({range:D,text:N,activate:w})}return C}static _getWindowedLineStrings(f,p){let m,w=f,k=f,v=0,b="";const y=[];if(m=p.buffer.active.getLine(f)){const x=m.translateToString(!0);if(m.isWrapped&&x[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--w))&&v<2048&&(b=m.translateToString(!0),v+=b.length,y.push(b),m.isWrapped&&b.indexOf(" ")===-1););y.reverse()}for(y.push(x),v=0;(m=p.buffer.active.getLine(++k))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,y.push(b),b.indexOf(" ")===-1););}return[y,w]}static _mapStrIdx(f,p,m,w){const k=f.buffer.active,v=k.getNullCell();let b=m;for(;w;){const y=k.getLine(p);if(!y)return[-1,-1];for(let x=b;x{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(h,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(h=u,f={}){this._handler=h,this._options=f}activate(h){this._terminal=h;const f=this._options,p=f.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,f))}dispose(){var h;(h=this._linkProvider)==null||h.dispose()}}})(),i})()))})(xw)),xw.exports}var u7n=l7n(),ww={exports:{}},Uj;function _7n(){return Uj||(Uj=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,c){var u=this&&this.__decorate||function(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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 b=o.AccessibilityManager=class extends m.Disposable{constructor(y,x,C,N){super(),this._terminal=y,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 j=0;jthis._handleBoundaryFocus(j,0),this._bottomBoundaryFocusListener=j=>this._handleBoundaryFocus(j,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((j=>this._handleResize(j.rows)))),this.register(this._terminal.onRender((j=>this._refreshRows(j.start,j.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((j=>this._handleChar(j)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` + */const k8n=[["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"}]],S8n=ct("zap",k8n);function Lu(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const C8n=["settings","harnesses","projects","compute","instances","environment","git","storage"],E8n=e=>C8n.some(n=>n===e),Df=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),$i=e=>typeof e=="string"&&e.length>0,p1=e=>e==null||$i(e);function YS(e){if(!Df(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")&&$i(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&p1(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...$i(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&$i(e.path)&&p1(e.sessionId)&&p1(e.ref)&&p1(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}:{},...$i(e.sessionId)?{sessionId:e.sessionId}:{},...$i(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...$i(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&$i(e.experimentId)&&$i(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")&&$i(e.sessionId)&&$i(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&$i(e.sessionId)&&$i(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};break;case"side":if(n("kind","sessionId")&&$i(e.sessionId))return{kind:"side",sessionId:e.sessionId}}}function gf(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"&&E8n(r)?{kind:"settings",projectId:t,section:r}:null:null}function Yb(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=gf(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(!YS(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function iv(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const Jj=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function U$(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 h=i;i=!1;try{await e(u,h),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 Sw={exports:{}},eA;function N8n(){return eA||(eA=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"))),h=window.getComputedStyle(this._terminal.element),f=c-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),p=u-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.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})()))})(Sw)),Sw.exports}var z8n=N8n(),Cw={exports:{}},tA;function j8n(){return tA||(tA=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function c(h){try{const f=new URL(h),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 h.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(h,f,p,m={}){this._terminal=h,this._regex=f,this._handler=p,this._options=m}provideLinks(h,f){const p=u.computeLink(h,this._regex,this._terminal,this._handler);f(this._addCallbacks(p))}_addCallbacks(h){return h.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,b]=u._getWindowedLineStrings(f-1,m),y=v.join("");let x;const C=[];for(;x=k.exec(y);){const N=x[0];if(!c(N))continue;const[j,A]=u._mapStrIdx(m,b,0,x.index),[z,M]=u._mapStrIdx(m,j,A,N.length);if(j===-1||A===-1||z===-1||M===-1)continue;const D={start:{x:A+1,y:j+1},end:{x:M,y:z+1}};C.push({range:D,text:N,activate:w})}return C}static _getWindowedLineStrings(f,p){let m,w=f,k=f,v=0,b="";const y=[];if(m=p.buffer.active.getLine(f)){const x=m.translateToString(!0);if(m.isWrapped&&x[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--w))&&v<2048&&(b=m.translateToString(!0),v+=b.length,y.push(b),m.isWrapped&&b.indexOf(" ")===-1););y.reverse()}for(y.push(x),v=0;(m=p.buffer.active.getLine(++k))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,y.push(b),b.indexOf(" ")===-1););}return[y,w]}static _mapStrIdx(f,p,m,w){const k=f.buffer.active,v=k.getNullCell();let b=m;for(;w;){const y=k.getLine(p);if(!y)return[-1,-1];for(let x=b;x{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(h,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(h=u,f={}){this._handler=h,this._options=f}activate(h){this._terminal=h;const f=this._options,p=f.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,f))}dispose(){var h;(h=this._linkProvider)==null||h.dispose()}}})(),i})()))})(Cw)),Cw.exports}var A8n=j8n(),Ew={exports:{}},nA;function T8n(){return nA||(nA=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,c){var u=this&&this.__decorate||function(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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 b=o.AccessibilityManager=class extends m.Disposable{constructor(y,x,C,N){super(),this._terminal=y,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 j=0;jthis._handleBoundaryFocus(j,0),this._bottomBoundaryFocusListener=j=>this._handleBoundaryFocus(j,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((j=>this._handleResize(j.rows)))),this.register(this._terminal.onRender((j=>this._refreshRows(j.start,j.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((j=>this._handleChar(j)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` `)))),this.register(this._terminal.onA11yTab((j=>this._handleTab(j)))),this.register(this._terminal.onKey((j=>this._handleKey(j.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(y){for(let x=0;x0?this._charsToConsume.shift()!==y&&(this._charsToAnnounce+=y):this._charsToAnnounce+=y,y===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(y){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(y)||this._charsToConsume.push(y)}_refreshRows(y,x){this._liveRegionDebouncer.refresh(y,x,this._terminal.rows)}_renderRows(y,x){const C=this._terminal.buffer,N=C.lines.length.toString();for(let j=y;j<=x;j++){const A=C.lines.get(C.ydisp+j),z=[],M=(A==null?void 0:A.translateToString(!0,void 0,void 0,z))||"",D=(C.ydisp+j+1).toString(),I=this._rowElements[j];I&&(M.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=M,this._rowColumns.set(I,z)),I.setAttribute("aria-posinset",D),I.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(y,x){const C=y.target,N=this._rowElements[x===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(x===0?"1":`${this._terminal.buffer.lines.length}`)||y.relatedTarget!==N)return;let j,A;if(x===0?(j=C,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(j=this._rowElements.shift(),A=C,this._rowContainer.removeChild(j)),j.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),x===0){const z=this._createAccessibilityTreeNode();this._rowElements.unshift(z),this._rowContainer.insertAdjacentElement("afterbegin",z)}else{const z=this._createAccessibilityTreeNode();this._rowElements.push(z),this._rowContainer.appendChild(z)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(x===0?-1:1),this._rowElements[x===0?1:this._rowElements.length-2].focus(),y.preventDefault(),y.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const y=document.getSelection();if(!y)return;if(y.isCollapsed)return void(this._rowContainer.contains(y.anchorNode)&&this._terminal.clearSelection());if(!y.anchorNode||!y.focusNode)return void console.error("anchorNode and/or focusNode are null");let x={node:y.anchorNode,offset:y.anchorOffset},C={node:y.focusNode,offset:y.focusOffset};if((x.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||x.node===C.node&&x.offset>C.offset)&&([x,C]=[C,x]),x.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(x={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(x.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 j=({node:D,offset:I})=>{const B=D instanceof Text?D.parentNode:D;let G=parseInt(B==null?void 0:B.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;const q=this._rowColumns.get(B);if(!q)return console.warn("columns is null. Race condition?"),null;let Q=I=this._terminal.cols&&(++G,Q=0),{row:G,column:Q}},A=j(x),z=j(C);if(A&&z){if(A.row>z.row||A.row===z.row&&A.column>=z.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(z.row-A.row)*this._terminal.cols-A.column+z.column)}}_handleResize(y){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let x=this._rowContainer.children.length;xy;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const y=this._coreBrowserService.mainDocument.createElement("div");return y.setAttribute("role","listitem"),y.tabIndex=-1,this._refreshRowDimensions(y),y}_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 y=0;y{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function h(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,b=p.clientY-k.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}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&&h(p.clipboardData.getData("text/plain"),m,w,k)},o.paste=h,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(h,f,p){this._css.set(h,f,p)}getCss(h,f){return this._css.get(h,f)}setColor(h,f,p){this._color.set(h,f,p)}getColor(h,f){return this._color.get(h,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,h,f){c.addEventListener(u,h,f);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,h,f))}}}},3551:function(a,o,c){var u=this&&this.__decorate||function(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(b,y,x,C,N){super(),this._element=b,this._mouseService=y,this._renderService=x,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 j;this._lastMouseEvent=void 0,(j=this._activeProviderReplies)==null||j.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(b){this._lastMouseEvent=b;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!y)return;this._isMouseOut=!1;const x=b.composedPath();for(let C=0;C{j==null||j.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let x=!1;for(const[j,A]of this._linkProviderService.linkProviders.entries())y?(N=this._activeProviderReplies)!=null&&N.get(j)&&(x=this._checkLinkProviderResult(j,b,x)):A.provideLinks(b.y,(z=>{var D,I;if(this._isMouseOut)return;const M=z==null?void 0:z.map((B=>({link:B})));(D=this._activeProviderReplies)==null||D.set(j,M),x=this._checkLinkProviderResult(j,b,x),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,y){const x=new Set;for(let C=0;Cb?this._bufferService.cols:A.link.range.end.x;for(let D=z;D<=M;D++){if(x.has(D)){N.splice(j--,1);break}x.add(D)}}}}_checkLinkProviderResult(b,y,x){var j;if(!this._activeProviderReplies)return x;const C=this._activeProviderReplies.get(b);let N=!1;for(let A=0;Athis._linkAtPosition(z.link,y)));A&&(x=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!x)for(let A=0;Athis._linkAtPosition(M.link,y)));if(z){x=!0,this._handleNewLink(z);break}}return x}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);y&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,y)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,y){this._currentLink&&this._lastMouseEvent&&(!b||!y||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=y)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._linkAtPosition(b.link,y)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var x,C;return(C=(x=this._currentLink)==null?void 0:x.state)==null?void 0:C.decorations.pointerCursor},set:x=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==x&&(this._currentLink.state.decorations.pointerCursor=x,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",x))}},underline:{get:()=>{var x,C;return(C=(x=this._currentLink)==null?void 0:x.state)==null?void 0:C.decorations.underline},set:x=>{var C,N,j;(C=this._currentLink)!=null&&C.state&&((j=(N=this._currentLink)==null?void 0:N.state)==null?void 0:j.decorations.underline)!==x&&(this._currentLink.state.decorations.underline=x,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,x))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((x=>{if(!this._currentLink)return;const C=x.start===0?0:x.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+x.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(C,N),this._lastMouseEvent)){const j=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);j&&this._askForLink(j,!1)}}))))}_linkHover(b,y,x){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),y.hover&&y.hover(x,y.text)}_fireUnderlineEvent(b,y){const x=b.range,C=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(x.start.x-1,x.start.y-C-1,x.end.x,x.end.y-C-1,void 0);(y?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(b,y,x){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),y.leave&&y.leave(x,y.text)}_linkAtPosition(b,y){const x=b.range.start.y*this._bufferService.cols+b.range.start.x,C=b.range.end.y*this._bufferService.cols+b.range.end.x,N=y.y*this._bufferService.cols+y.x;return x<=N&&N<=C}_positionFromMouseEvent(b,y,x){const C=x.getCoords(b,y,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,y,x,C,N){return{x1:b,y1:y,x2:x,y2:C,cols:this._bufferService.cols,fg:N}}};o.Linkifier=v=u([h(1,k.IMouseService),h(2,k.IRenderService),h(3,w.IBufferService),h(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,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b){this._bufferService=k,this._optionsService=v,this._oscLinkService=b}provideLinks(k,v){var M;const b=this._bufferService.buffer.lines.get(k-1);if(!b)return void v(void 0);const y=[],x=this._optionsService.rawOptions.linkHandler,C=new f.CellData,N=b.getTrimmedLength();let j=-1,A=-1,z=!1;for(let D=0;Dx?x.activate(q,Q,B):w(0,Q),hover:(q,Q)=>{var K;return(K=x==null?void 0:x.hover)==null?void 0:K.call(x,q,Q,B)},leave:(q,Q)=>{var K;return(K=x==null?void 0:x.leave)==null?void 0:K.call(x,q,Q,B)}})}z=!1,C.hasExtendedAttrs()&&C.extended.urlId?(A=D,j=C.extended.urlId):(A=-1,j=-1)}}v(y)}};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(y){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(y)||this._charsToConsume.push(y)}_refreshRows(y,x){this._liveRegionDebouncer.refresh(y,x,this._terminal.rows)}_renderRows(y,x){const C=this._terminal.buffer,N=C.lines.length.toString();for(let j=y;j<=x;j++){const A=C.lines.get(C.ydisp+j),z=[],M=(A==null?void 0:A.translateToString(!0,void 0,void 0,z))||"",D=(C.ydisp+j+1).toString(),I=this._rowElements[j];I&&(M.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=M,this._rowColumns.set(I,z)),I.setAttribute("aria-posinset",D),I.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(y,x){const C=y.target,N=this._rowElements[x===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(x===0?"1":`${this._terminal.buffer.lines.length}`)||y.relatedTarget!==N)return;let j,A;if(x===0?(j=C,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(j=this._rowElements.shift(),A=C,this._rowContainer.removeChild(j)),j.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),x===0){const z=this._createAccessibilityTreeNode();this._rowElements.unshift(z),this._rowContainer.insertAdjacentElement("afterbegin",z)}else{const z=this._createAccessibilityTreeNode();this._rowElements.push(z),this._rowContainer.appendChild(z)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(x===0?-1:1),this._rowElements[x===0?1:this._rowElements.length-2].focus(),y.preventDefault(),y.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const y=document.getSelection();if(!y)return;if(y.isCollapsed)return void(this._rowContainer.contains(y.anchorNode)&&this._terminal.clearSelection());if(!y.anchorNode||!y.focusNode)return void console.error("anchorNode and/or focusNode are null");let x={node:y.anchorNode,offset:y.anchorOffset},C={node:y.focusNode,offset:y.focusOffset};if((x.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||x.node===C.node&&x.offset>C.offset)&&([x,C]=[C,x]),x.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(x={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(x.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 j=({node:D,offset:I})=>{const B=D instanceof Text?D.parentNode:D;let G=parseInt(B==null?void 0:B.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;const U=this._rowColumns.get(B);if(!U)return console.warn("columns is null. Race condition?"),null;let Q=I=this._terminal.cols&&(++G,Q=0),{row:G,column:Q}},A=j(x),z=j(C);if(A&&z){if(A.row>z.row||A.row===z.row&&A.column>=z.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(z.row-A.row)*this._terminal.cols-A.column+z.column)}}_handleResize(y){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let x=this._rowContainer.children.length;xy;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const y=this._coreBrowserService.mainDocument.createElement("div");return y.setAttribute("role","listitem"),y.tabIndex=-1,this._refreshRowDimensions(y),y}_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 y=0;y{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function h(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,b=p.clientY-k.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}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&&h(p.clipboardData.getData("text/plain"),m,w,k)},o.paste=h,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(h,f,p){this._css.set(h,f,p)}getCss(h,f){return this._css.get(h,f)}setColor(h,f,p){this._color.set(h,f,p)}getColor(h,f){return this._color.get(h,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,h,f){c.addEventListener(u,h,f);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,h,f))}}}},3551:function(a,o,c){var u=this&&this.__decorate||function(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(b,y,x,C,N){super(),this._element=b,this._mouseService=y,this._renderService=x,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 j;this._lastMouseEvent=void 0,(j=this._activeProviderReplies)==null||j.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(b){this._lastMouseEvent=b;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!y)return;this._isMouseOut=!1;const x=b.composedPath();for(let C=0;C{j==null||j.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let x=!1;for(const[j,A]of this._linkProviderService.linkProviders.entries())y?(N=this._activeProviderReplies)!=null&&N.get(j)&&(x=this._checkLinkProviderResult(j,b,x)):A.provideLinks(b.y,(z=>{var D,I;if(this._isMouseOut)return;const M=z==null?void 0:z.map((B=>({link:B})));(D=this._activeProviderReplies)==null||D.set(j,M),x=this._checkLinkProviderResult(j,b,x),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,y){const x=new Set;for(let C=0;Cb?this._bufferService.cols:A.link.range.end.x;for(let D=z;D<=M;D++){if(x.has(D)){N.splice(j--,1);break}x.add(D)}}}}_checkLinkProviderResult(b,y,x){var j;if(!this._activeProviderReplies)return x;const C=this._activeProviderReplies.get(b);let N=!1;for(let A=0;Athis._linkAtPosition(z.link,y)));A&&(x=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!x)for(let A=0;Athis._linkAtPosition(M.link,y)));if(z){x=!0,this._handleNewLink(z);break}}return x}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);y&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,y)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,y){this._currentLink&&this._lastMouseEvent&&(!b||!y||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=y)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._linkAtPosition(b.link,y)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var x,C;return(C=(x=this._currentLink)==null?void 0:x.state)==null?void 0:C.decorations.pointerCursor},set:x=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==x&&(this._currentLink.state.decorations.pointerCursor=x,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",x))}},underline:{get:()=>{var x,C;return(C=(x=this._currentLink)==null?void 0:x.state)==null?void 0:C.decorations.underline},set:x=>{var C,N,j;(C=this._currentLink)!=null&&C.state&&((j=(N=this._currentLink)==null?void 0:N.state)==null?void 0:j.decorations.underline)!==x&&(this._currentLink.state.decorations.underline=x,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,x))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((x=>{if(!this._currentLink)return;const C=x.start===0?0:x.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+x.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(C,N),this._lastMouseEvent)){const j=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);j&&this._askForLink(j,!1)}}))))}_linkHover(b,y,x){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),y.hover&&y.hover(x,y.text)}_fireUnderlineEvent(b,y){const x=b.range,C=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(x.start.x-1,x.start.y-C-1,x.end.x,x.end.y-C-1,void 0);(y?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(b,y,x){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),y.leave&&y.leave(x,y.text)}_linkAtPosition(b,y){const x=b.range.start.y*this._bufferService.cols+b.range.start.x,C=b.range.end.y*this._bufferService.cols+b.range.end.x,N=y.y*this._bufferService.cols+y.x;return x<=N&&N<=C}_positionFromMouseEvent(b,y,x){const C=x.getCoords(b,y,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,y,x,C,N){return{x1:b,y1:y,x2:x,y2:C,cols:this._bufferService.cols,fg:N}}};o.Linkifier=v=u([h(1,k.IMouseService),h(2,k.IRenderService),h(3,w.IBufferService),h(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,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b){this._bufferService=k,this._optionsService=v,this._oscLinkService=b}provideLinks(k,v){var M;const b=this._bufferService.buffer.lines.get(k-1);if(!b)return void v(void 0);const y=[],x=this._optionsService.rawOptions.linkHandler,C=new f.CellData,N=b.getTrimmedLength();let j=-1,A=-1,z=!1;for(let D=0;Dx?x.activate(U,Q,B):w(0,Q),hover:(U,Q)=>{var V;return(V=x==null?void 0:x.hover)==null?void 0:V.call(x,U,Q,B)},leave:(U,Q)=>{var V;return(V=x==null?void 0:x.leave)==null?void 0:V.call(x,U,Q,B)}})}z=!1,C.hasExtendedAttrs()&&C.extended.urlId?(A=D,j=C.extended.urlId):(A=-1,j=-1)}}v(y)}};function w(k,v){if(confirm(`Do you want to navigate to ${v}? -WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([h(0,p.IBufferService),h(1,p.IOptionsService),h(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,h){this._rowCount=h,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),h=c(3656),f=c(3551),p=c(9042),m=c(3730),w=c(1680),k=c(3107),v=c(5744),b=c(2950),y=c(1296),x=c(428),C=c(4269),N=c(5114),j=c(8934),A=c(3230),z=c(9312),M=c(4725),D=c(6731),I=c(8055),B=c(8969),G=c(8460),q=c(844),Q=c(6114),K=c(8437),Z=c(2584),J=c(7399),$=c(5941),L=c(9074),F=c(2585),U=c(5435),H=c(4567),ae=c(779);class ie 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(re={}){super(re),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new q.MutableDisposable),this._onCursorMove=this.register(new G.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new G.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new G.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new G.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new G.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new G.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new G.EventEmitter),this._onBlur=this.register(new G.EventEmitter),this._onA11yCharEmitter=this.register(new G.EventEmitter),this._onA11yTabEmitter=this.register(new G.EventEmitter),this._onWillOpen=this.register(new G.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(ae.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(((V,oe)=>this.refresh(V,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((V=>this._reportWindowsOptions(V)))),this.register(this._inputHandler.onColor((V=>this._handleColorEvent(V)))),this.register((0,G.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,G.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((V=>this._afterResize(V.cols,V.rows)))),this.register((0,q.toDisposable)((()=>{var V,oe;this._customKeyEventHandler=void 0,(oe=(V=this.element)==null?void 0:V.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(re){if(this._themeService)for(const V of re){let oe,ce="";switch(V.index){case 256:oe="foreground",ce="10";break;case 257:oe="background",ce="11";break;case 258:oe="cursor",ce="12";break;default:oe="ansi",ce="4;"+V.index}switch(V.type){case 0:const me=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[V.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${ce};${(0,$.toRgbString)(me)}${Z.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((ve=>ve.ansi[V.index]=I.channels.toColor(...V.color)));else{const ve=oe;this._themeService.modifyColors((Re=>Re[ve]=I.channels.toColor(...V.color)))}break;case 2:this._themeService.restoreColor(V.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(re){re?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(H.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(re){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var re;return(re=this.textarea)==null?void 0:re.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 re=this.buffer.ybase+this.buffer.y,V=this.buffer.lines.get(re);if(!V)return;const oe=Math.min(this.buffer.x,this.cols-1),ce=this._renderService.dimensions.css.cell.height,me=V.getWidth(oe),ve=this._renderService.dimensions.css.cell.width*me,Re=this.buffer.y*this._renderService.dimensions.css.cell.height,Fe=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Fe+"px",this.textarea.style.top=Re+"px",this.textarea.style.width=ve+"px",this.textarea.style.height=ce+"px",this.textarea.style.lineHeight=ce+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",(V=>{this.hasSelection()&&(0,u.copyHandler)(V,this._selectionService)})));const re=V=>(0,u.handlePasteEvent)(V,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",re)),this.register((0,h.addDisposableDomListener)(this.element,"paste",re)),Q.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(V=>{V.button===2&&(0,u.rightClickHandler)(V,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",(V=>{(0,u.rightClickHandler)(V,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",(V=>{V.button===1&&(0,u.moveTextAreaUnderMouseCursor)(V,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",(re=>this._keyUp(re)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",(re=>this._keyDown(re)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",(re=>this._keyPress(re)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",(re=>this._compositionHelper.compositionupdate(re)))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,h.addDisposableDomListener)(this.textarea,"input",(re=>this._inputEvent(re)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(re){var oe;if(!re)throw new Error("Terminal requires a parent element.");if(re.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((oe=this.element)==null?void 0:oe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=re.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"),re.appendChild(this.element);const V=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),V.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,h.addDisposableDomListener)(this.screenElement,"mousemove",(ce=>this.updateCursorStyle(ce)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),V.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,re.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",(ce=>this._handleTextAreaFocus(ce)))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(x.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((ce=>this._onRender.fire(ce)))),this.onResize((ce=>this._renderService.resize(ce.cols,ce.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(j.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(V);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((ce=>this.scrollLines(ce.amount,ce.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(z.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ce=>this.scrollLines(ce.amount,ce.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ce=>this._renderService.handleSelectionChanged(ce.start,ce.end,ce.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ce=>{this.textarea.value=ce,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ce=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(ce=>this._selectionService.handleMouseDown(ce)))),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(H.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ce=>this._handleScreenReaderModeOptionChange(ce)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ce=>{!this._overviewRulerRenderer&&ce&&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(y.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const re=this,V=this.element;function oe(ve){const Re=re._mouseService.getMouseReportCoords(ve,re.screenElement);if(!Re)return!1;let Fe,Xe;switch(ve.overrideType||ve.type){case"mousemove":Xe=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":Xe=0,Fe=ve.button<3?ve.button:3;break;case"mousedown":Xe=1,Fe=ve.button<3?ve.button:3;break;case"wheel":if(re._customWheelEventHandler&&re._customWheelEventHandler(ve)===!1||re.viewport.getLinesScrolled(ve)===0)return!1;Xe=ve.deltaY<0?0:1,Fe=4;break;default:return!1}return!(Xe===void 0||Fe===void 0||Fe>4)&&re.coreMouseService.triggerMouseEvent({col:Re.col,row:Re.row,x:Re.x,y:Re.y,button:Fe,action:Xe,ctrl:ve.ctrlKey,alt:ve.altKey,shift:ve.shiftKey})}const ce={mouseup:null,wheel:null,mousedrag:null,mousemove:null},me={mouseup:ve=>(oe(ve),ve.buttons||(this._document.removeEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.removeEventListener("mousemove",ce.mousedrag)),this.cancel(ve)),wheel:ve=>(oe(ve),this.cancel(ve,!0)),mousedrag:ve=>{ve.buttons&&oe(ve)},mousemove:ve=>{ve.buttons||oe(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?ce.mousemove||(V.addEventListener("mousemove",me.mousemove),ce.mousemove=me.mousemove):(V.removeEventListener("mousemove",ce.mousemove),ce.mousemove=null),16&ve?ce.wheel||(V.addEventListener("wheel",me.wheel,{passive:!1}),ce.wheel=me.wheel):(V.removeEventListener("wheel",ce.wheel),ce.wheel=null),2&ve?ce.mouseup||(ce.mouseup=me.mouseup):(this._document.removeEventListener("mouseup",ce.mouseup),ce.mouseup=null),4&ve?ce.mousedrag||(ce.mousedrag=me.mousedrag):(this._document.removeEventListener("mousemove",ce.mousedrag),ce.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(V,"mousedown",(ve=>{if(ve.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ve))return oe(ve),ce.mouseup&&this._document.addEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.addEventListener("mousemove",ce.mousedrag),this.cancel(ve)}))),this.register((0,h.addDisposableDomListener)(V,"wheel",(ve=>{if(!ce.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ve)===!1)return!1;if(!this.buffer.hasScrollback){const Re=this.viewport.getLinesScrolled(ve);if(Re===0)return;const Fe=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ve.deltaY<0?"A":"B");let Xe="";for(let Te=0;Te{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ve),this.cancel(ve)}),{passive:!0})),this.register((0,h.addDisposableDomListener)(V,"touchmove",(ve=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ve)?void 0:this.cancel(ve)}),{passive:!1}))}refresh(re,V){var oe;(oe=this._renderService)==null||oe.refreshRows(re,V)}updateCursorStyle(re){var V;(V=this._selectionService)!=null&&V.shouldColumnSelect(re)?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(re,V,oe=0){var ce;oe===1?(super.scrollLines(re,V,oe),this.refresh(0,this.rows-1)):(ce=this.viewport)==null||ce.scrollLines(re)}paste(re){(0,u.paste)(re,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(re){this._customKeyEventHandler=re}attachCustomWheelEventHandler(re){this._customWheelEventHandler=re}registerLinkProvider(re){return this._linkProviderService.registerLinkProvider(re)}registerCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const V=this._characterJoinerService.register(re);return this.refresh(0,this.rows-1),V}deregisterCharacterJoiner(re){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(re)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(re){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+re)}registerDecoration(re){return this._decorationService.registerDecoration(re)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(re,V,oe){this._selectionService.setSelection(re,V,oe)}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 re;(re=this._selectionService)==null||re.clearSelection()}selectAll(){var re;(re=this._selectionService)==null||re.selectAll()}selectLines(re,V){var oe;(oe=this._selectionService)==null||oe.selectLines(re,V)}_keyDown(re){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;const V=this.browser.isMac&&this.options.macOptionIsMeta&&re.altKey;if(!V&&!this._compositionHelper.keydown(re))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;V||re.key!=="Dead"&&re.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,J.evaluateKeyboardEvent)(re,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(re),oe.type===3||oe.type===2){const ce=this.rows-1;return this.scrollLines(oe.type===2?-ce:ce),this.cancel(re,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,re)||(oe.cancel&&this.cancel(re,!0),!oe.key||!!(re.key&&!re.ctrlKey&&!re.altKey&&!re.metaKey&&re.key.length===1&&re.key.charCodeAt(0)>=65&&re.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==Z.C0.ETX&&oe.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||re.altKey||re.ctrlKey?this.cancel(re,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(re,V){const oe=re.isMac&&!this.options.macOptionIsMeta&&V.altKey&&!V.ctrlKey&&!V.metaKey||re.isWindows&&V.altKey&&V.ctrlKey&&!V.metaKey||re.isWindows&&V.getModifierState("AltGraph");return V.type==="keypress"?oe:oe&&(!V.keyCode||V.keyCode>47)}_keyUp(re){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1||((function(V){return V.keyCode===16||V.keyCode===17||V.keyCode===18})(re)||this.focus(),this.updateCursorStyle(re),this._keyPressHandled=!1)}_keyPress(re){let V;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(re)===!1)return!1;if(this.cancel(re),re.charCode)V=re.charCode;else if(re.which===null||re.which===void 0)V=re.keyCode;else{if(re.which===0||re.charCode===0)return!1;V=re.which}return!(!V||(re.altKey||re.ctrlKey||re.metaKey)&&!this._isThirdLevelShift(this.browser,re)||(V=String.fromCharCode(V),this._onKey.fire({key:V,domEvent:re}),this._showCursor(),this.coreService.triggerDataEvent(V,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(re){if(re.data&&re.inputType==="insertText"&&(!re.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const V=re.data;return this.coreService.triggerDataEvent(V,!0),this.cancel(re),!0}return!1}resize(re,V){re!==this.cols||V!==this.rows?super.resize(re,V):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(re,V){var oe,ce;(oe=this._charSizeService)==null||oe.measure(),(ce=this.viewport)==null||ce.syncScrollArea(!0)}clear(){var re;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 V=1;V{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,h){this._rowCount=h,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(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(b,y,x,C,N,j,A,z){super(),this._viewportElement=b,this._scrollArea=y,this._bufferService=x,this._optionsService=C,this._charSizeService=N,this._renderService=j,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(z.colors),this.register(z.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.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(b){if(b)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 y=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==y&&(this._lastRecordedBufferHeight=y,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){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 y=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:y,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<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(b,y){const x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(y<0&&this._viewportElement.scrollTop!==0||y>0&&x0&&(x=B),C=""}}return{bufferElements:N,cursorElement:x}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let y=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(y/=this._currentRowHeight+0,this._wheelPartialScroll+=y,y=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(y*=this._bufferService.rows),y}_applyScrollModifier(b,y){const x=this._optionsService.rawOptions.fastScrollModifier;return x==="alt"&&y.altKey||x==="ctrl"&&y.ctrlKey||x==="shift"&&y.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const y=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,y!==0&&(this._viewportElement.scrollTop+=y,this._bubbleScroll(b,y))}};o.Viewport=v=u([h(2,k.IBufferService),h(3,k.IOptionsService),h(4,p.ICharSizeService),h(5,p.IRenderService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],v)},3107:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b,y,x){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=b,this._decorationService=y,this._renderService=x,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 y;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((y=k==null?void 0:k.options)==null?void 0:y.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 b=k.options.x??0;return b&&b>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 b=this._decorationElements.get(k);b||(b=this._createElement(k),k.element=b,this._decorationElements.set(k,b),this._container.appendChild(b),k.onDispose((()=>{this._decorationElements.delete(k),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(b)}}_refreshXPosition(k,v=k.element){if(!v)return;const b=k.options.x??0;(k.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*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([h(1,m.IBufferService),h(2,f.ICoreBrowserService),h(3,m.IDecorationService),h(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,h){return u>=c.startBufferLine-this._linePadding[h||"full"]&&u<=c.endBufferLine+this._linePadding[h||"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(x,C,N,j){var A,z=arguments.length,M=z<3?C:j===null?j=Object.getOwnPropertyDescriptor(C,N):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,C,N,j);else for(var D=x.length-1;D>=0;D--)(A=x[D])&&(M=(z<3?A(M):z>3?A(C,N,M):A(C,N))||M);return z>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(x,C){return function(N,j){C(N,j,x)}};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},b={full:0,left:0,center:0,right:0};let y=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(x,C,N,j,A,z,M){var I;super(),this._viewportElement=x,this._screenElement=C,this._bufferService=N,this._decorationService=j,this._renderService=A,this._optionsService=z,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(),(I=this._viewportElement.parentElement)==null||I.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 x=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=x,v.center=C,v.right=x,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const x=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(x,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 x=this._colorZoneStore.zones;for(const C of x)C.position!=="full"&&this._renderColorZone(C);for(const C of x)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(x){this._ctx.fillStyle=x.color,this._ctx.fillRect(b[x.position||"full"],Math.round((this._canvas.height-1)*(x.startBufferLine/this._bufferService.buffers.active.lines.length)-k[x.position||"full"]/2),v[x.position||"full"],Math.round((this._canvas.height-1)*((x.endBufferLine-x.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[x.position||"full"]))}_queueRefresh(x,C){this._shouldUpdateDimensions=x||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=y=u([h(2,w.IBufferService),h(3,w.IDecorationService),h(4,p.IRenderService),h(5,w.IOptionsService),h(6,p.ICoreBrowserService)],y)},2950:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b,y,x,C){this._textarea=k,this._compositionView=v,this._bufferService=b,this._optionsService=y,this._coreService=x,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 b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!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,b=v.replace(k,"");this._dataAlreadySent=b,v.length>k.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=w=u([h(2,p.IBufferService),h(3,p.IOptionsService),h(4,p.ICoreService),h(5,f.IRenderService)],w)},9806:(a,o)=>{function c(u,h,f){const p=f.getBoundingClientRect(),m=u.getComputedStyle(f),w=parseInt(m.getPropertyValue("padding-left")),k=parseInt(m.getPropertyValue("padding-top"));return[h.clientX-p.left-w,h.clientY-p.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(u,h,f,p,m,w,k,v,b){if(!w)return;const y=c(u,h,f);return y?(y[0]=Math.ceil((y[0]+(b?k/2:0))/k),y[1]=Math.ceil(y[1]/v),y[0]=Math.min(Math.max(y[0],1),p+(b?1:0)),y[1]=Math.min(Math.max(y[1],1),m),y):void 0}},9504:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=c(2584);function h(v,b,y,x){const C=v-f(v,y),N=b-f(b,y),j=Math.abs(C-N)-(function(A,z,M){let D=0;const I=A-f(A,M),B=z-f(z,M);for(let G=0;G=0&&vb?"A":"B"}function m(v,b,y,x,C,N){let j=v,A=b,z="";for(;j!==y||A!==x;)j+=C?1:-1,C&&j>N.cols-1?(z+=N.buffer.translateBufferLineToString(A,!1,v,j),j=0,v=0,A++):!C&&j<0&&(z+=N.buffer.translateBufferLineToString(A,!1,0,v+1),j=N.cols-1,v=j,A--);return z+N.buffer.translateBufferLineToString(A,!1,v,j)}function w(v,b){const y=b?"O":"[";return u.C0.ESC+y+v}function k(v,b){v=Math.floor(v);let y="";for(let x=0;x0?I-f(I,B):M;const Q=I,K=(function(Z,J,$,L,F,U){let H;return H=h($,L,F,U).length>0?L-f(L,F):J,Z<$&&H<=L||Z>=$&&Hv?"D":"C",k(Math.abs(C-v),w(j,x));j=N>b?"D":"C";const A=Math.abs(N-b);return k((function(z,M){return M.cols-z})(N>b?v:C,y)+(A-1)*y.cols+1+((N>b?C:v)-1),w(j,x))}},1296:function(a,o,c){var u=this&&this.__decorate||function(G,q,Q,K){var Z,J=arguments.length,$=J<3?q:K===null?K=Object.getOwnPropertyDescriptor(q,Q):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(G,q,Q,K);else for(var L=G.length-1;L>=0;L--)(Z=G[L])&&($=(J<3?Z($):J>3?Z(q,Q,$):Z(q,Q))||$);return J>3&&$&&Object.defineProperty(q,Q,$),$},h=this&&this.__param||function(G,q){return function(Q,K){q(Q,K,G)}};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),b=c(8055),y=c(8460),x=c(844),C=c(2585),N="xterm-dom-renderer-owner-",j="xterm-rows",A="xterm-fg-",z="xterm-bg-",M="xterm-focus",D="xterm-selection";let I=1,B=o.DomRenderer=class extends x.Disposable{constructor(G,q,Q,K,Z,J,$,L,F,U,H,ae,ie){super(),this._terminal=G,this._document=q,this._element=Q,this._screenElement=K,this._viewportElement=Z,this._helperContainer=J,this._linkifier2=$,this._charSizeService=F,this._optionsService=U,this._bufferService=H,this._coreBrowserService=ae,this._themeService=ie,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new y.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(j),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((ue=>this._injectCss(ue)))),this._injectCss(this._themeService.colors),this._rowFactory=L.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((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),this.register((0,x.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 G=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*G,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*G),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/G),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/G),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 q=`${this._terminalSelector} .${j} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=q,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(G){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let q=`${this._terminalSelector} .${j} { color: ${G.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;q+=`${this._terminalSelector} .${j} .xterm-dim { color: ${b.color.multiplyOpacity(G.foreground,.5).css};}`,q+=`${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}`;q+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,q+=`@keyframes ${K} { 50% { box-shadow: none; }}`,q+=`@keyframes ${Z} { 0% { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css}; } 50% { background-color: inherit; color: ${G.cursor.css}; }}`,q+=`${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css};}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${G.cursor.css} !important; color: ${G.cursorAccent.css} !important;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${G.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${G.cursor.css} inset;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${G.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,q+=`${this._terminalSelector} .${D} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${D} div { position: absolute; background-color: ${G.selectionBackgroundOpaque.css};}${this._terminalSelector} .${D} div { position: absolute; background-color: ${G.selectionInactiveBackgroundOpaque.css};}`;for(const[J,$]of G.ansi.entries())q+=`${this._terminalSelector} .${A}${J} { color: ${$.css}; }${this._terminalSelector} .${A}${J}.xterm-dim { color: ${b.color.multiplyOpacity($,.5).css}; }${this._terminalSelector} .${z}${J} { background-color: ${$.css}; }`;q+=`${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(G.background).css}; }${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(G.background),.5).css}; }${this._terminalSelector} .${z}${m.INVERTED_DEFAULT_COLOR} { background-color: ${G.foreground.css}; }`,this._themeStyleElement.textContent=q}_setDefaultSpacing(){const G=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${G}px`,this._rowFactory.defaultSpacing=G}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(G,q){for(let Q=this._rowElements.length;Q<=q;Q++){const K=this._document.createElement("div");this._rowContainer.appendChild(K),this._rowElements.push(K)}for(;this._rowElements.length>q;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(G,q){this._refreshRowElements(G,q),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(G,q,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(G,q,Q),this.renderRows(0,this._bufferService.rows-1),!G||!q)return;this._selectionRenderModel.update(this._terminal,G,q,Q);const K=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,$=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||$<0)return;const L=this._document.createDocumentFragment();if(Q){const F=G[0]>q[0];L.appendChild(this._createSelectionElement(J,F?q[0]:G[0],F?G[0]:q[0],$-J+1))}else{const F=K===J?G[0]:0,U=J===Z?q[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(J,F,U));const H=$-J-1;if(L.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,H)),J!==$){const ae=Z===$?q[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement($,0,ae))}}this._selectionContainer.appendChild(L)}_createSelectionElement(G,q,Q,K=1){const Z=this._document.createElement("div"),J=q*this.dimensions.css.cell.width;let $=this.dimensions.css.cell.width*(Q-q);return J+$>this.dimensions.css.canvas.width&&($=this.dimensions.css.canvas.width-J),Z.style.height=K*this.dimensions.css.cell.height+"px",Z.style.top=G*this.dimensions.css.cell.height+"px",Z.style.left=`${J}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 G of this._rowElements)G.replaceChildren()}renderRows(G,q){const Q=this._bufferService.buffer,K=Q.ybase+Q.y,Z=Math.min(Q.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=G;F<=q;F++){const U=F+Q.ydisp,H=this._rowElements[F],ae=Q.lines.get(U);if(!H||!ae)break;H.replaceChildren(...this._rowFactory.createRow(ae,U,U===K,$,L,Z,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!0)}_handleLinkLeave(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!1)}_setCellUnderline(G,q,Q,K,Z,J){Q<0&&(G=0),K<0&&(q=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 L=this._bufferService.buffer,F=L.ybase+L.y,U=Math.min(L.x,Z-1),H=this._optionsService.rawOptions.cursorBlink,ae=this._optionsService.rawOptions.cursorStyle,ie=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=Q;ue<=K;++ue){const re=ue+L.ydisp,V=this._rowElements[ue],oe=L.lines.get(re);if(!V||!oe)break;V.replaceChildren(...this._rowFactory.createRow(oe,re,re===F,ae,ie,U,H,this.dimensions.css.cell.width,this._widthCache,J?ue===Q?G:0:-1,J?(ue===K?q:Z)-1:-1))}}};o.DomRenderer=B=u([h(7,C.IInstantiationService),h(8,v.ICharSizeService),h(9,C.IOptionsService),h(10,C.IBufferService),h(11,v.ICoreBrowserService),h(12,v.IThemeService)],B)},3787:function(a,o,c){var u=this&&this.__decorate||function(j,A,z,M){var D,I=arguments.length,B=I<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,z):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(j,A,z,M);else for(var G=j.length-1;G>=0;G--)(D=j[G])&&(B=(I<3?D(B):I>3?D(A,z,B):D(A,z))||B);return I>3&&B&&Object.defineProperty(A,z,B),B},h=this&&this.__param||function(j,A){return function(z,M){A(z,M,j)}};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),b=c(4269),y=c(6171),x=c(3734);let C=o.DomRendererRowFactory=class{constructor(j,A,z,M,D,I,B){this._document=j,this._characterJoinerService=A,this._optionsService=z,this._coreBrowserService=M,this._coreService=D,this._decorationService=I,this._themeService=B,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(j,A,z){this._selectionStart=j,this._selectionEnd=A,this._columnSelectMode=z}createRow(j,A,z,M,D,I,B,G,q,Q,K){const Z=[],J=this._characterJoinerService.getJoinedCharacters(A),$=this._themeService.colors;let L,F=j.getNoBgTrimmedLength();z&&F0&&Re===J[0][0]){Xe=!0;const qt=J.shift();$e=new b.JoinedCellData(this._workCell,j.translateToString(!0,qt[0],qt[1]),qt[1]-qt[0]),Te=qt[1]-1,Fe=$e.getWidth()}const wt=this._isCellInSelection(Re,A),ot=z&&Re===I,Mt=ve&&Re>=Q&&Re<=K;let jt=!1;this._decorationService.forEachDecorationAtCell(Re,A,void 0,(qt=>{jt=!0}));let Ft=$e.getChars()||p.WHITESPACE_CELL_CHAR;if(Ft===" "&&($e.isUnderline()||$e.isOverline())&&(Ft=" "),ce=Fe*G-q.get(Ft,$e.isBold(),$e.isItalic()),L){if(U&&(wt&&oe||!wt&&!oe&&$e.bg===ae)&&(wt&&oe&&$.selectionForeground||$e.fg===ie)&&$e.extended.ext===ue&&Mt===re&&ce===V&&!ot&&!Xe&&!jt){$e.isInvisible()?H+=p.WHITESPACE_CELL_CHAR:H+=Ft,U++;continue}U&&(L.textContent=H),L=this._document.createElement("span"),U=0,H=""}else L=this._document.createElement("span");if(ae=$e.bg,ie=$e.fg,ue=$e.extended.ext,re=Mt,V=ce,oe=wt,Xe&&I>=Re&&I<=Te&&(I=Re),!this._coreService.isCursorHidden&&ot&&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($e.isBold()&&me.push("xterm-bold"),$e.isItalic()&&me.push("xterm-italic"),$e.isDim()&&me.push("xterm-dim"),H=$e.isInvisible()?p.WHITESPACE_CELL_CHAR:$e.getChars()||p.WHITESPACE_CELL_CHAR,$e.isUnderline()&&(me.push(`xterm-underline-${$e.extended.underlineStyle}`),H===" "&&(H=" "),!$e.isUnderlineColorDefault()))if($e.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${x.AttributeData.toColorRGB($e.getUnderlineColor()).join(",")})`;else{let qt=$e.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&$e.isBold()&&qt<8&&(qt+=8),L.style.textDecorationColor=$.ansi[qt].css}$e.isOverline()&&(me.push("xterm-overline"),H===" "&&(H=" ")),$e.isStrikethrough()&&me.push("xterm-strikethrough"),Mt&&(L.style.textDecoration="underline");let Le=$e.getFgColor(),tt=$e.getFgColorMode(),ke=$e.getBgColor(),ge=$e.getBgColorMode();const Ne=!!$e.isInverse();if(Ne){const qt=Le;Le=ke,ke=qt;const Xt=tt;tt=ge,ge=Xt}let qe,nt,ht,rt=!1;switch(this._decorationService.forEachDecorationAtCell(Re,A,void 0,(qt=>{qt.options.layer!=="top"&&rt||(qt.backgroundColorRGB&&(ge=50331648,ke=qt.backgroundColorRGB.rgba>>8&16777215,qe=qt.backgroundColorRGB),qt.foregroundColorRGB&&(tt=50331648,Le=qt.foregroundColorRGB.rgba>>8&16777215,nt=qt.foregroundColorRGB),rt=qt.options.layer==="top")})),!rt&&wt&&(qe=this._coreBrowserService.isFocused?$.selectionBackgroundOpaque:$.selectionInactiveBackgroundOpaque,ke=qe.rgba>>8&16777215,ge=50331648,rt=!0,$.selectionForeground&&(tt=50331648,Le=$.selectionForeground.rgba>>8&16777215,nt=$.selectionForeground)),rt&&me.push("xterm-decoration-top"),ge){case 16777216:case 33554432:ht=$.ansi[ke],me.push(`xterm-bg-${ke}`);break;case 50331648:ht=k.channels.toColor(ke>>16,ke>>8&255,255&ke),this._addStyle(L,`background-color:#${N((ke>>>0).toString(16),"0",6)}`);break;default:Ne?(ht=$.foreground,me.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):ht=$.background}switch(qe||$e.isDim()&&(qe=k.color.multiplyOpacity(ht,.5)),tt){case 16777216:case 33554432:$e.isBold()&&Le<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Le+=8),this._applyMinimumContrast(L,ht,$.ansi[Le],$e,qe,void 0)||me.push(`xterm-fg-${Le}`);break;case 50331648:const qt=k.channels.toColor(Le>>16&255,Le>>8&255,255&Le);this._applyMinimumContrast(L,ht,qt,$e,qe,nt)||this._addStyle(L,`color:#${N(Le.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,ht,$.foreground,$e,qe,nt)||Ne&&me.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}me.length&&(L.className=me.join(" "),me.length=0),ot||Xe||jt?L.textContent=H:U++,ce!==this.defaultSpacing&&(L.style.letterSpacing=`${ce}px`),Z.push(L),Re=Te}return L&&U&&(L.textContent=H),Z}_applyMinimumContrast(j,A,z,M,D,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,y.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const B=this._getContrastCache(M);let G;if(D||I||(G=B.getColor(A.rgba,z.rgba)),G===void 0){const q=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);G=k.color.ensureContrastRatio(D||A,I||z,q),B.setColor((D||A).rgba,(I||z).rgba,G??null)}return!!G&&(this._addStyle(j,`color:${G.css}`),!0)}_getContrastCache(j){return j.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(j,A){j.setAttribute("style",`${j.getAttribute("style")||""}${A};`)}_isCellInSelection(j,A){const z=this._selectionStart,M=this._selectionEnd;return!(!z||!M)&&(this._columnSelectMode?z[0]<=M[0]?j>=z[0]&&A>=z[1]&&j=z[1]&&j>=M[0]&&A<=M[1]:A>z[1]&&A=z[0]&&j=z[0])}};function N(j,A,z){for(;j.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 h=c.createElement("span");h.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=[h,f,p,m],this._container.appendChild(h),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,h,f){c===this._font&&u===this._fontSize&&h===this._weight&&f===this._weightBold||(this._font=c,this._fontSize=u,this._weight=h,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(c,u,h){let f=0;if(!u&&!h&&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"),h&&(p+="I");let m=this._holey.get(p);if(m===void 0){let w=0;u&&(w|=1),h&&(w|=2),m=this._measure(c,w),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const h=this._measureElements[u];return h.textContent=c.repeat(32),h.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(h){return 57508<=h&&h<=57558}function u(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=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(h){if(!h)throw new Error("value must not be falsy");return h},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},o.isEmoji=u,o.allowRescaling=function(h,f,p,m){return f===1&&p>Math.ceil(1.5*m)&&h!==void 0&&h>255&&!u(h)&&!c(h)&&!(function(w){return 57344<=w&&w<=63743})(h)},o.treatGlyphAsBackgroundColor=function(h){return c(h)||(function(f){return 9472<=f&&f<=9631})(h)},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(h,f,p=0){return(h-(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(h,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=h.buffers.active.ydisp,k=f[1]-w,v=p[1]-w,b=Math.max(k,0),y=Math.min(v,h.rows-1);b>=h.rows||y<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=y,this.startCol=f[0],this.endCol=p[0])}isCellSelected(h,f,p){return!!this.hasSelection&&(p-=h.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(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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(y,x,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 b(this._optionsService))}catch{this._measureStrategy=this.register(new v(y,x,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const y=this._measureStrategy.measure();y.width===this.width&&y.height===this.height||(this.width=y.width,this.height=y.height,this._onCharSizeChange.fire())}};o.CharSizeService=w=u([h(2,f.IOptionsService)],w);class k extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(x,C){x!==void 0&&x>0&&C!==void 0&&C>0&&(this._result.width=x,this._result.height=C)}}class v extends k{constructor(x,C,N){super(),this._document=x,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 b extends k{constructor(x){super(),this._optionsService=x,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 x=this._ctx.measureText("W");return this._validateAndSet(x.width,x.fontBoundingBoxAscent+x.fontBoundingBoxDescent),this._result}}},4269:function(a,o,c){var u=this&&this.__decorate||function(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(y,x,C){super(),this.content=0,this.combinedData="",this.fg=y.fg,this.bg=y.bg,this.combinedData=x,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(y){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let v=o.CharacterJoinerService=class A${constructor(y){this._bufferService=y,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(y){const x={id:this._nextCharacterJoinerId++,handler:y};return this._characterJoiners.push(x),x.id}deregister(y){for(let x=0;x1){const B=this._getJoinedRanges(N,z,A,x,j);for(let G=0;G1){const I=this._getJoinedRanges(N,z,A,x,j);for(let B=0;B{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=c(844),h=c(8460),f=c(3656);class p extends u.Disposable{constructor(k,v,b){super(),this._textarea=k,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((y=>this._screenDprMonitor.setWindow(y)))),this.register((0,h.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 h.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 h 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=h},8934:function(a,o,c){var u=this&&this.__decorate||function(w,k,v,b){var y,x=arguments.length,C=x<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(w,k,v,b);else for(var N=w.length-1;N>=0;N--)(y=w[N])&&(C=(x<3?y(C):x>3?y(k,v,C):y(k,v))||C);return x>3&&C&&Object.defineProperty(k,v,C),C},h=this&&this.__param||function(w,k){return function(v,b){k(v,b,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,b,y){return(0,p.getCoords)(window,w,k,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,y)}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([h(0,f.IRenderService),h(1,f.ICharSizeService)],m)},3230:function(a,o,c){var u=this&&this.__decorate||function(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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 b=o.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(y,x,C,N,j,A,z,M){super(),this._rowCount=y,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,I)=>this._renderRows(D,I)),z),this.register(this._renderDebouncer),this.register(z.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(j.onDecorationRegistered((()=>this._fullRefresh()))),this.register(j.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(z.window,x),this.register(z.onWindowChange((D=>this._registerIntersectionObserver(D,x))))}_registerIntersectionObserver(y,x){if("IntersectionObserver"in y){const C=new y.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(x),this._observerDisposable.value=(0,w.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(y){this._isPaused=y.isIntersecting===void 0?y.intersectionRatio===0:!y.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(y,x,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(y,x,this._rowCount))}_renderRows(y,x){this._renderer.value&&(y=Math.min(y,this._rowCount-1),x=Math.min(x,this._rowCount-1),this._renderer.value.renderRows(y,x),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:y,end:x}),this._onRender.fire({start:y,end:x}),this._isNextRenderRedrawOnly=!0)}resize(y,x){this._rowCount=x,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(y){this._renderer.value=y,this._renderer.value&&(this._renderer.value.onRequestRedraw((x=>this.refreshRows(x.start,x.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(y){return this._renderDebouncer.addRefreshCallback(y)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var y,x;this._renderer.value&&((x=(y=this._renderer.value).clearTextureAtlas)==null||x.call(y),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(y,x){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(y,x)})):this._renderer.value.handleResize(y,x),this._fullRefresh())}handleCharSizeChanged(){var y;(y=this._renderer.value)==null||y.handleCharSizeChanged()}handleBlur(){var y;(y=this._renderer.value)==null||y.handleBlur()}handleFocus(){var y;(y=this._renderer.value)==null||y.handleFocus()}handleSelectionChanged(y,x,C){var N;this._selectionState.start=y,this._selectionState.end=x,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(y,x,C)}handleCursorMove(){var y;(y=this._renderer.value)==null||y.handleCursorMove()}clear(){var y;(y=this._renderer.value)==null||y.clear()}};o.RenderService=b=u([h(2,v.IOptionsService),h(3,p.ICharSizeService),h(4,v.IDecorationService),h(5,v.IBufferService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],b)},9312:function(a,o,c){var u=this&&this.__decorate||function(z,M,D,I){var B,G=arguments.length,q=G<3?M:I===null?I=Object.getOwnPropertyDescriptor(M,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(z,M,D,I);else for(var Q=z.length-1;Q>=0;Q--)(B=z[Q])&&(q=(G<3?B(q):G>3?B(M,D,q):B(M,D))||q);return G>3&&q&&Object.defineProperty(M,D,q),q},h=this&&this.__param||function(z,M){return function(D,I){M(D,I,z)}};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),b=c(6114),y=c(4841),x=c(511),C=c(2585),N=" ",j=new RegExp(N,"g");let A=o.SelectionService=class extends v.Disposable{constructor(z,M,D,I,B,G,q,Q,K){super(),this._element=z,this._screenElement=M,this._linkifier=D,this._bufferService=I,this._coreService=B,this._mouseService=G,this._optionsService=q,this._renderService=Q,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new x.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 z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!z||!M||z[0]===M[0]&&z[1]===M[1])}get selectionText(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!z||!M)return"";const D=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(z[0]===M[0])return"";const B=z[0]B.replace(j," "))).join(b.isWindows?`\r +WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([h(0,p.IBufferService),h(1,p.IOptionsService),h(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,h){this._rowCount=h,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),h=c(3656),f=c(3551),p=c(9042),m=c(3730),w=c(1680),k=c(3107),v=c(5744),b=c(2950),y=c(1296),x=c(428),C=c(4269),N=c(5114),j=c(8934),A=c(3230),z=c(9312),M=c(4725),D=c(6731),I=c(8055),B=c(8969),G=c(8460),U=c(844),Q=c(6114),V=c(8437),Z=c(2584),J=c(7399),$=c(5941),L=c(9074),q=c(2585),P=c(5435),F=c(4567),re=c(779);class ie 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(se={}){super(se),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new U.MutableDisposable),this._onCursorMove=this.register(new G.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new G.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new G.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new G.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new G.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new G.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new G.EventEmitter),this._onBlur=this.register(new G.EventEmitter),this._onA11yCharEmitter=this.register(new G.EventEmitter),this._onA11yTabEmitter=this.register(new G.EventEmitter),this._onWillOpen=this.register(new G.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(q.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(re.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(((K,oe)=>this.refresh(K,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((K=>this._reportWindowsOptions(K)))),this.register(this._inputHandler.onColor((K=>this._handleColorEvent(K)))),this.register((0,G.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,G.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((K=>this._afterResize(K.cols,K.rows)))),this.register((0,U.toDisposable)((()=>{var K,oe;this._customKeyEventHandler=void 0,(oe=(K=this.element)==null?void 0:K.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(se){if(this._themeService)for(const K of se){let oe,ce="";switch(K.index){case 256:oe="foreground",ce="10";break;case 257:oe="background",ce="11";break;case 258:oe="cursor",ce="12";break;default:oe="ansi",ce="4;"+K.index}switch(K.type){case 0:const pe=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[K.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${ce};${(0,$.toRgbString)(pe)}${Z.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((ve=>ve.ansi[K.index]=I.channels.toColor(...K.color)));else{const ve=oe;this._themeService.modifyColors((Me=>Me[ve]=I.channels.toColor(...K.color)))}break;case 2:this._themeService.restoreColor(K.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(se){se?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(F.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var se;return(se=this.textarea)==null?void 0:se.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 se=this.buffer.ybase+this.buffer.y,K=this.buffer.lines.get(se);if(!K)return;const oe=Math.min(this.buffer.x,this.cols-1),ce=this._renderService.dimensions.css.cell.height,pe=K.getWidth(oe),ve=this._renderService.dimensions.css.cell.width*pe,Me=this.buffer.y*this._renderService.dimensions.css.cell.height,Fe=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Fe+"px",this.textarea.style.top=Me+"px",this.textarea.style.width=ve+"px",this.textarea.style.height=ce+"px",this.textarea.style.lineHeight=ce+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",(K=>{this.hasSelection()&&(0,u.copyHandler)(K,this._selectionService)})));const se=K=>(0,u.handlePasteEvent)(K,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",se)),this.register((0,h.addDisposableDomListener)(this.element,"paste",se)),Q.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(K=>{K.button===2&&(0,u.rightClickHandler)(K,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",(K=>{(0,u.rightClickHandler)(K,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",(K=>{K.button===1&&(0,u.moveTextAreaUnderMouseCursor)(K,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",(se=>this._keyUp(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",(se=>this._keyDown(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",(se=>this._keyPress(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",(se=>this._compositionHelper.compositionupdate(se)))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,h.addDisposableDomListener)(this.textarea,"input",(se=>this._inputEvent(se)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(se){var oe;if(!se)throw new Error("Terminal requires a parent element.");if(se.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((oe=this.element)==null?void 0:oe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=se.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"),se.appendChild(this.element);const K=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),K.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,h.addDisposableDomListener)(this.screenElement,"mousemove",(ce=>this.updateCursorStyle(ce)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),K.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,se.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",(ce=>this._handleTextAreaFocus(ce)))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(x.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((ce=>this._onRender.fire(ce)))),this.onResize((ce=>this._renderService.resize(ce.cols,ce.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(j.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(K);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((ce=>this.scrollLines(ce.amount,ce.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(z.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ce=>this.scrollLines(ce.amount,ce.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ce=>this._renderService.handleSelectionChanged(ce.start,ce.end,ce.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ce=>{this.textarea.value=ce,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ce=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(ce=>this._selectionService.handleMouseDown(ce)))),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(F.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ce=>this._handleScreenReaderModeOptionChange(ce)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ce=>{!this._overviewRulerRenderer&&ce&&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(y.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const se=this,K=this.element;function oe(ve){const Me=se._mouseService.getMouseReportCoords(ve,se.screenElement);if(!Me)return!1;let Fe,Ye;switch(ve.overrideType||ve.type){case"mousemove":Ye=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":Ye=0,Fe=ve.button<3?ve.button:3;break;case"mousedown":Ye=1,Fe=ve.button<3?ve.button:3;break;case"wheel":if(se._customWheelEventHandler&&se._customWheelEventHandler(ve)===!1||se.viewport.getLinesScrolled(ve)===0)return!1;Ye=ve.deltaY<0?0:1,Fe=4;break;default:return!1}return!(Ye===void 0||Fe===void 0||Fe>4)&&se.coreMouseService.triggerMouseEvent({col:Me.col,row:Me.row,x:Me.x,y:Me.y,button:Fe,action:Ye,ctrl:ve.ctrlKey,alt:ve.altKey,shift:ve.shiftKey})}const ce={mouseup:null,wheel:null,mousedrag:null,mousemove:null},pe={mouseup:ve=>(oe(ve),ve.buttons||(this._document.removeEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.removeEventListener("mousemove",ce.mousedrag)),this.cancel(ve)),wheel:ve=>(oe(ve),this.cancel(ve,!0)),mousedrag:ve=>{ve.buttons&&oe(ve)},mousemove:ve=>{ve.buttons||oe(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?ce.mousemove||(K.addEventListener("mousemove",pe.mousemove),ce.mousemove=pe.mousemove):(K.removeEventListener("mousemove",ce.mousemove),ce.mousemove=null),16&ve?ce.wheel||(K.addEventListener("wheel",pe.wheel,{passive:!1}),ce.wheel=pe.wheel):(K.removeEventListener("wheel",ce.wheel),ce.wheel=null),2&ve?ce.mouseup||(ce.mouseup=pe.mouseup):(this._document.removeEventListener("mouseup",ce.mouseup),ce.mouseup=null),4&ve?ce.mousedrag||(ce.mousedrag=pe.mousedrag):(this._document.removeEventListener("mousemove",ce.mousedrag),ce.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(K,"mousedown",(ve=>{if(ve.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ve))return oe(ve),ce.mouseup&&this._document.addEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.addEventListener("mousemove",ce.mousedrag),this.cancel(ve)}))),this.register((0,h.addDisposableDomListener)(K,"wheel",(ve=>{if(!ce.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ve)===!1)return!1;if(!this.buffer.hasScrollback){const Me=this.viewport.getLinesScrolled(ve);if(Me===0)return;const Fe=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ve.deltaY<0?"A":"B");let Ye="";for(let Te=0;Te{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ve),this.cancel(ve)}),{passive:!0})),this.register((0,h.addDisposableDomListener)(K,"touchmove",(ve=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ve)?void 0:this.cancel(ve)}),{passive:!1}))}refresh(se,K){var oe;(oe=this._renderService)==null||oe.refreshRows(se,K)}updateCursorStyle(se){var K;(K=this._selectionService)!=null&&K.shouldColumnSelect(se)?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(se,K,oe=0){var ce;oe===1?(super.scrollLines(se,K,oe),this.refresh(0,this.rows-1)):(ce=this.viewport)==null||ce.scrollLines(se)}paste(se){(0,u.paste)(se,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(se){this._customKeyEventHandler=se}attachCustomWheelEventHandler(se){this._customWheelEventHandler=se}registerLinkProvider(se){return this._linkProviderService.registerLinkProvider(se)}registerCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const K=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),K}deregisterCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(se)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(se){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+se)}registerDecoration(se){return this._decorationService.registerDecoration(se)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(se,K,oe){this._selectionService.setSelection(se,K,oe)}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 se;(se=this._selectionService)==null||se.clearSelection()}selectAll(){var se;(se=this._selectionService)==null||se.selectAll()}selectLines(se,K){var oe;(oe=this._selectionService)==null||oe.selectLines(se,K)}_keyDown(se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;const K=this.browser.isMac&&this.options.macOptionIsMeta&&se.altKey;if(!K&&!this._compositionHelper.keydown(se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;K||se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,J.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),oe.type===3||oe.type===2){const ce=this.rows-1;return this.scrollLines(oe.type===2?-ce:ce),this.cancel(se,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(oe.cancel&&this.cancel(se,!0),!oe.key||!!(se.key&&!se.ctrlKey&&!se.altKey&&!se.metaKey&&se.key.length===1&&se.key.charCodeAt(0)>=65&&se.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==Z.C0.ETX&&oe.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||se.altKey||se.ctrlKey?this.cancel(se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(se,K){const oe=se.isMac&&!this.options.macOptionIsMeta&&K.altKey&&!K.ctrlKey&&!K.metaKey||se.isWindows&&K.altKey&&K.ctrlKey&&!K.metaKey||se.isWindows&&K.getModifierState("AltGraph");return K.type==="keypress"?oe:oe&&(!K.keyCode||K.keyCode>47)}_keyUp(se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||((function(K){return K.keyCode===16||K.keyCode===17||K.keyCode===18})(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)}_keyPress(se){let K;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)K=se.charCode;else if(se.which===null||se.which===void 0)K=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;K=se.which}return!(!K||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(K=String.fromCharCode(K),this._onKey.fire({key:K,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(K,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(se){if(se.data&&se.inputType==="insertText"&&(!se.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const K=se.data;return this.coreService.triggerDataEvent(K,!0),this.cancel(se),!0}return!1}resize(se,K){se!==this.cols||K!==this.rows?super.resize(se,K):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(se,K){var oe,ce;(oe=this._charSizeService)==null||oe.measure(),(ce=this.viewport)==null||ce.syncScrollArea(!0)}clear(){var se;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 K=1;K{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,h){this._rowCount=h,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(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(b,y,x,C,N,j,A,z){super(),this._viewportElement=b,this._scrollArea=y,this._bufferService=x,this._optionsService=C,this._charSizeService=N,this._renderService=j,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(z.colors),this.register(z.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.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(b){if(b)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 y=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==y&&(this._lastRecordedBufferHeight=y,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){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 y=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:y,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<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(b,y){const x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(y<0&&this._viewportElement.scrollTop!==0||y>0&&x0&&(x=B),C=""}}return{bufferElements:N,cursorElement:x}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let y=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(y/=this._currentRowHeight+0,this._wheelPartialScroll+=y,y=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(y*=this._bufferService.rows),y}_applyScrollModifier(b,y){const x=this._optionsService.rawOptions.fastScrollModifier;return x==="alt"&&y.altKey||x==="ctrl"&&y.ctrlKey||x==="shift"&&y.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const y=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,y!==0&&(this._viewportElement.scrollTop+=y,this._bubbleScroll(b,y))}};o.Viewport=v=u([h(2,k.IBufferService),h(3,k.IOptionsService),h(4,p.ICharSizeService),h(5,p.IRenderService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],v)},3107:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b,y,x){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=b,this._decorationService=y,this._renderService=x,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 y;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((y=k==null?void 0:k.options)==null?void 0:y.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 b=k.options.x??0;return b&&b>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 b=this._decorationElements.get(k);b||(b=this._createElement(k),k.element=b,this._decorationElements.set(k,b),this._container.appendChild(b),k.onDispose((()=>{this._decorationElements.delete(k),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(b)}}_refreshXPosition(k,v=k.element){if(!v)return;const b=k.options.x??0;(k.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*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([h(1,m.IBufferService),h(2,f.ICoreBrowserService),h(3,m.IDecorationService),h(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,h){return u>=c.startBufferLine-this._linePadding[h||"full"]&&u<=c.endBufferLine+this._linePadding[h||"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(x,C,N,j){var A,z=arguments.length,M=z<3?C:j===null?j=Object.getOwnPropertyDescriptor(C,N):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,C,N,j);else for(var D=x.length-1;D>=0;D--)(A=x[D])&&(M=(z<3?A(M):z>3?A(C,N,M):A(C,N))||M);return z>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(x,C){return function(N,j){C(N,j,x)}};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},b={full:0,left:0,center:0,right:0};let y=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(x,C,N,j,A,z,M){var I;super(),this._viewportElement=x,this._screenElement=C,this._bufferService=N,this._decorationService=j,this._renderService=A,this._optionsService=z,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(),(I=this._viewportElement.parentElement)==null||I.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 x=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=x,v.center=C,v.right=x,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const x=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(x,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 x=this._colorZoneStore.zones;for(const C of x)C.position!=="full"&&this._renderColorZone(C);for(const C of x)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(x){this._ctx.fillStyle=x.color,this._ctx.fillRect(b[x.position||"full"],Math.round((this._canvas.height-1)*(x.startBufferLine/this._bufferService.buffers.active.lines.length)-k[x.position||"full"]/2),v[x.position||"full"],Math.round((this._canvas.height-1)*((x.endBufferLine-x.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[x.position||"full"]))}_queueRefresh(x,C){this._shouldUpdateDimensions=x||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=y=u([h(2,w.IBufferService),h(3,w.IDecorationService),h(4,p.IRenderService),h(5,w.IOptionsService),h(6,p.ICoreBrowserService)],y)},2950:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b,y,x,C){this._textarea=k,this._compositionView=v,this._bufferService=b,this._optionsService=y,this._coreService=x,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 b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!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,b=v.replace(k,"");this._dataAlreadySent=b,v.length>k.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=w=u([h(2,p.IBufferService),h(3,p.IOptionsService),h(4,p.ICoreService),h(5,f.IRenderService)],w)},9806:(a,o)=>{function c(u,h,f){const p=f.getBoundingClientRect(),m=u.getComputedStyle(f),w=parseInt(m.getPropertyValue("padding-left")),k=parseInt(m.getPropertyValue("padding-top"));return[h.clientX-p.left-w,h.clientY-p.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(u,h,f,p,m,w,k,v,b){if(!w)return;const y=c(u,h,f);return y?(y[0]=Math.ceil((y[0]+(b?k/2:0))/k),y[1]=Math.ceil(y[1]/v),y[0]=Math.min(Math.max(y[0],1),p+(b?1:0)),y[1]=Math.min(Math.max(y[1],1),m),y):void 0}},9504:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=c(2584);function h(v,b,y,x){const C=v-f(v,y),N=b-f(b,y),j=Math.abs(C-N)-(function(A,z,M){let D=0;const I=A-f(A,M),B=z-f(z,M);for(let G=0;G=0&&vb?"A":"B"}function m(v,b,y,x,C,N){let j=v,A=b,z="";for(;j!==y||A!==x;)j+=C?1:-1,C&&j>N.cols-1?(z+=N.buffer.translateBufferLineToString(A,!1,v,j),j=0,v=0,A++):!C&&j<0&&(z+=N.buffer.translateBufferLineToString(A,!1,0,v+1),j=N.cols-1,v=j,A--);return z+N.buffer.translateBufferLineToString(A,!1,v,j)}function w(v,b){const y=b?"O":"[";return u.C0.ESC+y+v}function k(v,b){v=Math.floor(v);let y="";for(let x=0;x0?I-f(I,B):M;const Q=I,V=(function(Z,J,$,L,q,P){let F;return F=h($,L,q,P).length>0?L-f(L,q):J,Z<$&&F<=L||Z>=$&&Fv?"D":"C",k(Math.abs(C-v),w(j,x));j=N>b?"D":"C";const A=Math.abs(N-b);return k((function(z,M){return M.cols-z})(N>b?v:C,y)+(A-1)*y.cols+1+((N>b?C:v)-1),w(j,x))}},1296:function(a,o,c){var u=this&&this.__decorate||function(G,U,Q,V){var Z,J=arguments.length,$=J<3?U:V===null?V=Object.getOwnPropertyDescriptor(U,Q):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(G,U,Q,V);else for(var L=G.length-1;L>=0;L--)(Z=G[L])&&($=(J<3?Z($):J>3?Z(U,Q,$):Z(U,Q))||$);return J>3&&$&&Object.defineProperty(U,Q,$),$},h=this&&this.__param||function(G,U){return function(Q,V){U(Q,V,G)}};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),b=c(8055),y=c(8460),x=c(844),C=c(2585),N="xterm-dom-renderer-owner-",j="xterm-rows",A="xterm-fg-",z="xterm-bg-",M="xterm-focus",D="xterm-selection";let I=1,B=o.DomRenderer=class extends x.Disposable{constructor(G,U,Q,V,Z,J,$,L,q,P,F,re,ie){super(),this._terminal=G,this._document=U,this._element=Q,this._screenElement=V,this._viewportElement=Z,this._helperContainer=J,this._linkifier2=$,this._charSizeService=q,this._optionsService=P,this._bufferService=F,this._coreBrowserService=re,this._themeService=ie,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new y.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(j),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((ue=>this._injectCss(ue)))),this._injectCss(this._themeService.colors),this._rowFactory=L.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((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),this.register((0,x.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 G=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*G,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*G),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/G),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/G),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 U=`${this._terminalSelector} .${j} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=U,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(G){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let U=`${this._terminalSelector} .${j} { color: ${G.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;U+=`${this._terminalSelector} .${j} .xterm-dim { color: ${b.color.multiplyOpacity(G.foreground,.5).css};}`,U+=`${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}`,V=`blink_bar_${this._terminalClass}`,Z=`blink_block_${this._terminalClass}`;U+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,U+=`@keyframes ${V} { 50% { box-shadow: none; }}`,U+=`@keyframes ${Z} { 0% { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css}; } 50% { background-color: inherit; color: ${G.cursor.css}; }}`,U+=`${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css};}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${G.cursor.css} !important; color: ${G.cursorAccent.css} !important;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${G.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${G.cursor.css} inset;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${G.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,U+=`${this._terminalSelector} .${D} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${D} div { position: absolute; background-color: ${G.selectionBackgroundOpaque.css};}${this._terminalSelector} .${D} div { position: absolute; background-color: ${G.selectionInactiveBackgroundOpaque.css};}`;for(const[J,$]of G.ansi.entries())U+=`${this._terminalSelector} .${A}${J} { color: ${$.css}; }${this._terminalSelector} .${A}${J}.xterm-dim { color: ${b.color.multiplyOpacity($,.5).css}; }${this._terminalSelector} .${z}${J} { background-color: ${$.css}; }`;U+=`${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(G.background).css}; }${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(G.background),.5).css}; }${this._terminalSelector} .${z}${m.INVERTED_DEFAULT_COLOR} { background-color: ${G.foreground.css}; }`,this._themeStyleElement.textContent=U}_setDefaultSpacing(){const G=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${G}px`,this._rowFactory.defaultSpacing=G}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(G,U){for(let Q=this._rowElements.length;Q<=U;Q++){const V=this._document.createElement("div");this._rowContainer.appendChild(V),this._rowElements.push(V)}for(;this._rowElements.length>U;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(G,U){this._refreshRowElements(G,U),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(G,U,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(G,U,Q),this.renderRows(0,this._bufferService.rows-1),!G||!U)return;this._selectionRenderModel.update(this._terminal,G,U,Q);const V=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,$=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||$<0)return;const L=this._document.createDocumentFragment();if(Q){const q=G[0]>U[0];L.appendChild(this._createSelectionElement(J,q?U[0]:G[0],q?G[0]:U[0],$-J+1))}else{const q=V===J?G[0]:0,P=J===Z?U[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(J,q,P));const F=$-J-1;if(L.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,F)),J!==$){const re=Z===$?U[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement($,0,re))}}this._selectionContainer.appendChild(L)}_createSelectionElement(G,U,Q,V=1){const Z=this._document.createElement("div"),J=U*this.dimensions.css.cell.width;let $=this.dimensions.css.cell.width*(Q-U);return J+$>this.dimensions.css.canvas.width&&($=this.dimensions.css.canvas.width-J),Z.style.height=V*this.dimensions.css.cell.height+"px",Z.style.top=G*this.dimensions.css.cell.height+"px",Z.style.left=`${J}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 G of this._rowElements)G.replaceChildren()}renderRows(G,U){const Q=this._bufferService.buffer,V=Q.ybase+Q.y,Z=Math.min(Q.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let q=G;q<=U;q++){const P=q+Q.ydisp,F=this._rowElements[q],re=Q.lines.get(P);if(!F||!re)break;F.replaceChildren(...this._rowFactory.createRow(re,P,P===V,$,L,Z,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!0)}_handleLinkLeave(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!1)}_setCellUnderline(G,U,Q,V,Z,J){Q<0&&(G=0),V<0&&(U=0);const $=this._bufferService.rows-1;Q=Math.max(Math.min(Q,$),0),V=Math.max(Math.min(V,$),0),Z=Math.min(Z,this._bufferService.cols);const L=this._bufferService.buffer,q=L.ybase+L.y,P=Math.min(L.x,Z-1),F=this._optionsService.rawOptions.cursorBlink,re=this._optionsService.rawOptions.cursorStyle,ie=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=Q;ue<=V;++ue){const se=ue+L.ydisp,K=this._rowElements[ue],oe=L.lines.get(se);if(!K||!oe)break;K.replaceChildren(...this._rowFactory.createRow(oe,se,se===q,re,ie,P,F,this.dimensions.css.cell.width,this._widthCache,J?ue===Q?G:0:-1,J?(ue===V?U:Z)-1:-1))}}};o.DomRenderer=B=u([h(7,C.IInstantiationService),h(8,v.ICharSizeService),h(9,C.IOptionsService),h(10,C.IBufferService),h(11,v.ICoreBrowserService),h(12,v.IThemeService)],B)},3787:function(a,o,c){var u=this&&this.__decorate||function(j,A,z,M){var D,I=arguments.length,B=I<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,z):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(j,A,z,M);else for(var G=j.length-1;G>=0;G--)(D=j[G])&&(B=(I<3?D(B):I>3?D(A,z,B):D(A,z))||B);return I>3&&B&&Object.defineProperty(A,z,B),B},h=this&&this.__param||function(j,A){return function(z,M){A(z,M,j)}};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),b=c(4269),y=c(6171),x=c(3734);let C=o.DomRendererRowFactory=class{constructor(j,A,z,M,D,I,B){this._document=j,this._characterJoinerService=A,this._optionsService=z,this._coreBrowserService=M,this._coreService=D,this._decorationService=I,this._themeService=B,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(j,A,z){this._selectionStart=j,this._selectionEnd=A,this._columnSelectMode=z}createRow(j,A,z,M,D,I,B,G,U,Q,V){const Z=[],J=this._characterJoinerService.getJoinedCharacters(A),$=this._themeService.colors;let L,q=j.getNoBgTrimmedLength();z&&q0&&Me===J[0][0]){Ye=!0;const Ut=J.shift();$e=new b.JoinedCellData(this._workCell,j.translateToString(!0,Ut[0],Ut[1]),Ut[1]-Ut[0]),Te=Ut[1]-1,Fe=$e.getWidth()}const yt=this._isCellInSelection(Me,A),ot=z&&Me===I,Mt=ve&&Me>=Q&&Me<=V;let jt=!1;this._decorationService.forEachDecorationAtCell(Me,A,void 0,(Ut=>{jt=!0}));let Pt=$e.getChars()||p.WHITESPACE_CELL_CHAR;if(Pt===" "&&($e.isUnderline()||$e.isOverline())&&(Pt=" "),ce=Fe*G-U.get(Pt,$e.isBold(),$e.isItalic()),L){if(P&&(yt&&oe||!yt&&!oe&&$e.bg===re)&&(yt&&oe&&$.selectionForeground||$e.fg===ie)&&$e.extended.ext===ue&&Mt===se&&ce===K&&!ot&&!Ye&&!jt){$e.isInvisible()?F+=p.WHITESPACE_CELL_CHAR:F+=Pt,P++;continue}P&&(L.textContent=F),L=this._document.createElement("span"),P=0,F=""}else L=this._document.createElement("span");if(re=$e.bg,ie=$e.fg,ue=$e.extended.ext,se=Mt,K=ce,oe=yt,Ye&&I>=Me&&I<=Te&&(I=Me),!this._coreService.isCursorHidden&&ot&&this._coreService.isCursorInitialized){if(pe.push("xterm-cursor"),this._coreBrowserService.isFocused)B&&pe.push("xterm-cursor-blink"),pe.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(D)switch(D){case"outline":pe.push("xterm-cursor-outline");break;case"block":pe.push("xterm-cursor-block");break;case"bar":pe.push("xterm-cursor-bar");break;case"underline":pe.push("xterm-cursor-underline")}}if($e.isBold()&&pe.push("xterm-bold"),$e.isItalic()&&pe.push("xterm-italic"),$e.isDim()&&pe.push("xterm-dim"),F=$e.isInvisible()?p.WHITESPACE_CELL_CHAR:$e.getChars()||p.WHITESPACE_CELL_CHAR,$e.isUnderline()&&(pe.push(`xterm-underline-${$e.extended.underlineStyle}`),F===" "&&(F=" "),!$e.isUnderlineColorDefault()))if($e.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${x.AttributeData.toColorRGB($e.getUnderlineColor()).join(",")})`;else{let Ut=$e.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&$e.isBold()&&Ut<8&&(Ut+=8),L.style.textDecorationColor=$.ansi[Ut].css}$e.isOverline()&&(pe.push("xterm-overline"),F===" "&&(F=" ")),$e.isStrikethrough()&&pe.push("xterm-strikethrough"),Mt&&(L.style.textDecoration="underline");let Le=$e.getFgColor(),nt=$e.getFgColorMode(),ke=$e.getBgColor(),me=$e.getBgColorMode();const je=!!$e.isInverse();if(je){const Ut=Le;Le=ke,ke=Ut;const Xt=nt;nt=me,me=Xt}let qe,rt,dt,st=!1;switch(this._decorationService.forEachDecorationAtCell(Me,A,void 0,(Ut=>{Ut.options.layer!=="top"&&st||(Ut.backgroundColorRGB&&(me=50331648,ke=Ut.backgroundColorRGB.rgba>>8&16777215,qe=Ut.backgroundColorRGB),Ut.foregroundColorRGB&&(nt=50331648,Le=Ut.foregroundColorRGB.rgba>>8&16777215,rt=Ut.foregroundColorRGB),st=Ut.options.layer==="top")})),!st&&yt&&(qe=this._coreBrowserService.isFocused?$.selectionBackgroundOpaque:$.selectionInactiveBackgroundOpaque,ke=qe.rgba>>8&16777215,me=50331648,st=!0,$.selectionForeground&&(nt=50331648,Le=$.selectionForeground.rgba>>8&16777215,rt=$.selectionForeground)),st&&pe.push("xterm-decoration-top"),me){case 16777216:case 33554432:dt=$.ansi[ke],pe.push(`xterm-bg-${ke}`);break;case 50331648:dt=k.channels.toColor(ke>>16,ke>>8&255,255&ke),this._addStyle(L,`background-color:#${N((ke>>>0).toString(16),"0",6)}`);break;default:je?(dt=$.foreground,pe.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):dt=$.background}switch(qe||$e.isDim()&&(qe=k.color.multiplyOpacity(dt,.5)),nt){case 16777216:case 33554432:$e.isBold()&&Le<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Le+=8),this._applyMinimumContrast(L,dt,$.ansi[Le],$e,qe,void 0)||pe.push(`xterm-fg-${Le}`);break;case 50331648:const Ut=k.channels.toColor(Le>>16&255,Le>>8&255,255&Le);this._applyMinimumContrast(L,dt,Ut,$e,qe,rt)||this._addStyle(L,`color:#${N(Le.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,dt,$.foreground,$e,qe,rt)||je&&pe.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}pe.length&&(L.className=pe.join(" "),pe.length=0),ot||Ye||jt?L.textContent=F:P++,ce!==this.defaultSpacing&&(L.style.letterSpacing=`${ce}px`),Z.push(L),Me=Te}return L&&P&&(L.textContent=F),Z}_applyMinimumContrast(j,A,z,M,D,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,y.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const B=this._getContrastCache(M);let G;if(D||I||(G=B.getColor(A.rgba,z.rgba)),G===void 0){const U=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);G=k.color.ensureContrastRatio(D||A,I||z,U),B.setColor((D||A).rgba,(I||z).rgba,G??null)}return!!G&&(this._addStyle(j,`color:${G.css}`),!0)}_getContrastCache(j){return j.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(j,A){j.setAttribute("style",`${j.getAttribute("style")||""}${A};`)}_isCellInSelection(j,A){const z=this._selectionStart,M=this._selectionEnd;return!(!z||!M)&&(this._columnSelectMode?z[0]<=M[0]?j>=z[0]&&A>=z[1]&&j=z[1]&&j>=M[0]&&A<=M[1]:A>z[1]&&A=z[0]&&j=z[0])}};function N(j,A,z){for(;j.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 h=c.createElement("span");h.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=[h,f,p,m],this._container.appendChild(h),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,h,f){c===this._font&&u===this._fontSize&&h===this._weight&&f===this._weightBold||(this._font=c,this._fontSize=u,this._weight=h,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(c,u,h){let f=0;if(!u&&!h&&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"),h&&(p+="I");let m=this._holey.get(p);if(m===void 0){let w=0;u&&(w|=1),h&&(w|=2),m=this._measure(c,w),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const h=this._measureElements[u];return h.textContent=c.repeat(32),h.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(h){return 57508<=h&&h<=57558}function u(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=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(h){if(!h)throw new Error("value must not be falsy");return h},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},o.isEmoji=u,o.allowRescaling=function(h,f,p,m){return f===1&&p>Math.ceil(1.5*m)&&h!==void 0&&h>255&&!u(h)&&!c(h)&&!(function(w){return 57344<=w&&w<=63743})(h)},o.treatGlyphAsBackgroundColor=function(h){return c(h)||(function(f){return 9472<=f&&f<=9631})(h)},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(h,f,p=0){return(h-(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(h,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=h.buffers.active.ydisp,k=f[1]-w,v=p[1]-w,b=Math.max(k,0),y=Math.min(v,h.rows-1);b>=h.rows||y<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=y,this.startCol=f[0],this.endCol=p[0])}isCellSelected(h,f,p){return!!this.hasSelection&&(p-=h.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(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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(y,x,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 b(this._optionsService))}catch{this._measureStrategy=this.register(new v(y,x,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const y=this._measureStrategy.measure();y.width===this.width&&y.height===this.height||(this.width=y.width,this.height=y.height,this._onCharSizeChange.fire())}};o.CharSizeService=w=u([h(2,f.IOptionsService)],w);class k extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(x,C){x!==void 0&&x>0&&C!==void 0&&C>0&&(this._result.width=x,this._result.height=C)}}class v extends k{constructor(x,C,N){super(),this._document=x,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 b extends k{constructor(x){super(),this._optionsService=x,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 x=this._ctx.measureText("W");return this._validateAndSet(x.width,x.fontBoundingBoxAscent+x.fontBoundingBoxDescent),this._result}}},4269:function(a,o,c){var u=this&&this.__decorate||function(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(y,x,C){super(),this.content=0,this.combinedData="",this.fg=y.fg,this.bg=y.bg,this.combinedData=x,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(y){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let v=o.CharacterJoinerService=class G${constructor(y){this._bufferService=y,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(y){const x={id:this._nextCharacterJoinerId++,handler:y};return this._characterJoiners.push(x),x.id}deregister(y){for(let x=0;x1){const B=this._getJoinedRanges(N,z,A,x,j);for(let G=0;G1){const I=this._getJoinedRanges(N,z,A,x,j);for(let B=0;B{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=c(844),h=c(8460),f=c(3656);class p extends u.Disposable{constructor(k,v,b){super(),this._textarea=k,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((y=>this._screenDprMonitor.setWindow(y)))),this.register((0,h.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 h.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 h 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=h},8934:function(a,o,c){var u=this&&this.__decorate||function(w,k,v,b){var y,x=arguments.length,C=x<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(w,k,v,b);else for(var N=w.length-1;N>=0;N--)(y=w[N])&&(C=(x<3?y(C):x>3?y(k,v,C):y(k,v))||C);return x>3&&C&&Object.defineProperty(k,v,C),C},h=this&&this.__param||function(w,k){return function(v,b){k(v,b,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,b,y){return(0,p.getCoords)(window,w,k,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,y)}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([h(0,f.IRenderService),h(1,f.ICharSizeService)],m)},3230:function(a,o,c){var u=this&&this.__decorate||function(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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 b=o.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(y,x,C,N,j,A,z,M){super(),this._rowCount=y,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,I)=>this._renderRows(D,I)),z),this.register(this._renderDebouncer),this.register(z.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(j.onDecorationRegistered((()=>this._fullRefresh()))),this.register(j.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(z.window,x),this.register(z.onWindowChange((D=>this._registerIntersectionObserver(D,x))))}_registerIntersectionObserver(y,x){if("IntersectionObserver"in y){const C=new y.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(x),this._observerDisposable.value=(0,w.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(y){this._isPaused=y.isIntersecting===void 0?y.intersectionRatio===0:!y.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(y,x,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(y,x,this._rowCount))}_renderRows(y,x){this._renderer.value&&(y=Math.min(y,this._rowCount-1),x=Math.min(x,this._rowCount-1),this._renderer.value.renderRows(y,x),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:y,end:x}),this._onRender.fire({start:y,end:x}),this._isNextRenderRedrawOnly=!0)}resize(y,x){this._rowCount=x,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(y){this._renderer.value=y,this._renderer.value&&(this._renderer.value.onRequestRedraw((x=>this.refreshRows(x.start,x.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(y){return this._renderDebouncer.addRefreshCallback(y)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var y,x;this._renderer.value&&((x=(y=this._renderer.value).clearTextureAtlas)==null||x.call(y),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(y,x){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(y,x)})):this._renderer.value.handleResize(y,x),this._fullRefresh())}handleCharSizeChanged(){var y;(y=this._renderer.value)==null||y.handleCharSizeChanged()}handleBlur(){var y;(y=this._renderer.value)==null||y.handleBlur()}handleFocus(){var y;(y=this._renderer.value)==null||y.handleFocus()}handleSelectionChanged(y,x,C){var N;this._selectionState.start=y,this._selectionState.end=x,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(y,x,C)}handleCursorMove(){var y;(y=this._renderer.value)==null||y.handleCursorMove()}clear(){var y;(y=this._renderer.value)==null||y.clear()}};o.RenderService=b=u([h(2,v.IOptionsService),h(3,p.ICharSizeService),h(4,v.IDecorationService),h(5,v.IBufferService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],b)},9312:function(a,o,c){var u=this&&this.__decorate||function(z,M,D,I){var B,G=arguments.length,U=G<3?M:I===null?I=Object.getOwnPropertyDescriptor(M,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(z,M,D,I);else for(var Q=z.length-1;Q>=0;Q--)(B=z[Q])&&(U=(G<3?B(U):G>3?B(M,D,U):B(M,D))||U);return G>3&&U&&Object.defineProperty(M,D,U),U},h=this&&this.__param||function(z,M){return function(D,I){M(D,I,z)}};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),b=c(6114),y=c(4841),x=c(511),C=c(2585),N=" ",j=new RegExp(N,"g");let A=o.SelectionService=class extends v.Disposable{constructor(z,M,D,I,B,G,U,Q,V){super(),this._element=z,this._screenElement=M,this._linkifier=D,this._bufferService=I,this._coreService=B,this._mouseService=G,this._optionsService=U,this._renderService=Q,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new x.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 z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!z||!M||z[0]===M[0]&&z[1]===M[1])}get selectionText(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!z||!M)return"";const D=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(z[0]===M[0])return"";const B=z[0]B.replace(j," "))).join(b.isWindows?`\r `:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(z){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&z&&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(z){const M=this._getMouseBufferCoords(z),D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(D&&I&&M)&&this._areCoordsInSelection(M,D,I)}isCellInSelection(z,M){const D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!D||!I)&&this._areCoordsInSelection([z,M],D,I)}_areCoordsInSelection(z,M,D){return z[1]>M[1]&&z[1]=M[0]&&z[0]=M[0]}_selectWordAtCursor(z,M){var B,G;const D=(G=(B=this._linkifier.currentLink)==null?void 0:B.link)==null?void 0:G.range;if(D)return this._model.selectionStart=[D.start.x-1,D.start.y-1],this._model.selectionStartLength=(0,y.getRangeLength)(D,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(z);return!!I&&(this._selectWordAt(I,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(z,M){this._model.clearSelection(),z=Math.max(z,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,z],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(z){this._model.handleTrim(z)&&this.refresh()}_getMouseBufferCoords(z){const M=this._mouseService.getCoords(z,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(z){let M=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,z,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(z){return b.isMac?z.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:z.shiftKey}handleMouseDown(z){if(this._mouseDownTimeStamp=z.timeStamp,(z.button!==2||!this.hasSelection)&&z.button===0){if(!this._enabled){if(!this.shouldForceSelection(z))return;z.stopPropagation()}z.preventDefault(),this._dragScrollAmount=0,this._enabled&&z.shiftKey?this._handleIncrementalClick(z):z.detail===1?this._handleSingleClick(z):z.detail===2?this._handleDoubleClick(z):z.detail===3&&this._handleTripleClick(z),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(z){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(z))}_handleSingleClick(z){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(z)?3:0,this._model.selectionStart=this._getMouseBufferCoords(z),!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(z){this._selectWordAtCursor(z,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(z){const M=this._getMouseBufferCoords(z);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(z){return z.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(z){if(z.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(z),!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(z.ydisp+this._bufferService.rows,z.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=z.ydisp),this.refresh()}}_handleMouseUp(z){const M=z.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&z.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const D=this._mouseService.getCoords(z,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){const I=(0,p.moveToCellSequence)(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,D=!(!z||!M||z[0]===M[0]&&z[1]===M[1]);D?z&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&z[0]===this._oldSelectionStart[0]&&z[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(z,M,D)):this._oldHasSelection&&this._fireOnSelectionChange(z,M,D)}_fireOnSelectionChange(z,M,D){this._oldSelectionStart=z,this._oldSelectionEnd=M,this._oldHasSelection=D,this._onSelectionChange.fire()}_handleBufferActivate(z){this.clearSelection(),this._trimListener.dispose(),this._trimListener=z.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(z,M){let D=M;for(let I=0;M>=I;I++){const B=z.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:B>1&&M!==I&&(D+=B-1)}return D}setSelection(z,M,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[z,M],this._model.selectionStartLength=D,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(z){this._isClickInSelection(z)||(this._selectWordAtCursor(z,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(z,M,D=!0,I=!0){if(z[0]>=this._bufferService.cols)return;const B=this._bufferService.buffer,G=B.lines.get(z[1]);if(!G)return;const q=B.translateBufferLineToString(z[1],!1);let Q=this._convertViewportColToCharacterIndex(G,z[0]),K=Q;const Z=z[0]-Q;let J=0,$=0,L=0,F=0;if(q.charAt(Q)===" "){for(;Q>0&&q.charAt(Q-1)===" ";)Q--;for(;K1&&(F+=ue-1,K+=ue-1);ae>0&&Q>0&&!this._isCharWordSeparator(G.loadCell(ae-1,this._workCell));){G.loadCell(ae-1,this._workCell);const re=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,ae--):re>1&&(L+=re-1,Q-=re-1),Q--,ae--}for(;ie1&&(F+=re-1,K+=re-1),K++,ie++}}K++;let U=Q+Z-J+L,H=Math.min(this._bufferService.cols,K-Q+J+$-L-F);if(M||q.slice(Q,K).trim()!==""){if(D&&U===0&&G.getCodePoint(0)!==32){const ae=B.lines.get(z[1]-1);if(ae&&G.isWrapped&&ae.getCodePoint(this._bufferService.cols-1)!==32){const ie=this._getWordAt([this._bufferService.cols-1,z[1]-1],!1,!0,!1);if(ie){const ue=this._bufferService.cols-ie.start;U-=ue,H+=ue}}}if(I&&U+H===this._bufferService.cols&&G.getCodePoint(this._bufferService.cols-1)!==32){const ae=B.lines.get(z[1]+1);if(ae!=null&&ae.isWrapped&&ae.getCodePoint(0)!==32){const ie=this._getWordAt([0,z[1]+1],!1,!1,!0);ie&&(H+=ie.length)}}return{start:U,length:H}}}_selectWordAt(z,M){const D=this._getWordAt(z,M);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,z[1]--;this._model.selectionStart=[D.start,z[1]],this._model.selectionStartLength=D.length}}_selectToWordAt(z){const M=this._getWordAt(z,!0);if(M){let D=z[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(z){return z.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(z.getChars())>=0}_selectLineAt(z){const M=this._bufferService.buffer.getWrappedRangeForLine(z),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,y.getRangeLength)(D,this._bufferService.cols)}};o.SelectionService=A=u([h(3,C.IBufferService),h(4,C.ICoreService),h(5,w.IMouseService),h(6,C.IOptionsService),h(7,w.IRenderService),h(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,z,M,D){var I,B=arguments.length,G=B<3?z:D===null?D=Object.getOwnPropertyDescriptor(z,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(A,z,M,D);else for(var q=A.length-1;q>=0;q--)(I=A[q])&&(G=(B<3?I(G):B>3?I(z,M,G):I(z,M))||G);return B>3&&G&&Object.defineProperty(z,M,G),G},h=this&&this.__param||function(A,z){return function(M,D){z(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"),b=p.css.toColor("#000000"),y=p.css.toColor("#ffffff"),x=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")],z=[0,95,135,175,215,255];for(let M=0;M<216;M++){const D=z[M/36%6|0],I=z[M/6%6|0],B=z[M%6];A.push({css:p.channels.toCss(D,I,B),rgba:p.channels.toRgba(D,I,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:b,cursor:y,cursorAccent:x,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(b,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(b,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 z=this._colors;if(z.foreground=j(A.foreground,v),z.background=j(A.background,b),z.cursor=j(A.cursor,y),z.cursorAccent=j(A.cursorAccent,x),z.selectionBackgroundTransparent=j(A.selectionBackground,C),z.selectionBackgroundOpaque=p.color.blend(z.background,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundTransparent=j(A.selectionInactiveBackground,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundOpaque=p.color.blend(z.background,z.selectionInactiveBackgroundTransparent),z.selectionForeground=A.selectionForeground?j(A.selectionForeground,p.NULL_COLOR):void 0,z.selectionForeground===p.NULL_COLOR&&(z.selectionForeground=void 0),p.color.isOpaque(z.selectionBackgroundTransparent)&&(z.selectionBackgroundTransparent=p.color.opacity(z.selectionBackgroundTransparent,.3)),p.color.isOpaque(z.selectionInactiveBackgroundTransparent)&&(z.selectionInactiveBackgroundTransparent=p.color.opacity(z.selectionInactiveBackgroundTransparent,.3)),z.ansi=o.DEFAULT_ANSI_COLORS.slice(),z.ansi[0]=j(A.black,o.DEFAULT_ANSI_COLORS[0]),z.ansi[1]=j(A.red,o.DEFAULT_ANSI_COLORS[1]),z.ansi[2]=j(A.green,o.DEFAULT_ANSI_COLORS[2]),z.ansi[3]=j(A.yellow,o.DEFAULT_ANSI_COLORS[3]),z.ansi[4]=j(A.blue,o.DEFAULT_ANSI_COLORS[4]),z.ansi[5]=j(A.magenta,o.DEFAULT_ANSI_COLORS[5]),z.ansi[6]=j(A.cyan,o.DEFAULT_ANSI_COLORS[6]),z.ansi[7]=j(A.white,o.DEFAULT_ANSI_COLORS[7]),z.ansi[8]=j(A.brightBlack,o.DEFAULT_ANSI_COLORS[8]),z.ansi[9]=j(A.brightRed,o.DEFAULT_ANSI_COLORS[9]),z.ansi[10]=j(A.brightGreen,o.DEFAULT_ANSI_COLORS[10]),z.ansi[11]=j(A.brightYellow,o.DEFAULT_ANSI_COLORS[11]),z.ansi[12]=j(A.brightBlue,o.DEFAULT_ANSI_COLORS[12]),z.ansi[13]=j(A.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),z.ansi[14]=j(A.brightCyan,o.DEFAULT_ANSI_COLORS[14]),z.ansi[15]=j(A.brightWhite,o.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const M=Math.min(z.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),h=c(844);class f extends h.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 b=w-1;b>=0;b--)this.set(m+b+k,this.get(m+b));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,h=5){if(typeof u!="object")return u;const f=Array.isArray(u)?[]:{};for(const p in u)f[p]=h<=1?u[p]:u[p]&&c(u[p],h-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,h=0,f=0;var p,m,w,k,v;function b(x){const C=x.toString(16);return C.length<2?"0"+C:C}function y(x,C){return x>>0},x.toColor=function(C,N,j,A){return{css:x.toCss(C,N,j,A),rgba:x.toRgba(C,N,j,A)}}})(p||(o.channels=p={})),(function(x){function C(N,j){return f=Math.round(255*j),[c,u,h]=v.toChannels(N.rgba),{css:p.toCss(c,u,h,f),rgba:p.toRgba(c,u,h,f)}}x.blend=function(N,j){if(f=(255&j.rgba)/255,f===1)return{css:j.css,rgba:j.rgba};const A=j.rgba>>24&255,z=j.rgba>>16&255,M=j.rgba>>8&255,D=N.rgba>>24&255,I=N.rgba>>16&255,B=N.rgba>>8&255;return c=D+Math.round((A-D)*f),u=I+Math.round((z-I)*f),h=B+Math.round((M-B)*f),{css:p.toCss(c,u,h),rgba:p.toRgba(c,u,h)}},x.isOpaque=function(N){return(255&N.rgba)==255},x.ensureContrastRatio=function(N,j,A){const z=v.ensureContrastRatio(N.rgba,j.rgba,A);if(z)return p.toColor(z>>24&255,z>>16&255,z>>8&255)},x.opaque=function(N){const j=(255|N.rgba)>>>0;return[c,u,h]=v.toChannels(j),{css:p.toCss(c,u,h),rgba:j}},x.opacity=C,x.multiplyOpacity=function(N,j){return f=255&N.rgba,C(N,f*j/255)},x.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(o.color=m={})),(function(x){let C,N;try{const j=document.createElement("canvas");j.width=1,j.height=1;const A=j.getContext("2d",{willReadFrequently:!0});A&&(C=A,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}x.toColor=function(j){if(j.match(/#[\da-f]{3,8}/i))switch(j.length){case 4:return c=parseInt(j.slice(1,2).repeat(2),16),u=parseInt(j.slice(2,3).repeat(2),16),h=parseInt(j.slice(3,4).repeat(2),16),p.toColor(c,u,h);case 5:return c=parseInt(j.slice(1,2).repeat(2),16),u=parseInt(j.slice(2,3).repeat(2),16),h=parseInt(j.slice(3,4).repeat(2),16),f=parseInt(j.slice(4,5).repeat(2),16),p.toColor(c,u,h,f);case 7:return{css:j,rgba:(parseInt(j.slice(1),16)<<8|255)>>>0};case 9:return{css:j,rgba:parseInt(j.slice(1),16)>>>0}}const A=j.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]),h=parseInt(A[3]),f=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(c,u,h,f);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=j,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,u,h,f]=C.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,h,f),css:j}}})(w||(o.css=w={})),(function(x){function C(N,j,A){const z=N/255,M=j/255,D=A/255;return .2126*(z<=.03928?z/12.92:Math.pow((z+.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))}x.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},x.relativeLuminance2=C})(k||(o.rgb=k={})),(function(x){function C(j,A,z){const M=j>>24&255,D=j>>16&255,I=j>>8&255;let B=A>>24&255,G=A>>16&255,q=A>>8&255,Q=y(k.relativeLuminance2(B,G,q),k.relativeLuminance2(M,D,I));for(;Q0||G>0||q>0);)B-=Math.max(0,Math.ceil(.1*B)),G-=Math.max(0,Math.ceil(.1*G)),q-=Math.max(0,Math.ceil(.1*q)),Q=y(k.relativeLuminance2(B,G,q),k.relativeLuminance2(M,D,I));return(B<<24|G<<16|q<<8|255)>>>0}function N(j,A,z){const M=j>>24&255,D=j>>16&255,I=j>>8&255;let B=A>>24&255,G=A>>16&255,q=A>>8&255,Q=y(k.relativeLuminance2(B,G,q),k.relativeLuminance2(M,D,I));for(;Q>>0}x.blend=function(j,A){if(f=(255&A)/255,f===1)return A;const z=A>>24&255,M=A>>16&255,D=A>>8&255,I=j>>24&255,B=j>>16&255,G=j>>8&255;return c=I+Math.round((z-I)*f),u=B+Math.round((M-B)*f),h=G+Math.round((D-G)*f),p.toRgba(c,u,h)},x.ensureContrastRatio=function(j,A,z){const M=k.relativeLuminance(j>>8),D=k.relativeLuminance(A>>8);if(y(M,D)>8));if(qy(M,k.relativeLuminance(Q>>8))?G:Q}return G}const I=N(j,A,z),B=y(M,k.relativeLuminance(I>>8));if(By(M,k.relativeLuminance(G>>8))?I:G}return I}},x.reduceLuminance=C,x.increaseLuminance=N,x.toChannels=function(j){return[j>>24&255,j>>16&255,j>>8&255,255&j]}})(v||(o.rgba=v={})),o.toPaddedHex=b,o.contrastRatio=y},8969:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=c(844),h=c(2585),f=c(4348),p=c(7866),m=c(744),w=c(7302),k=c(6975),v=c(8460),b=c(1753),y=c(1480),x=c(7994),C=c(9282),N=c(5435),j=c(5981),A=c(2660);let z=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var B;(B=this._onScrollApi)==null||B.fire(I.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(I){for(const B in I)this.optionsService.options[B]=I[B]}constructor(I){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(I)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(y.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(x.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(h.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 j.WriteBuffer(((B,G)=>this._inputHandler.parse(B,G)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,B){this._writeBuffer.write(I,B)}writeSync(I,B){this._logService.logLevel<=h.LogLevelEnum.WARN&&!z&&(this._logService.warn("writeSync is unreliable and will be removed soon."),z=!0),this._writeBuffer.writeSync(I,B)}input(I,B=!0){this.coreService.triggerDataEvent(I,B)}resize(I,B){isNaN(I)||isNaN(B)||(I=Math.max(I,m.MINIMUM_COLS),B=Math.max(B,m.MINIMUM_ROWS),this._bufferService.resize(I,B))}scroll(I,B=!1){this._bufferService.scroll(I,B)}scrollLines(I,B,G){this._bufferService.scrollLines(I,B,G)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const B=I-this._bufferService.buffer.ydisp;B!==0&&this.scrollLines(B)}registerEscHandler(I,B){return this._inputHandler.registerEscHandler(I,B)}registerDcsHandler(I,B){return this._inputHandler.registerDcsHandler(I,B)}registerCsiHandler(I,B){return this._inputHandler.registerCsiHandler(I,B)}registerOscHandler(I,B){return this._inputHandler.registerOscHandler(I,B)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const B=this.optionsService.rawOptions.windowsPty;B&&B.buildNumber!==void 0&&B.buildNumber!==void 0?I=B.backend==="conpty"&&B.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const B of I)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(h)))},o.runAndSubscribe=function(c,u){return u(void 0),c((h=>u(h)))}},5435:function(a,o,c){var u=this&&this.__decorate||function(J,$,L,F){var U,H=arguments.length,ae=H<3?$:F===null?F=Object.getOwnPropertyDescriptor($,L):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(J,$,L,F);else for(var ie=J.length-1;ie>=0;ie--)(U=J[ie])&&(ae=(H<3?U(ae):H>3?U($,L,ae):U($,L))||ae);return H>3&&ae&&Object.defineProperty($,L,ae),ae},h=this&&this.__param||function(J,$){return function(L,F){$(L,F,J)}};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),b=c(8460),y=c(643),x=c(511),C=c(3734),N=c(2585),j=c(1480),A=c(6242),z=c(6351),M=c(5941),D={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function B(J,$){if(J>24)return $.setWinLines||!1;switch(J){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 G;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(G||(o.WindowsOptionsReportType=G={}));let q=0;class Q extends w.Disposable{getAttrData(){return this._curAttrData}constructor($,L,F,U,H,ae,ie,ue,re=new m.EscapeSequenceParser){super(),this._bufferService=$,this._charsetService=L,this._coreService=F,this._logService=U,this._optionsService=H,this._oscLinkService=ae,this._coreMouseService=ie,this._unicodeService=ue,this._parser=re,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new x.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 b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.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((V=>this._activeBuffer=V.activeBuffer))),this._parser.setCsiHandlerFallback(((V,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(V),params:oe.toArray()})})),this._parser.setEscHandlerFallback((V=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(V)})})),this._parser.setExecuteHandlerFallback((V=>{this._logService.debug("Unknown EXECUTE code: ",{code:V})})),this._parser.setOscHandlerFallback(((V,oe,ce)=>{this._logService.debug("Unknown OSC code: ",{identifier:V,action:oe,data:ce})})),this._parser.setDcsHandlerFallback(((V,oe,ce)=>{oe==="HOOK"&&(ce=ce.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(V),action:oe,payload:ce})})),this._parser.setPrintHandler(((V,oe,ce)=>this.print(V,oe,ce))),this._parser.registerCsiHandler({final:"@"},(V=>this.insertChars(V))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(V=>this.scrollLeft(V))),this._parser.registerCsiHandler({final:"A"},(V=>this.cursorUp(V))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(V=>this.scrollRight(V))),this._parser.registerCsiHandler({final:"B"},(V=>this.cursorDown(V))),this._parser.registerCsiHandler({final:"C"},(V=>this.cursorForward(V))),this._parser.registerCsiHandler({final:"D"},(V=>this.cursorBackward(V))),this._parser.registerCsiHandler({final:"E"},(V=>this.cursorNextLine(V))),this._parser.registerCsiHandler({final:"F"},(V=>this.cursorPrecedingLine(V))),this._parser.registerCsiHandler({final:"G"},(V=>this.cursorCharAbsolute(V))),this._parser.registerCsiHandler({final:"H"},(V=>this.cursorPosition(V))),this._parser.registerCsiHandler({final:"I"},(V=>this.cursorForwardTab(V))),this._parser.registerCsiHandler({final:"J"},(V=>this.eraseInDisplay(V,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(V=>this.eraseInDisplay(V,!0))),this._parser.registerCsiHandler({final:"K"},(V=>this.eraseInLine(V,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(V=>this.eraseInLine(V,!0))),this._parser.registerCsiHandler({final:"L"},(V=>this.insertLines(V))),this._parser.registerCsiHandler({final:"M"},(V=>this.deleteLines(V))),this._parser.registerCsiHandler({final:"P"},(V=>this.deleteChars(V))),this._parser.registerCsiHandler({final:"S"},(V=>this.scrollUp(V))),this._parser.registerCsiHandler({final:"T"},(V=>this.scrollDown(V))),this._parser.registerCsiHandler({final:"X"},(V=>this.eraseChars(V))),this._parser.registerCsiHandler({final:"Z"},(V=>this.cursorBackwardTab(V))),this._parser.registerCsiHandler({final:"`"},(V=>this.charPosAbsolute(V))),this._parser.registerCsiHandler({final:"a"},(V=>this.hPositionRelative(V))),this._parser.registerCsiHandler({final:"b"},(V=>this.repeatPrecedingCharacter(V))),this._parser.registerCsiHandler({final:"c"},(V=>this.sendDeviceAttributesPrimary(V))),this._parser.registerCsiHandler({prefix:">",final:"c"},(V=>this.sendDeviceAttributesSecondary(V))),this._parser.registerCsiHandler({final:"d"},(V=>this.linePosAbsolute(V))),this._parser.registerCsiHandler({final:"e"},(V=>this.vPositionRelative(V))),this._parser.registerCsiHandler({final:"f"},(V=>this.hVPosition(V))),this._parser.registerCsiHandler({final:"g"},(V=>this.tabClear(V))),this._parser.registerCsiHandler({final:"h"},(V=>this.setMode(V))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(V=>this.setModePrivate(V))),this._parser.registerCsiHandler({final:"l"},(V=>this.resetMode(V))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(V=>this.resetModePrivate(V))),this._parser.registerCsiHandler({final:"m"},(V=>this.charAttributes(V))),this._parser.registerCsiHandler({final:"n"},(V=>this.deviceStatus(V))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(V=>this.deviceStatusPrivate(V))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(V=>this.softReset(V))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(V=>this.setCursorStyle(V))),this._parser.registerCsiHandler({final:"r"},(V=>this.setScrollRegion(V))),this._parser.registerCsiHandler({final:"s"},(V=>this.saveCursor(V))),this._parser.registerCsiHandler({final:"t"},(V=>this.windowOptions(V))),this._parser.registerCsiHandler({final:"u"},(V=>this.restoreCursor(V))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(V=>this.insertColumns(V))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(V=>this.deleteColumns(V))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(V=>this.selectProtected(V))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(V=>this.requestMode(V,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(V=>this.requestMode(V,!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((V=>(this.setTitle(V),this.setIconName(V),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((V=>this.setIconName(V)))),this._parser.registerOscHandler(2,new A.OscHandler((V=>this.setTitle(V)))),this._parser.registerOscHandler(4,new A.OscHandler((V=>this.setOrReportIndexedColor(V)))),this._parser.registerOscHandler(8,new A.OscHandler((V=>this.setHyperlink(V)))),this._parser.registerOscHandler(10,new A.OscHandler((V=>this.setOrReportFgColor(V)))),this._parser.registerOscHandler(11,new A.OscHandler((V=>this.setOrReportBgColor(V)))),this._parser.registerOscHandler(12,new A.OscHandler((V=>this.setOrReportCursorColor(V)))),this._parser.registerOscHandler(104,new A.OscHandler((V=>this.restoreIndexedColor(V)))),this._parser.registerOscHandler(110,new A.OscHandler((V=>this.restoreFgColor(V)))),this._parser.registerOscHandler(111,new A.OscHandler((V=>this.restoreBgColor(V)))),this._parser.registerOscHandler(112,new A.OscHandler((V=>this.restoreCursorColor(V)))),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 V in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:V},(()=>this.selectCharset("("+V))),this._parser.registerEscHandler({intermediates:")",final:V},(()=>this.selectCharset(")"+V))),this._parser.registerEscHandler({intermediates:"*",final:V},(()=>this.selectCharset("*"+V))),this._parser.registerEscHandler({intermediates:"+",final:V},(()=>this.selectCharset("+"+V))),this._parser.registerEscHandler({intermediates:"-",final:V},(()=>this.selectCharset("-"+V))),this._parser.registerEscHandler({intermediates:".",final:V},(()=>this.selectCharset("."+V))),this._parser.registerEscHandler({intermediates:"/",final:V},(()=>this.selectCharset("/"+V)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((V=>(this._logService.error("Parsing error: ",V),V))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new z.DcsHandler(((V,oe)=>this.requestStatusString(V,oe))))}_preserveStack($,L,F,U){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=F,this._parseStack.position=U}_logSlowResolvingAsync($){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([$,new Promise(((L,F)=>setTimeout((()=>F("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse($,L){let F,U=this._activeBuffer.x,H=this._activeBuffer.y,ae=0;const ie=this._parseStack.paused;if(ie){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(F),F;U=this._parseStack.cursorStartX,H=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>I&&(ae=this._parseStack.position+I)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?` "${$}"`:` "${Array.prototype.map.call($,(V=>String.fromCharCode(V))).join("")}"`),typeof $=="string"?$.split("").map((V=>V.charCodeAt(0))):$),this._parseBuffer.length<$.length&&this._parseBuffer.lengthI)for(let V=ae;V<$.length;V+=I){const oe=V+I<$.length?V+I:$.length,ce=typeof $=="string"?this._stringDecoder.decode($.substring(V,oe),this._parseBuffer):this._utf8Decoder.decode($.subarray(V,oe),this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,ce))return this._preserveStack(U,H,ce,V),this._logSlowResolvingAsync(F),F}else if(!ie){const V=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,V))return this._preserveStack(U,H,V,0),this._logSlowResolvingAsync(F),F}this._activeBuffer.x===U&&this._activeBuffer.y===H||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),re=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);re0&&ce.getWidth(this._activeBuffer.x-1)===2&&ce.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let me=this._parser.precedingJoinState;for(let ve=L;veue){if(re){const Te=ce;let $e=this._activeBuffer.x-Xe;for(this._activeBuffer.x=Xe,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),ce=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Xe>0&&ce instanceof v.BufferLine&&ce.copyCellsFrom(Te,$e,0,Xe,!1);$e=0;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(V&&(ce.insertCells(this._activeBuffer.x,H-Xe,this._activeBuffer.getNullCell(oe)),ce.getWidth(ue-1)===2&&ce.setCellFromCodepoint(ue-1,y.NULL_CELL_CODE,y.NULL_CELL_WIDTH,oe)),ce.setCellFromCodepoint(this._activeBuffer.x++,U,H,oe),H>0)for(;--H;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=me,this._activeBuffer.x0&&ce.getWidth(this._activeBuffer.x)===0&&!ce.hasContent(this._activeBuffer.x)&&ce.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler($,L){return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,L):this._parser.registerCsiHandler($,(F=>!B(F.params[0],this._optionsService.rawOptions.windowOptions)||L(F)))}registerDcsHandler($,L){return this._parser.registerDcsHandler($,new z.DcsHandler(L))}registerEscHandler($,L){return this._parser.registerEscHandler($,L)}registerOscHandler($,L){return this._parser.registerOscHandler($,new A.OscHandler(L))}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 L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.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($,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=$,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=$,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor($,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+$,this._activeBuffer.y+L)}cursorUp($){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,$.params[0]||1)):this._moveCursor(0,-($.params[0]||1)),!0}cursorDown($){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,$.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 L=$.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected($){const L=$.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine($,L,F,U=!1,H=!1){const ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);ae.replaceCells(L,F,this._activeBuffer.getNullCell(this._eraseAttrData()),H),U&&(ae.isWrapped=!1)}_resetBufferLine($,L=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+$),F.isWrapped=!1)}eraseInDisplay($,L=!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,L);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 3:const U=this._activeBuffer.lines.length-this._bufferService.rows;U>0&&(this._activeBuffer.lines.trimStart(U),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-U,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-U,0),this._onScroll.fire(0))}return!0}eraseInLine($,L=!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,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines($){this._restrictCursor();let L=$.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 re=ue;for(let V=1;V0||(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 L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){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 L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){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[L]===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($,L){const F=this._coreService.decPrivateModes,{activeProtocol:U,activeEncoding:H}=this._coreMouseService,ae=this._coreService,{buffers:ie,cols:ue}=this._bufferService,{active:re,alt:V}=ie,oe=this._optionsService.rawOptions,ce=Fe=>Fe?1:2,me=$.params[0];return ve=me,Re=L?me===2?4:me===4?ce(ae.modes.insertMode):me===12?3:me===20?ce(oe.convertEol):0:me===1?ce(F.applicationCursorKeys):me===3?oe.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:me===6?ce(F.origin):me===7?ce(F.wraparound):me===8?3:me===9?ce(U==="X10"):me===12?ce(oe.cursorBlink):me===25?ce(!ae.isCursorHidden):me===45?ce(F.reverseWraparound):me===66?ce(F.applicationKeypad):me===67?4:me===1e3?ce(U==="VT200"):me===1002?ce(U==="DRAG"):me===1003?ce(U==="ANY"):me===1004?ce(F.sendFocus):me===1005?4:me===1006?ce(H==="SGR"):me===1015?4:me===1016?ce(H==="SGR_PIXELS"):me===1048?1:me===47||me===1047||me===1049?ce(re===V):me===2004?ce(F.bracketedPasteMode):0,ae.triggerDataEvent(`${f.C0.ESC}[${L?"":"?"}${ve};${Re}$y`),!0;var ve,Re}_updateAttrColor($,L,F,U,H){return L===2?($|=50331648,$&=-16777216,$|=C.AttributeData.fromColorRGB([F,U,H])):L===5&&($&=-50331904,$|=33554432|255&F),$}_extractColor($,L,F){const U=[0,0,-1,0,0,0];let H=0,ae=0;do{if(U[ae+H]=$.params[L+ae],$.hasSubParams(L+ae)){const ie=$.getSubParams(L+ae);let ue=0;do U[1]===5&&(H=1),U[ae+ue+1+H]=ie[ue];while(++ue=2||U[1]===2&&ae+H>=5)break;U[1]&&(H=1)}while(++ae+L<$.length&&ae+H5)&&($=1),L.extended.underlineStyle=$,L.fg|=268435456,$===0&&(L.fg&=-268435457),L.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 L=$.length;let F;const U=this._curAttrData;for(let H=0;H=30&&F<=37?(U.fg&=-50331904,U.fg|=16777216|F-30):F>=40&&F<=47?(U.bg&=-50331904,U.bg|=16777216|F-40):F>=90&&F<=97?(U.fg&=-50331904,U.fg|=16777224|F-90):F>=100&&F<=107?(U.bg&=-50331904,U.bg|=16777224|F-100):F===0?this._processSGR0(U):F===1?U.fg|=134217728:F===3?U.bg|=67108864:F===4?(U.fg|=268435456,this._processUnderline($.hasSubParams(H)?$.getSubParams(H)[0]:1,U)):F===5?U.fg|=536870912:F===7?U.fg|=67108864:F===8?U.fg|=1073741824:F===9?U.fg|=2147483648:F===2?U.bg|=134217728:F===21?this._processUnderline(2,U):F===22?(U.fg&=-134217729,U.bg&=-134217729):F===23?U.bg&=-67108865:F===24?(U.fg&=-268435457,this._processUnderline(0,U)):F===25?U.fg&=-536870913:F===27?U.fg&=-67108865:F===28?U.fg&=-1073741825:F===29?U.fg&=2147483647:F===39?(U.fg&=-67108864,U.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(U.bg&=-67108864,U.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?H+=this._extractColor($,H,U):F===53?U.bg|=1073741824:F===55?U.bg&=-1073741825:F===59?(U.extended=U.extended.clone(),U.extended.underlineColor=-1,U.updateExtended()):F===100?(U.fg&=-67108864,U.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,U.bg&=-67108864,U.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 L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${L};${F}R`)}return!0}deviceStatusPrivate($){if($.params[0]===6){const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${L};${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 L=$.params[0]||1;switch(L){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=L%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion($){const L=$.params[0]||1;let F;return($.length<2||(F=$.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions($){if(!B($.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=$.length>1?$.params[1]:0;switch($.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(G.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(G.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:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==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 L=[],F=$.split(";");for(;F.length>1;){const U=F.shift(),H=F.shift();if(/^\d+$/.exec(U)){const ae=parseInt(U);if(Z(ae))if(H==="?")L.push({type:0,index:ae});else{const ie=(0,M.parseColor)(H);ie&&L.push({type:1,index:ae,color:ie})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink($){const L=$.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink($,L){this._getCurrentLinkId()&&this._finishHyperlink();const F=$.split(":");let U;const H=F.findIndex((ae=>ae.startsWith("id=")));return H!==-1&&(U=F[H].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:U,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor($,L){const F=$.split(";");for(let U=0;U=this._specialColors.length);++U,++L)if(F[U]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const H=(0,M.parseColor)(F[U]);H&&this._onColor.fire([{type:1,index:this._specialColors[L],color:H}])}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 L=[],F=$.split(";");for(let U=0;U=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 x.CellData;$.content=4194373,$.fg=this._curAttrData.fg,$.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${f.C0.ESC}${H}${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}[U.cursorStyle]-(U.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty($,L){this._dirtyRowTracker.markRangeDirty($,L)}}o.InputHandler=Q;let K=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){Jthis.end&&(this.end=J)}markRangeDirty(J,$){J>$&&(q=J,J=$,$=q),Jthis.end&&(this.end=$)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(J){return 0<=J&&J<256}K=u([h(0,N.IBufferService)],K)},844:(a,o)=>{function c(u){for(const h of u)h.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 h=this._disposables.indexOf(u);h!==-1&&this._disposables.splice(h,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var h;this._isDisposed||u===this._value||((h=this._value)==null||h.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(h,f,p){this._data[h]||(this._data[h]={}),this._data[h][f]=p}get(h,f){return this._data[h]?this._data[h][f]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(u,h,f,p,m){this._data.get(u,h)||this._data.set(u,h,new c),this._data.get(u,h).set(f,p,m)}get(u,h,f,p){var m;return(m=this._data.get(u,h))==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 h=c.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[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 h=this._getKey(u);if(h===void 0||(c=this._search(h),c===-1)||this._getKey(this._array[c])!==h)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 h(this._array[c]);while(++c=h;){let p=h+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}h=p+1}}return h}}},7226:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=c(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-w))}ms`),void this._start();v=b}this.clear()}}class f extends h{_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 h{_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(h){const f=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),p=f==null?void 0:f.get(h.cols-1),m=h.buffer.lines.get(h.buffer.ybase+h.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),h=c(7226),f=c(3734),p=c(8437),m=c(4634),w=c(511),k=c(643),v=c(4863),b=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(y,x,C){this._hasScrollback=y,this._optionsService=x,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=b.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 h.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(y){return y?(this._nullCell.fg=y.fg,this._nullCell.bg=y.bg,this._nullCell.extended=y.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(y){return y?(this._whitespaceCell.fg=y.fg,this._whitespaceCell.bg=y.bg,this._whitespaceCell.extended=y.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(y,x){return new p.BufferLine(this._bufferService.cols,this.getNullCell(y),x)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const y=this.ybase+this.y-this.ydisp;return y>=0&&yo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:x}fillViewportRows(y){if(this.lines.length===0){y===void 0&&(y=p.DEFAULT_ATTR_DATA);let x=this._rows;for(;x--;)this.lines.push(this.getBlankLine(y))}}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(y,x){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const j=this._getCorrectBufferLength(x);if(j>this.lines.maxLength&&(this.lines.maxLength=j),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(y,C)));else for(let z=this._rows;z>x;z--)this.lines.length>x+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(j0&&(this.lines.trimStart(z),this.ybase=Math.max(this.ybase-z,0),this.ydisp=Math.max(this.ydisp-z,0),this.savedY=Math.max(this.savedY-z,0)),this.lines.maxLength=j}this.x=Math.min(this.x,y-1),this.y=Math.min(this.y,x-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,y-1),this.scrollTop=0}if(this.scrollBottom=x-1,this._isReflowEnabled&&(this._reflow(y,x),this._cols>y))for(let A=0;A.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let y=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,y=!1);let x=0;for(;this._memoryCleanupPosition100)return!0;return y}get _isReflowEnabled(){const y=this._optionsService.rawOptions.windowsPty;return y&&y.buildNumber?this._hasScrollback&&y.backend==="conpty"&&y.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(y,x){this._cols!==y&&(y>this._cols?this._reflowLarger(y,x):this._reflowSmaller(y,x))}_reflowLarger(y,x){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,y,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(y,x,N.countRemoved)}}_reflowLargerAdjustViewport(y,x,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let j=C;for(;j-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;A--){let z=this.lines.get(A);if(!z||!z.isWrapped&&z.getTrimmedLength()<=y)continue;const M=[z];for(;z.isWrapped&&A>0;)z=this.lines.get(--A),M.unshift(z);const D=this.ybase+this.y;if(D>=A&&D0&&(N.push({start:A+M.length+j,newLines:Q}),j+=Q.length),M.push(...Q);let K=B.length-1,Z=B[K];Z===0&&(K--,Z=B[K]);let J=M.length-G-1,$=I;for(;J>=0;){const F=Math.min($,Z);if(M[K]===void 0)break;if(M[K].copyCellsFrom(M[J],$-F,Z-F,F,!0),Z-=F,Z===0&&(K--,Z=B[K]),$-=F,$===0){J--;const U=Math.max(J,0);$=(0,m.getWrappedLineTrimmedLength)(M,U,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const A=[],z=[];for(let K=0;K=0;K--)if(B&&B.start>D+G){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}),G+=B.newLines.length,B=N[++I]}else this.lines.set(K,z[D--]);let q=0;for(let K=A.length-1;K>=0;K--)A[K].index+=q,this.lines.onInsertEmitter.fire(A[K]),q+=A[K].amount;const Q=Math.max(0,M+j-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(y,x,C=0,N){const j=this.lines.get(y);return j?j.translateToString(x,C,N):""}getWrappedRangeForLine(y){let x=y,C=y;for(;x>0&&this.lines.get(x).isWrapped;)x--;for(;C+10;);return y>=this._cols?this._cols-1:y<0?0:y}nextStop(y){for(y==null&&(y=this.x);!this.tabs[++y]&&y=this._cols?this._cols-1:y<0?0:y}clearMarkers(y){this._isClearing=!0;for(let x=0;x{x.line-=C,x.line<0&&x.dispose()}))),x.register(this.lines.onInsert((C=>{x.line>=C.index&&(x.line+=C.amount)}))),x.register(this.lines.onDelete((C=>{x.line>=C.index&&x.lineC.index&&(x.line-=C.amount)}))),x.register(x.onDispose((()=>this._removeMarker(x)))),x}_removeMarker(y){this._isClearing||this.markers.splice(this.markers.indexOf(y),1)}}},8437:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=c(3734),h=c(511),f=c(643),p=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class w{constructor(v,b,y=!1){this.isWrapped=y,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const x=b||h.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let C=0;C>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):y]}set(v,b){this._data[3*v+1]=b[f.CHAR_DATA_ATTR_INDEX],b[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[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 b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,y,x){268435456&x.bg&&(this._extendedAttrs[v]=x.extended),this._data[3*v+0]=b|y<<22,this._data[3*v+1]=x.fg,this._data[3*v+2]=x.bg}addCodepointToCell(v,b,y){let x=this._data[3*v+0];2097152&x?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&x?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&x)+(0,p.stringFromCodePoint)(b),x&=-2097152,x|=2097152):x=b|4194304,y&&(x&=-12582913,x|=y<<22),this._data[3*v+0]=x}insertCells(v,b,y){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,y),b=0;--C)this.setCell(v+b+C,this.loadCell(v+C,x));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*y)this._data=new Uint32Array(this._data.buffer,0,y);else{const x=new Uint32Array(y);x.set(this._data),this._data=x}for(let x=this.length;x=v&&delete this._combined[j]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=v&&delete this._extendedAttrs[j]}}return this.length=v,4*y*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,b,y,x,C){const N=v._data;if(C)for(let A=x-1;A>=0;A--){for(let z=0;z<3;z++)this._data[3*(y+A)+z]=N[3*(b+A)+z];268435456&N[3*(b+A)+2]&&(this._extendedAttrs[y+A]=v._extendedAttrs[b+A])}else for(let A=0;A=b&&(this._combined[z-b+y]=v._combined[z])}}translateToString(v,b,y,x){b=b??0,y=y??this.length,v&&(y=Math.min(y,this.getTrimmedLength())),x&&(x.length=0);let C="";for(;b>22||1}return x&&x.push(b),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,h,f){if(h===u.length-1)return u[h].getTrimmedLength();const p=!u[h].hasContent(f-1)&&u[h].getWidth(f-1)===1,m=u[h+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,h,f,p,m){const w=[];for(let k=0;k=k&&p0&&(z>x||y[z].getTrimmedLength()===0);z--)A++;A>0&&(w.push(k+y.length-A),w.push(A)),k+=y.length-1}return w},o.reflowLargerCreateNewLayout=function(u,h){const f=[];let p=0,m=h[p],w=0;for(let k=0;kc(u,y,h))).reduce(((b,y)=>b+y));let w=0,k=0,v=0;for(;vb&&(w-=b,k++);const y=u[k].getWidth(w-1)===2;y&&w--;const x=y?f-1:f;p.push(x),v+=x}return p},o.getWrappedLineTrimmedLength=c},5295:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=c(8460),h=c(844),f=c(9092);class p extends h.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),h=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[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(w[h.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(w[h.CHAR_DATA_CHAR_INDEX].length===2){const v=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|w[h.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[h.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=w[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[h.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),h=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,h.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,h;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=` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(z){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&z&&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(z){const M=this._getMouseBufferCoords(z),D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(D&&I&&M)&&this._areCoordsInSelection(M,D,I)}isCellInSelection(z,M){const D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!D||!I)&&this._areCoordsInSelection([z,M],D,I)}_areCoordsInSelection(z,M,D){return z[1]>M[1]&&z[1]=M[0]&&z[0]=M[0]}_selectWordAtCursor(z,M){var B,G;const D=(G=(B=this._linkifier.currentLink)==null?void 0:B.link)==null?void 0:G.range;if(D)return this._model.selectionStart=[D.start.x-1,D.start.y-1],this._model.selectionStartLength=(0,y.getRangeLength)(D,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(z);return!!I&&(this._selectWordAt(I,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(z,M){this._model.clearSelection(),z=Math.max(z,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,z],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(z){this._model.handleTrim(z)&&this.refresh()}_getMouseBufferCoords(z){const M=this._mouseService.getCoords(z,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(z){let M=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,z,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(z){return b.isMac?z.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:z.shiftKey}handleMouseDown(z){if(this._mouseDownTimeStamp=z.timeStamp,(z.button!==2||!this.hasSelection)&&z.button===0){if(!this._enabled){if(!this.shouldForceSelection(z))return;z.stopPropagation()}z.preventDefault(),this._dragScrollAmount=0,this._enabled&&z.shiftKey?this._handleIncrementalClick(z):z.detail===1?this._handleSingleClick(z):z.detail===2?this._handleDoubleClick(z):z.detail===3&&this._handleTripleClick(z),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(z){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(z))}_handleSingleClick(z){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(z)?3:0,this._model.selectionStart=this._getMouseBufferCoords(z),!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(z){this._selectWordAtCursor(z,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(z){const M=this._getMouseBufferCoords(z);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(z){return z.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(z){if(z.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(z),!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(z.ydisp+this._bufferService.rows,z.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=z.ydisp),this.refresh()}}_handleMouseUp(z){const M=z.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&z.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const D=this._mouseService.getCoords(z,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){const I=(0,p.moveToCellSequence)(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,D=!(!z||!M||z[0]===M[0]&&z[1]===M[1]);D?z&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&z[0]===this._oldSelectionStart[0]&&z[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(z,M,D)):this._oldHasSelection&&this._fireOnSelectionChange(z,M,D)}_fireOnSelectionChange(z,M,D){this._oldSelectionStart=z,this._oldSelectionEnd=M,this._oldHasSelection=D,this._onSelectionChange.fire()}_handleBufferActivate(z){this.clearSelection(),this._trimListener.dispose(),this._trimListener=z.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(z,M){let D=M;for(let I=0;M>=I;I++){const B=z.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:B>1&&M!==I&&(D+=B-1)}return D}setSelection(z,M,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[z,M],this._model.selectionStartLength=D,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(z){this._isClickInSelection(z)||(this._selectWordAtCursor(z,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(z,M,D=!0,I=!0){if(z[0]>=this._bufferService.cols)return;const B=this._bufferService.buffer,G=B.lines.get(z[1]);if(!G)return;const U=B.translateBufferLineToString(z[1],!1);let Q=this._convertViewportColToCharacterIndex(G,z[0]),V=Q;const Z=z[0]-Q;let J=0,$=0,L=0,q=0;if(U.charAt(Q)===" "){for(;Q>0&&U.charAt(Q-1)===" ";)Q--;for(;V1&&(q+=ue-1,V+=ue-1);re>0&&Q>0&&!this._isCharWordSeparator(G.loadCell(re-1,this._workCell));){G.loadCell(re-1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,re--):se>1&&(L+=se-1,Q-=se-1),Q--,re--}for(;ie1&&(q+=se-1,V+=se-1),V++,ie++}}V++;let P=Q+Z-J+L,F=Math.min(this._bufferService.cols,V-Q+J+$-L-q);if(M||U.slice(Q,V).trim()!==""){if(D&&P===0&&G.getCodePoint(0)!==32){const re=B.lines.get(z[1]-1);if(re&&G.isWrapped&&re.getCodePoint(this._bufferService.cols-1)!==32){const ie=this._getWordAt([this._bufferService.cols-1,z[1]-1],!1,!0,!1);if(ie){const ue=this._bufferService.cols-ie.start;P-=ue,F+=ue}}}if(I&&P+F===this._bufferService.cols&&G.getCodePoint(this._bufferService.cols-1)!==32){const re=B.lines.get(z[1]+1);if(re!=null&&re.isWrapped&&re.getCodePoint(0)!==32){const ie=this._getWordAt([0,z[1]+1],!1,!1,!0);ie&&(F+=ie.length)}}return{start:P,length:F}}}_selectWordAt(z,M){const D=this._getWordAt(z,M);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,z[1]--;this._model.selectionStart=[D.start,z[1]],this._model.selectionStartLength=D.length}}_selectToWordAt(z){const M=this._getWordAt(z,!0);if(M){let D=z[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(z){return z.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(z.getChars())>=0}_selectLineAt(z){const M=this._bufferService.buffer.getWrappedRangeForLine(z),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,y.getRangeLength)(D,this._bufferService.cols)}};o.SelectionService=A=u([h(3,C.IBufferService),h(4,C.ICoreService),h(5,w.IMouseService),h(6,C.IOptionsService),h(7,w.IRenderService),h(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,z,M,D){var I,B=arguments.length,G=B<3?z:D===null?D=Object.getOwnPropertyDescriptor(z,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(A,z,M,D);else for(var U=A.length-1;U>=0;U--)(I=A[U])&&(G=(B<3?I(G):B>3?I(z,M,G):I(z,M))||G);return B>3&&G&&Object.defineProperty(z,M,G),G},h=this&&this.__param||function(A,z){return function(M,D){z(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"),b=p.css.toColor("#000000"),y=p.css.toColor("#ffffff"),x=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")],z=[0,95,135,175,215,255];for(let M=0;M<216;M++){const D=z[M/36%6|0],I=z[M/6%6|0],B=z[M%6];A.push({css:p.channels.toCss(D,I,B),rgba:p.channels.toRgba(D,I,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:b,cursor:y,cursorAccent:x,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(b,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(b,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 z=this._colors;if(z.foreground=j(A.foreground,v),z.background=j(A.background,b),z.cursor=j(A.cursor,y),z.cursorAccent=j(A.cursorAccent,x),z.selectionBackgroundTransparent=j(A.selectionBackground,C),z.selectionBackgroundOpaque=p.color.blend(z.background,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundTransparent=j(A.selectionInactiveBackground,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundOpaque=p.color.blend(z.background,z.selectionInactiveBackgroundTransparent),z.selectionForeground=A.selectionForeground?j(A.selectionForeground,p.NULL_COLOR):void 0,z.selectionForeground===p.NULL_COLOR&&(z.selectionForeground=void 0),p.color.isOpaque(z.selectionBackgroundTransparent)&&(z.selectionBackgroundTransparent=p.color.opacity(z.selectionBackgroundTransparent,.3)),p.color.isOpaque(z.selectionInactiveBackgroundTransparent)&&(z.selectionInactiveBackgroundTransparent=p.color.opacity(z.selectionInactiveBackgroundTransparent,.3)),z.ansi=o.DEFAULT_ANSI_COLORS.slice(),z.ansi[0]=j(A.black,o.DEFAULT_ANSI_COLORS[0]),z.ansi[1]=j(A.red,o.DEFAULT_ANSI_COLORS[1]),z.ansi[2]=j(A.green,o.DEFAULT_ANSI_COLORS[2]),z.ansi[3]=j(A.yellow,o.DEFAULT_ANSI_COLORS[3]),z.ansi[4]=j(A.blue,o.DEFAULT_ANSI_COLORS[4]),z.ansi[5]=j(A.magenta,o.DEFAULT_ANSI_COLORS[5]),z.ansi[6]=j(A.cyan,o.DEFAULT_ANSI_COLORS[6]),z.ansi[7]=j(A.white,o.DEFAULT_ANSI_COLORS[7]),z.ansi[8]=j(A.brightBlack,o.DEFAULT_ANSI_COLORS[8]),z.ansi[9]=j(A.brightRed,o.DEFAULT_ANSI_COLORS[9]),z.ansi[10]=j(A.brightGreen,o.DEFAULT_ANSI_COLORS[10]),z.ansi[11]=j(A.brightYellow,o.DEFAULT_ANSI_COLORS[11]),z.ansi[12]=j(A.brightBlue,o.DEFAULT_ANSI_COLORS[12]),z.ansi[13]=j(A.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),z.ansi[14]=j(A.brightCyan,o.DEFAULT_ANSI_COLORS[14]),z.ansi[15]=j(A.brightWhite,o.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const M=Math.min(z.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),h=c(844);class f extends h.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 b=w-1;b>=0;b--)this.set(m+b+k,this.get(m+b));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,h=5){if(typeof u!="object")return u;const f=Array.isArray(u)?[]:{};for(const p in u)f[p]=h<=1?u[p]:u[p]&&c(u[p],h-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,h=0,f=0;var p,m,w,k,v;function b(x){const C=x.toString(16);return C.length<2?"0"+C:C}function y(x,C){return x>>0},x.toColor=function(C,N,j,A){return{css:x.toCss(C,N,j,A),rgba:x.toRgba(C,N,j,A)}}})(p||(o.channels=p={})),(function(x){function C(N,j){return f=Math.round(255*j),[c,u,h]=v.toChannels(N.rgba),{css:p.toCss(c,u,h,f),rgba:p.toRgba(c,u,h,f)}}x.blend=function(N,j){if(f=(255&j.rgba)/255,f===1)return{css:j.css,rgba:j.rgba};const A=j.rgba>>24&255,z=j.rgba>>16&255,M=j.rgba>>8&255,D=N.rgba>>24&255,I=N.rgba>>16&255,B=N.rgba>>8&255;return c=D+Math.round((A-D)*f),u=I+Math.round((z-I)*f),h=B+Math.round((M-B)*f),{css:p.toCss(c,u,h),rgba:p.toRgba(c,u,h)}},x.isOpaque=function(N){return(255&N.rgba)==255},x.ensureContrastRatio=function(N,j,A){const z=v.ensureContrastRatio(N.rgba,j.rgba,A);if(z)return p.toColor(z>>24&255,z>>16&255,z>>8&255)},x.opaque=function(N){const j=(255|N.rgba)>>>0;return[c,u,h]=v.toChannels(j),{css:p.toCss(c,u,h),rgba:j}},x.opacity=C,x.multiplyOpacity=function(N,j){return f=255&N.rgba,C(N,f*j/255)},x.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(o.color=m={})),(function(x){let C,N;try{const j=document.createElement("canvas");j.width=1,j.height=1;const A=j.getContext("2d",{willReadFrequently:!0});A&&(C=A,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}x.toColor=function(j){if(j.match(/#[\da-f]{3,8}/i))switch(j.length){case 4:return c=parseInt(j.slice(1,2).repeat(2),16),u=parseInt(j.slice(2,3).repeat(2),16),h=parseInt(j.slice(3,4).repeat(2),16),p.toColor(c,u,h);case 5:return c=parseInt(j.slice(1,2).repeat(2),16),u=parseInt(j.slice(2,3).repeat(2),16),h=parseInt(j.slice(3,4).repeat(2),16),f=parseInt(j.slice(4,5).repeat(2),16),p.toColor(c,u,h,f);case 7:return{css:j,rgba:(parseInt(j.slice(1),16)<<8|255)>>>0};case 9:return{css:j,rgba:parseInt(j.slice(1),16)>>>0}}const A=j.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]),h=parseInt(A[3]),f=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(c,u,h,f);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=j,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,u,h,f]=C.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,h,f),css:j}}})(w||(o.css=w={})),(function(x){function C(N,j,A){const z=N/255,M=j/255,D=A/255;return .2126*(z<=.03928?z/12.92:Math.pow((z+.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))}x.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},x.relativeLuminance2=C})(k||(o.rgb=k={})),(function(x){function C(j,A,z){const M=j>>24&255,D=j>>16&255,I=j>>8&255;let B=A>>24&255,G=A>>16&255,U=A>>8&255,Q=y(k.relativeLuminance2(B,G,U),k.relativeLuminance2(M,D,I));for(;Q0||G>0||U>0);)B-=Math.max(0,Math.ceil(.1*B)),G-=Math.max(0,Math.ceil(.1*G)),U-=Math.max(0,Math.ceil(.1*U)),Q=y(k.relativeLuminance2(B,G,U),k.relativeLuminance2(M,D,I));return(B<<24|G<<16|U<<8|255)>>>0}function N(j,A,z){const M=j>>24&255,D=j>>16&255,I=j>>8&255;let B=A>>24&255,G=A>>16&255,U=A>>8&255,Q=y(k.relativeLuminance2(B,G,U),k.relativeLuminance2(M,D,I));for(;Q>>0}x.blend=function(j,A){if(f=(255&A)/255,f===1)return A;const z=A>>24&255,M=A>>16&255,D=A>>8&255,I=j>>24&255,B=j>>16&255,G=j>>8&255;return c=I+Math.round((z-I)*f),u=B+Math.round((M-B)*f),h=G+Math.round((D-G)*f),p.toRgba(c,u,h)},x.ensureContrastRatio=function(j,A,z){const M=k.relativeLuminance(j>>8),D=k.relativeLuminance(A>>8);if(y(M,D)>8));if(Uy(M,k.relativeLuminance(Q>>8))?G:Q}return G}const I=N(j,A,z),B=y(M,k.relativeLuminance(I>>8));if(By(M,k.relativeLuminance(G>>8))?I:G}return I}},x.reduceLuminance=C,x.increaseLuminance=N,x.toChannels=function(j){return[j>>24&255,j>>16&255,j>>8&255,255&j]}})(v||(o.rgba=v={})),o.toPaddedHex=b,o.contrastRatio=y},8969:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=c(844),h=c(2585),f=c(4348),p=c(7866),m=c(744),w=c(7302),k=c(6975),v=c(8460),b=c(1753),y=c(1480),x=c(7994),C=c(9282),N=c(5435),j=c(5981),A=c(2660);let z=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var B;(B=this._onScrollApi)==null||B.fire(I.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(I){for(const B in I)this.optionsService.options[B]=I[B]}constructor(I){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(I)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(y.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(x.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(h.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 j.WriteBuffer(((B,G)=>this._inputHandler.parse(B,G)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,B){this._writeBuffer.write(I,B)}writeSync(I,B){this._logService.logLevel<=h.LogLevelEnum.WARN&&!z&&(this._logService.warn("writeSync is unreliable and will be removed soon."),z=!0),this._writeBuffer.writeSync(I,B)}input(I,B=!0){this.coreService.triggerDataEvent(I,B)}resize(I,B){isNaN(I)||isNaN(B)||(I=Math.max(I,m.MINIMUM_COLS),B=Math.max(B,m.MINIMUM_ROWS),this._bufferService.resize(I,B))}scroll(I,B=!1){this._bufferService.scroll(I,B)}scrollLines(I,B,G){this._bufferService.scrollLines(I,B,G)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const B=I-this._bufferService.buffer.ydisp;B!==0&&this.scrollLines(B)}registerEscHandler(I,B){return this._inputHandler.registerEscHandler(I,B)}registerDcsHandler(I,B){return this._inputHandler.registerDcsHandler(I,B)}registerCsiHandler(I,B){return this._inputHandler.registerCsiHandler(I,B)}registerOscHandler(I,B){return this._inputHandler.registerOscHandler(I,B)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const B=this.optionsService.rawOptions.windowsPty;B&&B.buildNumber!==void 0&&B.buildNumber!==void 0?I=B.backend==="conpty"&&B.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const B of I)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(h)))},o.runAndSubscribe=function(c,u){return u(void 0),c((h=>u(h)))}},5435:function(a,o,c){var u=this&&this.__decorate||function(J,$,L,q){var P,F=arguments.length,re=F<3?$:q===null?q=Object.getOwnPropertyDescriptor($,L):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(J,$,L,q);else for(var ie=J.length-1;ie>=0;ie--)(P=J[ie])&&(re=(F<3?P(re):F>3?P($,L,re):P($,L))||re);return F>3&&re&&Object.defineProperty($,L,re),re},h=this&&this.__param||function(J,$){return function(L,q){$(L,q,J)}};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),b=c(8460),y=c(643),x=c(511),C=c(3734),N=c(2585),j=c(1480),A=c(6242),z=c(6351),M=c(5941),D={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function B(J,$){if(J>24)return $.setWinLines||!1;switch(J){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 G;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(G||(o.WindowsOptionsReportType=G={}));let U=0;class Q extends w.Disposable{getAttrData(){return this._curAttrData}constructor($,L,q,P,F,re,ie,ue,se=new m.EscapeSequenceParser){super(),this._bufferService=$,this._charsetService=L,this._coreService=q,this._logService=P,this._optionsService=F,this._oscLinkService=re,this._coreMouseService=ie,this._unicodeService=ue,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new x.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 b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.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 V(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((K=>this._activeBuffer=K.activeBuffer))),this._parser.setCsiHandlerFallback(((K,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(K),params:oe.toArray()})})),this._parser.setEscHandlerFallback((K=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(K)})})),this._parser.setExecuteHandlerFallback((K=>{this._logService.debug("Unknown EXECUTE code: ",{code:K})})),this._parser.setOscHandlerFallback(((K,oe,ce)=>{this._logService.debug("Unknown OSC code: ",{identifier:K,action:oe,data:ce})})),this._parser.setDcsHandlerFallback(((K,oe,ce)=>{oe==="HOOK"&&(ce=ce.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(K),action:oe,payload:ce})})),this._parser.setPrintHandler(((K,oe,ce)=>this.print(K,oe,ce))),this._parser.registerCsiHandler({final:"@"},(K=>this.insertChars(K))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(K=>this.scrollLeft(K))),this._parser.registerCsiHandler({final:"A"},(K=>this.cursorUp(K))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(K=>this.scrollRight(K))),this._parser.registerCsiHandler({final:"B"},(K=>this.cursorDown(K))),this._parser.registerCsiHandler({final:"C"},(K=>this.cursorForward(K))),this._parser.registerCsiHandler({final:"D"},(K=>this.cursorBackward(K))),this._parser.registerCsiHandler({final:"E"},(K=>this.cursorNextLine(K))),this._parser.registerCsiHandler({final:"F"},(K=>this.cursorPrecedingLine(K))),this._parser.registerCsiHandler({final:"G"},(K=>this.cursorCharAbsolute(K))),this._parser.registerCsiHandler({final:"H"},(K=>this.cursorPosition(K))),this._parser.registerCsiHandler({final:"I"},(K=>this.cursorForwardTab(K))),this._parser.registerCsiHandler({final:"J"},(K=>this.eraseInDisplay(K,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(K=>this.eraseInDisplay(K,!0))),this._parser.registerCsiHandler({final:"K"},(K=>this.eraseInLine(K,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(K=>this.eraseInLine(K,!0))),this._parser.registerCsiHandler({final:"L"},(K=>this.insertLines(K))),this._parser.registerCsiHandler({final:"M"},(K=>this.deleteLines(K))),this._parser.registerCsiHandler({final:"P"},(K=>this.deleteChars(K))),this._parser.registerCsiHandler({final:"S"},(K=>this.scrollUp(K))),this._parser.registerCsiHandler({final:"T"},(K=>this.scrollDown(K))),this._parser.registerCsiHandler({final:"X"},(K=>this.eraseChars(K))),this._parser.registerCsiHandler({final:"Z"},(K=>this.cursorBackwardTab(K))),this._parser.registerCsiHandler({final:"`"},(K=>this.charPosAbsolute(K))),this._parser.registerCsiHandler({final:"a"},(K=>this.hPositionRelative(K))),this._parser.registerCsiHandler({final:"b"},(K=>this.repeatPrecedingCharacter(K))),this._parser.registerCsiHandler({final:"c"},(K=>this.sendDeviceAttributesPrimary(K))),this._parser.registerCsiHandler({prefix:">",final:"c"},(K=>this.sendDeviceAttributesSecondary(K))),this._parser.registerCsiHandler({final:"d"},(K=>this.linePosAbsolute(K))),this._parser.registerCsiHandler({final:"e"},(K=>this.vPositionRelative(K))),this._parser.registerCsiHandler({final:"f"},(K=>this.hVPosition(K))),this._parser.registerCsiHandler({final:"g"},(K=>this.tabClear(K))),this._parser.registerCsiHandler({final:"h"},(K=>this.setMode(K))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(K=>this.setModePrivate(K))),this._parser.registerCsiHandler({final:"l"},(K=>this.resetMode(K))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(K=>this.resetModePrivate(K))),this._parser.registerCsiHandler({final:"m"},(K=>this.charAttributes(K))),this._parser.registerCsiHandler({final:"n"},(K=>this.deviceStatus(K))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(K=>this.deviceStatusPrivate(K))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(K=>this.softReset(K))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(K=>this.setCursorStyle(K))),this._parser.registerCsiHandler({final:"r"},(K=>this.setScrollRegion(K))),this._parser.registerCsiHandler({final:"s"},(K=>this.saveCursor(K))),this._parser.registerCsiHandler({final:"t"},(K=>this.windowOptions(K))),this._parser.registerCsiHandler({final:"u"},(K=>this.restoreCursor(K))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(K=>this.insertColumns(K))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(K=>this.deleteColumns(K))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(K=>this.selectProtected(K))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(K=>this.requestMode(K,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(K=>this.requestMode(K,!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((K=>(this.setTitle(K),this.setIconName(K),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((K=>this.setIconName(K)))),this._parser.registerOscHandler(2,new A.OscHandler((K=>this.setTitle(K)))),this._parser.registerOscHandler(4,new A.OscHandler((K=>this.setOrReportIndexedColor(K)))),this._parser.registerOscHandler(8,new A.OscHandler((K=>this.setHyperlink(K)))),this._parser.registerOscHandler(10,new A.OscHandler((K=>this.setOrReportFgColor(K)))),this._parser.registerOscHandler(11,new A.OscHandler((K=>this.setOrReportBgColor(K)))),this._parser.registerOscHandler(12,new A.OscHandler((K=>this.setOrReportCursorColor(K)))),this._parser.registerOscHandler(104,new A.OscHandler((K=>this.restoreIndexedColor(K)))),this._parser.registerOscHandler(110,new A.OscHandler((K=>this.restoreFgColor(K)))),this._parser.registerOscHandler(111,new A.OscHandler((K=>this.restoreBgColor(K)))),this._parser.registerOscHandler(112,new A.OscHandler((K=>this.restoreCursorColor(K)))),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 K in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:K},(()=>this.selectCharset("("+K))),this._parser.registerEscHandler({intermediates:")",final:K},(()=>this.selectCharset(")"+K))),this._parser.registerEscHandler({intermediates:"*",final:K},(()=>this.selectCharset("*"+K))),this._parser.registerEscHandler({intermediates:"+",final:K},(()=>this.selectCharset("+"+K))),this._parser.registerEscHandler({intermediates:"-",final:K},(()=>this.selectCharset("-"+K))),this._parser.registerEscHandler({intermediates:".",final:K},(()=>this.selectCharset("."+K))),this._parser.registerEscHandler({intermediates:"/",final:K},(()=>this.selectCharset("/"+K)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((K=>(this._logService.error("Parsing error: ",K),K))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new z.DcsHandler(((K,oe)=>this.requestStatusString(K,oe))))}_preserveStack($,L,q,P){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=q,this._parseStack.position=P}_logSlowResolvingAsync($){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([$,new Promise(((L,q)=>setTimeout((()=>q("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse($,L){let q,P=this._activeBuffer.x,F=this._activeBuffer.y,re=0;const ie=this._parseStack.paused;if(ie){if(q=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(q),q;P=this._parseStack.cursorStartX,F=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>I&&(re=this._parseStack.position+I)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?` "${$}"`:` "${Array.prototype.map.call($,(K=>String.fromCharCode(K))).join("")}"`),typeof $=="string"?$.split("").map((K=>K.charCodeAt(0))):$),this._parseBuffer.length<$.length&&this._parseBuffer.lengthI)for(let K=re;K<$.length;K+=I){const oe=K+I<$.length?K+I:$.length,ce=typeof $=="string"?this._stringDecoder.decode($.substring(K,oe),this._parseBuffer):this._utf8Decoder.decode($.subarray(K,oe),this._parseBuffer);if(q=this._parser.parse(this._parseBuffer,ce))return this._preserveStack(P,F,ce,K),this._logSlowResolvingAsync(q),q}else if(!ie){const K=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer);if(q=this._parser.parse(this._parseBuffer,K))return this._preserveStack(P,F,K,0),this._logSlowResolvingAsync(q),q}this._activeBuffer.x===P&&this._activeBuffer.y===F||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),se=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);se0&&ce.getWidth(this._activeBuffer.x-1)===2&&ce.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let pe=this._parser.precedingJoinState;for(let ve=L;veue){if(se){const Te=ce;let $e=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),ce=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ye>0&&ce instanceof v.BufferLine&&ce.copyCellsFrom(Te,$e,0,Ye,!1);$e=0;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(K&&(ce.insertCells(this._activeBuffer.x,F-Ye,this._activeBuffer.getNullCell(oe)),ce.getWidth(ue-1)===2&&ce.setCellFromCodepoint(ue-1,y.NULL_CELL_CODE,y.NULL_CELL_WIDTH,oe)),ce.setCellFromCodepoint(this._activeBuffer.x++,P,F,oe),F>0)for(;--F;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=pe,this._activeBuffer.x0&&ce.getWidth(this._activeBuffer.x)===0&&!ce.hasContent(this._activeBuffer.x)&&ce.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler($,L){return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,L):this._parser.registerCsiHandler($,(q=>!B(q.params[0],this._optionsService.rawOptions.windowOptions)||L(q)))}registerDcsHandler($,L){return this._parser.registerDcsHandler($,new z.DcsHandler(L))}registerEscHandler($,L){return this._parser.registerEscHandler($,L)}registerOscHandler($,L){return this._parser.registerOscHandler($,new A.OscHandler(L))}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 L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.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($,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=$,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=$,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor($,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+$,this._activeBuffer.y+L)}cursorUp($){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,$.params[0]||1)):this._moveCursor(0,-($.params[0]||1)),!0}cursorDown($){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,$.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 L=$.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected($){const L=$.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine($,L,q,P=!1,F=!1){const re=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);re.replaceCells(L,q,this._activeBuffer.getNullCell(this._eraseAttrData()),F),P&&(re.isWrapped=!1)}_resetBufferLine($,L=!1){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);q&&(q.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+$),q.isWrapped=!1)}eraseInDisplay($,L=!1){let q;switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:for(q=this._activeBuffer.y,this._dirtyRowTracker.markDirty(q),this._eraseInBufferLine(q++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);q=this._bufferService.cols&&(this._activeBuffer.lines.get(q+1).isWrapped=!1);q--;)this._resetBufferLine(q,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(q=this._bufferService.rows,this._dirtyRowTracker.markDirty(q-1);q--;)this._resetBufferLine(q,L);this._dirtyRowTracker.markDirty(0);break;case 3:const P=this._activeBuffer.lines.length-this._bufferService.rows;P>0&&(this._activeBuffer.lines.trimStart(P),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-P,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-P,0),this._onScroll.fire(0))}return!0}eraseInLine($,L=!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,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines($){this._restrictCursor();let L=$.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 se=ue;for(let K=1;K0||(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 L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){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 L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){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[L]===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($,L){const q=this._coreService.decPrivateModes,{activeProtocol:P,activeEncoding:F}=this._coreMouseService,re=this._coreService,{buffers:ie,cols:ue}=this._bufferService,{active:se,alt:K}=ie,oe=this._optionsService.rawOptions,ce=Fe=>Fe?1:2,pe=$.params[0];return ve=pe,Me=L?pe===2?4:pe===4?ce(re.modes.insertMode):pe===12?3:pe===20?ce(oe.convertEol):0:pe===1?ce(q.applicationCursorKeys):pe===3?oe.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:pe===6?ce(q.origin):pe===7?ce(q.wraparound):pe===8?3:pe===9?ce(P==="X10"):pe===12?ce(oe.cursorBlink):pe===25?ce(!re.isCursorHidden):pe===45?ce(q.reverseWraparound):pe===66?ce(q.applicationKeypad):pe===67?4:pe===1e3?ce(P==="VT200"):pe===1002?ce(P==="DRAG"):pe===1003?ce(P==="ANY"):pe===1004?ce(q.sendFocus):pe===1005?4:pe===1006?ce(F==="SGR"):pe===1015?4:pe===1016?ce(F==="SGR_PIXELS"):pe===1048?1:pe===47||pe===1047||pe===1049?ce(se===K):pe===2004?ce(q.bracketedPasteMode):0,re.triggerDataEvent(`${f.C0.ESC}[${L?"":"?"}${ve};${Me}$y`),!0;var ve,Me}_updateAttrColor($,L,q,P,F){return L===2?($|=50331648,$&=-16777216,$|=C.AttributeData.fromColorRGB([q,P,F])):L===5&&($&=-50331904,$|=33554432|255&q),$}_extractColor($,L,q){const P=[0,0,-1,0,0,0];let F=0,re=0;do{if(P[re+F]=$.params[L+re],$.hasSubParams(L+re)){const ie=$.getSubParams(L+re);let ue=0;do P[1]===5&&(F=1),P[re+ue+1+F]=ie[ue];while(++ue=2||P[1]===2&&re+F>=5)break;P[1]&&(F=1)}while(++re+L<$.length&&re+F5)&&($=1),L.extended.underlineStyle=$,L.fg|=268435456,$===0&&(L.fg&=-268435457),L.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 L=$.length;let q;const P=this._curAttrData;for(let F=0;F=30&&q<=37?(P.fg&=-50331904,P.fg|=16777216|q-30):q>=40&&q<=47?(P.bg&=-50331904,P.bg|=16777216|q-40):q>=90&&q<=97?(P.fg&=-50331904,P.fg|=16777224|q-90):q>=100&&q<=107?(P.bg&=-50331904,P.bg|=16777224|q-100):q===0?this._processSGR0(P):q===1?P.fg|=134217728:q===3?P.bg|=67108864:q===4?(P.fg|=268435456,this._processUnderline($.hasSubParams(F)?$.getSubParams(F)[0]:1,P)):q===5?P.fg|=536870912:q===7?P.fg|=67108864:q===8?P.fg|=1073741824:q===9?P.fg|=2147483648:q===2?P.bg|=134217728:q===21?this._processUnderline(2,P):q===22?(P.fg&=-134217729,P.bg&=-134217729):q===23?P.bg&=-67108865:q===24?(P.fg&=-268435457,this._processUnderline(0,P)):q===25?P.fg&=-536870913:q===27?P.fg&=-67108865:q===28?P.fg&=-1073741825:q===29?P.fg&=2147483647:q===39?(P.fg&=-67108864,P.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):q===49?(P.bg&=-67108864,P.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):q===38||q===48||q===58?F+=this._extractColor($,F,P):q===53?P.bg|=1073741824:q===55?P.bg&=-1073741825:q===59?(P.extended=P.extended.clone(),P.extended.underlineColor=-1,P.updateExtended()):q===100?(P.fg&=-67108864,P.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,P.bg&=-67108864,P.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",q);return!0}deviceStatus($){switch($.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,q=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${L};${q}R`)}return!0}deviceStatusPrivate($){if($.params[0]===6){const L=this._activeBuffer.y+1,q=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${L};${q}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 L=$.params[0]||1;switch(L){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 q=L%2==1;return this._optionsService.options.cursorBlink=q,!0}setScrollRegion($){const L=$.params[0]||1;let q;return($.length<2||(q=$.params[1])>this._bufferService.rows||q===0)&&(q=this._bufferService.rows),q>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=q-1,this._setCursor(0,0)),!0}windowOptions($){if(!B($.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=$.length>1?$.params[1]:0;switch($.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(G.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(G.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:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==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 L=[],q=$.split(";");for(;q.length>1;){const P=q.shift(),F=q.shift();if(/^\d+$/.exec(P)){const re=parseInt(P);if(Z(re))if(F==="?")L.push({type:0,index:re});else{const ie=(0,M.parseColor)(F);ie&&L.push({type:1,index:re,color:ie})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink($){const L=$.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink($,L){this._getCurrentLinkId()&&this._finishHyperlink();const q=$.split(":");let P;const F=q.findIndex((re=>re.startsWith("id=")));return F!==-1&&(P=q[F].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:P,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor($,L){const q=$.split(";");for(let P=0;P=this._specialColors.length);++P,++L)if(q[P]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const F=(0,M.parseColor)(q[P]);F&&this._onColor.fire([{type:1,index:this._specialColors[L],color:F}])}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 L=[],q=$.split(";");for(let P=0;P=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 x.CellData;$.content=4194373,$.fg=this._curAttrData.fg,$.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${f.C0.ESC}${F}${f.C0.ESC}\\`),!0))($==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:$==='"p'?'P1$r61;1"p':$==="r"?`P1$r${q.scrollTop+1};${q.scrollBottom+1}r`:$==="m"?"P1$r0m":$===" q"?`P1$r${{block:2,underline:4,bar:6}[P.cursorStyle]-(P.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty($,L){this._dirtyRowTracker.markRangeDirty($,L)}}o.InputHandler=Q;let V=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){Jthis.end&&(this.end=J)}markRangeDirty(J,$){J>$&&(U=J,J=$,$=U),Jthis.end&&(this.end=$)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(J){return 0<=J&&J<256}V=u([h(0,N.IBufferService)],V)},844:(a,o)=>{function c(u){for(const h of u)h.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 h=this._disposables.indexOf(u);h!==-1&&this._disposables.splice(h,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var h;this._isDisposed||u===this._value||((h=this._value)==null||h.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(h,f,p){this._data[h]||(this._data[h]={}),this._data[h][f]=p}get(h,f){return this._data[h]?this._data[h][f]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(u,h,f,p,m){this._data.get(u,h)||this._data.set(u,h,new c),this._data.get(u,h).set(f,p,m)}get(u,h,f,p){var m;return(m=this._data.get(u,h))==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 h=c.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[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 h=this._getKey(u);if(h===void 0||(c=this._search(h),c===-1)||this._getKey(this._array[c])!==h)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 h(this._array[c]);while(++c=h;){let p=h+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}h=p+1}}return h}}},7226:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=c(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-w))}ms`),void this._start();v=b}this.clear()}}class f extends h{_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 h{_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(h){const f=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),p=f==null?void 0:f.get(h.cols-1),m=h.buffer.lines.get(h.buffer.ybase+h.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),h=c(7226),f=c(3734),p=c(8437),m=c(4634),w=c(511),k=c(643),v=c(4863),b=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(y,x,C){this._hasScrollback=y,this._optionsService=x,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=b.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 h.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(y){return y?(this._nullCell.fg=y.fg,this._nullCell.bg=y.bg,this._nullCell.extended=y.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(y){return y?(this._whitespaceCell.fg=y.fg,this._whitespaceCell.bg=y.bg,this._whitespaceCell.extended=y.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(y,x){return new p.BufferLine(this._bufferService.cols,this.getNullCell(y),x)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const y=this.ybase+this.y-this.ydisp;return y>=0&&yo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:x}fillViewportRows(y){if(this.lines.length===0){y===void 0&&(y=p.DEFAULT_ATTR_DATA);let x=this._rows;for(;x--;)this.lines.push(this.getBlankLine(y))}}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(y,x){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const j=this._getCorrectBufferLength(x);if(j>this.lines.maxLength&&(this.lines.maxLength=j),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(y,C)));else for(let z=this._rows;z>x;z--)this.lines.length>x+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(j0&&(this.lines.trimStart(z),this.ybase=Math.max(this.ybase-z,0),this.ydisp=Math.max(this.ydisp-z,0),this.savedY=Math.max(this.savedY-z,0)),this.lines.maxLength=j}this.x=Math.min(this.x,y-1),this.y=Math.min(this.y,x-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,y-1),this.scrollTop=0}if(this.scrollBottom=x-1,this._isReflowEnabled&&(this._reflow(y,x),this._cols>y))for(let A=0;A.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let y=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,y=!1);let x=0;for(;this._memoryCleanupPosition100)return!0;return y}get _isReflowEnabled(){const y=this._optionsService.rawOptions.windowsPty;return y&&y.buildNumber?this._hasScrollback&&y.backend==="conpty"&&y.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(y,x){this._cols!==y&&(y>this._cols?this._reflowLarger(y,x):this._reflowSmaller(y,x))}_reflowLarger(y,x){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,y,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(y,x,N.countRemoved)}}_reflowLargerAdjustViewport(y,x,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let j=C;for(;j-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;A--){let z=this.lines.get(A);if(!z||!z.isWrapped&&z.getTrimmedLength()<=y)continue;const M=[z];for(;z.isWrapped&&A>0;)z=this.lines.get(--A),M.unshift(z);const D=this.ybase+this.y;if(D>=A&&D0&&(N.push({start:A+M.length+j,newLines:Q}),j+=Q.length),M.push(...Q);let V=B.length-1,Z=B[V];Z===0&&(V--,Z=B[V]);let J=M.length-G-1,$=I;for(;J>=0;){const q=Math.min($,Z);if(M[V]===void 0)break;if(M[V].copyCellsFrom(M[J],$-q,Z-q,q,!0),Z-=q,Z===0&&(V--,Z=B[V]),$-=q,$===0){J--;const P=Math.max(J,0);$=(0,m.getWrappedLineTrimmedLength)(M,P,this._cols)}}for(let q=0;q0;)this.ybase===0?this.y0){const A=[],z=[];for(let V=0;V=0;V--)if(B&&B.start>D+G){for(let Z=B.newLines.length-1;Z>=0;Z--)this.lines.set(V--,B.newLines[Z]);V++,A.push({index:D+1,amount:B.newLines.length}),G+=B.newLines.length,B=N[++I]}else this.lines.set(V,z[D--]);let U=0;for(let V=A.length-1;V>=0;V--)A[V].index+=U,this.lines.onInsertEmitter.fire(A[V]),U+=A[V].amount;const Q=Math.max(0,M+j-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(y,x,C=0,N){const j=this.lines.get(y);return j?j.translateToString(x,C,N):""}getWrappedRangeForLine(y){let x=y,C=y;for(;x>0&&this.lines.get(x).isWrapped;)x--;for(;C+10;);return y>=this._cols?this._cols-1:y<0?0:y}nextStop(y){for(y==null&&(y=this.x);!this.tabs[++y]&&y=this._cols?this._cols-1:y<0?0:y}clearMarkers(y){this._isClearing=!0;for(let x=0;x{x.line-=C,x.line<0&&x.dispose()}))),x.register(this.lines.onInsert((C=>{x.line>=C.index&&(x.line+=C.amount)}))),x.register(this.lines.onDelete((C=>{x.line>=C.index&&x.lineC.index&&(x.line-=C.amount)}))),x.register(x.onDispose((()=>this._removeMarker(x)))),x}_removeMarker(y){this._isClearing||this.markers.splice(this.markers.indexOf(y),1)}}},8437:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=c(3734),h=c(511),f=c(643),p=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class w{constructor(v,b,y=!1){this.isWrapped=y,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const x=b||h.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let C=0;C>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):y]}set(v,b){this._data[3*v+1]=b[f.CHAR_DATA_ATTR_INDEX],b[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[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 b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,y,x){268435456&x.bg&&(this._extendedAttrs[v]=x.extended),this._data[3*v+0]=b|y<<22,this._data[3*v+1]=x.fg,this._data[3*v+2]=x.bg}addCodepointToCell(v,b,y){let x=this._data[3*v+0];2097152&x?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&x?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&x)+(0,p.stringFromCodePoint)(b),x&=-2097152,x|=2097152):x=b|4194304,y&&(x&=-12582913,x|=y<<22),this._data[3*v+0]=x}insertCells(v,b,y){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,y),b=0;--C)this.setCell(v+b+C,this.loadCell(v+C,x));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*y)this._data=new Uint32Array(this._data.buffer,0,y);else{const x=new Uint32Array(y);x.set(this._data),this._data=x}for(let x=this.length;x=v&&delete this._combined[j]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=v&&delete this._extendedAttrs[j]}}return this.length=v,4*y*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,b,y,x,C){const N=v._data;if(C)for(let A=x-1;A>=0;A--){for(let z=0;z<3;z++)this._data[3*(y+A)+z]=N[3*(b+A)+z];268435456&N[3*(b+A)+2]&&(this._extendedAttrs[y+A]=v._extendedAttrs[b+A])}else for(let A=0;A=b&&(this._combined[z-b+y]=v._combined[z])}}translateToString(v,b,y,x){b=b??0,y=y??this.length,v&&(y=Math.min(y,this.getTrimmedLength())),x&&(x.length=0);let C="";for(;b>22||1}return x&&x.push(b),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,h,f){if(h===u.length-1)return u[h].getTrimmedLength();const p=!u[h].hasContent(f-1)&&u[h].getWidth(f-1)===1,m=u[h+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,h,f,p,m){const w=[];for(let k=0;k=k&&p0&&(z>x||y[z].getTrimmedLength()===0);z--)A++;A>0&&(w.push(k+y.length-A),w.push(A)),k+=y.length-1}return w},o.reflowLargerCreateNewLayout=function(u,h){const f=[];let p=0,m=h[p],w=0;for(let k=0;kc(u,y,h))).reduce(((b,y)=>b+y));let w=0,k=0,v=0;for(;vb&&(w-=b,k++);const y=u[k].getWidth(w-1)===2;y&&w--;const x=y?f-1:f;p.push(x),v+=x}return p},o.getWrappedLineTrimmedLength=c},5295:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=c(8460),h=c(844),f=c(9092);class p extends h.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),h=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[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(w[h.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(w[h.CHAR_DATA_CHAR_INDEX].length===2){const v=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|w[h.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[h.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=w[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[h.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),h=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,h.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,h;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}\\`})(h||(o.C1_ESCAPED=h={}))},7399:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const u=c(2584),h={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 b=h[f.keyCode],y=b==null?void 0:b[f.shiftKey?1:0];if(y)k.key=u.C0.ESC+y;else if(f.keyCode>=65&&f.keyCode<=90){const x=f.ctrlKey?f.keyCode-64:f.keyCode+32;let C=String.fromCharCode(x);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 x=f.code.slice(3,4);f.shiftKey||(x=x.toLowerCase()),k.key=u.C0.ESC+x,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,h=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 h=c.length;if(!h)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=h)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 h=c.length;if(!h)return 0;let f,p,m,w,k=0,v=0,b=0;if(this.interim[0]){let C=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let j,A=0;for(;(j=63&this.interim[++A])&&A<4;)N<<=6,N|=j;const z=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=z-A;for(;b=h)return 0;if(j=c[b++],(192&j)!=128){b--,C=!0;break}this.interim[A++]=j,N<<=6,N|=63&j}C||(z===2?N<128?b--:u[k++]=N:z===3?N<2048||N>=55296&&N<=57343||N===65279||(u[k++]=N):N<65536||N>1114111||(u[k++]=N)),this.interim.fill(0)}const y=h-4;let x=b;for(;x=h)return this.interim[0]=f,k;if(p=c[x++],(192&p)!=128){x--;continue}if(v=(31&f)<<6|63&p,v<128){x--;continue}u[k++]=v}else if((240&f)==224){if(x>=h)return this.interim[0]=f,k;if(p=c[x++],(192&p)!=128){x--;continue}if(x>=h)return this.interim[0]=f,this.interim[1]=p,k;if(m=c[x++],(192&m)!=128){x--;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(x>=h)return this.interim[0]=f,k;if(p=c[x++],(192&p)!=128){x--;continue}if(x>=h)return this.interim[0]=f,this.interim[1]=p,k;if(m=c[x++],(192&m)!=128){x--;continue}if(x>=h)return this.interim[0]=f,this.interim[1]=p,this.interim[2]=m,k;if(w=c[x++],(192&w)!=128){x--;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),h=[[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[y][1])return!1;for(;y>=b;)if(v=b+y>>1,w>k[v][1])b=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 b=u.UnicodeService.extractWidth(w);b===0?v=!1:b>k&&(k=b)}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),h=c(844);class f extends h.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],b=this._action(v,w);if(b){const x=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void b.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(x)}const y=this._callbacks[this._bufferOffset];if(y&&y(),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 h(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:${h(m,p)}/${h(w,p)}/${h(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),h=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 b=v.indexOf(k);b!==-1&&v.splice(b,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 b=this._active.length-1;b>=0;b--)this._active[b].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,b=this._active.length-1,y=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=k,y=this._stack.fallThrough,this._stack.paused=!1),!y&&v===!1){for(;b>=0&&(v=this._active[b].unhook(w),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",w);this._active=p,this._ident=0}};const m=new h.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),h=c(8742),f=c(6242),p=c(6351);class m{constructor(b){this.table=new Uint8Array(b)}setDefault(b,y){this.table.fill(b<<4|y)}add(b,y,x,C){this.table[y<<8|b]=x<<4|C}addMany(b,y,x,C){for(let N=0;Nz)),y=(A,z)=>b.slice(A,z),x=y(32,127),C=y(0,24);C.push(25),C.push.apply(C,y(28,32));const N=y(0,14);let j;for(j in v.setDefault(1,0),v.addMany(x,0,2,0),N)v.addMany([24,26,153,154],j,3,0),v.addMany(y(128,144),j,3,0),v.addMany(y(144,152),j,3,0),v.add(156,j,0,0),v.add(27,j,11,1),v.add(157,j,4,8),v.addMany([152,158,159],j,0,7),v.add(155,j,11,3),v.add(144,j,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(x,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(y(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(x,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(y(64,127),3,7,0),v.addMany(y(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(y(48,60),4,8,4),v.addMany(y(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(y(32,64),6,0,6),v.add(127,6,0,6),v.addMany(y(64,127),6,0,0),v.addMany(y(32,48),3,9,5),v.addMany(y(32,48),5,9,5),v.addMany(y(48,64),5,0,6),v.addMany(y(64,127),5,7,0),v.addMany(y(32,48),4,9,5),v.addMany(y(32,48),1,9,2),v.addMany(y(32,48),2,9,2),v.addMany(y(48,127),2,10,0),v.addMany(y(48,80),1,10,0),v.addMany(y(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(y(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(y(28,32),9,0,9),v.addMany(y(32,48),9,9,12),v.addMany(y(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(C,11,0,11),v.addMany(y(32,128),11,0,11),v.addMany(y(28,32),11,0,11),v.addMany(C,10,0,10),v.add(127,10,0,10),v.addMany(y(28,32),10,0,10),v.addMany(y(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(y(32,48),10,9,12),v.addMany(C,12,0,12),v.add(127,12,0,12),v.addMany(y(28,32),12,0,12),v.addMany(y(32,48),12,9,12),v.addMany(y(48,64),12,0,11),v.addMany(y(64,127),12,12,13),v.addMany(y(64,127),10,12,13),v.addMany(y(64,127),9,12,13),v.addMany(C,13,13,13),v.addMany(x,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(b=o.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new h.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(y,x,C)=>{},this._executeHandlerFb=y=>{},this._csiHandlerFb=(y,x)=>{},this._escHandlerFb=y=>{},this._errorHandlerFb=y=>y,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(b,y=[64,126]){let x=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(x=b.prefix.charCodeAt(0),x&&60>x||x>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;Nj||j>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");x<<=8,x|=j}}if(b.final.length!==1)throw new Error("final must be a single byte");const C=b.final.charCodeAt(0);if(y[0]>C||C>y[1])throw new Error(`final must be in range ${y[0]} .. ${y[1]}`);return x<<=8,x|=C,x}identToString(b){const y=[];for(;b;)y.push(String.fromCharCode(255&b)),b>>=8;return y.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,y){const x=this._identifier(b,[48,126]);this._escHandlers[x]===void 0&&(this._escHandlers[x]=[]);const C=this._escHandlers[x];return C.push(y),{dispose:()=>{const N=C.indexOf(y);N!==-1&&C.splice(N,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,y){this._executeHandlers[b.charCodeAt(0)]=y}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,y){const x=this._identifier(b);this._csiHandlers[x]===void 0&&(this._csiHandlers[x]=[]);const C=this._csiHandlers[x];return C.push(y),{dispose:()=>{const N=C.indexOf(y);N!==-1&&C.splice(N,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,y){return this._dcsParser.registerHandler(this._identifier(b),y)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,y){return this._oscParser.registerHandler(b,y)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}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(b,y,x,C,N){this._parseStack.state=b,this._parseStack.handlers=y,this._parseStack.handlerPos=x,this._parseStack.transition=C,this._parseStack.chunkPos=N}parse(b,y,x){let C,N=0,j=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(x===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const z=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(x===!1&&M>-1){for(;M>=0&&(C=z[M](this._params),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 4:if(x===!1&&M>-1){for(;M>=0&&(C=z[M](),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 6:if(N=b[this._parseStack.chunkPos],C=this._dcsParser.unhook(N!==24&&N!==26,x),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=b[this._parseStack.chunkPos],C=this._oscParser.end(N!==24&&N!==26,x),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 z=A;z>4){case 2:for(let G=z+1;;++G){if(G>=y||(N=b[G])<32||N>126&&N=y||(N=b[G])<32||N>126&&N=y||(N=b[G])<32||N>126&&N=y||(N=b[G])<32||N>126&&N=0&&(C=M[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._preserveStack(3,M,D,j,z),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(++z47&&N<60);z--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const I=this._escHandlers[this._collect<<8|N];let B=I?I.length-1:-1;for(;B>=0&&(C=I[B](),C!==!0);B--)if(C instanceof Promise)return this._preserveStack(4,I,B,j,z),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 G=z+1;;++G)if(G>=y||(N=b[G])===24||N===26||N===27||N>127&&N=y||(N=b[G])<32||N>127&&N{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const u=c(5770),h=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,h.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,h.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 h={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(h),u.dispose=()=>this._wrappedAddonDispose(h),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let h=0;h{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const u=c(3785),h=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 h.CellData}}},3785:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const u=c(511);o.BufferLineApiView=class{constructor(h){this._line=h}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(h,f){if(!(h<0||h>=this._line.length))return f?(this._line.loadCell(h,f),f):this._line.loadCell(h,new u.CellData)}translateToString(h,f,p){return this._line.translateToString(h,f,p)}}},8285:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const u=c(8771),h=c(8460),f=c(844);class p extends f.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new h.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,(h=>u(h.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((h,f)=>u(h,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,b,y,x){var C,N=arguments.length,j=N<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,b,y,x);else for(var A=v.length-1;A>=0;A--)(C=v[A])&&(j=(N<3?C(j):N>3?C(b,y,j):C(b,y))||j);return N>3&&j&&Object.defineProperty(b,y,j),j},h=this&&this.__param||function(v,b){return function(y,x){b(y,x,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,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const y=this.buffer;let x;x=this._cachedBlankLine,x&&x.length===this.cols&&x.getFg(0)===v.fg&&x.getBg(0)===v.bg||(x=y.getBlankLine(v,b),this._cachedBlankLine=x),x.isWrapped=b;const C=y.ybase+y.scrollTop,N=y.ybase+y.scrollBottom;if(y.scrollTop===0){const j=y.lines.isFull;N===y.lines.length-1?j?y.lines.recycle().copyFrom(x):y.lines.push(x.clone()):y.lines.splice(N+1,0,x.clone()),j?this.isUserScrolling&&(y.ydisp=Math.max(y.ydisp-1,0)):(y.ybase++,this.isUserScrolling||y.ydisp++)}else{const j=N-C+1;y.lines.shiftElements(C+1,j-1,-1),y.lines.set(N,x.clone())}this.isUserScrolling||(y.ydisp=y.ybase),this._onScroll.fire(y.ydisp)}scrollLines(v,b,y){const x=this.buffer;if(v<0){if(x.ydisp===0)return;this.isUserScrolling=!0}else v+x.ydisp>=x.ybase&&(this.isUserScrolling=!1);const C=x.ydisp;x.ydisp=Math.max(Math.min(x.ydisp+v,x.ybase),0),C!==x.ydisp&&(b||this._onScroll.fire(x.ydisp))}};o.BufferService=k=u([h(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(x,C,N,j){var A,z=arguments.length,M=z<3?C:j===null?j=Object.getOwnPropertyDescriptor(C,N):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,C,N,j);else for(var D=x.length-1;D>=0;D--)(A=x[D])&&(M=(z<3?A(M):z>3?A(C,N,M):A(C,N))||M);return z>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(x,C){return function(N,j){C(N,j,x)}};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:x=>x.button!==4&&x.action===1&&(x.ctrl=!1,x.alt=!1,x.shift=!1,!0)},VT200:{events:19,restrict:x=>x.action!==32},DRAG:{events:23,restrict:x=>x.action!==32||x.button!==3},ANY:{events:31,restrict:x=>!0}};function k(x,C){let N=(x.ctrl?16:0)|(x.shift?4:0)|(x.alt?8:0);return x.button===4?(N|=64,N|=x.action):(N|=3&x.button,4&x.button&&(N|=64),8&x.button&&(N|=128),x.action===32?N|=32:x.action!==0||C||(N|=3)),N}const v=String.fromCharCode,b={DEFAULT:x=>{const C=[k(x,!1)+32,x.col+32,x.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${v(C[0])}${v(C[1])}${v(C[2])}`},SGR:x=>{const C=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${k(x,!0)};${x.col};${x.row}${C}`},SGR_PIXELS:x=>{const C=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${k(x,!0)};${x.x};${x.y}${C}`}};let y=o.CoreMouseService=class extends m.Disposable{constructor(x,C){super(),this._bufferService=x,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(b))this.addEncoding(N,b[N]);this.reset()}addProtocol(x,C){this._protocols[x]=C}addEncoding(x,C){this._encodings[x]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(x){if(!this._protocols[x])throw new Error(`unknown protocol "${x}"`);this._activeProtocol=x,this._onProtocolChange.fire(this._protocols[x].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(x){if(!this._encodings[x])throw new Error(`unknown encoding "${x}"`);this._activeEncoding=x}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(x){if(x.col<0||x.col>=this._bufferService.cols||x.row<0||x.row>=this._bufferService.rows||x.button===4&&x.action===32||x.button===3&&x.action!==32||x.button!==4&&(x.action===2||x.action===3)||(x.col++,x.row++,x.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,x,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(x))return!1;const C=this._encodings[this._activeEncoding](x);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=x,!0}explainEvents(x){return{down:!!(1&x),up:!!(2&x),drag:!!(4&x),move:!!(8&x),wheel:!!(16&x)}}_equalEvents(x,C,N){if(N){if(x.x!==C.x||x.y!==C.y)return!1}else if(x.col!==C.col||x.row!==C.row)return!1;return x.button===C.button&&x.action===C.action&&x.ctrl===C.ctrl&&x.alt===C.alt&&x.shift===C.shift}};o.CoreMouseService=y=u([h(0,f.IBufferService),h(1,f.ICoreService)],y)},6975:function(a,o,c){var u=this&&this.__decorate||function(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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 b=o.CoreService=class extends m.Disposable{constructor(y,x,C){super(),this._bufferService=y,this._logService=x,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(y,x=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;x&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),x&&this._onUserInput.fire(),this._logService.debug(`sending data "${y}"`,(()=>y.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(y)}triggerBinaryEvent(y){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${y}"`,(()=>y.split("").map((x=>x.charCodeAt(0))))),this._onBinary.fire(y))}};o.CoreService=b=u([h(0,w.IBufferService),h(1,w.ILogService),h(2,w.IOptionsService)],b)},9074:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const u=c(8055),h=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((y=>y==null?void 0:y.marker.line)),this._onDecorationRegistered=this.register(new h.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new h.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(y){if(y.marker.isDisposed)return;const x=new v(y);if(x){const C=x.marker.onDispose((()=>x.dispose()));x.onDispose((()=>{x&&(this._decorations.delete(x)&&this._onDecorationRemoved.fire(x),C.dispose())})),this._decorations.insert(x),this._onDecorationRegistered.fire(x)}return x}reset(){for(const y of this._decorations.values())y.dispose();this._decorations.clear()}*getDecorationsAtCell(y,x,C){let N=0,j=0;for(const A of this._decorations.getKeyIterator(x))N=A.options.x??0,j=N+(A.options.width??1),y>=N&&y{m=j.options.x??0,w=m+(j.options.width??1),y>=m&&y{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const u=c(2585),h=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,h.getServiceDependencies)(p).sort(((b,y)=>b.index-y.index)),k=[];for(const b of w){const y=this._services.get(b.id);if(!y)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${b.id}.`);k.push(y)}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,b,y,x){var C,N=arguments.length,j=N<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,b,y,x);else for(var A=v.length-1;A>=0;A--)(C=v[A])&&(j=(N<3?C(j):N>3?C(b,y,j):C(b,y))||j);return N>3&&j&&Object.defineProperty(b,y,j),j},h=this&&this.__param||function(v,b){return function(y,x){b(y,x,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 b=0;bJSON.stringify(j))).join(", ")})`);const N=x.apply(this,C);return w.trace(`GlyphRenderer#${x.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),h=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 h.Disposable{constructor(k){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...o.DEFAULT_OPTIONS};for(const b in k)if(b in v)try{const y=k[b];v[b]=this._sanitizeAndValidateOption(b,y)}catch(y){console.error(y)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,h.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,v){return this.onOptionChange((b=>{b===k&&v(this.rawOptions[k])}))}onMultipleOptionChange(k,v){return this.onOptionChange((b=>{k.indexOf(b)!==-1&&v()}))}_setupOptions(){const k=b=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(b,y)=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);y=this._sanitizeAndValidateOption(b,y),this.rawOptions[b]!==y&&(this.rawOptions[b]=y,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const y={get:k.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,y)}}_sanitizeAndValidateOption(k,v){switch(k){case"cursorStyle":if(v||(v=o.DEFAULT_OPTIONS[k]),!(function(b){return b==="block"||b==="underline"||b==="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 b,y=arguments.length,x=y<3?w:v===null?v=Object.getOwnPropertyDescriptor(w,k):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(m,w,k,v);else for(var C=m.length-1;C>=0;C--)(b=m[C])&&(x=(y<3?b(x):y>3?b(w,k,x):b(w,k))||x);return y>3&&x&&Object.defineProperty(w,k,x),x},h=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),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,w.ybase+w.y),b.id;const y=w.addMarker(w.ybase+w.y),x={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[y]};return y.onDispose((()=>this._removeMarkerFromLink(x,y))),this._entriesWithId.set(x.key,x),this._dataByLinkId.set(x.id,x),x.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([h(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(h){return h[u]||[]},o.createDecorator=function(h){if(o.serviceRegistry.has(h))return o.serviceRegistry.get(h);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,b){v[c]===v?v[u].push({id:k,index:b}):(v[u]=[{id:k,index:b}],v[c]=v)})(f,p,w)};return f.toString=()=>h,o.serviceRegistry.set(h,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 h;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"})(h||(o.LogLevelEnum=h={})),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),h=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 h.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 b=0;b=v)return w+this.wcwidth(y);const N=m.charCodeAt(b);56320<=N&&N<=57343?y=1024*(y-55296)+N-56320+65536:w+=this.wcwidth(N)}const x=this.charProperties(y,k);let C=f.extractWidth(x);f.extractShouldJoin(x)&&(C-=f.extractWidth(k)),w+=C,k=x}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),h=s(5741),f=s(8285),p=s(7975),m=s(7090),w=["cols","rows"];class k extends u.Disposable{constructor(b){super(),this._core=this.register(new c.Terminal(b)),this._addonManager=this.register(new h.AddonManager),this._publicOptions={...this._core.options};const y=C=>this._core.options[C],x=(C,N)=>{this._checkReadonlyOptions(C),this._core.options[C]=N};for(const C in this._core.options){const N={get:y.bind(this,C),set:x.bind(this,C)};Object.defineProperty(this._publicOptions,C,N)}}_checkReadonlyOptions(b){if(w.includes(b))throw new Error(`Option "${b}" 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 b=this._core.coreService.decPrivateModes;let y="none";switch(this._core.coreMouseService.activeProtocol){case"X10":y="x10";break;case"VT200":y="vt200";break;case"DRAG":y="drag";break;case"ANY":y="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:y,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const y in b)this._publicOptions[y]=b[y]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,y=!0){this._core.input(b,y)}resize(b,y){this._verifyIntegers(b,y),this._core.resize(b,y)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,y,x){this._verifyIntegers(b,y,x),this._core.select(b,y,x)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,y){this._verifyIntegers(b,y),this._core.selectLines(b,y)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,y){this._core.write(b,y)}writeln(b,y){this._core.write(b),this._core.write(`\r -`,y)}paste(b){this._core.paste(b)}refresh(b,y){this._verifyIntegers(b,y),this._core.refresh(b,y)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return o}_verifyIntegers(...b){for(const y of b)if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const y of b)if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),i})()))})(ww)),ww.exports}var T$=_7n();const f7n=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function Gj(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 f7n){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 Xb(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),i=new T$.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:Gj(n,r)}),a=r==="app"?new MutationObserver(()=>{i.options.theme=Gj(i.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const o=new c7n.FitAddon;i.loadAddon(o),t&&i.loadAddon(new u7n.WebLinksAddon((y,x)=>{let C;try{C=new URL(x)}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,h=null;const f=()=>{if(h===e.scrollTop){h=null;return}h=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",f);const p=()=>{var z;const y=i.element,x=y==null?void 0:y.querySelector(".xterm-screen"),C=y==null?void 0:y.querySelector(".xterm-viewport");if(!y||!(x instanceof HTMLElement)||!(C instanceof HTMLElement))return;const N=i.buffer.active;let j=Math.max(0,N.baseY+N.cursorY-N.viewportY+1);for(let M=i.rows-1;M>=j;M--)if((z=N.getLine(N.viewportY+M))!=null&&z.translateToString(!0).trim()){j=M+1;break}const A=x.getBoundingClientRect().height;y.style.height=`${Math.max(e.clientHeight,Math.min(j,i.rows)*A/i.rows)}px`,y.style.overflow="hidden",C.style.height=`${A}px`},m=()=>{try{const y=o.proposeDimensions();y&&(i.resize(y.cols,Math.max(y.rows,n?1:40)),p())}catch{}};m();const w=new ResizeObserver(m);w.observe(e);const k=i.onWriteParsed(()=>{var x;const y=u&&i.buffer.active.viewportY===i.buffer.active.baseY;if(p(),y){const C=(x=i.element)==null?void 0:x.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),h=e.scrollTop}}}),v=i.onScroll(p),b=y=>{(y.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function d7n(e){return Lf(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||M$(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function h7n(e){return Lf(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&M$(e.partitions)&&(e.error===null||typeof e.error=="string")}function p7n(e){return!Lf(e)||e.type!=="complete"?null:e.backend==="ssh"&&d7n(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&h7n(e.result)?{backend:"slurm",result:e.result}:null}function O$(e){return Lf(e)&&e.type==="complete"}function m7n(e){return Lf(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function qS({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(Yb,{path:`${t}?${a}`,label:sI({host:Ce(e)}),active:r,onError:i,onComplete:o=>{const c=p7n(o);return c?(s(c),!0):!1}})}function g7n({login:e,onComplete:n,onError:t}){return _.jsx(Yb,{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=>O$(r)?(n(),!0):!1})}function v7n({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(Nt,{className:"border-t-accent-amber"})," ",SAt()]}):i==="done"?_.jsxs(_.Fragment,{children:[_.jsx(yi,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",uAt()]}):i==="failed"?_.jsxs(_.Fragment,{children:[_.jsx(br,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",gAt()]}):rAt()}),_.jsx("button",{type:"button",onClick:s,"aria-label":Kz(),title:Kz(),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(br,{size:14})})]}),_.jsx(Yb,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(o,c)=>{a("failed"),c&&r(o)},onComplete:o=>O$(o)?(a("done"),t(),!0):!1,onClosed:()=>a(o=>o==="running"?"closed":o)})]})}function Yb({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:h,onClosed:f}){const p=T.useRef(null),m=T.useRef(null),w=T.useRef(u),k=T.useRef(h),v=T.useRef(f),[b,y]=T.useState(null);return w.current=u,k.current=h,v.current=f,T.useEffect(()=>{const x=p.current;if(!x)return;const{terminal:C,dispose:N}=Xb(x,c,!0,i);if(m.current=C,c)return t&&C.writeln(`$ ${t}`),()=>{m.current=null,N()};C.focus();const j=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${j}//${location.host}`),z=new WebSocket(A);z.binaryType="arraybuffer";let M=!1,D=!1,I=!1;const B=(Q,K)=>{var Z;if(D){K||C.writeln(Q);return}D=!0,(!I||a)&&C.writeln(Q),(Z=k.current)==null||Z.call(k,Q,K),!(a&&!K)&&(C.options.disableStdin=!0,C.blur(),y(Q))},G=C.onData(Q=>{z.readyState===WebSocket.OPEN&&z.send(new TextEncoder().encode(Q))}),q=C.onResize(({cols:Q,rows:K})=>{z.readyState===WebSocket.OPEN&&z.send(JSON.stringify({type:"resize",cols:Q,rows:K}))});return z.onopen=()=>{t&&C.writeln(`$ ${t}`),z.send(JSON.stringify({type:"resize",cols:C.cols,rows:C.rows}))},z.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){I=!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||z.close();return}const Z=m7n(K);Z&&(M?C.writeln(Z):B(Z,!a))},z.onerror=()=>B(Bv(),!0),z.onclose=()=>{var Q;if(!M&&!D){B(Bv(),!0);return}a&&(C.options.disableStdin=!0,C.blur(),(Q=v.current)==null||Q.call(v))},()=>{z.onopen=null,z.onmessage=null,z.onerror=null,z.onclose=null,G.dispose(),q.dispose(),z.close(),m.current=null,N()}},[e,t,c,i,a]),T.useEffect(()=>{const x=m.current;x&&(x.options.disableStdin=c||!o||b!==null,!c&&o&&b===null?x.focus():x.blur())},[o,b,c]),_.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[_.jsx("div",{className:`${r} ${s==="card"?R$:`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"})}),b?_.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function b7n({host:e,transcript:n}){const t=T.useRef(null);return T.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=Xb(r,!0,!0);return s.write(n),i},[n]),_.jsx("div",{className:`mt-3 h-40 ${R$}`,role:"group","aria-label":sI({host:Ce(e)}),children:_.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Wv=null,u0=0;const US=()=>Wv;function D$(){const e=u0;return j$(async(n,t)=>{if(e!==u0)return;const r=await $wn(n,t);e===u0&&et.setQueryData(Om().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===u0&&sn(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:si(),onClick:()=>void Zb.retry()}})})}let av=D$();function y7n(){u0++,Wv=null,av=D$()}const Zb={flush:(e=!1)=>av.flush(e),retry:()=>av.retry(),queue(e,n=0){const t=Wv;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Wv=e,av.queue(e,n))}};window.addEventListener("pagehide",()=>void Zb.flush(!0));function _l(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 uo(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 L$(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=>[Tt(u),u])),a=e.contentTabOrder.flatMap(u=>{const h=i.get(u);return h?[h]:[]}),o=Tt(e.rightTab);return{tabs:[...r,...a].map(u=>_l(u,Tt(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?_l(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Tt(e.previewTab):null,history:e.tabHistory.map(Tt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Tt(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function x7n(e,n){const t=VS();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=>Tt(uo(a))===Tt(uo(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=uo(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[Tt(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(Tt(a))}const s=new Map(r.map(i=>{const a=uo(i);return[Tt(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?uo(n):e!=null&&e.active?uo(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,$$(t,n)}const kw=(e,n)=>e.id===n.id&&e.view===n.view,j_=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,GS=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,qs=(e,n,t)=>`${e}:${n??""}:${GS(t)}`,I$=e=>({...e,lineScrollRequest:void 0});function m1(e){return typeof e=="object"&&"path"in e?I$(e):e}const Ed=(e,n)=>e.branch===n.branch;function Tt(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:${GS(e)}`:`experiment:${e.id}:${e.view}`}function Qp(e,n){const t=e.filter(r=>Tt(r)!==n);return t.length===e.length?e:t}function w7n(e){return e!==void 0}function VS(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===Yd&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===Fb){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(Tt),panelOpen:!0}}if(e===Hb){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Tt),panelOpen:!0}}return t}function KS(e,n){const t=VS(e,n);return t.panelOpen?L$(t,{},{}):void 0}function $$(e,n){if(!n)return e;const t=uo(n),r=Tt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs].find(c=>Tt(c)===r),i=(c,u)=>{const h=c.findIndex(f=>Tt(f)===r);return h<0?[...c,u]:JSON.stringify(_l(c[h]))===JSON.stringify(_l(u))?c:c.map((f,p)=>p===h?{...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&&Tt(o)===r&&JSON.stringify(_l(o))===JSON.stringify(_l(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Tt(c)!==r),t]),a}let _o=0;const P0=new Map,Qv=new Map,a5=new Set,o5=()=>{for(const e of a5)e()},k7n=e=>(a5.add(e),()=>{a5.delete(e)}),F0=new Map,fo=new Map,B$=e=>fo.get(e);function S7n(){_o++,fo.clear(),F0.clear(),P0.clear(),Qv.clear(),o5()}function C7n(e,n){const t=fo.get(e);if(!(t!=null&&t.tasks.new)||Iu(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const c=uo(o);if(typeof c=="string"||!("path"in c))return[];const u=qs(e,null,c);return u in a?[[qs(e,n,c),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,F0.set(e,n),fo.set(e,{...t,tasks:i})}function E7n(e){let n=P0.get(e);if(!n){const t=_o;n=j$(async(r,s)=>{if(t!==_o)return;const i=await Iwn(e,r,s);t===_o&&et.setQueryData(NS(e).queryKey,i),t===_o&&Qv.delete(e)&&o5()},r=>{t===_o&&(Qv.set(e,r instanceof Error?r.message:String(r)),o5())}),P0.set(e,n)}return n}function Sw(e,n,t,r){const s=fo.get(e);if(!s||t==="new"&&F0.has(e))return;const i=Qb(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?Iu(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 Vj(e,n,t,r){const s=new Set(e.state.fileTabs.map(h=>qs(t,r==="new"?null:r,h))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([h])=>s.has(h))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([h])=>s.has(h))),o=L$(e.state,i,a),c=e.pane??(n==null?void 0:n.active),u=c?Tt(uo(c)):null;return o.active=o.tabs.find(h=>Tt(uo(h))===u)??null,o}function N7n(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,firstDemoOpen:a,state:o,apply:c,getScroll:u,sourceModes:h,revision:f}=e,p=T.useRef(Fj()),m=T.useSyncExternalStore(k7n,()=>n?Qv.get(n)??null:null),[w,k]=T.useState(null),[v,b]=T.useState(0),[y,x]=T.useState(null),[C,N]=T.useState(null),j=T.useRef(null),A=T.useRef(null),z=T.useRef(null),M=T.useRef(e);M.current=e;const D=JSON.stringify([n,t,i]),I=JSON.stringify(s??null),B=T.useCallback(()=>{const q=z.current;if(!q)return;const Q=Vj({...M.current,state:q.state,pane:q.pane},Iu(fo.get(q.projectId),q.taskKey),q.projectId,q.taskKey);Sw(q.projectId,q.location,q.taskKey,Q)},[]);T.useEffect(()=>{let q=!0;const Q=_o;if(k(null),x(null),!!n)return fo.has(n)?x(n):et.fetchQuery(NS(n)).then(K=>{!q||Q!==_o||(fo.set(n,K??Fj()),x(n))}).catch(K=>{q&&Q===_o&&k(K instanceof Error?K.message:String(K))}),()=>{q=!1}},[n,v]),T.useLayoutEffect(()=>{if(z.current&&z.current.scope!==D){const K=z.current.projectId;B(),F0.get(K)===t&&F0.delete(K),z.current=null}if(!n||y!==n)return;const q=fo.get(n);if(!q)return;if(p.current=q,j.current!==D){if(j.current=D,A.current=I,i){const K=Iu(q,t)??(Vo(n)?KS(t,a):void 0);c(x7n(K,s),K,!0)}N(D);return}if(C!==D)return;let Q=o;A.current!==I&&(A.current=I,i&&s&&(Q=$$(o,s),c(Q,void 0,!1))),i?(Sw(n,r,t,Vj({state:Q,pane:s,getScroll:u,sourceModes:h},Iu(q,t),n,t)),z.current={projectId:n,taskKey:t,scope:D,location:r,pane:s,state:Q}):Sw(n,r),p.current=fo.get(n)??q},[n,t,r,s,I,i,a,o,c,u,h,f,y,D,C,B]),T.useEffect(()=>{const q=_o,Q=Z=>{if(q===_o){B();for(const J of P0.values())J.flush(Z)}},K=()=>Q(!0);return window.addEventListener("pagehide",K),()=>{window.removeEventListener("pagehide",K),Q(!1)}},[B]);const G=T.useCallback(()=>{var q;n&&(w?b(Q=>Q+1):(q=P0.get(n))==null||q.retry())},[n,w]);return{ready:n===null||y===n&&C===D,loaded:n===null||y===n,error:w??m,retry:G,capture:B,workspace:p}}const z7n="data:image/svg+xml,"+encodeURIComponent(''),c5=T.createContext(null);function j7n(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function P$(){const e=T.useContext(c5);if(!e)throw new Error("Runtime is not connected");return e}function A7n(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?z7n:"/favicon.svg")}function Kj(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function T7n(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!Kj("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&VI(n),!Kj("orx:locale")&&t&&FD(t)&&qI(t)}function R7n(e){return e.includes("ssh ")&&e.includes("failed")}function Wj({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:RL({host:Ce(e)})}),_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:z3()}),_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:qSt()})]})})}function Qj({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,D,I;const{session:s}=e,[i,a]=T.useState(s.installPaths),[o,c]=T.useState(!1),[u,h]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(D=s.installPaths)==null?void 0:D.database,(I=s.installPaths)==null?void 0:I.cache]);async function f(){if(i){c(!0);try{await t3n(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 n3n()}catch(G){sn(G instanceof Error?G.message:String(G),"error")}finally{c(!1)}}async function m(){c(!0);try{await SI()}catch(B){sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function w(){c(!0);try{h(await CI())}catch(B){sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function k(){if(u){c(!0);try{await EI(u),h(null)}catch(B){h(null),sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}}async function v(){c(!0);try{await r3n()}catch(B){sn(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}const b=s.status==="applying"||o,y=s.status==="needsInstall",x=s.status==="needsUpdate",C=i&&y,N=["connecting","applying","reconnecting"].includes(s.status),j=s.status==="disconnected"&&s.error!==null&&R7n(s.error)&&t!==s.error&&!s.canStartNewHost,A=y?T6t():x?N9t():s.status==="applying"?ukt({host:Ce(s.host)}):s.status==="reconnecting"?VCt({host:Ce(s.host)}):s.status==="disconnected"?s.error?LSt({host:Ce(s.host)}):s.canStartNewHost?r6t({host:Ce(s.host)}):RL({host:Ce(s.host)}):Ukt({host:Ce(s.host)}),z=s.error??(s.canStartNewHost?XSt():y?Z6t({user:Ce(s.user??""),host:Ce(s.host)}):x?y9t({host:Ce(s.host)}):s.status==="applying"?rkt():s.status==="reconnecting"?BCt():s.status==="disconnected"?kSt():Ikt());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(Nt,{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}),!j&&_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:z})]})]}),j&&_.jsx(qS,{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:S6t()}),[["binary",u6t()],["database",g6t()]].map(([B,G])=>_.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[G,_.jsx(Kr,{value:i[B],onChange:q=>a({...i,[B]:q.target.value}),disabled:b,dir:"ltr"})]},B)),!s.error&&_.jsx("div",{className:"flex justify-end pt-1",children:_.jsx(Ie,{variant:"primary",disabled:b,onClick:()=>void f(),children:b?_.jsxs(_.Fragment,{children:[_.jsx(Nt,{})," ",$6t()]}):x?qz():UL()})})]}),x&&i&&_.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&_.jsx(Ie,{variant:"primary",disabled:b,onClick:()=>void f(),children:b?_.jsxs(_.Fragment,{children:[_.jsx(Nt,{})," ",O9t()]}):qz()})}),s.status==="disconnected"&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?_.jsxs(Ie,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?_.jsx(Nt,{}):null,s.error?Fz():_7t()]}):_.jsxs(Ie,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?_.jsx(Nt,{}):null,Fz()]})}),(s.status==="connecting"||s.status==="reconnecting")&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:_.jsx(Ie,{disabled:o,onClick:()=>void m(),children:R3()})}),x&&s.error&&_.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[_.jsx(Ie,{disabled:o,onClick:()=>void m(),children:R3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?_.jsx(Nt,{}):null,Pz()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid w(),children:[o?_.jsx(Nt,{}):null,ML()]})]}),y&&s.error&&_.jsx("div",{className:"mt-6 flex justify-end",children:_.jsxs(Ie,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?_.jsx(Nt,{}):null,Pz()]})})]})}),u&&_.jsx(_$,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||h(null)},onConfirm:()=>void k()})]})}function M7n({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 O7n(){T.useSyncExternalStore(bE,BK),T.useEffect(()=>bE(()=>{y7n(),S7n()}),[]);const e=UQ({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,h]=T.useState(null),f=_t({...x5n(),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,b;if(e)return;const w=f.data;if(!w){s(((v=f.error)==null?void 0:v.message)??null);return}const k=j7n(w);PK(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,T7n(w)),w.session.status==="connected"?(i.current=!0,a.current=!0,h(null)):w.session.status==="disconnected"&&w.session.error===null&&(a.current=!1)),t(w),s(((b=f.error)==null?void 0:b.message)??null)},[e,f.data,f.error]),T.useEffect(()=>{const w=(n==null?void 0:n.kind)==="ssh";A7n(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(Nt,{})," ",ECt()]});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(Ie,{onClick:()=>location.reload(),children:si()})]}):_.jsx(Nt,{})});if(n.kind==="local")return _.jsxs(c5,{value:n,children:[_.jsx(wj,{}),_.jsx(M0,{})]},Ga()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?_.jsx(Wj,{host:n.session.host}):_.jsx(Qj,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:h});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(c5,{value:n,children:[_.jsx(wj,{}),_.jsx(M0,{})]},Ga()[1])}),m&&_.jsx(M7n,{children:r?_.jsx(Wj,{host:n.session.host,overlay:!0}):_.jsx(Qj,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:h})})]})}const Jb=NQ()({component:O7n}),WS="orx:demo-read-sessions";function F$(){try{const e=JSON.parse(sessionStorage.getItem(WS)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function D7n(e){try{const n=F$();n.add(e),sessionStorage.setItem(WS,JSON.stringify([...n]))}catch{}}function L7n(){try{sessionStorage.removeItem(WS)}catch{}}function H$(e,n){const t=vf(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function I7n(e=et){var i;const[n,t]=await Promise.all([e.fetchQuery(Om()),e.fetchQuery(zh())]),r=Qb((i=US()??n.workspace)==null?void 0:i.lastLocation);if(!r)return"/projects";const s=vf(r.split("?")[0]);return!(s!=null&&s.projectId)||!t.some(a=>a.id===s.projectId)||s.sessionId&&!H$(r,await e.fetchQuery(Gi(s.projectId)))?"/projects":r}async function $7n(e,n=et){var h;const[t,r]=await Promise.all([n.fetchQuery(NS(e)),n.fetchQuery(Gi(e))]),s=B$(e)??t,i=Qb(s==null?void 0:s.lastLocation);if(i&&((h=vf(i.split("?")[0]))==null?void 0:h.projectId)===e&&H$(i,r))return i;const a=r.find(f=>!f.archived&&!f.sideParentSessionId),o=Vo(e)?KS(a==null?void 0:a.id,!(await n.fetchQuery(Om())).tourCompleted):void 0,c=Iu(s,(a==null?void 0:a.id)??"new"),u=c?c.active:o==null?void 0:o.active;return iv(e,(a==null?void 0:a.id)??null,u)}const Xv=360,B7n=272,P7n=380,F7n=B7n+56;function Hd(){return Math.max(Xv,window.innerWidth-F7n-P7n)}const H7n=500,q7n=.33;function Xj(){return Math.min(Hd(),Math.max(H7n,Math.round(window.innerWidth*q7n)))}function q$(){const e=Hd();return Math.max(Xv,Math.min(480,e,Math.round(window.innerWidth*.25)))}function QS(){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 Cw(){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(QS,{}),"OpenResearch"]})}const Yj="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 U7n({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 ${Yj}`,onClick:n,"aria-label":aN({value:Ce(e)}),title:aN({value:Ce(e)}),children:_.jsx(TCn,{size:11})}),_.jsx("button",{type:"button",className:`cmd-inline-copy ${Yj}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?_f():hY({value:Ce(e)}),title:t?_f():mS(),children:t?_.jsx(yi,{size:11,strokeWidth:3}):_.jsx(Mf,{size:11})})]})}function Hu(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?_.jsx(U7n,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function ey(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 Th({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 l5(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function G7n(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function Zj(e,n){return n||e==="preview"}function V7n(e,n){if(!e||e.needsConfigRepair)return null;const t=l5(e);return t===n?null:t}function U$({harness:e,commands:n,onReady:t,onClose:r}){const s=T.useRef(null),i=T.useRef(!1),[a,o]=T.useState(()=>l5(e)),[c,u]=T.useState(0),[h,f]=T.useState(()=>G7n(e,l5(e))),[p,m]=T.useState(h==="running"),[w,k]=T.useState(e.needsConfigRepair),[v,b]=T.useState(e.needsConfigRepair?e.agentNote??null:null),y=h==="running"||h==="checking",x=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"),b(null);try{const N=await pf(!0,!0);if(i.current)return;const j=N.find(A=>A.id===e.id);if(k((j==null?void 0:j.needsConfigRepair)??!1),j!=null&&j.agentReady&&(a!=="login"||j.authenticated))t==null||t(j),f("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(j!=null&&j.installed)&&!j.installBroken&&!j.needsConfigRepair&&j.authState==="needsLogin")o("login"),m(!0),f("running");else{const A=V7n(j,a);A&&(o(A),m(!1)),b((j==null?void 0:j.agentNote)??mL()),f("error")}}catch(N){if(i.current)return;b(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"&&y&&N.preventDefault()},onCancel:N=>{N.preventDefault(),y||r()},children:[_.jsxs("div",{className:"flex items-center gap-3",children:[_.jsx(Th,{harness:e.id,size:26}),_.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:lz({agent:e.name})})]}),h==="preview"?_.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?dQe({agent:e.name}):bXe({agent:e.name})}):x&&Zj(h,p)?_.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:Hu(JQe({command:x}))}):null,h!=="running"&&h!=="preview"&&_.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[h==="checking"&&_.jsx(Nt,{}),h==="success"?KWe({agent:e.name}):h==="error"?hL():PWe()]}),a==="install"&&n.requiresNpm&&_.jsx("p",{className:"text-sm text-subtext",children:VQe()}),Zj(h,p)&&_.jsx(Yb,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:lz({agent:e.name}),command:x,heightClass:"h-96",active:h==="running",awaitingApproval:h==="preview",onComplete:N=>typeof N!="object"||N===null||!("type"in N)||N.type!=="complete"?!1:(C(),!0),onError:N=>{b(N),f("error")}},`${a}-${c}`),v&&_.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:Hu(v)}),_.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h==="error"&&_.jsx(Ie,{variant:"ghost",onClick:()=>{b(null),C()},children:Lv()}),h==="error"&&!w&&_.jsx(Ie,{onClick:()=>{b(null),m(!0),f("running"),u(N=>N+1)},children:si()}),_.jsx(Ie,{variant:h==="success"?"primary":"default",onClick:r,children:h==="success"?cI():y?MWe():L0()}),h==="preview"&&_.jsx(Ie,{variant:"primary",onClick:()=>{m(!0),f("running")},children:EWe()})]})]})}const K7n={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 H0({variant:e="list",className:n,...t}){return _.jsx("span",{className:Ss("title",K7n[e],n),...t})}const Jj=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),Mu=["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(" "),Ew=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),G$=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),W7n=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),Q7n=[{id:"AI/ML",label:S_t},{id:"Biology",label:T_t},{id:"Physics",label:G_t},{id:"Other",label:$_t}],X7n=["welcome","environment","profile"];function Y7n({onDone:e,preferredAgent:n,remote:t}){var tt;const r=gn({mutationFn:ke=>Pwn(...ke)}),[s,i]=T.useState(0);T.useEffect(()=>{const ke=X7n[s];ke&&bu({name:"onboarding_step_viewed",step:ke})},[s]);const a=_t(Pu()),o=_t(b0()),c=_t(DI()),[u,h]=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 ke;return(ke=m.current)==null?void 0:ke.close()},[]);const b=a.data??null,y=(tt=o.data)==null?void 0:tt.gitVersion,[x,C]=T.useState(!1),[N,j]=T.useState(null),[A,z]=T.useState(""),[M,D]=T.useState(null),[I,B]=T.useState(!1),[G,q]=T.useState([]),[Q,K]=T.useState(""),[Z,J]=T.useState(""),[$,L]=T.useState([]),[F,U]=T.useState(""),[H,ae]=T.useState([]),[ie,ue]=T.useState(!1),re=T.useRef(0),[V,oe]=T.useState(!1),[ce,me]=T.useState(!1),ve=(b==null?void 0:b.some(ke=>ke.agentReady&&!ke.catalogPending))??!1,Re=(b==null?void 0:b.some(ke=>ke.catalogPending))??!1,Fe=y!=null,Xe=T.useRef(0),Te=(ke,ge=!1)=>{const Ne=++Xe.current;B(!0),oe(!1),me(!1);const qe=()=>Ne===Xe.current;Promise.allSettled([pf(ke,ge),et.fetchQuery({...b0(),staleTime:ke?0:3e4})]).then(([nt,ht])=>{qe()&&(nt.status==="rejected"&&oe(!0),ht.status==="rejected"&&me(!0))}).finally(()=>qe()&&B(!1))};T.useEffect(()=>Te(!1),[]),T.useEffect(()=>{if(b===null)return;const ke=b.filter(ge=>ge.agentReady&&!ge.catalogPending);D(ge=>{var qe;if(ge&&ke.some(nt=>nt.id===ge))return ge;const Ne=n&&ke.find(nt=>nt.id===n.harness);return(Ne==null?void 0:Ne.id)??((qe=ke[0])==null?void 0:qe.id)??null})},[b,n]),T.useEffect(()=>oe(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>me(o.isError),[o.isError,o.dataUpdatedAt]),T.useEffect(()=>{et.fetchQuery(k5n()).then(ke=>{q(ke.researchAreas),K(ke.otherArea??""),J(ke.background??""),L(ke.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const ke=F.trim();if(ke.length<3){ae([]),ue(!1);return}const ge=++re.current;ue(!0);const Ne=setTimeout(()=>{et.fetchQuery(HI(ke)).then(qe=>ge===re.current&&ae(qe)).catch(()=>ge===re.current&&ae([])).finally(()=>ge===re.current&&ue(!1))},350);return()=>clearTimeout(Ne)},[F]);const $e=ke=>{const ge=$.some(Ne=>Ne.paperId===ke.paperId);L(Ne=>Ne.some(qe=>qe.paperId===ke.paperId)?Ne:[...Ne,{paperId:ke.paperId,title:eA(ke.title)}]),U(""),ae([]),ge||et.fetchQuery(J3(ke.paperId)).then(Ne=>{var nt;const qe=(nt=Ne.title)==null?void 0:nt.trim();qe&&L(ht=>ht.map(rt=>rt.paperId===ke.paperId?{...rt,title:qe}:rt))}).catch(()=>{})},wt=ke=>L(ge=>ge.filter(Ne=>Ne.paperId!==ke)),ot=ke=>{q(ge=>ge.includes(ke)?ge.filter(Ne=>Ne!==ke):[...ge,ke])},Mt=G.length>0&&(!G.includes("Other")||Q.trim().length>0),jt=()=>{if(k.current)return k.current;w.current="",v.current=!0,p(!0);const ke=(async()=>{await new Promise((qe,nt)=>{const ht=location.protocol==="https:"?"wss:":"ws:",rt=new WebSocket(`${ht}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);rt.binaryType="arraybuffer";const qt=new TextDecoder,Xt=new T$.Terminal;Xt.onData(an=>{rt.readyState===WebSocket.OPEN&&rt.send(new TextEncoder().encode(an))}),m.current=rt;let Jt=!1;rt.onmessage=an=>{if(an.data instanceof ArrayBuffer){Xt.write(new Uint8Array(an.data)),w.current=(w.current+qt.decode(an.data,{stream:!0})).slice(-65536);return}if(typeof an.data!="string")return;let At;try{At=JSON.parse(an.data)}catch{return}typeof At!="object"||At===null||!("type"in At)||(At.type==="complete"?(Jt=!0,rt.close(),qe()):At.type==="error"&&(rt.close(),nt(new Error("error"in At&&typeof At.error=="string"?At.error:hL()))))},rt.onerror=()=>{rt.close(),nt(new Error(Bv()))},rt.onclose=()=>{Xt.dispose(),m.current=null,Jt||nt(new Error(Bv()))}});const Ne=(await pf(!0,!0)).find(qe=>qe.id==="opencode"&&qe.agentReady);if(!Ne)throw new Error(Cpt());return D("opencode"),Ne})();return k.current=ke,ke.catch(()=>{}),ke};T.useEffect(()=>{t||v.current||!(b!=null&&b.length)||b.some(ke=>ke.catalogPending)||!b.every(ke=>!ke.installed&&!ke.installBroken)||jt()},[b,t]),T.useEffect(()=>{s===1&&f&&i(2)},[s,f]);const Ft=()=>{i(f?2:1)},Le=async(ke="complete")=>{var ge;if(!(x||ke==="complete"&&(!Mt||!Fe))){C(!0),j(null),z("");try{const Ne=f?await jt():b==null?void 0:b.find(ht=>ht.id===M&&ht.agentReady&&!ht.catalogPending);if(!Ne)throw new Error(mL());if(ke==="setup")return;const qe=J7n(Ne,((ge=Ne.models[0])==null?void 0:ge.id)??null),nt=await r.mutateAsync([qe,{researchAreas:G,otherArea:G.includes("Other")?Q:null,background:Z||null,papers:$}]);e(nt.project,nt.selection)}catch(Ne){f&&(k.current=null);const qe=Ne instanceof Error?Ne.message:String(Ne);j(qe),z([w.current,qe].filter(Boolean).join(` +`,y)}paste(b){this._core.paste(b)}refresh(b,y){this._verifyIntegers(b,y),this._core.refresh(b,y)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return o}_verifyIntegers(...b){for(const y of b)if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const y of b)if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),i})()))})(Ew)),Ew.exports}var K$=T8n();const R8n=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function rA(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 R8n){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 Zb(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),i=new K$.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:rA(n,r)}),a=r==="app"?new MutationObserver(()=>{i.options.theme=rA(i.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const o=new z8n.FitAddon;i.loadAddon(o),t&&i.loadAddon(new A8n.WebLinksAddon((y,x)=>{let C;try{C=new URL(x)}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,h=null;const f=()=>{if(h===e.scrollTop){h=null;return}h=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",f);const p=()=>{var z;const y=i.element,x=y==null?void 0:y.querySelector(".xterm-screen"),C=y==null?void 0:y.querySelector(".xterm-viewport");if(!y||!(x instanceof HTMLElement)||!(C instanceof HTMLElement))return;const N=i.buffer.active;let j=Math.max(0,N.baseY+N.cursorY-N.viewportY+1);for(let M=i.rows-1;M>=j;M--)if((z=N.getLine(N.viewportY+M))!=null&&z.translateToString(!0).trim()){j=M+1;break}const A=x.getBoundingClientRect().height;y.style.height=`${Math.max(e.clientHeight,Math.min(j,i.rows)*A/i.rows)}px`,y.style.overflow="hidden",C.style.height=`${A}px`},m=()=>{try{const y=o.proposeDimensions();y&&(i.resize(y.cols,Math.max(y.rows,n?1:40)),p())}catch{}};m();const w=new ResizeObserver(m);w.observe(e);const k=i.onWriteParsed(()=>{var x;const y=u&&i.buffer.active.viewportY===i.buffer.active.baseY;if(p(),y){const C=(x=i.element)==null?void 0:x.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),h=e.scrollTop}}}),v=i.onScroll(p),b=y=>{(y.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function M8n(e){return Df(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||W$(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function O8n(e){return Df(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&W$(e.partitions)&&(e.error===null||typeof e.error=="string")}function D8n(e){return!Df(e)||e.type!=="complete"?null:e.backend==="ssh"&&M8n(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&O8n(e.result)?{backend:"slurm",result:e.result}:null}function Q$(e){return Df(e)&&e.type==="complete"}function L8n(e){return Df(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function ZS({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(Jb,{path:`${t}?${a}`,label:bI({host:Ce(e)}),active:r,onError:i,onComplete:o=>{const c=D8n(o);return c?(s(c),!0):!1}})}function I8n({login:e,onComplete:n,onError:t}){return _.jsx(Jb,{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=>Q$(r)?(n(),!0):!1})}function $8n({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(St,{className:"border-t-accent-amber"})," ",qTt()]}):i==="done"?_.jsxs(_.Fragment,{children:[_.jsx(bi,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",jTt()]}):i==="failed"?_.jsxs(_.Fragment,{children:[_.jsx(xr,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",LTt()]}):wTt()}),_.jsx("button",{type:"button",onClick:s,"aria-label":ij(),title:ij(),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(xr,{size:14})})]}),_.jsx(Jb,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(o,c)=>{a("failed"),c&&r(o)},onComplete:o=>Q$(o)?(a("done"),t(),!0):!1,onClosed:()=>a(o=>o==="running"?"closed":o)})]})}function Jb({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:h,onClosed:f}){const p=T.useRef(null),m=T.useRef(null),w=T.useRef(u),k=T.useRef(h),v=T.useRef(f),[b,y]=T.useState(null);return w.current=u,k.current=h,v.current=f,T.useEffect(()=>{const x=p.current;if(!x)return;const{terminal:C,dispose:N}=Zb(x,c,!0,i);if(m.current=C,c)return t&&C.writeln(`$ ${t}`),()=>{m.current=null,N()};C.focus();const j=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${j}//${location.host}`),z=new WebSocket(A);z.binaryType="arraybuffer";let M=!1,D=!1,I=!1;const B=(Q,V)=>{var Z;if(D){V||C.writeln(Q);return}D=!0,(!I||a)&&C.writeln(Q),(Z=k.current)==null||Z.call(k,Q,V),!(a&&!V)&&(C.options.disableStdin=!0,C.blur(),y(Q))},G=C.onData(Q=>{z.readyState===WebSocket.OPEN&&z.send(new TextEncoder().encode(Q))}),U=C.onResize(({cols:Q,rows:V})=>{z.readyState===WebSocket.OPEN&&z.send(JSON.stringify({type:"resize",cols:Q,rows:V}))});return z.onopen=()=>{t&&C.writeln(`$ ${t}`),z.send(JSON.stringify({type:"resize",cols:C.cols,rows:C.rows}))},z.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){I=!0,C.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=L8n(V);Z&&(M?C.writeln(Z):B(Z,!a))},z.onerror=()=>B(Pv(),!0),z.onclose=()=>{var Q;if(!M&&!D){B(Pv(),!0);return}a&&(C.options.disableStdin=!0,C.blur(),(Q=v.current)==null||Q.call(v))},()=>{z.onopen=null,z.onmessage=null,z.onerror=null,z.onclose=null,G.dispose(),U.dispose(),z.close(),m.current=null,N()}},[e,t,c,i,a]),T.useEffect(()=>{const x=m.current;x&&(x.options.disableStdin=c||!o||b!==null,!c&&o&&b===null?x.focus():x.blur())},[o,b,c]),_.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[_.jsx("div",{className:`${r} ${s==="card"?V$:`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"})}),b?_.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function B8n({host:e,transcript:n}){const t=T.useRef(null);return T.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=Zb(r,!0,!0);return s.write(n),i},[n]),_.jsx("div",{className:`mt-3 h-40 ${V$}`,role:"group","aria-label":bI({host:Ce(e)}),children:_.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Qv=null,_0=0;const JS=()=>Qv;function X$(){const e=_0;return U$(async(n,t)=>{if(e!==_0)return;const r=await r3n(n,t);e===_0&&tt.setQueryData(Om().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===_0&&Zt(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:ni(),onClick:()=>void ey.retry()}})})}let av=X$();function P8n(){_0++,Qv=null,av=X$()}const ey={flush:(e=!1)=>av.flush(e),retry:()=>av.retry(),queue(e,n=0){const t=Qv;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Qv=e,av.queue(e,n))}};window.addEventListener("pagehide",()=>void ey.flush(!0));function fl(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 co(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 Y$(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=>[Tt(u),u])),a=e.contentTabOrder.flatMap(u=>{const h=i.get(u);return h?[h]:[]}),o=Tt(e.rightTab);return{tabs:[...r,...a].map(u=>fl(u,Tt(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?fl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Tt(e.previewTab):null,history:e.tabHistory.map(Tt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Tt(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function F8n(e,n){const t=t6();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=>Tt(co(a))===Tt(co(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=co(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[Tt(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(Tt(a))}const s=new Map(r.map(i=>{const a=co(i);return[Tt(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?co(n):e!=null&&e.active?co(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,J$(t,n)}const Nw=(e,n)=>e.id===n.id&&e.view===n.view,z_=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,e6=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,Hs=(e,n,t)=>`${e}:${n??""}:${e6(t)}`,Z$=e=>({...e,lineScrollRequest:void 0});function m1(e){return typeof e=="object"&&"path"in e?Z$(e):e}const Cd=(e,n)=>e.branch===n.branch;function Tt(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:${e6(e)}`:`experiment:${e.id}:${e.view}`}function Xp(e,n){const t=e.filter(r=>Tt(r)!==n);return t.length===e.length?e:t}function H8n(e){return e!==void 0}function t6(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===Xd&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===qb){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(Tt),panelOpen:!0}}if(e===Ub){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Tt),panelOpen:!0}}return t}function n6(e,n){const t=t6(e,n);return t.panelOpen?Y$(t,{},{}):void 0}function J$(e,n){if(!n)return e;const t=co(n),r=Tt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs].find(c=>Tt(c)===r),i=(c,u)=>{const h=c.findIndex(f=>Tt(f)===r);return h<0?[...c,u]:JSON.stringify(fl(c[h]))===JSON.stringify(fl(u))?c:c.map((f,p)=>p===h?{...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&&Tt(o)===r&&JSON.stringify(fl(o))===JSON.stringify(fl(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Tt(c)!==r),t]),a}let lo=0;const F0=new Map,Xv=new Map,d5=new Set,h5=()=>{for(const e of d5)e()},q8n=e=>(d5.add(e),()=>{d5.delete(e)}),H0=new Map,uo=new Map,eB=e=>uo.get(e);function U8n(){lo++,uo.clear(),H0.clear(),F0.clear(),Xv.clear(),h5()}function G8n(e,n){const t=uo.get(e);if(!(t!=null&&t.tasks.new)||Lu(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const c=co(o);if(typeof c=="string"||!("path"in c))return[];const u=Hs(e,null,c);return u in a?[[Hs(e,n,c),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,H0.set(e,n),uo.set(e,{...t,tasks:i})}function K8n(e){let n=F0.get(e);if(!n){const t=lo;n=U$(async(r,s)=>{if(t!==lo)return;const i=await n3n(e,r,s);t===lo&&tt.setQueryData(LS(e).queryKey,i),t===lo&&Xv.delete(e)&&h5()},r=>{t===lo&&(Xv.set(e,r instanceof Error?r.message:String(r)),h5())}),F0.set(e,n)}return n}function zw(e,n,t,r){const s=uo.get(e);if(!s||t==="new"&&H0.has(e))return;const i=Yb(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?Lu(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:{}});uo.set(e,c),K8n(e).queue(c,u?250:0)}function sA(e,n,t,r){const s=new Set(e.state.fileTabs.map(h=>Hs(t,r==="new"?null:r,h))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([h])=>s.has(h))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([h])=>s.has(h))),o=Y$(e.state,i,a),c=e.pane??(n==null?void 0:n.active),u=c?Tt(co(c)):null;return o.active=o.tabs.find(h=>Tt(co(h))===u)??null,o}function V8n(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,firstDemoOpen:a,state:o,apply:c,getScroll:u,sourceModes:h,revision:f}=e,p=T.useRef(Jj()),m=T.useSyncExternalStore(q8n,()=>n?Xv.get(n)??null:null),[w,k]=T.useState(null),[v,b]=T.useState(0),[y,x]=T.useState(null),[C,N]=T.useState(null),j=T.useRef(null),A=T.useRef(null),z=T.useRef(null),M=T.useRef(e);M.current=e;const D=JSON.stringify([n,t,i]),I=JSON.stringify(s??null),B=T.useCallback(()=>{const U=z.current;if(!U)return;const Q=sA({...M.current,state:U.state,pane:U.pane},Lu(uo.get(U.projectId),U.taskKey),U.projectId,U.taskKey);zw(U.projectId,U.location,U.taskKey,Q)},[]);T.useEffect(()=>{let U=!0;const Q=lo;if(k(null),x(null),!!n)return uo.has(n)?x(n):tt.fetchQuery(LS(n)).then(V=>{!U||Q!==lo||(uo.set(n,V??Jj()),x(n))}).catch(V=>{U&&Q===lo&&k(V instanceof Error?V.message:String(V))}),()=>{U=!1}},[n,v]),T.useLayoutEffect(()=>{if(z.current&&z.current.scope!==D){const V=z.current.projectId;B(),H0.get(V)===t&&H0.delete(V),z.current=null}if(!n||y!==n)return;const U=uo.get(n);if(!U)return;if(p.current=U,j.current!==D){if(j.current=D,A.current=I,i){const V=Lu(U,t)??(Vo(n)?n6(t,a):void 0);c(F8n(V,s),V,!0)}N(D);return}if(C!==D)return;let Q=o;A.current!==I&&(A.current=I,i&&s&&(Q=J$(o,s),c(Q,void 0,!1))),i?(zw(n,r,t,sA({state:Q,pane:s,getScroll:u,sourceModes:h},Lu(U,t),n,t)),z.current={projectId:n,taskKey:t,scope:D,location:r,pane:s,state:Q}):zw(n,r),p.current=uo.get(n)??U},[n,t,r,s,I,i,a,o,c,u,h,f,y,D,C,B]),T.useEffect(()=>{const U=lo,Q=Z=>{if(U===lo){B();for(const J of F0.values())J.flush(Z)}},V=()=>Q(!0);return window.addEventListener("pagehide",V),()=>{window.removeEventListener("pagehide",V),Q(!1)}},[B]);const G=T.useCallback(()=>{var U;n&&(w?b(Q=>Q+1):(U=F0.get(n))==null||U.retry())},[n,w]);return{ready:n===null||y===n&&C===D,loaded:n===null||y===n,error:w??m,retry:G,capture:B,workspace:p}}const W8n="data:image/svg+xml,"+encodeURIComponent(''),p5=T.createContext(null);function Q8n(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function tB(){const e=T.useContext(p5);if(!e)throw new Error("Runtime is not connected");return e}function X8n(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?W8n:"/favicon.svg")}function iA(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function Y8n(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!iA("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&o$(n),!iA("orx:locale")&&t&&eL(t)&&s$(t)}function Z8n(e){return e.includes("ssh ")&&e.includes("failed")}function aA({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:VL({host:Ce(e)})}),_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:D3()}),_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:cCt()})]})})}function oA({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,D,I;const{session:s}=e,[i,a]=T.useState(s.installPaths),[o,c]=T.useState(!1),[u,h]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(D=s.installPaths)==null?void 0:D.database,(I=s.installPaths)==null?void 0:I.cache]);async function f(){if(i){c(!0);try{await x5n(i)}catch(B){Zt(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 w5n()}catch(G){Zt(G instanceof Error?G.message:String(G),"error")}finally{c(!1)}}async function m(){c(!0);try{await BI()}catch(B){Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function w(){c(!0);try{h(await PI())}catch(B){Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function k(){if(u){c(!0);try{await FI(u),h(null)}catch(B){h(null),Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}}async function v(){c(!0);try{await k5n()}catch(B){Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}const b=s.status==="applying"||o,y=s.status==="needsInstall",x=s.status==="needsUpdate",C=i&&y,N=["connecting","applying","reconnecting"].includes(s.status),j=s.status==="disconnected"&&s.error!==null&&Z8n(s.error)&&t!==s.error&&!s.canStartNewHost,A=y?XCt():x?KEt():s.status==="applying"?jSt({host:Ce(s.host)}):s.status==="reconnecting"?_8t({host:Ce(s.host)}):s.status==="disconnected"?s.error?tCt({host:Ce(s.host)}):s.canStartNewHost?wCt({host:Ce(s.host)}):VL({host:Ce(s.host)}):l6t({host:Ce(s.host)}),z=s.error??(s.canStartNewHost?pCt():y?g7t({user:Ce(s.user??""),host:Ce(s.host)}):x?BEt({host:Ce(s.host)}):s.status==="applying"?wSt():s.status==="reconnecting"?s8t():s.status==="disconnected"?H6t():n6t());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(St,{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}),!j&&_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:z})]})]}),j&&_.jsx(ZS,{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:qCt()}),[["binary",jCt()],["database",LCt()]].map(([B,G])=>_.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[G,_.jsx(Br,{value:i[B],onChange:U=>a({...i,[B]:U.target.value}),disabled:b,dir:"ltr"})]},B)),!s.error&&_.jsx("div",{className:"flex justify-end pt-1",children:_.jsx(Ie,{variant:"primary",disabled:b,onClick:()=>void f(),children:b?_.jsxs(_.Fragment,{children:[_.jsx(St,{})," ",r7t()]}):x?tj():iI()})})]}),x&&i&&_.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&_.jsx(Ie,{variant:"primary",disabled:b,onClick:()=>void f(),children:b?_.jsxs(_.Fragment,{children:[_.jsx(St,{})," ",JEt()]}):tj()})}),s.status==="disconnected"&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?_.jsxs(Ie,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?_.jsx(St,{}):null,s.error?Jz():A8t()]}):_.jsxs(Ie,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?_.jsx(St,{}):null,Jz()]})}),(s.status==="connecting"||s.status==="reconnecting")&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:_.jsx(Ie,{disabled:o,onClick:()=>void m(),children:B3()})}),x&&s.error&&_.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[_.jsx(Ie,{disabled:o,onClick:()=>void m(),children:B3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?_.jsx(St,{}):null,Zz()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid w(),children:[o?_.jsx(St,{}):null,WL()]})]}),y&&s.error&&_.jsx("div",{className:"mt-6 flex justify-end",children:_.jsxs(Ie,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?_.jsx(St,{}):null,Zz()]})})]})}),u&&_.jsx(E$,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||h(null)},onConfirm:()=>void k()})]})}function J8n({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 e9n(){T.useSyncExternalStore(RE,eW),T.useEffect(()=>RE(()=>{P8n(),U8n()}),[]);const e=iX({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,h]=T.useState(null),f=ut({...Fkn(),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,b;if(e)return;const w=f.data;if(!w){s(((v=f.error)==null?void 0:v.message)??null);return}const k=Q8n(w);tW(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,Y8n(w)),w.session.status==="connected"?(i.current=!0,a.current=!0,h(null)):w.session.status==="disconnected"&&w.session.error===null&&(a.current=!1)),t(w),s(((b=f.error)==null?void 0:b.message)??null)},[e,f.data,f.error]),T.useEffect(()=>{const w=(n==null?void 0:n.kind)==="ssh";X8n(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(St,{})," ",G7t()]});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(Ie,{onClick:()=>location.reload(),children:ni()})]}):_.jsx(St,{})});if(n.kind==="local")return _.jsxs(p5,{value:n,children:[_.jsx(Oj,{}),_.jsx(O0,{})]},yi()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?_.jsx(aA,{host:n.session.host}):_.jsx(oA,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:h});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(p5,{value:n,children:[_.jsx(Oj,{}),_.jsx(O0,{})]},yi()[1])}),m&&_.jsx(J8n,{children:r?_.jsx(aA,{host:n.session.host,overlay:!0}):_.jsx(oA,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:h})})]})}const ty=HQ()({component:e9n}),r6="orx:demo-read-sessions";function nB(){try{const e=JSON.parse(sessionStorage.getItem(r6)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function t9n(e){try{const n=nB();n.add(e),sessionStorage.setItem(r6,JSON.stringify([...n]))}catch{}}function n9n(){try{sessionStorage.removeItem(r6)}catch{}}function rB(e,n){const t=gf(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function r9n(e=tt){var i;const[n,t]=await Promise.all([e.fetchQuery(Om()),e.fetchQuery(zh())]),r=Yb((i=JS()??n.workspace)==null?void 0:i.lastLocation);if(!r)return"/projects";const s=gf(r.split("?")[0]);return!(s!=null&&s.projectId)||!t.some(a=>a.id===s.projectId)||s.sessionId&&!rB(r,await e.fetchQuery(Gi(s.projectId)))?"/projects":r}async function s9n(e,n=tt){var h;const[t,r]=await Promise.all([n.fetchQuery(LS(e)),n.fetchQuery(Gi(e))]),s=eB(e)??t,i=Yb(s==null?void 0:s.lastLocation);if(i&&((h=gf(i.split("?")[0]))==null?void 0:h.projectId)===e&&rB(i,r))return i;const a=r.find(f=>!f.archived&&!f.sideParentSessionId),o=Vo(e)?n6(a==null?void 0:a.id,!(await n.fetchQuery(Om())).tourCompleted):void 0,c=Lu(s,(a==null?void 0:a.id)??"new"),u=c?c.active:o==null?void 0:o.active;return iv(e,(a==null?void 0:a.id)??null,u)}const Yv=360,i9n=272,a9n=380,o9n=i9n+56;function Fd(){return Math.max(Yv,window.innerWidth-o9n-a9n)}const c9n=500,l9n=.33;function cA(){return Math.min(Fd(),Math.max(c9n,Math.round(window.innerWidth*l9n)))}function sB(){const e=Fd();return Math.max(Yv,Math.min(480,e,Math.round(window.innerWidth*.25)))}function s6(){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 jw(){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(s6,{}),"OpenResearch"]})}const lA="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 u9n({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 ${lA}`,onClick:n,"aria-label":bN({value:Ce(e)}),title:bN({value:Ce(e)}),children:_.jsx(Y7n,{size:11})}),_.jsx("button",{type:"button",className:`cmd-inline-copy ${lA}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?uf():jY({value:Ce(e)}),title:t?uf():SS(),children:t?_.jsx(bi,{size:11,strokeWidth:3}):_.jsx(Yu,{size:11})})]})}function Fu(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?_.jsx(u9n,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function ny(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 Th({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 m5(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function _9n(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function uA(e,n){return n||e==="preview"}function f9n(e,n){if(!e||e.needsConfigRepair)return null;const t=m5(e);return t===n?null:t}function iB({harness:e,commands:n,onReady:t,onClose:r}){const s=T.useRef(null),i=T.useRef(!1),[a,o]=T.useState(()=>m5(e)),[c,u]=T.useState(0),[h,f]=T.useState(()=>_9n(e,m5(e))),[p,m]=T.useState(h==="running"),[w,k]=T.useState(e.needsConfigRepair),[v,b]=T.useState(e.needsConfigRepair?e.agentNote??null:null),y=h==="running"||h==="checking",x=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"),b(null);try{const N=await hf(!0,!0);if(i.current)return;const j=N.find(A=>A.id===e.id);if(k((j==null?void 0:j.needsConfigRepair)??!1),j!=null&&j.agentReady&&(a!=="login"||j.authenticated))t==null||t(j),f("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(j!=null&&j.installed)&&!j.installBroken&&!j.needsConfigRepair&&j.authState==="needsLogin")o("login"),m(!0),f("running");else{const A=f9n(j,a);A&&(o(A),m(!1)),b((j==null?void 0:j.agentNote)??TL()),f("error")}}catch(N){if(i.current)return;b(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"&&y&&N.preventDefault()},onCancel:N=>{N.preventDefault(),y||r()},children:[_.jsxs("div",{className:"flex items-center gap-3",children:[_.jsx(Th,{harness:e.id,size:26}),_.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:xz({agent:e.name})})]}),h==="preview"?_.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?RXe({agent:e.name}):$Ye({agent:e.name})}):x&&uA(h,p)?_.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:Fu(vYe({command:x}))}):null,h!=="running"&&h!=="preview"&&_.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[h==="checking"&&_.jsx(St,{}),h==="success"?fXe({agent:e.name}):h==="error"?jL():iXe()]}),a==="install"&&n.requiresNpm&&_.jsx("p",{className:"text-sm text-subtext",children:_Ye()}),uA(h,p)&&_.jsx(Jb,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:xz({agent:e.name}),command:x,heightClass:"h-96",active:h==="running",awaitingApproval:h==="preview",onComplete:N=>typeof N!="object"||N===null||!("type"in N)||N.type!=="complete"?!1:(C(),!0),onError:N=>{b(N),f("error")}},`${a}-${c}`),v&&_.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:Fu(v)}),_.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h==="error"&&_.jsx(Ie,{variant:"ghost",onClick:()=>{b(null),C()},children:Iv()}),h==="error"&&!w&&_.jsx(Ie,{onClick:()=>{b(null),m(!0),f("running"),u(N=>N+1)},children:ni()}),_.jsx(Ie,{variant:h==="success"?"primary":"default",onClick:r,children:h==="success"?kI():y?ZQe():I0()}),h==="preview"&&_.jsx(Ie,{variant:"primary",onClick:()=>{m(!0),f("running")},children:GQe()})]})]})}const d9n={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 q0({variant:e="list",className:n,...t}){return _.jsx("span",{className:Ns("title",d9n[e],n),...t})}const _A=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),Ru=["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(" "),Aw=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),aB=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),h9n=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),p9n=[{id:"AI/ML",label:qft},{id:"Biology",label:Xft},{id:"Physics",label:udt},{id:"Other",label:rdt}],m9n=["welcome","environment","profile"];function g9n({onDone:e,preferredAgent:n,remote:t}){var nt;const r=pn({mutationFn:ke=>i3n(...ke)}),[s,i]=T.useState(0);T.useEffect(()=>{const ke=m9n[s];ke&&vu({name:"onboarding_step_viewed",step:ke})},[s]);const a=ut(Bu()),o=ut(y0()),c=ut(XI()),[u,h]=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 ke;return(ke=m.current)==null?void 0:ke.close()},[]);const b=a.data??null,y=(nt=o.data)==null?void 0:nt.gitVersion,[x,C]=T.useState(!1),[N,j]=T.useState(null),[A,z]=T.useState(""),[M,D]=T.useState(null),[I,B]=T.useState(!1),[G,U]=T.useState([]),[Q,V]=T.useState(""),[Z,J]=T.useState(""),[$,L]=T.useState([]),[q,P]=T.useState(""),[F,re]=T.useState([]),[ie,ue]=T.useState(!1),se=T.useRef(0),[K,oe]=T.useState(!1),[ce,pe]=T.useState(!1),ve=(b==null?void 0:b.some(ke=>ke.agentReady&&!ke.catalogPending))??!1,Me=(b==null?void 0:b.some(ke=>ke.catalogPending))??!1,Fe=y!=null,Ye=T.useRef(0),Te=(ke,me=!1)=>{const je=++Ye.current;B(!0),oe(!1),pe(!1);const qe=()=>je===Ye.current;Promise.allSettled([hf(ke,me),tt.fetchQuery({...y0(),staleTime:ke?0:3e4})]).then(([rt,dt])=>{qe()&&(rt.status==="rejected"&&oe(!0),dt.status==="rejected"&&pe(!0))}).finally(()=>qe()&&B(!1))};T.useEffect(()=>Te(!1),[]),T.useEffect(()=>{if(b===null)return;const ke=b.filter(me=>me.agentReady&&!me.catalogPending);D(me=>{var qe;if(me&&ke.some(rt=>rt.id===me))return me;const je=n&&ke.find(rt=>rt.id===n.harness);return(je==null?void 0:je.id)??((qe=ke[0])==null?void 0:qe.id)??null})},[b,n]),T.useEffect(()=>oe(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>pe(o.isError),[o.isError,o.dataUpdatedAt]),T.useEffect(()=>{tt.fetchQuery(qkn()).then(ke=>{U(ke.researchAreas),V(ke.otherArea??""),J(ke.background??""),L(ke.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const ke=q.trim();if(ke.length<3){re([]),ue(!1);return}const me=++se.current;ue(!0);const je=setTimeout(()=>{tt.fetchQuery(r$(ke)).then(qe=>me===se.current&&re(qe)).catch(()=>me===se.current&&re([])).finally(()=>me===se.current&&ue(!1))},350);return()=>clearTimeout(je)},[q]);const $e=ke=>{const me=$.some(je=>je.paperId===ke.paperId);L(je=>je.some(qe=>qe.paperId===ke.paperId)?je:[...je,{paperId:ke.paperId,title:fA(ke.title)}]),P(""),re([]),me||tt.fetchQuery(a5(ke.paperId)).then(je=>{var rt;const qe=(rt=je.title)==null?void 0:rt.trim();qe&&L(dt=>dt.map(st=>st.paperId===ke.paperId?{...st,title:qe}:st))}).catch(()=>{})},yt=ke=>L(me=>me.filter(je=>je.paperId!==ke)),ot=ke=>{U(me=>me.includes(ke)?me.filter(je=>je!==ke):[...me,ke])},Mt=G.length>0&&(!G.includes("Other")||Q.trim().length>0),jt=()=>{if(k.current)return k.current;w.current="",v.current=!0,p(!0);const ke=(async()=>{await new Promise((qe,rt)=>{const dt=location.protocol==="https:"?"wss:":"ws:",st=new WebSocket(`${dt}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);st.binaryType="arraybuffer";const Ut=new TextDecoder,Xt=new K$.Terminal;Xt.onData(an=>{st.readyState===WebSocket.OPEN&&st.send(new TextEncoder().encode(an))}),m.current=st;let en=!1;st.onmessage=an=>{if(an.data instanceof ArrayBuffer){Xt.write(new Uint8Array(an.data)),w.current=(w.current+Ut.decode(an.data,{stream:!0})).slice(-65536);return}if(typeof an.data!="string")return;let At;try{At=JSON.parse(an.data)}catch{return}typeof At!="object"||At===null||!("type"in At)||(At.type==="complete"?(en=!0,st.close(),qe()):At.type==="error"&&(st.close(),rt(new Error("error"in At&&typeof At.error=="string"?At.error:jL()))))},st.onerror=()=>{st.close(),rt(new Error(Pv()))},st.onclose=()=>{Xt.dispose(),m.current=null,en||rt(new Error(Pv()))}});const je=(await hf(!0,!0)).find(qe=>qe.id==="opencode"&&qe.agentReady);if(!je)throw new Error(U0t());return D("opencode"),je})();return k.current=ke,ke.catch(()=>{}),ke};T.useEffect(()=>{t||v.current||!(b!=null&&b.length)||b.some(ke=>ke.catalogPending)||!b.every(ke=>!ke.installed&&!ke.installBroken)||jt()},[b,t]),T.useEffect(()=>{s===1&&f&&i(2)},[s,f]);const Pt=()=>{i(f?2:1)},Le=async(ke="complete")=>{var me;if(!(x||ke==="complete"&&(!Mt||!Fe))){C(!0),j(null),z("");try{const je=f?await jt():b==null?void 0:b.find(dt=>dt.id===M&&dt.agentReady&&!dt.catalogPending);if(!je)throw new Error(TL());if(ke==="setup")return;const qe=b9n(je,((me=je.models[0])==null?void 0:me.id)??null),rt=await r.mutateAsync([qe,{researchAreas:G,otherArea:G.includes("Other")?Q:null,background:Z||null,papers:$}]);e(rt.project,rt.selection)}catch(je){f&&(k.current=null);const qe=je instanceof Error?je.message:String(je);j(qe),z([w.current,qe].filter(Boolean).join(` -`))}finally{C(!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(U$,{harness:u,commands:c.data[u.id],onReady:ke=>{D(ke.id)},onClose:()=>{h(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(Cw,{})}),_.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:s_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:fdt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:agt()})]})}),_.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:bht()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Cmt()})]})}),_.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:Jdt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Kgt()})]})})]})]}),_.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(Ie,{variant:"primary",size:"large",onClick:Ft,disabled:I&&b===null,children:[I&&b===null?_.jsx(Nt,{}):null,Az()," ",_.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(Cw,{}),_.jsx("span",{children:Rmt()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:Sft()}),_.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:vpt()}),b!==null&&!ve&&!Re&&_.jsx("p",{className:Jj,children:_mt()}),b!==null&&ve&&M===null&&_.jsx("p",{className:Jj,children:Tft()}),(y===null||ce)&&_.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[_.jsx(tA,{gitVersion:y,error:ce}),ce?_.jsx("p",{className:Ew,children:_w()}):_.jsx("p",{className:Ew,children:Tz()})]}),_.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(ke=>{var ge;return _.jsx(t8n,{h:ke,remote:t,selected:M===ke.id,onSelect:()=>D(ke.id),commands:(ge=c.data)==null?void 0:ge[ke.id],onSetup:()=>h(ke)},ke.id)}):V?_.jsx("div",{className:Mu,children:_w()}):_.jsxs(Qr,{className:"py-2",children:[_.jsx(Nt,{})," ",Rdt()]})}),c.isError&&_.jsxs("p",{className:Mu,children:[yQe()," ",_.jsx(Ie,{variant:"ghost",onClick:()=>void c.refetch(),children:si()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Ie,{variant:"ghost",onClick:()=>i(0),children:[_.jsx($0,{size:12})," ",jz()]}),_.jsxs(Ie,{variant:"ghost",onClick:()=>Te(!0,!0),disabled:I,children:[_.jsx(Wa,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",Lv()]}),_.jsx("div",{className:"flex-1"}),_.jsxs(Ie,{variant:"primary",onClick:()=>i(2),disabled:I||!ve||M===null||!Fe,title:I||!ve&&Re?Mgt():ve?M===null?idt():ce?Ypt():y===void 0?Egt():y===null?Mht():void 0:smt(),children:[Az()," ",_.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(Cw,{}),!f&&_.jsx("span",{children:Bmt()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:Vmt()}),_.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:_.jsxs("div",{className:G$,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:Pgt()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Zft()}),_.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:Q7n.map(ke=>_.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:G.includes(ke.id),onChange:()=>ot(ke.id),disabled:x}),_.jsx("span",{children:ke.label()})]},ke.id))}),G.includes("Other")&&_.jsx("input",{className:"onb-other-area w-full mt-2",value:Q,onChange:ke=>K(ke.target.value),disabled:x,placeholder:Jmt(),"aria-label":Rpt()})]}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:_0t()}),_.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:ke=>J(ke.target.value),disabled:x,rows:4,placeholder:Bdt()}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:s0t()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:__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:F,onChange:ke=>U(ke.target.value),disabled:x,placeholder:S0t()}),ie?_.jsx("div",{className:Mu,children:T0t()}):H.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:H.map(ke=>_.jsxs("button",{type:"button",onClick:()=>$e(ke),disabled:x,children:[_.jsx(H0,{children:eA(ke.title)}),_.jsx("span",{className:"id",children:ke.paperId})]},ke.paperId))}):null]}),$.length>0&&_.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:$.map(ke=>_.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(H0,{children:ke.title||ke.paperId}),_.jsx("span",{className:"id",children:ke.paperId}),_.jsx("button",{type:"button","aria-label":zJ({name:Ce(ke.paperId)}),onClick:()=>wt(ke.paperId),disabled:x,children:_.jsx(br,{size:12})})]},ke.paperId))})]})}),!Mt&&_.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:G.length===0?Gft():Cdt()}),f&&!Fe&&_.jsxs("div",{className:"mt-5",role:"status",children:[_.jsx(tA,{gitVersion:y,error:ce}),_.jsx("p",{className:Ew,children:ce?_w():Tz()}),_.jsx(Ie,{onClick:()=>Te(!0,!0),disabled:I,children:Lv()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Ie,{variant:"ghost",onClick:()=>i(f?0:1),disabled:x,children:[_.jsx($0,{size:12})," ",jz()]}),_.jsx("div",{className:"flex-1"}),_.jsx(Ie,{variant:"primary",onClick:()=>void Le(),disabled:x||!Fe||!f&&M===null||!Mt,children:x?_.jsxs(_.Fragment,{children:[_.jsx(Nt,{})," ",Y0t()]}):_.jsxs(_.Fragment,{children:[aht()," ",_.jsx(sv,{size:13})]})})]}),M===null&&!f&&_.jsx("p",{className:W7n,children:e1t()}),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(MS,{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(Ie,{size:"small",onClick:()=>void Le(Mt&&Fe?"complete":"setup"),disabled:x,children:si()}),f&&_.jsx(Ie,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:x,onClick:()=>{p(!1),j(null),i(1)},children:$ft()}),_.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:Vdt()}),_.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 eA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function Z7n(e){return e.catalogPending?{tone:"warning",label:ff()}:e.authCheckFailed?{tone:"warning",label:fw()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||ey(e)?Rm():e.authMethod==="local"||!e.authenticated?vS():vmt()}:e.installed?e.installBroken?{tone:"warning",label:Eht()}:e.authMethod==="local"?{tone:"warning",label:SL()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:fw()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:fw()}:e.authState==="unsupported"?{tone:"warning",label:bgt()}:e.installed?{tone:"warning",label:kL()}:{tone:"neutral",label:Rz()}:{tone:"neutral",label:Rz()}}function J7n(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:Ub(e,n).defaultId}}function e8n({harness:e}){return _.jsx(Th,{harness:e,size:26})}function t8n({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"),h=Z7n(e),f=t&&!e.authCheckFailed?{tone:"success",label:$0t()}:h,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(e8n,{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(Zd,{tone:h.tone,className:"font-normal",children:h.label})]}),c&&!u&&_.jsx(Zd,{tone:f.tone,children:f.label})]})]}),c?_.jsxs(Ie,{size:"small",onClick:i,disabled:!s,"aria-haspopup":"dialog",title:BQe(),children:[_.jsx(xo,{size:14}),!e.installed||e.installBroken?aQe():e.authState==="unsupported"?fXe():pL()]}):_.jsx(Zd,{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(Nt,{})," ",Pht()]}):_.jsxs(_.Fragment,{children:[ey(e)??e.account??(e.authMethod==="apiKey"?gS():null),e.plan?` · ${e.plan}`:""]})}),m&&_.jsx("div",{className:Mu,children:m}),e.authCheckFailed&&e.agentNote&&_.jsx("div",{className:Mu,children:Hu(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:Mu,children:p}),!c&&e.agentNote&&_.jsx("div",{className:`${Mu} [&_code]:whitespace-pre-wrap break-words`,children:Hu(e.agentNote)})]})}function tA({gitVersion:e,error:n}){return _.jsxs("div",{className:G$,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:Kht()}),_.jsx(Zd,{tone:e?"success":n||e===null?"danger":"warning",children:e?vS():n?sft():e===null?wL():ff()})]}),(e||!n&&e===void 0)&&_.jsx("div",{className:Mu,children:e??gft()})]})}const n8n="/assets/slurm-logo-aGSXVZcE.svg",r8n="/assets/thinking-machines-BOdslTfm.png";function s8n(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 oL();case"tinker_job":return"Tinker";default:return e||"—"}}function i8n({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 a8n({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 o8n({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 c8n({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 l8n({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 u8n({size:e=16}){return _.jsx("img",{className:"tinker-logo block flex-none object-contain",src:r8n,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 _8n({size:e=16}){return _.jsx("img",{className:"block flex-none object-contain",src:n8n,width:e,height:e,alt:"","aria-hidden":"true"})}function ty({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 Yh({kind:e,size:n=16}){switch(e){case"modal_job":return _.jsx(a8n,{size:n});case"hf_job":return _.jsx(i8n,{size:n});case"k8s_job":return _.jsx(o8n,{size:n});case"ssh_job":return _.jsx(Pj,{size:n,strokeWidth:1.5});case"slurm_job":return _.jsx(_8n,{size:n});case"ray_job":return _.jsx(c8n,{size:n});case"openresearch_job":return _.jsx(l8n,{size:n});case"tinker_job":return _.jsx(u8n,{size:n});case"local_job":return _.jsx(rCn,{size:n,strokeWidth:1.5});default:return _.jsx(Pj,{size:n})}}function XS({backend:e}){const n=CS(e),t=c5n(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(Yh,{kind:n}),_.jsx("span",{className:"backend-name",children:s8n(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 Nw(e,n){const[t,r]=T.useState(e);return T.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function g1(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function f8n(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 d8n(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 h8n(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function p8n({onCreated:e,onCancel:n,remote:t=!1}){var ur,Rn,Kn,rr;const[r,s]=T.useState("blank"),[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,h]=T.useState(""),[f,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(!1),[b,y]=T.useState(null),[x,C]=T.useState(!1),[N,j]=T.useState(!1),[A,z]=T.useState(""),[M,D]=T.useState(null),[I,B]=T.useState(!1),G=T.useRef(0),q=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"?d8n(M==null?void 0:M.repoUrl):null,Z=i.trim()?`~/OpenResearch/${g1(i,48)}`:"",J=`~/OpenResearch/${g1(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,$=r==="blank"&&!f?Z:r==="paper"&&M&&!f?J:u,L=Nw($.trim(),200),F=_t({...b0(L),enabled:!!L&&L===$.trim()}),U=L===$.trim()?F.data??null:null,H=L===$.trim()?((ur=F.error)==null?void 0:ur.message)??null:null,ae=!!$.trim()&&(L!==$.trim()||F.isFetching),ie=K??(r==="folder"&&(U!=null&&U.githubOwner)&&U.githubRepo?{owner:U.githubOwner,repo:U.githubRepo}:null),ue=_t(J5n()),re=((Rn=ue.data)==null?void 0:Rn.login)??(ue.isPending?void 0:null),V=_t(ES()),oe=T.useRef(!1);T.useEffect(()=>{oe.current||!V.data||(oe.current=!0,j(V.data.githubForNewProjects))},[V.data]);const ce=Nw(i.trim(),150),me=_t({...ekn(ce),enabled:ce===i.trim()}),ve=ce===i.trim()?((Kn=me.data)==null?void 0:Kn.repo)??g1(i,48):g1(i,48),Re=ce!==i.trim()||me.isFetching,Fe=_t({...xj((ie==null?void 0:ie.owner)??"",(ie==null?void 0:ie.repo)??""),enabled:!!ie,subscribed:!!ie}),Xe=!!ie&&Fe.isFetching,Te=ie&&((rr=Fe.data)!=null&&rr.canPush)?`github.com/${ie.owner}/${ie.repo}`:null,$e=Nw(A.trim(),350),wt=f8n($e),ot=r==="paper"&&!M&&$e===A.trim(),Mt=_t({...HI($e),enabled:ot&&!wt&&$e.length>=3,subscribed:ot&&!wt&&$e.length>=3}),jt=_t({...J3(wt??""),enabled:ot&&!!wt,subscribed:ot&&!!wt}),Ft=ot&&!wt?Mt.data??[]:[],Le=ot&&Mt.isSuccess?$e:"",tt=I||r==="paper"&&!M&&($e!==A.trim()||(wt?jt.isFetching:Mt.isFetching));T.useEffect(()=>{var St;!ot||!wt||!jt.data||(D(jt.data),o||a(((St=jt.data.title)==null?void 0:St.trim())||jt.data.paperId))},[ot,wt,jt.data,o]),T.useEffect(()=>{const St=wt?jt.error:Mt.error;ot&&St&&y(St.message)},[ot,wt,jt.error,Mt.error]);const ke=gn({mutationFn:qwn});async function ge(St){var ir;const It=++G.current;B(!0),y(null);try{const ar=await et.fetchQuery(J3(St));if(It!==G.current)return;D(ar),o||a(((ir=ar.title)==null?void 0:ir.trim())||ar.paperId)}catch(ar){It===G.current&&y(ar instanceof Error?ar.message:String(ar))}finally{It===G.current&&B(!1)}}function Ne(){G.current+=1,q.current+=1,D(null),z(""),B(!1),w(!1),h(""),p(!1),Q.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function qe(St){if(St===r)return;G.current+=1,q.current+=1,Q.current[r]={name:i,nameTouched:o,path:u,pathTouched:f};const It=Q.current[St];s(St),y(null),B(!1),w(!1),a(It.name),c(It.nameTouched),h(It.path),p(It.pathTouched)}async function nt(){if(m)return;const St=++q.current;w(!0),y(null);try{const It=await Hwn();if(St!==q.current||!It)return;if(p(!0),h(It),et.invalidateQueries(b0(It)),r==="folder"&&!o){const ir=It.replace(/[\\/]+$/,"").split(/[\\/]/).pop();ir&&a(ir)}}catch(It){St===q.current&&y(It instanceof Error?It.message:String(It))}finally{St===q.current&&w(!1)}}async function ht(St){if(St.preventDefault(),!!bt){v(!0),y(null);try{const It=await et.fetchQuery({...b0($.trim()),staleTime:0});if(It.exists&&It.directory===!1)throw new Error(lw());if(r==="blank"&&It.exists)throw new Error(kz());if(r==="paper"&&It.empty===!1)throw new Error(zz());N&&ie&&await et.fetchQuery({...xj(ie.owner,ie.repo),staleTime:0}).catch(()=>null);const ir=await ke.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(ir.project,ir.githubPublicationError)}catch(It){y(It instanceof Error?It.message:String(It))}finally{v(!1)}}}const rt=i.trim(),qt=r==="paper"&&M&&!M.repoUrl?M.paperId:null,Xt=r==="folder"&&(U==null?void 0:U.gitState)==="ready"?U.resolvedPath??null:null,Jt=rt!==""&&(qt!==null||Xt!==null);T.useEffect(()=>{if(!Jt)return;const St=window.setTimeout(()=>{Qwn({name:rt,paperId:qt??void 0,path:Xt??void 0,locale:E()}).catch(()=>{})},1200);return()=>window.clearTimeout(St)},[Jt,rt,qt,Xt]);const an=(U==null?void 0:U.gitVersion)===null,At=r==="folder"&&!!$.trim()&&U!==null&&U.exists===!1,bn=r==="blank"&&(U==null?void 0:U.exists)===!0,on=!!$.trim()&&(U==null?void 0:U.exists)===!0&&U.directory===!1,Ot=r==="paper"&&!!(M!=null&&M.repoUrl)&&(U==null?void 0:U.empty)===!1,hn=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(U==null?void 0:U.empty)===!1,cn=r==="folder"&&((U==null?void 0:U.gitState)==="detached"||(U==null?void 0:U.gitState)==="invalid"),Sn=f&&!$.trim()||on||Ot||hn,Vn=f&&!$.trim()||on||bn,hs=f&&!$.trim()?Nz():on?lw():bn?kz():null,es=f&&!$.trim()?Nz():on?lw():Ot?zz():hn?Git():null,bt=!!(i.trim()&&$.trim())&&!k&&!m&&!ae&&U!==null&&!H&&!an&&!At&&!bn&&!on&&!Ot&&!hn&&!cn&&(r!=="paper"||!!M)&&(!N||typeof re=="string"&&!Re&&!Xe),ln=Te??`github.com/${re??"you"}/${ve}`,xn=re===void 0||Re||Xe,un=r==="paper"&&!M&&A.trim().length>=3&&Le===A.trim()&&!tt&&Ft.length===0&&!b;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:ht,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:()=>qe("blank"),children:rot()}),_.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:()=>qe("folder"),children:Uot()}),_.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:()=>qe("paper"),children:sct()})]}),r==="paper"&&!M&&_.jsxs("label",{className:"!font-normal",children:[Gct(),_.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:A,onChange:St=>{y(null),z(St.target.value)},placeholder:ult()}),!un&&_.jsx("span",{className:"repo-hint",children:tt?$ut():Sut()}),un&&_.jsx("span",{className:"project-path-notice block",children:Sct()}),Ft.length>0&&_.jsx("div",{className:"paper-results",children:Ft.map(St=>_.jsxs("button",{type:"button",onClick:()=>void ge(St.paperId),children:[_.jsx(H0,{children:St.title}),_.jsx("span",{className:"id",children:St.paperId})]},St.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(H0,{className:"block",children:M.title||M.paperId}),M.repoUrl&&_.jsx("div",{className:"id",children:h8n(M.repoUrl)})]}),_.jsx(Ie,{size:"small",type:"button","aria-label":Sot(),onClick:Ne,children:got()})]}),!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(MS,{size:16})," ",Tct()]}),_.jsx("span",{className:"text-sm font-normal text-accent-amber",children:$ct()})]})]}),(r!=="paper"||M)&&_.jsxs(_.Fragment,{children:[r==="blank"&&_.jsxs("label",{className:"!font-normal",children:[_.jsx("span",{className:"project-field-label !font-medium",children:Ez()}),_.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:St=>{c(!0),a(St.target.value)},placeholder:Cz()})]}),r==="paper"?_.jsxs("label",{className:"project-location-field",children:[_.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?vat():uw()}),_.jsx("input",{className:"text-sm font-normal",value:$,onChange:St=>{p(!0),h(St.target.value)},"aria-describedby":Sn?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),ae&&_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Sz()}),Sn&&_.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:es})]}):r==="folder"&&!t?_.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?Zit({path:Ce(u)}):xz(),disabled:m,title:u||void 0,onClick:()=>void nt(),children:[_.jsx(Fu,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),_.jsx("span",{className:u?"text-sm":"placeholder",children:m?_at():u||xz()}),_.jsx(Ka,{className:"folder-picker-chevron",size:15})]}):r==="folder"?_.jsxs("label",{className:"project-location-field",children:[_.jsx("span",{className:"project-location-label !font-medium",children:uw()}),_.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:St=>{p(!0),h(St.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:uw()}),_.jsx("input",{className:"text-sm font-normal",value:$,onChange:St=>{p(!0),h(St.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":Vn?"blank-destination-description":void 0,spellCheck:!1}),ae&&_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Sz()}),Vn&&_.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:hs})]}):null,r!=="blank"&&$&&_.jsxs("label",{className:"!font-normal",children:[_.jsx("span",{className:"project-field-label !font-medium",children:Ez()}),_.jsx("input",{className:"text-sm font-normal",value:i,onChange:St=>{c(!0),a(St.target.value)},placeholder:Cz()})]}),an&&_.jsx("div",{className:"project-path-notice error",children:_ct()}),!an&&r==="folder"&&u.trim()&&!ae&&(U==null?void 0:U.exists)===!1&&_.jsx("div",{className:"project-path-notice error",children:Slt()}),!an&&r==="folder"&&u.trim()&&!ae&&on&&_.jsx("div",{className:"project-path-notice error",children:$lt()}),!an&&r==="folder"&&!ae&&(U==null?void 0:U.gitState)==="detached"&&_.jsx("div",{className:"project-path-notice error",children:Tot()}),!an&&r==="folder"&&!ae&&(U==null?void 0:U.gitState)==="invalid"&&_.jsx("div",{className:"project-path-notice error",children:Tlt()}),H&&_.jsx("div",{className:"project-path-notice error",role:"alert",children:H})]}),b&&_.jsx("div",{className:"error",role:"alert",children:b}),(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&&re===null?" text-accent-red":" text-text"}`,"aria-expanded":x,"aria-controls":"new-project-advanced-settings",onClick:()=>C(St=>!St),children:[N?re===null?Tit():$it():xL(),_.jsx(pc,{className:x?"rotate-180":"",size:16})]}),x&&_.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:St=>j(St.target.checked),disabled:k}),_.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:glt()})]}),_.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[_.jsx("span",{children:xn?Glt({repository:Ce(ln)}):Te?iut({repository:Ce(ln)}):Zlt({repository:Ce(ln)})}),_.jsx("span",{children:Yot()}),re===null&&_.jsx("span",{children:Tut({command:Ce("gh auth login")})})]})]})]}),_.jsxs("div",{className:"actions new-project-actions",children:[n&&_.jsx(Ie,{type:"button",onClick:n,children:uot()}),_.jsx(Ie,{variant:"primary",className:"ms-auto",disabled:!bt,children:k?$at():r==="paper"?M!=null&&M.repoUrl?Cat():wz():r==="folder"?Gut():wz()})]})]})}function V$({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 h=o();if(h.length===0){u.preventDefault(),i.focus();return}const f=h[0],p=h[h.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:TL()}),_.jsx(p8n,{onCancel:e,onCreated:n,remote:t})]})})}function m8n({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const i=T.useRef(null),a=T.useRef(r),o=T.useRef(n);a.current=r,o.current=n,T.useEffect(()=>{const u=i.current;if(!u)return;const h=document.activeElement instanceof HTMLElement?document.activeElement:null,f=()=>[...u.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(f()[0]??u).focus();const p=m=>{if(m.key==="Escape"){m.preventDefault(),o.current||a.current();return}if(m.key!=="Tab")return;const w=f();if(w.length===0){m.preventDefault(),u.focus();return}const k=w[0],v=w[w.length-1];m.shiftKey&&document.activeElement===k?(m.preventDefault(),v.focus()):!m.shiftKey&&document.activeElement===v&&(m.preventDefault(),k.focus())};return document.addEventListener("keydown",p,!0),()=>{document.removeEventListener("keydown",p,!0),h==null||h.focus()}},[]);const c=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return _.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:u=>{!n&&u.target===u.currentTarget&&r()},children:_.jsxs("div",{ref:i,className:"modal w-110 max-w-full bg-background border border-border rounded-xl shadow-modal p-6",role:"dialog","aria-modal":"true","aria-labelledby":"delete-project-dialog-title","aria-describedby":"delete-project-dialog-description",tabIndex:-1,children:[_.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:s3t()}),_.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[_.jsx("p",{className:"m-0",children:S4t({name:ua(e.name)})}),_.jsx("p",{className:"m-0",children:c?T3t():$3t()}),t&&_.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),_.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[_.jsx(Ie,{disabled:n,onClick:r,children:U4t()}),_.jsx(Ie,{variant:"danger",disabled:n,onClick:s,children:n?v3t():_3t()})]})]})})}function nA(){return _.jsx("span",{className:"activity-pulse h-2 w-2 shrink-0 rounded-full bg-accent-teal animate-[or-pulse_1.2s_ease-in-out_infinite]"})}function g8n({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[i,a]=T.useState(!1),[o,c]=T.useState(null),[u,h]=T.useState(null),[f,p]=T.useState(null),m=_t(Z5n()),w=Object.fromEntries((m.data??[]).map(v=>[v.projectId,v]));async function k(v){c(v.id),h(null);try{await Zwn(v.id),h(null),p(null),r(v.id)}catch(b){h(b instanceof Error?b.message:String(b))}finally{c(null)}}return _.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[_.jsxs("div",{className:"home-inner max-w-290 my-0 mx-auto pt-12 px-6 pb-16 [@media((max-width:_960px))]:pt-6 [@media((max-width:_960px))]:px-4 win-titlebar:[@media((max-width:_960px))]:pt-10",children:[_.jsxs("div",{className:"home-head flex items-center justify-between gap-3 mb-4.5 [&_h2]:m-0 [&_h2]:text-4xl [&_h2]:tracking-[-0.02em] [@media((max-width:_520px))]:items-start [@media((max-width:_520px))]:flex-col",children:[_.jsx("h2",{children:_5t()}),_.jsxs(Ie,{onClick:()=>a(!0),children:[_.jsx(Xh,{size:15})," ",TL()]})]}),_.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:_.jsxs("div",{children:[_.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border bg-background py-2.5 ps-4 pe-2 text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:hidden",children:[_.jsx("span",{children:s5t()}),_.jsx("span",{children:Lz()}),_.jsx("span",{children:Iz()}),_.jsx("span",{children:$z()})]}),e.length===0?_.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:Y3t()}):[...e].sort((v,b)=>{var C,N;const y=((C=w[v.id])==null?void 0:C.lastMessageAt)??v.createdAt;return(((N=w[b.id])==null?void 0:N.lastMessageAt)??b.createdAt)-y||v.name.localeCompare(b.name)}).map(v=>{const b=w[v.id],y=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,x=y?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:y.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):Iv(),C=b?b.activeAgents>0?u4t({count:Zt(b.activeAgents)}):S5t():"—",N=b?b.totalAgents===1?I5t():g4t({count:Zt(b.totalAgents)}):"—",j=b?b.runningExperiments>0?U5t({count:Zt(b.runningExperiments)}):b.totalExperiments===0?xS():Bz({count:Zt(b.totalExperiments)}):"—",A=b&&b.runningExperiments>0?Bz({count:Zt(b.totalExperiments)}):null;return _.jsxs("div",{className:"group project-row relative grid cursor-pointer grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border-variant py-4 ps-4 pe-2 text-start transition-colors duration-120 ease-standard last:border-b-0 hover:bg-surface-bright focus-within:bg-surface-bright [@media((max-width:_960px))]:grid-cols-[minmax(0,0.8fr)_minmax(0,0.8fr)_minmax(0,1.4fr)] [@media((max-width:_960px))]:items-start [@media((max-width:_960px))]:gap-x-4 [@media((max-width:_960px))]:gap-y-3 [@media((max-width:_960px))]:py-4 [@media((max-width:_960px))]:px-4 [@media((max-width:_600px))]:grid-cols-2",children:[_.jsx("button",{className:"project-row-open absolute inset-0 z-0 cursor-pointer rounded-[inherit] focus-visible:outline focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-[-2px]","aria-label":OZ({name:ua(v.name)}),onClick:()=>n(v.id)}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none [@media((max-width:_960px))]:col-span-3 [@media((max-width:_600px))]:col-span-2",children:[_.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),_.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[_.jsxs("span",{children:[Y4t()," ",yo(v.createdAt)]}),v.paperId&&_.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&_.jsxs("span",{children:[I4t()," ",Ce(v.paperId)]}),_.jsx("button",{className:"project-row-secondary project-row-delete inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm leading-0 text-muted opacity-0 pointer-events-none transition-opacity hover:bg-surface hover:text-accent-red group-hover:opacity-100 group-hover:pointer-events-auto group-focus-within:opacity-100 group-focus-within:pointer-events-auto focus:opacity-100 focus:pointer-events-auto focus-visible:outline focus-visible:outline-2 focus-visible:outline-text","aria-label":w3({name:ua(v.name)}),disabled:o===v.id,onClick:z=>{z.stopPropagation(),h(null),p(v)},children:_.jsx(Df,{size:14})})]})]}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:Lz()}),_.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.activeAgents>0&&_.jsx(nA,{}),C]}),_.jsx("span",{className:"text-xs text-muted",children:N})]}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:Iz()}),_.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.runningExperiments>0&&_.jsx(nA,{}),j]}),A&&_.jsx("span",{className:"text-xs text-muted",children:A})]}),_.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:mb-1 [@media((max-width:_960px))]:block",children:$z()}),y?_.jsxs("a",{className:"project-row-secondary inline-flex max-w-full items-center gap-2 text-sm text-text no-underline pointer-events-auto hover:underline underline-offset-2",href:y,target:"_blank",rel:"noreferrer","aria-label":Ov({name:ua(v.name)}),children:[_.jsx("span",{className:"inline-flex shrink-0",children:_.jsx(ty,{size:14})}),_.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ce(x)})]}):_.jsx("span",{className:"text-sm text-text pointer-events-none",children:x})]})]},v.id)})]})})]}),i&&_.jsx(V$,{remote:s,onClose:()=>a(!1),onCreated:(v,b)=>{a(!1),t(v,b)}}),f&&_.jsx(m8n,{project:f,deleting:o===f.id,error:u,onClose:()=>{h(null),p(null)},onConfirm:()=>void k(f)})]})}function K$(){const e=T.useSyncExternalStore(K5n,vj,vj);return _.jsxs(_.Fragment,{children:[_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":z3()}),!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(MS,{size:13,className:"shrink-0 text-accent-amber"}),_.jsx("span",{dir:"auto",className:"min-w-0",children:z3()})]})]})}function v8n({onClose:e,onConfigureSsh:n}){var v,b,y;const t=gn({mutationFn:x=>e3n(...x)}),r=_t(OI()),s=_t(w5n()),i=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[o,c]=T.useState(""),u=i?null:((b=r.error)==null?void 0:b.message)??((y=s.error)==null?void 0:y.message)??null,[h,f]=T.useState(null),p=T.useRef(null);Dm(p,e);async function m(x){const C="__ORX_DESKTOP__"in window,N=C?null:window.open("/remote-launch","_blank");if(!C&&!N){sn(bCt(),"error");return}f(x);try{const j=await t.mutateAsync([x,{theme:okn(),locale:E()}]);N?N.location.replace(j.gatewayUrl):window.open(j.gatewayUrl,"_blank"),e()}catch(j){N==null||N.close(),sn(j instanceof Error?j.message:String(j),"error")}finally{f(null)}}const w=i==null?void 0:i.filter(x=>x.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),k=new Map(a.map(x=>[x.host,x]));return ai.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:x=>{x.target===x.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($t,{className:"absolute end-3.5 top-3.5","aria-label":Ykt(),onClick:e,children:_.jsx(br,{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:T3()}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:sSt()}),_.jsx(Kr,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:x=>c(x.target.value),placeholder:Hz(),"aria-label":Hz()})]}),_.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(Nt,{})," ",QL()]}):(w==null?void 0:w.length)===0?_.jsx("p",{className:"m-3 text-sm text-subtext",children:G6t()}):w==null?void 0:w.map(x=>{const C=k.get(x.host);return _.jsxs(Ie,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:h===x.host,onClick:()=>void m(x.host),children:[_.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:x.host}),h===x.host?_.jsx(Nt,{}):C?_.jsx("span",{className:"text-sm text-subtext",children:iCt()}):null]},x.host)})}),_.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:_.jsxs(Ie,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[_.jsx(z$,{size:15}),oI()]})})]})}),document.body)}function Yv({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 b8n="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",y8n="/assets/ollama-logo-Bt9O-2K_.png",x8n="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",W$={id:"lmstudio",label:"LM Studio",icon:b8n,url:"http://127.0.0.1:1234/v1"},ov=[W$,{id:"omlx",label:"oMLX",icon:x8n,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:y8n,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 Q$({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var K,Z;const s=_t({...T5n(),enabled:!t}),i=_t(Pu()),a=(K=i.data)==null?void 0:K.find(J=>J.id==="opencode"),[o,c]=T.useState(t),u=()=>{c(!1),r==null||r()},[h,f]=T.useState("lmstudio"),p=ov.find(J=>J.id===h)??W$,[m,w]=T.useState({}),k=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:b,model:y,contextWindow:x,error:C}=k,N=p.id==="ollama"?"":k.apiKey,j=J=>{w($=>({...$,[p.id]:{...$[p.id]??k,...J}}))},A=gn({mutationFn:u5n}),z=gn({mutationFn:async J=>{var F;const $=await _5n(J);if(!((F=(await pf(!0)).find(U=>U.id==="opencode"))!=null&&F.models.some(U=>U.id===$.model)))throw new Error(iet());return $}}),M=gn({mutationFn:d5n}),D=Number(x),I=A.isPending||z.isPending,B=(J={})=>j({models:[],model:null,error:null,...J}),G=async()=>{B();try{const J=await A.mutateAsync({baseUrl:v.trim(),apiKey:N});j({models:J.models,model:J.models[0]??null})}catch(J){j({error:J instanceof Error?J.message:String(J)})}},q=async()=>{if(y){j({error:null});try{const J=await z.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:N,model:y,contextWindow:D});u(),n==null||n(J.model)}catch(J){j({error:J instanceof Error?J.message:String(J)})}}},Q=async J=>{try{await M.mutateAsync(J)}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":mz(),children:[_.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[_.jsx("h3",{className:"text-base font-medium",children:mz()}),_.jsxs(Ie,{disabled:I,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[_.jsx(Xh,{size:14}),vL()]})]}),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(J=>_.jsx(w8n,{connection:J,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:I||M.isPending,onRemove:()=>void Q(J.id)},J.id))})]}),o&&_.jsx(k8n,{busy:I,onClose:u,footer:_.jsxs(Ie,{variant:"primary",disabled:I||!e||b.length>0&&(!y||!Number.isSafeInteger(D)||D<4096),onClick:()=>void(b.length>0?q():G()),children:[I&&_.jsx(Nt,{}),b.length>0?ptt():VJe()]}),children:_.jsxs("div",{className:"space-y-4",children:[!e&&_.jsxs("div",{className:"text-sm text-text",children:[_.jsx("p",{children:ttt()}),_.jsx(jh,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:Wet()})]}),_.jsx(cc,{choices:ov,value:h,title:pz(),header:pz(),variant:"field",floating:!0,dropDown:!0,disabled:I,renderLabel:J=>_.jsxs(_.Fragment,{children:[J.id==="openai-compatible"?pS():J.label,J.id==="openai-compatible"&&_.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:bL()})]}),renderIcon:J=>{var L;const $=(L=ov.find(F=>F.id===J.id))==null?void 0:L.icon;return $?_.jsx("img",{src:$,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${J.id==="ollama"?" dark:invert":""}`}):_.jsx(k$,{size:14,className:"shrink-0"})},onSelect:f}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:BJe()}),_.jsx(Kr,{value:v,disabled:I,onChange:J=>{B({baseUrl:J.target.value})}})]}),p.id!=="ollama"&&_.jsxs("details",{className:"text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:BL()}),_.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[_.jsx("span",{children:p.id==="lmstudio"?Ott():ctt()}),_.jsx(Kr,{type:"password",autoComplete:"off",value:N,disabled:I,onChange:J=>B({apiKey:J.target.value})})]})]},p.id),b.length>0&&_.jsxs(_.Fragment,{children:[_.jsx(cc,{choices:b.map(J=>({id:J,label:J})),value:y,searchPlaceholder:bst(),title:v0(),header:v0(),variant:"field",floating:!0,dropDown:!0,disabled:I,onSelect:J=>{j({model:J})}}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:yet()}),_.jsx(Kr,{type:"number",min:4096,step:1024,value:x,disabled:I,onChange:J=>{j({contextWindow:J.target.value})}})]}),_.jsx("p",{className:"text-sm text-subtext",children:zet()})]}),C&&_.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:C})]})})]})}function w8n({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:i,onRemove:a}){const o=gn({mutationFn:async()=>{try{await f5n(e.id)}finally{await pf(!0)}}}),c=ov.find(w=>w.label===e.name||w.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),h=u.length>0&&n&&u.every(w=>t.includes(`${e.id}/${w}`)),f=o.isPending||r,p=s,m=h;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(k$,{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"?pS():(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:bL()})," · ",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(Wt,{variant:f||p?"default":m?"success":"warning",children:f?ba():p?YL():m?det():po()})}),_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsxs(Ie,{variant:"ghost",disabled:i||o.isPending,onClick:()=>o.mutate(),children:[_.jsx(Wa,{size:14}),Lv()]}),_.jsx($t,{"aria-label":Fet({name:e.name}),disabled:i||o.isPending,onClick:a,children:_.jsx(Df,{size:14})})]})]})]}),o.error&&!m&&_.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:o.error.message})]})}function k8n({busy:e,onClose:n,footer:t,children:r}){const s=T.useRef(null),i=()=>{e||n()};return Dm(s,i,"input"),ai.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:vL()})}),_.jsx($t,{className:"absolute end-3.5 top-3.5","aria-label":df(),onClick:i,disabled:e,children:_.jsx(br,{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(Ie,{onClick:i,disabled:e,children:df()}),t]})]})}),document.body)}const X$=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),zw=["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(" "),yu={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function S8n(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:Hv(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Ub(n,t).defaultId}}function Vi(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 C8n({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:i,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:c,autonomy:u,onSelectAutonomy:h,lockHarness:f=!1,openRequest:p=0,className:m}){var Xe,Te,$e,wt,ot,Mt,jt,Ft;const{data:w=E8n}=_t(Pu()),k=zm(),[v,b]=T.useState(!1),y=T.useRef(null),x=T.useRef(null),{open:C,setOpen:N,ref:j}=Vi(y),[A,z]=T.useState(""),[M,D]=T.useState("root"),I=()=>{N(!1),D("root"),z("")},B=T.useRef(p);T.useEffect(()=>{p!==B.current&&(B.current=p,D("models"),z(""),N(!0))},[p,N]),T.useEffect(()=>{var Le;C&&(M==="reasoning"||M==="speed"||M==="permissions")&&((Le=x.current)==null||Le.focus())},[C,M]);const G=T.useMemo(()=>{const Le=A.trim().toLowerCase();return(f&&e?w.filter(ke=>ke.id===e.harness):w).map(ke=>{let ge=ke.models;return Le?ge=ge.filter(Ne=>`${Ne.id} ${nv(Ne)}`.toLowerCase().includes(Le)):(ke.id==="opencode"||ke.id==="cursor"||ke.id==="antigravity")&&(ge=ge.slice(0,5)),{harness:ke,models:ge,hidden:Le?0:ke.models.length-ge.length}})},[w,A,f,e]),q=(Le,tt)=>{var ge;const ke=(e==null?void 0:e.harness)===Le.id;n({harness:Le.id,model:tt,serviceTier:Hv(Le,tt,ke?e==null?void 0:e.serviceTier:null),permissionMode:ke?e.permissionMode:((ge=Le.options)==null?void 0:ge.defaultPermissionMode)??null,reasoningLevel:TI(Le,tt,ke&&Le.models.some(Ne=>Ne.id===tt)?e.reasoningLevel:null)}),I()},Q=(e==null?void 0:e.model)!=null?(Xe=w.find(Le=>Le.id===e.harness))==null?void 0:Xe.models.find(Le=>Le.id===e.model):void 0,K=e?e.model?Q?nv(Q):`${F3(e.model)} · ${yz()}`:N3():v0(),Z=(e==null?void 0:e.reasoningLevel)??o??((Te=a[0])==null?void 0:Te.id),J=($e=a.find(Le=>Le.id===Z))==null?void 0:$e.label,$=(e==null?void 0:e.permissionMode)??s??((wt=r[0])==null?void 0:wt.id),L=(ot=r.find(Le=>Le.id===$))==null?void 0:ot.label,F=(e==null?void 0:e.harness)==="opencode"?_it():Mrt(),U=w.find(Le=>Le.id===(e==null?void 0:e.harness)),H=AI(U,e==null?void 0:e.model),ae=Hv(U,e==null?void 0:e.model,e==null?void 0:e.serviceTier),ie=(Mt=H.find(Le=>Le.id===ae))==null?void 0:Mt.label,ue=Le=>{c==null||c(Le),I()},re=Le=>{i==null||i(Le),I()},V=[{id:"agentic",label:Mnt(),description:Pnt()},{id:"copilot",label:Knt(),description:ert()}],oe=(jt=V.find(Le=>Le.id===u))==null?void 0:jt.label,ce=Le=>{const tt=V.find(ke=>ke.id===Le);tt&&(h==null||h(tt.id)),I()},me=Le=>{e&&n({...e,serviceTier:Le}),I()},ve=(Le,tt,ke)=>_.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(ke),children:[_.jsx("span",{className:"flex-1",children:Le}),tt&&_.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:tt}),_.jsx(Ka,{size:14,className:"shrink-0 text-muted"})]}),Re=Le=>_.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[_.jsx($t,{ref:x,type:"button",size:"small",className:"model-submenu-header","aria-label":AL(),onClick:()=>{D("root"),z("")},children:_.jsx(p$,{size:15})}),_.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:Le}),M==="models"&&_.jsx($t,{type:"button",size:"small","aria-label":O3(),onClick:()=>{I(),t()},children:_.jsx(BS,{size:15,"aria-hidden":"true"})})]}),Fe=(Le,tt,ke,ge)=>_.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:Le.map(Ne=>_.jsxs(yn,{onClick:()=>ge(Ne.id),children:[_.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[_.jsxs("span",{children:[Ne.label,Ne.id===ke&&_.jsxs("span",{className:"font-normal text-muted",children:[" ",yL()]})]}),Ne.description&&_.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:Ne.description})]}),Ne.id===tt&&_.jsx(yi,{size:13})]},Ne.id))});return _.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:j,children:[_.jsxs("button",{ref:y,type:"button",className:Ss("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:PX({label:`${K}${J?` · ${J}`:""}${ie?` · ${ie}`:""}`}),"aria-haspopup":"menu","aria-expanded":C,onClick:()=>{C?I():(D("root"),N(!0))},children:[ae==="priority"?_.jsx(s7n,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?_.jsx(Th,{harness:e.harness,size:14}):null,ae==="priority"&&_.jsxs("span",{className:"sr-only",children:[Prt()," "]}),_.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[K,J&&_.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:J})]}),_.jsx(pc,{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(v0(),K,"models"),a.length>0&&ve(F,J,"reasoning"),H.length>0&&ve(bz(),ie,"speed"),r.length>0&&ve(vz(),L,"permissions"),h&&ve(gz(),oe,"autonomy")]}),M==="models"&&_.jsxs(_.Fragment,{children:[Re(v0()),_.jsx("input",{autoFocus:!0,type:"text",placeholder:Est(),value:A,onChange:Le=>z(Le.target.value)}),_.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[G.map(({harness:Le,models:tt,hidden:ke})=>_.jsxs("div",{className:"[&_.model-item]:ps-6",children:[_.jsxs("div",{className:X$,children:[_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[_.jsx(Th,{harness:Le.id,size:14}),Le.name]}),!Le.agentReady&&_.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:Le.catalogPending?ff():_.jsxs(_.Fragment,{children:[_.jsx(Bj,{size:10})," ",po()]})})]}),Le.agentReady?_.jsxs(_.Fragment,{children:[!A.trim()&&_.jsxs(yn,{onClick:()=>q(Le,null),children:[_.jsx("span",{children:N3()}),(e==null?void 0:e.harness)===Le.id&&(e==null?void 0:e.model)===null&&_.jsx(yi,{size:13})]}),Le.models.length===0&&Le.agentNote&&_.jsx("div",{className:zw,children:Hu(Le.agentNote)}),tt.map(ge=>_.jsxs(yn,{title:ge.id,onClick:()=>q(Le,ge.id),children:[_.jsx("span",{children:nv(ge)}),(e==null?void 0:e.harness)===Le.id&&(e==null?void 0:e.model)===ge.id&&_.jsx(yi,{size:13})]},ge.id)),A.trim().length>0&&!Le.models.some(ge=>ge.id===A.trim())&&_.jsx(yn,{onClick:()=>q(Le,A.trim()),children:_.jsxs("span",{children:[sit({id:Ce(A.trim())})," · ",yz()]})})]}):_.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:Le.catalogPending?ff():Le.agentNote?Hu(Le.agentNote):fst()}),Le.id==="opencode"&&_.jsx(yn,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var ge;I(),(ge=y.current)==null||ge.focus(),b(!0)},children:_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[ynt(),_.jsx(Xh,{size:14,"aria-hidden":"true"})]})}),Le.agentReady&&ke>0&&_.jsx("div",{className:zw,children:ist({count:Zt(ke)})})]},Le.id)),w.length===0&&_.jsx("div",{className:zw,children:Ert()})]}),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(Bj,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),Mst()]})]}),M==="reasoning"&&_.jsxs(_.Fragment,{children:[Re(F),Fe(a,Z,o,ue)]}),M==="permissions"&&_.jsxs(_.Fragment,{children:[Re(vz()),Fe(r,$,s,re)]}),M==="autonomy"&&_.jsxs(_.Fragment,{children:[Re(gz()),Fe(V,u,$3,ce)]}),M==="speed"&&_.jsxs(_.Fragment,{children:[Re(bz()),Fe(H,ae??void 0,"default",me)]})]}),v&&_.jsx(Q$,{dialogOnly:!0,installed:((Ft=w.find(Le=>Le.id==="opencode"))==null?void 0:Ft.installed)??!1,onClose:()=>b(!1),onConnected:Le=>{var ke;const tt=(ke=k.getQueryData(Pu().queryKey))==null?void 0:ke.find(ge=>ge.id==="opencode");tt&&(!f||(e==null?void 0:e.harness)==="opencode")&&q(tt,Le)}})]})}function cc({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:h,renderIcon:f,renderLabel:p,floating:m=!1,onSelect:w,className:k}){var Q,K;const v=T.useRef(null),{open:b,setOpen:y,ref:x}=Vi(v),C=T.useRef(null),[N,j]=T.useState("");if(T.useLayoutEffect(()=>{var L;const Z=C.current,J=x.current;if(!b||!m||!Z||!J)return;Z.matches(":popover-open")||(Z.showPopover(),(L=Z.querySelector("input"))==null||L.focus());const $=()=>{const F=J.getBoundingClientRect(),U=window.innerHeight-F.bottom-12,H=F.top-12,ae=Math.min(380,Z.scrollHeight),ie=i?U>=ae||U>=H:HH;Z.style.width=`${F.width}px`,Z.style.minWidth="0",Z.style.maxHeight=`${Math.max(0,Math.min(380,ie?U:H))}px`,Z.style.left=`${F.left}px`,Z.style.top=`${ie?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)}},[b,m,i,N,e.length,x]),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=o==="bare"&&(M==null?void 0:M.id)===Fv?M:void 0,B=(D?e.filter(Z=>Z.id!==D.id):e).filter(Z=>`${Z.label} ${Z.id}`.toLowerCase().includes(N.toLowerCase())),G=(z==null?void 0:z.label)??((K=e[0])==null?void 0:K.label)??"",q=Z=>{var J;w(Z),y(!1),(J=v.current)==null||J.focus()};return _.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:x,children:[_.jsxs("button",{ref:v,type:"button",className:Ss(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":b,disabled:a,onClick:()=>{j(""),y(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))??G:G})]}),_.jsx(pc,{size:12})]}),b&&_.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:X$,children:r}),h&&_.jsx("input",{autoFocus:!0,"aria-label":h,placeholder:h,value:N,onChange:Z=>j(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(yn,{type:"button",onClick:()=>q(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:ort()})]})]}),A===D.id&&_.jsx(yi,{size:13})]}),_.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),B.map((Z,J)=>_.jsxs(yn,{type:"button",onClick:()=>q(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:[" ",yL()]})]}),Z.description&&_.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:Z.description})]})]}),A===Z.id?_.jsx(yi,{size:13}):u&&_.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:J+1})]},Z.id))]})]})]})}const E8n=[];function u5({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),h=Vi();async function f(){if(c){o(!0);try{await EI(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:h.ref,children:[h.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:Akt({host:Ce(e.session.host),user:Ce(e.session.user??"")})}),_.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ce(e.session.version??"…")]})]}),_.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[_.jsx(yn,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await SI(),h.setOpen(!1)}catch(p){sn(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?kkt():R3()}),_.jsx(RS,{content:fCt(),className:"me-2 shrink-0 text-subtext",children:_.jsx(DS,{size:15})})]}),_.jsx(yn,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await CI()),h.setOpen(!1)}catch(p){sn(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:ML()})]}),n?_.jsxs(Ie,{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":h.open,onClick:()=>h.setOpen(p=>!p),children:[_.jsx(Yv,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:dw({host:Ce(e.session.host)})})]}):_.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[_.jsx($t,{size:"small","aria-label":dw({host:Ce(e.session.host)}),"aria-haspopup":"menu","aria-expanded":h.open,onClick:()=>h.setOpen(p=>!p),children:_.jsx(Yv,{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:dw({host:Ce(e.session.host)})}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ce(e.session.version??"…")]})]})]})]}),c&&_.jsx(_$,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void f()})]})}const Zv="code-source-text",Y$="code-source-wrap",Z$="file-view-gutter text-right text-muted select-none";function J$(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"},z8n={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function _5(e){const n=e.trim().toLowerCase();return N8n[n]??n}function YS(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=z8n[n];if(t)return _5(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:_5(n.slice(r+1))}mc.displayName="clike";mc.aliases=[];function mc(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:/[{}[\];(),.:]/}}$m.displayName="c";$m.aliases=[];function $m(e){e.register(mc),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}ny.displayName="cpp";ny.aliases=[];function ny(e){e.register($m),(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)}ZS.displayName="arduino";ZS.aliases=["ino"];function ZS(e){e.register(ny),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}JS.displayName="bash";JS.aliases=["sh","shell"];function JS(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(U,H){return"(?:"+F[+H]+")"})}function r(L,F,U){return RegExp(t(L,F),"")}function s(L,F){for(var U=0;U>/g,function(){return"(?:"+L+")"});return L.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(L){return"\\b(?:"+L.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),h=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,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),y=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,p,v]),x=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[x,k,v]),N={keyword:c,punctuation:/[<>()?,.:[\]]/},j=/'(?:[^\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: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,[b]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,h,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+"|"+j,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),I=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,G=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,I]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,G]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[I]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var q=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),K=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,q]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),J=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,q]);function $(L,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,q]),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,[J]),lookbehind:!0,greedy:!0,inside:$(J,Z)}],char:{pattern:RegExp(j),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}Bm.displayName="markup";Bm.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Bm(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}Zh.displayName="css";Zh.aliases=[];function Zh(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)}t6.displayName="diff";t6.aliases=[];function t6(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{C(!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(iB,{harness:u,commands:c.data[u.id],onReady:ke=>{D(ke.id)},onClose:()=>{h(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(jw,{})}),_.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:kft()})]}),_.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:Tht()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:C1t()})]})}),_.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:$pt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Ugt()})]})}),_.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:vpt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:fvt()})]})})]})]}),_.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(Ie,{variant:"primary",size:"large",onClick:Pt,disabled:I&&b===null,children:[I&&b===null?_.jsx(St,{}):null,Hz()," ",_.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(jw,{}),_.jsx("span",{children:Ygt()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:qdt()}),_.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:I0t()}),b!==null&&!ve&&!Me&&_.jsx("p",{className:_A,children:Agt()}),b!==null&&ve&&M===null&&_.jsx("p",{className:_A,children:Xdt()}),(y===null||ce)&&_.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[_.jsx(dA,{gitVersion:y,error:ce}),ce?_.jsx("p",{className:Aw,children:pw()}):_.jsx("p",{className:Aw,children:qz()})]}),_.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(ke=>{var me;return _.jsx(x9n,{h:ke,remote:t,selected:M===ke.id,onSelect:()=>D(ke.id),commands:(me=c.data)==null?void 0:me[ke.id],onSetup:()=>h(ke)},ke.id)}):K?_.jsx("div",{className:Ru,children:pw()}):_.jsxs(Pr,{className:"py-2",children:[_.jsx(St,{})," ",Yht()]})}),c.isError&&_.jsxs("p",{className:Ru,children:[BXe()," ",_.jsx(Ie,{variant:"ghost",onClick:()=>void c.refetch(),children:ni()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Ie,{variant:"ghost",onClick:()=>i(0),children:[_.jsx(B0,{size:12})," ",Fz()]}),_.jsxs(Ie,{variant:"ghost",onClick:()=>Te(!0,!0),disabled:I,children:[_.jsx(Va,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",Iv()]}),_.jsx("div",{className:"flex-1"}),_.jsxs(Ie,{variant:"primary",onClick:()=>i(2),disabled:I||!ve||M===null||!Fe,title:I||!ve&&Me?Z1t():ve?M===null?Sht():ce?mmt():y===void 0?G1t():y===null?Zpt():void 0:kgt(),children:[Hz()," ",_.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(jw,{}),!f&&_.jsx("span",{children:s1t()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:_1t()}),_.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:_.jsxs("div",{className:aB,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:ivt()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:ght()}),_.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:p9n.map(ke=>_.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:G.includes(ke.id),onChange:()=>ot(ke.id),disabled:x}),_.jsx("span",{children:ke.label()})]},ke.id))}),G.includes("Other")&&_.jsx("input",{className:"onb-other-area w-full mt-2",value:Q,onChange:ke=>V(ke.target.value),disabled:x,placeholder:v1t(),"aria-label":Y0t()})]}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:Amt()}),_.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:ke=>J(ke.target.value),disabled:x,rows:4,placeholder:spt()}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:kmt()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Aft()}),_.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:ke=>P(ke.target.value),disabled:x,placeholder:qmt()}),ie?_.jsx("div",{className:Ru,children:Xmt()}):F.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:F.map(ke=>_.jsxs("button",{type:"button",onClick:()=>$e(ke),disabled:x,children:[_.jsx(q0,{children:fA(ke.title)}),_.jsx("span",{className:"id",children:ke.paperId})]},ke.paperId))}):null]}),$.length>0&&_.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:$.map(ke=>_.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(q0,{children:ke.title||ke.paperId}),_.jsx("span",{className:"id",children:ke.paperId}),_.jsx("button",{type:"button","aria-label":qJ({name:Ce(ke.paperId)}),onClick:()=>yt(ke.paperId),disabled:x,children:_.jsx(xr,{size:12})})]},ke.paperId))})]})}),!Mt&&_.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:G.length===0?uht():Uht()}),f&&!Fe&&_.jsxs("div",{className:"mt-5",role:"status",children:[_.jsx(dA,{gitVersion:y,error:ce}),_.jsx("p",{className:Aw,children:ce?pw():qz()}),_.jsx(Ie,{onClick:()=>Te(!0,!0),disabled:I,children:Iv()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Ie,{variant:"ghost",onClick:()=>i(f?0:1),disabled:x,children:[_.jsx(B0,{size:12})," ",Fz()]}),_.jsx("div",{className:"flex-1"}),_.jsx(Ie,{variant:"primary",onClick:()=>void Le(),disabled:x||!Fe||!f&&M===null||!Mt,children:x?_.jsxs(_.Fragment,{children:[_.jsx(St,{})," ",mgt()]}):_.jsxs(_.Fragment,{children:[Cpt()," ",_.jsx(sv,{size:13})]})})]}),M===null&&!f&&_.jsx("p",{className:h9n,children:bvt()}),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(HS,{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(Ie,{size:"small",onClick:()=>void Le(Mt&&Fe?"complete":"setup"),disabled:x,children:ni()}),f&&_.jsx(Ie,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:x,onClick:()=>{p(!1),j(null),i(1)},children:rht()}),_.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:_pt()}),_.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 fA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function v9n(e){return e.catalogPending?{tone:"warning",label:_f()}:e.authCheckFailed?{tone:"warning",label:mw()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||ny(e)?Rm():e.authMethod==="local"||!e.authenticated?ES():Igt()}:e.installed?e.installBroken?{tone:"warning",label:Gpt()}:e.authMethod==="local"?{tone:"warning",label:BL()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:mw()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:mw()}:e.authState==="unsupported"?{tone:"warning",label:$1t()}:e.installed?{tone:"warning",label:$L()}:{tone:"neutral",label:Uz()}:{tone:"neutral",label:Uz()}}function b9n(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:Kb(e,n).defaultId}}function y9n({harness:e}){return _.jsx(Th,{harness:e,size:26})}function x9n({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"),h=v9n(e),f=t&&!e.authCheckFailed?{tone:"success",label:rgt()}:h,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(y9n,{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(Yd,{tone:h.tone,className:"font-normal",children:h.label})]}),c&&!u&&_.jsx(Yd,{tone:f.tone,children:f.label})]})]}),c?_.jsxs(Ie,{size:"small",onClick:i,disabled:!s,"aria-haspopup":"dialog",title:sYe(),children:[_.jsx(bo,{size:14}),!e.installed||e.installBroken?CXe():e.authState==="unsupported"?TYe():AL()]}):_.jsx(Yd,{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(St,{})," ",i0t()]}):_.jsxs(_.Fragment,{children:[ny(e)??e.account??(e.authMethod==="apiKey"?CS():null),e.plan?` · ${e.plan}`:""]})}),m&&_.jsx("div",{className:Ru,children:m}),e.authCheckFailed&&e.agentNote&&_.jsx("div",{className:Ru,children:Fu(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:Ru,children:p}),!c&&e.agentNote&&_.jsx("div",{className:`${Ru} [&_code]:whitespace-pre-wrap break-words`,children:Fu(e.agentNote)})]})}function dA({gitVersion:e,error:n}){return _.jsxs("div",{className:aB,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:f0t()}),_.jsx(Yd,{tone:e?"success":n||e===null?"danger":"warning",children:e?ES():n?kdt():e===null?IL():_f()})]}),(e||!n&&e===void 0)&&_.jsx("div",{className:Ru,children:e??Ldt()})]})}const w9n="/assets/slurm-logo-aGSXVZcE.svg",k9n="/assets/thinking-machines-BOdslTfm.png";function S9n(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 yL();case"tinker_job":return"Tinker";default:return e||"—"}}function C9n({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 E9n({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 N9n({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 z9n({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 j9n({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 A9n({size:e=16}){return _.jsx("img",{className:"tinker-logo block flex-none object-contain",src:k9n,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 T9n({size:e=16}){return _.jsx("img",{className:"block flex-none object-contain",src:w9n,width:e,height:e,alt:"","aria-hidden":"true"})}function ry({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 Xh({kind:e,size:n=16}){switch(e){case"modal_job":return _.jsx(E9n,{size:n});case"hf_job":return _.jsx(C9n,{size:n});case"k8s_job":return _.jsx(N9n,{size:n});case"ssh_job":return _.jsx(Zj,{size:n,strokeWidth:1.5});case"slurm_job":return _.jsx(T9n,{size:n});case"ray_job":return _.jsx(z9n,{size:n});case"openresearch_job":return _.jsx(j9n,{size:n});case"tinker_job":return _.jsx(A9n,{size:n});case"local_job":return _.jsx(k7n,{size:n,strokeWidth:1.5});default:return _.jsx(Zj,{size:n})}}function i6({backend:e}){const n=OS(e),t=zkn(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(Xh,{kind:n}),_.jsx("span",{className:"backend-name",children:S9n(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 Tw(e,n){const[t,r]=T.useState(e);return T.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function g1(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function R9n(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 M9n(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 O9n(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function D9n({onCreated:e,onCancel:n,remote:t=!1}){var _r,Mn,Qn,ar;const[r,s]=T.useState("blank"),[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,h]=T.useState(""),[f,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(!1),[b,y]=T.useState(null),[x,C]=T.useState(!1),[N,j]=T.useState(!1),[A,z]=T.useState(""),[M,D]=T.useState(null),[I,B]=T.useState(!1),G=T.useRef(0),U=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}}),V=r==="paper"?M9n(M==null?void 0:M.repoUrl):null,Z=i.trim()?`~/OpenResearch/${g1(i,48)}`:"",J=`~/OpenResearch/${g1(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,$=r==="blank"&&!f?Z:r==="paper"&&M&&!f?J:u,L=Tw($.trim(),200),q=ut({...y0(L),enabled:!!L&&L===$.trim()}),P=L===$.trim()?q.data??null:null,F=L===$.trim()?((_r=q.error)==null?void 0:_r.message)??null:null,re=!!$.trim()&&(L!==$.trim()||q.isFetching),ie=V??(r==="folder"&&(P!=null&&P.githubOwner)&&P.githubRepo?{owner:P.githubOwner,repo:P.githubRepo}:null),ue=ut(bSn()),se=((Mn=ue.data)==null?void 0:Mn.login)??(ue.isPending?void 0:null),K=ut(DS()),oe=T.useRef(!1);T.useEffect(()=>{oe.current||!K.data||(oe.current=!0,j(K.data.githubForNewProjects))},[K.data]);const ce=Tw(i.trim(),150),pe=ut({...ySn(ce),enabled:ce===i.trim()}),ve=ce===i.trim()?((Qn=pe.data)==null?void 0:Qn.repo)??g1(i,48):g1(i,48),Me=ce!==i.trim()||pe.isFetching,Fe=ut({...Mj((ie==null?void 0:ie.owner)??"",(ie==null?void 0:ie.repo)??""),enabled:!!ie,subscribed:!!ie}),Ye=!!ie&&Fe.isFetching,Te=ie&&((ar=Fe.data)!=null&&ar.canPush)?`github.com/${ie.owner}/${ie.repo}`:null,$e=Tw(A.trim(),350),yt=R9n($e),ot=r==="paper"&&!M&&$e===A.trim(),Mt=ut({...r$($e),enabled:ot&&!yt&&$e.length>=3,subscribed:ot&&!yt&&$e.length>=3}),jt=ut({...a5(yt??""),enabled:ot&&!!yt,subscribed:ot&&!!yt}),Pt=ot&&!yt?Mt.data??[]:[],Le=ot&&Mt.isSuccess?$e:"",nt=I||r==="paper"&&!M&&($e!==A.trim()||(yt?jt.isFetching:Mt.isFetching));T.useEffect(()=>{var wt;!ot||!yt||!jt.data||(D(jt.data),o||a(((wt=jt.data.title)==null?void 0:wt.trim())||jt.data.paperId))},[ot,yt,jt.data,o]),T.useEffect(()=>{const wt=yt?jt.error:Mt.error;ot&&wt&&y(wt.message)},[ot,yt,jt.error,Mt.error]);const ke=pn({mutationFn:c3n});async function me(wt){var vr;const Ht=++G.current;B(!0),y(null);try{const Pn=await tt.fetchQuery(a5(wt));if(Ht!==G.current)return;D(Pn),o||a(((vr=Pn.title)==null?void 0:vr.trim())||Pn.paperId)}catch(Pn){Ht===G.current&&y(Pn instanceof Error?Pn.message:String(Pn))}finally{Ht===G.current&&B(!1)}}function je(){G.current+=1,U.current+=1,D(null),z(""),B(!1),w(!1),h(""),p(!1),Q.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function qe(wt){if(wt===r)return;G.current+=1,U.current+=1,Q.current[r]={name:i,nameTouched:o,path:u,pathTouched:f};const Ht=Q.current[wt];s(wt),y(null),B(!1),w(!1),a(Ht.name),c(Ht.nameTouched),h(Ht.path),p(Ht.pathTouched)}async function rt(){if(m)return;const wt=++U.current;w(!0),y(null);try{const Ht=await o3n();if(wt!==U.current||!Ht)return;if(p(!0),h(Ht),tt.invalidateQueries(y0(Ht)),r==="folder"&&!o){const vr=Ht.replace(/[\\/]+$/,"").split(/[\\/]/).pop();vr&&a(vr)}}catch(Ht){wt===U.current&&y(Ht instanceof Error?Ht.message:String(Ht))}finally{wt===U.current&&w(!1)}}async function dt(wt){if(wt.preventDefault(),!!gt){v(!0),y(null);try{const Ht=await tt.fetchQuery({...y0($.trim()),staleTime:0});if(Ht.exists&&Ht.directory===!1)throw new Error(dw());if(r==="blank"&&Ht.exists)throw new Error(Dz());if(r==="paper"&&Ht.empty===!1)throw new Error(Pz());N&&ie&&await tt.fetchQuery({...Mj(ie.owner,ie.repo),staleTime:0}).catch(()=>null);const vr=await ke.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(vr.project,vr.githubPublicationError)}catch(Ht){y(Ht instanceof Error?Ht.message:String(Ht))}finally{v(!1)}}}const st=i.trim(),Ut=r==="paper"&&M&&!M.repoUrl?M.paperId:null,Xt=r==="folder"&&(P==null?void 0:P.gitState)==="ready"?P.resolvedPath??null:null,en=st!==""&&(Ut!==null||Xt!==null);T.useEffect(()=>{if(!en)return;const wt=window.setTimeout(()=>{h3n({name:st,paperId:Ut??void 0,path:Xt??void 0,locale:E()}).catch(()=>{})},1200);return()=>window.clearTimeout(wt)},[en,st,Ut,Xt]);const an=(P==null?void 0:P.gitVersion)===null,At=r==="folder"&&!!$.trim()&&P!==null&&P.exists===!1,gn=r==="blank"&&(P==null?void 0:P.exists)===!0,on=!!$.trim()&&(P==null?void 0:P.exists)===!0&&P.directory===!1,Ot=r==="paper"&&!!(M!=null&&M.repoUrl)&&(P==null?void 0:P.empty)===!1,dn=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(P==null?void 0:P.empty)===!1,cn=r==="folder"&&((P==null?void 0:P.gitState)==="detached"||(P==null?void 0:P.gitState)==="invalid"),kn=f&&!$.trim()||on||Ot||dn,Wn=f&&!$.trim()||on||gn,gs=f&&!$.trim()?Bz():on?dw():gn?Dz():null,ns=f&&!$.trim()?Bz():on?dw():Ot?Pz():dn?uot():null,gt=!!(i.trim()&&$.trim())&&!k&&!m&&!re&&P!==null&&!F&&!an&&!At&&!gn&&!on&&!Ot&&!dn&&!cn&&(r!=="paper"||!!M)&&(!N||typeof se=="string"&&!Me&&!Ye),ln=Te??`github.com/${se??"you"}/${ve}`,bn=se===void 0||Me||Ye,un=r==="paper"&&!M&&A.trim().length>=3&&Le===A.trim()&&!nt&&Pt.length===0&&!b;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:dt,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:()=>qe("blank"),children:wct()}),_.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:()=>qe("folder"),children:llt()}),_.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:()=>qe("paper"),children:klt()})]}),r==="paper"&&!M&&_.jsxs("label",{className:"!font-normal",children:[uut(),_.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:A,onChange:wt=>{y(null),z(wt.target.value)},placeholder:jut()}),!un&&_.jsx("span",{className:"repo-hint",children:nt?rft():q_t()}),un&&_.jsx("span",{className:"project-path-notice block",children:qlt()}),Pt.length>0&&_.jsx("div",{className:"paper-results",children:Pt.map(wt=>_.jsxs("button",{type:"button",onClick:()=>void me(wt.paperId),children:[_.jsx(q0,{children:wt.title}),_.jsx("span",{className:"id",children:wt.paperId})]},wt.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(q0,{className:"block",children:M.title||M.paperId}),M.repoUrl&&_.jsx("div",{className:"id",children:O9n(M.repoUrl)})]}),_.jsx(Ie,{size:"small",type:"button","aria-label":qct(),onClick:je,children:Lct()})]}),!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(HS,{size:16})," ",Xlt()]}),_.jsx("span",{className:"text-sm font-normal text-accent-amber",children:rut()})]})]}),(r!=="paper"||M)&&_.jsxs(_.Fragment,{children:[r==="blank"&&_.jsxs("label",{className:"!font-normal",children:[_.jsx("span",{className:"project-field-label !font-medium",children:$z()}),_.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:wt=>{c(!0),a(wt.target.value)},placeholder:Iz()})]}),r==="paper"?_.jsxs("label",{className:"project-location-field",children:[_.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?Iot():hw()}),_.jsx("input",{className:"text-sm font-normal",value:$,onChange:wt=>{p(!0),h(wt.target.value)},"aria-describedby":kn?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),re&&_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Lz()}),kn&&_.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:ns})]}):r==="folder"&&!t?_.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?got({path:Ce(u)}):Mz(),disabled:m,title:u||void 0,onClick:()=>void rt(),children:[_.jsx(Pu,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),_.jsx("span",{className:u?"text-sm":"placeholder",children:m?Aot():u||Mz()}),_.jsx(Ka,{className:"folder-picker-chevron",size:15})]}):r==="folder"?_.jsxs("label",{className:"project-location-field",children:[_.jsx("span",{className:"project-location-label !font-medium",children:hw()}),_.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:wt=>{p(!0),h(wt.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:hw()}),_.jsx("input",{className:"text-sm font-normal",value:$,onChange:wt=>{p(!0),h(wt.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":Wn?"blank-destination-description":void 0,spellCheck:!1}),re&&_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Lz()}),Wn&&_.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:gs})]}):null,r!=="blank"&&$&&_.jsxs("label",{className:"!font-normal",children:[_.jsx("span",{className:"project-field-label !font-medium",children:$z()}),_.jsx("input",{className:"text-sm font-normal",value:i,onChange:wt=>{c(!0),a(wt.target.value)},placeholder:Iz()})]}),an&&_.jsx("div",{className:"project-path-notice error",children:Alt()}),!an&&r==="folder"&&u.trim()&&!re&&(P==null?void 0:P.exists)===!1&&_.jsx("div",{className:"project-path-notice error",children:qut()}),!an&&r==="folder"&&u.trim()&&!re&&on&&_.jsx("div",{className:"project-path-notice error",children:r_t()}),!an&&r==="folder"&&!re&&(P==null?void 0:P.gitState)==="detached"&&_.jsx("div",{className:"project-path-notice error",children:Xct()}),!an&&r==="folder"&&!re&&(P==null?void 0:P.gitState)==="invalid"&&_.jsx("div",{className:"project-path-notice error",children:Xut()}),F&&_.jsx("div",{className:"project-path-notice error",role:"alert",children:F})]}),b&&_.jsx("div",{className:"error",role:"alert",children:b}),(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&&se===null?" text-accent-red":" text-text"}`,"aria-expanded":x,"aria-controls":"new-project-advanced-settings",onClick:()=>C(wt=>!wt),children:[N?se===null?Xat():rot():LL(),_.jsx(mc,{className:x?"rotate-180":"",size:16})]}),x&&_.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:wt=>j(wt.target.checked),disabled:k}),_.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:Lut()})]}),_.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[_.jsx("span",{children:bn?u_t({repository:Ce(ln)}):Te?S_t({repository:Ce(ln)}):g_t({repository:Ce(ln)})}),_.jsx("span",{children:mlt()}),se===null&&_.jsx("span",{children:X_t({command:Ce("gh auth login")})})]})]})]}),_.jsxs("div",{className:"actions new-project-actions",children:[n&&_.jsx(Ie,{type:"button",onClick:n,children:jct()}),_.jsx(Ie,{variant:"primary",className:"ms-auto",disabled:!gt,children:k?rct():r==="paper"?M!=null&&M.repoUrl?Uot():Oz():r==="folder"?uft():Oz()})]})]})}function oB({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 h=o();if(h.length===0){u.preventDefault(),i.focus();return}const f=h[0],p=h[h.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:KL()}),_.jsx(D9n,{onCancel:e,onCreated:n,remote:t})]})})}function L9n({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const i=T.useRef(null),a=T.useRef(r),o=T.useRef(n);a.current=r,o.current=n,T.useEffect(()=>{const u=i.current;if(!u)return;const h=document.activeElement instanceof HTMLElement?document.activeElement:null,f=()=>[...u.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(f()[0]??u).focus();const p=m=>{if(m.key==="Escape"){m.preventDefault(),o.current||a.current();return}if(m.key!=="Tab")return;const w=f();if(w.length===0){m.preventDefault(),u.focus();return}const k=w[0],v=w[w.length-1];m.shiftKey&&document.activeElement===k?(m.preventDefault(),v.focus()):!m.shiftKey&&document.activeElement===v&&(m.preventDefault(),k.focus())};return document.addEventListener("keydown",p,!0),()=>{document.removeEventListener("keydown",p,!0),h==null||h.focus()}},[]);const c=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return _.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:u=>{!n&&u.target===u.currentTarget&&r()},children:_.jsxs("div",{ref:i,className:"modal w-110 max-w-full bg-background border border-border rounded-xl shadow-modal p-6",role:"dialog","aria-modal":"true","aria-labelledby":"delete-project-dialog-title","aria-describedby":"delete-project-dialog-description",tabIndex:-1,children:[_.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:k5t()}),_.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[_.jsx("p",{className:"m-0",children:q3t({name:_a(e.name)})}),_.jsx("p",{className:"m-0",children:c?X5t():rkt()}),t&&_.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),_.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[_.jsx(Ie,{disabled:n,onClick:r,children:l5t()}),_.jsx(Ie,{variant:"danger",disabled:n,onClick:s,children:n?I5t():A5t()})]})]})})}function hA(){return _.jsx("span",{className:"activity-pulse h-2 w-2 shrink-0 rounded-full bg-accent-teal animate-[or-pulse_1.2s_ease-in-out_infinite]"})}function I9n({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[i,a]=T.useState(!1),[o,c]=T.useState(null),[u,h]=T.useState(null),[f,p]=T.useState(null),m=ut(vSn()),w=Object.fromEntries((m.data??[]).map(v=>[v.projectId,v]));async function k(v){c(v.id),h(null);try{await g3n(v.id),h(null),p(null),r(v.id)}catch(b){h(b instanceof Error?b.message:String(b))}finally{c(null)}}return _.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[_.jsxs("div",{className:"home-inner max-w-290 my-0 mx-auto pt-12 px-6 pb-16 [@media((max-width:_960px))]:pt-6 [@media((max-width:_960px))]:px-4 win-titlebar:[@media((max-width:_960px))]:pt-10",children:[_.jsxs("div",{className:"home-head flex items-center justify-between gap-3 mb-4.5 [&_h2]:m-0 [&_h2]:text-4xl [&_h2]:tracking-[-0.02em] [@media((max-width:_520px))]:items-start [@media((max-width:_520px))]:flex-col",children:[_.jsx("h2",{children:Akt()}),_.jsxs(Ie,{onClick:()=>a(!0),children:[_.jsx(Qh,{size:15})," ",KL()]})]}),_.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:_.jsxs("div",{children:[_.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border bg-background py-2.5 ps-4 pe-2 text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:hidden",children:[_.jsx("span",{children:kkt()}),_.jsx("span",{children:Wz()}),_.jsx("span",{children:Qz()}),_.jsx("span",{children:Xz()})]}),e.length===0?_.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:mkt()}):[...e].sort((v,b)=>{var C,N;const y=((C=w[v.id])==null?void 0:C.lastMessageAt)??v.createdAt;return(((N=w[b.id])==null?void 0:N.lastMessageAt)??b.createdAt)-y||v.name.localeCompare(b.name)}).map(v=>{const b=w[v.id],y=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,x=y?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:y.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):$v(),C=b?b.activeAgents>0?j3t({count:Jt(b.activeAgents)}):qkt():"—",N=b?b.totalAgents===1?nSt():L3t({count:Jt(b.totalAgents)}):"—",j=b?b.runningExperiments>0?lSt({count:Jt(b.runningExperiments)}):b.totalExperiments===0?jS():Yz({count:Jt(b.totalExperiments)}):"—",A=b&&b.runningExperiments>0?Yz({count:Jt(b.totalExperiments)}):null;return _.jsxs("div",{className:"group project-row relative grid cursor-pointer grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border-variant py-4 ps-4 pe-2 text-start transition-colors duration-120 ease-standard last:border-b-0 hover:bg-surface-bright focus-within:bg-surface-bright [@media((max-width:_960px))]:grid-cols-[minmax(0,0.8fr)_minmax(0,0.8fr)_minmax(0,1.4fr)] [@media((max-width:_960px))]:items-start [@media((max-width:_960px))]:gap-x-4 [@media((max-width:_960px))]:gap-y-3 [@media((max-width:_960px))]:py-4 [@media((max-width:_960px))]:px-4 [@media((max-width:_600px))]:grid-cols-2",children:[_.jsx("button",{className:"project-row-open absolute inset-0 z-0 cursor-pointer rounded-[inherit] focus-visible:outline focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-[-2px]","aria-label":QZ({name:_a(v.name)}),onClick:()=>n(v.id)}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none [@media((max-width:_960px))]:col-span-3 [@media((max-width:_600px))]:col-span-2",children:[_.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),_.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[_.jsxs("span",{children:[m5t()," ",vo(v.createdAt)]}),v.paperId&&_.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&_.jsxs("span",{children:[n5t()," ",Ce(v.paperId)]}),_.jsx("button",{className:"project-row-secondary project-row-delete inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm leading-0 text-muted opacity-0 pointer-events-none transition-opacity hover:bg-surface hover:text-accent-red group-hover:opacity-100 group-hover:pointer-events-auto group-focus-within:opacity-100 group-focus-within:pointer-events-auto focus:opacity-100 focus:pointer-events-auto focus-visible:outline focus-visible:outline-2 focus-visible:outline-text","aria-label":N3({name:_a(v.name)}),disabled:o===v.id,onClick:z=>{z.stopPropagation(),h(null),p(v)},children:_.jsx(Of,{size:14})})]})]}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:Wz()}),_.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.activeAgents>0&&_.jsx(hA,{}),C]}),_.jsx("span",{className:"text-xs text-muted",children:N})]}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:Qz()}),_.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.runningExperiments>0&&_.jsx(hA,{}),j]}),A&&_.jsx("span",{className:"text-xs text-muted",children:A})]}),_.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:mb-1 [@media((max-width:_960px))]:block",children:Xz()}),y?_.jsxs("a",{className:"project-row-secondary inline-flex max-w-full items-center gap-2 text-sm text-text no-underline pointer-events-auto hover:underline underline-offset-2",href:y,target:"_blank",rel:"noreferrer","aria-label":Ov({name:_a(v.name)}),children:[_.jsx("span",{className:"inline-flex shrink-0",children:_.jsx(ry,{size:14})}),_.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ce(x)})]}):_.jsx("span",{className:"text-sm text-text pointer-events-none",children:x})]})]},v.id)})]})})]}),i&&_.jsx(oB,{remote:s,onClose:()=>a(!1),onCreated:(v,b)=>{a(!1),t(v,b)}}),f&&_.jsx(L9n,{project:f,deleting:o===f.id,error:u,onClose:()=>{h(null),p(null)},onConfirm:()=>void k(f)})]})}function cB(){const e=T.useSyncExternalStore(dSn,Aj,Aj);return _.jsxs(_.Fragment,{children:[_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":D3()}),!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(HS,{size:13,className:"shrink-0 text-accent-amber"}),_.jsx("span",{dir:"auto",className:"min-w-0",children:D3()})]})]})}function $9n({onClose:e,onConfigureSsh:n}){var v,b,y;const t=pn({mutationFn:x=>y5n(...x)}),r=ut(QI()),s=ut(Hkn()),i=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[o,c]=T.useState(""),u=i?null:((b=r.error)==null?void 0:b.message)??((y=s.error)==null?void 0:y.message)??null,[h,f]=T.useState(null),p=T.useRef(null);Dm(p,e);async function m(x){const C="__ORX_DESKTOP__"in window,N=C?null:window.open("/remote-launch","_blank");if(!C&&!N){Zt($7t(),"error");return}f(x);try{const j=await t.mutateAsync([x,{theme:NSn(),locale:E()}]);N?N.location.replace(j.gatewayUrl):window.open(j.gatewayUrl,"_blank"),e()}catch(j){N==null||N.close(),Zt(j instanceof Error?j.message:String(j),"error")}finally{f(null)}}const w=i==null?void 0:i.filter(x=>x.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),k=new Map(a.map(x=>[x.host,x]));return si.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:x=>{x.target===x.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(It,{className:"absolute end-3.5 top-3.5","aria-label":m6t(),onClick:e,children:_.jsx(xr,{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:$3()}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:k6t()}),_.jsx(Br,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:x=>c(x.target.value),placeholder:ej(),"aria-label":ej()})]}),_.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(St,{})," ",uI()]}):(w==null?void 0:w.length)===0?_.jsx("p",{className:"m-3 text-sm text-subtext",children:u7t()}):w==null?void 0:w.map(x=>{const C=k.get(x.host);return _.jsxs(Ie,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:h===x.host,onClick:()=>void m(x.host),children:[_.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:x.host}),h===x.host?_.jsx(St,{}):C?_.jsx("span",{className:"text-sm text-subtext",children:S7t()}):null]},x.host)})}),_.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:_.jsxs(Ie,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[_.jsx(q$,{size:15}),wI()]})})]})}),document.body)}function Zv({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 B9n="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",P9n="/assets/ollama-logo-Bt9O-2K_.png",F9n="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",lB={id:"lmstudio",label:"LM Studio",icon:B9n,url:"http://127.0.0.1:1234/v1"},ov=[lB,{id:"omlx",label:"oMLX",icon:F9n,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:P9n,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 uB({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var V,Z;const s=ut({...Ykn(),enabled:!t}),i=ut(Bu()),a=(V=i.data)==null?void 0:V.find(J=>J.id==="opencode"),[o,c]=T.useState(t),u=()=>{c(!1),r==null||r()},[h,f]=T.useState("lmstudio"),p=ov.find(J=>J.id===h)??lB,[m,w]=T.useState({}),k=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:b,model:y,contextWindow:x,error:C}=k,N=p.id==="ollama"?"":k.apiKey,j=J=>{w($=>({...$,[p.id]:{...$[p.id]??k,...J}}))},A=pn({mutationFn:Akn}),z=pn({mutationFn:async J=>{var q;const $=await Tkn(J);if(!((q=(await hf(!0)).find(P=>P.id==="opencode"))!=null&&q.models.some(P=>P.id===$.model)))throw new Error(Ett());return $}}),M=pn({mutationFn:Mkn}),D=Number(x),I=A.isPending||z.isPending,B=(J={})=>j({models:[],model:null,error:null,...J}),G=async()=>{B();try{const J=await A.mutateAsync({baseUrl:v.trim(),apiKey:N});j({models:J.models,model:J.models[0]??null})}catch(J){j({error:J instanceof Error?J.message:String(J)})}},U=async()=>{if(y){j({error:null});try{const J=await z.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:N,model:y,contextWindow:D});u(),n==null||n(J.model)}catch(J){j({error:J instanceof Error?J.message:String(J)})}}},Q=async J=>{try{await M.mutateAsync(J)}catch($){Zt($ 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":zz(),children:[_.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[_.jsx("h3",{className:"text-base font-medium",children:zz()}),_.jsxs(Ie,{disabled:I,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[_.jsx(Qh,{size:14}),ML()]})]}),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(J=>_.jsx(H9n,{connection:J,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:I||M.isPending,onRemove:()=>void Q(J.id)},J.id))})]}),o&&_.jsx(q9n,{busy:I,onClose:u,footer:_.jsxs(Ie,{variant:"primary",disabled:I||!e||b.length>0&&(!y||!Number.isSafeInteger(D)||D<4096),onClick:()=>void(b.length>0?U():G()),children:[I&&_.jsx(St,{}),b.length>0?Ont():dtt()]}),children:_.jsxs("div",{className:"space-y-4",children:[!e&&_.jsxs("div",{className:"text-sm text-text",children:[_.jsx("p",{children:ynt()}),_.jsx(jh,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:dnt()})]}),_.jsx(lc,{choices:ov,value:h,title:Nz(),header:Nz(),variant:"field",floating:!0,dropDown:!0,disabled:I,renderLabel:J=>_.jsxs(_.Fragment,{children:[J.id==="openai-compatible"?kS():J.label,J.id==="openai-compatible"&&_.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:OL()})]}),renderIcon:J=>{var L;const $=(L=ov.find(q=>q.id===J.id))==null?void 0:L.icon;return $?_.jsx("img",{src:$,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${J.id==="ollama"?" dark:invert":""}`}):_.jsx($$,{size:14,className:"shrink-0"})},onSelect:f}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:att()}),_.jsx(Br,{value:v,disabled:I,onChange:J=>{B({baseUrl:J.target.value})}})]}),p.id!=="ollama"&&_.jsxs("details",{className:"text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:eI()}),_.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[_.jsx("span",{children:p.id==="lmstudio"?Jnt():Nnt()}),_.jsx(Br,{type:"password",autoComplete:"off",value:N,disabled:I,onChange:J=>B({apiKey:J.target.value})})]})]},p.id),b.length>0&&_.jsxs(_.Fragment,{children:[_.jsx(lc,{choices:b.map(J=>({id:J,label:J})),value:y,searchPlaceholder:$it(),title:b0(),header:b0(),variant:"field",floating:!0,dropDown:!0,disabled:I,onSelect:J=>{j({model:J})}}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:Ptt()}),_.jsx(Br,{type:"number",min:4096,step:1024,value:x,disabled:I,onChange:J=>{j({contextWindow:J.target.value})}})]}),_.jsx("p",{className:"text-sm text-subtext",children:Vtt()})]}),C&&_.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:C})]})})]})}function H9n({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:i,onRemove:a}){const o=pn({mutationFn:async()=>{try{await Rkn(e.id)}finally{await hf(!0)}}}),c=ov.find(w=>w.label===e.name||w.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),h=u.length>0&&n&&u.every(w=>t.includes(`${e.id}/${w}`)),f=o.isPending||r,p=s,m=h;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($$,{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"?kS():(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:OL()})," · ",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(Wt,{variant:f||p?"default":m?"success":"warning",children:f?ya():p?fI():m?Mtt():fo()})}),_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsxs(Ie,{variant:"ghost",disabled:i||o.isPending,onClick:()=>o.mutate(),children:[_.jsx(Va,{size:14}),Iv()]}),_.jsx(It,{"aria-label":ant({name:e.name}),disabled:i||o.isPending,onClick:a,children:_.jsx(Of,{size:14})})]})]})]}),o.error&&!m&&_.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:o.error.message})]})}function q9n({busy:e,onClose:n,footer:t,children:r}){const s=T.useRef(null),i=()=>{e||n()};return Dm(s,i,"input"),si.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:ML()})}),_.jsx(It,{className:"absolute end-3.5 top-3.5","aria-label":ff(),onClick:i,disabled:e,children:_.jsx(xr,{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(Ie,{onClick:i,disabled:e,children:ff()}),t]})]})}),document.body)}const _B=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),Rw=["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(" "),bu={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function U9n(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:qv(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Kb(n,t).defaultId}}function Ki(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 G9n({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:i,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:c,autonomy:u,onSelectAutonomy:h,lockHarness:f=!1,openRequest:p=0,className:m}){var Ye,Te,$e,yt,ot,Mt,jt,Pt;const{data:w=K9n}=ut(Bu()),k=zm(),[v,b]=T.useState(!1),y=T.useRef(null),x=T.useRef(null),{open:C,setOpen:N,ref:j}=Ki(y),[A,z]=T.useState(""),[M,D]=T.useState("root"),I=()=>{N(!1),D("root"),z("")},B=T.useRef(p);T.useEffect(()=>{p!==B.current&&(B.current=p,D("models"),z(""),N(!0))},[p,N]),T.useEffect(()=>{var Le;C&&(M==="reasoning"||M==="speed"||M==="permissions")&&((Le=x.current)==null||Le.focus())},[C,M]);const G=T.useMemo(()=>{const Le=A.trim().toLowerCase();return(f&&e?w.filter(ke=>ke.id===e.harness):w).map(ke=>{let me=ke.models;return Le?me=me.filter(je=>`${je.id} ${nv(je)}`.toLowerCase().includes(Le)):(ke.id==="opencode"||ke.id==="cursor"||ke.id==="antigravity")&&(me=me.slice(0,5)),{harness:ke,models:me,hidden:Le?0:ke.models.length-me.length}})},[w,A,f,e]),U=(Le,nt)=>{var me;const ke=(e==null?void 0:e.harness)===Le.id;n({harness:Le.id,model:nt,serviceTier:qv(Le,nt,ke?e==null?void 0:e.serviceTier:null),permissionMode:ke?e.permissionMode:((me=Le.options)==null?void 0:me.defaultPermissionMode)??null,reasoningLevel:KI(Le,nt,ke&&Le.models.some(je=>je.id===nt)?e.reasoningLevel:null)}),I()},Q=(e==null?void 0:e.model)!=null?(Ye=w.find(Le=>Le.id===e.harness))==null?void 0:Ye.models.find(Le=>Le.id===e.model):void 0,V=e?e.model?Q?nv(Q):`${W3(e.model)} · ${Rz()}`:O3():b0(),Z=(e==null?void 0:e.reasoningLevel)??o??((Te=a[0])==null?void 0:Te.id),J=($e=a.find(Le=>Le.id===Z))==null?void 0:$e.label,$=(e==null?void 0:e.permissionMode)??s??((yt=r[0])==null?void 0:yt.id),L=(ot=r.find(Le=>Le.id===$))==null?void 0:ot.label,q=(e==null?void 0:e.harness)==="opencode"?Aat():Zst(),P=w.find(Le=>Le.id===(e==null?void 0:e.harness)),F=GI(P,e==null?void 0:e.model),re=qv(P,e==null?void 0:e.model,e==null?void 0:e.serviceTier),ie=(Mt=F.find(Le=>Le.id===re))==null?void 0:Mt.label,ue=Le=>{c==null||c(Le),I()},se=Le=>{i==null||i(Le),I()},K=[{id:"agentic",label:Zrt(),description:ist()},{id:"copilot",label:fst(),description:bst()}],oe=(jt=K.find(Le=>Le.id===u))==null?void 0:jt.label,ce=Le=>{const nt=K.find(ke=>ke.id===Le);nt&&(h==null||h(nt.id)),I()},pe=Le=>{e&&n({...e,serviceTier:Le}),I()},ve=(Le,nt,ke)=>_.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(ke),children:[_.jsx("span",{className:"flex-1",children:Le}),nt&&_.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:nt}),_.jsx(Ka,{size:14,className:"shrink-0 text-muted"})]}),Me=Le=>_.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[_.jsx(It,{ref:x,type:"button",size:"small",className:"model-submenu-header","aria-label":GL(),onClick:()=>{D("root"),z("")},children:_.jsx(A$,{size:15})}),_.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:Le}),M==="models"&&_.jsx(It,{type:"button",size:"small","aria-label":F3(),onClick:()=>{I(),t()},children:_.jsx(WS,{size:15,"aria-hidden":"true"})})]}),Fe=(Le,nt,ke,me)=>_.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:Le.map(je=>_.jsxs(vn,{onClick:()=>me(je.id),children:[_.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[_.jsxs("span",{children:[je.label,je.id===ke&&_.jsxs("span",{className:"font-normal text-muted",children:[" ",DL()]})]}),je.description&&_.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:je.description})]}),je.id===nt&&_.jsx(bi,{size:13})]},je.id))});return _.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:j,children:[_.jsxs("button",{ref:y,type:"button",className:Ns("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:tY({label:`${V}${J?` · ${J}`:""}${ie?` · ${ie}`:""}`}),"aria-haspopup":"menu","aria-expanded":C,onClick:()=>{C?I():(D("root"),N(!0))},children:[re==="priority"?_.jsx(S8n,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?_.jsx(Th,{harness:e.harness,size:14}):null,re==="priority"&&_.jsxs("span",{className:"sr-only",children:[iit()," "]}),_.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[V,J&&_.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:J})]}),_.jsx(mc,{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(b0(),V,"models"),a.length>0&&ve(q,J,"reasoning"),F.length>0&&ve(Tz(),ie,"speed"),r.length>0&&ve(Az(),L,"permissions"),h&&ve(jz(),oe,"autonomy")]}),M==="models"&&_.jsxs(_.Fragment,{children:[Me(b0()),_.jsx("input",{autoFocus:!0,type:"text",placeholder:Git(),value:A,onChange:Le=>z(Le.target.value)}),_.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[G.map(({harness:Le,models:nt,hidden:ke})=>_.jsxs("div",{className:"[&_.model-item]:ps-6",children:[_.jsxs("div",{className:_B,children:[_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[_.jsx(Th,{harness:Le.id,size:14}),Le.name]}),!Le.agentReady&&_.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:Le.catalogPending?_f():_.jsxs(_.Fragment,{children:[_.jsx(Yj,{size:10})," ",fo()]})})]}),Le.agentReady?_.jsxs(_.Fragment,{children:[!A.trim()&&_.jsxs(vn,{onClick:()=>U(Le,null),children:[_.jsx("span",{children:O3()}),(e==null?void 0:e.harness)===Le.id&&(e==null?void 0:e.model)===null&&_.jsx(bi,{size:13})]}),Le.models.length===0&&Le.agentNote&&_.jsx("div",{className:Rw,children:Fu(Le.agentNote)}),nt.map(me=>_.jsxs(vn,{title:me.id,onClick:()=>U(Le,me.id),children:[_.jsx("span",{children:nv(me)}),(e==null?void 0:e.harness)===Le.id&&(e==null?void 0:e.model)===me.id&&_.jsx(bi,{size:13})]},me.id)),A.trim().length>0&&!Le.models.some(me=>me.id===A.trim())&&_.jsx(vn,{onClick:()=>U(Le,A.trim()),children:_.jsxs("span",{children:[kat({id:Ce(A.trim())})," · ",Rz()]})})]}):_.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:Le.catalogPending?_f():Le.agentNote?Fu(Le.agentNote):Tit()}),Le.id==="opencode"&&_.jsx(vn,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var me;I(),(me=y.current)==null||me.focus(),b(!0)},children:_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[Brt(),_.jsx(Qh,{size:14,"aria-hidden":"true"})]})}),Le.agentReady&&ke>0&&_.jsx("div",{className:Rw,children:Sit({count:Jt(ke)})})]},Le.id)),w.length===0&&_.jsx("div",{className:Rw,children:Gst()})]}),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(Yj,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),Zit()]})]}),M==="reasoning"&&_.jsxs(_.Fragment,{children:[Me(q),Fe(a,Z,o,ue)]}),M==="permissions"&&_.jsxs(_.Fragment,{children:[Me(Az()),Fe(r,$,s,se)]}),M==="autonomy"&&_.jsxs(_.Fragment,{children:[Me(jz()),Fe(K,u,G3,ce)]}),M==="speed"&&_.jsxs(_.Fragment,{children:[Me(Tz()),Fe(F,re??void 0,"default",pe)]})]}),v&&_.jsx(uB,{dialogOnly:!0,installed:((Pt=w.find(Le=>Le.id==="opencode"))==null?void 0:Pt.installed)??!1,onClose:()=>b(!1),onConnected:Le=>{var ke;const nt=(ke=k.getQueryData(Bu().queryKey))==null?void 0:ke.find(me=>me.id==="opencode");nt&&(!f||(e==null?void 0:e.harness)==="opencode")&&U(nt,Le)}})]})}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:h,renderIcon:f,renderLabel:p,floating:m=!1,onSelect:w,className:k}){var Q,V;const v=T.useRef(null),{open:b,setOpen:y,ref:x}=Ki(v),C=T.useRef(null),[N,j]=T.useState("");if(T.useLayoutEffect(()=>{var L;const Z=C.current,J=x.current;if(!b||!m||!Z||!J)return;Z.matches(":popover-open")||(Z.showPopover(),(L=Z.querySelector("input"))==null||L.focus());const $=()=>{const q=J.getBoundingClientRect(),P=window.innerHeight-q.bottom-12,F=q.top-12,re=Math.min(380,Z.scrollHeight),ie=i?P>=re||P>=F:FF;Z.style.width=`${q.width}px`,Z.style.minWidth="0",Z.style.maxHeight=`${Math.max(0,Math.min(380,ie?P:F))}px`,Z.style.left=`${q.left}px`,Z.style.top=`${ie?q.bottom+4:q.top-Z.getBoundingClientRect().height-4}px`};return $(),window.addEventListener("resize",$),window.addEventListener("scroll",$,!0),()=>{window.removeEventListener("resize",$),window.removeEventListener("scroll",$,!0)}},[b,m,i,N,e.length,x]),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=o==="bare"&&(M==null?void 0:M.id)===Hv?M:void 0,B=(D?e.filter(Z=>Z.id!==D.id):e).filter(Z=>`${Z.label} ${Z.id}`.toLowerCase().includes(N.toLowerCase())),G=(z==null?void 0:z.label)??((V=e[0])==null?void 0:V.label)??"",U=Z=>{var J;w(Z),y(!1),(J=v.current)==null||J.focus()};return _.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:x,children:[_.jsxs("button",{ref:v,type:"button",className:Ns(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":b,disabled:a,onClick:()=>{j(""),y(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))??G:G})]}),_.jsx(mc,{size:12})]}),b&&_.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:_B,children:r}),h&&_.jsx("input",{autoFocus:!0,"aria-label":h,placeholder:h,value:N,onChange:Z=>j(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(vn,{type:"button",onClick:()=>U(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:Est()})]})]}),A===D.id&&_.jsx(bi,{size:13})]}),_.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),B.map((Z,J)=>_.jsxs(vn,{type:"button",onClick:()=>U(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:[" ",DL()]})]}),Z.description&&_.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:Z.description})]})]}),A===Z.id?_.jsx(bi,{size:13}):u&&_.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:J+1})]},Z.id))]})]})]})}const K9n=[];function g5({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),h=Ki();async function f(){if(c){o(!0);try{await FI(c),u(null)}catch(p){u(null),Zt(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:h.ref,children:[h.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:QSt({host:Ce(e.session.host),user:Ce(e.session.user??"")})}),_.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ce(e.session.version??"…")]})]}),_.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[_.jsx(vn,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await BI(),h.setOpen(!1)}catch(p){Zt(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?HSt():B3()}),_.jsx(FS,{content:T7t(),className:"me-2 shrink-0 text-subtext",children:_.jsx(US,{size:15})})]}),_.jsx(vn,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await PI()),h.setOpen(!1)}catch(p){Zt(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:WL()})]}),n?_.jsxs(Ie,{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":h.open,onClick:()=>h.setOpen(p=>!p),children:[_.jsx(Zv,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:gw({host:Ce(e.session.host)})})]}):_.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[_.jsx(It,{size:"small","aria-label":gw({host:Ce(e.session.host)}),"aria-haspopup":"menu","aria-expanded":h.open,onClick:()=>h.setOpen(p=>!p),children:_.jsx(Zv,{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:gw({host:Ce(e.session.host)})}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ce(e.session.version??"…")]})]})]})]}),c&&_.jsx(E$,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void f()})]})}const Jv="code-source-text",fB="code-source-wrap",dB="file-view-gutter text-right text-muted select-none";function hB(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const V9n={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"},W9n={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function v5(e){const n=e.trim().toLowerCase();return V9n[n]??n}function a6(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=W9n[n];if(t)return v5(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:v5(n.slice(r+1))}gc.displayName="clike";gc.aliases=[];function gc(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:/[{}[\];(),.:]/}}$m.displayName="c";$m.aliases=[];function $m(e){e.register(gc),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}sy.displayName="cpp";sy.aliases=[];function sy(e){e.register($m),(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)}o6.displayName="arduino";o6.aliases=["ino"];function o6(e){e.register(sy),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}c6.displayName="bash";c6.aliases=["sh","shell"];function c6(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(P,F){return"(?:"+q[+F]+")"})}function r(L,q,P){return RegExp(t(L,q),"")}function s(L,q){for(var P=0;P>/g,function(){return"(?:"+L+")"});return L.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(L){return"\\b(?:"+L.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),h=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,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),y=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,p,v]),x=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[x,k,v]),N={keyword:c,punctuation:/[<>()?,.:[\]]/},j=/'(?:[^\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: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,[b]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,h,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+"|"+j,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),I=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,G=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,I]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,G]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[I]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var U=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),V=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,U]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),J=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,U]);function $(L,q){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[q,U]),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:$(V,Q)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[J]),lookbehind:!0,greedy:!0,inside:$(J,Z)}],char:{pattern:RegExp(j),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}Bm.displayName="markup";Bm.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Bm(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}Yh.displayName="css";Yh.aliases=[];function Yh(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)}u6.displayName="diff";u6.aliases=[];function u6(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)}n6.displayName="go";n6.aliases=[];function n6(e){e.register(mc),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"]}r6.displayName="ini";r6.aliases=[];function r6(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:/=/}}s6.displayName="java";s6.aliases=[];function s6(e){e.register(mc),(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)}i6.displayName="regex";i6.aliases=[];function i6(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}a6.displayName="json";a6.aliases=["webmanifest"];function a6(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}o6.displayName="kotlin";o6.aliases=["kt","kts"];function o6(e){e.register(mc),(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)}c6.displayName="less";c6.aliases=[];function c6(e){e.register(Zh),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"}})}l6.displayName="lua";l6.aliases=[];function l6(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:/[\[\](){},;]|\.+|:+/}}u6.displayName="makefile";u6.aliases=[];function u6(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:/[:;(){}]/}}_6.displayName="yaml";_6.aliases=["yml"];function _6(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 h=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(h,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)}f6.displayName="markdown";f6.aliases=["md"];function f6(e){e.register(Bm),(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 h=0,f=u.length;h]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}h6.displayName="perl";h6.aliases=[];function h6(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)}sy.displayName="markup-templating";sy.aliases=[];function sy(e){e.register(Bm),(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,h;r.code.indexOf(h=t(s,u))!==-1;)++u;return o[u]=c,h}),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 h=c[u];if(typeof h=="string"||h.content&&typeof h.content=="string"){var f=a[i],p=r.tokenStack[f],m=typeof h=="string"?h:h.content,w=t(s,f),k=m.indexOf(w);if(k>-1){++i;var v=m.substring(0,k),b=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),y=m.substring(k+w.length),x=[];v&&x.push.apply(x,o([v])),x.push(b),y&&x.push.apply(x,o([y])),typeof h=="string"?c.splice.apply(c,[u,1].concat(x)):h.content=x}}else h.content&&o(h.content)}return c}o(r.tokens)}}})})(e)}p6.displayName="php";p6.aliases=[];function p6(e){e.register(sy),(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 h=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",h)}}),n.hooks.add("after-tokenize",function(u){n.languages["markup-templating"].tokenizePlaceholders(u,"php")})})(e)}m6.displayName="python";m6.aliases=["py"];function m6(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}g6.displayName="r";g6.aliases=[];function g6(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:/[(){}\[\],;]/}}v6.displayName="ruby";v6.aliases=["rb"];function v6(e){e.register(mc),(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)}b6.displayName="rust";b6.aliases=[];function b6(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)}y6.displayName="sass";y6.aliases=[];function y6(e){e.register(Zh),(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)}x6.displayName="scss";x6.aliases=[];function x6(e){e.register(Zh),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}w6.displayName="sql";w6.aliases=[];function w6(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:/[;[\]()`,.]/}}k6.displayName="swift";k6.aliases=[];function k6(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})}S6.displayName="typescript";S6.aliases=["ts"];function S6(e){e.register(ry),(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)}iy.displayName="basic";iy.aliases=[];function iy(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:/[,;:()]/}}C6.displayName="vbnet";C6.aliases=[];function C6(e){e.register(iy),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 Pm{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Pm.prototype.normal={};Pm.prototype.property={};Pm.prototype.space=void 0;function eB(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new Pm(t,r,n)}function q0(e){return e.toLowerCase()}class Ki{constructor(n,t){this.attribute=t,this.property=n}}Ki.prototype.attribute="";Ki.prototype.booleanish=!1;Ki.prototype.boolean=!1;Ki.prototype.commaOrSpaceSeparated=!1;Ki.prototype.commaSeparated=!1;Ki.prototype.defined=!1;Ki.prototype.mustUseProperty=!1;Ki.prototype.number=!1;Ki.prototype.overloadedBoolean=!1;Ki.prototype.property="";Ki.prototype.spaceSeparated=!1;Ki.prototype.space=void 0;let j8n=0;const en=If(),ls=If(),f5=If(),Ye=If(),vr=If(),af=If(),oa=If();function If(){return 2**++j8n}const d5=Object.freeze(Object.defineProperty({__proto__:null,boolean:en,booleanish:ls,commaOrSpaceSeparated:oa,commaSeparated:af,number:Ye,overloadedBoolean:f5,spaceSeparated:vr},Symbol.toStringTag,{value:"Module"})),jw=Object.keys(d5);class E6 extends Ki{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"&&O8n.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(sA,L8n);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!sA.test(i)){let a=i.replace(M8n,D8n);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=E6}return new s(r,n)}function D8n(e){return"-"+e.toLowerCase()}function L8n(e){return e.charAt(1).toUpperCase()}const cB=eB([tB,A8n,sB,iB,aB],"html"),ay=eB([tB,T8n,sB,iB,aB],"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 I8n(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const aA=/[#.]/g;function $8n(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function K8n(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function W8n(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function uA(e){return W8n(e)||_B(e)}const _A=document.createElement("i");function U0(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 Q8n=["","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 X8n(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 h=(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 b=e.charCodeAt(i+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){o+=String.fromCharCode(m),f++;continue}const y=i+1;let x=y,C=y,N;if(b===35){C=++x;const G=e.charCodeAt(C);G===88||G===120?(N="hexadecimal",C=++x):N="decimal"}else N="named";let j="",A="",z="";const M=N==="named"?uA:N==="decimal"?_B:K8n;for(C--;++C<=e.length;){const G=e.charCodeAt(C);if(!M(G))break;z+=String.fromCharCode(G),N==="named"&&V8n.includes(z)&&(j=z,A=U0(z))}let D=e.charCodeAt(C)===59;if(D){C++;const G=N==="named"?U0(z):!1;G&&(j=z,A=G)}let I=1+C-y,B="";if(!(!D&&t.nonTerminated===!1))if(!z)N!=="named"&&k(4,I);else if(N==="named"){if(D&&!A)k(5,1);else if(j!==z&&(C=x+j.length,I=1+C-x,D=!1),!D){const G=j?1:3;if(t.attribute){const q=e.charCodeAt(C);q===61?(k(G,I),A=""):uA(q)?A="":k(G,I)}else k(G,I)}B=A}else{D||k(2,I);let G=Number.parseInt(z,N==="hexadecimal"?16:10);if(Y8n(G))k(7,I),B="�";else if(G in lA)k(6,I),B=lA[G];else{let q="";Z8n(G)&&k(6,I),G>65535&&(G-=65536,q+=String.fromCharCode(G>>>10|55296),G=56320|G&1023),B=q+String.fromCharCode(G)}}if(B){v(),p=w(),i=C-1,f+=C-y+1,s.push(B);const G=w();G.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,B,{start:p,end:G},e.slice(y-1,C)),p=G}else z=e.slice(y-1,C),o+=z,f+=z.length,i=C-1}else m===10&&(h++,a++,f=0),Number.isNaN(m)?v():(o+=String.fromCharCode(m),f++);return s.join("");function w(){return{line:h,column:f,offset:i+((c?c.offset:0)||0)}}function k(b,y){let x;t.warning&&(x=w(),x.column+=y,x.offset+=y,t.warning.call(t.warningContext||void 0,Q8n[b],x,b))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:w()}),o="")}}function Y8n(e){return e>=55296&&e<=57343||e>1114111}function Z8n(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 J8n=0,v1={},Os={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++J8n}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Os.util.type(n)){case"Object":if(s=Os.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=Os.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:v1,plaintext:v1,text:v1,txt:v1,extend:function(e,n){var t=Os.util.clone(Os.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Os.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,Os.languages.DFS(Os.languages,function(u,h){h===c&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=Os.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],c=Os.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(Os.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Os.tokenize(r.code,r.grammar),Os.hooks.run("after-tokenize",r),y0.stringify(Os.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 e9n;return cv(s,s.head,e),fB(e,s,n,s.head,0),n9n(s)},hooks:{all:{},add:function(e,n){var t=Os.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Os.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:y0};function y0(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 fB(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);b+=v.value.length,v=v.next){var y=v.value;if(n.length>e.length)return;if(!(y instanceof y0)){var x=1,C;if(p){if(C=fA(k,b,e,f),!C||C.index>=e.length)break;var z=C.index,N=C.index+C[0].length,j=b;for(j+=v.value.length;z>=j;)v=v.next,j+=v.value.length;if(j-=v.value.length,b=j,v.value instanceof y0)continue;for(var A=v;A!==n.tail&&(ji.reach&&(i.reach=B);var G=v.prev;D&&(G=cv(n,G,D),b+=D.length),t9n(n,G,x);var q=new y0(a,h?Os.tokenize(M,h):M,m,M);if(v=cv(n,G,q),I&&cv(n,v,I),x>1){var Q={cause:a+","+c,reach:B};fB(e,n,t,v.prev,b,Q),i&&Q.reach>i.reach&&(i.reach=Q.reach)}}}}}}function e9n(){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 cv(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 t9n(e,n,t){for(var r=n.next,s=0;st)return null;try{return Bt.highlight(e,n).children}catch{return null}}function mB(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(mB)},n)}function u9n(e,n,t=3e5){var r;return((r=pB(e,n,t))==null?void 0:r.map(mB))??e}function gB(e,n,t=3e5){const r=pB(e,n,t);if(!r)return e.split(` +|(?![\\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)}_6.displayName="go";_6.aliases=[];function _6(e){e.register(gc),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"]}f6.displayName="ini";f6.aliases=[];function f6(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:/=/}}d6.displayName="java";d6.aliases=[];function d6(e){e.register(gc),(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)}h6.displayName="regex";h6.aliases=[];function h6(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}p6.displayName="json";p6.aliases=["webmanifest"];function p6(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}m6.displayName="kotlin";m6.aliases=["kt","kts"];function m6(e){e.register(gc),(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)}g6.displayName="less";g6.aliases=[];function g6(e){e.register(Yh),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"}})}v6.displayName="lua";v6.aliases=[];function v6(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:/[\[\](){},;]|\.+|:+/}}b6.displayName="makefile";b6.aliases=[];function b6(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:/[:;(){}]/}}y6.displayName="yaml";y6.aliases=["yml"];function y6(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 h=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(h,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)}x6.displayName="markdown";x6.aliases=["md"];function x6(e){e.register(Bm),(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 h=0,f=u.length;h]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}k6.displayName="perl";k6.aliases=[];function k6(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)}ay.displayName="markup-templating";ay.aliases=[];function ay(e){e.register(Bm),(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,h;r.code.indexOf(h=t(s,u))!==-1;)++u;return o[u]=c,h}),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 h=c[u];if(typeof h=="string"||h.content&&typeof h.content=="string"){var f=a[i],p=r.tokenStack[f],m=typeof h=="string"?h:h.content,w=t(s,f),k=m.indexOf(w);if(k>-1){++i;var v=m.substring(0,k),b=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),y=m.substring(k+w.length),x=[];v&&x.push.apply(x,o([v])),x.push(b),y&&x.push.apply(x,o([y])),typeof h=="string"?c.splice.apply(c,[u,1].concat(x)):h.content=x}}else h.content&&o(h.content)}return c}o(r.tokens)}}})})(e)}S6.displayName="php";S6.aliases=[];function S6(e){e.register(ay),(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 h=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",h)}}),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(gc),(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)}j6.displayName="sass";j6.aliases=[];function j6(e){e.register(Yh),(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)}A6.displayName="scss";A6.aliases=[];function A6(e){e.register(Yh),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}T6.displayName="sql";T6.aliases=[];function T6(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:/[;[\]()`,.]/}}R6.displayName="swift";R6.aliases=[];function R6(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})}M6.displayName="typescript";M6.aliases=["ts"];function M6(e){e.register(iy),(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)}oy.displayName="basic";oy.aliases=[];function oy(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:/[,;:()]/}}O6.displayName="vbnet";O6.aliases=[];function O6(e){e.register(oy),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 Pm{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Pm.prototype.normal={};Pm.prototype.property={};Pm.prototype.space=void 0;function pB(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new Pm(t,r,n)}function U0(e){return e.toLowerCase()}class Vi{constructor(n,t){this.attribute=t,this.property=n}}Vi.prototype.attribute="";Vi.prototype.booleanish=!1;Vi.prototype.boolean=!1;Vi.prototype.commaOrSpaceSeparated=!1;Vi.prototype.commaSeparated=!1;Vi.prototype.defined=!1;Vi.prototype.mustUseProperty=!1;Vi.prototype.number=!1;Vi.prototype.overloadedBoolean=!1;Vi.prototype.property="";Vi.prototype.spaceSeparated=!1;Vi.prototype.space=void 0;let Q9n=0;const tn=Lf(),fs=Lf(),b5=Lf(),Ze=Lf(),yr=Lf(),sf=Lf(),ca=Lf();function Lf(){return 2**++Q9n}const y5=Object.freeze(Object.defineProperty({__proto__:null,boolean:tn,booleanish:fs,commaOrSpaceSeparated:ca,commaSeparated:sf,number:Ze,overloadedBoolean:b5,spaceSeparated:yr},Symbol.toStringTag,{value:"Module"})),Mw=Object.keys(y5);class D6 extends Vi{constructor(n,t,r,s){let i=-1;if(super(n,t),pA(this,"space",s),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&eEn.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(mA,nEn);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!mA.test(i)){let a=i.replace(J9n,tEn);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=D6}return new s(r,n)}function tEn(e){return"-"+e.toLowerCase()}function nEn(e){return e.charAt(1).toUpperCase()}const kB=pB([mB,X9n,bB,yB,xB],"html"),cy=pB([mB,Y9n,bB,yB,xB],"svg");function gA(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 rEn(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const vA=/[#.]/g;function sEn(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function dEn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function hEn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function wA(e){return hEn(e)||EB(e)}const kA=document.createElement("i");function G0(e){const n="&"+e+";";kA.innerHTML=n;const t=kA.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const pEn=["","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 mEn(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 h=(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 b=e.charCodeAt(i+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){o+=String.fromCharCode(m),f++;continue}const y=i+1;let x=y,C=y,N;if(b===35){C=++x;const G=e.charCodeAt(C);G===88||G===120?(N="hexadecimal",C=++x):N="decimal"}else N="named";let j="",A="",z="";const M=N==="named"?wA:N==="decimal"?EB:dEn;for(C--;++C<=e.length;){const G=e.charCodeAt(C);if(!M(G))break;z+=String.fromCharCode(G),N==="named"&&fEn.includes(z)&&(j=z,A=G0(z))}let D=e.charCodeAt(C)===59;if(D){C++;const G=N==="named"?G0(z):!1;G&&(j=z,A=G)}let I=1+C-y,B="";if(!(!D&&t.nonTerminated===!1))if(!z)N!=="named"&&k(4,I);else if(N==="named"){if(D&&!A)k(5,1);else if(j!==z&&(C=x+j.length,I=1+C-x,D=!1),!D){const G=j?1:3;if(t.attribute){const U=e.charCodeAt(C);U===61?(k(G,I),A=""):wA(U)?A="":k(G,I)}else k(G,I)}B=A}else{D||k(2,I);let G=Number.parseInt(z,N==="hexadecimal"?16:10);if(gEn(G))k(7,I),B="�";else if(G in xA)k(6,I),B=xA[G];else{let U="";vEn(G)&&k(6,I),G>65535&&(G-=65536,U+=String.fromCharCode(G>>>10|55296),G=56320|G&1023),B=U+String.fromCharCode(G)}}if(B){v(),p=w(),i=C-1,f+=C-y+1,s.push(B);const G=w();G.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,B,{start:p,end:G},e.slice(y-1,C)),p=G}else z=e.slice(y-1,C),o+=z,f+=z.length,i=C-1}else m===10&&(h++,a++,f=0),Number.isNaN(m)?v():(o+=String.fromCharCode(m),f++);return s.join("");function w(){return{line:h,column:f,offset:i+((c?c.offset:0)||0)}}function k(b,y){let x;t.warning&&(x=w(),x.column+=y,x.offset+=y,t.warning.call(t.warningContext||void 0,pEn[b],x,b))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:w()}),o="")}}function gEn(e){return e>=55296&&e<=57343||e>1114111}function vEn(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 bEn=0,v1={},Os={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++bEn}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Os.util.type(n)){case"Object":if(s=Os.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=Os.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:v1,plaintext:v1,text:v1,txt:v1,extend:function(e,n){var t=Os.util.clone(Os.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Os.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,Os.languages.DFS(Os.languages,function(u,h){h===c&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=Os.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],c=Os.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(Os.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Os.tokenize(r.code,r.grammar),Os.hooks.run("after-tokenize",r),x0.stringify(Os.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 yEn;return cv(s,s.head,e),NB(e,s,n,s.head,0),wEn(s)},hooks:{all:{},add:function(e,n){var t=Os.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Os.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:x0};function x0(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function SA(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 NB(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);b+=v.value.length,v=v.next){var y=v.value;if(n.length>e.length)return;if(!(y instanceof x0)){var x=1,C;if(p){if(C=SA(k,b,e,f),!C||C.index>=e.length)break;var z=C.index,N=C.index+C[0].length,j=b;for(j+=v.value.length;z>=j;)v=v.next,j+=v.value.length;if(j-=v.value.length,b=j,v.value instanceof x0)continue;for(var A=v;A!==n.tail&&(ji.reach&&(i.reach=B);var G=v.prev;D&&(G=cv(n,G,D),b+=D.length),xEn(n,G,x);var U=new x0(a,h?Os.tokenize(M,h):M,m,M);if(v=cv(n,G,U),I&&cv(n,v,I),x>1){var Q={cause:a+","+c,reach:B};NB(e,n,t,v.prev,b,Q),i&&Q.reach>i.reach&&(i.reach=Q.reach)}}}}}}function yEn(){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 cv(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 xEn(e,n,t){for(var r=n.next,s=0;st)return null;try{return $t.highlight(e,n).children}catch{return null}}function TB(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(TB)},n)}function AEn(e,n,t=3e5){var r;return((r=AB(e,n,t))==null?void 0:r.map(TB))??e}function RB(e,n,t=3e5){const r=AB(e,n,t);if(!r)return e.split(` `);const s=[];let i=[];const a=[];let o=0;const c=h=>{let f=h;for(let p=a.length-1;p>=0;p--)f=_.jsx("span",{className:a[p],children:f},o++);i.push(f)},u=h=>{var f;if(h.type==="text"){(h.value??"").split(` -`).forEach((p,m)=>{m>0&&(s.push(i),i=[]),p&&c(p)});return}h.type==="element"&&(a.push((((f=h.properties)==null?void 0:f.className)??[]).join(" ")),(h.children??[]).forEach(u),a.pop())};return r.forEach(u),s.push(i),s}function vB(e){return Array.isArray(e)?e.length===0:e===""}function bB({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:a,scrollRequest:o,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:h}){const f=T.useMemo(()=>gB(e,YS(i)),[e,i]),{ruleCh:p,codeCh:m}=J$(f.length),w=T.useRef(null),k=T.useRef(null),v=()=>{const C=w.current;C&&k.current&&(k.current.scrollTop=C.scrollTop)},b=T.useRef(u);T.useLayoutEffect(()=>{const C=w.current;!C||!b.current||(C.scrollTop=b.current.top,C.scrollLeft=b.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(` -`),j=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:j,selectionEnd:A}=N,z=e.slice(0,j)+" "+e.slice(A);n(z),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=j+1})}}},x=`absolute inset-0 m-0 py-3.5 pe-4 ${Zv} ${Y$} [scrollbar-gutter:stable]`;return _.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Zv}`,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 ${x} 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:`${Z$} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),vB(C)?_.jsx("br",{}):C]},N))}),_.jsx("textarea",{ref:w,className:`file-view-editarea ${x} 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(),h==null||h({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:y,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function yB({onClose:e,onSaved:n}){const t=y5n(),r=_t(t),[s,i]=T.useState(()=>r.data??null),[a,o]=T.useState(()=>{var x;return((x=r.data)==null?void 0:x.content)??""}),c=!s&&r.error?r.error.message:null,u=gn({mutationFn:({content:x,previous:C})=>X4n(x,C)}),[h,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(h);k.current=w,v.current=h,m.current=e,T.useEffect(()=>{!r.data||k.current||v.current||(i(r.data),o(r.data.content))},[r.data]);const b=()=>{v.current||k.current&&!window.confirm(S_n())||m.current()};Dm(p,b,"textarea");async function y(){if(!(!s||!w||h)){f(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!Gn(t.queryKey))return;Vr(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),sn($_n(),"success")}catch(x){sn(x instanceof Error?x.message:String(x),"error")}finally{f(!1)}}}return ai.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:x=>{x.target===x.currentTarget&&b()},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:G_n()}),_.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),_.jsx($t,{className:"absolute end-3.5 top-3.5","aria-label":g_n(),onClick:b,disabled:h,children:_.jsx(br,{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(Nt,{})," ",T_n()]}):_.jsx(bB,{value:a,onChange:o,onSave:()=>void y(),path:s.path})}),_.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[_.jsx(Ie,{onClick:b,disabled:h,children:df()}),_.jsx(Ie,{variant:"primary",onClick:()=>void y(),disabled:!w||h,children:h?ka():hc()})]})]})}),document.body)}function xB({runtime:e,corner:n=!1}){const[t,r]=T.useState(null);return e.kind==="ssh"?_.jsx(u5,{runtime:e,corner:n}):_.jsxs(_.Fragment,{children:[n?_.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:_.jsxs(Ie,{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:T3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:[_.jsx(Yv,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:Iv()})]})}):_.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($t,{size:"small","aria-label":T3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:_.jsx(Yv,{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:Iv()}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ce(e.version)]})]})]})}),t==="hosts"&&_.jsx(v8n,{onClose:()=>r(null),onConfigureSsh:()=>r("config")}),t==="config"&&_.jsx(yB,{onClose:()=>r("hosts")})]})}function z6(e=!0){var r;const n=qv(),t=_t({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>Vr(n.queryKey,s)}}const _9n=6e4,f9n=500,wB=e=>`https://github.com/alphaXiv/OpenResearch/releases/tag/${e.split("/").map(encodeURIComponent).join("/")}`;function kB(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=qv(),u=()=>i.current||!Gn(c.queryKey);t(!0),s(null),(async()=>{try{if(await M4n(),u())return;const h=Date.now()+_9n;for(;Date.now()setTimeout(p,f9n)),u())return;const f=await et.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(f&&f.instance!==a){window.location.reload();return}}throw new Error(bbn())}catch(h){if(u())return;s(h instanceof Error?h.message:String(h)),t(!1)}})()}}}function SB({status:e}){const[n,t]=T.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=kB(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(Wa,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),_.jsx("span",{className:"min-w-0",children:i?hI({error:i}):Kvn({version:Ce(r)})}),(e==null?void 0:e.installedTag)&&_.jsx("a",{href:wB(e.installedTag),target:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:nI()}),(e==null?void 0:e.canRestart)&&_.jsx(Ie,{type:"button",size:"small",disabled:s,onClick:a,children:s?pI():dI()}),_.jsx($t,{type:"button",size:"small",className:"ms-auto","aria-label":ebn(),disabled:s,onClick:()=>t(r),children:_.jsx(br,{size:13})})]})}function j6(){return _.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:_.jsx(Nt,{})})}function d9n(){return _.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[_.jsx("p",{children:po()}),_.jsx(Ib,{to:"/projects",children:g0()})]})}function A6({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(Ie,{onClick:n,children:si()}),_.jsx(Ib,{to:"/projects",children:g0()})]})}function CB({projectId:e}){const{queryClient:n}=aS({from:"__root__"}),t=Lb(),[r,s]=T.useState(null),[i,a]=T.useState(0);return T.useEffect(()=>{let o=!0;return s(null),(e?$7n(e,n):I7n(n)).then(c=>{o&&t({href:c,replace:!0})}).catch(c=>{o&&(kK(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{o=!1}},[e,i,t,n]),r?_.jsx(A6,{error:r,reset:()=>a(o=>o+1)}):_.jsx(j6,{})}function h9n(){return _.jsx(CB,{})}function p9n({projectId:e}){return _.jsx(CB,{projectId:e})}function m9n(){const e=P$(),n=Lb(),t=zh(),r=_t(t),s=_t(Om()),i=r.data,a=s.data,o=(i==null?void 0:i.length)===0&&(a==null?void 0:a.onboardingCompleted)===!1,c=r.error??s.error,u=()=>{r.refetch(),s.refetch()},{status:h}=z6(e.kind==="local");T.useEffect(()=>{document.title="OpenResearch",a&&Zb.queue({...US()??a.workspace??{railOpen:!0,panelWidth:q$(),experimentsView:"table"},lastLocation:"/projects"})},[a]);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(K$,{}),_.jsx(SB,{status:h})]}),c&&(!i||!a)?_.jsx(A6,{error:c,reset:u}):!i||!a?_.jsx(j6,{}):o?_.jsx(Y7n,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{L7n(),f(p.id)}}):_.jsx(g8n,{remote:e.kind==="ssh",projects:i,onOpen:f,onCreated:(p,m)=>{m?(sn(m,"error"),n({to:"/projects/$projectId/settings/$tab",params:{projectId:p.id,tab:"git"}})):f(p.id)},onDeleted:p=>Vr(t.queryKey,m=>m==null?void 0:m.filter(w=>w.id!==p))}),(e.kind==="ssh"||i&&a&&!o)&&_.jsx(xB,{runtime:e,corner:!0})]})}const g9n=dc()({component:h9n}),v9n=dc()({component:M0}),b9n=dc()({}),y9n=dc()({component:m9n}),x9n=e=>({queryKey:zt("getRunDiff",e),queryFn:({signal:n})=>r4n(e,n),staleTime:3e4}),EB=e=>({queryKey:zt("getExperimentDiff",e),queryFn:({signal:n})=>s4n(e,n),staleTime:3e4}),Jv=(e,n,t={})=>({queryKey:zt("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>i4n(e,n,t,r),staleTime:t.ref?Nh(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),NB=e=>({queryKey:zt("getAbsoluteFile",e),queryFn:({signal:n})=>a4n(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),zB=(e,n={})=>({queryKey:zt("getCodeTree",e,{...n}),queryFn:({signal:t})=>C4n(e,n,t),staleTime:n.ref&&Nh(n.ref)?1/0:3e4}),eb=e=>({queryKey:zt("getSessionWorktree",e),queryFn:({signal:n})=>E4n(e,n),staleTime:3e4}),w9n=e=>({queryKey:zt("getArtifacts",e),queryFn:({signal:n})=>d3n(e,n),staleTime:3e4}),T6=(e,n)=>({queryKey:zt("getArtifactFileText",e,n),queryFn:({signal:t})=>g3n(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),jB=(e,n)=>({queryKey:zt("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>b3n(e,n,t),staleTime:2e3}),k9n=()=>({queryKey:zt("getLatexEngine"),queryFn:({signal:e})=>_4n(e),staleTime:3e5}),S9n=()=>({queryKey:zt("getOverleafSettings"),queryFn:({signal:e})=>d4n(e),staleTime:3e5}),C9n=(e,n,t={})=>({queryKey:zt("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>b4n(e,n,t,r),staleTime:3e5}),E9n=(e,n,t={})=>({queryKey:zt("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>k4n(e,n,t,r),staleTime:3e4}),AB=(e,n,t,r,s)=>({queryKey:zt("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!Nh(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",h=async()=>{const m=await o(jB(e,n)),w=(m==null?void 0:m.presentation)==="text"||(m==null?void 0:m.presentation)==="unknown",k=m&&w?await o(T6(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(Jv(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(w&&!w.notFound)return w}return null},p=await(c?o(NB(n)).then(m=>({source:"absolute",file:m})):u?h().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(Jv(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?h().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(Nh(s))return;const i=AB(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[NB(n).queryKey]:[Jv(e,n,{sessionId:r,ref:s}).queryKey,Jv(e,`artifacts/${n}`,{sessionId:r}).queryKey,T6(e,n).queryKey,jB(e,n).queryKey]];await Promise.all(a.map(o=>et.cancelQueries({queryKey:o,exact:!0}))),await Promise.all(a.map(o=>et.invalidateQueries({queryKey:o,exact:!0,refetchType:"none"}))),await et.invalidateQueries({queryKey:i.queryKey,exact:!0})}function z9n(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 dA={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 j9n(e){return dA[e]??dA.idle}const A9n={done:cI,failed:fdn,running:Edn,starting:Mdn,cancelling:Vfn,cancelled:Bfn,editing:idn,idle:bdn};function R6(e){const n=A9n[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function pl({status:e,label:n,className:t}){const r=j9n(e);return _.jsx(Zd,{tone:r.tone,live:r.live,className:t,children:n??R6(e)})}const bf={local:oL,tinker:uMe,hf:lRe,modal:jRe,k8s:mRe,ssh:rMe,slurm:XRe,ray:qRe,openresearch:LRe};function hA(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||(h[c]=a[c]);return h})(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 Dn(e,n){return RB(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=[],h=!0,f=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;h=!1}else for(;!(h=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);h=!0);}catch(p){f=!0,a=p}finally{try{if(!h&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(f)throw a}}return u}})(e,n)||oy(e,n)||OB()}function TB(e){return RB(e)||MB(e)||oy(e)||OB()}function pa(e){return(function(n){if(Array.isArray(n))return g5(n)})(e)||MB(e)||oy(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 RB(e){if(Array.isArray(e))return e}function MB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function oy(e,n){if(e){if(typeof e=="string")return g5(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)?g5(e,n):void 0}}function g5(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 b1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fm(e,n){return e(n={exports:{}},n.exports),n.exports}var da=Fm((function(e){/*! +`).forEach((p,m)=>{m>0&&(s.push(i),i=[]),p&&c(p)});return}h.type==="element"&&(a.push((((f=h.properties)==null?void 0:f.className)??[]).join(" ")),(h.children??[]).forEach(u),a.pop())};return r.forEach(u),s.push(i),s}function MB(e){return Array.isArray(e)?e.length===0:e===""}function OB({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:a,scrollRequest:o,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:h}){const f=T.useMemo(()=>RB(e,a6(i)),[e,i]),{ruleCh:p,codeCh:m}=hB(f.length),w=T.useRef(null),k=T.useRef(null),v=()=>{const C=w.current;C&&k.current&&(k.current.scrollTop=C.scrollTop)},b=T.useRef(u);T.useLayoutEffect(()=>{const C=w.current;!C||!b.current||(C.scrollTop=b.current.top,C.scrollLeft=b.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(` +`),j=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:j,selectionEnd:A}=N,z=e.slice(0,j)+" "+e.slice(A);n(z),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=j+1})}}},x=`absolute inset-0 m-0 py-3.5 pe-4 ${Jv} ${fB} [scrollbar-gutter:stable]`;return _.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Jv}`,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 ${x} 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:`${dB} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),MB(C)?_.jsx("br",{}):C]},N))}),_.jsx("textarea",{ref:w,className:`file-view-editarea ${x} 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(),h==null||h({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:y,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function DB({onClose:e,onSaved:n}){const t=Pkn(),r=ut(t),[s,i]=T.useState(()=>r.data??null),[a,o]=T.useState(()=>{var x;return((x=r.data)==null?void 0:x.content)??""}),c=!s&&r.error?r.error.message:null,u=pn({mutationFn:({content:x,previous:C})=>m5n(x,C)}),[h,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(h);k.current=w,v.current=h,m.current=e,T.useEffect(()=>{!r.data||k.current||v.current||(i(r.data),o(r.data.content))},[r.data]);const b=()=>{v.current||k.current&&!window.confirm(qfn())||m.current()};Dm(p,b,"textarea");async function y(){if(!(!s||!w||h)){f(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!zn(t.queryKey))return;Vr(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),Zt(rdn(),"success")}catch(x){Zt(x instanceof Error?x.message:String(x),"error")}finally{f(!1)}}}return si.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:x=>{x.target===x.currentTarget&&b()},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:udn()}),_.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),_.jsx(It,{className:"absolute end-3.5 top-3.5","aria-label":Lfn(),onClick:b,disabled:h,children:_.jsx(xr,{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(St,{})," ",Xfn()]}):_.jsx(OB,{value:a,onChange:o,onSave:()=>void y(),path:s.path})}),_.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[_.jsx(Ie,{onClick:b,disabled:h,children:ff()}),_.jsx(Ie,{variant:"primary",onClick:()=>void y(),disabled:!w||h,children:h?Sa():pc()})]})]})}),document.body)}function LB({runtime:e,corner:n=!1}){const[t,r]=T.useState(null);return e.kind==="ssh"?_.jsx(g5,{runtime:e,corner:n}):_.jsxs(_.Fragment,{children:[n?_.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:_.jsxs(Ie,{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:$3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:[_.jsx(Zv,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:$v()})]})}):_.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(It,{size:"small","aria-label":$3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:_.jsx(Zv,{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:$v()}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ce(e.version)]})]})]})}),t==="hosts"&&_.jsx($9n,{onClose:()=>r(null),onConfigureSsh:()=>r("config")}),t==="config"&&_.jsx(DB,{onClose:()=>r("hosts")})]})}function I6(e=!0){var r;const n=Uv(),t=ut({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>Vr(n.queryKey,s)}}const TEn=6e4,REn=500,IB=e=>`https://github.com/alphaXiv/OpenResearch/releases/tag/${e.split("/").map(encodeURIComponent).join("/")}`;function $B(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=Uv(),u=()=>i.current||!zn(c.queryKey);t(!0),s(null),(async()=>{try{if(await J3n(),u())return;const h=Date.now()+TEn;for(;Date.now()setTimeout(p,REn)),u())return;const f=await tt.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(f&&f.instance!==a){window.location.reload();return}}throw new Error($yn())}catch(h){if(u())return;s(h instanceof Error?h.message:String(h)),t(!1)}})()}}}function BB({status:e}){const[n,t]=T.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=$B(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(Va,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),_.jsx("span",{className:"min-w-0",children:i?jI({error:i}):fyn({version:Ce(r)})}),(e==null?void 0:e.installedTag)&&_.jsx("a",{href:IB(e.installedTag),target:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:gI()}),(e==null?void 0:e.canRestart)&&_.jsx(Ie,{type:"button",size:"small",disabled:s,onClick:a,children:s?AI():zI()}),_.jsx(It,{type:"button",size:"small",className:"ms-auto","aria-label":byn(),disabled:s,onClick:()=>t(r),children:_.jsx(xr,{size:13})})]})}function $6(){return _.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:_.jsx(St,{})})}function MEn(){return _.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[_.jsx("p",{children:fo()}),_.jsx(Bb,{to:"/projects",children:v0()})]})}function B6({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(Ie,{onClick:n,children:ni()}),_.jsx(Bb,{to:"/projects",children:v0()})]})}function PB({projectId:e}){const{queryClient:n}=dS({from:"__root__"}),t=$b(),[r,s]=T.useState(null),[i,a]=T.useState(0);return T.useEffect(()=>{let o=!0;return s(null),(e?s9n(e,n):r9n(n)).then(c=>{o&&t({href:c,replace:!0})}).catch(c=>{o&&(LV(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{o=!1}},[e,i,t,n]),r?_.jsx(B6,{error:r,reset:()=>a(o=>o+1)}):_.jsx($6,{})}function OEn(){return _.jsx(PB,{})}function DEn({projectId:e}){return _.jsx(PB,{projectId:e})}function LEn(){const e=tB(),n=$b(),t=zh(),r=ut(t),s=ut(Om()),i=r.data,a=s.data,o=(i==null?void 0:i.length)===0&&(a==null?void 0:a.onboardingCompleted)===!1,c=r.error??s.error,u=()=>{r.refetch(),s.refetch()},{status:h}=I6(e.kind==="local");T.useEffect(()=>{document.title="OpenResearch",a&&ey.queue({...JS()??a.workspace??{railOpen:!0,panelWidth:sB(),experimentsView:"table"},lastLocation:"/projects"})},[a]);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(cB,{}),_.jsx(BB,{status:h})]}),c&&(!i||!a)?_.jsx(B6,{error:c,reset:u}):!i||!a?_.jsx($6,{}):o?_.jsx(g9n,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{n9n(),f(p.id)}}):_.jsx(I9n,{remote:e.kind==="ssh",projects:i,onOpen:f,onCreated:(p,m)=>{m?(Zt(m,"error"),n({to:"/projects/$projectId/settings/$tab",params:{projectId:p.id,tab:"git"}})):f(p.id)},onDeleted:p=>Vr(t.queryKey,m=>m==null?void 0:m.filter(w=>w.id!==p))}),(e.kind==="ssh"||i&&a&&!o)&&_.jsx(LB,{runtime:e,corner:!0})]})}const IEn=hc()({component:OEn}),$En=hc()({component:O0}),BEn=hc()({}),PEn=hc()({component:LEn});function k5(e,n,t){return e.source==="checkout"?{path:e.file.path,source:"repo",sessionId:e.file.root==="worktree"?n:void 0,ref:e.file.root==="branch"?t:void 0}:{path:e.file.path,source:e.source==="artifact"?"artifacts":"abs"}}function FB(e,n){const t=e.map(s=>({...s,children:s.children?FB(s.children,[]):void 0}));for(const s of n){const i=s.path.split("/");let a=t;for(let o=0;oh.path===c);if(o===i.length-1)u||a.push({...s});else{const h=u??{path:c,name:i[o],isDir:!0,size:0,modifiedAt:0,children:[]};u||a.push(h),h.children??(h.children=[]),a=h.children}}}const r=s=>{s.sort((i,a)=>Number(a.isDir)-Number(i.isDir)||i.name.localeCompare(a.name)),s.forEach(i=>{i.children&&r(i.children)})};return r(t),t}const FEn=e=>({queryKey:kt("getRunDiff",e),queryFn:({signal:n})=>w3n(e,n),staleTime:3e4}),HB=e=>({queryKey:kt("getExperimentDiff",e),queryFn:({signal:n})=>k3n(e,n),staleTime:3e4}),eb=(e,n,t={})=>({queryKey:kt("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>S3n(e,n,t,r),staleTime:t.ref?Nh(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),qB=e=>({queryKey:kt("getAbsoluteFile",e),queryFn:({signal:n})=>C3n(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),UB=(e,n={})=>({queryKey:kt("getCodeTree",e,{...n}),queryFn:({signal:t})=>G3n(e,n,t),staleTime:n.ref&&Nh(n.ref)?1/0:3e4}),tb=e=>({queryKey:kt("getSessionWorktree",e),queryFn:({signal:n})=>K3n(e,n),staleTime:3e4}),HEn=e=>({queryKey:kt("getArtifacts",e),queryFn:({signal:n})=>M5n(e,n),staleTime:3e4}),P6=(e,n)=>({queryKey:kt("getFileLocation",e,n),queryFn:({signal:t})=>j3n(e,n,t),staleTime:0}),qEn=(e,n)=>({queryKey:kt("searchArtifacts",e,n),queryFn:({signal:t,pageParam:r})=>A3n(e,n,r,t),initialPageParam:void 0,getNextPageParam:t=>t.nextCursor??void 0,staleTime:5e3}),F6=(e,n)=>({queryKey:kt("getArtifactFileText",e,n),queryFn:({signal:t})=>I5n(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),GB=(e,n)=>({queryKey:kt("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>B5n(e,n,t),staleTime:2e3}),UEn=()=>({queryKey:kt("getLatexEngine"),queryFn:({signal:e})=>T3n(e),staleTime:3e5}),GEn=()=>({queryKey:kt("getOverleafSettings"),queryFn:({signal:e})=>M3n(e),staleTime:3e5}),KEn=(e,n,t={})=>({queryKey:kt("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>B3n(e,n,t,r),staleTime:3e5}),VEn=(e,n,t={})=>({queryKey:kt("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>q3n(e,n,t,r),staleTime:3e4}),H6=(e,n,t,r,s)=>({queryKey:kt("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!Nh(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",h=async()=>{const m=await o(GB(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(eb(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(w&&!w.notFound)return w}return null},p=await(c?o(qB(n)).then(m=>({source:"absolute",file:m})):u?h().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(eb(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?h().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 WEn(e,n,t,r,s){if(Nh(s))return;const i=H6(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[qB(n).queryKey]:[eb(e,n,{sessionId:r,ref:s}).queryKey,eb(e,`artifacts/${n}`,{sessionId:r}).queryKey,F6(e,n).queryKey,GB(e,n).queryKey]];await Promise.all(a.map(o=>tt.cancelQueries({queryKey:o,exact:!0}))),await Promise.all(a.map(o=>tt.invalidateQueries({queryKey:o,exact:!0,refetchType:"none"}))),await tt.invalidateQueries({queryKey:i.queryKey,exact:!0})}function QEn(e,n){ly(n?`${e.replace(/[\\/]+$/,"")}/${n}`:e)}function ly(e){const n=navigator.clipboard;if(!n){typeof e!="string"&&e.catch(()=>{}),Zt(kL(),"error");return}(typeof e=="string"?n.writeText(e):typeof ClipboardItem<"u"&&n.write?n.write([new ClipboardItem({"text/plain":e.then(r=>new Blob([r],{type:"text/plain"}))})]):e.then(r=>n.writeText(r))).then(()=>Zt(uf(),"success")).catch(r=>Zt(r instanceof Error?r.message:String(r),"error"))}function KB({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(Br,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":yFe({path:Ce(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 q6(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 U6({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onReveal:a,pathStatus:o,copyLabel:c,openLabel:u,onClose:h}){const f=T.useRef(null),p=T.useRef(h);p.current=h;const[m,w]=T.useState({x:e.x,y:e.y});T.useLayoutEffect(()=>{var N;const b=f.current;if(!b)return;const y=document.activeElement instanceof HTMLElement?document.activeElement:null,x=()=>w({x:Math.max(8,Math.min(e.x,window.innerWidth-b.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-b.offsetHeight-8))});x();const C=new ResizeObserver(x);return C.observe(b),(N=b.querySelector("button"))==null||N.focus(),()=>{C.disconnect(),b.contains(document.activeElement)&&(y==null||y.focus())}},[e]),T.useEffect(()=>{const b=()=>p.current(),y=C=>{var N;(N=f.current)!=null&&N.contains(C.target instanceof Node?C.target:null)||p.current()},x=C=>{if(C.key==="Tab"){C.preventDefault(),p.current();return}C.key==="Escape"&&(C.preventDefault(),C.stopPropagation(),p.current())};return document.addEventListener("pointerdown",y),window.addEventListener("blur",b),window.addEventListener("resize",b),window.addEventListener("scroll",b,!0),document.addEventListener("keydown",x,!0),()=>{document.removeEventListener("pointerdown",y),window.removeEventListener("blur",b),window.removeEventListener("resize",b),window.removeEventListener("scroll",b,!0),document.removeEventListener("keydown",x,!0)}},[]);const k=b=>{p.current(),b()},v=(b,y,x=!1)=>_.jsx(vn,{size:"compact",role:"menuitem",danger:x,onClick:()=>k(y),children:_.jsx("span",{children:b})});return si.createPortal(_.jsxs("div",{ref:f,role:"menu","aria-label":aFe({path:Ce(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:m.x,top:m.y},onContextMenu:b=>b.preventDefault(),onKeyDown:b=>{var N,j;if(b.key!=="ArrowDown"&&b.key!=="ArrowUp")return;b.preventDefault();const y=[...((N=f.current)==null?void 0:N.querySelectorAll("button"))??[]],x=y.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:y[0]),C=b.key==="ArrowDown"?1:-1;(j=y[(x+C+y.length)%y.length])==null||j.focus()},children:[o&&_.jsx("p",{role:"status",className:"m-0 max-w-80 break-all px-2 py-1 text-xs text-subtext",dir:"auto",children:o}),n&&v(u??dFe(),n),t&&v(fL(),t),r&&v(JPe(),r),s&&v(c??jde(),s),a&&v(R3(),a),i&&v(_L(),i,!0)]}),document.body)}const uy=T.createContext(null),VB=T.createContext(null);function XEn(e,n){const t=T.useContext(VB),r=T.useContext(uy),[s,i]=T.useState(null),a=o=>{t&&(o.preventDefault(),o.stopPropagation(),i(q6(o,e)))};return{handlers:t?{onContextMenu:a,onKeyDown:o=>{(o.key==="ContextMenu"||o.shiftKey&&o.key==="F10")&&a(o)}}:{},menu:s&&t?{target:s,context:t,request:t.resolve(e,r,n),onClose:()=>i(null)}:null}}function YEn({target:e,context:n,request:t,onClose:r,onOpen:s}){var p,m,w;const i=yi(),a=ut({...H6(n.projectId,(t==null?void 0:t.path)??"",(t==null?void 0:t.source)??"repo",t==null?void 0:t.sessionId,t==null?void 0:t.ref),enabled:t!==null}),o=a.data,c=o?k5(o,t==null?void 0:t.sessionId,t==null?void 0:t.ref):t,u=ut({...P6(n.projectId,c??{path:"",source:"repo"}),enabled:!!o&&!o.file.notFound&&!a.isFetching}),h=!a.isFetching&&!u.isFetching&&!a.isError&&!u.isError&&!(o!=null&&o.file.notFound)?(p=u.data)==null?void 0:p.absolutePath:null,f=!t||o!=null&&o.file.notFound?Lv():((m=a.error)==null?void 0:m.message)??((w=u.error)==null?void 0:w.message)??(h?n.remote?xL({path:Ce(h)}):Ce(h):t.ref?wS({branch:Ce(t.ref)}):wL());return _.jsx(U6,{target:e,openLabel:xPe(),copyLabel:T3(),onOpen:s,pathStatus:f,onCopyPath:h?()=>{zn(i)&&ly(h)}:void 0,onReveal:h&&!n.remote&&c?()=>{zn(i)&&MS(n.projectId,c.path,c).catch(k=>Zt(k instanceof Error?k.message:String(k),"error"))}:void 0,onClose:r})}function ZEn(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 CA={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 JEn(e){return CA[e]??CA.idle}const eNn={done:kI,failed:Thn,running:Ghn,starting:Zhn,cancelling:_hn,cancelled:shn,editing:Shn,idle:$hn};function G6(e){const n=eNn[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function ml({status:e,label:n,className:t}){const r=JEn(e);return _.jsx(Yd,{tone:r.tone,live:r.live,className:t,children:n??G6(e)})}const vf={local:yL,tinker:iOe,hf:sMe,modal:SMe,k8s:_Me,ssh:ZMe,slurm:GMe,ray:$Me,openresearch:TMe};function EA(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 nr(e){for(var n=1;n=0||(h[c]=a[c]);return h})(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 In(e,n){return QB(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=[],h=!0,f=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;h=!1}else for(;!(h=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);h=!0);}catch(p){f=!0,a=p}finally{try{if(!h&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(f)throw a}}return u}})(e,n)||_y(e,n)||YB()}function WB(e){return QB(e)||XB(e)||_y(e)||YB()}function ma(e){return(function(n){if(Array.isArray(n))return C5(n)})(e)||XB(e)||_y(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 QB(e){if(Array.isArray(e))return e}function XB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _y(e,n){if(e){if(typeof e=="string")return C5(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)?C5(e,n):void 0}}function C5(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 b1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fm(e,n){return e(n={exports:{}},n.exports),n.exports}var ha=Fm((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?b.slice(0,x):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var N=b.slice(x+1);N.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var j=b.slice(x+1).split(" "),A=j[0].split("..");a.oldRevision=A[0],a.newRevision=A[1],j[1]&&(a.oldMode=a.newMode=j[1]);break;case"copy":case"rename":var z=b.slice(x+1);z.indexOf("from")===0?a.oldPath=z.slice(5):a.newPath=z.slice(3),y=C;break;case"---":var M=b.slice(x+1),D=m[++k].slice(4);M==="/dev/null"?(D=D.slice(2),y="add"):D==="/dev/null"?(M=M.slice(2),y="delete"):(y="modify",M=M.slice(2),D=D.slice(2)),M&&(a.oldPath=M),D&&(a.newPath=D),p=5;break e}}a.type=y||"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 I=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:I[1]-0,newStart:I[4]-0,oldLines:I[3]-0||1,newLines:I[6]-0||1,changes:[]},a.hunks.push(o),c=o.oldStart,u=o.newStart}else{var B=v.slice(0,1),G={content:v.slice(1)};switch(B){case"+":G.type="insert",G.isInsert=!0,G.lineNumber=u,u++;break;case"-":G.type="delete",G.isDelete=!0,G.lineNumber=c,c++;break;case" ":G.type="normal",G.isNormal=!0,G.oldLineNumber=c,G.newLineNumber=u,c++,u++;break;case"\\":var q=o.changes[o.changes.length-1];q.isDelete||(a.newEndingNewLine=!1),q.isInsert||(a.oldEndingNewLine=!1)}G.type&&o.changes.push(G)}k++}return f}};e.exports=s})()}));function Ju(e){return e.type==="insert"}function ma(e){return e.type==="delete"}function bl(e){return e.type==="normal"}function O9n(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var c=Dn(i,3),u=c[0],h=c[1],f=c[2];return h?Ju(a)&&f>=0?(u.splice(f+1,0,a),[u,a,f+2]):(u.push(a),[u,a,ma(a)&&ma(h)?f:o]):(u.push(a),[u,a,ma(a)?o:-1])}),[[],null,-1]);return Dn(s,1)[0]})(e.changes):e.changes;return Jn(Jn({},e),{},{isPlain:!1,changes:t})}function v5(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?b.slice(0,x):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var N=b.slice(x+1);N.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var j=b.slice(x+1).split(" "),A=j[0].split("..");a.oldRevision=A[0],a.newRevision=A[1],j[1]&&(a.oldMode=a.newMode=j[1]);break;case"copy":case"rename":var z=b.slice(x+1);z.indexOf("from")===0?a.oldPath=z.slice(5):a.newPath=z.slice(3),y=C;break;case"---":var M=b.slice(x+1),D=m[++k].slice(4);M==="/dev/null"?(D=D.slice(2),y="add"):D==="/dev/null"?(M=M.slice(2),y="delete"):(y="modify",M=M.slice(2),D=D.slice(2)),M&&(a.oldPath=M),D&&(a.newPath=D),p=5;break e}}a.type=y||"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 I=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:I[1]-0,newStart:I[4]-0,oldLines:I[3]-0||1,newLines:I[6]-0||1,changes:[]},a.hunks.push(o),c=o.oldStart,u=o.newStart}else{var B=v.slice(0,1),G={content:v.slice(1)};switch(B){case"+":G.type="insert",G.isInsert=!0,G.lineNumber=u,u++;break;case"-":G.type="delete",G.isDelete=!0,G.lineNumber=c,c++;break;case" ":G.type="normal",G.isNormal=!0,G.oldLineNumber=c,G.newLineNumber=u,c++,u++;break;case"\\":var U=o.changes[o.changes.length-1];U.isDelete||(a.newEndingNewLine=!1),U.isInsert||(a.oldEndingNewLine=!1)}G.type&&o.changes.push(G)}k++}return f}};e.exports=s})()}));function Zu(e){return e.type==="insert"}function ga(e){return e.type==="delete"}function yl(e){return e.type==="normal"}function sNn(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var c=In(i,3),u=c[0],h=c[1],f=c[2];return h?Zu(a)&&f>=0?(u.splice(f+1,0,a),[u,a,f+2]):(u.push(a),[u,a,ga(a)&&ga(h)?f:o]):(u.push(a),[u,a,ga(a)?o:-1])}),[[],null,-1]);return In(s,1)[0]})(e.changes):e.changes;return nr(nr({},e),{},{isPlain:!1,changes:t})}function E5(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 M9n.parse(t).map((function(r){return(function(s,i){var a=s.hunks.map((function(o){return O9n(o,i)}));return Jn(Jn({},s),{},{hunks:a})})(r,n)}))}function D9n(e){return e[0]}function L9n(e){return e[e.length-1]}function b5(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function G0(e){return e==="old"?function(n){return Ju(n)?-1:bl(n)?n.oldLineNumber:n.lineNumber}:function(n){return ma(n)?-1:bl(n)?n.newLineNumber:n.lineNumber}}function LB(e,n){return function(t,r){var s=t[e],i=s+t[n];return r>=s&&r=i&&s-1},U9n=function(e,n){var t=this.__data__,r=cy(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function Ld(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),h=i.get(n);if(u&&h)return u==n&&h==e;var f=-1,p=!0,m=2&t?new NEn:void 0;for(i.set(e,n),i.set(n,e);++f-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},Sr={};Sr["[object Float32Array]"]=Sr["[object Float64Array]"]=Sr["[object Int8Array]"]=Sr["[object Int16Array]"]=Sr["[object Int32Array]"]=Sr["[object Uint8Array]"]=Sr["[object Uint8ClampedArray]"]=Sr["[object Uint16Array]"]=Sr["[object Uint32Array]"]=!0,Sr["[object Arguments]"]=Sr["[object Array]"]=Sr["[object ArrayBuffer]"]=Sr["[object Boolean]"]=Sr["[object DataView]"]=Sr["[object Date]"]=Sr["[object Error]"]=Sr["[object Function]"]=Sr["[object Map]"]=Sr["[object Number]"]=Sr["[object Object]"]=Sr["[object RegExp]"]=Sr["[object Set]"]=Sr["[object String]"]=Sr["[object WeakMap]"]=!1;var qEn=function(e){return Rh(e)&&D6(e.length)&&!!Sr[ep(e)]},UEn=function(e){return function(n){return e(n)}},wA=Fm((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&BB.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})),kA=wA&&wA.isTypedArray,L6=kA?UEn(kA):qEn,GEn=Object.prototype.hasOwnProperty,VEn=function(e,n){var t=ya(e),r=!t&&fy(e),s=!t&&!r&&tb(e),i=!t&&!r&&!s&&L6(e),a=t||r||s||i,o=a?$En(e.length,String):[],c=o.length;for(var u in e)!GEn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||GB(u,c))||o.push(u);return o},KEn=Object.prototype,VB=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||KEn)},WEn=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),QEn=Object.prototype.hasOwnProperty,KB=function(e){if(!VB(e))return WEn(e);var n=[];for(var t in Object(e))QEn.call(e,t)&&t!="constructor"&&n.push(t);return n},dy=function(e){return e!=null&&D6(e.length)&&!FB(e)},I6=function(e){return dy(e)?VEn(e):KB(e)},SA=function(e){return MEn(e,I6,IEn)},XEn=Object.prototype.hasOwnProperty,YEn=function(e,n,t,r,s,i){var a=1&t,o=SA(e),c=o.length;if(c!=SA(n).length&&!a)return!1;for(var u=c;u--;){var h=o[u];if(!(a?h in n:XEn.call(n,h)))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=Dn(e,1)[0];return n.type==="text"&&!n.value}return!0}function BNn(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=qu(e,INn),a=s?function(o,c){return s(o,jA,c)}:jA;return _.jsx("td",Jn(Jn({},i),{},{"data-change-key":n,children:r?$Nn(r)?" ":r.map(a):t||" "}))}var tP=T.memo(BNn);function nP(e,n){return function(){var t=n==="old"?vy(e):by(e);return t===-1?void 0:t}}function rP(e,n){return function(t){return e&&t?_.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function nb(e,n){return n?function(t){e(),n(t)}:e}function AA(e,n,t,r){return T.useMemo((function(){var s=eP(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=nb(t,s.onMouseEnter),s.onMouseLeave=nb(r,s.onMouseLeave),s}),[e,t,r,n])}function TA(e,n,t,r,s,i,a,o,c){var u={change:n,side:r,inHoverState:o,renderDefault:nP(n,r),wrapInAnchor:rP(s,i)};return _.jsx("td",Jn(Jn({className:e},a),{},{"data-change-key":t,children:c(u)}))}function PNn(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,c=e.generateLineClassName,u=e.gutterClassName,h=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,y=s.type,x=s.content,C=$u(s),N=(n=Dn(T.useState(!1),2),t=n[0],r=n[1],[t,T.useCallback((function(){return r(!0)}),[]),T.useCallback((function(){return r(!1)}),[])]),j=Dn(N,3),A=j[0],z=j[1],M=j[2],D=T.useMemo((function(){return{change:s}}),[s]),I=AA(f,D,z,M),B=AA(p,D,z,M),G=k(s),q=c({changes:[s],defaultGenerate:function(){return o}}),Q=da("diff-gutter","diff-gutter-".concat(y),u,{"diff-gutter-selected":i}),K=da("diff-code","diff-code-".concat(y),h,{"diff-code-selected":i});return _.jsxs("tr",{id:G,className:da("diff-line",q),children:[!m&&TA(Q,s,C,"old",w,G,I,A,b),!m&&TA(Q,s,C,"new",w,G,I,A,b),_.jsx(tP,Jn({className:K,changeKey:C,text:x,tokens:a,renderToken:v},B))]})}var FNn=T.memo(PNn);function HNn(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 qNn=["hideGutter","selectedChanges","tokens","lineClassName"],UNn=["hunk","widgets","className"];function GNn(e){var n=e.hunk,t=e.widgets,r=e.className,s=qu(e,UNn),i=(function(a,o){return a.reduce((function(c,u){var h=$u(u);c.push(["change",h,u]);var f=o[h];return f&&c.push(["widget",h,f]),c}),[])})(n.changes,t);return _.jsx("tbody",{className:da("diff-hunk",r),children:i.map((function(a){return(function(o,c){var u=Dn(o,3),h=u[0],f=u[1],p=u[2],m=c.hideGutter,w=c.selectedChanges,k=c.tokens,v=c.lineClassName,b=qu(c,qNn);if(h==="change"){var y=ma(p)?"old":"new",x=ma(p)?vy(p):by(p),C=k?k[y][x-1]:null;return _.jsx(FNn,Jn({className:v,change:p,hideGutter:m,selected:w.includes(f),tokens:C},b),"change".concat(f))}return h==="widget"?_.jsx(HNn,{hideGutter:m,element:p},"widget".concat(f)):null})(a,s)}))})}var sP=0;function x1(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=eP(r,(function(o){return function(c){return o&&o({side:e,change:t},c)}}));return a.onMouseEnter=nb(s,a.onMouseEnter),a.onMouseLeave=nb(i,a.onMouseLeave),a}),[t,r,s,e,i])}function Rw(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,h=e.gutterAnchor,f=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,w=e.renderToken,k=e.renderGutter;if(!n){var v=da("diff-gutter","diff-gutter-omit",i),b=da("diff-code","diff-code-omit",a);return[!p&&_.jsx("td",{className:v},"gutter"),_.jsx("td",{className:b},"code")]}var y=n.type,x=n.content,C=$u(n),N=t===sP?"old":"new",j=Jn({id:u||void 0,className:da("diff-gutter","diff-gutter-".concat(y),m5({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:k({change:n,side:N,inHoverState:m,renderDefault:nP(n,N),wrapInAnchor:rP(h,f)})},o),A=da("diff-code","diff-code-".concat(y),m5({"diff-code-selected":r},"diff-line-hover-"+N,m),a);return[!p&&_.jsx("td",Jn(Jn({},j),{},{"data-change-key":C}),"gutter"),_.jsx(tP,Jn({className:A,changeKey:C,text:x,tokens:s,renderToken:w},c),"code")]}function VNn(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,h=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,y=e.renderGutter,x=Dn(T.useState(""),2),C=x[0],N=x[1],j=x1("old",N,t,f),A=x1("new",N,r,f),z=x1("old",N,t,p),M=x1("new",N,r,p),D=t&&w(t),I=r&&w(r),B=k({changes:[t,r],defaultGenerate:function(){return n}}),G={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:h,gutterEvents:f,codeEvents:p,renderToken:b,renderGutter:y},q=Jn(Jn({},G),{},{change:t,side:sP,selected:s,tokens:a,gutterEvents:j,codeEvents:z,anchorID:D,gutterAnchor:v,gutterAnchorTarget:D,hover:C==="old"}),Q=Jn(Jn({},G),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:A,codeEvents:M,anchorID:t===r?null:I,gutterAnchor:v,gutterAnchorTarget:t===r?D:I,hover:C==="new"});if(c)return _.jsx("tr",{className:da("diff-line",B),children:Rw(t?q:Q)});var K=(function(Z,J){return Z&&!J?"diff-line-old-only":!Z&&J?"diff-line-new-only":Z===J?"diff-line-normal":"diff-line-compare"})(t,r);return _.jsxs("tr",{className:da("diff-line",K,B),children:[Rw(q),Rw(Q)]})}var KNn=T.memo(VNn);function WNn(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 QNn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],XNn=["hunk","widgets","className"];function w1(e,n){return(e?$u(e):"00")+(n?$u(n):"00")}function YNn(e){var n=e.hunk,t=e.widgets,r=e.className,s=qu(e,XNn),i=(function(a,o){for(var c=function(b){if(!b)return null;var y=$u(b);return o[y]||null},u=[],h=0;h=s&&r=i&&s-1},hNn=function(e,n){var t=this.__data__,r=fy(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function Dd(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),h=i.get(n);if(u&&h)return u==n&&h==e;var f=-1,p=!0,m=2&t?new YNn:void 0;for(i.set(e,n),i.set(n,e);++f-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 dzn=function(e){return Rh(e)&&W6(e.length)&&!!Nr[Jh(e)]},hzn=function(e){return function(n){return e(n)}},OA=Fm((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&nP.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})),DA=OA&&OA.isTypedArray,Q6=DA?hzn(DA):dzn,pzn=Object.prototype.hasOwnProperty,mzn=function(e,n){var t=xa(e),r=!t&&my(e),s=!t&&!r&&nb(e),i=!t&&!r&&!s&&Q6(e),a=t||r||s||i,o=a?czn(e.length,String):[],c=o.length;for(var u in e)!pzn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||cP(u,c))||o.push(u);return o},gzn=Object.prototype,lP=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||gzn)},vzn=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),bzn=Object.prototype.hasOwnProperty,uP=function(e){if(!lP(e))return vzn(e);var n=[];for(var t in Object(e))bzn.call(e,t)&&t!="constructor"&&n.push(t);return n},gy=function(e){return e!=null&&W6(e.length)&&!sP(e)},X6=function(e){return gy(e)?mzn(e):uP(e)},LA=function(e){return rzn(e,X6,ozn)},yzn=Object.prototype.hasOwnProperty,xzn=function(e,n,t,r,s,i){var a=1&t,o=LA(e),c=o.length;if(c!=LA(n).length&&!a)return!1;for(var u=c;u--;){var h=o[u];if(!(a?h in n:yzn.call(n,h)))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=In(e,1)[0];return n.type==="text"&&!n.value}return!0}function ljn(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=Hu(e,ojn),a=s?function(o,c){return s(o,FA,c)}:FA;return _.jsx("td",nr(nr({},i),{},{"data-change-key":n,children:r?cjn(r)?" ":r.map(a):t||" "}))}var vP=T.memo(ljn);function bP(e,n){return function(){var t=n==="old"?wy(e):ky(e);return t===-1?void 0:t}}function yP(e,n){return function(t){return e&&t?_.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function rb(e,n){return n?function(t){e(),n(t)}:e}function HA(e,n,t,r){return T.useMemo((function(){var s=gP(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=rb(t,s.onMouseEnter),s.onMouseLeave=rb(r,s.onMouseLeave),s}),[e,t,r,n])}function qA(e,n,t,r,s,i,a,o,c){var u={change:n,side:r,inHoverState:o,renderDefault:bP(n,r),wrapInAnchor:yP(s,i)};return _.jsx("td",nr(nr({className:e},a),{},{"data-change-key":t,children:c(u)}))}function ujn(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,c=e.generateLineClassName,u=e.gutterClassName,h=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,y=s.type,x=s.content,C=Iu(s),N=(n=In(T.useState(!1),2),t=n[0],r=n[1],[t,T.useCallback((function(){return r(!0)}),[]),T.useCallback((function(){return r(!1)}),[])]),j=In(N,3),A=j[0],z=j[1],M=j[2],D=T.useMemo((function(){return{change:s}}),[s]),I=HA(f,D,z,M),B=HA(p,D,z,M),G=k(s),U=c({changes:[s],defaultGenerate:function(){return o}}),Q=ha("diff-gutter","diff-gutter-".concat(y),u,{"diff-gutter-selected":i}),V=ha("diff-code","diff-code-".concat(y),h,{"diff-code-selected":i});return _.jsxs("tr",{id:G,className:ha("diff-line",U),children:[!m&&qA(Q,s,C,"old",w,G,I,A,b),!m&&qA(Q,s,C,"new",w,G,I,A,b),_.jsx(vP,nr({className:V,changeKey:C,text:x,tokens:a,renderToken:v},B))]})}var _jn=T.memo(ujn);function fjn(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 djn=["hideGutter","selectedChanges","tokens","lineClassName"],hjn=["hunk","widgets","className"];function pjn(e){var n=e.hunk,t=e.widgets,r=e.className,s=Hu(e,hjn),i=(function(a,o){return a.reduce((function(c,u){var h=Iu(u);c.push(["change",h,u]);var f=o[h];return f&&c.push(["widget",h,f]),c}),[])})(n.changes,t);return _.jsx("tbody",{className:ha("diff-hunk",r),children:i.map((function(a){return(function(o,c){var u=In(o,3),h=u[0],f=u[1],p=u[2],m=c.hideGutter,w=c.selectedChanges,k=c.tokens,v=c.lineClassName,b=Hu(c,djn);if(h==="change"){var y=ga(p)?"old":"new",x=ga(p)?wy(p):ky(p),C=k?k[y][x-1]:null;return _.jsx(_jn,nr({className:v,change:p,hideGutter:m,selected:w.includes(f),tokens:C},b),"change".concat(f))}return h==="widget"?_.jsx(fjn,{hideGutter:m,element:p},"widget".concat(f)):null})(a,s)}))})}var xP=0;function x1(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=gP(r,(function(o){return function(c){return o&&o({side:e,change:t},c)}}));return a.onMouseEnter=rb(s,a.onMouseEnter),a.onMouseLeave=rb(i,a.onMouseLeave),a}),[t,r,s,e,i])}function Lw(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,h=e.gutterAnchor,f=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,w=e.renderToken,k=e.renderGutter;if(!n){var v=ha("diff-gutter","diff-gutter-omit",i),b=ha("diff-code","diff-code-omit",a);return[!p&&_.jsx("td",{className:v},"gutter"),_.jsx("td",{className:b},"code")]}var y=n.type,x=n.content,C=Iu(n),N=t===xP?"old":"new",j=nr({id:u||void 0,className:ha("diff-gutter","diff-gutter-".concat(y),S5({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:k({change:n,side:N,inHoverState:m,renderDefault:bP(n,N),wrapInAnchor:yP(h,f)})},o),A=ha("diff-code","diff-code-".concat(y),S5({"diff-code-selected":r},"diff-line-hover-"+N,m),a);return[!p&&_.jsx("td",nr(nr({},j),{},{"data-change-key":C}),"gutter"),_.jsx(vP,nr({className:A,changeKey:C,text:x,tokens:s,renderToken:w},c),"code")]}function mjn(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,h=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,y=e.renderGutter,x=In(T.useState(""),2),C=x[0],N=x[1],j=x1("old",N,t,f),A=x1("new",N,r,f),z=x1("old",N,t,p),M=x1("new",N,r,p),D=t&&w(t),I=r&&w(r),B=k({changes:[t,r],defaultGenerate:function(){return n}}),G={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:h,gutterEvents:f,codeEvents:p,renderToken:b,renderGutter:y},U=nr(nr({},G),{},{change:t,side:xP,selected:s,tokens:a,gutterEvents:j,codeEvents:z,anchorID:D,gutterAnchor:v,gutterAnchorTarget:D,hover:C==="old"}),Q=nr(nr({},G),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:A,codeEvents:M,anchorID:t===r?null:I,gutterAnchor:v,gutterAnchorTarget:t===r?D:I,hover:C==="new"});if(c)return _.jsx("tr",{className:ha("diff-line",B),children:Lw(t?U:Q)});var V=(function(Z,J){return Z&&!J?"diff-line-old-only":!Z&&J?"diff-line-new-only":Z===J?"diff-line-normal":"diff-line-compare"})(t,r);return _.jsxs("tr",{className:ha("diff-line",V,B),children:[Lw(U),Lw(Q)]})}var gjn=T.memo(mjn);function vjn(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 bjn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],yjn=["hunk","widgets","className"];function w1(e,n){return(e?Iu(e):"00")+(n?Iu(n):"00")}function xjn(e){var n=e.hunk,t=e.widgets,r=e.className,s=Hu(e,yjn),i=(function(a,o){for(var c=function(b){if(!b)return null;var y=Iu(b);return o[y]||null},u=[],h=0;h=(i==null?void 0:i.value.length))return[e];var o=function(f,p){var m=i.value.slice(f,p);return[].concat(pa(s),[Jn(Jn({},i),{},{value:m})])};if(n>0){var c=o(0,n);a.push(qd(c))}var u=o(Math.max(n,0),t);if(a.push(r?(function(f,p){return[p].concat(pa(qd(f)))})(u,r):qd(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=qu(e,gzn);t.push(s);var i,a=M6(r);try{for(a.s();!(i=a.n()).done;)cP(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(qd([].concat(pa(t.slice(1)),[e])));return n}function vzn(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var u=H6(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[k1(r(n.oldSource)),k1(r(t))]}var s=In(Ljn(e),2),i=s[0],a=s[1],o=n.highlight?function(c){return k1(n.refractor.highlight(c,n.language))}:function(c){return k1([{type:"text",value:c}])};return[o(i),o(a)]}function Hd(e){return e.map((function(n){return nr({},n)}))}function $jn(e,n){return[].concat(ma(Hd(e.slice(0,-1))),[n])}function Bjn(e){return e.type==="text"}function tC(e){var n=e[e.length-1];if(Bjn(n))return n;throw new Error("Invalid token path with leaf of type ".concat(n.type))}function Pjn(e,n,t,r){var s=e.slice(0,-1),i=tC(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(ma(s),[nr(nr({},i),{},{value:m})])};if(n>0){var c=o(0,n);a.push(Hd(c))}var u=o(Math.max(n,0),t);if(a.push(r?(function(f,p){return[p].concat(ma(Hd(f)))})(u,r):Hd(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=Hu(e,Fjn);t.push(s);var i,a=K6(r);try{for(a.s();!(i=a.n()).done;)CP(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(Hd([].concat(ma(t.slice(1)),[e])));return n}function Hjn(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var u=tC(c);return u.value.includes(` `)?u.value.split(` -`).map((function(h){return hzn(c,Jn(Jn({},u),{},{value:h}))})):[c]})(t),i=TB(s),a=i[0],o=i.slice(1);return[].concat(pa(n.slice(0,-1)),[[].concat(pa(r),[a])],pa(o.map((function(c){return[c]}))))}),[[]])}function DA(e){return vzn(cP(e))}var bzn=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?hy(e,n,void 0,t):!!r},yzn=function(e,n){return hy(e,n)},xzn=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function wzn(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=xzn(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&bzn(t,r,(function(i,a,o){return o==="chlidren"||yzn(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 LA(e){var n,t={type:"root",children:[]},r=M6(e);try{var s=function(){var i=n.value;i.reduce((function(a,o,c){return wzn(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 kzn=Object.prototype.hasOwnProperty,Szn=aP((function(e,n,t){kzn.call(e,t)?e[t].push(n):P6(e,t,[n])})),Czn=Object.prototype.hasOwnProperty,Ezn=function(e){if(e==null)return!0;if(dy(e)&&(ya(e)||typeof e=="string"||typeof e.splice=="function"||tb(e)||L6(e)||fy(e)))return!e.length;var n=S5(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(VB(e))return!KB(e).length;for(var t in e)if(Czn.call(e,t))return!1;return!0},Nzn=function(e,n){var t=n.start,r=n.length,s=t+r,i=e.reduce((function(a,o){var c=Dn(a,2),u=c[0],h=c[1],f=h+H6(o).value.length;if(h>s||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 h=this.diff_halfMatch_(t,r);if(h){var f=h[0],p=h[1],m=h[2],w=h[3],k=h[4],v=this.diff_main(f,m,s,i),b=this.diff_main(p,w,s,i);return v.concat([new n.Diff(0,k)],b)}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,h=0,f="",p="";c=1&&h>=1){o.splice(c-u-h,u+h),c=c-u-h;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}h=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,h=new Array(u),f=new Array(u),p=0;ps);x++){for(var C=-x+k;C<=x-v;C+=2){for(var N=c+C,j=(I=C==-x||C!=x&&h[N-1]i)v+=2;else if(j>a)k+=2;else if(w&&(M=c+m-C)>=0&&M=(z=i-f[M]))return this.diff_bisectSplit_(t,r,I,j,s)}for(var A=-x+b;A<=x-y;A+=2){for(var z,M=c+A,D=(z=A==-x||A!=x&&f[M-1]i)y+=2;else if(D>a)b+=2;else if(!w&&(N=c+m-A)>=0&&N=(z=i-z))return this.diff_bisectSplit_(t,r,I,j,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),h=r.substring(i),f=this.diff_main(o,c,!1,a),p=this.diff_main(u,h,!1,a);return f.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var h="",f=0,p=-1,m=s.length;ps||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 h=this.diff_halfMatch_(t,r);if(h){var f=h[0],p=h[1],m=h[2],w=h[3],k=h[4],v=this.diff_main(f,m,s,i),b=this.diff_main(p,w,s,i);return v.concat([new n.Diff(0,k)],b)}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,h=0,f="",p="";c=1&&h>=1){o.splice(c-u-h,u+h),c=c-u-h;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}h=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,h=new Array(u),f=new Array(u),p=0;ps);x++){for(var C=-x+k;C<=x-v;C+=2){for(var N=c+C,j=(I=C==-x||C!=x&&h[N-1]i)v+=2;else if(j>a)k+=2;else if(w&&(M=c+m-C)>=0&&M=(z=i-f[M]))return this.diff_bisectSplit_(t,r,I,j,s)}for(var A=-x+b;A<=x-y;A+=2){for(var z,M=c+A,D=(z=A==-x||A!=x&&f[M-1]i)y+=2;else if(D>a)b+=2;else if(!w&&(N=c+m-A)>=0&&N=(z=i-z))return this.diff_bisectSplit_(t,r,I,j,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),h=r.substring(i),f=this.diff_main(o,c,!1,a),p=this.diff_main(u,h,!1,a);return f.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var h="",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?[y,x,C,N,z]:null}var c,u,h,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],h=c[1],f=c[2],p=c[3]):(f=c[0],p=c[1],u=c[2],h=c[3]),[u,h,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,h=0,f=0;o0?s[i-1]:-1,c=0,u=0,h=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 b=k.charAt(k.length-1),y=v.charAt(0),x=b.match(n.nonAlphaNumericRegex_),C=y.match(n.nonAlphaNumericRegex_),N=x&&b.match(n.whitespaceRegex_),j=C&&y.match(n.whitespaceRegex_),A=N&&b.match(n.linebreakRegex_),z=j&&y.match(n.linebreakRegex_),M=A&&k.match(n.blanklineEndRegex_),D=z&&v.match(n.blanklineStartRegex_);return M||D?5:A||z?4:x&&!N&&j?3:N||j?2:x||C?1:0}for(var s=1;s=m&&(m=w,h=i,f=a,p=o)}t[s-1][1]!=h&&(h?t[s-1][1]=h:(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,h=!1,f=!1;o0?s[i-1]:-1,h=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]=''+h+"";break;case-1:r[c]=''+h+"";break;case 0:r[c]=""+h+""}}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(j,A){var z=j/r.length,M=Math.abs(s-A);return a.Match_Distance?z+M/a.Match_Distance:M?1:z}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 h,f,p=1<=v;x--){var C=i[t.charAt(x-1)];if(y[x]=k===0?(y[x+1]<<1|1)&C:(y[x+1]<<1|1)&C|(m[x+1]|m[x])<<1|1|m[x+1],y[x]&p){var N=o(k,x-1);if(N<=c){if(c=N,!((u=x-1)>s))break;v=Math.max(1,2*s-u)}}}if(o(k+1,s)>c)break;m=y}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,h=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,h=f)}k!==1&&(h+=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),h))!=-1&&((p=this.match_main(r,f.substring(f.length-this.Match_MaxBits),h+f.length-this.Match_MaxBits))==-1||c>=p)&&(c=-1):c=this.match_main(r,f,h),c==-1)a[o]=!1,i-=t[o].length2-t[o].length1;else if(a[o]=!0,i=c-h,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,h=!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):h=!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))),h||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"?Mzn:Ozn,r=F6(e.map((function(o){return o.changes})),lP).map(t).reduce((function(o,c){var u=Dn(o,2),h=u[0],f=u[1],p=Dn(c,2),m=p[0],w=p[1];return[h.concat(m),f.concat(w)]}),[[],[]]),s=Dn(r,2),i=s[0],a=s[1];return zzn($A(i),$A(a))}var Lzn=["enhancers"],HA=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=Dn(dzn(e,qu(t,Lzn)),2),a=i[0],o=i[1],c=[DA(a),DA(o)],u=(n=[c[0],c[1]],s.reduce((function(k,v){return v(k)}),n)),h=Dn(u,2),f=h[0],p=h[1],m=[f.map(LA),p.map(LA)],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 E5=["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(" "),Izn=2e3,$zn={highlight(e,n){return Bt.highlight(e,n).children}};function Bzn(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function xy(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 Pzn(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function N5(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 Fzn(e){const n=[Dzn(e.hunks,{type:"line"})],t=YS(Pzn(e));return t&&Bt.registered(t)?HA(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:$zn}):HA(e.hunks,{enhancers:n,highlight:!1})}function _P(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:v5(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:v5(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const Hzn=({change:e,side:n})=>n==="old"?null:Bzn(e);function fP({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:YVe()}),_.jsx("p",{children:ZKe({limit:Ce(ul(n)),read:Ce(ul(e))})})]})}function dP({file:e,defaultExpanded:n}){const[t,r]=T.useState(n),{additions:s,deletions:i}=T.useMemo(()=>xy(e),[e]),a=t&&s+i<=Izn,o=T.useMemo(()=>{if(a)try{return Fzn(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(pc,{size:14}):_.jsx(Ka,{size:14})}),_.jsx("span",{className:"path",children:_.jsx("code",{children:N5(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:CKe()}):_.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:_.jsx(rzn,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:Hzn,tokens:o,viewType:"unified"})}))]})}function qzn({files:e,className:n}){return _.jsx("div",{className:n?`${E5} ${n}`:E5,children:e.map((t,r)=>_.jsx(dP,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function Uzn(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 hP({diff:e,partial:n=!1}){var p;const t=T.useMemo(()=>_P(e,n),[e,n]),r=t.files,s=T.useMemo(()=>r.map((m,w)=>({file:m,key:`${m.oldPath}→${m.newPath}#${w}`,changes:xy(m)})),[r]),[i,a]=T.useState(null),[o,c]=T.useState(!1),u=o&&!n,h=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,f=s.find(m=>m.key===h)??null;return t.failed?_.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?vKe():GKe()}):s.length===0?_.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:_Ke()}):_.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?$Ke():sKe({count:Zt(s.length)}):s.length===1?dL():fL({count:Zt(s.length)})}),!n&&_.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?TVe():iWe()})]}),u?_.jsx(qzn,{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":UVe(),children:s.map(m=>_.jsxs("button",{type:"button",className:m.key===h?"active":"","aria-pressed":m.key===h,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:Uzn(m.file)}),_.jsx("code",{title:N5(m.file),children:N5(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:`${E5} diff-explorer-preview min-w-0`,children:f&&_.jsx(dP,{file:f.file,defaultExpanded:!0},f.key)})]})]})}function Gzn({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:c,busy:u,onChanges:h,onFiles:f,onTerminal:p,onArtifacts:m,onExperiments:w,onSideChat:k}){var A,z;const v=z9n(n,t,c),b=T.useRef(null),y=Vi(b),x=_t({...MI(a),enabled:e}),C=((A=x.data)==null?void 0:A.configuredDefaultBackend)??((z=x.data)==null?void 0:z.defaultBackend),N=C?bf[C]():x.isPending?"…":x.isError?po():M3(),j=[{id:"files",label:k3(),Icon:Fu,onClick:f},{id:"artifacts",label:KD(),Icon:LS,onClick:m},{id:"experiments",label:WD(),Icon:Ah,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":hw(),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:hw()}),j.filter(M=>M.id!=="files").map(({id:M,label:D,Icon:I,onClick:B})=>_.jsx(yn,{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(I,{size:15}),D]})},M)),_.jsx(yn,{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(OS,{size:15,className:"shrink-0"}),Lxn()]}),_.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[C&&_.jsx(Yh,{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:x2n()}),_.jsx(yn,{className:"min-h-7 py-1",onClick:f,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(Fu,{size:15}),k3()]})}),_.jsx(yn,{className:"min-h-7 py-1",onClick:p,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(xo,{size:15}),Pv()]})}),k&&_.jsx(yn,{className:"min-h-7 py-1",onClick:k,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(B0,{size:15}),D3()]})}),c&&_.jsx(Vzn,{sessionId:c,busy:u,onChanges:h},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(Zd,{tone:"success",live:!0})}),_.jsx("span",{children:jxn()})]}),v.map(M=>_.jsx(yn,{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} · ${R6(ha(M.run))}`,children:M.experiment.title||M.experiment.slug})},M.run.id))]})]})]}):_.jsxs("nav",{"aria-label":hw(),className:"flex items-center justify-end gap-3",children:[j.map(({id:M,label:D,Icon:I,onClick:B})=>_.jsx($t,{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(I,{size:15})},M)),_.jsxs("div",{className:"relative",children:[_.jsx($t,{ref:b,active:i==="terminal"||y.open,className:"text-text [&.active]:text-text","data-tip":y.open?void 0:oj(),"data-tip-align":"end","aria-label":oj(),"aria-expanded":y.open,"aria-haspopup":"menu",onClick:()=>y.setOpen(M=>!M),children:_.jsx(Lm,{size:15})}),y.open&&_.jsxs("div",{ref:y.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(yn,{role:"menuitem",onClick:()=>{y.setOpen(!1),p()},children:_.jsxs("span",{className:"flex items-center gap-2.5",children:[_.jsx(xo,{size:15}),Pv()]})}),k&&_.jsx(yn,{role:"menuitem",onClick:()=>{y.setOpen(!1),k()},children:_.jsxs("span",{className:"flex items-center gap-2.5",children:[_.jsx(B0,{size:15}),D3()]})})]})]})]})})}function Vzn({sessionId:e,busy:n,onChanges:t}){var c,u;const r=_t({...eb(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 h=_P(a.diff.diff,!1);return h.failed?null:h.files.map(xy).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(yn,{className:"min-h-7 py-1",onClick:t,title:a.branch??yS(),children:[_.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[_.jsx(Im,{size:15,className:"shrink-0"}),_.jsx("span",{children:sL()})]}),o?_.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[_.jsxs("span",{className:"text-accent-green",children:["+",Zt(o.additions)]}),_.jsxs("span",{className:"text-accent-red",children:["−",Zt(o.deletions)]})]}):_.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?dL():fL({count:Zt(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function Kzn({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 h=Xb(u,!1,!0,"app"),{terminal:f,dispose:p}=h;s.current=h,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 b=C=>{v||(v=!0,f.options.disableStdin=!0,f.blur(),f.writeln(`\r -${C}`),a(C))},y=f.onData(C=>{k.readyState===WebSocket.OPEN&&k.send(new TextEncoder().encode(C))}),x=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}Lf(N)&&(N.type==="exit"?b(o2n({code:String(N.code)})):N.type==="error"&&typeof N.error=="string"&&b(N.error))},k.onclose=()=>b(cj()),k.onerror=()=>b(cj()),()=>{k.onopen=null,k.onmessage=null,k.onerror=null,k.onclose=null,y.dispose(),x.dispose(),k.close(),s.current=null,p()}},[e,n,o]),T.useEffect(()=>{if(!t||i!==null)return;const u=requestAnimationFrame(()=>{var h,f;(h=s.current)==null||h.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":Pv(),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(Ie,{autoFocus:!0,onClick:()=>c(u=>u+1),children:h2n()})})]})}const Wzn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Qzn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Xzn={};function qA(e,n){return(Xzn.jsx?Qzn:Wzn).test(e)}const Yzn=/[ \t\n\f\r]/g;function Zzn(e){return typeof e=="object"?e.type==="text"?UA(e.value):!1:UA(e)}function UA(e){return e.replace(Yzn,"")===""}var Nd={},Mw,GA;function Jzn(){if(GA)return Mw;GA=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="/",h="*",f="",p="comment",m="declaration";function w(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var y=1,x=1;function C(q){var Q=q.match(n);Q&&(y+=Q.length);var K=q.lastIndexOf(c);x=~K?q.length-K:x+q.length}function N(){var q={line:y,column:x};return function(Q){return Q.position=new j(q),M(),Q}}function j(q){this.start=q,this.end={line:y,column:x},this.source=b.source}j.prototype.content=v;function A(q){var Q=new Error(b.source+":"+y+":"+x+": "+q);if(Q.reason=q,Q.filename=b.source,Q.line=y,Q.column=x,Q.source=v,!b.silent)throw Q}function z(q){var Q=q.exec(v);if(Q){var K=Q[0];return C(K),v=v.slice(K.length),Q}}function M(){z(t)}function D(q){var Q;for(q=q||[];Q=I();)Q!==!1&&q.push(Q);return q}function I(){var q=N();if(!(u!=v.charAt(0)||h!=v.charAt(1))){for(var Q=2;f!=v.charAt(Q)&&(h!=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 x+=2,C(K),v=v.slice(Q),x+=2,q({type:p,comment:K})}}function B(){var q=N(),Q=z(r);if(Q){if(I(),!z(s))return A("property missing ':'");var K=z(i),Z=q({type:m,property:k(Q[0].replace(e,f)),value:K?k(K[0].replace(e,f)):f});return z(a),Z}}function G(){var q=[];D(q);for(var Q;Q=B();)Q!==!1&&(q.push(Q),D(q));return q}return M(),G()}function k(v){return v?v.replace(o,f):f}return Mw=w,Mw}var VA;function ejn(){if(VA)return Nd;VA=1;var e=Nd&&Nd.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Nd,"__esModule",{value:!0}),Nd.default=t;const n=e(Jzn());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:h}=c;o?s(u,h,c):h&&(i=i||{},i[u]=h)}),i}return Nd}var Yp={},KA;function tjn(){if(KA)return Yp;KA=1,Object.defineProperty(Yp,"__esModule",{value:!0}),Yp.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,h){return h.toUpperCase()},o=function(u,h){return"".concat(h,"-")},c=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return Yp.camelCase=c,Yp}var Zp,WA;function njn(){if(WA)return Zp;WA=1;var e=Zp&&Zp.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(ejn()),t=tjn();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,Zp=r,Zp}var rjn=njn();const sjn=Em(rjn),pP=mP("end"),q6=mP("start");function mP(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 ijn(e){const n=q6(e),t=pP(e);if(n&&t)return{start:n,end:t}}function x0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?QA(e.position):"start"in e||"end"in e?QA(e):"line"in e||"column"in e?z5(e):""}function z5(e){return XA(e&&e.line)+":"+XA(e&&e.column)}function QA(e){return z5(e&&e.start)+"-"+z5(e&&e.end)}function XA(e){return e&&typeof e=="number"?e:1}class oi 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=x0(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}}oi.prototype.file="";oi.prototype.name="";oi.prototype.reason="";oi.prototype.message="";oi.prototype.stack="";oi.prototype.column=void 0;oi.prototype.line=void 0;oi.prototype.ancestors=void 0;oi.prototype.cause=void 0;oi.prototype.fatal=void 0;oi.prototype.place=void 0;oi.prototype.ruleId=void 0;oi.prototype.source=void 0;const U6={}.hasOwnProperty,ajn=new Map,ojn=/[A-Z]/g,cjn=new Set(["table","tbody","thead","tfoot","tr"]),ljn=new Set(["td","th"]),gP="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function vP(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=gjn(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=mjn(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"?ay:cB,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=bP(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function bP(e,n,t){if(n.type==="element")return ujn(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return _jn(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return djn(e,n,t);if(n.type==="mdxjsEsm")return fjn(e,n);if(n.type==="root")return hjn(e,n,t);if(n.type==="text")return pjn(e,n)}function ujn(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=ay,e.schema=s),e.ancestors.push(n);const i=xP(e,n.tagName,!1),a=vjn(e,n);let o=V6(e,n);return cjn.has(n.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!Zzn(c):!0})),yP(e,a,i,n),G6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function _jn(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)}Q0(e,n.position)}function fjn(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Q0(e,n.position)}function djn(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=ay,e.schema=s),e.ancestors.push(n);const i=n.name===null?e.Fragment:xP(e,n.name,!0),a=bjn(e,n),o=V6(e,n);return yP(e,a,i,n),G6(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function hjn(e,n,t){const r={};return G6(r,V6(e,n)),e.create(n,e.Fragment,r,t)}function pjn(e,n){return n.value}function yP(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function G6(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function mjn(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 gjn(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),c=q6(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 vjn(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&U6.call(n.properties,s)){const i=yjn(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&ljn.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 bjn(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 Q0(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 Q0(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function V6(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:ajn;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?(ga(e,e.length,0,n),e):n}const ZA={}.hasOwnProperty;function kP(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 vo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vi=e_(/[A-Za-z]/),ri=e_(/[\dA-Za-z]/),jjn=e_(/[#-'*+\--9=?A-Z^-~]/);function rb(e){return e!==null&&(e<32||e===127)}const j5=e_(/\d/),Ajn=e_(/[\dA-Fa-f]/),Tjn=e_(/[!-/:-@[-`{-~]/);function Dt(e){return e!==null&&e<-2}function yr(e){return e!==null&&(e<0||e===32)}function jn(e){return e===-2||e===-1||e===32}const wy=e_(new RegExp("\\p{P}|\\p{S}","u")),yf=e_(/\s/);function e_(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function tp(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 jn(c)?(e.enter(t),o(c)):n(c)}function o(c){return jn(c)&&i++a))return;const A=n.events.length;let z=A,M,D;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){if(M){D=n.events[z][1].end;break}M=!0}for(b(r),j=A;jx;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=x}function y(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function Ljn(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 Mh(e){if(e===null||yr(e)||yf(e))return 1;if(wy(e))return 2}function ky(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};eT(f,-c),eT(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=Ha(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=Ha(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=Ha(u,ky(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=Ha(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,u=Ha(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,ga(e,r-1,t-r+3,u),t=r+u.length-h-2;break}}for(t=-1;++t0&&jn(j)?Cn(e,y,"linePrefix",i+1)(j):y(j)}function y(j){return j===null||Dt(j)?e.check(tT,k,C)(j):(e.enter("codeFlowValue"),x(j))}function x(j){return j===null||Dt(j)?(e.exit("codeFlowValue"),y(j)):(e.consume(j),x)}function C(j){return e.exit("codeFenced"),n(j)}function N(j,A,z){let M=0;return D;function D(Q){return j.enter("lineEnding"),j.consume(Q),j.exit("lineEnding"),I}function I(Q){return j.enter("codeFencedFence"),jn(Q)?Cn(j,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):B(Q)}function B(Q){return Q===o?(j.enter("codeFencedFenceSequence"),G(Q)):z(Q)}function G(Q){return Q===o?(M++,j.consume(Q),G):M>=a?(j.exit("codeFencedFenceSequence"),jn(Q)?Cn(j,q,"whitespace")(Q):q(Q)):z(Q)}function q(Q){return Q===null||Dt(Q)?(j.exit("codeFencedFence"),A(Q)):z(Q)}}}function Wjn(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 Dw={name:"codeIndented",tokenize:Xjn},Qjn={partial:!0,tokenize:Yjn};function Xjn(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 h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Dt(u)?e.attempt(Qjn,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||Dt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),n(u)}}function Yjn(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):Dt(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):Dt(a)?s(a):t(a)}}const Zjn={name:"codeText",previous:eAn,resolve:Jjn,tokenize:tAn};function Jjn(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&&Jp(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),Jp(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),Jp(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 jP(e,n,t,r,s,i,a,o,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return f;function f(b){return b===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(b),e.exit(i),p):b===null||b===32||b===41||rb(b)?t(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(b))}function p(b){return b===62?(e.enter(i),e.consume(b),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(o),p(b)):b===null||b===60||Dt(b)?t(b):(e.consume(b),b===92?w:m)}function w(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function k(b){return!h&&(b===null||b===41||yr(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(b)):h999||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):Dt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||Dt(m)||o++>999?(e.exit("chunkString"),h(m)):(e.consume(m),c||(c=!jn(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,f):f(m)}}function TP(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):Dt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Cn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===a||p===null||Dt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:h)}function f(p){return p===a||p===92?(e.consume(p),h):h(p)}}function w0(e,n){let t;return r;function r(s){return Dt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):jn(s)?Cn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const lAn={name:"definition",tokenize:_An},uAn={partial:!0,tokenize:fAn};function _An(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return AP.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=vo(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 yr(m)?w0(e,u)(m):u(m)}function u(m){return jP(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(uAn,f,f)(m)}function f(m){return jn(m)?Cn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Dt(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function fAn(e,n,t){return r;function r(o){return yr(o)?w0(e,s)(o):t(o)}function s(o){return TP(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return jn(o)?Cn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Dt(o)?n(o):t(o)}}const dAn={name:"hardBreakEscape",tokenize:hAn};function hAn(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return Dt(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const pAn={name:"headingAtx",resolve:mAn,tokenize:gAn};function mAn(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"},ga(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function gAn(e,n,t){let r=0;return s;function s(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||yr(h)?(e.exit("atxHeadingSequence"),o(h)):t(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Dt(h)?(e.exit("atxHeading"),n(h)):jn(h)?Cn(e,o,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),o(h))}function u(h){return h===null||h===35||yr(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),u)}}const vAn=["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"],rT=["pre","script","style","textarea"],bAn={concrete:!0,name:"htmlFlow",resolveTo:wAn,tokenize:kAn},yAn={partial:!0,tokenize:CAn},xAn={partial:!0,tokenize:SAn};function wAn(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 kAn(e,n,t){const r=this;let s,i,a,o,c;return u;function u(H){return h(H)}function h(H){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(H),f}function f(H){return H===33?(e.consume(H),p):H===47?(e.consume(H),i=!0,k):H===63?(e.consume(H),s=3,r.interrupt?n:L):vi(H)?(e.consume(H),a=String.fromCharCode(H),v):t(H)}function p(H){return H===45?(e.consume(H),s=2,m):H===91?(e.consume(H),s=5,o=0,w):vi(H)?(e.consume(H),s=4,r.interrupt?n:L):t(H)}function m(H){return H===45?(e.consume(H),r.interrupt?n:L):t(H)}function w(H){const ae="CDATA[";return H===ae.charCodeAt(o++)?(e.consume(H),o===ae.length?r.interrupt?n:B:w):t(H)}function k(H){return vi(H)?(e.consume(H),a=String.fromCharCode(H),v):t(H)}function v(H){if(H===null||H===47||H===62||yr(H)){const ae=H===47,ie=a.toLowerCase();return!ae&&!i&&rT.includes(ie)?(s=1,r.interrupt?n(H):B(H)):vAn.includes(a.toLowerCase())?(s=6,ae?(e.consume(H),b):r.interrupt?n(H):B(H)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(H):i?y(H):x(H))}return H===45||ri(H)?(e.consume(H),a+=String.fromCharCode(H),v):t(H)}function b(H){return H===62?(e.consume(H),r.interrupt?n:B):t(H)}function y(H){return jn(H)?(e.consume(H),y):D(H)}function x(H){return H===47?(e.consume(H),D):H===58||H===95||vi(H)?(e.consume(H),C):jn(H)?(e.consume(H),x):D(H)}function C(H){return H===45||H===46||H===58||H===95||ri(H)?(e.consume(H),C):N(H)}function N(H){return H===61?(e.consume(H),j):jn(H)?(e.consume(H),N):x(H)}function j(H){return H===null||H===60||H===61||H===62||H===96?t(H):H===34||H===39?(e.consume(H),c=H,A):jn(H)?(e.consume(H),j):z(H)}function A(H){return H===c?(e.consume(H),c=null,M):H===null||Dt(H)?t(H):(e.consume(H),A)}function z(H){return H===null||H===34||H===39||H===47||H===60||H===61||H===62||H===96||yr(H)?N(H):(e.consume(H),z)}function M(H){return H===47||H===62||jn(H)?x(H):t(H)}function D(H){return H===62?(e.consume(H),I):t(H)}function I(H){return H===null||Dt(H)?B(H):jn(H)?(e.consume(H),I):t(H)}function B(H){return H===45&&s===2?(e.consume(H),K):H===60&&s===1?(e.consume(H),Z):H===62&&s===4?(e.consume(H),F):H===63&&s===3?(e.consume(H),L):H===93&&s===5?(e.consume(H),$):Dt(H)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(yAn,U,G)(H)):H===null||Dt(H)?(e.exit("htmlFlowData"),G(H)):(e.consume(H),B)}function G(H){return e.check(xAn,q,U)(H)}function q(H){return e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),Q}function Q(H){return H===null||Dt(H)?G(H):(e.enter("htmlFlowData"),B(H))}function K(H){return H===45?(e.consume(H),L):B(H)}function Z(H){return H===47?(e.consume(H),a="",J):B(H)}function J(H){if(H===62){const ae=a.toLowerCase();return rT.includes(ae)?(e.consume(H),F):B(H)}return vi(H)&&a.length<8?(e.consume(H),a+=String.fromCharCode(H),J):B(H)}function $(H){return H===93?(e.consume(H),L):B(H)}function L(H){return H===62?(e.consume(H),F):H===45&&s===2?(e.consume(H),L):B(H)}function F(H){return H===null||Dt(H)?(e.exit("htmlFlowData"),U(H)):(e.consume(H),F)}function U(H){return e.exit("htmlFlow"),n(H)}}function SAn(e,n,t){const r=this;return s;function s(a){return Dt(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 CAn(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Hm,n,t)}}const EAn={name:"htmlText",tokenize:NAn};function NAn(e,n,t){const r=this;let s,i,a;return o;function o(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),N):L===63?(e.consume(L),x):vi(L)?(e.consume(L),z):t(L)}function u(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),i=0,w):vi(L)?(e.consume(L),y):t(L)}function h(L){return L===45?(e.consume(L),m):t(L)}function f(L){return L===null?t(L):L===45?(e.consume(L),p):Dt(L)?(a=f,Z(L)):(e.consume(L),f)}function p(L){return L===45?(e.consume(L),m):f(L)}function m(L){return L===62?K(L):L===45?p(L):f(L)}function w(L){const F="CDATA[";return L===F.charCodeAt(i++)?(e.consume(L),i===F.length?k:w):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),v):Dt(L)?(a=k,Z(L)):(e.consume(L),k)}function v(L){return L===93?(e.consume(L),b):k(L)}function b(L){return L===62?K(L):L===93?(e.consume(L),b):k(L)}function y(L){return L===null||L===62?K(L):Dt(L)?(a=y,Z(L)):(e.consume(L),y)}function x(L){return L===null?t(L):L===63?(e.consume(L),C):Dt(L)?(a=x,Z(L)):(e.consume(L),x)}function C(L){return L===62?K(L):x(L)}function N(L){return vi(L)?(e.consume(L),j):t(L)}function j(L){return L===45||ri(L)?(e.consume(L),j):A(L)}function A(L){return Dt(L)?(a=A,Z(L)):jn(L)?(e.consume(L),A):K(L)}function z(L){return L===45||ri(L)?(e.consume(L),z):L===47||L===62||yr(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),K):L===58||L===95||vi(L)?(e.consume(L),D):Dt(L)?(a=M,Z(L)):jn(L)?(e.consume(L),M):K(L)}function D(L){return L===45||L===46||L===58||L===95||ri(L)?(e.consume(L),D):I(L)}function I(L){return L===61?(e.consume(L),B):Dt(L)?(a=I,Z(L)):jn(L)?(e.consume(L),I):M(L)}function B(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,G):Dt(L)?(a=B,Z(L)):jn(L)?(e.consume(L),B):(e.consume(L),q)}function G(L){return L===s?(e.consume(L),s=void 0,Q):L===null?t(L):Dt(L)?(a=G,Z(L)):(e.consume(L),G)}function q(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||yr(L)?M(L):(e.consume(L),q)}function Q(L){return L===47||L===62||yr(L)?M(L):t(L)}function K(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function Z(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),J}function J(L){return jn(L)?Cn(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):$(L)}function $(L){return e.enter("htmlTextData"),a(L)}}const W6={name:"labelEnd",resolveAll:TAn,resolveTo:RAn,tokenize:MAn},zAn={tokenize:OAn},jAn={tokenize:DAn},AAn={tokenize:LAn};function TAn(e){let n=-1;const t=[];for(;++n=3&&(u===null||Dt(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),jn(u)?Cn(e,o,"whitespace")(u):o(u))}}const Pi={continuation:{tokenize:VAn},exit:WAn,name:"list",tokenize:GAn},qAn={partial:!0,tokenize:QAn},UAn={partial:!0,tokenize:KAn};function GAn(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:j5(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(_v,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 j5(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(Hm,r.interrupt?t:h,e.attempt(qAn,p,f))}function h(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function f(m){return jn(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 VAn(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Hm,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||!jn(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(UAn,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Cn(e,e.attempt(Pi,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function KAn(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 WAn(e){e.exit(this.containerState.type)}function QAn(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!jn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const sT={name:"setextUnderline",resolveTo:XAn,tokenize:YAn};function XAn(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 YAn(e,n,t){const r=this;let s;return i;function i(u){let h=r.events.length,f;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){f=r.events[h][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"),jn(u)?Cn(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Dt(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const ZAn={tokenize:JAn};function JAn(e){const n=this,t=e.attempt(Hm,r,e.attempt(this.parser.constructs.flowInitial,s,Cn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(sAn,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 eTn={resolveAll:MP()},tTn=RP("string"),nTn=RP("text");function RP(e){return{resolveAll:MP(e==="text"?rTn: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(h){return u(h)?i(h):o(h)}function o(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),c}function c(h){return u(h)?(t.exit("data"),i(h)):(t.consume(h),c)}function u(h){if(h===null)return!0;const f=s[h];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 mTn(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"?rAn:sAn,r=eC(e.map((function(o){return o.changes})),EP).map(t).reduce((function(o,c){var u=In(o,2),h=u[0],f=u[1],p=In(c,2),m=p[0],w=p[1];return[h.concat(m),f.concat(w)]}),[[],[]]),s=In(r,2),i=s[0],a=s[1];return Zjn(XA(i),XA(a))}var aAn=["enhancers"],eT=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=In(Ijn(e,Hu(t,aAn)),2),a=i[0],o=i[1],c=[VA(a),VA(o)],u=(n=[c[0],c[1]],s.reduce((function(k,v){return v(k)}),n)),h=In(u,2),f=h[0],p=h[1],m=[f.map(WA),p.map(WA)],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 O5=["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(" "),oAn=2e3,cAn={highlight(e,n){return $t.highlight(e,n).children}};function lAn(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function Cy(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 uAn(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function D5(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 _An(e){const n=[iAn(e.hunks,{type:"line"})],t=a6(uAn(e));return t&&$t.registered(t)?eT(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:cAn}):eT(e.hunks,{enhancers:n,highlight:!1})}function zP(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:E5(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:E5(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const fAn=({change:e,side:n})=>n==="old"?null:lAn(e);function jP({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:mWe()}),_.jsx("p",{children:gQe({limit:Ce(_l(n)),read:Ce(_l(e))})})]})}function AP({file:e,defaultExpanded:n}){const[t,r]=T.useState(n),{additions:s,deletions:i}=T.useMemo(()=>Cy(e),[e]),a=t&&s+i<=oAn,o=T.useMemo(()=>{if(a)try{return _An(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(mc,{size:14}):_.jsx(Ka,{size:14})}),_.jsx("span",{className:"path",children:_.jsx("code",{children:D5(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:UWe()}):_.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:_.jsx(Njn,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:fAn,tokens:o,viewType:"unified"})}))]})}function dAn({files:e,className:n}){return _.jsx("div",{className:n?`${O5} ${n}`:O5,children:e.map((t,r)=>_.jsx(AP,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function hAn(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 TP({diff:e,partial:n=!1}){var p;const t=T.useMemo(()=>zP(e,n),[e,n]),r=t.files,s=T.useMemo(()=>r.map((m,w)=>({file:m,key:`${m.oldPath}→${m.newPath}#${w}`,changes:Cy(m)})),[r]),[i,a]=T.useState(null),[o,c]=T.useState(!1),u=o&&!n,h=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,f=s.find(m=>m.key===h)??null;return t.failed?_.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?IWe():uQe()}):s.length===0?_.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:AWe()}):_.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?rQe():kWe({count:Jt(s.length)}):s.length===1?zL():NL({count:Jt(s.length)})}),!n&&_.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?XVe():SQe()})]}),u?_.jsx(dAn,{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":lWe(),children:s.map(m=>_.jsxs("button",{type:"button",className:m.key===h?"active":"","aria-pressed":m.key===h,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:hAn(m.file)}),_.jsx("code",{title:D5(m.file),children:D5(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:`${O5} diff-explorer-preview min-w-0`,children:f&&_.jsx(AP,{file:f.file,defaultExpanded:!0},f.key)})]})]})}function pAn({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:c,busy:u,onChanges:h,onFiles:f,onTerminal:p,onArtifacts:m,onExperiments:w,onSideChat:k}){var A,z;const v=ZEn(n,t,c),b=T.useRef(null),y=Ki(b),x=ut({...WI(a),enabled:e}),C=((A=x.data)==null?void 0:A.configuredDefaultBackend)??((z=x.data)==null?void 0:z.defaultBackend),N=C?vf[C]():x.isPending?"…":x.isError?fo():P3(),j=[{id:"files",label:z3(),Icon:Pu,onClick:f},{id:"artifacts",label:aL(),Icon:GS,onClick:m},{id:"experiments",label:oL(),Icon:Ah,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":vw(),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:vw()}),j.filter(M=>M.id!=="files").map(({id:M,label:D,Icon:I,onClick:B})=>_.jsx(vn,{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(I,{size:15}),D]})},M)),_.jsx(vn,{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(qS,{size:15,className:"shrink-0"}),twn()]}),_.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[C&&_.jsx(Xh,{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:Pwn()}),_.jsx(vn,{className:"min-h-7 py-1",onClick:f,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(Pu,{size:15}),z3()]})}),_.jsx(vn,{className:"min-h-7 py-1",onClick:p,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(bo,{size:15}),Fv()]})}),k&&_.jsx(vn,{className:"min-h-7 py-1",onClick:k,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(P0,{size:15}),H3()]})}),c&&_.jsx(mAn,{sessionId:c,busy:u,onChanges:h},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(Yd,{tone:"success",live:!0})}),_.jsx("span",{children:W2n()})]}),v.map(M=>_.jsx(vn,{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} · ${G6(pa(M.run))}`,children:M.experiment.title||M.experiment.slug})},M.run.id))]})]})]}):_.jsxs("nav",{"aria-label":vw(),className:"flex items-center justify-end gap-3",children:[j.map(({id:M,label:D,Icon:I,onClick:B})=>_.jsx(It,{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(I,{size:15})},M)),_.jsxs("div",{className:"relative",children:[_.jsx(It,{ref:b,active:i==="terminal"||y.open,className:"text-text [&.active]:text-text","data-tip":y.open?void 0:bj(),"data-tip-align":"end","aria-label":bj(),"aria-expanded":y.open,"aria-haspopup":"menu",onClick:()=>y.setOpen(M=>!M),children:_.jsx(Lm,{size:15})}),y.open&&_.jsxs("div",{ref:y.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(vn,{role:"menuitem",onClick:()=>{y.setOpen(!1),p()},children:_.jsxs("span",{className:"flex items-center gap-2.5",children:[_.jsx(bo,{size:15}),Fv()]})}),k&&_.jsx(vn,{role:"menuitem",onClick:()=>{y.setOpen(!1),k()},children:_.jsxs("span",{className:"flex items-center gap-2.5",children:[_.jsx(P0,{size:15}),H3()]})})]})]})]})})}function mAn({sessionId:e,busy:n,onChanges:t}){var c,u;const r=ut({...tb(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 h=zP(a.diff.diff,!1);return h.failed?null:h.files.map(Cy).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(vn,{className:"min-h-7 py-1",onClick:t,title:a.branch??zS(),children:[_.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[_.jsx(Im,{size:15,className:"shrink-0"}),_.jsx("span",{children:gL()})]}),o?_.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[_.jsxs("span",{className:"text-accent-green",children:["+",Jt(o.additions)]}),_.jsxs("span",{className:"text-accent-red",children:["−",Jt(o.deletions)]})]}):_.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?zL():NL({count:Jt(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function gAn({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 h=Zb(u,!1,!0,"app"),{terminal:f,dispose:p}=h;s.current=h,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 b=C=>{v||(v=!0,f.options.disableStdin=!0,f.blur(),f.writeln(`\r +${C}`),a(C))},y=f.onData(C=>{k.readyState===WebSocket.OPEN&&k.send(new TextEncoder().encode(C))}),x=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}Df(N)&&(N.type==="exit"?b(Ewn({code:String(N.code)})):N.type==="error"&&typeof N.error=="string"&&b(N.error))},k.onclose=()=>b(yj()),k.onerror=()=>b(yj()),()=>{k.onopen=null,k.onmessage=null,k.onerror=null,k.onclose=null,y.dispose(),x.dispose(),k.close(),s.current=null,p()}},[e,n,o]),T.useEffect(()=>{if(!t||i!==null)return;const u=requestAnimationFrame(()=>{var h,f;(h=s.current)==null||h.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":Fv(),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(Ie,{autoFocus:!0,onClick:()=>c(u=>u+1),children:Mwn()})})]})}const vAn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bAn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yAn={};function tT(e,n){return(yAn.jsx?bAn:vAn).test(e)}const xAn=/[ \t\n\f\r]/g;function wAn(e){return typeof e=="object"?e.type==="text"?nT(e.value):!1:nT(e)}function nT(e){return e.replace(xAn,"")===""}var Ed={},Iw,rT;function kAn(){if(rT)return Iw;rT=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="/",h="*",f="",p="comment",m="declaration";function w(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var y=1,x=1;function C(U){var Q=U.match(n);Q&&(y+=Q.length);var V=U.lastIndexOf(c);x=~V?U.length-V:x+U.length}function N(){var U={line:y,column:x};return function(Q){return Q.position=new j(U),M(),Q}}function j(U){this.start=U,this.end={line:y,column:x},this.source=b.source}j.prototype.content=v;function A(U){var Q=new Error(b.source+":"+y+":"+x+": "+U);if(Q.reason=U,Q.filename=b.source,Q.line=y,Q.column=x,Q.source=v,!b.silent)throw Q}function z(U){var Q=U.exec(v);if(Q){var V=Q[0];return C(V),v=v.slice(V.length),Q}}function M(){z(t)}function D(U){var Q;for(U=U||[];Q=I();)Q!==!1&&U.push(Q);return U}function I(){var U=N();if(!(u!=v.charAt(0)||h!=v.charAt(1))){for(var Q=2;f!=v.charAt(Q)&&(h!=v.charAt(Q)||u!=v.charAt(Q+1));)++Q;if(Q+=2,f===v.charAt(Q-1))return A("End of comment missing");var V=v.slice(2,Q-2);return x+=2,C(V),v=v.slice(Q),x+=2,U({type:p,comment:V})}}function B(){var U=N(),Q=z(r);if(Q){if(I(),!z(s))return A("property missing ':'");var V=z(i),Z=U({type:m,property:k(Q[0].replace(e,f)),value:V?k(V[0].replace(e,f)):f});return z(a),Z}}function G(){var U=[];D(U);for(var Q;Q=B();)Q!==!1&&(U.push(Q),D(U));return U}return M(),G()}function k(v){return v?v.replace(o,f):f}return Iw=w,Iw}var sT;function SAn(){if(sT)return Ed;sT=1;var e=Ed&&Ed.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.default=t;const n=e(kAn());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:h}=c;o?s(u,h,c):h&&(i=i||{},i[u]=h)}),i}return Ed}var Zp={},iT;function CAn(){if(iT)return Zp;iT=1,Object.defineProperty(Zp,"__esModule",{value:!0}),Zp.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,h){return h.toUpperCase()},o=function(u,h){return"".concat(h,"-")},c=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return Zp.camelCase=c,Zp}var Jp,aT;function EAn(){if(aT)return Jp;aT=1;var e=Jp&&Jp.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(SAn()),t=CAn();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,Jp=r,Jp}var NAn=EAn();const zAn=Em(NAn),RP=MP("end"),nC=MP("start");function MP(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 jAn(e){const n=nC(e),t=RP(e);if(n&&t)return{start:n,end:t}}function w0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?oT(e.position):"start"in e||"end"in e?oT(e):"line"in e||"column"in e?L5(e):""}function L5(e){return cT(e&&e.line)+":"+cT(e&&e.column)}function oT(e){return L5(e&&e.start)+"-"+L5(e&&e.end)}function cT(e){return e&&typeof e=="number"?e:1}class ii 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=w0(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}}ii.prototype.file="";ii.prototype.name="";ii.prototype.reason="";ii.prototype.message="";ii.prototype.stack="";ii.prototype.column=void 0;ii.prototype.line=void 0;ii.prototype.ancestors=void 0;ii.prototype.cause=void 0;ii.prototype.fatal=void 0;ii.prototype.place=void 0;ii.prototype.ruleId=void 0;ii.prototype.source=void 0;const rC={}.hasOwnProperty,AAn=new Map,TAn=/[A-Z]/g,RAn=new Set(["table","tbody","thead","tfoot","tr"]),MAn=new Set(["td","th"]),OP="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function DP(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=FAn(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=PAn(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:kB,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=LP(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function LP(e,n,t){if(n.type==="element")return OAn(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return DAn(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return IAn(e,n,t);if(n.type==="mdxjsEsm")return LAn(e,n);if(n.type==="root")return $An(e,n,t);if(n.type==="text")return BAn(e,n)}function OAn(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=$P(e,n.tagName,!1),a=HAn(e,n);let o=iC(e,n);return RAn.has(n.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!wAn(c):!0})),IP(e,a,i,n),sC(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function DAn(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)}X0(e,n.position)}function LAn(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);X0(e,n.position)}function IAn(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:$P(e,n.name,!0),a=qAn(e,n),o=iC(e,n);return IP(e,a,i,n),sC(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function $An(e,n,t){const r={};return sC(r,iC(e,n)),e.create(n,e.Fragment,r,t)}function BAn(e,n){return n.value}function IP(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function sC(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function PAn(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 FAn(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),c=nC(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 HAn(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&rC.call(n.properties,s)){const i=UAn(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&MAn.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 qAn(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 X0(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 X0(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function iC(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:AAn;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?(va(e,e.length,0,n),e):n}const uT={}.hasOwnProperty;function PP(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 mo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gi=Ju(/[A-Za-z]/),ti=Ju(/[\dA-Za-z]/),JAn=Ju(/[#-'*+\--9=?A-Z^-~]/);function sb(e){return e!==null&&(e<32||e===127)}const I5=Ju(/\d/),eTn=Ju(/[\dA-Fa-f]/),tTn=Ju(/[!-/:-@[-`{-~]/);function Dt(e){return e!==null&&e<-2}function wr(e){return e!==null&&(e<0||e===32)}function jn(e){return e===-2||e===-1||e===32}const Ey=Ju(new RegExp("\\p{P}|\\p{S}","u")),bf=Ju(/\s/);function Ju(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ep(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 Sn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return jn(c)?(e.enter(t),o(c)):n(c)}function o(c){return jn(c)&&i++a))return;const A=n.events.length;let z=A,M,D;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){if(M){D=n.events[z][1].end;break}M=!0}for(b(r),j=A;jx;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=x}function y(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function aTn(e,n,t){return Sn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Mh(e){if(e===null||wr(e)||bf(e))return 1;if(Ey(e))return 2}function Ny(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};fT(f,-c),fT(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=Ha(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=Ha(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=Ha(u,Ny(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=Ha(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,u=Ha(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,va(e,r-1,t-r+3,u),t=r+u.length-h-2;break}}for(t=-1;++t0&&jn(j)?Sn(e,y,"linePrefix",i+1)(j):y(j)}function y(j){return j===null||Dt(j)?e.check(dT,k,C)(j):(e.enter("codeFlowValue"),x(j))}function x(j){return j===null||Dt(j)?(e.exit("codeFlowValue"),y(j)):(e.consume(j),x)}function C(j){return e.exit("codeFenced"),n(j)}function N(j,A,z){let M=0;return D;function D(Q){return j.enter("lineEnding"),j.consume(Q),j.exit("lineEnding"),I}function I(Q){return j.enter("codeFencedFence"),jn(Q)?Sn(j,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):B(Q)}function B(Q){return Q===o?(j.enter("codeFencedFenceSequence"),G(Q)):z(Q)}function G(Q){return Q===o?(M++,j.consume(Q),G):M>=a?(j.exit("codeFencedFenceSequence"),jn(Q)?Sn(j,U,"whitespace")(Q):U(Q)):z(Q)}function U(Q){return Q===null||Dt(Q)?(j.exit("codeFencedFence"),A(Q)):z(Q)}}}function vTn(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 Bw={name:"codeIndented",tokenize:yTn},bTn={partial:!0,tokenize:xTn};function yTn(e,n,t){const r=this;return s;function s(u){return e.enter("codeIndented"),Sn(e,i,"linePrefix",5)(u)}function i(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Dt(u)?e.attempt(bTn,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||Dt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),n(u)}}function xTn(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):Dt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Sn(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):Dt(a)?s(a):t(a)}}const wTn={name:"codeText",previous:STn,resolve:kTn,tokenize:CTn};function kTn(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&&e0(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),e0(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),e0(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 KP(e,n,t,r,s,i,a,o,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return f;function f(b){return b===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(b),e.exit(i),p):b===null||b===32||b===41||sb(b)?t(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(b))}function p(b){return b===62?(e.enter(i),e.consume(b),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(o),p(b)):b===null||b===60||Dt(b)?t(b):(e.consume(b),b===92?w:m)}function w(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function k(b){return!h&&(b===null||b===41||wr(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(b)):h999||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):Dt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||Dt(m)||o++>999?(e.exit("chunkString"),h(m)):(e.consume(m),c||(c=!jn(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,f):f(m)}}function WP(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):Dt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Sn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===a||p===null||Dt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:h)}function f(p){return p===a||p===92?(e.consume(p),h):h(p)}}function k0(e,n){let t;return r;function r(s){return Dt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):jn(s)?Sn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const MTn={name:"definition",tokenize:DTn},OTn={partial:!0,tokenize:LTn};function DTn(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return VP.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=mo(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)?k0(e,u)(m):u(m)}function u(m){return KP(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(OTn,f,f)(m)}function f(m){return jn(m)?Sn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Dt(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function LTn(e,n,t){return r;function r(o){return wr(o)?k0(e,s)(o):t(o)}function s(o){return WP(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return jn(o)?Sn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Dt(o)?n(o):t(o)}}const ITn={name:"hardBreakEscape",tokenize:$Tn};function $Tn(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return Dt(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const BTn={name:"headingAtx",resolve:PTn,tokenize:FTn};function PTn(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"},va(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function FTn(e,n,t){let r=0;return s;function s(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||wr(h)?(e.exit("atxHeadingSequence"),o(h)):t(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Dt(h)?(e.exit("atxHeading"),n(h)):jn(h)?Sn(e,o,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),o(h))}function u(h){return h===null||h===35||wr(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),u)}}const HTn=["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"],pT=["pre","script","style","textarea"],qTn={concrete:!0,name:"htmlFlow",resolveTo:KTn,tokenize:VTn},UTn={partial:!0,tokenize:QTn},GTn={partial:!0,tokenize:WTn};function KTn(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 VTn(e,n,t){const r=this;let s,i,a,o,c;return u;function u(F){return h(F)}function h(F){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(F),f}function f(F){return F===33?(e.consume(F),p):F===47?(e.consume(F),i=!0,k):F===63?(e.consume(F),s=3,r.interrupt?n:L):gi(F)?(e.consume(F),a=String.fromCharCode(F),v):t(F)}function p(F){return F===45?(e.consume(F),s=2,m):F===91?(e.consume(F),s=5,o=0,w):gi(F)?(e.consume(F),s=4,r.interrupt?n:L):t(F)}function m(F){return F===45?(e.consume(F),r.interrupt?n:L):t(F)}function w(F){const re="CDATA[";return F===re.charCodeAt(o++)?(e.consume(F),o===re.length?r.interrupt?n:B:w):t(F)}function k(F){return gi(F)?(e.consume(F),a=String.fromCharCode(F),v):t(F)}function v(F){if(F===null||F===47||F===62||wr(F)){const re=F===47,ie=a.toLowerCase();return!re&&!i&&pT.includes(ie)?(s=1,r.interrupt?n(F):B(F)):HTn.includes(a.toLowerCase())?(s=6,re?(e.consume(F),b):r.interrupt?n(F):B(F)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(F):i?y(F):x(F))}return F===45||ti(F)?(e.consume(F),a+=String.fromCharCode(F),v):t(F)}function b(F){return F===62?(e.consume(F),r.interrupt?n:B):t(F)}function y(F){return jn(F)?(e.consume(F),y):D(F)}function x(F){return F===47?(e.consume(F),D):F===58||F===95||gi(F)?(e.consume(F),C):jn(F)?(e.consume(F),x):D(F)}function C(F){return F===45||F===46||F===58||F===95||ti(F)?(e.consume(F),C):N(F)}function N(F){return F===61?(e.consume(F),j):jn(F)?(e.consume(F),N):x(F)}function j(F){return F===null||F===60||F===61||F===62||F===96?t(F):F===34||F===39?(e.consume(F),c=F,A):jn(F)?(e.consume(F),j):z(F)}function A(F){return F===c?(e.consume(F),c=null,M):F===null||Dt(F)?t(F):(e.consume(F),A)}function z(F){return F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||wr(F)?N(F):(e.consume(F),z)}function M(F){return F===47||F===62||jn(F)?x(F):t(F)}function D(F){return F===62?(e.consume(F),I):t(F)}function I(F){return F===null||Dt(F)?B(F):jn(F)?(e.consume(F),I):t(F)}function B(F){return F===45&&s===2?(e.consume(F),V):F===60&&s===1?(e.consume(F),Z):F===62&&s===4?(e.consume(F),q):F===63&&s===3?(e.consume(F),L):F===93&&s===5?(e.consume(F),$):Dt(F)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(UTn,P,G)(F)):F===null||Dt(F)?(e.exit("htmlFlowData"),G(F)):(e.consume(F),B)}function G(F){return e.check(GTn,U,P)(F)}function U(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),Q}function Q(F){return F===null||Dt(F)?G(F):(e.enter("htmlFlowData"),B(F))}function V(F){return F===45?(e.consume(F),L):B(F)}function Z(F){return F===47?(e.consume(F),a="",J):B(F)}function J(F){if(F===62){const re=a.toLowerCase();return pT.includes(re)?(e.consume(F),q):B(F)}return gi(F)&&a.length<8?(e.consume(F),a+=String.fromCharCode(F),J):B(F)}function $(F){return F===93?(e.consume(F),L):B(F)}function L(F){return F===62?(e.consume(F),q):F===45&&s===2?(e.consume(F),L):B(F)}function q(F){return F===null||Dt(F)?(e.exit("htmlFlowData"),P(F)):(e.consume(F),q)}function P(F){return e.exit("htmlFlow"),n(F)}}function WTn(e,n,t){const r=this;return s;function s(a){return Dt(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 QTn(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Hm,n,t)}}const XTn={name:"htmlText",tokenize:YTn};function YTn(e,n,t){const r=this;let s,i,a;return o;function o(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),N):L===63?(e.consume(L),x):gi(L)?(e.consume(L),z):t(L)}function u(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),i=0,w):gi(L)?(e.consume(L),y):t(L)}function h(L){return L===45?(e.consume(L),m):t(L)}function f(L){return L===null?t(L):L===45?(e.consume(L),p):Dt(L)?(a=f,Z(L)):(e.consume(L),f)}function p(L){return L===45?(e.consume(L),m):f(L)}function m(L){return L===62?V(L):L===45?p(L):f(L)}function w(L){const q="CDATA[";return L===q.charCodeAt(i++)?(e.consume(L),i===q.length?k:w):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),v):Dt(L)?(a=k,Z(L)):(e.consume(L),k)}function v(L){return L===93?(e.consume(L),b):k(L)}function b(L){return L===62?V(L):L===93?(e.consume(L),b):k(L)}function y(L){return L===null||L===62?V(L):Dt(L)?(a=y,Z(L)):(e.consume(L),y)}function x(L){return L===null?t(L):L===63?(e.consume(L),C):Dt(L)?(a=x,Z(L)):(e.consume(L),x)}function C(L){return L===62?V(L):x(L)}function N(L){return gi(L)?(e.consume(L),j):t(L)}function j(L){return L===45||ti(L)?(e.consume(L),j):A(L)}function A(L){return Dt(L)?(a=A,Z(L)):jn(L)?(e.consume(L),A):V(L)}function z(L){return L===45||ti(L)?(e.consume(L),z):L===47||L===62||wr(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),V):L===58||L===95||gi(L)?(e.consume(L),D):Dt(L)?(a=M,Z(L)):jn(L)?(e.consume(L),M):V(L)}function D(L){return L===45||L===46||L===58||L===95||ti(L)?(e.consume(L),D):I(L)}function I(L){return L===61?(e.consume(L),B):Dt(L)?(a=I,Z(L)):jn(L)?(e.consume(L),I):M(L)}function B(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,G):Dt(L)?(a=B,Z(L)):jn(L)?(e.consume(L),B):(e.consume(L),U)}function G(L){return L===s?(e.consume(L),s=void 0,Q):L===null?t(L):Dt(L)?(a=G,Z(L)):(e.consume(L),G)}function U(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||wr(L)?M(L):(e.consume(L),U)}function Q(L){return L===47||L===62||wr(L)?M(L):t(L)}function V(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function Z(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),J}function J(L){return jn(L)?Sn(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):$(L)}function $(L){return e.enter("htmlTextData"),a(L)}}const oC={name:"labelEnd",resolveAll:tRn,resolveTo:nRn,tokenize:rRn},ZTn={tokenize:sRn},JTn={tokenize:iRn},eRn={tokenize:aRn};function tRn(e){let n=-1;const t=[];for(;++n=3&&(u===null||Dt(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),jn(u)?Sn(e,o,"whitespace")(u):o(u))}}const Pi={continuation:{tokenize:mRn},exit:vRn,name:"list",tokenize:pRn},dRn={partial:!0,tokenize:bRn},hRn={partial:!0,tokenize:gRn};function pRn(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:I5(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(_v,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 I5(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(Hm,r.interrupt?t:h,e.attempt(dRn,p,f))}function h(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function f(m){return jn(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 mRn(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Hm,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Sn(e,n,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!jn(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(hRn,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Sn(e,e.attempt(Pi,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function gRn(e,n,t){const r=this;return Sn(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 vRn(e){e.exit(this.containerState.type)}function bRn(e,n,t){const r=this;return Sn(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!jn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const mT={name:"setextUnderline",resolveTo:yRn,tokenize:xRn};function yRn(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 xRn(e,n,t){const r=this;let s;return i;function i(u){let h=r.events.length,f;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){f=r.events[h][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"),jn(u)?Sn(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Dt(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const wRn={tokenize:kRn};function kRn(e){const n=this,t=e.attempt(Hm,r,e.attempt(this.parser.constructs.flowInitial,s,Sn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(zTn,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 SRn={resolveAll:XP()},CRn=QP("string"),ERn=QP("text");function QP(e){return{resolveAll:XP(e==="text"?NRn: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(h){return u(h)?i(h):o(h)}function o(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),c}function c(h){return u(h)?(t.exit("data"),i(h)):(t.consume(h),c)}function u(h){if(h===null)return!0;const f=s[h];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 PRn(e,n){let t=-1;const r=[];let s;for(;++t0){const rt=qe.tokenStack[qe.tokenStack.length-1];(rt[1]||aT).call(qe,void 0,rt[0])}for(Ne.position={start:fu(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:fu(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},ht=-1;++ht0&&(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 jTn(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function ATn(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function TTn(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=tp(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 RTn(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 MTn(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function LP(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 OTn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return LP(e,n);const s={src:tp(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 DTn(e,n){const t={src:tp(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 LTn(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 LP(e,n);const s={href:tp(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 $Tn(e,n){const t={href:tp(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 BTn(e,n,t){const r=e.all(n),s=t?PTn(t):IP(n),i={},a=[];if(typeof n.checked=="boolean"){const h=r[0];let f;h&&h.type==="element"&&h.tagName==="p"?f=h:(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(;++o0){const st=qe.tokenStack[qe.tokenStack.length-1];(st[1]||vT).call(qe,void 0,st[0])}for(je.position={start:_u(me.length>0?me[0][1].start:{line:1,column:1,offset:0}),end:_u(me.length>0?me[me.length-2][1].end:{line:1,column:1,offset:0})},dt=-1;++dt0&&(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 JRn(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function eMn(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function tMn(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=ep(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 nMn(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 rMn(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function JP(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 sMn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return JP(e,n);const s={src:ep(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 iMn(e,n){const t={src:ep(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 aMn(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 oMn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return JP(e,n);const s={href:ep(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 cMn(e,n){const t={href:ep(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 lMn(e,n,t){const r=e.all(n),s=t?uMn(t):eF(n),i={},a=[];if(typeof n.checked=="boolean"){const h=r[0];let f;h&&h.type==="element"&&h.tagName==="p"?f=h:(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 FTn(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=q6(n.children[1]),c=pP(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 VTn(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(lT(n.slice(s),s>0,!1)),i.join("")}function lT(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===oT||i===cT;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===oT||i===cT;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function QTn(e,n){const t={type:"text",value:WTn(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function XTn(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const YTn={blockquote:ETn,break:NTn,code:zTn,delete:jTn,emphasis:ATn,footnoteReference:TTn,heading:RTn,html:MTn,imageReference:OTn,image:DTn,inlineCode:LTn,linkReference:ITn,link:$Tn,listItem:BTn,list:FTn,paragraph:HTn,root:qTn,strong:UTn,table:GTn,tableCell:KTn,tableRow:VTn,text:QTn,thematicBreak:XTn,toml:S1,yaml:S1,definition:S1,footnoteDefinition:S1};function S1(){}const $P=-1,Cy=0,k0=1,sb=2,Q6=3,X6=4,Y6=5,Z6=6,BP=7,PP=8,ZTn=typeof self=="object"?self:globalThis,uT=(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 ZTn[e](n)},JTn=(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 Cy:case $P:return t(a,s);case k0:{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 Q6:return t(new Date(a),s);case X6:{const{source:o,flags:c}=a;return t(new RegExp(o,c),s)}case Y6:{const o=t(new Map,s);for(const[c,u]of a)o.set(r(c),r(u));return o}case Z6:{const o=t(new Set,s);for(const c of a)o.add(r(c));return o}case BP:{const{name:o,message:c}=a;return t(uT(o,c),s)}case PP: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(uT(i,a),s)};return r},_T=e=>JTn(new Map,e)(0),D_="",{toString:eRn}={},{keys:tRn}=Object,e0=e=>{const n=typeof e;if(n!=="object"||!e)return[Cy,n];const t=eRn.call(e).slice(8,-1);switch(t){case"Array":return[k0,D_];case"Object":return[sb,D_];case"Date":return[Q6,D_];case"RegExp":return[X6,D_];case"Map":return[Y6,D_];case"Set":return[Z6,D_];case"DataView":return[k0,t]}return t.includes("Array")?[k0,t]:t.includes("Error")?[BP,t]:[sb,t]},C1=([e,n])=>e===Cy&&(n==="function"||n==="symbol"),nRn=(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]=e0(a);switch(o){case Cy:{let h=a;switch(c){case"bigint":o=PP,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return s([$P],a)}return s([o,h],a)}case k0:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const h=[],f=s([o,h],a);for(const p of a)h.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 h=[],f=s([o,h],a);for(const p of tRn(a))(e||!C1(e0(a[p])))&&h.push([i(p),i(a[p])]);return f}case Q6:return s([o,isNaN(a.getTime())?D_:a.toISOString()],a);case X6:{const{source:h,flags:f}=a;return s([o,{source:h,flags:f}],a)}case Y6:{const h=[],f=s([o,h],a);for(const[p,m]of a)(e||!(C1(e0(p))||C1(e0(m))))&&h.push([i(p),i(m)]);return f}case Z6:{const h=[],f=s([o,h],a);for(const p of a)(e||!C1(e0(p)))&&h.push(i(p));return f}}const{message:u}=a;return s([o,{name:c,message:u}],a)};return i},fT=(e,{json:n,lossy:t}={})=>{const r=[];return nRn(!(n||t),!!n,new Map,r)(e),r},ib=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?_T(fT(e,n)):structuredClone(e):(e,n)=>_T(fT(e,n));function rRn(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 sRn(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function iRn(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||rRn,r=e.options.footnoteBackLabel||sRn,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 y=typeof t=="string"?t:t(c,m);typeof y=="string"&&(y={type:"text",value:y}),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(y)?y:[y]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const y=v.children[v.children.length-1];y&&y.type==="text"?y.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...w)}else h.push(...w);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...ib(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 uMn(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r1}function _Mn(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=nC(n.children[1]),c=RP(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 mMn(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(xT(n.slice(s),s>0,!1)),i.join("")}function xT(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===bT||i===yT;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===bT||i===yT;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function bMn(e,n){const t={type:"text",value:vMn(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function yMn(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const xMn={blockquote:XRn,break:YRn,code:ZRn,delete:JRn,emphasis:eMn,footnoteReference:tMn,heading:nMn,html:rMn,imageReference:sMn,image:iMn,inlineCode:aMn,linkReference:oMn,link:cMn,listItem:lMn,list:_Mn,paragraph:fMn,root:dMn,strong:hMn,table:pMn,tableCell:gMn,tableRow:mMn,text:bMn,thematicBreak:yMn,toml:S1,yaml:S1,definition:S1,footnoteDefinition:S1};function S1(){}const tF=-1,jy=0,S0=1,ib=2,cC=3,lC=4,uC=5,_C=6,nF=7,rF=8,wMn=typeof self=="object"?self:globalThis,wT=(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 wMn[e](n)},kMn=(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 jy:case tF:return t(a,s);case S0:{const o=t([],s);for(const c of a)o.push(r(c));return o}case ib:{const o=t({},s);for(const[c,u]of a)o[r(c)]=r(u);return o}case cC:return t(new Date(a),s);case lC:{const{source:o,flags:c}=a;return t(new RegExp(o,c),s)}case uC:{const o=t(new Map,s);for(const[c,u]of a)o.set(r(c),r(u));return o}case _C:{const o=t(new Set,s);for(const c of a)o.add(r(c));return o}case nF:{const{name:o,message:c}=a;return t(wT(o,c),s)}case rF: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(wT(i,a),s)};return r},kT=e=>kMn(new Map,e)(0),O_="",{toString:SMn}={},{keys:CMn}=Object,t0=e=>{const n=typeof e;if(n!=="object"||!e)return[jy,n];const t=SMn.call(e).slice(8,-1);switch(t){case"Array":return[S0,O_];case"Object":return[ib,O_];case"Date":return[cC,O_];case"RegExp":return[lC,O_];case"Map":return[uC,O_];case"Set":return[_C,O_];case"DataView":return[S0,t]}return t.includes("Array")?[S0,t]:t.includes("Error")?[nF,t]:[ib,t]},C1=([e,n])=>e===jy&&(n==="function"||n==="symbol"),EMn=(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]=t0(a);switch(o){case jy:{let h=a;switch(c){case"bigint":o=rF,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return s([tF],a)}return s([o,h],a)}case S0:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const h=[],f=s([o,h],a);for(const p of a)h.push(i(p));return f}case ib:{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 h=[],f=s([o,h],a);for(const p of CMn(a))(e||!C1(t0(a[p])))&&h.push([i(p),i(a[p])]);return f}case cC:return s([o,isNaN(a.getTime())?O_:a.toISOString()],a);case lC:{const{source:h,flags:f}=a;return s([o,{source:h,flags:f}],a)}case uC:{const h=[],f=s([o,h],a);for(const[p,m]of a)(e||!(C1(t0(p))||C1(t0(m))))&&h.push([i(p),i(m)]);return f}case _C:{const h=[],f=s([o,h],a);for(const p of a)(e||!C1(t0(p)))&&h.push(i(p));return f}}const{message:u}=a;return s([o,{name:c,message:u}],a)};return i},ST=(e,{json:n,lossy:t}={})=>{const r=[];return EMn(!(n||t),!!n,new Map,r)(e),r},ab=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?kT(ST(e,n)):structuredClone(e):(e,n)=>kT(ST(e,n));function NMn(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 zMn(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function jMn(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||NMn,r=e.options.footnoteBackLabel||zMn,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 y=typeof t=="string"?t:t(c,m);typeof y=="string"&&(y={type:"text",value:y}),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(y)?y:[y]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const y=v.children[v.children.length-1];y&&y.type==="text"?y.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...w)}else h.push(...w);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...ab(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 qm=(function(e){if(e==null)return lRn;if(typeof e=="function")return Ey(e);if(typeof e=="object")return Array.isArray(e)?aRn(e):oRn(e);if(typeof e=="string")return cRn(e);throw new Error("Expected function, string, or object as test")});function aRn(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let m=FP,w,k,v;if((!n||i(c,u,h[h.length-1]||void 0))&&(m=fRn(t(c,h)),m[0]===T5))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==HP)for(k=(r?b.children.length:-1)+a,v=h.concat(b);k>-1&&k":""))+")"})}return p;function p(){let m=sF,w,k,v;if((!n||i(c,u,h[h.length-1]||void 0))&&(m=LMn(t(c,h)),m[0]===B5))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==iF)for(k=(r?b.children.length:-1)+a,v=h.concat(b);k>-1&&k0&&t.push({type:"text",value:` -`}),t}function dT(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function hT(e,n){const t=hRn(e,n),r=t.one(e,void 0),s=iRn(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` -`},s),i}function ab(e,n){return e&&"run"in e?async function(t,r){const s=hT(t,{file:r,...n});await e.run(s,r)}:function(t,r){return hT(t,{file:r,...e||n})}}function pT(e){if(e)throw e}var Iw,mT;function bRn(){if(mT)return Iw;mT=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 h=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!h&&!f)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,h){t&&h.name==="__proto__"?t(u,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):u[h.name]=h.newValue},o=function(u,h){if(h==="__proto__")if(e.call(u,h)){if(r)return r(u,h).value}else return;return u[h]};return Iw=function c(){var u,h,f,p,m,w,k=arguments[0],v=1,b=arguments.length,y=!1;for(typeof k=="boolean"&&(y=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 h=u;if(o&&t)throw h;return s(h)}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 Ko={basename:kRn,dirname:SRn,extname:CRn,join:ERn,sep:"/"};function kRn(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Um(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 SRn(e){if(Um(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 CRn(e){Um(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 ERn(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function zRn(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 Um(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jRn={cwd:ARn};function ARn(){return"/"}function O5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function TRn(e){if(typeof e=="string")e=new URL(e);else if(!O5(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 RRn(e)}function RRn(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]=h;const k=r[p][1];M5(k)&&M5(m)&&(m=$w(!0,k,m)),r[p]=[u,m,...w]}}}}const Ny=new tC().freeze();function Hw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Uw(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 vT(e){if(!M5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function bT(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function E1(e){return LRn(e)?e:new qP(e)}function LRn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function IRn(e){return typeof e=="string"||$Rn(e)}function $Rn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BRn="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",yT=[],xT={allowDangerousHtml:!0},PRn=/^(https?|ircs?|mailto|xmpp)$/i,FRn=[{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 HRn(e){const n=qRn(e),t=URn(e);return GRn(n.runSync(n.parse(t),t),e)}function qRn(e){const n=e.rehypePlugins||yT,t=e.remarkPlugins||yT,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...xT}:xT;return Ny().use(Sy).use(t).use(ab,r).use(n)}function URn(e){const n=e.children||"",t=new qP;return typeof n=="string"&&(t.value=n),t}function GRn(e,n){const t=n.allowedElements,r=n.allowElement,s=n.components,i=n.disallowedElements,a=n.skipHtml,o=n.unwrapDisallowed,c=n.urlTransform||UP;for(const h of FRn)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+BRn+h.id,void 0);return eC(e,u),vP(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function u(h,f,p){if(h.type==="raw"&&p&&typeof f=="number")return a?p.children.splice(f,1):p.children[f]={type:"text",value:h.value},f;if(h.type==="element"){let m;for(m in Ow)if(Object.hasOwn(Ow,m)&&Object.hasOwn(h.properties,m)){const w=h.properties[m],k=Ow[m];(k===null||k.includes(h.tagName))&&(h.properties[m]=c(String(w||""),m,h))}}if(h.type==="element"){let m=t?!t.includes(h.tagName):i?i.includes(h.tagName):!1;if(!m&&r&&typeof f=="number"&&(m=!r(h,f,p)),m&&p&&typeof f=="number")return o&&h.children?p.children.splice(f,1,...h.children):p.children.splice(f,1),f}}}function UP(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||PRn.test(e.slice(0,n))?e:""}function nC(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function D5(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 h=u.startsWith("/"),f=h?[]: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&&(h||e.startsWith("/"))?"/":""}${f.join("/")}`,query:c,hash:i}}function VRn(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function L5(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 KRn(e){const n=Number.parseInt(e.replace(/^L/i,""),10);return n>0?n:void 0}function rC(e){return/^[a-z]:[\\/]/i.test(e)}function GP(e){const n=rC(e);if(!n&&nC(e))return null;const t=D5("",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 WRn(){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"&&L5(i).line!=null&&(t.properties["data-cited-href"]=i),t.properties[s]=s==="src"&&t.tagName==="img"&&rC(i)?i:UP(i)}(r=t.children)==null||r.forEach(n)};n(e)}}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[h]!==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 wT(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const XRn=(e,n)=>Math.abs(e-n)<1.01,YRn=(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 t0;const Gw=()=>{if(t0!==void 0)return t0;if(typeof navigator>"u")return t0=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return t0=!0;const e=navigator.maxTouchPoints;return t0=navigator.platform==="MacIntel"&&e!==void 0&&e>0},kT=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},ZRn=e=>e,VP=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(kT(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(kT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},ob={passive:!0},eMn=typeof window>"u"?!0:"onscrollend"in window,tMn=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&eMn;let a=0;const o=i?null:YRn(s,()=>n(a,!1),e.options.isScrollingResetDelay),c=f=>()=>{a=t(r),o==null||o(),n(a,f)},u=c(!0),h=c(!1);return r.addEventListener("scroll",u,ob),i&&r.addEventListener("scrollend",h,ob),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",h),o==null||o.cancel()}},nMn=(e,n)=>tMn(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),rMn=(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"]},sMn=(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})},iMn=sMn;class aMn{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,h]of this.elementsCache)if(h===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:ZRn,rangeExtractor:VP,onChange:()=>{},measureElement:rMn,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 x=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;x&&(o=[x.key,this.getScrollOffset()-x.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 h=!1,f=0;if(o&&this.scrollOffset!==null){const[p,m]=o,w=this.getMeasurements(),{count:k,getItemKey:v}=this.options;let b=0;for(;b{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,t)},this.maybeNotify=zd(()=>(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,!(!Gw()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,ob),i.addEventListener("touchend",o,ob),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&&(Gw()&&(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=zd(()=>[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},h)=>{const f=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);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(b=>{this.itemSizeCache.set(b.key,b.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 b=t*2;let y=this._flatMeasurements;if(!y||y.length0&&N.set(y.subarray(0,p*2)),y=N,this._flatMeasurements=y}let x;if(p===0)x=r+s;else{const N=p-1;x=y[N*2]+y[N*2+1]+u}for(let N=p;N1){C=x;const D=w[C],I=D!==void 0?m[D]:void 0;N=I?I.end+u:r+s}else if(v===o){let D=0,I=k[0],B=w[0];for(let G=1;Gthis.options.debug}),this.calculateRange=zd(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,s,i)=>t.length===0||r===0?(this.range=null,null):(this.range=cMn(t,r,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=zd(()=>{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 h=this.itemSizeCache.get(c)??a,f=r-h;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=KP(0,r.length-1,i?o=>s[o*2]:o=>wT(r[o]).start,t);return wT(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(Gw()&&(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 KP=(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 oMn(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 cMn(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=oMn(s,i,t);let h=u;const f=t+n;for(;he[u].start,t),c=o;if(r===1)for(;c1){const u=Array(r).fill(0);for(;cf=0&&h.some(f=>f>=t);){const f=e[o];h[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 Vw=typeof document<"u"?T.useLayoutEffect:T.useEffect;function lMn({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=T.useReducer(h=>h+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=h=>{const f=i.current;if(!f.enabled||!f.container)return;const p=h.getTotalSize();if(p!==f.lastSize){f.lastSize=p;const m=h.options.horizontal?"width":"height";f.container.style[m]=`${p}px`}},o=h=>{const f=i.current;if(!f.enabled||!f.container)return;a(h);const p=!!h.options.horizontal,m=f.mode==="transform",w=p?"left":"top",k=h.options.scrollMargin,v=h.getVirtualItems();for(const b of v){const y=b.start-k,x=h.elementsCache.get(b.key);x&&f.lastPositions.get(x)!==y&&(f.lastPositions.set(x,y),m?x.style.transform=p?`translate3d(${y}px, 0, 0)`:`translate3d(0, ${y}px, 0)`:x.style[w]=`${y}px`)}},c={...r,onChange:(h,f)=>{var p;const m=i.current;let w=!0;if(m.enabled){o(h);const k=h.range,v=m.prevRange;w=!v||v.isScrolling!==h.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:h.isScrolling}:null)}w&&(e&&f?ai.flushSync(s):s()),(p=r.onChange)==null||p.call(r,h,f)}},[u]=T.useState(()=>{const h=new aMn(c);return Object.assign(h,{containerRef:f=>{const p=i.current;if(p.container=f,p.lastSize=null,f&&p.enabled){const m=h.getTotalSize();p.lastSize=m;const w=h.options.horizontal?"width":"height";f.style[w]=`${m}px`}}})});return u.setOptions(c),Vw(()=>u._didMount(),[]),Vw(()=>(a(u),u._willUpdate())),Vw(()=>{o(u)}),u}function uMn(e){return lMn({observeElementRect:JRn,observeElementOffset:nMn,scrollToFn:iMn,...e})}function _Mn(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 fMn(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 dMn(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 h=u.parentId??null,f=a.get(h);f?f.push(u):a.set(h,[u])}const o=new Set(n.map(u=>u.id)),c=new Map;for(const u of t){const h=fMn(u,i,a),f=h.findIndex(p=>o.has(p.id));c.set(u.id,{count:h.length,index:f,prevId:f>0?h[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 Oh(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 Gm(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function pMn(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 WP(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||Gm(r)||!Oh(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function QP(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=WP(n.parts);return t?{messageId:n.id,toolId:t}:null}function mMn(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"||Gm(r)))return r.type==="text"&&!!r.text}return!1}function gMn(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 XP(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=>Oh(r))||!e.slice(0,t).some(r=>Oh(r))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function YP(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(` +`}),t}function CT(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function ET(e,n){const t=$Mn(e,n),r=t.one(e,void 0),s=jMn(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` +`},s),i}function ob(e,n){return e&&"run"in e?async function(t,r){const s=ET(t,{file:r,...n});await e.run(s,r)}:function(t,r){return ET(t,{file:r,...e||n})}}function NT(e){if(e)throw e}var Fw,zT;function qMn(){if(zT)return Fw;zT=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 h=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!h&&!f)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,h){t&&h.name==="__proto__"?t(u,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):u[h.name]=h.newValue},o=function(u,h){if(h==="__proto__")if(e.call(u,h)){if(r)return r(u,h).value}else return;return u[h]};return Fw=function c(){var u,h,f,p,m,w,k=arguments[0],v=1,b=arguments.length,y=!1;for(typeof k=="boolean"&&(y=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 h=u;if(o&&t)throw h;return s(h)}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 Wo={basename:VMn,dirname:WMn,extname:QMn,join:XMn,sep:"/"};function VMn(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Um(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 WMn(e){if(Um(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 QMn(e){Um(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 XMn(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function ZMn(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 Um(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const JMn={cwd:eOn};function eOn(){return"/"}function H5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function tOn(e){if(typeof e=="string")e=new URL(e);else if(!H5(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 nOn(e)}function nOn(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]=h;const k=r[p][1];F5(k)&&F5(m)&&(m=Hw(!0,k,m)),r[p]=[u,m,...w]}}}}const Ty=new hC().freeze();function Kw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ww(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 AT(e){if(!F5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function TT(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function E1(e){return aOn(e)?e:new aF(e)}function aOn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oOn(e){return typeof e=="string"||cOn(e)}function cOn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lOn="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",RT=[],MT={allowDangerousHtml:!0},uOn=/^(https?|ircs?|mailto|xmpp)$/i,_On=[{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 fOn(e){const n=dOn(e),t=hOn(e);return pOn(n.runSync(n.parse(t),t),e)}function dOn(e){const n=e.rehypePlugins||RT,t=e.remarkPlugins||RT,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...MT}:MT;return Ty().use(zy).use(t).use(ob,r).use(n)}function hOn(e){const n=e.children||"",t=new aF;return typeof n=="string"&&(t.value=n),t}function pOn(e,n){const t=n.allowedElements,r=n.allowElement,s=n.components,i=n.disallowedElements,a=n.skipHtml,o=n.unwrapDisallowed,c=n.urlTransform||oF;for(const h of _On)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+lOn+h.id,void 0);return dC(e,u),DP(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function u(h,f,p){if(h.type==="raw"&&p&&typeof f=="number")return a?p.children.splice(f,1):p.children[f]={type:"text",value:h.value},f;if(h.type==="element"){let m;for(m in $w)if(Object.hasOwn($w,m)&&Object.hasOwn(h.properties,m)){const w=h.properties[m],k=$w[m];(k===null||k.includes(h.tagName))&&(h.properties[m]=c(String(w||""),m,h))}}if(h.type==="element"){let m=t?!t.includes(h.tagName):i?i.includes(h.tagName):!1;if(!m&&r&&typeof f=="number"&&(m=!r(h,f,p)),m&&p&&typeof f=="number")return o&&h.children?p.children.splice(f,1,...h.children):p.children.splice(f,1),f}}}function oF(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||uOn.test(e.slice(0,n))?e:""}function pC(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 h=u.startsWith("/"),f=h?[]: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&&(h||e.startsWith("/"))?"/":""}${f.join("/")}`,query:c,hash:i}}function mOn(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function U5(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 gOn(e){const n=Number.parseInt(e.replace(/^L/i,""),10);return n>0?n:void 0}function mC(e){return/^[a-z]:[\\/]/i.test(e)}function cF(e){const n=mC(e);if(!n&&pC(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 vOn(){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"&&U5(i).line!=null&&(t.properties["data-cited-href"]=i),t.properties[s]=s==="src"&&t.tagName==="img"&&mC(i)?i:oF(i)}(r=t.children)==null||r.forEach(n)};n(e)}}function bOn(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[h]!==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 OT(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const yOn=(e,n)=>Math.abs(e-n)<1.01,xOn=(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 n0;const Qw=()=>{if(n0!==void 0)return n0;if(typeof navigator>"u")return n0=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return n0=!0;const e=navigator.maxTouchPoints;return n0=navigator.platform==="MacIntel"&&e!==void 0&&e>0},DT=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},wOn=e=>e,lF=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(DT(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(DT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},cb={passive:!0},SOn=typeof window>"u"?!0:"onscrollend"in window,COn=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&SOn;let a=0;const o=i?null:xOn(s,()=>n(a,!1),e.options.isScrollingResetDelay),c=f=>()=>{a=t(r),o==null||o(),n(a,f)},u=c(!0),h=c(!1);return r.addEventListener("scroll",u,cb),i&&r.addEventListener("scrollend",h,cb),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",h),o==null||o.cancel()}},EOn=(e,n)=>COn(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),NOn=(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"]},zOn=(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})},jOn=zOn;class AOn{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,h]of this.elementsCache)if(h===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:wOn,rangeExtractor:lF,onChange:()=>{},measureElement:NOn,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 x=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;x&&(o=[x.key,this.getScrollOffset()-x.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 h=!1,f=0;if(o&&this.scrollOffset!==null){const[p,m]=o,w=this.getMeasurements(),{count:k,getItemKey:v}=this.options;let b=0;for(;b{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,t)},this.maybeNotify=Nd(()=>(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,!(!Qw()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,cb),i.addEventListener("touchend",o,cb),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&&(Qw()&&(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=Nd(()=>[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},h)=>{const f=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);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(b=>{this.itemSizeCache.set(b.key,b.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 b=t*2;let y=this._flatMeasurements;if(!y||y.length0&&N.set(y.subarray(0,p*2)),y=N,this._flatMeasurements=y}let x;if(p===0)x=r+s;else{const N=p-1;x=y[N*2]+y[N*2+1]+u}for(let N=p;N1){C=x;const D=w[C],I=D!==void 0?m[D]:void 0;N=I?I.end+u:r+s}else if(v===o){let D=0,I=k[0],B=w[0];for(let G=1;Gthis.options.debug}),this.calculateRange=Nd(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,s,i)=>t.length===0||r===0?(this.range=null,null):(this.range=ROn(t,r,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Nd(()=>{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 h=this.itemSizeCache.get(c)??a,f=r-h;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=uF(0,r.length-1,i?o=>s[o*2]:o=>OT(r[o]).start,t);return OT(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(Qw()&&(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&&yOn(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 uF=(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 TOn(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 ROn(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=TOn(s,i,t);let h=u;const f=t+n;for(;he[u].start,t),c=o;if(r===1)for(;c1){const u=Array(r).fill(0);for(;cf=0&&h.some(f=>f>=t);){const f=e[o];h[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 Xw=typeof document<"u"?T.useLayoutEffect:T.useEffect;function MOn({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=T.useReducer(h=>h+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=h=>{const f=i.current;if(!f.enabled||!f.container)return;const p=h.getTotalSize();if(p!==f.lastSize){f.lastSize=p;const m=h.options.horizontal?"width":"height";f.container.style[m]=`${p}px`}},o=h=>{const f=i.current;if(!f.enabled||!f.container)return;a(h);const p=!!h.options.horizontal,m=f.mode==="transform",w=p?"left":"top",k=h.options.scrollMargin,v=h.getVirtualItems();for(const b of v){const y=b.start-k,x=h.elementsCache.get(b.key);x&&f.lastPositions.get(x)!==y&&(f.lastPositions.set(x,y),m?x.style.transform=p?`translate3d(${y}px, 0, 0)`:`translate3d(0, ${y}px, 0)`:x.style[w]=`${y}px`)}},c={...r,onChange:(h,f)=>{var p;const m=i.current;let w=!0;if(m.enabled){o(h);const k=h.range,v=m.prevRange;w=!v||v.isScrolling!==h.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:h.isScrolling}:null)}w&&(e&&f?si.flushSync(s):s()),(p=r.onChange)==null||p.call(r,h,f)}},[u]=T.useState(()=>{const h=new AOn(c);return Object.assign(h,{containerRef:f=>{const p=i.current;if(p.container=f,p.lastSize=null,f&&p.enabled){const m=h.getTotalSize();p.lastSize=m;const w=h.options.horizontal?"width":"height";f.style[w]=`${m}px`}}})});return u.setOptions(c),Xw(()=>u._didMount(),[]),Xw(()=>(a(u),u._willUpdate())),Xw(()=>{o(u)}),u}function OOn(e){return MOn({observeElementRect:kOn,observeElementOffset:EOn,scrollToFn:jOn,...e})}function DOn(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 LOn(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 IOn(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 h=u.parentId??null,f=a.get(h);f?f.push(u):a.set(h,[u])}const o=new Set(n.map(u=>u.id)),c=new Map;for(const u of t){const h=LOn(u,i,a),f=h.findIndex(p=>o.has(p.id));c.set(u.id,{count:h.length,index:f,prevId:f>0?h[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 Oh(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 Gm(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function BOn(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 _F(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||Gm(r)||!Oh(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function fF(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=_F(n.parts);return t?{messageId:n.id,toolId:t}:null}function POn(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"||Gm(r)))return r.type==="text"&&!!r.text}return!1}function FOn(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 dF(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=>Oh(r))||!e.slice(0,t).some(r=>Oh(r))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function hF(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 ZP(e){return YP(XP(e.parts,!1).answer)}function vMn(e){for(let n=e.length-1;n>=0;n--){if(e[n].role!=="assistant")continue;const t=ZP(e[n]);if(t)return t}return""}function bMn(e,n,t){const r=n.flatMap(s=>{const i=YP(s.parts);return i?[`## ${s.role==="user"?t.user:t.assistant} +`)}function pF(e){return hF(dF(e.parts,!1).answer)}function HOn(e){for(let n=e.length-1;n>=0;n--){if(e[n].role!=="assistant")continue;const t=pF(e[n]);if(t)return t}return""}function qOn(e,n,t){const r=n.flatMap(s=>{const i=hF(s.parts);return i?[`## ${s.role==="user"?t.user:t.assistant} ${i}`]:[]});return r.length===0?null:[`# ${e}`,...r].join(` `)+` -`}function yMn(e){return`${e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").slice(0,80).replace(/^-+|-+$/g,"")||"chat"}.md`}function JP(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 I5(e){var t,r,s;if(JP(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 Go=e=>new Intl.NumberFormat(E()).format(e);function xMn(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?xNt():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?oNt({attempt:Go(e.attempt),maximum:Go(e.maximum),seconds:Go(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?eNt({attempt:Go(e.attempt),maximum:Go(e.maximum)}):typeof e.attempt=="number"&&t!=null?hNt({attempt:Go(e.attempt),seconds:Go(t)}):typeof e.attempt=="number"?KEt({attempt:Go(e.attempt)}):t!=null?zNt({seconds:Go(t)}):OL()}function wMn(e,n){if(typeof e!="number")return DNt();const t=Math.max(0,Math.ceil((e-n)/1e3));return HNt({seconds:Go(t)})}function eF(e){return e==="retry"||e==="continue"?e:null}function kMn(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 Kw={draft:"",attachments:[],annotations:[]};function SMn(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 CMn(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function ST(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"||e==="pubmed"?e:void 0}function EMn(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 sC(e){const n=[];let t="",r=!1,s=null;const i=()=>{r&&n.push(t),t="",r=!1};for(let a=0;anew Intl.NumberFormat(E()).format(e);function GOn(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?Pzt():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?Ezt({attempt:Ko(e.attempt),maximum:Ko(e.maximum),seconds:Ko(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?bzt({attempt:Ko(e.attempt),maximum:Ko(e.maximum)}):typeof e.attempt=="number"&&t!=null?Mzt({attempt:Ko(e.attempt),seconds:Ko(t)}):typeof e.attempt=="number"?fzt({attempt:Ko(e.attempt)}):t!=null?Vzt({seconds:Ko(t)}):QL()}function KOn(e,n){if(typeof e!="number")return ejt();const t=Math.max(0,Math.ceil((e-n)/1e3));return ojt({seconds:Ko(t)})}function gF(e){return e==="retry"||e==="continue"?e:null}function VOn(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 Yw={draft:"",attachments:[],annotations:[]};function WOn(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 QOn(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function LT(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"||e==="pubmed"?e:void 0}function XOn(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 gC(e){const n=[];let t="",r=!1,s=null;const i=()=>{r&&n.push(t),t="",r=!1};for(let a=0;a"||o==="&")break;/\s/.test(o)?i():(t+=o,r=!0)}return i(),n}function NMn(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=sC(e);if(t.length===1)return t[0]}return e}function zMn(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 Dh(e){return zMn(typeof e=="string"?sC(e):e)}function jMn(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 AMn(e,n){const t=Dh(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function TMn(e){var c;const n=Dh(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;u +`&&(t+=c,r=!0);continue}if(s){o===s?s=null:t+=o,r=!0;continue}if(o==='"'||o==="'"){s=o,r=!0;continue}if(o==="|"||o===";"||o===">"||o==="&")break;/\s/.test(o)?i():(t+=o,r=!0)}return i(),n}function YOn(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=gC(e);if(t.length===1)return t[0]}return e}function ZOn(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 Dh(e){return ZOn(typeof e=="string"?gC(e):e)}function JOn(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 eDn(e,n){const t=Dh(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function tDn(e){var c;const n=Dh(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;u -`,MMn='',OMn=` +`,rDn='',sDn=` -`,DMn=`Pm -`,tF={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv",pubmed:"PubMed"},LMn={alphaxiv:RMn,openalex:OMn,biorxiv:MMn,pubmed:DMn};function nF({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":tF[e]},dangerouslySetInnerHTML:{__html:LMn[e]}})}function IMn(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 $Mn(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=IMn(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 BMn=["alphaxiv","openalex","biorxiv","pubmed"];function PMn(){const e=S5n(),{data:n}=_t(e),t=gn({mutationFn:w3n,onSuccess:i=>Vr(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:BMn.map(i=>{const a=n[i];return _.jsxs(yn,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[_.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[_.jsx(nF,{source:i,size:16,decorative:!0}),tF[i]]}),_.jsx(uSn,{checked:a,"aria-hidden":"true"})]},i)})}):_.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:EJe()})}function Ww(e,n){if(!e)throw new Error("Assertion Error")}function A_(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}var CT=Object.prototype.hasOwnProperty;function ET(e,n,t){for(t of e.keys())if(S0(t,n))return t}function S0(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--&&S0(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=ET(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=ET(n,s),!s)||!S0(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(CT.call(e,t)&&++r&&!CT.call(n,t)||!(t in n)||!S0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const FMn=new Set(["table","tbody","thead","tfoot","tr"]),HMn=/^[\t\n\f\r ]*$/;function qMn(e,n,t={}){const r=rF(e,n??null,{Fragment:_.Fragment,components:t,jsx:_.jsx,jsxs:_.jsxs},void 0);return{react:r.react,state:r}}function rF(e,n,t,r){var k,v,b,y;if(n&&n.key===r&&e===n.node)return n;if(!("children"in e)||!Array.isArray(e.children))return n&&n.key===r&&Jd(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(x=>x.key).filter(x=>x!==void 0));let u=0;for(;u=e.children.length-h&&(j=s.length-(e.children.length-x)),j>=0&&(N=((b=s[j])==null?void 0:b.key)??N);N&&c.has(N)&&((y=s[j])==null?void 0:y.key)!==N;)N=`${N}+`;N&&c.add(N);const A=rF(C,s[j]??null,t,N);i.push(A),A.react!==void 0&&a.push(A.react)}const f=n!==null&&UMn(e,n.node);if(n&&n.key===r&&f&&s.length===i.length&&i.every((x,C)=>x===s[C]))return n;const p=e.type==="element"&&FMn.has(e.tagName)?a.filter(x=>typeof x!="string"||!HMn.test(x)):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 x=vP({...e,children:[]},t);w={props:x.props,type:x.type}}return{children:i,key:r,node:e,react:_.jsx(w.type,{...w.props,children:m},r),shell:w}}function UMn(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return S0(s,o)}function Jd(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,Au,le(this,Au)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=NT(t)),le(this,Au)+rOn(t,r)}}Au=new WeakMap;const VMn=new Set(["*","**","_","__"]);function NT(e){const n={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;tPm +`,vF={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv",pubmed:"PubMed"},aDn={alphaxiv:nDn,openalex:sDn,biorxiv:rDn,pubmed:iDn};function bF({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":vF[e]},dangerouslySetInnerHTML:{__html:aDn[e]}})}function oDn(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 cDn(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=oDn(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 lDn=["alphaxiv","openalex","biorxiv","pubmed"];function uDn(){const e=Ukn(),{data:n}=ut(e),t=pn({mutationFn:H5n,onSuccess:i=>Vr(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:lDn.map(i=>{const a=n[i];return _.jsxs(vn,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[_.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[_.jsx(bF,{source:i,size:16,decorative:!0}),vF[i]]}),_.jsx(A6n,{checked:a,"aria-hidden":"true"})]},i)})}):_.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:Vet()})}function Zw(e,n){if(!e)throw new Error("Assertion Error")}function j_(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}var IT=Object.prototype.hasOwnProperty;function $T(e,n,t){for(t of e.keys())if(C0(t,n))return t}function C0(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--&&C0(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=$T(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=$T(n,s),!s)||!C0(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(IT.call(e,t)&&++r&&!IT.call(n,t)||!(t in n)||!C0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const _Dn=new Set(["table","tbody","thead","tfoot","tr"]),fDn=/^[\t\n\f\r ]*$/;function dDn(e,n,t={}){const r=yF(e,n??null,{Fragment:_.Fragment,components:t,jsx:_.jsx,jsxs:_.jsxs},void 0);return{react:r.react,state:r}}function yF(e,n,t,r){var k,v,b,y;if(n&&n.key===r&&e===n.node)return n;if(!("children"in e)||!Array.isArray(e.children))return n&&n.key===r&&Zd(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(x=>x.key).filter(x=>x!==void 0));let u=0;for(;u=e.children.length-h&&(j=s.length-(e.children.length-x)),j>=0&&(N=((b=s[j])==null?void 0:b.key)??N);N&&c.has(N)&&((y=s[j])==null?void 0:y.key)!==N;)N=`${N}+`;N&&c.add(N);const A=yF(C,s[j]??null,t,N);i.push(A),A.react!==void 0&&a.push(A.react)}const f=n!==null&&hDn(e,n.node);if(n&&n.key===r&&f&&s.length===i.length&&i.every((x,C)=>x===s[C]))return n;const p=e.type==="element"&&_Dn.has(e.tagName)?a.filter(x=>typeof x!="string"||!fDn.test(x)):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 x=DP({...e,children:[]},t);w={props:x.props,type:x.type}}return{children:i,key:r,node:e,react:_.jsx(w.type,{...w.props,children:m},r),shell:w}}function hDn(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return C0(s,o)}function Zd(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,ju,le(this,ju)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=BT(t)),le(this,ju)+NDn(t,r)}}ju=new WeakMap;const mDn=new Set(["*","**","_","__"]);function BT(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(nOn(n)){zT(n,t,r);continue}const i=YMn(n,e,t);if(i>t){t=i-1;continue}const a=ZMn(n,e,t);if(a>t){t=a-1;continue}bo(e,t)||zT(n,t,r)}return n}function KMn(e,n,t){const r=n[t];return r==="`"?WMn(e,n,t):r==="$"?QMn(e,n,t):r==="~"?XMn(e,n,t):t}function WMn(e,n,t){const r=iC(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&cb(n,t)&&!bo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!bo(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||bo(n,t)?t+r:r>=3&&cb(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function QMn(e,n,t){const r=iC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!bo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||bo(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function XMn(e,n,t){const r=iC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(cb(n,t)&&!bo(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!cb(n,t)||bo(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function YMn(e,n,t){if(n[t]!=="<"||bo(n,t))return t;const r=n[t+1];if(r!==void 0&&!aF(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` -`)return e.pendingHtml=null,s+1;return n.length}function ZMn(e,n,t){const r=JMn(n,t);if(!r)return t;if(bo(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):(eOn(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function JMn(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 eOn(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!TT(s)||!TT(r)}function zT(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 tOn(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 nOn(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function rOn(e,n){n.pendingHtml!==null&&(e=e.slice(0,aOn(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return qo(sOn(e,t));const r=iOn(n);if(r)return qo(Ud(e,r));const s=lOn(n);return s?s.kind==="delim"?qo($5(e,s.start,s.token.length)?sF(e,s.token):e.slice(0,s.start)):$5(e,s.start,s.token.length)?s.kind==="fence"?qo(e):s.kind==="code"?qo(Ud(e,s.token)):s.token==="$$"?qo(Ud(e,(e.endsWith(` +`){CDn(n),n.exclusive||(n.commitIndex=t+1);continue}const s=gDn(n,e,t);if(s>t){t=s-1;continue}if(n.exclusive)continue;if(EDn(n)){PT(n,t,r);continue}const i=xDn(n,e,t);if(i>t){t=i-1;continue}const a=wDn(n,e,t);if(a>t){t=a-1;continue}go(e,t)||PT(n,t,r)}return n}function gDn(e,n,t){const r=n[t];return r==="`"?vDn(e,n,t):r==="$"?bDn(e,n,t):r==="~"?yDn(e,n,t):t}function vDn(e,n,t){const r=vC(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&lb(n,t)&&!go(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!go(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||go(n,t)?t+r:r>=3&&lb(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function bDn(e,n,t){const r=vC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!go(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||go(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function yDn(e,n,t){const r=vC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(lb(n,t)&&!go(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!lb(n,t)||go(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function xDn(e,n,t){if(n[t]!=="<"||go(n,t))return t;const r=n[t+1];if(r!==void 0&&!kF(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` +`)return e.pendingHtml=null,s+1;return n.length}function wDn(e,n,t){const r=kDn(n,t);if(!r)return t;if(go(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):(SDn(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function kDn(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 SDn(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!qT(s)||!qT(r)}function PT(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 CDn(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 EDn(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function NDn(e,n){n.pendingHtml!==null&&(e=e.slice(0,ADn(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return Uo(zDn(e,t));const r=jDn(n);if(r)return Uo(qd(e,r));const s=MDn(n);return s?s.kind==="delim"?Uo(K5(e,s.start,s.token.length)?xF(e,s.token):e.slice(0,s.start)):K5(e,s.start,s.token.length)?s.kind==="fence"?Uo(e):s.kind==="code"?Uo(qd(e,s.token)):s.token==="$$"?Uo(qd(e,(e.endsWith(` `)?"":` -`)+"$$")):/\s/.test(e[e.length-1]??"")?qo(e):qo(Ud(e,"$")):qo(s.kind==="fence"?e:e.slice(0,s.start)):qo(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function sOn(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return $5(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 iOn(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(!VMn.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function aOn(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!oOn(e,s,r))break;t=s,r=s}return t}function oOn(e,n,t){if(e[t-1]!==">"||bo(e,n))return!1;const r=e[n+1];if(r!==void 0&&!aF(r))return!1;for(let s=n+1;s"||i===` -`)return!1}return!0}function qo(e){var v;const n=e.lastIndexOf(` +`)+"$$")):/\s/.test(e[e.length-1]??"")?Uo(e):Uo(qd(e,"$")):Uo(s.kind==="fence"?e:e.slice(0,s.start)):Uo(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function zDn(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return K5(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 jDn(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(!mDn.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function ADn(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!TDn(e,s,r))break;t=s,r=s}return t}function TDn(e,n,t){if(e[t-1]!==">"||go(e,n))return!1;const r=e[n+1];if(r!==void 0&&!kF(r))return!1;for(let s=n+1;s"||i===` +`)return!1}return!0}function Uo(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(jT(a)<2&&!uOn(a,o))return r;const c=a.trimEnd().endsWith("|")?a:sF(a," |"),u=jT(c),h=u<2?0:c.trimEnd().endsWith("|")?u-1:u;if(h===0)return e;const f=i===-1?"":s.slice(i+1),p=AT(o,Array.from({length:h},()=>"-"));if(f.length===0)return r+c+` +`),a=i===-1?s:s.slice(0,i),o=(v=a.match(/^( *)\|/))==null?void 0:v[1];if(o===void 0)return e;if(FT(a)<2&&!ODn(a,o))return r;const c=a.trimEnd().endsWith("|")?a:xF(a," |"),u=FT(c),h=u<2?0:c.trimEnd().endsWith("|")?u-1:u;if(h===0)return e;const f=i===-1?"":s.slice(i+1),p=HT(o,Array.from({length:h},()=>"-"));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(_On(w,o,h))return e;if(w.startsWith(o+"|")&&/^[ |:\-\t]*$/.test(w.slice(o.length))){const b=iF(w,o).map(y=>{const x=y.trim();if(x.length===0)return"-";let C=0;for(let N=0;N1&&x.endsWith(":")?":":"")});for(;b.length{const x=y.trim();if(x.length===0)return"-";let C=0;for(let N=0;N1&&x.endsWith(":")?":":"")});for(;b.length0;t-=1)if(e.endsWith(n.slice(0,t)))return t;return 0}function lOn(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 jT(e){let n=0;for(let t=0;t0}function AT(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function iF(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function _On(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=iF(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function iC(e,n){let t=n+1;for(;tn+t}function cb(e,n){return n===0||e[n-1]===` -`}function bo(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function TT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function aF(e){return!!e&&/[A-Za-z]/.test(e)}const oF=Ny().use(Sy);var xm,xh,wh,ef,kh,wm,km,Sm,tf,Cm,nf;class fOn{constructor(){lt(this,xm,oF);lt(this,xh,null);lt(this,wh,{});lt(this,ef,null);lt(this,kh,"");lt(this,wm,[]);lt(this,km,[]);lt(this,Sm,[]);lt(this,tf,0);lt(this,Cm,[]);lt(this,nf,[])}reconfigure(n,t,r){le(this,xh)!==null&&le(this,xm)===n&&cF(le(this,wh),r)&&!!le(this,ef)===t||(Ge(this,xm,n),n.attachers.some(s=>s[0]===ab)||(n=n(),n.use(ab),n.freeze()),Ge(this,xh,n),Ge(this,wh,r),Ge(this,kh,""),Ge(this,wm,[]),Ge(this,km,[]),Ge(this,Sm,[]),Ge(this,tf,0),Ge(this,Cm,[]),Ge(this,ef,t?new GMn:null))}update(n){le(this,ef)&&(n=le(this,ef).update(n));let t=le(this,kh);if(n===t)return le(this,nf);const r=le(this,wm),s=dOn(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=A_(le(this,xh)),c=le(this,km),u=c.slice(i).some(j=>j.some(B5));let h=o.parse(n.slice(a)),f=h.children.map(j=>A_(A_(j.position).start.offset)+a);Ge(this,kh,n),Ww(r.length===c.length),r.splice(i,r.length-i,...f);{const j=Qw(h,f,a);Ww(j.length===f.length),c.splice(i,c.length-i,...j)}if(u||B5(h)){i=0,a=0,h=o.parse(n),f=h.children.map(A=>A_(A_(A.position).start.offset)+a),r.splice(0,r.length,...f);const j=Qw(h,f,a);Ww(j.length===f.length),c.splice(0,c.length,...j)}const p=Qw(o.runSync(h),f,a),m=le(this,Sm),w=le(this,Cm),k=le(this,nf),v=w.length;let b=null,y=0;for(;yv&&(m.length=w.length=r.length);for(let j=r.length=C?M=v-(r.length-A):A=v){m[A]=String(le(this,tf)),Ge(this,tf,le(this,tf)+1),w[A]=null,b&&(b[A]=void 0);continue}m[A]=m[M]??String(Fp(this,tf)._++),w[A]=w[M]??null,b&&(b[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=h):h&&(u!==void 0&&u>-1&&c.push(` -`.repeat(u)||" "),u=-1,c.push(h))}return c.join("")}function fF(e,n,t){return e.type==="element"?OOn(e,n,t):e.type==="text"?t.whitespace==="normal"?dF(e,t):DOn(e):[]}function OOn(e,n,t){const r=hF(e,t),s=e.children||[];let i=-1,a=[];if(ROn(e))return a;let o,c;for(P5(e)||$T(e)&&OT(n,e,$T)?c=` -`:TOn(e)?(o=2,c=2):_F(e)&&(o=1,c=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var h;i+15e.replace(POn,"-$1").toLowerCase(),HOn={"&":"&",">":">","<":"<",'"':""","'":"'"},qOn=/[&><"']/g,ii=e=>String(e).replace(qOn,n=>HOn[n]),fv=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?fv(e.body[0]):e:e.type==="font"?fv(e.body):e,UOn=new Set(["mathord","textord","atom"]),Sl=e=>UOn.has(fv(e).type),GOn=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"},F5={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 VOn(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 KOn(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return VOn(n)}function WOn(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:KOn(r)}class oC{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(F5)){var r=F5[t];r&&WOn(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 Ze("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=GOn(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class du{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 Jo[QOn[this.id]]}sub(){return Jo[XOn[this.id]]}fracNum(){return Jo[YOn[this.id]]}fracDen(){return Jo[ZOn[this.id]]}cramp(){return Jo[JOn[this.id]]}text(){return Jo[eDn[this.id]]}isTight(){return this.size>=2}}var cC=0,lb=1,eh=2,ml=3,X0=4,qa=5,Lh=6,bi=7,Jo=[new du(cC,0,!1),new du(lb,0,!0),new du(eh,1,!1),new du(ml,1,!0),new du(X0,2,!1),new du(qa,2,!0),new du(Lh,3,!1),new du(bi,3,!0)],QOn=[X0,qa,X0,qa,Lh,bi,Lh,bi],XOn=[qa,qa,qa,qa,bi,bi,bi,bi],YOn=[eh,ml,X0,qa,Lh,bi,Lh,bi],ZOn=[ml,ml,qa,qa,bi,bi,bi,bi],JOn=[lb,lb,ml,ml,qa,qa,bi,bi],eDn=[cC,lb,eh,ml,eh,ml,eh,ml],tn={DISPLAY:Jo[cC],TEXT:Jo[eh],SCRIPT:Jo[X0],SCRIPTSCRIPT:Jo[Lh]},H5=[{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 tDn(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var dv=[];H5.forEach(e=>e.blocks.forEach(n=>dv.push(...n)));function pF(e){for(var n=0;n=dv[n]&&e<=dv[n+1])return!0;return!1}var ks=e=>e+" "+e,jd=80,nDn=function(n,t){return"M95,"+(622+n+t)+` +`+f}function qd(e,n){return e+n.slice(RDn(e,n))}function xF(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return qd(e,n);const r=e.slice(0,-t.length);return qd(r,n)+t}function RDn(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 MDn(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 FT(e){let n=0;for(let t=0;t0}function HT(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function wF(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function DDn(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=wF(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function vC(e,n){let t=n+1;for(;tn+t}function lb(e,n){return n===0||e[n-1]===` +`}function go(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function qT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function kF(e){return!!e&&/[A-Za-z]/.test(e)}const SF=Ty().use(zy);var xm,xh,wh,J_,kh,wm,km,Sm,ef,Cm,tf;class LDn{constructor(){lt(this,xm,SF);lt(this,xh,null);lt(this,wh,{});lt(this,J_,null);lt(this,kh,"");lt(this,wm,[]);lt(this,km,[]);lt(this,Sm,[]);lt(this,ef,0);lt(this,Cm,[]);lt(this,tf,[])}reconfigure(n,t,r){le(this,xh)!==null&&le(this,xm)===n&&CF(le(this,wh),r)&&!!le(this,J_)===t||(Ge(this,xm,n),n.attachers.some(s=>s[0]===ob)||(n=n(),n.use(ob),n.freeze()),Ge(this,xh,n),Ge(this,wh,r),Ge(this,kh,""),Ge(this,wm,[]),Ge(this,km,[]),Ge(this,Sm,[]),Ge(this,ef,0),Ge(this,Cm,[]),Ge(this,J_,t?new pDn:null))}update(n){le(this,J_)&&(n=le(this,J_).update(n));let t=le(this,kh);if(n===t)return le(this,tf);const r=le(this,wm),s=IDn(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=j_(le(this,xh)),c=le(this,km),u=c.slice(i).some(j=>j.some(V5));let h=o.parse(n.slice(a)),f=h.children.map(j=>j_(j_(j.position).start.offset)+a);Ge(this,kh,n),Zw(r.length===c.length),r.splice(i,r.length-i,...f);{const j=Jw(h,f,a);Zw(j.length===f.length),c.splice(i,c.length-i,...j)}if(u||V5(h)){i=0,a=0,h=o.parse(n),f=h.children.map(A=>j_(j_(A.position).start.offset)+a),r.splice(0,r.length,...f);const j=Jw(h,f,a);Zw(j.length===f.length),c.splice(0,c.length,...j)}const p=Jw(o.runSync(h),f,a),m=le(this,Sm),w=le(this,Cm),k=le(this,tf),v=w.length;let b=null,y=0;for(;yv&&(m.length=w.length=r.length);for(let j=r.length=C?M=v-(r.length-A):A=v){m[A]=String(le(this,ef)),Ge(this,ef,le(this,ef)+1),w[A]=null,b&&(b[A]=void 0);continue}m[A]=m[M]??String(Hp(this,ef)._++),w[A]=w[M]??null,b&&(b[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=h):h&&(u!==void 0&&u>-1&&c.push(` +`.repeat(u)||" "),u=-1,c.push(h))}return c.join("")}function jF(e,n,t){return e.type==="element"?sLn(e,n,t):e.type==="text"?t.whitespace==="normal"?AF(e,t):iLn(e):[]}function sLn(e,n,t){const r=TF(e,t),s=e.children||[];let i=-1,a=[];if(nLn(e))return a;let o,c;for(W5(e)||XT(e)&&KT(n,e,XT)?c=` +`:tLn(e)?(o=2,c=2):zF(e)&&(o=1,c=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var h;i+15e.replace(uLn,"-$1").toLowerCase(),fLn={"&":"&",">":">","<":"<",'"':""","'":"'"},dLn=/[&><"']/g,ri=e=>String(e).replace(dLn,n=>fLn[n]),fv=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?fv(e.body[0]):e:e.type==="font"?fv(e.body):e,hLn=new Set(["mathord","textord","atom"]),El=e=>hLn.has(fv(e).type),pLn=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"},Q5={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 mLn(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 gLn(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return mLn(n)}function vLn(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:gLn(r)}class yC{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(Q5)){var r=Q5[t];r&&vLn(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 Je("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=pLn(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class fu{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 ec[bLn[this.id]]}sub(){return ec[yLn[this.id]]}fracNum(){return ec[xLn[this.id]]}fracDen(){return ec[wLn[this.id]]}cramp(){return ec[kLn[this.id]]}text(){return ec[SLn[this.id]]}isTight(){return this.size>=2}}var xC=0,ub=1,Jd=2,gl=3,Y0=4,qa=5,Lh=6,vi=7,ec=[new fu(xC,0,!1),new fu(ub,0,!0),new fu(Jd,1,!1),new fu(gl,1,!0),new fu(Y0,2,!1),new fu(qa,2,!0),new fu(Lh,3,!1),new fu(vi,3,!0)],bLn=[Y0,qa,Y0,qa,Lh,vi,Lh,vi],yLn=[qa,qa,qa,qa,vi,vi,vi,vi],xLn=[Jd,gl,Y0,qa,Lh,vi,Lh,vi],wLn=[gl,gl,qa,qa,vi,vi,vi,vi],kLn=[ub,ub,gl,gl,qa,qa,vi,vi],SLn=[xC,ub,Jd,gl,Jd,gl,Jd,gl],nn={DISPLAY:ec[xC],TEXT:ec[Jd],SCRIPT:ec[Y0],SCRIPTSCRIPT:ec[Lh]},X5=[{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 CLn(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var dv=[];X5.forEach(e=>e.blocks.forEach(n=>dv.push(...n)));function RF(e){for(var n=0;n=dv[n]&&e<=dv[n+1])return!0;return!1}var Es=e=>e+" "+e,zd=80,ELn=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 @@ -782,7 +782,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"},rDn=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"},NLn=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+` @@ -792,7 +792,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"},sDn=function(n,t){return"M983 "+(10+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},zLn=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 @@ -801,7 +801,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"},iDn=function(n,t){return"M424,"+(2398+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},jLn=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 @@ -811,18 +811,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"},aDn=function(n,t){return"M473,"+(2713+n+t)+` +h400000v`+(40+n)+"h-400000z"},ALn=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"},oDn=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},cDn=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"},TLn=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},RLn=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"},lDn=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=nDn(t,jd);break;case"sqrtSize1":s=rDn(t,jd);break;case"sqrtSize2":s=sDn(t,jd);break;case"sqrtSize3":s=iDn(t,jd);break;case"sqrtSize4":s=aDn(t,jd);break;case"sqrtTall":s=cDn(t,jd,r)}return s},uDn=function(n,t){switch(n){case"⎜":return ks("M291 0 H417 V"+t+" H291z");case"∣":return ks("M145 0 H188 V"+t+" H145z");case"∥":return ks("M145 0 H188 V"+t+" H145z")+ks("M367 0 H410 V"+t+" H367z");case"⎟":return ks("M457 0 H583 V"+t+" H457z");case"⎢":return ks("M319 0 H403 V"+t+" H319z");case"⎥":return ks("M263 0 H347 V"+t+" H263z");case"⎪":return ks("M384 0 H504 V"+t+" H384z");case"⏐":return ks("M312 0 H355 V"+t+" H312z");case"‖":return ks("M257 0 H300 V"+t+" H257z")+ks("M478 0 H521 V"+t+" H478z");default:return""}},BT={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+t+"H400000v"+(40+n)+"H742z"},MLn=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=ELn(t,zd);break;case"sqrtSize1":s=NLn(t,zd);break;case"sqrtSize2":s=zLn(t,zd);break;case"sqrtSize3":s=jLn(t,zd);break;case"sqrtSize4":s=ALn(t,zd);break;case"sqrtTall":s=RLn(t,zd,r)}return s},OLn=function(n,t){switch(n){case"⎜":return Es("M291 0 H417 V"+t+" H291z");case"∣":return Es("M145 0 H188 V"+t+" H145z");case"∥":return Es("M145 0 H188 V"+t+" H145z")+Es("M367 0 H410 V"+t+" H367z");case"⎟":return Es("M457 0 H583 V"+t+" H457z");case"⎢":return Es("M319 0 H403 V"+t+" H319z");case"⎥":return Es("M263 0 H347 V"+t+" H263z");case"⎪":return Es("M384 0 H504 V"+t+" H384z");case"⏐":return Es("M312 0 H355 V"+t+" H312z");case"‖":return Es("M257 0 H300 V"+t+" H257z")+Es("M478 0 H521 V"+t+" H478z");default:return""}},YT={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 @@ -868,10 +868,10 @@ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:ks("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:ks("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:ks("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:ks("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Es("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Es("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Es("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Es("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:ks("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Es("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 @@ -920,7 +920,7 @@ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:ks("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:ks("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:ks("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Es("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Es("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Es("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 @@ -993,7 +993,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`},_Dn=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`},DLn=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 @@ -1021,70 +1021,70 @@ 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 fDn(e){return"toText"in e}class np{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(fDn(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var q5={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},dDn={ex:!0,em:!0,mu:!0},mF=function(n){return typeof n!="string"&&(n=n.unit),n in q5||n in dDn||n==="ex"},$r=function(n,t){var r;if(n.unit in q5)r=q5[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 Ze("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},it=function(n){return+n.toFixed(4)+"em"},Uu=function(n){return n.filter(t=>t).join(" ")},lC=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=FOn(r)+":"+s+";")}return t},gF=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)}},vF=function(n){var t=document.createElement(n);t.className=Uu(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]/,bF=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+ii(Uu(this.classes))+'"');var r=lC(this.style);r&&(t+=' style="'+ii(r)+'"');for(var s of Object.keys(this.attributes)){if(hDn.test(s))throw new Ze("Invalid attribute name '"+s+"'");t+=" "+s+'="'+ii(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class rp{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,gF.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return vF.call(this,"span")}toMarkup(){return bF.call(this,"span")}}class zy{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,gF.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 vF.call(this,"a")}toMarkup(){return bF.call(this,"a")}}class pDn{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=''+ii(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=it(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=Uu(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:"+it(this.italic)+";"),r+=lC(this.style),r&&(n=!0,t+=' style="'+ii(r)+'"');var s=ii(this.text);return n?(t+=">",t+=s,t+="",t):s}}class yl{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 U5{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 bDn=e=>e instanceof rp||e instanceof zy||e instanceof np,tc={"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]}},N1={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]},PT={Å:"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 yDn(e,n){tc[e]=n}function uC(e,n,t){if(!tc[n])throw new Error("Font metrics not found for font: "+n+".");var r=e.charCodeAt(0),s=tc[n][r];if(!s&&e[0]in PT&&(r=PT[e[0]].charCodeAt(0),s=tc[n][r]),!s&&t==="text"&&pF(r)&&(s=tc[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var Yw={};function xDn(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!Yw[n]){var t=Yw[n]={cssEmPerMu:N1.quad[n]/18};for(var r in N1)N1.hasOwnProperty(r)&&(t[r]=N1[r][n])}return Yw[n]}var Nr={math:{},text:{}};function P(e,n,t,r,s,i){Nr[e][s]={font:n,group:t,replace:r},i&&r&&(Nr[e][r]=Nr[e][s])}var W="math",Ve="text",ee="main",fe="ams",jr="accent-token",mt="bin",ki="close",sp="inner",Gt="mathord",fs="op-token",Ca="open",Vm="punct",de="rel",Cl="spacing",ye="textord";P(W,ee,de,"≡","\\equiv",!0);P(W,ee,de,"≺","\\prec",!0);P(W,ee,de,"≻","\\succ",!0);P(W,ee,de,"∼","\\sim",!0);P(W,ee,de,"⊥","\\perp");P(W,ee,de,"⪯","\\preceq",!0);P(W,ee,de,"⪰","\\succeq",!0);P(W,ee,de,"≃","\\simeq",!0);P(W,ee,de,"∣","\\mid",!0);P(W,ee,de,"≪","\\ll",!0);P(W,ee,de,"≫","\\gg",!0);P(W,ee,de,"≍","\\asymp",!0);P(W,ee,de,"∥","\\parallel");P(W,ee,de,"⋈","\\bowtie",!0);P(W,ee,de,"⌣","\\smile",!0);P(W,ee,de,"⊑","\\sqsubseteq",!0);P(W,ee,de,"⊒","\\sqsupseteq",!0);P(W,ee,de,"≐","\\doteq",!0);P(W,ee,de,"⌢","\\frown",!0);P(W,ee,de,"∋","\\ni",!0);P(W,ee,de,"∝","\\propto",!0);P(W,ee,de,"⊢","\\vdash",!0);P(W,ee,de,"⊣","\\dashv",!0);P(W,ee,de,"∋","\\owns");P(W,ee,Vm,".","\\ldotp");P(W,ee,Vm,"⋅","\\cdotp");P(W,ee,Vm,"⋅","·");P(Ve,ee,ye,"⋅","·");P(W,ee,ye,"#","\\#");P(Ve,ee,ye,"#","\\#");P(W,ee,ye,"&","\\&");P(Ve,ee,ye,"&","\\&");P(W,ee,ye,"ℵ","\\aleph",!0);P(W,ee,ye,"∀","\\forall",!0);P(W,ee,ye,"ℏ","\\hbar",!0);P(W,ee,ye,"∃","\\exists",!0);P(W,ee,ye,"∇","\\nabla",!0);P(W,ee,ye,"♭","\\flat",!0);P(W,ee,ye,"ℓ","\\ell",!0);P(W,ee,ye,"♮","\\natural",!0);P(W,ee,ye,"♣","\\clubsuit",!0);P(W,ee,ye,"℘","\\wp",!0);P(W,ee,ye,"♯","\\sharp",!0);P(W,ee,ye,"♢","\\diamondsuit",!0);P(W,ee,ye,"ℜ","\\Re",!0);P(W,ee,ye,"♡","\\heartsuit",!0);P(W,ee,ye,"ℑ","\\Im",!0);P(W,ee,ye,"♠","\\spadesuit",!0);P(W,ee,ye,"§","\\S",!0);P(Ve,ee,ye,"§","\\S");P(W,ee,ye,"¶","\\P",!0);P(Ve,ee,ye,"¶","\\P");P(W,ee,ye,"†","\\dag");P(Ve,ee,ye,"†","\\dag");P(Ve,ee,ye,"†","\\textdagger");P(W,ee,ye,"‡","\\ddag");P(Ve,ee,ye,"‡","\\ddag");P(Ve,ee,ye,"‡","\\textdaggerdbl");P(W,ee,ki,"⎱","\\rmoustache",!0);P(W,ee,Ca,"⎰","\\lmoustache",!0);P(W,ee,ki,"⟯","\\rgroup",!0);P(W,ee,Ca,"⟮","\\lgroup",!0);P(W,ee,mt,"∓","\\mp",!0);P(W,ee,mt,"⊖","\\ominus",!0);P(W,ee,mt,"⊎","\\uplus",!0);P(W,ee,mt,"⊓","\\sqcap",!0);P(W,ee,mt,"∗","\\ast");P(W,ee,mt,"⊔","\\sqcup",!0);P(W,ee,mt,"◯","\\bigcirc",!0);P(W,ee,mt,"∙","\\bullet",!0);P(W,ee,mt,"‡","\\ddagger");P(W,ee,mt,"≀","\\wr",!0);P(W,ee,mt,"⨿","\\amalg");P(W,ee,mt,"&","\\And");P(W,ee,de,"⟵","\\longleftarrow",!0);P(W,ee,de,"⇐","\\Leftarrow",!0);P(W,ee,de,"⟸","\\Longleftarrow",!0);P(W,ee,de,"⟶","\\longrightarrow",!0);P(W,ee,de,"⇒","\\Rightarrow",!0);P(W,ee,de,"⟹","\\Longrightarrow",!0);P(W,ee,de,"↔","\\leftrightarrow",!0);P(W,ee,de,"⟷","\\longleftrightarrow",!0);P(W,ee,de,"⇔","\\Leftrightarrow",!0);P(W,ee,de,"⟺","\\Longleftrightarrow",!0);P(W,ee,de,"↦","\\mapsto",!0);P(W,ee,de,"⟼","\\longmapsto",!0);P(W,ee,de,"↗","\\nearrow",!0);P(W,ee,de,"↩","\\hookleftarrow",!0);P(W,ee,de,"↪","\\hookrightarrow",!0);P(W,ee,de,"↘","\\searrow",!0);P(W,ee,de,"↼","\\leftharpoonup",!0);P(W,ee,de,"⇀","\\rightharpoonup",!0);P(W,ee,de,"↙","\\swarrow",!0);P(W,ee,de,"↽","\\leftharpoondown",!0);P(W,ee,de,"⇁","\\rightharpoondown",!0);P(W,ee,de,"↖","\\nwarrow",!0);P(W,ee,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(Ve,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(Ve,ee,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(Ve,fe,ye,"¥","\\yen",!0);P(W,fe,ye,"✓","\\checkmark",!0);P(Ve,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,Ca,"┌","\\@ulcorner",!0);P(W,fe,ki,"┐","\\@urcorner",!0);P(W,fe,Ca,"└","\\@llcorner",!0);P(W,fe,ki,"┘","\\@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,ee,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,ee,de,"⊶","\\origof",!0);P(W,ee,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,ee,ye,"‘","`");P(W,ee,ye,"$","\\$");P(Ve,ee,ye,"$","\\$");P(Ve,ee,ye,"$","\\textdollar");P(W,ee,ye,"%","\\%");P(Ve,ee,ye,"%","\\%");P(W,ee,ye,"_","\\_");P(Ve,ee,ye,"_","\\_");P(Ve,ee,ye,"_","\\textunderscore");P(W,ee,ye,"∠","\\angle",!0);P(W,ee,ye,"∞","\\infty",!0);P(W,ee,ye,"′","\\prime");P(W,ee,ye,"△","\\triangle");P(W,ee,ye,"Γ","\\Gamma",!0);P(W,ee,ye,"Δ","\\Delta",!0);P(W,ee,ye,"Θ","\\Theta",!0);P(W,ee,ye,"Λ","\\Lambda",!0);P(W,ee,ye,"Ξ","\\Xi",!0);P(W,ee,ye,"Π","\\Pi",!0);P(W,ee,ye,"Σ","\\Sigma",!0);P(W,ee,ye,"Υ","\\Upsilon",!0);P(W,ee,ye,"Φ","\\Phi",!0);P(W,ee,ye,"Ψ","\\Psi",!0);P(W,ee,ye,"Ω","\\Omega",!0);P(W,ee,ye,"A","Α");P(W,ee,ye,"B","Β");P(W,ee,ye,"E","Ε");P(W,ee,ye,"Z","Ζ");P(W,ee,ye,"H","Η");P(W,ee,ye,"I","Ι");P(W,ee,ye,"K","Κ");P(W,ee,ye,"M","Μ");P(W,ee,ye,"N","Ν");P(W,ee,ye,"O","Ο");P(W,ee,ye,"P","Ρ");P(W,ee,ye,"T","Τ");P(W,ee,ye,"X","Χ");P(W,ee,ye,"¬","\\neg",!0);P(W,ee,ye,"¬","\\lnot");P(W,ee,ye,"⊤","\\top");P(W,ee,ye,"⊥","\\bot");P(W,ee,ye,"∅","\\emptyset");P(W,fe,ye,"∅","\\varnothing");P(W,ee,Gt,"α","\\alpha",!0);P(W,ee,Gt,"β","\\beta",!0);P(W,ee,Gt,"γ","\\gamma",!0);P(W,ee,Gt,"δ","\\delta",!0);P(W,ee,Gt,"ϵ","\\epsilon",!0);P(W,ee,Gt,"ζ","\\zeta",!0);P(W,ee,Gt,"η","\\eta",!0);P(W,ee,Gt,"θ","\\theta",!0);P(W,ee,Gt,"ι","\\iota",!0);P(W,ee,Gt,"κ","\\kappa",!0);P(W,ee,Gt,"λ","\\lambda",!0);P(W,ee,Gt,"μ","\\mu",!0);P(W,ee,Gt,"ν","\\nu",!0);P(W,ee,Gt,"ξ","\\xi",!0);P(W,ee,Gt,"ο","\\omicron",!0);P(W,ee,Gt,"π","\\pi",!0);P(W,ee,Gt,"ρ","\\rho",!0);P(W,ee,Gt,"σ","\\sigma",!0);P(W,ee,Gt,"τ","\\tau",!0);P(W,ee,Gt,"υ","\\upsilon",!0);P(W,ee,Gt,"ϕ","\\phi",!0);P(W,ee,Gt,"χ","\\chi",!0);P(W,ee,Gt,"ψ","\\psi",!0);P(W,ee,Gt,"ω","\\omega",!0);P(W,ee,Gt,"ε","\\varepsilon",!0);P(W,ee,Gt,"ϑ","\\vartheta",!0);P(W,ee,Gt,"ϖ","\\varpi",!0);P(W,ee,Gt,"ϱ","\\varrho",!0);P(W,ee,Gt,"ς","\\varsigma",!0);P(W,ee,Gt,"φ","\\varphi",!0);P(W,ee,mt,"∗","*",!0);P(W,ee,mt,"+","+");P(W,ee,mt,"−","-",!0);P(W,ee,mt,"⋅","\\cdot",!0);P(W,ee,mt,"∘","\\circ",!0);P(W,ee,mt,"÷","\\div",!0);P(W,ee,mt,"±","\\pm",!0);P(W,ee,mt,"×","\\times",!0);P(W,ee,mt,"∩","\\cap",!0);P(W,ee,mt,"∪","\\cup",!0);P(W,ee,mt,"∖","\\setminus",!0);P(W,ee,mt,"∧","\\land");P(W,ee,mt,"∨","\\lor");P(W,ee,mt,"∧","\\wedge",!0);P(W,ee,mt,"∨","\\vee",!0);P(W,ee,ye,"√","\\surd");P(W,ee,Ca,"⟨","\\langle",!0);P(W,ee,Ca,"∣","\\lvert");P(W,ee,Ca,"∥","\\lVert");P(W,ee,ki,"?","?");P(W,ee,ki,"!","!");P(W,ee,ki,"⟩","\\rangle",!0);P(W,ee,ki,"∣","\\rvert");P(W,ee,ki,"∥","\\rVert");P(W,ee,de,"=","=");P(W,ee,de,":",":");P(W,ee,de,"≈","\\approx",!0);P(W,ee,de,"≅","\\cong",!0);P(W,ee,de,"≥","\\ge");P(W,ee,de,"≥","\\geq",!0);P(W,ee,de,"←","\\gets");P(W,ee,de,">","\\gt",!0);P(W,ee,de,"∈","\\in",!0);P(W,ee,de,"","\\@not");P(W,ee,de,"⊂","\\subset",!0);P(W,ee,de,"⊃","\\supset",!0);P(W,ee,de,"⊆","\\subseteq",!0);P(W,ee,de,"⊇","\\supseteq",!0);P(W,fe,de,"⊈","\\nsubseteq",!0);P(W,fe,de,"⊉","\\nsupseteq",!0);P(W,ee,de,"⊨","\\models");P(W,ee,de,"←","\\leftarrow",!0);P(W,ee,de,"≤","\\le");P(W,ee,de,"≤","\\leq",!0);P(W,ee,de,"<","\\lt",!0);P(W,ee,de,"→","\\rightarrow",!0);P(W,ee,de,"→","\\to");P(W,fe,de,"≱","\\ngeq",!0);P(W,fe,de,"≰","\\nleq",!0);P(W,ee,Cl," ","\\ ");P(W,ee,Cl," ","\\space");P(W,ee,Cl," ","\\nobreakspace");P(Ve,ee,Cl," ","\\ ");P(Ve,ee,Cl," "," ");P(Ve,ee,Cl," ","\\space");P(Ve,ee,Cl," ","\\nobreakspace");P(W,ee,Cl,"","\\nobreak");P(W,ee,Cl,"","\\allowbreak");P(W,ee,Vm,",",",");P(W,ee,Vm,";",";");P(W,fe,mt,"⊼","\\barwedge",!0);P(W,fe,mt,"⊻","\\veebar",!0);P(W,ee,mt,"⊙","\\odot",!0);P(W,ee,mt,"⊕","\\oplus",!0);P(W,ee,mt,"⊗","\\otimes",!0);P(W,ee,ye,"∂","\\partial",!0);P(W,ee,mt,"⊘","\\oslash",!0);P(W,fe,mt,"⊚","\\circledcirc",!0);P(W,fe,mt,"⊡","\\boxdot",!0);P(W,ee,mt,"△","\\bigtriangleup");P(W,ee,mt,"▽","\\bigtriangledown");P(W,ee,mt,"†","\\dagger");P(W,ee,mt,"⋄","\\diamond");P(W,ee,mt,"⋆","\\star");P(W,ee,mt,"◃","\\triangleleft");P(W,ee,mt,"▹","\\triangleright");P(W,ee,Ca,"{","\\{");P(Ve,ee,ye,"{","\\{");P(Ve,ee,ye,"{","\\textbraceleft");P(W,ee,ki,"}","\\}");P(Ve,ee,ye,"}","\\}");P(Ve,ee,ye,"}","\\textbraceright");P(W,ee,Ca,"{","\\lbrace");P(W,ee,ki,"}","\\rbrace");P(W,ee,Ca,"[","\\lbrack",!0);P(Ve,ee,ye,"[","\\lbrack",!0);P(W,ee,ki,"]","\\rbrack",!0);P(Ve,ee,ye,"]","\\rbrack",!0);P(W,ee,Ca,"(","\\lparen",!0);P(W,ee,ki,")","\\rparen",!0);P(Ve,ee,ye,"<","\\textless",!0);P(Ve,ee,ye,">","\\textgreater",!0);P(W,ee,Ca,"⌊","\\lfloor",!0);P(W,ee,ki,"⌋","\\rfloor",!0);P(W,ee,Ca,"⌈","\\lceil",!0);P(W,ee,ki,"⌉","\\rceil",!0);P(W,ee,ye,"\\","\\backslash");P(W,ee,ye,"∣","|");P(W,ee,ye,"∣","\\vert");P(Ve,ee,ye,"|","\\textbar",!0);P(W,ee,ye,"∥","\\|");P(W,ee,ye,"∥","\\Vert");P(Ve,ee,ye,"∥","\\textbardbl");P(Ve,ee,ye,"~","\\textasciitilde");P(Ve,ee,ye,"\\","\\textbackslash");P(Ve,ee,ye,"^","\\textasciicircum");P(W,ee,de,"↑","\\uparrow",!0);P(W,ee,de,"⇑","\\Uparrow",!0);P(W,ee,de,"↓","\\downarrow",!0);P(W,ee,de,"⇓","\\Downarrow",!0);P(W,ee,de,"↕","\\updownarrow",!0);P(W,ee,de,"⇕","\\Updownarrow",!0);P(W,ee,fs,"∐","\\coprod");P(W,ee,fs,"⋁","\\bigvee");P(W,ee,fs,"⋀","\\bigwedge");P(W,ee,fs,"⨄","\\biguplus");P(W,ee,fs,"⋂","\\bigcap");P(W,ee,fs,"⋃","\\bigcup");P(W,ee,fs,"∫","\\int");P(W,ee,fs,"∫","\\intop");P(W,ee,fs,"∬","\\iint");P(W,ee,fs,"∭","\\iiint");P(W,ee,fs,"∏","\\prod");P(W,ee,fs,"∑","\\sum");P(W,ee,fs,"⨂","\\bigotimes");P(W,ee,fs,"⨁","\\bigoplus");P(W,ee,fs,"⨀","\\bigodot");P(W,ee,fs,"∮","\\oint");P(W,ee,fs,"∯","\\oiint");P(W,ee,fs,"∰","\\oiiint");P(W,ee,fs,"⨆","\\bigsqcup");P(W,ee,fs,"∫","\\smallint");P(Ve,ee,sp,"…","\\textellipsis");P(W,ee,sp,"…","\\mathellipsis");P(Ve,ee,sp,"…","\\ldots",!0);P(W,ee,sp,"…","\\ldots",!0);P(W,ee,sp,"⋯","\\@cdots",!0);P(W,ee,sp,"⋱","\\ddots",!0);P(W,ee,ye,"⋮","\\varvdots");P(Ve,ee,ye,"⋮","\\varvdots");P(W,ee,jr,"ˊ","\\acute");P(W,ee,jr,"ˋ","\\grave");P(W,ee,jr,"¨","\\ddot");P(W,ee,jr,"~","\\tilde");P(W,ee,jr,"ˉ","\\bar");P(W,ee,jr,"˘","\\breve");P(W,ee,jr,"ˇ","\\check");P(W,ee,jr,"^","\\hat");P(W,ee,jr,"⃗","\\vec");P(W,ee,jr,"˙","\\dot");P(W,ee,jr,"˚","\\mathring");P(W,ee,Gt,"","\\@imath");P(W,ee,Gt,"","\\@jmath");P(W,ee,ye,"ı","ı");P(W,ee,ye,"ȷ","ȷ");P(Ve,ee,ye,"ı","\\i",!0);P(Ve,ee,ye,"ȷ","\\j",!0);P(Ve,ee,ye,"ß","\\ss",!0);P(Ve,ee,ye,"æ","\\ae",!0);P(Ve,ee,ye,"œ","\\oe",!0);P(Ve,ee,ye,"ø","\\o",!0);P(Ve,ee,ye,"Æ","\\AE",!0);P(Ve,ee,ye,"Œ","\\OE",!0);P(Ve,ee,ye,"Ø","\\O",!0);P(Ve,ee,jr,"ˊ","\\'");P(Ve,ee,jr,"ˋ","\\`");P(Ve,ee,jr,"ˆ","\\^");P(Ve,ee,jr,"˜","\\~");P(Ve,ee,jr,"ˉ","\\=");P(Ve,ee,jr,"˘","\\u");P(Ve,ee,jr,"˙","\\.");P(Ve,ee,jr,"¸","\\c");P(Ve,ee,jr,"˚","\\r");P(Ve,ee,jr,"ˇ","\\v");P(Ve,ee,jr,"¨",'\\"');P(Ve,ee,jr,"˝","\\H");P(Ve,ee,jr,"◯","\\textcircled");var yF={"--":!0,"---":!0,"``":!0,"''":!0};P(Ve,ee,ye,"–","--",!0);P(Ve,ee,ye,"–","\\textendash");P(Ve,ee,ye,"—","---",!0);P(Ve,ee,ye,"—","\\textemdash");P(Ve,ee,ye,"‘","`",!0);P(Ve,ee,ye,"‘","\\textquoteleft");P(Ve,ee,ye,"’","'",!0);P(Ve,ee,ye,"’","\\textquoteright");P(Ve,ee,ye,"“","``",!0);P(Ve,ee,ye,"“","\\textquotedblleft");P(Ve,ee,ye,"”","''",!0);P(Ve,ee,ye,"”","\\textquotedblright");P(W,ee,ye,"°","\\degree",!0);P(Ve,ee,ye,"°","\\degree");P(Ve,ee,ye,"°","\\textdegree",!0);P(W,ee,ye,"£","\\pounds");P(W,ee,ye,"£","\\mathsterling",!0);P(Ve,ee,ye,"£","\\pounds");P(Ve,ee,ye,"£","\\textsterling",!0);P(W,fe,ye,"✠","\\maltese");P(Ve,fe,ye,"✠","\\maltese");var FT='0123456789/@."';for(var Zw=0;Zw{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 YT[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return kDn[i]}else{if(r===120485||r===120486)return YT[0];if(120486{if(Uu(e.classes)!==Uu(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},xF=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},Qe=function(n,t,r,s){var i=new rp(n,t,r,s);return fC(i),i},Vu=(e,n,t,r)=>new rp(e,n,t,r),Ih=function(n,t,r){var s=Qe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=it(s.height),s.maxFontSize=1,s},NDn=function(n,t,r,s){var i=new zy(n,t,r,s);return fC(i),i},El=function(n){var t=new np(n);return fC(t),t},$h=function(n,t){return n instanceof np?Qe([],[n],t):n},zDn=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=Qe(["mspace"],[],n),r=$r(e,n);return t.style.marginRight=it(r),t},A1=(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},X5={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"}},kF={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},SF=function(n,t){var[r,s,i]=kF[n],a=new Gu(r),o=new yl([a],{width:it(s),height:it(i),style:"width:"+it(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=Vu(["overlay"],[o],t);return c.height=i,c.style.height=it(i),c.style.width=it(s),c},Lr={number:3,unit:"mu"},R_={number:4,unit:"mu"},Zc={number:5,unit:"mu"},jDn={mord:{mop:Lr,mbin:R_,mrel:Zc,minner:Lr},mop:{mord:Lr,mop:Lr,mrel:Zc,minner:Lr},mbin:{mord:R_,mop:R_,mopen:R_,minner:R_},mrel:{mord:Zc,mop:Zc,mopen:Zc,minner:Zc},mopen:{},mclose:{mop:Lr,mbin:R_,mrel:Zc,minner:Lr},mpunct:{mord:Lr,mop:Lr,mrel:Zc,mopen:Lr,mclose:Lr,mpunct:Lr,minner:Lr},minner:{mord:Lr,mop:Lr,mbin:R_,mrel:Zc,mopen:Lr,mpunct:Lr,minner:Lr}},ADn={mord:{mop:Lr},mop:{mord:Lr,mop:Lr},mbin:{},mrel:{},mopen:{},mclose:{mop:Lr},mpunct:{},minner:{mop:Lr}},CF={},_b={},fb={};function dt(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],b=w.classes[0];v==="mbin"&&RDn.has(b)?k.classes[0]="mord":b==="mbin"&&TDn.has(v)&&(w.classes[0]="mord")},{node:f},p,m),Y5(i,(w,k)=>{var v,b,y=J5(k),x=J5(w),C=y&&x?w.hasClass("mtight")?(v=ADn[y])==null?void 0:v[x]:(b=jDn[y])==null?void 0:b[x]:null;if(C)return wF(C,u)},{node:f},p,m),i},Y5=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()},EF=function(n){return n instanceof np||n instanceof zy||n instanceof rp&&n.hasClass("enclosing")?n:null},Z5=function(n,t){var r=EF(n);if(r){var s=r.children;if(s.length){if(t==="right")return Z5(s[s.length-1],"right");if(t==="left")return Z5(s[0],"left")}}return n},J5=function(n,t){if(!n)return null;t&&(n=Z5(n,t));var r=n.classes[0];return ODn[r]||null},Y0=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Qe(t.concat(r))},nr=function(n,t,r){if(!n)return Qe();if(_b[n.type]){var s=_b[n.type](n,t);if(r&&t.size!==r.size){s=Qe(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new Ze("Got group of unknown type: '"+n.type+"'")};function T1(e,n){var t=Qe(["base"],e,n),r=Qe(["strut"]);return r.style.height=it(t.height+t.depth),t.depth&&(r.style.verticalAlign=it(-t.depth)),t.children.unshift(r),t}function ek(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=Cs(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(T1(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(T1(a,n));var u;t?(u=T1(Cs(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var h=Qe(["katex-html"],i);if(h.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=it(h.height+h.depth),h.depth&&(f.style.verticalAlign=it(-h.depth))}return h}function NF(e){return new np(e)}class Je{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=Uu(this.classes));for(var r=0;r0&&(n+=' class ="'+ii(Uu(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class _s{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return ii(this.toText())}toText(){return this.text}}class zF{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",it(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var DDn=new Set(["\\imath","\\jmath"]),LDn=new Set(["mrow","mtable"]),Va=function(n,t,r){return Nr[t][n]&&Nr[t][n].replace&&n.charCodeAt(0)!==55349&&!(yF.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Nr[t][n].replace),new _s(n)},dC=function(n){return n.length===1?n[0]:new Je("mrow",n)},IDn={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"},hC=(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=IDn[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(DDn.has(i))return null;if(Nr[r][i]){var a=Nr[r][i].replace;a&&(i=a)}var o=X5[t].fontName;return uC(i,o,r)?X5[t].variant:null};function n4(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof _s&&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 _s&&t.text===","}else return!1}var Ea=function(n,t,r){if(n.length===1){var s=xr(n[0],t);return r&&s instanceof Je&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||n4(a))){var u=c.children[0];u instanceof Je&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var h=a.children[0];if(h instanceof _s&&h.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var f=c.children[0];f instanceof _s&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(c),a=c}return i},Ku=function(n,t,r){return dC(Ea(n,t,r))},xr=function(n,t){if(!n)return new Je("mrow");if(fb[n.type])return fb[n.type](n,t);throw new Ze("Got group of unknown type: '"+n.type+"'")};function ZT(e,n,t,r,s){var i=Ea(e,t),a;i.length===1&&i[0]instanceof Je&&LDn.has(i[0].type)?a=i[0]:a=new Je("mrow",i);var o=new Je("annotation",[new _s(n)]);o.setAttribute("encoding","application/x-tex");var c=new Je("semantics",[a,o]),u=new Je("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var h=s?"katex":"katex-mathml";return Qe([h],[u])}var $Dn=[[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]],JT=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],eR=function(n,t){return t.size<2?n:$Dn[n-1][t.size-1]};class rl{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||rl.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=JT[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 rl(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:eR(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:JT[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=eR(rl.BASESIZE,n);return this.size===t&&this.textSize===rl.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!==rl.BASESIZE?["sizing","reset-size"+this.size,"size"+rl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=xDn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}rl.BASESIZE=6;var jF=function(n){return new rl({style:n.displayMode?tn.DISPLAY:tn.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},AF=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Qe(r,[n])}return n},BDn=function(n,t,r){var s=jF(r),i;if(r.output==="mathml")return ZT(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=ek(n,s);i=Qe(["katex"],[a])}else{var o=ZT(n,t,s,r.displayMode,!1),c=ek(n,s);i=Qe(["katex"],[o,c])}return AF(i,r)},PDn=function(n,t,r){var s=jF(r),i=ek(n,s),a=Qe(["katex"],[i]);return AF(a,r)},FDn={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":"="},Ty=function(n){var t=new Je("mo",[new _s(FDn[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},HDn={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]},qDn=new Set(["widehat","widecheck","widetilde","utilde"]),Ry=function(n,t){function r(){var o=4e5,c=n.label.slice(1);if(qDn.has(c)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,h,f,p;if(u>5)c==="widehat"||c==="widecheck"?(h=420,o=2364,p=.42,f=c+"4"):(h=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],h=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],f=c+m):(o=[0,600,1033,2339,2340][m],h=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],f="tilde"+m)}var w=new Gu(f),k=new yl([w],{width:"100%",height:it(p),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:Vu([],[k],t),minWidth:0,height:p}}else{var v=[],b=HDn[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[y,x,C]=b,N=C/1e3,j=y.length,A,z;if(j===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');A=["hide-tail"],z=[b[3]]}else if(j===2)A=["halfarrow-left","halfarrow-right"],z=["xMinYMin","xMaxYMin"];else if(j===3)A=["brace-left","brace-center","brace-right"],z=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+j+" children.");for(var M=0;M0&&(s.style.minWidth=it(i)),s},UDn=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=Qe(["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 U5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new U5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new yl(u,{width:"100%",height:it(o)});a=Vu([],[h],i)}return a.height=o,a.style.height=it(o),a},GDn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},VDn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function KDn(e){return e in GDn}function vn(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 My(e){var n=Oy(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 Oy(e){return e&&(e.type==="atom"||VDn.hasOwnProperty(e.type))?e:null}var TF=e=>{if(e instanceof xa)return e;if(bDn(e)&&e.children.length===1)return TF(e.children[0])},pC=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=vn(e.base,"accent"),t=r.base,e.base=t,s=vDn(nr(e,n)),e.base=r):(r=vn(e,"accent"),t=r.base);var i=nr(t,n.havingCrampedStyle()),a=r.isShifty&&Sl(t),o=0;if(a){var c,u;o=(c=(u=TF(i))==null?void 0:u.skew)!=null?c:0}var h=r.label==="\\c",f=h?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=Ry(r,n),p=er({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+it(2*o)+")",marginLeft:it(2*o)}:void 0}]});else{var m,w;r.label==="\\vec"?(m=SF("vec",n),w=kF.vec[1]):(m=Ay({mode:r.mode,text:r.label},n,"textord"),m=gDn(m),m.italic=0,w=m.width,h&&(f+=m.depth)),p=Qe(["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=it(v),r.label==="\\textcircled"&&(p.style.top=".2em"),p=er({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]})}var b=Qe(["mord","accent"],[p],n);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},RF=(e,n)=>{var t=e.isStretchy?Ty(e.label):new Je("mo",[Va(e.label,e.mode)]),r=new Je("mover",[xr(e.base,n),t]);return r.setAttribute("accent","true"),r},WDn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));dt({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=db(n[0]),r=!WDn.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:pC,mathmlBuilder:RF});dt({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:pC,mathmlBuilder:RF});dt({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=Ry(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 Qe(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=Ty(e.label),r=new Je("munder",[xr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var R1=e=>{var n=new Je("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};dt({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=$h(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=$h(nr(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=Ry(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 h;if(a){var f=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;h=er({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 h=er({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return Qe(["mrel","x-arrow"],[h],n)},mathmlBuilder(e,n){var t=Ty(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=R1(xr(e.body,n));if(e.below){var i=R1(xr(e.below,n));r=new Je("munderover",[t,i,s])}else r=new Je("mover",[t,s])}else if(e.below){var a=R1(xr(e.below,n));r=new Je("munder",[t,a])}else r=R1(),r=new Je("mover",[t,r]);return r}});function MF(e,n){var t=Cs(e.body,n,!0);return Qe([e.mclass],t,n)}function OF(e,n){var t,r=Ea(e.body,n);return e.mclass==="minner"?t=new Je("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new Je("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new Je("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}dt({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:us(s),isCharacterBox:Sl(s)}},htmlBuilder:MF,mathmlBuilder:OF});var Dy=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"};dt({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:Dy(n[0]),body:us(n[1]),isCharacterBox:Sl(n[1])}}});dt({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=Dy(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:us(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:Sl(c)}},htmlBuilder:MF,mathmlBuilder:OF});dt({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:Dy(n[0]),body:us(n[0])}},htmlBuilder(e,n){var t=Cs(e.body,n,!0),r=Qe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=Ea(e.body,n),r=new Je("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var QDn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},tR=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),nR=e=>e.type==="textord"&&e.text==="@",XDn=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function YDn(e,n,t){var r=QDn[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 ZDn(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 Ze("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=YDn(u,h,e),k={type:"styling",body:[w],mode:"math",style:"display",resetFont:!0};r.push(k),o=tR()}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([])}}dt({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=$h(nr(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=it(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new Je("mrow",[xr(e.label,n)]);return t=new Je("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new Je("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});dt({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=$h(nr(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new Je("mrow",[xr(e.fragment,n)])}});dt({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=vn(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new Ze("\\@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 DF=(e,n)=>{var t=Cs(e.body,n.withColor(e.color),!1);return El(t)},LF=(e,n)=>{var t=Ea(e.body,n.withColor(e.color)),r=new Je("mstyle",t);return r.setAttribute("mathcolor",e.color),r};dt({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=vn(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:us(s)}},htmlBuilder:DF,mathmlBuilder:LF});dt({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=vn(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:DF,mathmlBuilder:LF});dt({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&&vn(s,"size").value}},htmlBuilder(e,n){var t=Qe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=it($r(e.size,n)))),t},mathmlBuilder(e,n){var t=new Je("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",it($r(e.size,n)))),t}});var tk={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},IF=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Ze("Expected a control sequence",e);return n},JDn=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},$F=(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)};dt({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(tk[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=tk[r.text]),vn(n.parseFunction(),"internal");throw new Ze("Invalid token after macro prefix",r)}});dt({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 Ze("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 Ze('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Ze('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new Ze("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===tk[t]),{type:"internal",mode:n.mode}}});dt({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=IF(n.gullet.popToken());n.gullet.consumeSpaces();var s=JDn(n);return $F(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});dt({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=IF(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return $F(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var _0=function(n,t,r){var s=Nr.math[n]&&Nr.math[n].replace,i=uC(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},mC=function(n,t,r,s){var i=r.havingBaseStyle(t),a=Qe(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},BF=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=it(i),n.height-=i,n.depth+=i},eLn=function(n,t,r,s,i,a){var o=gi(n,"Main-Regular",i,s),c=mC(o,t,s,a);return BF(c,s,t),c},tLn=function(n,t,r,s){return gi(n,"Size"+t+"-Regular",r,s)},PF=function(n,t,r,s,i,a){var o=tLn(n,t,i,s),c=mC(Qe(["delimsizing","size"+t],[o],s),tn.TEXT,s,a);return r&&BF(c,s,tn.TEXT),c},r4=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=Qe(["delimsizinginner",s],[Qe([],[gi(n,t,r)])]);return{type:"elem",elem:i}},s4=function(n,t,r){var s=tc["Size4-Regular"][n.charCodeAt(0)]?tc["Size4-Regular"][n.charCodeAt(0)][4]:tc["Size1-Regular"][n.charCodeAt(0)][4],i=new Gu("inner",uDn(n,Math.round(1e3*t))),a=new yl([i],{width:it(s),height:it(t),style:"width:"+it(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Vu([],[a],r);return o.height=t,o.style.height=it(t),o.style.width=it(s),{type:"elem",elem:o}},nk=.008,M1={type:"kern",size:-1*nk},nLn=new Set(["|","\\lvert","\\rvert","\\vert"]),rLn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),FF=function(n,t,r,s,i,a){var o,c,u,h,f="",p=0;o=u=h=n,c=null;var m="Size1-Regular";n==="\\uparrow"?u=h="⏐":n==="\\Uparrow"?u=h="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",h="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",h="\\Downarrow"):nLn.has(n)?(u="∣",f="vert",p=333):rLn.has(n)?(u="∥",f="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",h="⎣",m="Size4-Regular",f="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",h="⎦",m="Size4-Regular",f="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",h="⎣",m="Size4-Regular",f="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=h="⎢",m="Size4-Regular",f="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",h="⎦",m="Size4-Regular",f="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=h="⎥",m="Size4-Regular",f="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",h="⎝",m="Size4-Regular",f="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",h="⎠",m="Size4-Regular",f="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",c="⎨",h="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",c="⎬",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",h="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",h="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",h="⎩",u="⎪",m="Size4-Regular");var w=_0(o,m,i),k=w.height+w.depth,v=_0(u,m,i),b=v.height+v.depth,y=_0(h,m,i),x=y.height+y.depth,C=0,N=1;if(c!==null){var j=_0(c,m,i);C=j.height+j.depth,N=2}var A=k+x+C,z=Math.max(0,Math.ceil((t-A)/(N*b))),M=A+z*N*b,D=s.fontMetrics().axisHeight;r&&(D*=s.sizeMultiplier);var I=M/2-D,B=[];if(f.length>0){var G=M-k-x,q=Math.round(M*1e3),Q=_Dn(f,Math.round(G*1e3)),K=new Gu(f,Q),Z=it(p/1e3),J=it(q/1e3),$=new yl([K],{width:Z,height:J,viewBox:"0 0 "+p+" "+q}),L=Vu([],[$],s);L.height=q/1e3,L.style.width=Z,L.style.height=J,B.push({type:"elem",elem:L})}else{if(B.push(r4(h,m,i)),B.push(M1),c===null){var F=M-k-x+2*nk;B.push(s4(u,F,s))}else{var U=(M-k-x-C)/2+2*nk;B.push(s4(u,U,s)),B.push(M1),B.push(r4(c,m,i)),B.push(M1),B.push(s4(u,U,s))}B.push(M1),B.push(r4(o,m,i))}var H=s.havingBaseStyle(tn.TEXT),ae=er({positionType:"bottom",positionData:I,children:B});return mC(Qe(["delimsizing","mult"],[ae],H),tn.TEXT,s,a)},i4=80,a4=.08,o4=function(n,t,r,s,i){var a=lDn(n,s,r),o=new Gu(n,a),c=new yl([o],{width:"400em",height:it(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Vu(["hide-tail"],[c],i)},sLn=function(n,t){var r=t.havingBaseSizing(),s=VF("\\surd",n*r.sizeMultiplier,GF,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,c,u,h,f;return s.type==="small"?(h=1e3+1e3*a+i4,n<1?i=1:n<1.4&&(i=.7),c=(1+a+a4)/i,u=(1+a)/i,o=o4("sqrtMain",c,h,a,t),o.style.minWidth="0.853em",f=.833/i):s.type==="large"?(h=(1e3+i4)*C0[s.size],u=(C0[s.size]+a)/i,c=(C0[s.size]+a+a4)/i,o=o4("sqrtSize"+s.size,c,h,a,t),o.style.minWidth="1.02em",f=1/i):(c=n+a+a4,u=n+a,h=Math.floor(1e3*n+a)+i4,o=o4("sqrtTall",c,h,a,t),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=it(c),{span:o,advanceWidth:f,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},HF=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),iLn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),qF=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),C0=[0,1.2,1.8,2.4,3],UF=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),HF.has(n)||qF.has(n))return PF(n,t,!1,r,s,i);if(iLn.has(n))return FF(n,C0[t],!1,r,s,i);throw new Ze("Illegal delimiter: '"+n+"'")},aLn=[{type:"small",style:tn.SCRIPTSCRIPT},{type:"small",style:tn.SCRIPT},{type:"small",style:tn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],oLn=[{type:"small",style:tn.SCRIPTSCRIPT},{type:"small",style:tn.SCRIPT},{type:"small",style:tn.TEXT},{type:"stack"}],GF=[{type:"small",style:tn.SCRIPTSCRIPT},{type:"small",style:tn.SCRIPT},{type:"small",style:tn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],cLn=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.")},VF=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]},rk=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;qF.has(n)?o=aLn:HF.has(n)?o=GF:o=oLn;var c=VF(n,t,o,s);return c.type==="small"?eLn(n,c.style,r,s,i,a):c.type==="large"?PF(n,c.size,r,s,i,a):FF(n,t,r,s,i,a)},c4=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,h=Math.max(t-o,r+o),f=Math.max(h/500*c,2*h-u);return rk(n,f,!0,s,i,a)},rR={"\\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}},lLn=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 sR(e){return"isMiddle"in e}function Ly(e,n){var t=Oy(e);if(t&&lLn.has(t.text))return t;throw t?new Ze("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Ze("Invalid delimiter type '"+e.type+"'",e)}dt({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=Ly(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:rR[e.funcName].size,mclass:rR[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Qe([e.mclass]):UF(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Va(e.delim,e.mode));var t=new Je("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=it(C0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function iR(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}dt({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 Ze("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Ly(n[0],e).text,color:t}}});dt({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=Ly(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=vn(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{iR(e);for(var t=Cs(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{iR(e);var t=Ea(e.body,n);if(e.left!=="."){var r=new Je("mo",[Va(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new Je("mo",[Va(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return dC(t)}});dt({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=Ly(n[0],e);if(!e.parser.leftrightDepth)throw new Ze("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=Y0(n,[]):(t=UF(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Va("|","text"):Va(e.delim,e.mode),r=new Je("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Iy=(e,n)=>{var t=$h(nr(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=Sl(e.body);if(r==="sout")i=Qe(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=$r({number:.6,unit:"pt"},n),u=$r({number:.35,unit:"ex"},n),h=n.havingBaseSizing();s=s/h.sizeMultiplier;var f=t.height+t.depth+c+u;t.style.paddingLeft=it(f/2+c);var p=Math.floor(1e3*f*s),m=oDn(p),w=new yl([new Gu("phase",m)],{width:"400em",height:it(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=Vu(["hide-tail"],[w],n),i.style.height=it(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,b=0;/box/.test(r)?(b=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:b),v=k):r==="angl"?(b=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*b,v=Math.max(0,.25-t.depth)):(k=o?.2:0,v=k),i=UDn(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=it(b)):r==="angl"&&b!==.049&&(i.style.borderTopWidth=it(b),i.style.borderRightWidth=it(b)),a=t.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var y;if(e.backgroundColor)y=er({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var x=/cancel|phase/.test(r)?["svg-align"]:[];y=er({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:x}]})}return/cancel/.test(r)&&(y.height=t.height,y.depth=t.depth),/cancel/.test(r)&&!o?Qe(["mord","cancel-lap"],[y],n):Qe(["mord"],[y],n)},$y=(e,n)=>{var t,r=new Je(e.label.includes("colorbox")?"mpadded":"menclose",[xr(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: "+it(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};dt({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=vn(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:Iy,mathmlBuilder:$y});dt({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=vn(n[0],"color-token").color,a=vn(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:Iy,mathmlBuilder:$y});dt({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]}}});dt({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:Iy,mathmlBuilder:$y});dt({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:Iy,mathmlBuilder:$y});dt({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 KF={};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 Ze("{"+e.envName+"} can be used only in display mode.")},uLn=new Set(["gather","gather*"]);function gC(e){if(!e.includes("ed"))return!e.includes("*")}function t_(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:c,singleRow:u,emptySingleRow:h,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 Ze("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var w=[],k=[w],v=[],b=[],y=c!=null?[]:void 0;function x(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new va("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(x(),b.push(aR(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var j={type:"ordgroup",mode:e.mode,body:N};t&&(j={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[j]}),w.push(j);var A=e.fetch().text;if(A==="&"){if(f&&w.length===f){if(u||o)throw new Ze("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&&j.type==="styling"&&j.body.length===1&&j.body[0].type==="ordgroup"&&j.body[0].body.length===0&&(k.length>1||!h)&&k.pop(),b.length0&&(x+=.25),u.push({pos:x,isDashed:qe[nt]})}for(C(a[0]),r=0;r0&&(I+=y,Aqe))for(r=0;r=o)){var oe=void 0;if(s>0||n.hskipBeforeAndAfter){var ce,me;oe=(ce=(me=H)==null?void 0:me.pregap)!=null?ce:p,oe!==0&&(Q=Qe(["arraycolsep"],[]),Q.style.width=it(oe),q.push(Q))}var ve=[];for(r=0;r0){for(var jt=Ih("hline",t,h),Ft=Ih("hdashline",t,h),Le=[{type:"elem",elem:Mt,shift:0}];u.length>0;){var tt=u.pop(),ke=tt.pos-B;tt.isDashed?Le.push({type:"elem",elem:Ft,shift:ke}):Le.push({type:"elem",elem:jt,shift:ke})}Mt=er({positionType:"individualShift",children:Le})}if(Z.length===0)return Qe(["mord"],[Mt],t);var ge=er({positionType:"individualShift",children:Z}),Ne=Qe(["tag"],[ge],t);return El([Mt,Ne])},_Ln={c:"center ",l:"left ",r:"right "},bc=function(n,t){for(var r=[],s=new Je("mtd",[],["mtr-glue"]),i=new Je("mtd",[],["mml-eqn-num"]),a=0;a0){var w=n.cols,k="",v=!1,b=0,y=w.length;w[0].type==="separator"&&(p+="top ",b=1),w[w.length-1].type==="separator"&&(p+="bottom ",y-=1);for(var x=b;x0?"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=Oy(n[0]),r=t?[n[0]]:vn(n[0],"ordgroup").body,s=r.map(function(a){var o=My(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 Ze("Unknown column alignment: "+c,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return t_(e.parser,i,vC(e.envName))},htmlBuilder:vc,mathmlBuilder:bc});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 Ze("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=t_(e.parser,r,vC(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:bc});gc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=t_(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:vc,mathmlBuilder:bc});gc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=Oy(n[0]),r=t?[n[0]]:vn(n[0],"ordgroup").body,s=r.map(function(o){var c=My(o),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new Ze("Unknown column alignment: "+u,o)});if(s.length>1)throw new Ze("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=t_(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new Ze("{subarray} can contain only one column");return a},htmlBuilder:vc,mathmlBuilder:bc});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=t_(e.parser,n,vC(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:bc});gc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:QF,htmlBuilder:vc,mathmlBuilder:bc});gc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){uLn.has(e.envName)&&By(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:gC(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return t_(e.parser,n,"display")},htmlBuilder:vc,mathmlBuilder:bc});gc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:QF,htmlBuilder:vc,mathmlBuilder:bc});gc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){By(e);var n={autoTag:gC(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return t_(e.parser,n,"display")},htmlBuilder:vc,mathmlBuilder:bc});gc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return By(e),ZDn(e.parser)},htmlBuilder:vc,mathmlBuilder:bc});se("\\nonumber","\\gdef\\@eqnsw{0}");se("\\notag","\\nonumber");dt({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Ze(e.funcName+" valid only within array environment")}});var oR=KF;dt({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 Ze("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return nr(e.body,r)},YF=(e,n)=>{var t=e.font,r=n.withFont(t);return xr(e.body,r)},cR={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};dt({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=db(n[0]),i=r;return i in cR&&(i=cR[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:XF,mathmlBuilder:YF});dt({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:Dy(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:Sl(r)}}});dt({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:XF,mathmlBuilder:YF});var fLn=(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):(f>0?(m=n.fontMetrics().num2,w=p):(m=n.fontMetrics().num3,w=3*p),k=n.fontMetrics().denom2);var v;if(h){var y=n.fontMetrics().axisHeight;m-a.depth-(y+.5*f){var t=new Je("mfrac",[xr(e.numer,n),xr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=$r(e.barSize,n);t.setAttribute("linethickness",it(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new Je("mo",[new _s(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new Je("mo",[new _s(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return dC(s)}return t},ZF=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};dt({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",h=null;return u||r.startsWith("\\d")?h="display":r.startsWith("\\t")&&(h="text"),ZF({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:c,barSize:null},h)},htmlBuilder:fLn,mathmlBuilder:dLn});dt({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 lR=["display","text","script","scriptscript"],uR=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};dt({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=db(n[0]),a=i.type==="atom"&&i.family==="open"?uR(i.text):null,o=db(n[1]),c=o.type==="atom"&&o.family==="close"?uR(o.text):null,u=vn(n[2],"size"),h,f=null;u.isBlank?h=!0:(f=u.value,h=f.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var w=vn(m.body[0],"textord");p=lR[Number(w.text)]}}else m=vn(m,"textord"),p=lR[Number(m.text)];return ZF({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:h,barSize:f,leftDelim:a,rightDelim:c},p)}});dt({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:vn(n[0],"size").value,token:s}}});dt({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=vn(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 JF=(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=vn(e.base,"horizBrace")):s=vn(e,"horizBrace");var i=nr(s.base,n.havingBaseStyle(tn.DISPLAY)),a=Ry(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=Qe(["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 Qe(["minner",s.isOver?"mover":"munder"],[o],n)},hLn=(e,n)=>{var t=Ty(e.label);return new Je(e.isOver?"mover":"munder",[xr(e.base,n),t])};dt({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:JF,mathmlBuilder:hLn});dt({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=vn(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:us(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=Cs(e.body,n,!1);return NDn(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=Ku(e.body,n);return t instanceof Je||(t=new Je("mrow",[t])),t.setAttribute("href",e.href),t}});dt({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=vn(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=vn(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(","),h=0;h{var t=Cs(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Qe(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)=>Ku(e.body,n)});dt({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:us(n[0]),mathml:us(n[1])}},htmlBuilder:(e,n)=>{var t=Cs(e.html,n,!1);return El(t)},mathmlBuilder:(e,n)=>Ku(e.mathml,n)});var l4=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 Ze("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!mF(r))throw new Ze("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};dt({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=vn(t[0],"raw").string,u=c.split(","),h=0;h{var t=$r(e.height,n),r=0;e.totalheight.number>0&&(r=$r(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=$r(e.width,n));var i={height:it(t+r)};s>0&&(i.width=it(s)),r>0&&(i.verticalAlign=it(-r));var a=new pDn(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new Je("mglyph",[]);t.setAttribute("alt",e.alt);var r=$r(e.height,n),s=0;if(e.totalheight.number>0&&(s=$r(e.totalheight,n)-r,t.setAttribute("valign",it(-s))),t.setAttribute("height",it(r+s)),e.width.number>0){var i=$r(e.width,n);t.setAttribute("width",it(i))}return t.setAttribute("src",e.src),t}});dt({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=vn(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 wF(e.dimension,n)},mathmlBuilder(e,n){var t=$r(e.dimension,n);return new zF(t)}});dt({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=Qe([],[nr(e.body,n)]),t=Qe(["inner"],[t],n)):t=Qe(["inner"],[nr(e.body,n)]);var r=Qe(["fix"],[]),s=Qe([e.alignment],[t,r],n),i=Qe(["strut"]);return i.style.height=it(s.height+s.depth),s.depth&&(i.style.verticalAlign=it(-s.depth)),s.children.unshift(i),s=Qe(["thinbox"],[s],n),Qe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new Je("mpadded",[xr(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}});dt({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}}});dt({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Ze("Mismatched "+e.funcName)}});var _R=(e,n)=>{switch(n.style.size){case tn.DISPLAY.size:return e.display;case tn.TEXT.size:return e.text;case tn.SCRIPT.size:return e.script;case tn.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};dt({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:us(n[0]),text:us(n[1]),script:us(n[2]),scriptscript:us(n[3])}},htmlBuilder:(e,n)=>{var t=_R(e,n),r=Cs(t,n,!1);return El(r)},mathmlBuilder:(e,n)=>{var t=_R(e,n);return Ku(t,n)}});var eH=(e,n,t,r,s,i,a)=>{e=Qe([],[e]);var o=t&&Sl(t),c,u;if(n){var h=nr(n,r.havingStyle(s.sup()),r);u={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(t){var f=nr(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=er({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:it(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:it(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:it(-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:it(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&i!==0&&!o){var b=Qe(["mspace"],[],r);b.style.marginRight=it(i),v.unshift(b)}return Qe(["mop","op-limits"],v,r)},tH=new Set(["\\smallint"]),ip=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=vn(e.base,"op"),s=!0):i=vn(e,"op");var a=n.style,o=!1;a.size===tn.DISPLAY.size&&i.symbol&&!tH.has(i.name)&&(o=!0);var c,u;if(i.symbol){var h=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=gi(i.name,h,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=c.italic,f.length>0){var p=SF(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="\\"+f,c.classes.unshift("mop"),c.italic=u}}else if(i.body){var m=Cs(i.body,n,!0);m.length===1&&m[0]instanceof xa?(c=m[0],c.classes[0]="mop"):c=Qe(["mop"],m,n)}else{for(var w=[],k=1;k{var t;if(e.symbol)t=new Je("mo",[Va(e.name,e.mode)]),tH.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new Je("mo",Ea(e.body,n));else{t=new Je("mi",[new _s(e.name.slice(1))]);var r=new Je("mo",[Va("⁡","text")]);e.parentIsSupSub?t=new Je("mrow",[t,r]):t=NF([t,r])}return t},pLn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};dt({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=pLn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:ip,mathmlBuilder:Km});dt({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:us(r)}},htmlBuilder:ip,mathmlBuilder:Km});var mLn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};dt({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:ip,mathmlBuilder:Km});dt({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:ip,mathmlBuilder:Km});dt({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=mLn[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:ip,mathmlBuilder:Km});var nH=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=vn(e.base,"operatorname"),s=!0):i=vn(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=Cs(o,n.withFont("mathrm"),!0),u=0;u{for(var t=Ea(e.body,n.withFont("mathrm")),r=!0,s=0;sh.toText()).join("");t=[new _s(o)]}var c=new Je("mi",t);c.setAttribute("mathvariant","normal");var u=new Je("mo",[Va("⁡","text")]);return e.parentIsSupSub?new Je("mrow",[c,u]):NF([c,u])};dt({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:us(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:nH,mathmlBuilder:gLn});se("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Ff({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?El(Cs(e.body,n,!1)):Qe(["mord"],Cs(e.body,n,!0),n)},mathmlBuilder(e,n){return Ku(e.body,n,!0)}});dt({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=Ih("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 Qe(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new Je("mo",[new _s("‾")]);t.setAttribute("stretchy","true");var r=new Je("mover",[xr(e.body,n),t]);return r.setAttribute("accent","true"),r}});dt({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:us(r)}},htmlBuilder:(e,n)=>{var t=Cs(e.body,n.withPhantom(),!1);return El(t)},mathmlBuilder:(e,n)=>{var t=Ea(e.body,n);return new Je("mphantom",t)}});se("\\hphantom","\\smash{\\phantom{#1}}");dt({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=Qe(["inner"],[nr(e.body,n.withPhantom())]),r=Qe(["fix"],[]);return Qe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=Ea(us(e.body),n),r=new Je("mphantom",t),s=new Je("mpadded",[r]);return s.setAttribute("width","0px"),s}});dt({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=vn(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=$r(e.dy,n);return er({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new Je("mpadded",[xr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});dt({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});dt({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=vn(n[0],"size"),a=vn(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&vn(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=Qe(["mord","rule"],[],n),r=$r(e.width,n),s=$r(e.height,n),i=e.shift?$r(e.shift,n):0;return t.style.borderRightWidth=it(r),t.style.borderTopWidth=it(s),t.style.bottom=it(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=$r(e.width,n),r=$r(e.height,n),s=e.shift?$r(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new Je("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",it(t)),a.setAttribute("height",it(r));var o=new Je("mpadded",[a]);return s>=0?o.setAttribute("height",it(s)):(o.setAttribute("height",it(s)),o.setAttribute("depth",it(-s))),o.setAttribute("voffset",it(s)),o}});function rH(e,n,t){for(var r=Cs(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return rH(e.body,t,n)};dt({type:"sizing",names:fR,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:fR.indexOf(r)+1,body:i}},htmlBuilder:vLn,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=Ea(e.body,t),s=new Je("mstyle",r);return s.setAttribute("mathsize",it(t.sizeMultiplier)),s}});dt({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]&&vn(t[0],"ordgroup");if(a)for(var o,c=0;c{var t=Qe([],[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 Qe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new Je("mpadded",[xr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});dt({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=$h(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=it(h);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(tn.SCRIPTSCRIPT),k=nr(e.index,w,n),v=.6*(m.height-m.depth),b=er({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),y=Qe(["root"],[b]);return Qe(["mord","sqrt"],[y,m],n)}else return Qe(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new Je("mroot",[xr(t,n),xr(r,n)]):new Je("msqrt",[xr(t,n)])}});var sk={display:tn.DISPLAY,text:tn.TEXT,script:tn.SCRIPT,scriptscript:tn.SCRIPTSCRIPT};function bLn(e){return e in sk}dt({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(!bLn(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=sk[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),rH(e.body,r,n)},mathmlBuilder(e,n){var t=sk[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=Ea(e.body,r),i=new Je("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 yLn=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===tn.DISPLAY.size||r.alwaysHandleSupSub);return s?ip:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===tn.DISPLAY.size||r.limits);return i?nH:null}else{if(r.type==="accent")return Sl(r.base)?pC:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?JF:null}else return null}else return null};Ff({type:"supsub",htmlBuilder(e,n){var t=yLn(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(),h=0,f=0,p=r&&Sl(r);if(s){var m=n.havingStyle(n.style.sup());o=nr(s,m,n),p||(h=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var w=n.havingStyle(n.style.sub());c=nr(i,w,n),p||(f=a.depth+w.fontMetrics().subDrop*w.sizeMultiplier/n.sizeMultiplier)}var k;n.style===tn.DISPLAY?k=u.sup1:n.style.cramped?k=u.sup3:k=u.sup2;var v=n.sizeMultiplier,b=it(.5/u.ptPerEm/v),y=null;if(c){var x=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof xa||x){var C;y=it(-((C=a.italic)!=null?C:0))}}var N;if(o&&c){h=Math.max(h,k,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var j=u.defaultRuleThickness,A=4*j;if(h-o.depth-(c.height-f)0&&(h+=z,f-=z)}var M=[{type:"elem",elem:c,shift:f,marginRight:b,marginLeft:y},{type:"elem",elem:o,shift:-h,marginRight:b}];N=er({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:y,marginRight:b}];N=er({positionType:"shift",positionData:f,children:D})}else if(o)h=Math.max(h,k,o.depth+.25*u.xHeight),N=er({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var I=J5(a,"right")||"mord";return Qe([I],[a,Qe(["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=[xr(e.base,n)];e.sub&&i.push(xr(e.sub,n)),e.sup&&i.push(xr(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===tn.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===tn.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===tn.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===tn.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===tn.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===tn.DISPLAY)?a="mover":a="msup"}return new Je(a,i)}});Ff({type:"atom",htmlBuilder(e,n){return _C(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new Je("mo",[Va(e.text,e.mode)]);if(e.family==="bin"){var r=hC(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 sH={mi:"italic",mn:"normal",mtext:"normal"};Ff({type:"mathord",htmlBuilder(e,n){return Ay(e,n,"mathord")},mathmlBuilder(e,n){var t=new Je("mi",[Va(e.text,e.mode,n)]),r=hC(e,n)||"italic";return r!==sH[t.type]&&t.setAttribute("mathvariant",r),t}});Ff({type:"textord",htmlBuilder(e,n){return Ay(e,n,"textord")},mathmlBuilder(e,n){var t=Va(e.text,e.mode,n),r=hC(e,n)||"normal",s;return e.mode==="text"?s=new Je("mtext",[t]):/[0-9]/.test(e.text)?s=new Je("mn",[t]):e.text==="\\prime"?s=new Je("mo",[t]):s=new Je("mi",[t]),r!==sH[s.type]&&s.setAttribute("mathvariant",r),s}});var u4={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},_4={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Ff({type:"spacing",htmlBuilder(e,n){if(_4.hasOwnProperty(e.text)){var t=_4[e.text].className||"";if(e.mode==="text"){var r=Ay(e,n,"textord");return r.classes.push(t),r}else return Qe(["mspace",t],[_C(e.text,e.mode,n)],n)}else{if(u4.hasOwnProperty(e.text))return Qe(["mspace",u4[e.text]],[],n);throw new Ze('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(_4.hasOwnProperty(e.text))t=new Je("mtext",[new _s(" ")]);else{if(u4.hasOwnProperty(e.text))return new Je("mspace");throw new Ze('Unknown type of space "'+e.text+'"')}return t}});var dR=()=>{var e=new Je("mtd",[]);return e.setAttribute("width","50%"),e};Ff({type:"tag",mathmlBuilder(e,n){var t=new Je("mtable",[new Je("mtr",[dR(),new Je("mtd",[Ku(e.body,n)]),dR(),new Je("mtd",[Ku(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var hR={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},pR={"\\textbf":"textbf","\\textmd":"textmd"},xLn={"\\textit":"textit","\\textup":"textup"},mR=(e,n)=>{var t=e.font;if(t){if(hR[t])return n.withTextFontFamily(hR[t]);if(pR[t])return n.withTextFontWeight(pR[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(xLn[t])};dt({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:us(s),font:r}},htmlBuilder(e,n){var t=mR(e,n),r=Cs(e.body,t,!0);return Qe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=mR(e,n);return Ku(e.body,t)}});dt({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=Ih("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 Qe(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new Je("mo",[new _s("‾")]);t.setAttribute("stretchy","true");var r=new Je("munder",[xr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});dt({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 Je("mpadded",[xr(e.body,n)],["vcenter"]);return new Je("mrow",[t])}});dt({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Ze("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=gR(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),Ou=CF,iH=`[ \r - ]`,wLn="\\\\[a-zA-Z@]+",kLn="\\\\[^\uD800-\uDFFF]",SLn="("+wLn+")"+iH+"*",CLn=`\\\\( +-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 LLn(e){return"toText"in e}class tp{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(LLn(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var Y5={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},ILn={ex:!0,em:!0,mu:!0},MF=function(n){return typeof n!="string"&&(n=n.unit),n in Y5||n in ILn||n==="ex"},$r=function(n,t){var r;if(n.unit in Y5)r=Y5[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 Je("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},at=function(n){return+n.toFixed(4)+"em"},qu=function(n){return n.filter(t=>t).join(" ")},wC=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=_Ln(r)+":"+s+";")}return t},OF=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)}},DF=function(n){var t=document.createElement(n);t.className=qu(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]/,LF=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+ri(qu(this.classes))+'"');var r=wC(this.style);r&&(t+=' style="'+ri(r)+'"');for(var s of Object.keys(this.attributes)){if($Ln.test(s))throw new Je("Invalid attribute name '"+s+"'");t+=" "+s+'="'+ri(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class np{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,OF.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return DF.call(this,"span")}toMarkup(){return LF.call(this,"span")}}class Ry{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,OF.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 DF.call(this,"a")}toMarkup(){return LF.call(this,"a")}}class BLn{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=''+ri(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=at(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=qu(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:"+at(this.italic)+";"),r+=wC(this.style),r&&(n=!0,t+=' style="'+ri(r)+'"');var s=ri(this.text);return n?(t+=">",t+=s,t+="",t):s}}class xl{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 Z5{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 qLn=e=>e instanceof np||e instanceof Ry||e instanceof tp,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]}},N1={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]},ZT={Å:"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 ULn(e,n){nc[e]=n}function kC(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 ZT&&(r=ZT[e[0]].charCodeAt(0),s=nc[n][r]),!s&&t==="text"&&RF(r)&&(s=nc[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var t4={};function GLn(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!t4[n]){var t=t4[n]={cssEmPerMu:N1.quad[n]/18};for(var r in N1)N1.hasOwnProperty(r)&&(t[r]=N1[r][n])}return t4[n]}var Ar={math:{},text:{}};function H(e,n,t,r,s,i){Ar[e][s]={font:n,group:t,replace:r},i&&r&&(Ar[e][r]=Ar[e][s])}var W="math",Ke="text",ee="main",fe="ams",Rr="accent-token",ht="bin",ki="close",rp="inner",Kt="mathord",ps="op-token",Ea="open",Km="punct",de="rel",Nl="spacing",ye="textord";H(W,ee,de,"≡","\\equiv",!0);H(W,ee,de,"≺","\\prec",!0);H(W,ee,de,"≻","\\succ",!0);H(W,ee,de,"∼","\\sim",!0);H(W,ee,de,"⊥","\\perp");H(W,ee,de,"⪯","\\preceq",!0);H(W,ee,de,"⪰","\\succeq",!0);H(W,ee,de,"≃","\\simeq",!0);H(W,ee,de,"∣","\\mid",!0);H(W,ee,de,"≪","\\ll",!0);H(W,ee,de,"≫","\\gg",!0);H(W,ee,de,"≍","\\asymp",!0);H(W,ee,de,"∥","\\parallel");H(W,ee,de,"⋈","\\bowtie",!0);H(W,ee,de,"⌣","\\smile",!0);H(W,ee,de,"⊑","\\sqsubseteq",!0);H(W,ee,de,"⊒","\\sqsupseteq",!0);H(W,ee,de,"≐","\\doteq",!0);H(W,ee,de,"⌢","\\frown",!0);H(W,ee,de,"∋","\\ni",!0);H(W,ee,de,"∝","\\propto",!0);H(W,ee,de,"⊢","\\vdash",!0);H(W,ee,de,"⊣","\\dashv",!0);H(W,ee,de,"∋","\\owns");H(W,ee,Km,".","\\ldotp");H(W,ee,Km,"⋅","\\cdotp");H(W,ee,Km,"⋅","·");H(Ke,ee,ye,"⋅","·");H(W,ee,ye,"#","\\#");H(Ke,ee,ye,"#","\\#");H(W,ee,ye,"&","\\&");H(Ke,ee,ye,"&","\\&");H(W,ee,ye,"ℵ","\\aleph",!0);H(W,ee,ye,"∀","\\forall",!0);H(W,ee,ye,"ℏ","\\hbar",!0);H(W,ee,ye,"∃","\\exists",!0);H(W,ee,ye,"∇","\\nabla",!0);H(W,ee,ye,"♭","\\flat",!0);H(W,ee,ye,"ℓ","\\ell",!0);H(W,ee,ye,"♮","\\natural",!0);H(W,ee,ye,"♣","\\clubsuit",!0);H(W,ee,ye,"℘","\\wp",!0);H(W,ee,ye,"♯","\\sharp",!0);H(W,ee,ye,"♢","\\diamondsuit",!0);H(W,ee,ye,"ℜ","\\Re",!0);H(W,ee,ye,"♡","\\heartsuit",!0);H(W,ee,ye,"ℑ","\\Im",!0);H(W,ee,ye,"♠","\\spadesuit",!0);H(W,ee,ye,"§","\\S",!0);H(Ke,ee,ye,"§","\\S");H(W,ee,ye,"¶","\\P",!0);H(Ke,ee,ye,"¶","\\P");H(W,ee,ye,"†","\\dag");H(Ke,ee,ye,"†","\\dag");H(Ke,ee,ye,"†","\\textdagger");H(W,ee,ye,"‡","\\ddag");H(Ke,ee,ye,"‡","\\ddag");H(Ke,ee,ye,"‡","\\textdaggerdbl");H(W,ee,ki,"⎱","\\rmoustache",!0);H(W,ee,Ea,"⎰","\\lmoustache",!0);H(W,ee,ki,"⟯","\\rgroup",!0);H(W,ee,Ea,"⟮","\\lgroup",!0);H(W,ee,ht,"∓","\\mp",!0);H(W,ee,ht,"⊖","\\ominus",!0);H(W,ee,ht,"⊎","\\uplus",!0);H(W,ee,ht,"⊓","\\sqcap",!0);H(W,ee,ht,"∗","\\ast");H(W,ee,ht,"⊔","\\sqcup",!0);H(W,ee,ht,"◯","\\bigcirc",!0);H(W,ee,ht,"∙","\\bullet",!0);H(W,ee,ht,"‡","\\ddagger");H(W,ee,ht,"≀","\\wr",!0);H(W,ee,ht,"⨿","\\amalg");H(W,ee,ht,"&","\\And");H(W,ee,de,"⟵","\\longleftarrow",!0);H(W,ee,de,"⇐","\\Leftarrow",!0);H(W,ee,de,"⟸","\\Longleftarrow",!0);H(W,ee,de,"⟶","\\longrightarrow",!0);H(W,ee,de,"⇒","\\Rightarrow",!0);H(W,ee,de,"⟹","\\Longrightarrow",!0);H(W,ee,de,"↔","\\leftrightarrow",!0);H(W,ee,de,"⟷","\\longleftrightarrow",!0);H(W,ee,de,"⇔","\\Leftrightarrow",!0);H(W,ee,de,"⟺","\\Longleftrightarrow",!0);H(W,ee,de,"↦","\\mapsto",!0);H(W,ee,de,"⟼","\\longmapsto",!0);H(W,ee,de,"↗","\\nearrow",!0);H(W,ee,de,"↩","\\hookleftarrow",!0);H(W,ee,de,"↪","\\hookrightarrow",!0);H(W,ee,de,"↘","\\searrow",!0);H(W,ee,de,"↼","\\leftharpoonup",!0);H(W,ee,de,"⇀","\\rightharpoonup",!0);H(W,ee,de,"↙","\\swarrow",!0);H(W,ee,de,"↽","\\leftharpoondown",!0);H(W,ee,de,"⇁","\\rightharpoondown",!0);H(W,ee,de,"↖","\\nwarrow",!0);H(W,ee,de,"⇌","\\rightleftharpoons",!0);H(W,fe,de,"≮","\\nless",!0);H(W,fe,de,"","\\@nleqslant");H(W,fe,de,"","\\@nleqq");H(W,fe,de,"⪇","\\lneq",!0);H(W,fe,de,"≨","\\lneqq",!0);H(W,fe,de,"","\\@lvertneqq");H(W,fe,de,"⋦","\\lnsim",!0);H(W,fe,de,"⪉","\\lnapprox",!0);H(W,fe,de,"⊀","\\nprec",!0);H(W,fe,de,"⋠","\\npreceq",!0);H(W,fe,de,"⋨","\\precnsim",!0);H(W,fe,de,"⪹","\\precnapprox",!0);H(W,fe,de,"≁","\\nsim",!0);H(W,fe,de,"","\\@nshortmid");H(W,fe,de,"∤","\\nmid",!0);H(W,fe,de,"⊬","\\nvdash",!0);H(W,fe,de,"⊭","\\nvDash",!0);H(W,fe,de,"⋪","\\ntriangleleft");H(W,fe,de,"⋬","\\ntrianglelefteq",!0);H(W,fe,de,"⊊","\\subsetneq",!0);H(W,fe,de,"","\\@varsubsetneq");H(W,fe,de,"⫋","\\subsetneqq",!0);H(W,fe,de,"","\\@varsubsetneqq");H(W,fe,de,"≯","\\ngtr",!0);H(W,fe,de,"","\\@ngeqslant");H(W,fe,de,"","\\@ngeqq");H(W,fe,de,"⪈","\\gneq",!0);H(W,fe,de,"≩","\\gneqq",!0);H(W,fe,de,"","\\@gvertneqq");H(W,fe,de,"⋧","\\gnsim",!0);H(W,fe,de,"⪊","\\gnapprox",!0);H(W,fe,de,"⊁","\\nsucc",!0);H(W,fe,de,"⋡","\\nsucceq",!0);H(W,fe,de,"⋩","\\succnsim",!0);H(W,fe,de,"⪺","\\succnapprox",!0);H(W,fe,de,"≆","\\ncong",!0);H(W,fe,de,"","\\@nshortparallel");H(W,fe,de,"∦","\\nparallel",!0);H(W,fe,de,"⊯","\\nVDash",!0);H(W,fe,de,"⋫","\\ntriangleright");H(W,fe,de,"⋭","\\ntrianglerighteq",!0);H(W,fe,de,"","\\@nsupseteqq");H(W,fe,de,"⊋","\\supsetneq",!0);H(W,fe,de,"","\\@varsupsetneq");H(W,fe,de,"⫌","\\supsetneqq",!0);H(W,fe,de,"","\\@varsupsetneqq");H(W,fe,de,"⊮","\\nVdash",!0);H(W,fe,de,"⪵","\\precneqq",!0);H(W,fe,de,"⪶","\\succneqq",!0);H(W,fe,de,"","\\@nsubseteqq");H(W,fe,ht,"⊴","\\unlhd");H(W,fe,ht,"⊵","\\unrhd");H(W,fe,de,"↚","\\nleftarrow",!0);H(W,fe,de,"↛","\\nrightarrow",!0);H(W,fe,de,"⇍","\\nLeftarrow",!0);H(W,fe,de,"⇏","\\nRightarrow",!0);H(W,fe,de,"↮","\\nleftrightarrow",!0);H(W,fe,de,"⇎","\\nLeftrightarrow",!0);H(W,fe,de,"△","\\vartriangle");H(W,fe,ye,"ℏ","\\hslash");H(W,fe,ye,"▽","\\triangledown");H(W,fe,ye,"◊","\\lozenge");H(W,fe,ye,"Ⓢ","\\circledS");H(W,fe,ye,"®","\\circledR");H(Ke,fe,ye,"®","\\circledR");H(W,fe,ye,"∡","\\measuredangle",!0);H(W,fe,ye,"∄","\\nexists");H(W,fe,ye,"℧","\\mho");H(W,fe,ye,"Ⅎ","\\Finv",!0);H(W,fe,ye,"⅁","\\Game",!0);H(W,fe,ye,"‵","\\backprime");H(W,fe,ye,"▲","\\blacktriangle");H(W,fe,ye,"▼","\\blacktriangledown");H(W,fe,ye,"■","\\blacksquare");H(W,fe,ye,"⧫","\\blacklozenge");H(W,fe,ye,"★","\\bigstar");H(W,fe,ye,"∢","\\sphericalangle",!0);H(W,fe,ye,"∁","\\complement",!0);H(W,fe,ye,"ð","\\eth",!0);H(Ke,ee,ye,"ð","ð");H(W,fe,ye,"╱","\\diagup");H(W,fe,ye,"╲","\\diagdown");H(W,fe,ye,"□","\\square");H(W,fe,ye,"□","\\Box");H(W,fe,ye,"◊","\\Diamond");H(W,fe,ye,"¥","\\yen",!0);H(Ke,fe,ye,"¥","\\yen",!0);H(W,fe,ye,"✓","\\checkmark",!0);H(Ke,fe,ye,"✓","\\checkmark");H(W,fe,ye,"ℶ","\\beth",!0);H(W,fe,ye,"ℸ","\\daleth",!0);H(W,fe,ye,"ℷ","\\gimel",!0);H(W,fe,ye,"ϝ","\\digamma",!0);H(W,fe,ye,"ϰ","\\varkappa");H(W,fe,Ea,"┌","\\@ulcorner",!0);H(W,fe,ki,"┐","\\@urcorner",!0);H(W,fe,Ea,"└","\\@llcorner",!0);H(W,fe,ki,"┘","\\@lrcorner",!0);H(W,fe,de,"≦","\\leqq",!0);H(W,fe,de,"⩽","\\leqslant",!0);H(W,fe,de,"⪕","\\eqslantless",!0);H(W,fe,de,"≲","\\lesssim",!0);H(W,fe,de,"⪅","\\lessapprox",!0);H(W,fe,de,"≊","\\approxeq",!0);H(W,fe,ht,"⋖","\\lessdot");H(W,fe,de,"⋘","\\lll",!0);H(W,fe,de,"≶","\\lessgtr",!0);H(W,fe,de,"⋚","\\lesseqgtr",!0);H(W,fe,de,"⪋","\\lesseqqgtr",!0);H(W,fe,de,"≑","\\doteqdot");H(W,fe,de,"≓","\\risingdotseq",!0);H(W,fe,de,"≒","\\fallingdotseq",!0);H(W,fe,de,"∽","\\backsim",!0);H(W,fe,de,"⋍","\\backsimeq",!0);H(W,fe,de,"⫅","\\subseteqq",!0);H(W,fe,de,"⋐","\\Subset",!0);H(W,fe,de,"⊏","\\sqsubset",!0);H(W,fe,de,"≼","\\preccurlyeq",!0);H(W,fe,de,"⋞","\\curlyeqprec",!0);H(W,fe,de,"≾","\\precsim",!0);H(W,fe,de,"⪷","\\precapprox",!0);H(W,fe,de,"⊲","\\vartriangleleft");H(W,fe,de,"⊴","\\trianglelefteq");H(W,fe,de,"⊨","\\vDash",!0);H(W,fe,de,"⊪","\\Vvdash",!0);H(W,fe,de,"⌣","\\smallsmile");H(W,fe,de,"⌢","\\smallfrown");H(W,fe,de,"≏","\\bumpeq",!0);H(W,fe,de,"≎","\\Bumpeq",!0);H(W,fe,de,"≧","\\geqq",!0);H(W,fe,de,"⩾","\\geqslant",!0);H(W,fe,de,"⪖","\\eqslantgtr",!0);H(W,fe,de,"≳","\\gtrsim",!0);H(W,fe,de,"⪆","\\gtrapprox",!0);H(W,fe,ht,"⋗","\\gtrdot");H(W,fe,de,"⋙","\\ggg",!0);H(W,fe,de,"≷","\\gtrless",!0);H(W,fe,de,"⋛","\\gtreqless",!0);H(W,fe,de,"⪌","\\gtreqqless",!0);H(W,fe,de,"≖","\\eqcirc",!0);H(W,fe,de,"≗","\\circeq",!0);H(W,fe,de,"≜","\\triangleq",!0);H(W,fe,de,"∼","\\thicksim");H(W,fe,de,"≈","\\thickapprox");H(W,fe,de,"⫆","\\supseteqq",!0);H(W,fe,de,"⋑","\\Supset",!0);H(W,fe,de,"⊐","\\sqsupset",!0);H(W,fe,de,"≽","\\succcurlyeq",!0);H(W,fe,de,"⋟","\\curlyeqsucc",!0);H(W,fe,de,"≿","\\succsim",!0);H(W,fe,de,"⪸","\\succapprox",!0);H(W,fe,de,"⊳","\\vartriangleright");H(W,fe,de,"⊵","\\trianglerighteq");H(W,fe,de,"⊩","\\Vdash",!0);H(W,fe,de,"∣","\\shortmid");H(W,fe,de,"∥","\\shortparallel");H(W,fe,de,"≬","\\between",!0);H(W,fe,de,"⋔","\\pitchfork",!0);H(W,fe,de,"∝","\\varpropto");H(W,fe,de,"◀","\\blacktriangleleft");H(W,fe,de,"∴","\\therefore",!0);H(W,fe,de,"∍","\\backepsilon");H(W,fe,de,"▶","\\blacktriangleright");H(W,fe,de,"∵","\\because",!0);H(W,fe,de,"⋘","\\llless");H(W,fe,de,"⋙","\\gggtr");H(W,fe,ht,"⊲","\\lhd");H(W,fe,ht,"⊳","\\rhd");H(W,fe,de,"≂","\\eqsim",!0);H(W,ee,de,"⋈","\\Join");H(W,fe,de,"≑","\\Doteq",!0);H(W,fe,ht,"∔","\\dotplus",!0);H(W,fe,ht,"∖","\\smallsetminus");H(W,fe,ht,"⋒","\\Cap",!0);H(W,fe,ht,"⋓","\\Cup",!0);H(W,fe,ht,"⩞","\\doublebarwedge",!0);H(W,fe,ht,"⊟","\\boxminus",!0);H(W,fe,ht,"⊞","\\boxplus",!0);H(W,fe,ht,"⋇","\\divideontimes",!0);H(W,fe,ht,"⋉","\\ltimes",!0);H(W,fe,ht,"⋊","\\rtimes",!0);H(W,fe,ht,"⋋","\\leftthreetimes",!0);H(W,fe,ht,"⋌","\\rightthreetimes",!0);H(W,fe,ht,"⋏","\\curlywedge",!0);H(W,fe,ht,"⋎","\\curlyvee",!0);H(W,fe,ht,"⊝","\\circleddash",!0);H(W,fe,ht,"⊛","\\circledast",!0);H(W,fe,ht,"⋅","\\centerdot");H(W,fe,ht,"⊺","\\intercal",!0);H(W,fe,ht,"⋒","\\doublecap");H(W,fe,ht,"⋓","\\doublecup");H(W,fe,ht,"⊠","\\boxtimes",!0);H(W,fe,de,"⇢","\\dashrightarrow",!0);H(W,fe,de,"⇠","\\dashleftarrow",!0);H(W,fe,de,"⇇","\\leftleftarrows",!0);H(W,fe,de,"⇆","\\leftrightarrows",!0);H(W,fe,de,"⇚","\\Lleftarrow",!0);H(W,fe,de,"↞","\\twoheadleftarrow",!0);H(W,fe,de,"↢","\\leftarrowtail",!0);H(W,fe,de,"↫","\\looparrowleft",!0);H(W,fe,de,"⇋","\\leftrightharpoons",!0);H(W,fe,de,"↶","\\curvearrowleft",!0);H(W,fe,de,"↺","\\circlearrowleft",!0);H(W,fe,de,"↰","\\Lsh",!0);H(W,fe,de,"⇈","\\upuparrows",!0);H(W,fe,de,"↿","\\upharpoonleft",!0);H(W,fe,de,"⇃","\\downharpoonleft",!0);H(W,ee,de,"⊶","\\origof",!0);H(W,ee,de,"⊷","\\imageof",!0);H(W,fe,de,"⊸","\\multimap",!0);H(W,fe,de,"↭","\\leftrightsquigarrow",!0);H(W,fe,de,"⇉","\\rightrightarrows",!0);H(W,fe,de,"⇄","\\rightleftarrows",!0);H(W,fe,de,"↠","\\twoheadrightarrow",!0);H(W,fe,de,"↣","\\rightarrowtail",!0);H(W,fe,de,"↬","\\looparrowright",!0);H(W,fe,de,"↷","\\curvearrowright",!0);H(W,fe,de,"↻","\\circlearrowright",!0);H(W,fe,de,"↱","\\Rsh",!0);H(W,fe,de,"⇊","\\downdownarrows",!0);H(W,fe,de,"↾","\\upharpoonright",!0);H(W,fe,de,"⇂","\\downharpoonright",!0);H(W,fe,de,"⇝","\\rightsquigarrow",!0);H(W,fe,de,"⇝","\\leadsto");H(W,fe,de,"⇛","\\Rrightarrow",!0);H(W,fe,de,"↾","\\restriction");H(W,ee,ye,"‘","`");H(W,ee,ye,"$","\\$");H(Ke,ee,ye,"$","\\$");H(Ke,ee,ye,"$","\\textdollar");H(W,ee,ye,"%","\\%");H(Ke,ee,ye,"%","\\%");H(W,ee,ye,"_","\\_");H(Ke,ee,ye,"_","\\_");H(Ke,ee,ye,"_","\\textunderscore");H(W,ee,ye,"∠","\\angle",!0);H(W,ee,ye,"∞","\\infty",!0);H(W,ee,ye,"′","\\prime");H(W,ee,ye,"△","\\triangle");H(W,ee,ye,"Γ","\\Gamma",!0);H(W,ee,ye,"Δ","\\Delta",!0);H(W,ee,ye,"Θ","\\Theta",!0);H(W,ee,ye,"Λ","\\Lambda",!0);H(W,ee,ye,"Ξ","\\Xi",!0);H(W,ee,ye,"Π","\\Pi",!0);H(W,ee,ye,"Σ","\\Sigma",!0);H(W,ee,ye,"Υ","\\Upsilon",!0);H(W,ee,ye,"Φ","\\Phi",!0);H(W,ee,ye,"Ψ","\\Psi",!0);H(W,ee,ye,"Ω","\\Omega",!0);H(W,ee,ye,"A","Α");H(W,ee,ye,"B","Β");H(W,ee,ye,"E","Ε");H(W,ee,ye,"Z","Ζ");H(W,ee,ye,"H","Η");H(W,ee,ye,"I","Ι");H(W,ee,ye,"K","Κ");H(W,ee,ye,"M","Μ");H(W,ee,ye,"N","Ν");H(W,ee,ye,"O","Ο");H(W,ee,ye,"P","Ρ");H(W,ee,ye,"T","Τ");H(W,ee,ye,"X","Χ");H(W,ee,ye,"¬","\\neg",!0);H(W,ee,ye,"¬","\\lnot");H(W,ee,ye,"⊤","\\top");H(W,ee,ye,"⊥","\\bot");H(W,ee,ye,"∅","\\emptyset");H(W,fe,ye,"∅","\\varnothing");H(W,ee,Kt,"α","\\alpha",!0);H(W,ee,Kt,"β","\\beta",!0);H(W,ee,Kt,"γ","\\gamma",!0);H(W,ee,Kt,"δ","\\delta",!0);H(W,ee,Kt,"ϵ","\\epsilon",!0);H(W,ee,Kt,"ζ","\\zeta",!0);H(W,ee,Kt,"η","\\eta",!0);H(W,ee,Kt,"θ","\\theta",!0);H(W,ee,Kt,"ι","\\iota",!0);H(W,ee,Kt,"κ","\\kappa",!0);H(W,ee,Kt,"λ","\\lambda",!0);H(W,ee,Kt,"μ","\\mu",!0);H(W,ee,Kt,"ν","\\nu",!0);H(W,ee,Kt,"ξ","\\xi",!0);H(W,ee,Kt,"ο","\\omicron",!0);H(W,ee,Kt,"π","\\pi",!0);H(W,ee,Kt,"ρ","\\rho",!0);H(W,ee,Kt,"σ","\\sigma",!0);H(W,ee,Kt,"τ","\\tau",!0);H(W,ee,Kt,"υ","\\upsilon",!0);H(W,ee,Kt,"ϕ","\\phi",!0);H(W,ee,Kt,"χ","\\chi",!0);H(W,ee,Kt,"ψ","\\psi",!0);H(W,ee,Kt,"ω","\\omega",!0);H(W,ee,Kt,"ε","\\varepsilon",!0);H(W,ee,Kt,"ϑ","\\vartheta",!0);H(W,ee,Kt,"ϖ","\\varpi",!0);H(W,ee,Kt,"ϱ","\\varrho",!0);H(W,ee,Kt,"ς","\\varsigma",!0);H(W,ee,Kt,"φ","\\varphi",!0);H(W,ee,ht,"∗","*",!0);H(W,ee,ht,"+","+");H(W,ee,ht,"−","-",!0);H(W,ee,ht,"⋅","\\cdot",!0);H(W,ee,ht,"∘","\\circ",!0);H(W,ee,ht,"÷","\\div",!0);H(W,ee,ht,"±","\\pm",!0);H(W,ee,ht,"×","\\times",!0);H(W,ee,ht,"∩","\\cap",!0);H(W,ee,ht,"∪","\\cup",!0);H(W,ee,ht,"∖","\\setminus",!0);H(W,ee,ht,"∧","\\land");H(W,ee,ht,"∨","\\lor");H(W,ee,ht,"∧","\\wedge",!0);H(W,ee,ht,"∨","\\vee",!0);H(W,ee,ye,"√","\\surd");H(W,ee,Ea,"⟨","\\langle",!0);H(W,ee,Ea,"∣","\\lvert");H(W,ee,Ea,"∥","\\lVert");H(W,ee,ki,"?","?");H(W,ee,ki,"!","!");H(W,ee,ki,"⟩","\\rangle",!0);H(W,ee,ki,"∣","\\rvert");H(W,ee,ki,"∥","\\rVert");H(W,ee,de,"=","=");H(W,ee,de,":",":");H(W,ee,de,"≈","\\approx",!0);H(W,ee,de,"≅","\\cong",!0);H(W,ee,de,"≥","\\ge");H(W,ee,de,"≥","\\geq",!0);H(W,ee,de,"←","\\gets");H(W,ee,de,">","\\gt",!0);H(W,ee,de,"∈","\\in",!0);H(W,ee,de,"","\\@not");H(W,ee,de,"⊂","\\subset",!0);H(W,ee,de,"⊃","\\supset",!0);H(W,ee,de,"⊆","\\subseteq",!0);H(W,ee,de,"⊇","\\supseteq",!0);H(W,fe,de,"⊈","\\nsubseteq",!0);H(W,fe,de,"⊉","\\nsupseteq",!0);H(W,ee,de,"⊨","\\models");H(W,ee,de,"←","\\leftarrow",!0);H(W,ee,de,"≤","\\le");H(W,ee,de,"≤","\\leq",!0);H(W,ee,de,"<","\\lt",!0);H(W,ee,de,"→","\\rightarrow",!0);H(W,ee,de,"→","\\to");H(W,fe,de,"≱","\\ngeq",!0);H(W,fe,de,"≰","\\nleq",!0);H(W,ee,Nl," ","\\ ");H(W,ee,Nl," ","\\space");H(W,ee,Nl," ","\\nobreakspace");H(Ke,ee,Nl," ","\\ ");H(Ke,ee,Nl," "," ");H(Ke,ee,Nl," ","\\space");H(Ke,ee,Nl," ","\\nobreakspace");H(W,ee,Nl,"","\\nobreak");H(W,ee,Nl,"","\\allowbreak");H(W,ee,Km,",",",");H(W,ee,Km,";",";");H(W,fe,ht,"⊼","\\barwedge",!0);H(W,fe,ht,"⊻","\\veebar",!0);H(W,ee,ht,"⊙","\\odot",!0);H(W,ee,ht,"⊕","\\oplus",!0);H(W,ee,ht,"⊗","\\otimes",!0);H(W,ee,ye,"∂","\\partial",!0);H(W,ee,ht,"⊘","\\oslash",!0);H(W,fe,ht,"⊚","\\circledcirc",!0);H(W,fe,ht,"⊡","\\boxdot",!0);H(W,ee,ht,"△","\\bigtriangleup");H(W,ee,ht,"▽","\\bigtriangledown");H(W,ee,ht,"†","\\dagger");H(W,ee,ht,"⋄","\\diamond");H(W,ee,ht,"⋆","\\star");H(W,ee,ht,"◃","\\triangleleft");H(W,ee,ht,"▹","\\triangleright");H(W,ee,Ea,"{","\\{");H(Ke,ee,ye,"{","\\{");H(Ke,ee,ye,"{","\\textbraceleft");H(W,ee,ki,"}","\\}");H(Ke,ee,ye,"}","\\}");H(Ke,ee,ye,"}","\\textbraceright");H(W,ee,Ea,"{","\\lbrace");H(W,ee,ki,"}","\\rbrace");H(W,ee,Ea,"[","\\lbrack",!0);H(Ke,ee,ye,"[","\\lbrack",!0);H(W,ee,ki,"]","\\rbrack",!0);H(Ke,ee,ye,"]","\\rbrack",!0);H(W,ee,Ea,"(","\\lparen",!0);H(W,ee,ki,")","\\rparen",!0);H(Ke,ee,ye,"<","\\textless",!0);H(Ke,ee,ye,">","\\textgreater",!0);H(W,ee,Ea,"⌊","\\lfloor",!0);H(W,ee,ki,"⌋","\\rfloor",!0);H(W,ee,Ea,"⌈","\\lceil",!0);H(W,ee,ki,"⌉","\\rceil",!0);H(W,ee,ye,"\\","\\backslash");H(W,ee,ye,"∣","|");H(W,ee,ye,"∣","\\vert");H(Ke,ee,ye,"|","\\textbar",!0);H(W,ee,ye,"∥","\\|");H(W,ee,ye,"∥","\\Vert");H(Ke,ee,ye,"∥","\\textbardbl");H(Ke,ee,ye,"~","\\textasciitilde");H(Ke,ee,ye,"\\","\\textbackslash");H(Ke,ee,ye,"^","\\textasciicircum");H(W,ee,de,"↑","\\uparrow",!0);H(W,ee,de,"⇑","\\Uparrow",!0);H(W,ee,de,"↓","\\downarrow",!0);H(W,ee,de,"⇓","\\Downarrow",!0);H(W,ee,de,"↕","\\updownarrow",!0);H(W,ee,de,"⇕","\\Updownarrow",!0);H(W,ee,ps,"∐","\\coprod");H(W,ee,ps,"⋁","\\bigvee");H(W,ee,ps,"⋀","\\bigwedge");H(W,ee,ps,"⨄","\\biguplus");H(W,ee,ps,"⋂","\\bigcap");H(W,ee,ps,"⋃","\\bigcup");H(W,ee,ps,"∫","\\int");H(W,ee,ps,"∫","\\intop");H(W,ee,ps,"∬","\\iint");H(W,ee,ps,"∭","\\iiint");H(W,ee,ps,"∏","\\prod");H(W,ee,ps,"∑","\\sum");H(W,ee,ps,"⨂","\\bigotimes");H(W,ee,ps,"⨁","\\bigoplus");H(W,ee,ps,"⨀","\\bigodot");H(W,ee,ps,"∮","\\oint");H(W,ee,ps,"∯","\\oiint");H(W,ee,ps,"∰","\\oiiint");H(W,ee,ps,"⨆","\\bigsqcup");H(W,ee,ps,"∫","\\smallint");H(Ke,ee,rp,"…","\\textellipsis");H(W,ee,rp,"…","\\mathellipsis");H(Ke,ee,rp,"…","\\ldots",!0);H(W,ee,rp,"…","\\ldots",!0);H(W,ee,rp,"⋯","\\@cdots",!0);H(W,ee,rp,"⋱","\\ddots",!0);H(W,ee,ye,"⋮","\\varvdots");H(Ke,ee,ye,"⋮","\\varvdots");H(W,ee,Rr,"ˊ","\\acute");H(W,ee,Rr,"ˋ","\\grave");H(W,ee,Rr,"¨","\\ddot");H(W,ee,Rr,"~","\\tilde");H(W,ee,Rr,"ˉ","\\bar");H(W,ee,Rr,"˘","\\breve");H(W,ee,Rr,"ˇ","\\check");H(W,ee,Rr,"^","\\hat");H(W,ee,Rr,"⃗","\\vec");H(W,ee,Rr,"˙","\\dot");H(W,ee,Rr,"˚","\\mathring");H(W,ee,Kt,"","\\@imath");H(W,ee,Kt,"","\\@jmath");H(W,ee,ye,"ı","ı");H(W,ee,ye,"ȷ","ȷ");H(Ke,ee,ye,"ı","\\i",!0);H(Ke,ee,ye,"ȷ","\\j",!0);H(Ke,ee,ye,"ß","\\ss",!0);H(Ke,ee,ye,"æ","\\ae",!0);H(Ke,ee,ye,"œ","\\oe",!0);H(Ke,ee,ye,"ø","\\o",!0);H(Ke,ee,ye,"Æ","\\AE",!0);H(Ke,ee,ye,"Œ","\\OE",!0);H(Ke,ee,ye,"Ø","\\O",!0);H(Ke,ee,Rr,"ˊ","\\'");H(Ke,ee,Rr,"ˋ","\\`");H(Ke,ee,Rr,"ˆ","\\^");H(Ke,ee,Rr,"˜","\\~");H(Ke,ee,Rr,"ˉ","\\=");H(Ke,ee,Rr,"˘","\\u");H(Ke,ee,Rr,"˙","\\.");H(Ke,ee,Rr,"¸","\\c");H(Ke,ee,Rr,"˚","\\r");H(Ke,ee,Rr,"ˇ","\\v");H(Ke,ee,Rr,"¨",'\\"');H(Ke,ee,Rr,"˝","\\H");H(Ke,ee,Rr,"◯","\\textcircled");var IF={"--":!0,"---":!0,"``":!0,"''":!0};H(Ke,ee,ye,"–","--",!0);H(Ke,ee,ye,"–","\\textendash");H(Ke,ee,ye,"—","---",!0);H(Ke,ee,ye,"—","\\textemdash");H(Ke,ee,ye,"‘","`",!0);H(Ke,ee,ye,"‘","\\textquoteleft");H(Ke,ee,ye,"’","'",!0);H(Ke,ee,ye,"’","\\textquoteright");H(Ke,ee,ye,"“","``",!0);H(Ke,ee,ye,"“","\\textquotedblleft");H(Ke,ee,ye,"”","''",!0);H(Ke,ee,ye,"”","\\textquotedblright");H(W,ee,ye,"°","\\degree",!0);H(Ke,ee,ye,"°","\\degree");H(Ke,ee,ye,"°","\\textdegree",!0);H(W,ee,ye,"£","\\pounds");H(W,ee,ye,"£","\\mathsterling",!0);H(Ke,ee,ye,"£","\\pounds");H(Ke,ee,ye,"£","\\textsterling",!0);H(W,fe,ye,"✠","\\maltese");H(Ke,fe,ye,"✠","\\maltese");var JT='0123456789/@."';for(var n4=0;n4{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 lR[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return VLn[i]}else{if(r===120485||r===120486)return lR[0];if(120486{if(qu(e.classes)!==qu(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},$F=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},Qe=function(n,t,r,s){var i=new np(n,t,r,s);return CC(i),i},Gu=(e,n,t,r)=>new np(e,n,t,r),Ih=function(n,t,r){var s=Qe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=at(s.height),s.maxFontSize=1,s},YLn=function(n,t,r,s){var i=new Ry(n,t,r,s);return CC(i),i},zl=function(n){var t=new tp(n);return CC(t),t},$h=function(n,t){return n instanceof tp?Qe([],[n],t):n},ZLn=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=Qe(["mspace"],[],n),r=$r(e,n);return t.style.marginRight=at(r),t},A1=(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},sk={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"}},PF={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},FF=function(n,t){var[r,s,i]=PF[n],a=new Uu(r),o=new xl([a],{width:at(s),height:at(i),style:"width:"+at(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=Gu(["overlay"],[o],t);return c.height=i,c.style.height=at(i),c.style.width=at(s),c},Lr={number:3,unit:"mu"},T_={number:4,unit:"mu"},Jc={number:5,unit:"mu"},JLn={mord:{mop:Lr,mbin:T_,mrel:Jc,minner:Lr},mop:{mord:Lr,mop:Lr,mrel:Jc,minner:Lr},mbin:{mord:T_,mop:T_,mopen:T_,minner:T_},mrel:{mord:Jc,mop:Jc,mopen:Jc,minner:Jc},mopen:{},mclose:{mop:Lr,mbin:T_,mrel:Jc,minner:Lr},mpunct:{mord:Lr,mop:Lr,mrel:Jc,mopen:Lr,mclose:Lr,mpunct:Lr,minner:Lr},minner:{mord:Lr,mop:Lr,mbin:T_,mrel:Jc,mopen:Lr,mpunct:Lr,minner:Lr}},eIn={mord:{mop:Lr},mop:{mord:Lr,mop:Lr},mbin:{},mrel:{},mopen:{},mclose:{mop:Lr},mpunct:{},minner:{mop:Lr}},HF={},fb={},db={};function ft(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],b=w.classes[0];v==="mbin"&&nIn.has(b)?k.classes[0]="mord":b==="mbin"&&tIn.has(v)&&(w.classes[0]="mord")},{node:f},p,m),ik(i,(w,k)=>{var v,b,y=ok(k),x=ok(w),C=y&&x?w.hasClass("mtight")?(v=eIn[y])==null?void 0:v[x]:(b=JLn[y])==null?void 0:b[x]:null;if(C)return BF(C,u)},{node:f},p,m),i},ik=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()},qF=function(n){return n instanceof tp||n instanceof Ry||n instanceof np&&n.hasClass("enclosing")?n:null},ak=function(n,t){var r=qF(n);if(r){var s=r.children;if(s.length){if(t==="right")return ak(s[s.length-1],"right");if(t==="left")return ak(s[0],"left")}}return n},ok=function(n,t){if(!n)return null;t&&(n=ak(n,t));var r=n.classes[0];return sIn[r]||null},Z0=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Qe(t.concat(r))},ir=function(n,t,r){if(!n)return Qe();if(fb[n.type]){var s=fb[n.type](n,t);if(r&&t.size!==r.size){s=Qe(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new Je("Got group of unknown type: '"+n.type+"'")};function T1(e,n){var t=Qe(["base"],e,n),r=Qe(["strut"]);return r.style.height=at(t.height+t.depth),t.depth&&(r.style.verticalAlign=at(-t.depth)),t.children.unshift(r),t}function ck(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=zs(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(T1(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(T1(a,n));var u;t?(u=T1(zs(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var h=Qe(["katex-html"],i);if(h.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=at(h.height+h.depth),h.depth&&(f.style.verticalAlign=at(-h.depth))}return h}function UF(e){return new tp(e)}class et{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=qu(this.classes));for(var r=0;r0&&(n+=' class ="'+ri(qu(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class hs{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return ri(this.toText())}toText(){return this.text}}class GF{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",at(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var iIn=new Set(["\\imath","\\jmath"]),aIn=new Set(["mrow","mtable"]),Ga=function(n,t,r){return Ar[t][n]&&Ar[t][n].replace&&n.charCodeAt(0)!==55349&&!(IF.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Ar[t][n].replace),new hs(n)},EC=function(n){return n.length===1?n[0]:new et("mrow",n)},oIn={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"},NC=(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=oIn[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(iIn.has(i))return null;if(Ar[r][i]){var a=Ar[r][i].replace;a&&(i=a)}var o=sk[t].fontName;return kC(i,o,r)?sk[t].variant:null};function a4(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof hs&&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 hs&&t.text===","}else return!1}var Na=function(n,t,r){if(n.length===1){var s=kr(n[0],t);return r&&s instanceof et&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||a4(a))){var u=c.children[0];u instanceof et&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var h=a.children[0];if(h instanceof hs&&h.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var f=c.children[0];f instanceof hs&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(c),a=c}return i},Ku=function(n,t,r){return EC(Na(n,t,r))},kr=function(n,t){if(!n)return new et("mrow");if(db[n.type])return db[n.type](n,t);throw new Je("Got group of unknown type: '"+n.type+"'")};function uR(e,n,t,r,s){var i=Na(e,t),a;i.length===1&&i[0]instanceof et&&aIn.has(i[0].type)?a=i[0]:a=new et("mrow",i);var o=new et("annotation",[new hs(n)]);o.setAttribute("encoding","application/x-tex");var c=new et("semantics",[a,o]),u=new et("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var h=s?"katex":"katex-mathml";return Qe([h],[u])}var cIn=[[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]],_R=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],fR=function(n,t){return t.size<2?n:cIn[n-1][t.size-1]};class sl{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||sl.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=_R[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 sl(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:fR(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:_R[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=fR(sl.BASESIZE,n);return this.size===t&&this.textSize===sl.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!==sl.BASESIZE?["sizing","reset-size"+this.size,"size"+sl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=GLn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}sl.BASESIZE=6;var KF=function(n){return new sl({style:n.displayMode?nn.DISPLAY:nn.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},VF=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Qe(r,[n])}return n},lIn=function(n,t,r){var s=KF(r),i;if(r.output==="mathml")return uR(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=ck(n,s);i=Qe(["katex"],[a])}else{var o=uR(n,t,s,r.displayMode,!1),c=ck(n,s);i=Qe(["katex"],[o,c])}return VF(i,r)},uIn=function(n,t,r){var s=KF(r),i=ck(n,s),a=Qe(["katex"],[i]);return VF(a,r)},_In={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":"="},Dy=function(n){var t=new et("mo",[new hs(_In[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},fIn={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]},dIn=new Set(["widehat","widecheck","widetilde","utilde"]),Ly=function(n,t){function r(){var o=4e5,c=n.label.slice(1);if(dIn.has(c)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,h,f,p;if(u>5)c==="widehat"||c==="widecheck"?(h=420,o=2364,p=.42,f=c+"4"):(h=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],h=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],f=c+m):(o=[0,600,1033,2339,2340][m],h=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],f="tilde"+m)}var w=new Uu(f),k=new xl([w],{width:"100%",height:at(p),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:Gu([],[k],t),minWidth:0,height:p}}else{var v=[],b=fIn[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[y,x,C]=b,N=C/1e3,j=y.length,A,z;if(j===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');A=["hide-tail"],z=[b[3]]}else if(j===2)A=["halfarrow-left","halfarrow-right"],z=["xMinYMin","xMaxYMin"];else if(j===3)A=["brace-left","brace-center","brace-right"],z=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+j+" children.");for(var M=0;M0&&(s.style.minWidth=at(i)),s},hIn=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=Qe(["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 Z5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new Z5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new xl(u,{width:"100%",height:at(o)});a=Gu([],[h],i)}return a.height=o,a.style.height=at(o),a},pIn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},mIn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function gIn(e){return e in pIn}function mn(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 Iy(e){var n=$y(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 $y(e){return e&&(e.type==="atom"||mIn.hasOwnProperty(e.type))?e:null}var WF=e=>{if(e instanceof wa)return e;if(qLn(e)&&e.children.length===1)return WF(e.children[0])},zC=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=mn(e.base,"accent"),t=r.base,e.base=t,s=HLn(ir(e,n)),e.base=r):(r=mn(e,"accent"),t=r.base);var i=ir(t,n.havingCrampedStyle()),a=r.isShifty&&El(t),o=0;if(a){var c,u;o=(c=(u=WF(i))==null?void 0:u.skew)!=null?c:0}var h=r.label==="\\c",f=h?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=Ly(r,n),p=rr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+at(2*o)+")",marginLeft:at(2*o)}:void 0}]});else{var m,w;r.label==="\\vec"?(m=FF("vec",n),w=PF.vec[1]):(m=Oy({mode:r.mode,text:r.label},n,"textord"),m=FLn(m),m.italic=0,w=m.width,h&&(f+=m.depth)),p=Qe(["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=at(v),r.label==="\\textcircled"&&(p.style.top=".2em"),p=rr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]})}var b=Qe(["mord","accent"],[p],n);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},QF=(e,n)=>{var t=e.isStretchy?Dy(e.label):new et("mo",[Ga(e.label,e.mode)]),r=new et("mover",[kr(e.base,n),t]);return r.setAttribute("accent","true"),r},vIn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));ft({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=hb(n[0]),r=!vIn.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:zC,mathmlBuilder:QF});ft({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:zC,mathmlBuilder:QF});ft({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=ir(e.base,n),r=Ly(e,n),s=e.label==="\\utilde"?.12:0,i=rr({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Qe(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=Dy(e.label),r=new et("munder",[kr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var R1=e=>{var n=new et("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};ft({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=$h(ir(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=$h(ir(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=Ly(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 h;if(a){var f=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;h=rr({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 h=rr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return Qe(["mrel","x-arrow"],[h],n)},mathmlBuilder(e,n){var t=Dy(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=R1(kr(e.body,n));if(e.below){var i=R1(kr(e.below,n));r=new et("munderover",[t,i,s])}else r=new et("mover",[t,s])}else if(e.below){var a=R1(kr(e.below,n));r=new et("munder",[t,a])}else r=R1(),r=new et("mover",[t,r]);return r}});function XF(e,n){var t=zs(e.body,n,!0);return Qe([e.mclass],t,n)}function YF(e,n){var t,r=Na(e.body,n);return e.mclass==="minner"?t=new et("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new et("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new et("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}ft({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:ds(s),isCharacterBox:El(s)}},htmlBuilder:XF,mathmlBuilder:YF});var By=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"};ft({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:By(n[0]),body:ds(n[1]),isCharacterBox:El(n[1])}}});ft({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=By(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ds(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:El(c)}},htmlBuilder:XF,mathmlBuilder:YF});ft({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:By(n[0]),body:ds(n[0])}},htmlBuilder(e,n){var t=zs(e.body,n,!0),r=Qe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=Na(e.body,n),r=new et("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var bIn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},dR=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),hR=e=>e.type==="textord"&&e.text==="@",yIn=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function xIn(e,n,t){var r=bIn[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 wIn(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 Je("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=xIn(u,h,e),k={type:"styling",body:[w],mode:"math",style:"display",resetFont:!0};r.push(k),o=dR()}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([])}}ft({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=$h(ir(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=at(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new et("mrow",[kr(e.label,n)]);return t=new et("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new et("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});ft({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=$h(ir(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new et("mrow",[kr(e.fragment,n)])}});ft({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=mn(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new Je("\\@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 ZF=(e,n)=>{var t=zs(e.body,n.withColor(e.color),!1);return zl(t)},JF=(e,n)=>{var t=Na(e.body,n.withColor(e.color)),r=new et("mstyle",t);return r.setAttribute("mathcolor",e.color),r};ft({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=mn(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:ds(s)}},htmlBuilder:ZF,mathmlBuilder:JF});ft({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=mn(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:ZF,mathmlBuilder:JF});ft({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&&mn(s,"size").value}},htmlBuilder(e,n){var t=Qe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=at($r(e.size,n)))),t},mathmlBuilder(e,n){var t=new et("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",at($r(e.size,n)))),t}});var lk={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},eH=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Je("Expected a control sequence",e);return n},kIn=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},tH=(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)};ft({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(lk[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=lk[r.text]),mn(n.parseFunction(),"internal");throw new Je("Invalid token after macro prefix",r)}});ft({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 Je("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 Je('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Je('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new Je("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===lk[t]),{type:"internal",mode:n.mode}}});ft({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=eH(n.gullet.popToken());n.gullet.consumeSpaces();var s=kIn(n);return tH(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});ft({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=eH(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return tH(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var f0=function(n,t,r){var s=Ar.math[n]&&Ar.math[n].replace,i=kC(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},jC=function(n,t,r,s){var i=r.havingBaseStyle(t),a=Qe(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},nH=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=at(i),n.height-=i,n.depth+=i},SIn=function(n,t,r,s,i,a){var o=mi(n,"Main-Regular",i,s),c=jC(o,t,s,a);return nH(c,s,t),c},CIn=function(n,t,r,s){return mi(n,"Size"+t+"-Regular",r,s)},rH=function(n,t,r,s,i,a){var o=CIn(n,t,i,s),c=jC(Qe(["delimsizing","size"+t],[o],s),nn.TEXT,s,a);return r&&nH(c,s,nn.TEXT),c},o4=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=Qe(["delimsizinginner",s],[Qe([],[mi(n,t,r)])]);return{type:"elem",elem:i}},c4=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 Uu("inner",OLn(n,Math.round(1e3*t))),a=new xl([i],{width:at(s),height:at(t),style:"width:"+at(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Gu([],[a],r);return o.height=t,o.style.height=at(t),o.style.width=at(s),{type:"elem",elem:o}},uk=.008,M1={type:"kern",size:-1*uk},EIn=new Set(["|","\\lvert","\\rvert","\\vert"]),NIn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),sH=function(n,t,r,s,i,a){var o,c,u,h,f="",p=0;o=u=h=n,c=null;var m="Size1-Regular";n==="\\uparrow"?u=h="⏐":n==="\\Uparrow"?u=h="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",h="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",h="\\Downarrow"):EIn.has(n)?(u="∣",f="vert",p=333):NIn.has(n)?(u="∥",f="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",h="⎣",m="Size4-Regular",f="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",h="⎦",m="Size4-Regular",f="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",h="⎣",m="Size4-Regular",f="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=h="⎢",m="Size4-Regular",f="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",h="⎦",m="Size4-Regular",f="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=h="⎥",m="Size4-Regular",f="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",h="⎝",m="Size4-Regular",f="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",h="⎠",m="Size4-Regular",f="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",c="⎨",h="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",c="⎬",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",h="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",h="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",h="⎩",u="⎪",m="Size4-Regular");var w=f0(o,m,i),k=w.height+w.depth,v=f0(u,m,i),b=v.height+v.depth,y=f0(h,m,i),x=y.height+y.depth,C=0,N=1;if(c!==null){var j=f0(c,m,i);C=j.height+j.depth,N=2}var A=k+x+C,z=Math.max(0,Math.ceil((t-A)/(N*b))),M=A+z*N*b,D=s.fontMetrics().axisHeight;r&&(D*=s.sizeMultiplier);var I=M/2-D,B=[];if(f.length>0){var G=M-k-x,U=Math.round(M*1e3),Q=DLn(f,Math.round(G*1e3)),V=new Uu(f,Q),Z=at(p/1e3),J=at(U/1e3),$=new xl([V],{width:Z,height:J,viewBox:"0 0 "+p+" "+U}),L=Gu([],[$],s);L.height=U/1e3,L.style.width=Z,L.style.height=J,B.push({type:"elem",elem:L})}else{if(B.push(o4(h,m,i)),B.push(M1),c===null){var q=M-k-x+2*uk;B.push(c4(u,q,s))}else{var P=(M-k-x-C)/2+2*uk;B.push(c4(u,P,s)),B.push(M1),B.push(o4(c,m,i)),B.push(M1),B.push(c4(u,P,s))}B.push(M1),B.push(o4(o,m,i))}var F=s.havingBaseStyle(nn.TEXT),re=rr({positionType:"bottom",positionData:I,children:B});return jC(Qe(["delimsizing","mult"],[re],F),nn.TEXT,s,a)},l4=80,u4=.08,_4=function(n,t,r,s,i){var a=MLn(n,s,r),o=new Uu(n,a),c=new xl([o],{width:"400em",height:at(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Gu(["hide-tail"],[c],i)},zIn=function(n,t){var r=t.havingBaseSizing(),s=lH("\\surd",n*r.sizeMultiplier,cH,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,c,u,h,f;return s.type==="small"?(h=1e3+1e3*a+l4,n<1?i=1:n<1.4&&(i=.7),c=(1+a+u4)/i,u=(1+a)/i,o=_4("sqrtMain",c,h,a,t),o.style.minWidth="0.853em",f=.833/i):s.type==="large"?(h=(1e3+l4)*E0[s.size],u=(E0[s.size]+a)/i,c=(E0[s.size]+a+u4)/i,o=_4("sqrtSize"+s.size,c,h,a,t),o.style.minWidth="1.02em",f=1/i):(c=n+a+u4,u=n+a,h=Math.floor(1e3*n+a)+l4,o=_4("sqrtTall",c,h,a,t),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=at(c),{span:o,advanceWidth:f,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},iH=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),jIn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),aH=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),E0=[0,1.2,1.8,2.4,3],oH=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),iH.has(n)||aH.has(n))return rH(n,t,!1,r,s,i);if(jIn.has(n))return sH(n,E0[t],!1,r,s,i);throw new Je("Illegal delimiter: '"+n+"'")},AIn=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],TIn=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"stack"}],cH=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],RIn=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.")},lH=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]},_k=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;aH.has(n)?o=AIn:iH.has(n)?o=cH:o=TIn;var c=lH(n,t,o,s);return c.type==="small"?SIn(n,c.style,r,s,i,a):c.type==="large"?rH(n,c.size,r,s,i,a):sH(n,t,r,s,i,a)},f4=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,h=Math.max(t-o,r+o),f=Math.max(h/500*c,2*h-u);return _k(n,f,!0,s,i,a)},pR={"\\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}},MIn=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 mR(e){return"isMiddle"in e}function Py(e,n){var t=$y(e);if(t&&MIn.has(t.text))return t;throw t?new Je("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Je("Invalid delimiter type '"+e.type+"'",e)}ft({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=Py(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:pR[e.funcName].size,mclass:pR[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Qe([e.mclass]):oH(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Ga(e.delim,e.mode));var t=new et("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=at(E0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function gR(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ft({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 Je("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Py(n[0],e).text,color:t}}});ft({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=Py(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=mn(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{gR(e);for(var t=zs(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{gR(e);var t=Na(e.body,n);if(e.left!=="."){var r=new et("mo",[Ga(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new et("mo",[Ga(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return EC(t)}});ft({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=Py(n[0],e);if(!e.parser.leftrightDepth)throw new Je("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=Z0(n,[]):(t=oH(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Ga("|","text"):Ga(e.delim,e.mode),r=new et("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Fy=(e,n)=>{var t=$h(ir(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=El(e.body);if(r==="sout")i=Qe(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=$r({number:.6,unit:"pt"},n),u=$r({number:.35,unit:"ex"},n),h=n.havingBaseSizing();s=s/h.sizeMultiplier;var f=t.height+t.depth+c+u;t.style.paddingLeft=at(f/2+c);var p=Math.floor(1e3*f*s),m=TLn(p),w=new xl([new Uu("phase",m)],{width:"400em",height:at(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=Gu(["hide-tail"],[w],n),i.style.height=at(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,b=0;/box/.test(r)?(b=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:b),v=k):r==="angl"?(b=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*b,v=Math.max(0,.25-t.depth)):(k=o?.2:0,v=k),i=hIn(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=at(b)):r==="angl"&&b!==.049&&(i.style.borderTopWidth=at(b),i.style.borderRightWidth=at(b)),a=t.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var y;if(e.backgroundColor)y=rr({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var x=/cancel|phase/.test(r)?["svg-align"]:[];y=rr({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:x}]})}return/cancel/.test(r)&&(y.height=t.height,y.depth=t.depth),/cancel/.test(r)&&!o?Qe(["mord","cancel-lap"],[y],n):Qe(["mord"],[y],n)},Hy=(e,n)=>{var t,r=new et(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: "+at(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};ft({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=mn(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:Fy,mathmlBuilder:Hy});ft({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=mn(n[0],"color-token").color,a=mn(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:Fy,mathmlBuilder:Hy});ft({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]}}});ft({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:Fy,mathmlBuilder:Hy});ft({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:Fy,mathmlBuilder:Hy});ft({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 uH={};function vc(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 Je("{"+e.envName+"} can be used only in display mode.")},OIn=new Set(["gather","gather*"]);function AC(e){if(!e.includes("ed"))return!e.includes("*")}function e_(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:c,singleRow:u,emptySingleRow:h,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 Je("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var w=[],k=[w],v=[],b=[],y=c!=null?[]:void 0;function x(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new ba("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(x(),b.push(vR(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var j={type:"ordgroup",mode:e.mode,body:N};t&&(j={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[j]}),w.push(j);var A=e.fetch().text;if(A==="&"){if(f&&w.length===f){if(u||o)throw new Je("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&&j.type==="styling"&&j.body.length===1&&j.body[0].type==="ordgroup"&&j.body[0].body.length===0&&(k.length>1||!h)&&k.pop(),b.length0&&(x+=.25),u.push({pos:x,isDashed:qe[rt]})}for(C(a[0]),r=0;r0&&(I+=y,Aqe))for(r=0;r=o)){var oe=void 0;if(s>0||n.hskipBeforeAndAfter){var ce,pe;oe=(ce=(pe=F)==null?void 0:pe.pregap)!=null?ce:p,oe!==0&&(Q=Qe(["arraycolsep"],[]),Q.style.width=at(oe),U.push(Q))}var ve=[];for(r=0;r0){for(var jt=Ih("hline",t,h),Pt=Ih("hdashline",t,h),Le=[{type:"elem",elem:Mt,shift:0}];u.length>0;){var nt=u.pop(),ke=nt.pos-B;nt.isDashed?Le.push({type:"elem",elem:Pt,shift:ke}):Le.push({type:"elem",elem:jt,shift:ke})}Mt=rr({positionType:"individualShift",children:Le})}if(Z.length===0)return Qe(["mord"],[Mt],t);var me=rr({positionType:"individualShift",children:Z}),je=Qe(["tag"],[me],t);return zl([Mt,je])},DIn={c:"center ",l:"left ",r:"right "},yc=function(n,t){for(var r=[],s=new et("mtd",[],["mtr-glue"]),i=new et("mtd",[],["mml-eqn-num"]),a=0;a0){var w=n.cols,k="",v=!1,b=0,y=w.length;w[0].type==="separator"&&(p+="top ",b=1),w[w.length-1].type==="separator"&&(p+="bottom ",y-=1);for(var x=b;x0?"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};vc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=$y(n[0]),r=t?[n[0]]:mn(n[0],"ordgroup").body,s=r.map(function(a){var o=Iy(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 Je("Unknown column alignment: "+c,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return e_(e.parser,i,TC(e.envName))},htmlBuilder:bc,mathmlBuilder:yc});vc({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 Je("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=e_(e.parser,r,TC(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:bc,mathmlBuilder:yc});vc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=e_(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=$y(n[0]),r=t?[n[0]]:mn(n[0],"ordgroup").body,s=r.map(function(o){var c=Iy(o),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new Je("Unknown column alignment: "+u,o)});if(s.length>1)throw new Je("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=e_(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new Je("{subarray} can contain only one column");return a},htmlBuilder:bc,mathmlBuilder:yc});vc({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=e_(e.parser,n,TC(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:fH,htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){OIn.has(e.envName)&&qy(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:AC(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return e_(e.parser,n,"display")},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:fH,htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){qy(e);var n={autoTag:AC(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return e_(e.parser,n,"display")},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return qy(e),wIn(e.parser)},htmlBuilder:bc,mathmlBuilder:yc});ae("\\nonumber","\\gdef\\@eqnsw{0}");ae("\\notag","\\nonumber");ft({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Je(e.funcName+" valid only within array environment")}});var bR=uH;ft({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 Je("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return ir(e.body,r)},hH=(e,n)=>{var t=e.font,r=n.withFont(t);return kr(e.body,r)},yR={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};ft({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=hb(n[0]),i=r;return i in yR&&(i=yR[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:dH,mathmlBuilder:hH});ft({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:By(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:El(r)}}});ft({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:dH,mathmlBuilder:hH});var LIn=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var a=ir(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(h){var y=n.fontMetrics().axisHeight;m-a.depth-(y+.5*f){var t=new et("mfrac",[kr(e.numer,n),kr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=$r(e.barSize,n);t.setAttribute("linethickness",at(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new et("mo",[new hs(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new et("mo",[new hs(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return EC(s)}return t},pH=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};ft({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",h=null;return u||r.startsWith("\\d")?h="display":r.startsWith("\\t")&&(h="text"),pH({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:c,barSize:null},h)},htmlBuilder:LIn,mathmlBuilder:IIn});ft({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 xR=["display","text","script","scriptscript"],wR=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};ft({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=hb(n[0]),a=i.type==="atom"&&i.family==="open"?wR(i.text):null,o=hb(n[1]),c=o.type==="atom"&&o.family==="close"?wR(o.text):null,u=mn(n[2],"size"),h,f=null;u.isBlank?h=!0:(f=u.value,h=f.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var w=mn(m.body[0],"textord");p=xR[Number(w.text)]}}else m=mn(m,"textord"),p=xR[Number(m.text)];return pH({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:h,barSize:f,leftDelim:a,rightDelim:c},p)}});ft({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:mn(n[0],"size").value,token:s}}});ft({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=mn(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 mH=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?ir(e.sup,n.havingStyle(t.sup()),n):ir(e.sub,n.havingStyle(t.sub()),n),s=mn(e.base,"horizBrace")):s=mn(e,"horizBrace");var i=ir(s.base,n.havingBaseStyle(nn.DISPLAY)),a=Ly(s,n),o;if(s.isOver?o=rr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=rr({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=Qe(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=rr({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=rr({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Qe(["minner",s.isOver?"mover":"munder"],[o],n)},$In=(e,n)=>{var t=Dy(e.label);return new et(e.isOver?"mover":"munder",[kr(e.base,n),t])};ft({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:mH,mathmlBuilder:$In});ft({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=mn(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:ds(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=zs(e.body,n,!1);return YLn(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=Ku(e.body,n);return t instanceof et||(t=new et("mrow",[t])),t.setAttribute("href",e.href),t}});ft({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=mn(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=mn(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(","),h=0;h{var t=zs(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Qe(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)=>Ku(e.body,n)});ft({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:ds(n[0]),mathml:ds(n[1])}},htmlBuilder:(e,n)=>{var t=zs(e.html,n,!1);return zl(t)},mathmlBuilder:(e,n)=>Ku(e.mathml,n)});var d4=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 Je("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!MF(r))throw new Je("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ft({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=mn(t[0],"raw").string,u=c.split(","),h=0;h{var t=$r(e.height,n),r=0;e.totalheight.number>0&&(r=$r(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=$r(e.width,n));var i={height:at(t+r)};s>0&&(i.width=at(s)),r>0&&(i.verticalAlign=at(-r));var a=new BLn(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new et("mglyph",[]);t.setAttribute("alt",e.alt);var r=$r(e.height,n),s=0;if(e.totalheight.number>0&&(s=$r(e.totalheight,n)-r,t.setAttribute("valign",at(-s))),t.setAttribute("height",at(r+s)),e.width.number>0){var i=$r(e.width,n);t.setAttribute("width",at(i))}return t.setAttribute("src",e.src),t}});ft({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=mn(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 BF(e.dimension,n)},mathmlBuilder(e,n){var t=$r(e.dimension,n);return new GF(t)}});ft({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=Qe([],[ir(e.body,n)]),t=Qe(["inner"],[t],n)):t=Qe(["inner"],[ir(e.body,n)]);var r=Qe(["fix"],[]),s=Qe([e.alignment],[t,r],n),i=Qe(["strut"]);return i.style.height=at(s.height+s.depth),s.depth&&(i.style.verticalAlign=at(-s.depth)),s.children.unshift(i),s=Qe(["thinbox"],[s],n),Qe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new et("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}});ft({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}}});ft({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Je("Mismatched "+e.funcName)}});var kR=(e,n)=>{switch(n.style.size){case nn.DISPLAY.size:return e.display;case nn.TEXT.size:return e.text;case nn.SCRIPT.size:return e.script;case nn.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ft({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:ds(n[0]),text:ds(n[1]),script:ds(n[2]),scriptscript:ds(n[3])}},htmlBuilder:(e,n)=>{var t=kR(e,n),r=zs(t,n,!1);return zl(r)},mathmlBuilder:(e,n)=>{var t=kR(e,n);return Ku(t,n)}});var gH=(e,n,t,r,s,i,a)=>{e=Qe([],[e]);var o=t&&El(t),c,u;if(n){var h=ir(n,r.havingStyle(s.sup()),r);u={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(t){var f=ir(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=rr({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:at(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:at(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var w=e.height-a;p=rr({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:at(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var k=e.depth+a;p=rr({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:at(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&i!==0&&!o){var b=Qe(["mspace"],[],r);b.style.marginRight=at(i),v.unshift(b)}return Qe(["mop","op-limits"],v,r)},vH=new Set(["\\smallint"]),sp=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=mn(e.base,"op"),s=!0):i=mn(e,"op");var a=n.style,o=!1;a.size===nn.DISPLAY.size&&i.symbol&&!vH.has(i.name)&&(o=!0);var c,u;if(i.symbol){var h=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=mi(i.name,h,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=c.italic,f.length>0){var p=FF(f+"Size"+(o?"2":"1"),n);c=rr({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=zs(i.body,n,!0);m.length===1&&m[0]instanceof wa?(c=m[0],c.classes[0]="mop"):c=Qe(["mop"],m,n)}else{for(var w=[],k=1;k{var t;if(e.symbol)t=new et("mo",[Ga(e.name,e.mode)]),vH.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new et("mo",Na(e.body,n));else{t=new et("mi",[new hs(e.name.slice(1))]);var r=new et("mo",[Ga("⁡","text")]);e.parentIsSupSub?t=new et("mrow",[t,r]):t=UF([t,r])}return t},BIn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ft({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=BIn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:sp,mathmlBuilder:Vm});ft({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:ds(r)}},htmlBuilder:sp,mathmlBuilder:Vm});var PIn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ft({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:sp,mathmlBuilder:Vm});ft({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:sp,mathmlBuilder:Vm});ft({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=PIn[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:sp,mathmlBuilder:Vm});var bH=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=mn(e.base,"operatorname"),s=!0):i=mn(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=zs(o,n.withFont("mathrm"),!0),u=0;u{for(var t=Na(e.body,n.withFont("mathrm")),r=!0,s=0;sh.toText()).join("");t=[new hs(o)]}var c=new et("mi",t);c.setAttribute("mathvariant","normal");var u=new et("mo",[Ga("⁡","text")]);return e.parentIsSupSub?new et("mrow",[c,u]):UF([c,u])};ft({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:ds(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:bH,mathmlBuilder:FIn});ae("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Pf({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?zl(zs(e.body,n,!1)):Qe(["mord"],zs(e.body,n,!0),n)},mathmlBuilder(e,n){return Ku(e.body,n,!0)}});ft({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=ir(e.body,n.havingCrampedStyle()),r=Ih("overline-line",n),s=n.fontMetrics().defaultRuleThickness,i=rr({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Qe(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new et("mo",[new hs("‾")]);t.setAttribute("stretchy","true");var r=new et("mover",[kr(e.body,n),t]);return r.setAttribute("accent","true"),r}});ft({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:ds(r)}},htmlBuilder:(e,n)=>{var t=zs(e.body,n.withPhantom(),!1);return zl(t)},mathmlBuilder:(e,n)=>{var t=Na(e.body,n);return new et("mphantom",t)}});ae("\\hphantom","\\smash{\\phantom{#1}}");ft({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=Qe(["inner"],[ir(e.body,n.withPhantom())]),r=Qe(["fix"],[]);return Qe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=Na(ds(e.body),n),r=new et("mphantom",t),s=new et("mpadded",[r]);return s.setAttribute("width","0px"),s}});ft({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=mn(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=ir(e.body,n),r=$r(e.dy,n);return rr({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new et("mpadded",[kr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});ft({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});ft({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=mn(n[0],"size"),a=mn(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&mn(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=Qe(["mord","rule"],[],n),r=$r(e.width,n),s=$r(e.height,n),i=e.shift?$r(e.shift,n):0;return t.style.borderRightWidth=at(r),t.style.borderTopWidth=at(s),t.style.bottom=at(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=$r(e.width,n),r=$r(e.height,n),s=e.shift?$r(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new et("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",at(t)),a.setAttribute("height",at(r));var o=new et("mpadded",[a]);return s>=0?o.setAttribute("height",at(s)):(o.setAttribute("height",at(s)),o.setAttribute("depth",at(-s))),o.setAttribute("voffset",at(s)),o}});function yH(e,n,t){for(var r=zs(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return yH(e.body,t,n)};ft({type:"sizing",names:SR,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:SR.indexOf(r)+1,body:i}},htmlBuilder:HIn,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=Na(e.body,t),s=new et("mstyle",r);return s.setAttribute("mathsize",at(t.sizeMultiplier)),s}});ft({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]&&mn(t[0],"ordgroup");if(a)for(var o,c=0;c{var t=Qe([],[ir(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 Qe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new et("mpadded",[kr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});ft({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=ir(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=$h(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=at(h);var m=rr({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(nn.SCRIPTSCRIPT),k=ir(e.index,w,n),v=.6*(m.height-m.depth),b=rr({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),y=Qe(["root"],[b]);return Qe(["mord","sqrt"],[y,m],n)}else return Qe(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new et("mroot",[kr(t,n),kr(r,n)]):new et("msqrt",[kr(t,n)])}});var fk={display:nn.DISPLAY,text:nn.TEXT,script:nn.SCRIPT,scriptscript:nn.SCRIPTSCRIPT};function qIn(e){return e in fk}ft({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(!qIn(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=fk[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),yH(e.body,r,n)},mathmlBuilder(e,n){var t=fk[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=Na(e.body,r),i=new et("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 UIn=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===nn.DISPLAY.size||r.alwaysHandleSupSub);return s?sp:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===nn.DISPLAY.size||r.limits);return i?bH:null}else{if(r.type==="accent")return El(r.base)?zC:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?mH:null}else return null}else return null};Pf({type:"supsub",htmlBuilder(e,n){var t=UIn(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,a=ir(r,n),o,c,u=n.fontMetrics(),h=0,f=0,p=r&&El(r);if(s){var m=n.havingStyle(n.style.sup());o=ir(s,m,n),p||(h=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var w=n.havingStyle(n.style.sub());c=ir(i,w,n),p||(f=a.depth+w.fontMetrics().subDrop*w.sizeMultiplier/n.sizeMultiplier)}var k;n.style===nn.DISPLAY?k=u.sup1:n.style.cramped?k=u.sup3:k=u.sup2;var v=n.sizeMultiplier,b=at(.5/u.ptPerEm/v),y=null;if(c){var x=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof wa||x){var C;y=at(-((C=a.italic)!=null?C:0))}}var N;if(o&&c){h=Math.max(h,k,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var j=u.defaultRuleThickness,A=4*j;if(h-o.depth-(c.height-f)0&&(h+=z,f-=z)}var M=[{type:"elem",elem:c,shift:f,marginRight:b,marginLeft:y},{type:"elem",elem:o,shift:-h,marginRight:b}];N=rr({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:y,marginRight:b}];N=rr({positionType:"shift",positionData:f,children:D})}else if(o)h=Math.max(h,k,o.depth+.25*u.xHeight),N=rr({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var I=ok(a,"right")||"mord";return Qe([I],[a,Qe(["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===nn.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===nn.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===nn.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===nn.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===nn.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===nn.DISPLAY)?a="mover":a="msup"}return new et(a,i)}});Pf({type:"atom",htmlBuilder(e,n){return SC(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new et("mo",[Ga(e.text,e.mode)]);if(e.family==="bin"){var r=NC(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 xH={mi:"italic",mn:"normal",mtext:"normal"};Pf({type:"mathord",htmlBuilder(e,n){return Oy(e,n,"mathord")},mathmlBuilder(e,n){var t=new et("mi",[Ga(e.text,e.mode,n)]),r=NC(e,n)||"italic";return r!==xH[t.type]&&t.setAttribute("mathvariant",r),t}});Pf({type:"textord",htmlBuilder(e,n){return Oy(e,n,"textord")},mathmlBuilder(e,n){var t=Ga(e.text,e.mode,n),r=NC(e,n)||"normal",s;return e.mode==="text"?s=new et("mtext",[t]):/[0-9]/.test(e.text)?s=new et("mn",[t]):e.text==="\\prime"?s=new et("mo",[t]):s=new et("mi",[t]),r!==xH[s.type]&&s.setAttribute("mathvariant",r),s}});var h4={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},p4={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Pf({type:"spacing",htmlBuilder(e,n){if(p4.hasOwnProperty(e.text)){var t=p4[e.text].className||"";if(e.mode==="text"){var r=Oy(e,n,"textord");return r.classes.push(t),r}else return Qe(["mspace",t],[SC(e.text,e.mode,n)],n)}else{if(h4.hasOwnProperty(e.text))return Qe(["mspace",h4[e.text]],[],n);throw new Je('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(p4.hasOwnProperty(e.text))t=new et("mtext",[new hs(" ")]);else{if(h4.hasOwnProperty(e.text))return new et("mspace");throw new Je('Unknown type of space "'+e.text+'"')}return t}});var CR=()=>{var e=new et("mtd",[]);return e.setAttribute("width","50%"),e};Pf({type:"tag",mathmlBuilder(e,n){var t=new et("mtable",[new et("mtr",[CR(),new et("mtd",[Ku(e.body,n)]),CR(),new et("mtd",[Ku(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var ER={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},NR={"\\textbf":"textbf","\\textmd":"textmd"},GIn={"\\textit":"textit","\\textup":"textup"},zR=(e,n)=>{var t=e.font;if(t){if(ER[t])return n.withTextFontFamily(ER[t]);if(NR[t])return n.withTextFontWeight(NR[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(GIn[t])};ft({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:ds(s),font:r}},htmlBuilder(e,n){var t=zR(e,n),r=zs(e.body,t,!0);return Qe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=zR(e,n);return Ku(e.body,t)}});ft({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=ir(e.body,n),r=Ih("underline-line",n),s=n.fontMetrics().defaultRuleThickness,i=rr({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Qe(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new et("mo",[new hs("‾")]);t.setAttribute("stretchy","true");var r=new et("munder",[kr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});ft({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=ir(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return rr({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new et("mpadded",[kr(e.body,n)],["vcenter"]);return new et("mrow",[t])}});ft({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Je("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=jR(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),Mu=HF,wH=`[ \r + ]`,KIn="\\\\[a-zA-Z@]+",VIn="\\\\[^\uD800-\uDFFF]",WIn="("+KIn+")"+wH+"*",QIn=`\\\\( |[ \r ]+ -?)[ \r ]*`,ik="[̀-ͯ]",ELn=new RegExp(ik+"+$"),NLn="("+iH+"+)|"+(CLn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(ik+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(ik+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+SLn)+("|"+kLn+")");class vR{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(NLn,"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 va("EOF",new Hi(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Ze("Unexpected character: '"+n[t]+"'",new va(n[t],new Hi(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 va(s,new Hi(this,t,this.tokenRegex.lastIndex))}}class zLn{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 Ze("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 jLn=WF;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 bR={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 Ze("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=bR[n.text],r==null||r>=t)throw new Ze("Invalid base-"+t+" digit "+n.text);for(var s;(s=bR[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Ze("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new Ze("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new Ze("\\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 Ze("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=>bC(e,!1,!0,!1));se("\\renewcommand",e=>bC(e,!0,!1,!1));se("\\providecommand",e=>bC(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),Ou[t],Nr.math[t],Nr.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 yR={",":"\\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"},ALn=new Set(["bin","rel"]);se("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in yR?n=yR[t]:(t.slice(0,4)==="\\not"||t in Nr.math&&ALn.has(Nr.math[t].group))&&(n="\\dotsb"),n});var yC={")":!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 yC?"\\ldots\\,":"\\ldots"});se("\\dotsc",function(e){var n=e.future().text;return n in yC&&n!==","?"\\ldots\\,":"\\ldots"});se("\\cdots",function(e){var n=e.future().text;return n in yC?"\\@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 Ze("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 aH=it(tc["Main-Regular"][84][1]-.7*tc["Main-Regular"][65][1]);se("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+aH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");se("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+aH+"}{\\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 oH=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,h=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};se("\\bra@ket",oH(!1));se("\\bra@set",oH(!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 cH={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class TLn{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 zLn(jLn,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new vR(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 va("EOF",r.loc)),this.pushTokens(s),new va("",Hi.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 Ze("Extra }",i)}else if(i.text==="EOF")throw new Ze("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 Ze("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Ze("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 Ze("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 Ze("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 Ze("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 va(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 vR(s,this.settings),c=[],u=o.lex();u.text!=="EOF";)c.push(u),u=o.lex();c.reverse();var h={tokens:c,numArgs:i};return h}return s}isDefined(n){return this.macros.has(n)||Ou.hasOwnProperty(n)||Nr.math.hasOwnProperty(n)||Nr.text.hasOwnProperty(n)||cH.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Ou.hasOwnProperty(n)&&!Ou[n].primitive}}var xR=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,O1=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),f4={"́":{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"}},wR={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Py{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 TLn(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 Ze("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 va("}")),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(Py.endOfExpression.has(s.text)||t&&s.text===t||n&&Ou[s.text]&&Ou[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&&(pF(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:Hi.range(n),text:t};else return null;if(this.consume(),i)for(var h=0;h0?{type:"text",value:j}:void 0),j===!1?p.lastIndex=C+1:(w!==C&&y.push({type:"text",value:u.value.slice(w,C)}),Array.isArray(j)?y.push(...j):j&&y.push(j),w=C+x[0].length,b=!0),!p.global)break;x=p.exec(u.value)}return b?(w?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=SR(e,"(");let i=SR(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 fH(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||yf(t)||wy(t))&&(!n||t!==47)}dH.peek=uIn;function nIn(){this.buffer()}function rIn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function sIn(){this.buffer()}function iIn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function aIn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=vo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function oIn(e){this.exit(e)}function cIn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=vo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function lIn(e){this.exit(e)}function uIn(){return"["}function dH(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 _In(){return{enter:{gfmFootnoteCallString:nIn,gfmFootnoteCall:rIn,gfmFootnoteDefinitionLabelString:sIn,gfmFootnoteDefinition:iIn},exit:{gfmFootnoteCallString:aIn,gfmFootnoteCall:oIn,gfmFootnoteDefinitionLabelString:cIn,gfmFootnoteDefinition:lIn}}}function fIn(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:dH},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"),h=i.enter("label");return c+=o.move(i.safe(i.associationId(r),{before:c,after:"]"})),h(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((n?` -`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?hH:dIn))),u(),c}}function dIn(e,n,t){return n===0?e:hH(e,n,t)}function hH(e,n,t){return(t?"":" ")+e}const hIn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];pH.peek=bIn;function pIn(){return{canContainEols:["delete"],enter:{strikethrough:gIn},exit:{strikethrough:vIn}}}function mIn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:hIn}],handlers:{delete:pH}}}function gIn(e){this.enter({type:"delete",children:[]},e)}function vIn(e){this.exit(e)}function pH(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 bIn(){return"~"}function yIn(e){return e.length}function xIn(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||yIn,i=[],a=[],o=[],c=[];let u=0,h=-1;for(;++hu&&(u=e[h].length);++bc[b])&&(c[b]=x)}k.push(y)}a[h]=k,o[h]=v}let f=-1;if(typeof r=="object"&&"length"in r)for(;++fc[f]&&(c[f]=y),m[f]=y),p[f]=x}a.splice(1,0,p),o.splice(1,0,m),h=-1;const w=[];for(;++h "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),SIn);return s(),a}function SIn(e,n,t){return">"+(t?"":" ")+e}function CIn(e,n){return ER(e,n.inConstruct,!0)&&!ER(e,n.notInConstruct,!1)}function ER(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 EIn(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 NIn(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 zIn(e,n,t,r){const s=NIn(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(EIn(e,t)){const f=t.enter("codeIndented"),p=t.indentLines(i,jIn);return f(),p}const o=t.createTracker(r),c=s.repeat(Math.max(mH(i,s)+1,3)),u=t.enter("codeFenced");let h=o.move(c);if(e.lang){const f=t.enter(`codeFencedLang${a}`);h+=o.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=t.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(t.safe(e.meta,{before:h,after:` +?)[ \r ]*`,dk="[̀-ͯ]",XIn=new RegExp(dk+"+$"),YIn="("+wH+"+)|"+(QIn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(dk+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(dk+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+WIn)+("|"+VIn+")");class AR{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(YIn,"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 ba("EOF",new Hi(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Je("Unexpected character: '"+n[t]+"'",new ba(n[t],new Hi(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 ba(s,new Hi(this,t,this.tokenRegex.lastIndex))}}class ZIn{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 Je("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 JIn=_H;ae("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ae("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ae("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ae("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ae("\\@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}});ae("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ae("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var TR={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};ae("\\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 Je("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=TR[n.text],r==null||r>=t)throw new Je("Invalid base-"+t+" digit "+n.text);for(var s;(s=TR[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Je("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new Je("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new Je("\\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 Je("Invalid number of arguments: "+c);o=parseInt(c),s=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:s,numArgs:o}),""};ae("\\newcommand",e=>RC(e,!1,!0,!1));ae("\\renewcommand",e=>RC(e,!0,!1,!1));ae("\\providecommand",e=>RC(e,!0,!0,!0));ae("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ae("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ae("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),Mu[t],Ar.math[t],Ar.text[t]),""});ae("\\bgroup","{");ae("\\egroup","}");ae("~","\\nobreakspace");ae("\\lq","`");ae("\\rq","'");ae("\\aa","\\r a");ae("\\AA","\\r A");ae("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ae("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ae("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ae("ℬ","\\mathscr{B}");ae("ℰ","\\mathscr{E}");ae("ℱ","\\mathscr{F}");ae("ℋ","\\mathscr{H}");ae("ℐ","\\mathscr{I}");ae("ℒ","\\mathscr{L}");ae("ℳ","\\mathscr{M}");ae("ℛ","\\mathscr{R}");ae("ℭ","\\mathfrak{C}");ae("ℌ","\\mathfrak{H}");ae("ℨ","\\mathfrak{Z}");ae("\\Bbbk","\\Bbb{k}");ae("\\llap","\\mathllap{\\textrm{#1}}");ae("\\rlap","\\mathrlap{\\textrm{#1}}");ae("\\clap","\\mathclap{\\textrm{#1}}");ae("\\mathstrut","\\vphantom{(}");ae("\\underbar","\\underline{\\text{#1}}");ae("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ae("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ae("\\ne","\\neq");ae("≠","\\neq");ae("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ae("∉","\\notin");ae("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ae("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ae("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ae("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ae("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ae("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ae("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ae("⟂","\\perp");ae("‼","\\mathclose{!\\mkern-0.8mu!}");ae("∌","\\notni");ae("⌜","\\ulcorner");ae("⌝","\\urcorner");ae("⌞","\\llcorner");ae("⌟","\\lrcorner");ae("©","\\copyright");ae("®","\\textregistered");ae("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ae("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ae("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ae("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ae("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ae("⋮","\\vdots");ae("\\varGamma","\\mathit{\\Gamma}");ae("\\varDelta","\\mathit{\\Delta}");ae("\\varTheta","\\mathit{\\Theta}");ae("\\varLambda","\\mathit{\\Lambda}");ae("\\varXi","\\mathit{\\Xi}");ae("\\varPi","\\mathit{\\Pi}");ae("\\varSigma","\\mathit{\\Sigma}");ae("\\varUpsilon","\\mathit{\\Upsilon}");ae("\\varPhi","\\mathit{\\Phi}");ae("\\varPsi","\\mathit{\\Psi}");ae("\\varOmega","\\mathit{\\Omega}");ae("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ae("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ae("\\boxed","\\fbox{$\\displaystyle{#1}$}");ae("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ae("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ae("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ae("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ae("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var RR={",":"\\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"},e$n=new Set(["bin","rel"]);ae("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in RR?n=RR[t]:(t.slice(0,4)==="\\not"||t in Ar.math&&e$n.has(Ar.math[t].group))&&(n="\\dotsb"),n});var MC={")":!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};ae("\\dotso",function(e){var n=e.future().text;return n in MC?"\\ldots\\,":"\\ldots"});ae("\\dotsc",function(e){var n=e.future().text;return n in MC&&n!==","?"\\ldots\\,":"\\ldots"});ae("\\cdots",function(e){var n=e.future().text;return n in MC?"\\@cdots\\,":"\\@cdots"});ae("\\dotsb","\\cdots");ae("\\dotsm","\\cdots");ae("\\dotsi","\\!\\cdots");ae("\\dotsx","\\ldots\\,");ae("\\DOTSI","\\relax");ae("\\DOTSB","\\relax");ae("\\DOTSX","\\relax");ae("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ae("\\,","\\tmspace+{3mu}{.1667em}");ae("\\thinspace","\\,");ae("\\>","\\mskip{4mu}");ae("\\:","\\tmspace+{4mu}{.2222em}");ae("\\medspace","\\:");ae("\\;","\\tmspace+{5mu}{.2777em}");ae("\\thickspace","\\;");ae("\\!","\\tmspace-{3mu}{.1667em}");ae("\\negthinspace","\\!");ae("\\negmedspace","\\tmspace-{4mu}{.2222em}");ae("\\negthickspace","\\tmspace-{5mu}{.277em}");ae("\\enspace","\\kern.5em ");ae("\\enskip","\\hskip.5em\\relax");ae("\\quad","\\hskip1em\\relax");ae("\\qquad","\\hskip2em\\relax");ae("\\tag","\\@ifstar\\tag@literal\\tag@paren");ae("\\tag@paren","\\tag@literal{({#1})}");ae("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Je("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ae("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ae("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ae("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ae("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ae("\\newline","\\\\\\relax");ae("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var kH=at(nc["Main-Regular"][84][1]-.7*nc["Main-Regular"][65][1]);ae("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+kH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ae("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+kH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ae("\\hspace","\\@ifstar\\@hspacer\\@hspace");ae("\\@hspace","\\hskip #1\\relax");ae("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ae("\\ordinarycolon",":");ae("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ae("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ae("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ae("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ae("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ae("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ae("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ae("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ae("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ae("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ae("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ae("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ae("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ae("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ae("∷","\\dblcolon");ae("∹","\\eqcolon");ae("≔","\\coloneqq");ae("≕","\\eqqcolon");ae("⩴","\\Coloneqq");ae("\\ratio","\\vcentcolon");ae("\\coloncolon","\\dblcolon");ae("\\colonequals","\\coloneqq");ae("\\coloncolonequals","\\Coloneqq");ae("\\equalscolon","\\eqqcolon");ae("\\equalscoloncolon","\\Eqqcolon");ae("\\colonminus","\\coloneq");ae("\\coloncolonminus","\\Coloneq");ae("\\minuscolon","\\eqcolon");ae("\\minuscoloncolon","\\Eqcolon");ae("\\coloncolonapprox","\\Colonapprox");ae("\\coloncolonsim","\\Colonsim");ae("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ae("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ae("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ae("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ae("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ae("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ae("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ae("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ae("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ae("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ae("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ae("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ae("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ae("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ae("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ae("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ae("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ae("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ae("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ae("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ae("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ae("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ae("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ae("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ae("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ae("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ae("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ae("\\imath","\\html@mathml{\\@imath}{ı}");ae("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ae("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ae("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ae("⟦","\\llbracket");ae("⟧","\\rrbracket");ae("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ae("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ae("⦃","\\lBrace");ae("⦄","\\rBrace");ae("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ae("⦵","\\minuso");ae("\\darr","\\downarrow");ae("\\dArr","\\Downarrow");ae("\\Darr","\\Downarrow");ae("\\lang","\\langle");ae("\\rang","\\rangle");ae("\\uarr","\\uparrow");ae("\\uArr","\\Uparrow");ae("\\Uarr","\\Uparrow");ae("\\N","\\mathbb{N}");ae("\\R","\\mathbb{R}");ae("\\Z","\\mathbb{Z}");ae("\\alef","\\aleph");ae("\\alefsym","\\aleph");ae("\\Alpha","\\mathrm{A}");ae("\\Beta","\\mathrm{B}");ae("\\bull","\\bullet");ae("\\Chi","\\mathrm{X}");ae("\\clubs","\\clubsuit");ae("\\cnums","\\mathbb{C}");ae("\\Complex","\\mathbb{C}");ae("\\Dagger","\\ddagger");ae("\\diamonds","\\diamondsuit");ae("\\empty","\\emptyset");ae("\\Epsilon","\\mathrm{E}");ae("\\Eta","\\mathrm{H}");ae("\\exist","\\exists");ae("\\harr","\\leftrightarrow");ae("\\hArr","\\Leftrightarrow");ae("\\Harr","\\Leftrightarrow");ae("\\hearts","\\heartsuit");ae("\\image","\\Im");ae("\\infin","\\infty");ae("\\Iota","\\mathrm{I}");ae("\\isin","\\in");ae("\\Kappa","\\mathrm{K}");ae("\\larr","\\leftarrow");ae("\\lArr","\\Leftarrow");ae("\\Larr","\\Leftarrow");ae("\\lrarr","\\leftrightarrow");ae("\\lrArr","\\Leftrightarrow");ae("\\Lrarr","\\Leftrightarrow");ae("\\Mu","\\mathrm{M}");ae("\\natnums","\\mathbb{N}");ae("\\Nu","\\mathrm{N}");ae("\\Omicron","\\mathrm{O}");ae("\\plusmn","\\pm");ae("\\rarr","\\rightarrow");ae("\\rArr","\\Rightarrow");ae("\\Rarr","\\Rightarrow");ae("\\real","\\Re");ae("\\reals","\\mathbb{R}");ae("\\Reals","\\mathbb{R}");ae("\\Rho","\\mathrm{P}");ae("\\sdot","\\cdot");ae("\\sect","\\S");ae("\\spades","\\spadesuit");ae("\\sub","\\subset");ae("\\sube","\\subseteq");ae("\\supe","\\supseteq");ae("\\Tau","\\mathrm{T}");ae("\\thetasym","\\vartheta");ae("\\weierp","\\wp");ae("\\Zeta","\\mathrm{Z}");ae("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ae("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ae("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ae("\\bra","\\mathinner{\\langle{#1}|}");ae("\\ket","\\mathinner{|{#1}\\rangle}");ae("\\braket","\\mathinner{\\langle{#1}\\rangle}");ae("\\Bra","\\left\\langle#1\\right|");ae("\\Ket","\\left|#1\\right\\rangle");var SH=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,h=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};ae("\\bra@ket",SH(!1));ae("\\bra@set",SH(!0));ae("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ae("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ae("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ae("\\angln","{\\angl n}");ae("\\blue","\\textcolor{##6495ed}{#1}");ae("\\orange","\\textcolor{##ffa500}{#1}");ae("\\pink","\\textcolor{##ff00af}{#1}");ae("\\red","\\textcolor{##df0030}{#1}");ae("\\green","\\textcolor{##28ae7b}{#1}");ae("\\gray","\\textcolor{gray}{#1}");ae("\\purple","\\textcolor{##9d38bd}{#1}");ae("\\blueA","\\textcolor{##ccfaff}{#1}");ae("\\blueB","\\textcolor{##80f6ff}{#1}");ae("\\blueC","\\textcolor{##63d9ea}{#1}");ae("\\blueD","\\textcolor{##11accd}{#1}");ae("\\blueE","\\textcolor{##0c7f99}{#1}");ae("\\tealA","\\textcolor{##94fff5}{#1}");ae("\\tealB","\\textcolor{##26edd5}{#1}");ae("\\tealC","\\textcolor{##01d1c1}{#1}");ae("\\tealD","\\textcolor{##01a995}{#1}");ae("\\tealE","\\textcolor{##208170}{#1}");ae("\\greenA","\\textcolor{##b6ffb0}{#1}");ae("\\greenB","\\textcolor{##8af281}{#1}");ae("\\greenC","\\textcolor{##74cf70}{#1}");ae("\\greenD","\\textcolor{##1fab54}{#1}");ae("\\greenE","\\textcolor{##0d923f}{#1}");ae("\\goldA","\\textcolor{##ffd0a9}{#1}");ae("\\goldB","\\textcolor{##ffbb71}{#1}");ae("\\goldC","\\textcolor{##ff9c39}{#1}");ae("\\goldD","\\textcolor{##e07d10}{#1}");ae("\\goldE","\\textcolor{##a75a05}{#1}");ae("\\redA","\\textcolor{##fca9a9}{#1}");ae("\\redB","\\textcolor{##ff8482}{#1}");ae("\\redC","\\textcolor{##f9685d}{#1}");ae("\\redD","\\textcolor{##e84d39}{#1}");ae("\\redE","\\textcolor{##bc2612}{#1}");ae("\\maroonA","\\textcolor{##ffbde0}{#1}");ae("\\maroonB","\\textcolor{##ff92c6}{#1}");ae("\\maroonC","\\textcolor{##ed5fa6}{#1}");ae("\\maroonD","\\textcolor{##ca337c}{#1}");ae("\\maroonE","\\textcolor{##9e034e}{#1}");ae("\\purpleA","\\textcolor{##ddd7ff}{#1}");ae("\\purpleB","\\textcolor{##c6b9fc}{#1}");ae("\\purpleC","\\textcolor{##aa87ff}{#1}");ae("\\purpleD","\\textcolor{##7854ab}{#1}");ae("\\purpleE","\\textcolor{##543b78}{#1}");ae("\\mintA","\\textcolor{##f5f9e8}{#1}");ae("\\mintB","\\textcolor{##edf2df}{#1}");ae("\\mintC","\\textcolor{##e0e5cc}{#1}");ae("\\grayA","\\textcolor{##f6f7f7}{#1}");ae("\\grayB","\\textcolor{##f0f1f2}{#1}");ae("\\grayC","\\textcolor{##e3e5e6}{#1}");ae("\\grayD","\\textcolor{##d6d8da}{#1}");ae("\\grayE","\\textcolor{##babec2}{#1}");ae("\\grayF","\\textcolor{##888d93}{#1}");ae("\\grayG","\\textcolor{##626569}{#1}");ae("\\grayH","\\textcolor{##3b3e40}{#1}");ae("\\grayI","\\textcolor{##21242c}{#1}");ae("\\kaBlue","\\textcolor{##314453}{#1}");ae("\\kaGreen","\\textcolor{##71B307}{#1}");var CH={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class t$n{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 ZIn(JIn,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new AR(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 ba("EOF",r.loc)),this.pushTokens(s),new ba("",Hi.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 Je("Extra }",i)}else if(i.text==="EOF")throw new Je("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 Je("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Je("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 Je("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 Je("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 Je("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 ba(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 AR(s,this.settings),c=[],u=o.lex();u.text!=="EOF";)c.push(u),u=o.lex();c.reverse();var h={tokens:c,numArgs:i};return h}return s}isDefined(n){return this.macros.has(n)||Mu.hasOwnProperty(n)||Ar.math.hasOwnProperty(n)||Ar.text.hasOwnProperty(n)||CH.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Mu.hasOwnProperty(n)&&!Mu[n].primitive}}var MR=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,O1=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),m4={"́":{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"}},OR={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Uy{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 t$n(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 Je("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 ba("}")),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(Uy.endOfExpression.has(s.text)||t&&s.text===t||n&&Mu[s.text]&&Mu[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&&(RF(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:Hi.range(n),text:t};else return null;if(this.consume(),i)for(var h=0;h0?{type:"text",value:j}:void 0),j===!1?p.lastIndex=C+1:(w!==C&&y.push({type:"text",value:u.value.slice(w,C)}),Array.isArray(j)?y.push(...j):j&&y.push(j),w=C+x[0].length,b=!0),!p.global)break;x=p.exec(u.value)}return b?(w?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=LR(e,"(");let i=LR(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 jH(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||bf(t)||Ey(t))&&(!n||t!==47)}AH.peek=O$n;function E$n(){this.buffer()}function N$n(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function z$n(){this.buffer()}function j$n(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function A$n(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=mo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function T$n(e){this.exit(e)}function R$n(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=mo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function M$n(e){this.exit(e)}function O$n(){return"["}function AH(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 D$n(){return{enter:{gfmFootnoteCallString:E$n,gfmFootnoteCall:N$n,gfmFootnoteDefinitionLabelString:z$n,gfmFootnoteDefinition:j$n},exit:{gfmFootnoteCallString:A$n,gfmFootnoteCall:T$n,gfmFootnoteDefinitionLabelString:R$n,gfmFootnoteDefinition:M$n}}}function L$n(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:AH},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"),h=i.enter("label");return c+=o.move(i.safe(i.associationId(r),{before:c,after:"]"})),h(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((n?` +`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?TH:I$n))),u(),c}}function I$n(e,n,t){return n===0?e:TH(e,n,t)}function TH(e,n,t){return(t?"":" ")+e}const $$n=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];RH.peek=q$n;function B$n(){return{canContainEols:["delete"],enter:{strikethrough:F$n},exit:{strikethrough:H$n}}}function P$n(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$$n}],handlers:{delete:RH}}}function F$n(e){this.enter({type:"delete",children:[]},e)}function H$n(e){this.exit(e)}function RH(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 q$n(){return"~"}function U$n(e){return e.length}function G$n(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||U$n,i=[],a=[],o=[],c=[];let u=0,h=-1;for(;++hu&&(u=e[h].length);++bc[b])&&(c[b]=x)}k.push(y)}a[h]=k,o[h]=v}let f=-1;if(typeof r=="object"&&"length"in r)for(;++fc[f]&&(c[f]=y),m[f]=y),p[f]=x}a.splice(1,0,p),o.splice(1,0,m),h=-1;const w=[];for(;++h "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),W$n);return s(),a}function W$n(e,n,t){return">"+(t?"":" ")+e}function Q$n(e,n){return $R(e,n.inConstruct,!0)&&!$R(e,n.notInConstruct,!1)}function $R(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 X$n(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 Y$n(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 Z$n(e,n,t,r){const s=Y$n(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(X$n(e,t)){const f=t.enter("codeIndented"),p=t.indentLines(i,J$n);return f(),p}const o=t.createTracker(r),c=s.repeat(Math.max(MH(i,s)+1,3)),u=t.enter("codeFenced");let h=o.move(c);if(e.lang){const f=t.enter(`codeFencedLang${a}`);h+=o.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=t.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(t.safe(e.meta,{before:h,after:` `,encode:["`"],...o.current()})),f()}return h+=o.move(` `),i&&(h+=o.move(i+` -`)),h+=o.move(c),u(),h}function jIn(e,n,t){return(t?"":" ")+e}function kC(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 AIn(e,n,t,r){const s=kC(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 TIn(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 Z0(e){return"&#x"+e.toString(16).toUpperCase()+";"}function hb(e,n,t){const r=Mh(e),s=Mh(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}}gH.peek=RIn;function gH(e,n,t,r){const s=TIn(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),h=hb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=Z0(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=hb(r.after.charCodeAt(0),f,s);p.inside&&(c=c.slice(0,-1)+Z0(f));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function RIn(e,n,t){return t.options.emphasis||"*"}function MIn(e,n){let t=!1;return eC(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,T5}),!!((!e.depth||e.depth<3)&&K6(e)&&(n.options.setext||t))}function OIn(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(MIn(e,t)){const h=t.enter("headingSetext"),f=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` +`)),h+=o.move(c),u(),h}function J$n(e,n,t){return(t?"":" ")+e}function LC(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 eBn(e,n,t,r){const s=LC(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 tBn(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 J0(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pb(e,n,t){const r=Mh(e),s=Mh(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}}OH.peek=nBn;function OH(e,n,t,r){const s=tBn(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),h=pb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=J0(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=pb(r.after.charCodeAt(0),f,s);p.inside&&(c=c.slice(0,-1)+J0(f));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function nBn(e,n,t){return t.options.emphasis||"*"}function rBn(e,n){let t=!1;return dC(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,B5}),!!((!e.depth||e.depth<3)&&aC(e)&&(n.options.setext||t))}function sBn(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(rBn(e,t)){const h=t.enter("headingSetext"),f=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` `,after:` `});return f(),h(),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=Z0(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),c(),o(),u}vH.peek=DIn;function vH(e){return e.value||""}function DIn(){return"<"}bH.peek=LIn;function bH(e,n,t,r){const s=kC(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 LIn(){return"!"}yH.peek=IIn;function yH(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 h=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==f?c+=o.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function IIn(){return"!"}xH.peek=$In;function xH(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))}kH.peek=BIn;function kH(e,n,t,r){const s=kC(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,c;if(wH(e,t)){const h=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=h,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 BIn(e,n,t){return wH(e,t)?"<":"["}SH.peek=PIn;function SH(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 h=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==f?c+=o.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function PIn(){return"["}function SC(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 FIn(e){const n=SC(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 HIn(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 CH(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 qIn(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?HIn(t):SC(t);const o=e.ordered?a==="."?")":".":FIn(t);let c=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.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),CH(t)===a&&h){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()),h);return c(),u;function h(f,p,m){return p?(m?"":" ".repeat(a))+f:(m?i:i+" ".repeat(a-i.length))+f}}function VIn(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const KIn=qm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function WIn(e,n,t,r){return(e.children.some(function(a){return KIn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function QIn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}EH.peek=XIn;function EH(e,n,t,r){const s=QIn(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),h=hb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=Z0(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=hb(r.after.charCodeAt(0),f,s);p.inside&&(c=c.slice(0,-1)+Z0(f));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function XIn(e,n,t){return t.options.strong||"*"}function YIn(e,n,t,r){return t.safe(e.value,r)}function ZIn(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 JIn(e,n,t){const r=(CH(t)+(t.options.ruleSpaces?" ":"")).repeat(ZIn(t));return t.options.ruleSpaces?r.slice(0,-1):r}const NH={blockquote:kIn,break:NR,code:zIn,definition:AIn,emphasis:gH,hardBreak:NR,heading:OIn,html:vH,image:bH,imageReference:yH,inlineCode:xH,link:kH,linkReference:SH,list:qIn,listItem:GIn,paragraph:VIn,root:WIn,strong:EH,text:YIn,thematicBreak:JIn};function e$n(){return{enter:{table:t$n,tableData:zR,tableHeader:zR,tableRow:r$n},exit:{codeText:s$n,table:n$n,tableData:m4,tableHeader:m4,tableRow:m4}}}function t$n(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 n$n(e){this.exit(e),this.data.inTable=void 0}function r$n(e){this.enter({type:"tableRow",children:[]},e)}function m4(e){this.exit(e)}function zR(e){this.enter({type:"tableCell",children:[]},e)}function s$n(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,i$n));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function i$n(e,n){return n==="|"?n:e}function a$n(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,...i.current()});return/^[\t ]/.test(u)&&(u=J0(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),c(),o(),u}DH.peek=iBn;function DH(e){return e.value||""}function iBn(){return"<"}LH.peek=aBn;function LH(e,n,t,r){const s=LC(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 aBn(){return"!"}IH.peek=oBn;function IH(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 h=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==f?c+=o.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function oBn(){return"!"}$H.peek=cBn;function $H(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))}PH.peek=lBn;function PH(e,n,t,r){const s=LC(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,c;if(BH(e,t)){const h=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=h,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 lBn(e,n,t){return BH(e,t)?"<":"["}FH.peek=uBn;function FH(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 h=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==f?c+=o.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function uBn(){return"["}function IC(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 _Bn(e){const n=IC(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 fBn(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 HH(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 dBn(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?fBn(t):IC(t);const o=e.ordered?a==="."?")":".":_Bn(t);let c=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.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),HH(t)===a&&h){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()),h);return c(),u;function h(f,p,m){return p?(m?"":" ".repeat(a))+f:(m?i:i+" ".repeat(a-i.length))+f}}function mBn(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const gBn=qm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vBn(e,n,t,r){return(e.children.some(function(a){return gBn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function bBn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}qH.peek=yBn;function qH(e,n,t,r){const s=bBn(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),h=pb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=J0(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=pb(r.after.charCodeAt(0),f,s);p.inside&&(c=c.slice(0,-1)+J0(f));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function yBn(e,n,t){return t.options.strong||"*"}function xBn(e,n,t,r){return t.safe(e.value,r)}function wBn(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 kBn(e,n,t){const r=(HH(t)+(t.options.ruleSpaces?" ":"")).repeat(wBn(t));return t.options.ruleSpaces?r.slice(0,-1):r}const UH={blockquote:V$n,break:BR,code:Z$n,definition:eBn,emphasis:OH,hardBreak:BR,heading:sBn,html:DH,image:LH,imageReference:IH,inlineCode:$H,link:PH,linkReference:FH,list:dBn,listItem:pBn,paragraph:mBn,root:vBn,strong:qH,text:xBn,thematicBreak:kBn};function SBn(){return{enter:{table:CBn,tableData:PR,tableHeader:PR,tableRow:NBn},exit:{codeText:zBn,table:EBn,tableData:y4,tableHeader:y4,tableRow:y4}}}function CBn(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 EBn(e){this.exit(e),this.data.inTable=void 0}function NBn(e){this.enter({type:"tableRow",children:[]},e)}function y4(e){this.exit(e)}function PR(e){this.enter({type:"tableCell",children:[]},e)}function zBn(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,jBn));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function jBn(e,n){return n==="|"?n:e}function ABn(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(h(m,k,v),m.align)}function o(m,w,k,v){const b=f(m,k,v),y=u([b]);return y.slice(0,y.indexOf(` -`))}function c(m,w,k,v){const b=k.enter("tableCell"),y=k.enter("phrasing"),x=k.containerPhrasing(m,{...v,before:i,after:i});return y(),b(),x}function u(m,w){return xIn(m,{align:w,alignDelimiters:r,padding:t,stringLength:s})}function h(m,w,k){const v=m.children;let b=-1;const y=[],x=w.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const S$n={tokenize:R$n,partial:!0};function C$n(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:j$n,continuation:{tokenize:A$n},exit:T$n}},text:{91:{name:"gfmFootnoteCall",tokenize:z$n},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:E$n,resolveTo:N$n}}}}function E$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=vo(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 N$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 z$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||yr(f))return t(f);if(f===93){e.exit("chunkString");const p=e.exit("gfmFootnoteCallString");return s.includes(vo(r.sliceSerialize(p)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):t(f)}return yr(f)||(a=!0),i++,e.consume(f),f===92?h:u}function h(f){return f===91||f===92||f===93?(e.consume(f),i++,u):u(f)}}function j$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",h):t(w)}function h(w){if(a>999||w===93&&!o||w===null||w===91||yr(w))return t(w);if(w===93){e.exit("chunkString");const k=e.exit("gfmFootnoteDefinitionLabelString");return i=vo(r.sliceSerialize(k)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),p}return yr(w)||(o=!0),a++,e.consume(w),w===92?f:h}function f(w){return w===91||w===92||w===93?(e.consume(w),a++,h):h(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 A$n(e,n,t){return e.check(Hm,n,e.attempt(S$n,n,t))}function T$n(e){e.exit("gfmFootnoteDefinition")}function R$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 M$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"),b=Mh(w);return v._open=!b||b===2&&!!k,v._close=!k||k===2&&!!b,o(w)}}}class O$n{constructor(){this.map=[]}add(n,t,r){D$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 D$n(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const q=r.events[I][1].type;if(q==="lineEnding"||q==="linePrefix")I--;else break}const B=I>-1?r.events[I][1].type:null,G=B==="tableHead"||B==="tableRow"?j:c;return G===j&&r.parser.lazy[r.now().line]?t(D):G(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(a=!0,i+=1),h(D)}function h(D){return D===null?t(D):Dt(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),m):t(D):jn(D)?Cn(e,h,"whitespace")(D):(i+=1,a&&(a=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),f(D)))}function f(D){return D===null||D===124||yr(D)?(e.exit("data"),h(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,jn(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 jn(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"),b):D===45?(i+=1,b(D)):D===null||Dt(D)?C(D):N(D)}function b(D){return D===45?(e.enter("tableDelimiterFiller"),y(D)):N(D)}function y(D){return D===45?(e.consume(D),y):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(D))}function x(D){return jn(D)?Cn(e,C,"whitespace")(D):C(D)}function C(D){return D===124?w(D):D===null||Dt(D)?!a||s!==i?N(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):N(D)}function N(D){return t(D)}function j(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||Dt(D)?(e.exit("tableRow"),n(D)):jn(D)?Cn(e,A,"whitespace")(D):(e.enter("data"),z(D))}function z(D){return D===null||D===124||yr(D)?(e.exit("data"),A(D)):(e.consume(D),D===92?M:z)}function M(D){return D===92||D===124?(e.consume(D),z):z(D)}}function B$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,h,f;const p=new O$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({},Pd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function AR(e,n,t,r,s){const i=[],a=Pd(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 Pd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const P$n={name:"tasklistCheck",tokenize:H$n};function F$n(){return{text:{91:P$n}}}function H$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 yr(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 Dt(c)?n(c):jn(c)?e.check({tokenize:q$n},n,t)(c):t(c)}}function q$n(e,n,t){return Cn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function U$n(e){return kP([p$n(),C$n(),M$n(e),I$n(),F$n()])}const G$n={};function LH(e){const n=this,t=e||G$n,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(U$n(t)),i.push(_$n()),a.push(f$n(t))}function V$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,""),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u;const f=h.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(),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u,h.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 K$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||"",h=o.createTracker(c),f="$".repeat(Math.max(mH(u,"$")+1,2)),p=o.enter("mathFlow");let m=h.move(f);if(i.meta){const w=o.enter("mathFlowMeta");m+=h.move(o.safe(i.meta,{after:` +`))}function c(m,w,k,v){const b=k.enter("tableCell"),y=k.enter("phrasing"),x=k.containerPhrasing(m,{...v,before:i,after:i});return y(),b(),x}function u(m,w){return G$n(m,{align:w,alignDelimiters:r,padding:t,stringLength:s})}function h(m,w,k){const v=m.children;let b=-1;const y=[],x=w.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const WBn={tokenize:nPn,partial:!0};function QBn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:JBn,continuation:{tokenize:ePn},exit:tPn}},text:{91:{name:"gfmFootnoteCall",tokenize:ZBn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:XBn,resolveTo:YBn}}}}function XBn(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=mo(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 YBn(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 ZBn(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(mo(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?h:u}function h(f){return f===91||f===92||f===93?(e.consume(f),i++,u):u(f)}}function JBn(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",h):t(w)}function h(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=mo(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:h}function f(w){return w===91||w===92||w===93?(e.consume(w),a++,h):h(w)}function p(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),s.includes(i)||s.push(i),Sn(e,m,"gfmFootnoteDefinitionWhitespace")):t(w)}function m(w){return n(w)}}function ePn(e,n,t){return e.check(Hm,n,e.attempt(WBn,n,t))}function tPn(e){e.exit("gfmFootnoteDefinition")}function nPn(e,n,t){const r=this;return Sn(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 rPn(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"),b=Mh(w);return v._open=!b||b===2&&!!k,v._close=!k||k===2&&!!b,o(w)}}}class sPn{constructor(){this.map=[]}add(n,t,r){iPn(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 iPn(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const U=r.events[I][1].type;if(U==="lineEnding"||U==="linePrefix")I--;else break}const B=I>-1?r.events[I][1].type:null,G=B==="tableHead"||B==="tableRow"?j:c;return G===j&&r.parser.lazy[r.now().line]?t(D):G(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(a=!0,i+=1),h(D)}function h(D){return D===null?t(D):Dt(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),m):t(D):jn(D)?Sn(e,h,"whitespace")(D):(i+=1,a&&(a=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),f(D)))}function f(D){return D===null||D===124||wr(D)?(e.exit("data"),h(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,jn(D)?Sn(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 jn(D)?Sn(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"),b):D===45?(i+=1,b(D)):D===null||Dt(D)?C(D):N(D)}function b(D){return D===45?(e.enter("tableDelimiterFiller"),y(D)):N(D)}function y(D){return D===45?(e.consume(D),y):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(D))}function x(D){return jn(D)?Sn(e,C,"whitespace")(D):C(D)}function C(D){return D===124?w(D):D===null||Dt(D)?!a||s!==i?N(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):N(D)}function N(D){return t(D)}function j(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||Dt(D)?(e.exit("tableRow"),n(D)):jn(D)?Sn(e,A,"whitespace")(D):(e.enter("data"),z(D))}function z(D){return D===null||D===124||wr(D)?(e.exit("data"),A(D)):(e.consume(D),D===92?M:z)}function M(D){return D===92||D===124?(e.consume(D),z):z(D)}}function lPn(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,h,f;const p=new sPn;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({},Bd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function HR(e,n,t,r,s){const i=[],a=Bd(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 Bd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const uPn={name:"tasklistCheck",tokenize:fPn};function _Pn(){return{text:{91:uPn}}}function fPn(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 Dt(c)?n(c):jn(c)?e.check({tokenize:dPn},n,t)(c):t(c)}}function dPn(e,n,t){return Sn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function hPn(e){return PP([BBn(),QBn(),rPn(e),oPn(),_Pn()])}const pPn={};function JH(e){const n=this,t=e||pPn,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(hPn(t)),i.push(DBn()),a.push(LBn(t))}function mPn(){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,""),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u;const f=h.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(),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u,h.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 gPn(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||"",h=o.createTracker(c),f="$".repeat(Math.max(MH(u,"$")+1,2)),p=o.enter("mathFlow");let m=h.move(f);if(i.meta){const w=o.enter("mathFlowMeta");m+=h.move(o.safe(i.meta,{after:` `,before:m,encode:["$"],...h.current()})),w()}return m+=h.move(` `),u&&(m+=h.move(u+` -`)),m+=h.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 h="$".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 ok(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 sBn(e,n){const t=e[n];if(t!=="`"&&t!=="~"||J0(e,n)||Bh(e,n,t)<3)return!1;const r=e.lastIndexOf(` +`)),m+=h.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 h="$".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 pk(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 zPn(e,n){const t=e[n];if(t!=="`"&&t!=="~"||em(e,n)||Bh(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=ok(i);return a.indentation<=3&&r+a.offset===n}function iBn(e,n){const t=e[n],r=Bh(e,n,t),s=e.lastIndexOf(` +`,n),i=e.slice(r,s===-1?e.length:s),a=pk(i);return a.indentation<=3&&r+a.offset===n}function jPn(e,n){const t=e[n],r=Bh(e,n,t),s=e.lastIndexOf(` `,n-1)+1,i=e.indexOf(` -`,n),a=ok(e.slice(s,i===-1?e.length:i));let o=e.indexOf(` +`,n),a=pk(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&&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 aBn(e,n,t){const r=Bh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function cBn(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 uBn(e,{predictMath:n=!1}={}){const t=cBn(e),r=new Set,s=new Set;for(let u=0;u=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 APn(e,n,t){const r=Bh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function RPn(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 OPn(e,{predictMath:n=!1}={}){const t=RPn(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}`)),uBn(t,n)}function BH(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 dBn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function Wr(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=dBn(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const PH=T.createContext(void 0);function FH({projectId:e,sessionId:n,children:t}){const r=T.useMemo(()=>(s,i=!1)=>{if(/^(https?:)?\/\//i.test(s))return s;const a=GP(s);return a?(a.source==="absolute"?yI(a.path):a.source==="artifact"&&!i?hf(e,a.path):B3(e,a.source==="artifact"?`artifacts/${a.path}`:a.path,{sessionId:n??void 0}))+a.hash:null},[e,n]);return _.jsx(PH,{value:r,children:t})}function hBn({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}),[h,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=h.width&&c.width?Math.min(1,c.width*.9/h.width,c.height*.9/h.height):1;return ai.createPortal(_.jsxs("dialog",{ref:s,tabIndex:-1,"aria-label":n||tL(),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:h.width?{width:h.width*p*a,height:h.height*p*a}:void 0,className:`pointer-events-auto block m-auto shrink-0 max-w-none rounded-lg shadow-modal ${h.width&&c.width?"visible":"invisible"}`})})}),_.jsxs("div",{className:"absolute top-5 right-5 flex gap-2",children:[_.jsx(Qh,{shape:"circle",href:e,download:t||!0,"aria-label":E3(),title:E3(),className:"bg-background shadow-popover",children:_.jsx(Vb,{size:16})}),_.jsx($t,{shape:"circle",onClick:r,"aria-label":L3(),title:L3(),className:"bg-background shadow-popover",children:_.jsx(br,{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($t,{shape:"circle",disabled:a<=.25,onClick:()=>o(m=>Math.max(.25,m-.25)),"aria-label":dz(),title:dz(),children:_.jsx(gCn,{size:16})}),_.jsxs(Ie,{variant:"ghost",className:"min-w-16 tabular-nums",onClick:()=>o(1),title:hz(),"aria-label":hz(),children:[Math.round(a*100),"%"]}),_.jsx($t,{shape:"circle",disabled:a>=4,onClick:()=>o(m=>Math.min(4,m+.25)),"aria-label":fz(),title:fz(),children:_.jsx(Xh,{size:16})})]})]})]}),document.body)}function pBn({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:h=>{h.preventDefault(),h.stopPropagation(),c(!0)},onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),h.stopPropagation(),c(!0))},onError:!i&&n&&n!==e?()=>a(!0):void 0}),o&&u&&_.jsx(hBn,{src:u,alt:r,name:t,onClose:()=>c(!1)})]})}const mBn=1e5;function gBn({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($t,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:mS(),"aria-label":Ktt(),onClick:s,children:t?_.jsx(yi,{size:13}):_.jsx(Mf,{size:13})}),_.jsx("pre",{children:_.jsx("code",{children:u9n(e,n,mBn)})})]})}function vBn(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 OR(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=vBn(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:v4(e,s,a.index)});const h=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:c},position:v4(e,a.index,h),type:o==="run"?"runMention":"fileMention"}),s=h}return i?(sHH(e)}function LR({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?NZ({path:Ce(e)}):e,...Wr(a=>r==null?void 0:r(e,n,t,void 0,a)),disabled:!r,children:[_.jsx(b$,{size:12}),_.jsx("span",{className:"file-chip-label",children:i}),_.jsx(E$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}function yBn({id:e,label:n,onOpenRun:t}){return _.jsxs("button",{className:"file-chip run-chip",title:t?eJ({id:Ce(e)}):tee({id:Ce(e)}),...Wr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[_.jsx($S,{size:12}),_.jsx("span",{className:"file-chip-label",children:n||fI()}),_.jsx(E$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const qH={singleDollarTextMath:!0},xBn=Ny().use(Sy).use(LH).use(IH,qH).use(rBn).use(bBn).use(ab).use(WRn).use(_H);function wBn(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const UH={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?_5(i[1]):null;return _.jsx(gBn,{code:a,lang:c})},pre:({children:e})=>_.jsx(_.Fragment,{children:e})};function kBn({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 uc=T.memo(function({text:n,onOpenFile:t,onOpenRun:r,resolveFilePath:s,resolveImageSrc:i,predict:a=!1}){Yu();const o=T.useContext(PH),c=i??o,u=T.useMemo(()=>({"file-mention":h=>{const f=L5(h.path),p=h.lines&&KRn(h.lines)||f.line;return _.jsx(LR,{path:f.path,line:p,exp:h.exp,onOpenFile:t})},"run-mention":h=>_.jsx(yBn,{id:h.id,label:h.label,onOpenRun:r}),a:({node:h,href:f,children:p,"data-figure-src":m,"data-cited-href":w,...k})=>{const v=typeof m=="string"?GP(m):null;if(v&&t){const x=v.source==="artifact"?`artifacts/${v.path}`:v.path,C=s?s(x):x;if(C)return _.jsx("button",{type:"button",className:"text-primary underline cursor-pointer text-start",...Wr(N=>t(C,void 0,void 0,void 0,N)),children:p})}const b=typeof w=="string"?w:f,y=b?L5(b):null;if(y&&wBn(y.path)&&t){let x;try{x=decodeURI(y.path)}catch{return _.jsx("span",{children:p})}const C=s?s(x):x;return C?_.jsx(LR,{path:C,line:y.line,onOpenFile:t}):_.jsx("span",{children:p})}return _.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",...k,children:p})},figure:({children:h})=>_.jsx(kBn,{children:h}),figcaption:({children:h})=>_.jsx("figcaption",{className:"mt-3 text-sm italic leading-relaxed text-text",children:h}),th:({node:h,...f})=>_.jsx("th",{dir:"auto",...f}),td:({node:h,...f})=>_.jsx("td",{dir:"auto",...f}),img:({node:h,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(pBn,{...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},...UH}),[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(pOn,{content:BH(n,{predictMath:a}),processor:xBn,components:u,predict:a})})}),IR="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function SBn({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,c]=T.useState(!1),u=T.useRef(null),[h,f]=T.useState(!1),[p,m]=T.useState(""),w=T.useRef(null);T.useEffect(()=>{if(!o)return;const v=b=>{u.current&&!u.current.contains(b.target)&&c(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),T.useEffect(()=>{var v;h&&((v=w.current)==null||v.focus())},[h]);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($S,{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?lwt({agent:Ce(n)}):nwt({agent:Ce(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",...Wr(t),children:jwt()})]}),h?_.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:r4t(),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:IR,children:[_.jsx(Ie,{size:"small",onClick:()=>{m(""),f(!1)},children:AL()}),_.jsx("span",{className:"plan-strip-spacer flex-1"}),_.jsxs(Ie,{size:"small",variant:"primary",onClick:k,children:[qwt(),_.jsx(v$,{size:13})]})]})]}):_.jsxs("div",{className:IR,children:[_.jsx(Ie,{size:"small",onClick:i,children:Lwt()}),_.jsx(Ie,{size:"small",onClick:()=>f(!0),children:Xwt()}),_.jsx("span",{className:"plan-strip-spacer flex-1"}),s?_.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[_.jsx(Ie,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:D2t()}),_.jsx(Ie,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":wwt(),onClick:()=>c(v=>!v),children:_.jsx(pc,{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(yn,{onClick:()=>{c(!1),r("bypassPermissions")},children:H2t()})})]}):_.jsx(Ie,{size:"small",variant:"primary",onClick:()=>r(),children:Q2t()})]})]})}function $R({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,h]=T.useState(null);async function f(p){if(p.preventDefault(),!(o||!i.trim())){c(!0),h(null);try{n(await e(i.trim())),a("")}catch(m){h(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(Ie,{type:"submit",disabled:o||!i.trim(),children:o?ka():hc()}),_.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??fWe()}),u&&_.jsx("div",{className:"error",children:u})]})}function GH({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 CBn({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:[_fn(),_.jsx("span",{className:"inline-block w-max max-w-full",children:_.jsx(cc,{variant:"field",dropDown:!0,value:e.defaultHost??"",disabled:n,choices:[{id:"",label:VL()},...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),K4n(r||null).catch(s=>{sn(s instanceof Error?s.message:String(s),"error")}).finally(()=>t(!1))}})})]})}function EBn({host:e,connecting:n,reference:t,onChange:r}){const s=T.useId(),i=gn({mutationFn:V4n,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:xL()}),_.jsxs("div",{className:"mt-3 grid max-w-xl gap-3",children:[_.jsxs("label",{className:"text-sm text-subtext",children:[Rfn(),_.jsx(cc,{variant:"field",dropDown:!0,value:t!==null?"container":"host",disabled:n,choices:[{id:"host",label:vfn()},{id:"container",label:Cfn()}],onSelect:o=>a(o==="container"?"":null)})]}),t!==null&&_.jsxs("label",{className:"text-sm text-subtext",htmlFor:`${s}-container`,children:[sfn(),_.jsx(Kr,{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 _c=["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(" "),xf=["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(" "),NBn=["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(" "),Fy="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",Ua=["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(" "),EC=["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(" "),fl=["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(" "),ck=["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(" "),E0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),Ad=["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(" "),zBn=new Set(["gh auth login","hf auth login","claude auth status"]);function VH(e){return zBn.has(e)?`/api/settings/commands/run?command=${encodeURIComponent(e)}`:void 0}function Hy(){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 NC({note:e,className:n,disabled:t,resolve:r=VH,onRun:s}){return e?_.jsx("p",{className:n,children:Hu(e,{canRun:i=>!t&&r(i)!==void 0,onRun:i=>{const a=r(i);a&&s(i,a)}})}):null}function qy({run:e,onComplete:n,onClose:t}){return e?_.jsx(v7n,{path:e.path,label:e.command,onComplete:n,onError:r=>sn(r,"error"),onClose:t},`${e.command}-${e.attempt}`):null}function b4(e){return e.catalogPending?{cls:"warn",variant:"warning",label:ff()}:e.authCheckFailed?{cls:"warn",variant:"warning",label:$v()}:e.agentReady&&!e.authenticated&&e.authMethod!=="local"?{cls:"warn",variant:"warning",label:kL()}:e.agentReady?{cls:"ok",variant:"success",label:e.authMethod==="thirdParty"||ey(e)?Rm():e.authMethod==="local"?vS():sZt()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:oqt()}:e.authMethod==="local"?{cls:"warn",variant:"warning",label:SL()}:e.needsConfigRepair||e.authState==="unknown"?{cls:"warn",variant:"warning",label:$v()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:ven()}:{cls:"warn",variant:"warning",label:KL()}:{cls:"warn",variant:"warning",label:RKt()}}function jBn({h:e}){if(e.id==="opencode"&&e.agentReady&&!e.authenticated&&!e.authMethod)return _.jsx(_.Fragment,{children:HTt()});const n=ey(e);return n?_.jsx(_.Fragment,{children:n}):e.authMethod?e.authMethod==="local"?_.jsx(_.Fragment,{children:Iv()}):e.authMethod==="thirdParty"?_.jsx(_.Fragment,{children:eI()}):_.jsx(_.Fragment,{children:e.authMethod==="oauth"?QLt():gS()}):_.jsx(_.Fragment,{children:"—"})}function ABn(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 TBn({remote:e}){const n=Pu(),{data:t=null}=_t(n),[r,s]=T.useState(null),[i,a]=T.useState(!1),o=Hy(),[c,u]=T.useState(null),h=_t(DI()),f=(w,k=!1)=>{a(!0),pf(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:O3()}),!e&&c&&h.data&&_.jsx(U$,{harness:c,commands:h.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(cc,{variant:"field",dropDown:!0,title:O3(),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(Th,{harness:k.id})},renderLabel:w=>{const k=p.find(b=>b.id===w.id),v=k&&b4(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:_c,children:[_.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[_.jsx(Wt,{variant:b4(m).variant,children:b4(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(Ie,{size:"small",onClick:()=>u(m),disabled:!h.data,"aria-haspopup":"dialog",children:[_.jsx(Of,{size:14})," ",pL()]}),_.jsxs(Ie,{size:"small",onClick:()=>f(!0,!0),disabled:i,children:[_.jsx(Wa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),_.jsxs("div",{className:Ss(xf,"[&_.v]:text-sm"),children:[_.jsx("span",{className:"k",children:z$t()}),_.jsx("span",{className:"v",children:m.binPath??wLt()}),_.jsx("span",{className:"k",children:JL()}),_.jsx("span",{className:"v",children:m.version??"—"}),_.jsx("span",{className:"k",children:QIt()}),_.jsx("span",{className:"v",children:_.jsx(jBn,{h:m})}),m.account&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:m.id==="opencode"?eI():wS()}),_.jsx("span",{className:"v",children:m.account})]}),m.org&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:UWt()}),_.jsx("span",{className:"v",children:m.org})]}),m.plan&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:GQt()}),_.jsx("span",{className:"v",children:m.plan})]}),_.jsx("span",{className:"k",children:LIt()}),_.jsx("span",{className:"v",children:m.catalogPending?ff():m.models.length>0?pDt({count:Zt(m.models.length),models:new Intl.ListFormat(E()).format(m.models.slice(0,4).map(w=>Ce(nv(w))))}):m.agentReady?N3():xS()})]}),_.jsx(NC,{note:m.agentNote,className:Ss(Ua,"text-sm"),disabled:e,resolve:w=>{var k;return ABn(m,(k=h.data)==null?void 0:k[m.id],w)??VH(w)},onRun:(w,k)=>o.start(w,k,m.id)}),o.run&&_.jsx("div",{hidden:o.run.owner!==m.id,children:_.jsx(qy,{run:o.run,onComplete:()=>f(!0,!0),onClose:o.clear})}),m.id==="opencode"&&_.jsx(Q$,{installed:m.installed})]}):null:_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",wFt()]})]})}function RBn({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?_.jsx(Wt,{variant:"success",children:ePt()}):_.jsx(Wt,{variant:"error",children:RVt()}):_.jsx(Wt,{variant:"error",children:OBt()}):_.jsx(Wt,{variant:"error",children:Wqt()})}function MBn({onEditState:e}){var A;const n=gn({mutationFn:I4n}),t=fj(),r=_t(t),s=r.data??null,i=z=>{Vr(t.queryKey,M=>(typeof z=="function"?z(M??null):z)??void 0)},a=s?null:((A=r.error)==null?void 0:A.message)??null,[o,c]=T.useState(""),[u,h]=T.useState(""),[f,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(null),b=z=>{i(z),c(z.context??""),h(z.namespace)},y=T.useRef(null);T.useEffect(()=>{const z=y.current;y.current=s,s&&(!z||o===(z.context??"")&&u.trim()===z.namespace)&&(c(s.context??""),h(s.namespace??""))},[s,o,u]);const x=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!x;T.useEffect(()=>{e==null||e({dirty:C,saving:f})},[C,f,e]);async function N(){if(!(m||f||!x)){w(!0);try{await et.fetchQuery({...fj(),staleTime:0})}catch(z){sn(z instanceof Error?z.message:String(z),"error")}finally{w(!1)}}}async function j(z){if(z.preventDefault(),!(f||m)){p(!0),v(null);try{b(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:Wh()}),_.jsx("dd",{className:"m-0",children:m||f?_.jsx(Wt,{children:ba()}):C?_.jsx(Wt,{children:_L()}):_.jsx(RBn,{s})})]}),x&&!m&&!f&&s.preflight.error&&_.jsx("p",{className:`${Fy} break-words`,children:s.preflight.error}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:j,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[oPt(),_.jsx(cc,{choices:[{id:"",label:s.currentContext?JMt({context:Ce(s.currentContext)}):VMt()},...o&&!s.contexts.includes(o)?[{id:o,label:jLt({context:Ce(o)})}]:[],...s.contexts.map(z=>({id:z,label:z}))],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:[IGt(),_.jsx(Kr,{type:"text",value:u,disabled:f||m,onChange:z=>h(z.target.value),placeholder:QPt(),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(Ie,{type:"button",onClick:()=>void N(),disabled:f||m||!x,children:[_.jsx(Wa,{size:13})," ",m?ba():Am()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:f||m||x,children:f?ka():hc()})]})]})]}):_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",tBt()]})})}function OBn(){var x;const e=gn({mutationFn:C=>B4n(...C)}),n=dj(),t=_t(n),r=t.data??null,s=C=>{Vr(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,a]=T.useState(null),o=i??((x=t.error)==null?void 0:x.message)??null,[c,u]=T.useState(""),[h,f]=T.useState(""),[p,m]=T.useState(!1),w=t.isPending||p,[k,v]=T.useState(!1);async function b(){if(!(w||k)){m(!0),a(null);try{await et.fetchQuery({...dj(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function y(C){if(C.preventDefault(),!(!c.trim()||!h.trim()||w||k||r!=null&&r.processEnv)){v(!0),a(null);try{s(await e.mutateAsync([c.trim(),h.trim()])),u(""),f("")}catch(N){a(N instanceof Error?N.message:String(N))}finally{v(!1)}}}return _.jsxs(_.Fragment,{children:[!r&&w?_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",cBt()]}):r&&_.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[_.jsx("dt",{className:"font-medium text-subtext",children:Wh()}),_.jsx("dd",{className:"m-0",children:_.jsx(Wt,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?Rm():Pb()})})]}),(r==null?void 0:r.processEnv)&&_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:NOt()}),_.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:[r!=null&&r.tokenConfigured?OOt():tDt(),_.jsx(Kr,{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?FOt():cDt(),_.jsx(Kr,{type:"password",value:h,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:WOt()}),o&&_.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(Ie,{type:"button",disabled:w||k,onClick:()=>void b(),children:[_.jsx(Wa,{size:13})," ",Mm()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!c.trim()||!h.trim()||w||k||(r==null?void 0:r.processEnv),children:k?ka():hc()})]})]})]})}const KH="rounded-sm border-border-strong bg-surface text-subtext",WH="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",DBn=5e3;function QH(e){const n=Ga(),t=e.map(a=>hj(a)),r=LK({queries:t.map(a=>({...a,refetchInterval:DBn}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{Gn(n)&&Vr(hj(a).queryKey,{running:!0})}]}function LBn({test:e,connecting:n,masterRunning:t,containerFailed:r=!1}){if(n)return _.jsx("span",{role:"status",children:_.jsx(Wt,{className:WH,children:LL()})});if(e===void 0)return _.jsx(Wt,{className:KH,children:GL()});const s=e.missingTools??[],i=e.reachable&&e.toolsFound&&t===!1,a=!e.reachable||r?_.jsx(Wt,{className:"rounded-sm",variant:"error",children:kS()}):e.toolsFound?i?_.jsx(Wt,{className:"rounded-sm",variant:"warning",children:IL()}):_.jsx(Wt,{className:"rounded-sm",variant:"success",children:Tm()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:s.length===1?wDt({tool:Ce(s[0])}):jDt()});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:yo(e.testedAt)})]})}function IBn(){var D;const e=OI(),n=_t(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),[h,f]=T.useState(!1),[p,m]=T.useState({}),[w,k]=T.useState(null),[v,b]=T.useState(!1),[y,x]=T.useState(0),C=(t==null?void 0:t.filter(I=>{const B=i[I.host]??I.lastTest;return(B==null?void 0:B.reachable)&&B.toolsFound}).map(I=>I.host))??[],[N,j]=QH(C);function A(I){u.current+=1,f(!1),b(!1),x(B=>B+1),k(I),m(B=>({...B,[I]:!0}))}function z(){u.current+=1,f(!1),b(!1),k(null)}function M(I,B){m(G=>({...G,[I]:!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(CBn,{settings:n.data}),_.jsxs(Ie,{variant:"ghost",className:"ms-auto",onClick:()=>s(!0),children:[_.jsx(BS,{size:14})," ",oI()]})]}),t===null?_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",QL()]}):t.length===0?_.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:CVt()}):_.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:t.map(I=>{var H,ae,ie;const B=o[I.host]===void 0?I.container??null:o[I.host],G=i[I.host],q=B!==null&&((H=G==null?void 0:G.container)==null?void 0:H.reference)===B.trim()?G:void 0,Q=B!==null?q:G!=null&&G.container?I.lastTest:G??I.lastTest,K=(ae=q==null?void 0:q.container)==null?void 0:ae.error,Z=((ie=q==null?void 0:q.container)==null?void 0:ie.ready)===!1,J=(Q==null?void 0:Q.error)||K,$=w===I.host,L=p[I.host]??!1,F=$||!!J,U=`${I.user?`${I.user}@`:""}${I.hostname??I.host}${I.port?`:${I.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:I.host,children:I.host}),_.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:U,children:U})]})}),_.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(LBn,{test:Q,connecting:$&&!v,masterRunning:N[I.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":L,"aria-label":L?KX({name:Ce(I.host)}):MY({name:Ce(I.host)}),onClick:ue=>{ue.stopPropagation(),M(I.host,L)},children:_.jsx(pc,{size:18,className:`text-muted transition-transform duration-120 ease-standard${L?" rotate-180":""}`})})]}),_.jsx(Ie,{size:"small",type:"button",className:"justify-self-end",onClick:ue=>{ue.stopPropagation(),$&&!v?z():A(I.host)},disabled:!$&&(w!==null&&!v||B!==null&&!B.trim()),children:$?v?si():df():(Q==null?void 0:Q.reachable)===!1||Z?si():Q?tI():bS()})]})]}),_.jsx(EBn,{host:I,connecting:$&&!v,reference:B,onChange:ue=>{$&&z(),c(re=>({...re,[I.host]:ue})),a(re=>{const V={...re};return delete V[I.host],V})}}),F&&(L||$)&&_.jsxs("div",{className:`border-t border-t-border-variant py-3${L?"":" hidden"}`,children:[!$&&J&&_.jsx(b7n,{host:I.host,transcript:J}),$&&!h&&_.jsx(qS,{host:I.host,backend:"ssh",active:L,onComplete:ue=>{if(ue.backend!=="ssh")return;j(I.host);const re=u.current;if(B===null){a(V=>({...V,[I.host]:{...ue.result,container:null}})),b(!1),k(null);return}f(!0),W4n(I.host,B.trim()).then(V=>{u.current===re&&a(oe=>({...oe,[I.host]:{...V,container:V.container??{reference:B.trim(),ready:!1,error:V.error??null}}}))}).catch(V=>{u.current===re&&a(oe=>({...oe,[I.host]:{...ue.result,container:{reference:B.trim(),ready:!1,error:V instanceof Error?V.message:String(V)}}}))}).finally(()=>{u.current===re&&(f(!1),b(!1),k(null))})},onError:ue=>{b(!0),a(re=>({...re,[I.host]:{container:B===null?null:{reference:B.trim(),ready:!1,error:ue},reachable:!1,toolsFound:!1,missingTools:[],error:ue,testedAt:Date.now()}}))}},y)]})]},I.host)})}),r&&_.jsx(yB,{onClose:()=>s(!1)})]})}function $Bn({test:e,connecting:n,masterRunning:t}){return n?_.jsx(Wt,{className:WH,children:LL()}):e===null?_.jsx(Wt,{className:KH,children:GL()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?_.jsx(Wt,{className:"rounded-sm",variant:"warning",children:IL()}):_.jsx(Wt,{className:"rounded-sm",variant:"success",children:Tm()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:lGt()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:aKt()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:kS()})}function BBn(){var J;const e=gn({mutationFn:i3n}),n=h5n(),t=_t(n),r=t.data??null,s=$=>{Vr(n.queryKey,L=>(typeof $=="function"?$(L??null):$)??void 0)},i=r?null:((J=t.error)==null?void 0:J.message)??null,[a,o]=T.useState(""),[c,u]=T.useState(""),[h,f]=T.useState(""),[p,m]=T.useState(""),[w,k]=T.useState(!1),[v,b]=T.useState(null),[y,x]=T.useState(null),[C,N]=T.useState(!1),[j,A]=T.useState(!1),[z,M]=T.useState(0),D=a&&(y!=null&&y.reachable)&&y.slurmFound&&y.toolsFound?[a]:[],[I,B]=QH(D);function G(){A(!1),M($=>$+1),N(!0)}const q=$=>{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??"")&&h.trim()===($.account??"")&&p.trim()===($.timeLimit??""))&&(o(r.host??""),u(r.partition??""),f(r.account??""),m(r.timeLimit??""))},[r,a,c,h,p]);const K=r!==null&&a===(r.host??"")&&c.trim()===(r.partition??"")&&h.trim()===(r.account??"")&&p.trim()===(r.timeLimit??"");async function Z($){if($.preventDefault(),!w){k(!0),b(null);try{q(await e.mutateAsync({host:a,partition:c.trim(),account:h.trim(),timeLimit:p.trim()}))}catch(L){b(L instanceof Error?L.message:String(L))}finally{k(!1)}}}return _.jsx(_.Fragment,{children:i?_.jsx("div",{className:"error",children:i}):r?_.jsxs(_.Fragment,{children:[!C&&(y==null?void 0:y.error)&&_.jsx("p",{className:Fy,children:y.error}),_.jsxs("form",{className:EC,onSubmit:Z,children:[_.jsx("div",{className:"max-w-xl",children:_.jsxs("label",{children:[QUt(),_.jsx(cc,{choices:[{id:"",label:VL()},...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($),x(null),N(!1),A(!1)}})]})}),_.jsxs("div",{className:"actions",children:[_.jsx(Ie,{type:"button",onClick:()=>{C&&!j?(A(!1),N(!1)):G()},disabled:!a,title:a?void 0:gtn(),children:C?j?si():df():y?tI():bS()}),_.jsx("span",{role:"status",children:_.jsx($Bn,{test:y,connecting:C&&!j,masterRunning:I[a]})})]}),_.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[_.jsxs("div",{className:"row2",children:[_.jsxs("label",{children:[TQt(),_.jsx(Kr,{type:"text",list:"slurm-partitions",value:c,onChange:$=>u($.target.value),placeholder:Xz(),autoComplete:"off",spellCheck:!1}),_.jsx("datalist",{id:"slurm-partitions",children:y==null?void 0:y.partitions.map($=>_.jsx("option",{value:$},$))})]}),_.jsxs("label",{children:[wS(),_.jsx(Kr,{type:"text",value:h,onChange:$=>f($.target.value),placeholder:Xz(),autoComplete:"off",spellCheck:!1})]})]}),_.jsxs("label",{className:"mt-3 block max-w-xl",children:[JJt(),_.jsx(Kr,{type:"text",value:p,onChange:$=>m($.target.value),placeholder:NBt(),autoComplete:"off",spellCheck:!1})]})]}),v&&_.jsx("div",{className:"error",children:v}),_.jsx("div",{className:"actions",children:_.jsx(Ie,{variant:"primary",type:"submit",disabled:w||K||C,children:w?ka():hc()})})]}),C&&_.jsx(qS,{host:a,backend:"slurm",onComplete:$=>{$.backend==="slurm"&&(x($.result),B(a),A(!1),N(!1))},onError:$=>{A(!0),x({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:$})}},z)]}):_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",xUt()]})})}function PBn(){var C;const e=gn({mutationFn:o3n}),n=p5n(),t=_t(n),r=t.data??null,s=N=>{Vr(n.queryKey,j=>(typeof N=="function"?N(j??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),[h,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 b=r!==null&&a===(r.address??"");async function y(N){if(N.preventDefault(),!c){u(!0),f(null);try{k(await e.mutateAsync({address:a}))}catch(j){f(j instanceof Error?j.message:String(j))}finally{u(!1)}}}async function x(){m("testing");try{m(await c3n(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:Fy,children:w.error}),_.jsxs("form",{className:EC,onSubmit:y,children:[_.jsxs("label",{children:[Fqt(),_.jsx(Kr,{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:[LFt(),": ",Ce(r.resolvedAddress)," · ",XL(),": ",r.source]}),h&&_.jsx("div",{className:"error",children:h}),_.jsxs("div",{className:"actions",children:[_.jsx(Ie,{variant:"primary",type:"submit",disabled:c||b,children:c?ka():hc()}),_.jsx(Ie,{type:"button",onClick:()=>void x(),disabled:p==="testing",children:_Jt()}),_.jsx(FBn,{test:p})]}),(w==null?void 0:w.reachable)&&w.rayVersion&&_.jsxs("p",{className:"m-0 text-sm text-subtext",children:[iXt(),": ",w.rayVersion]})]})]}):_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",hUt()]})})}function FBn({test:e}){return e===null?null:e==="testing"?_.jsx(Wt,{children:vJt()}):e.reachable?_.jsx(Wt,{variant:"success",children:fXt()}):_.jsx(Wt,{variant:"error",children:kS()})}function HBn(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:ul(e.memBytes),r=e.gpus.length===0?null:kRt({count:e.gpus.length});return[n,e.cpuCount>0?QAt({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function qBn({remote:e}){var p;const n=_t(g5n()),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,h]=T.useState(!1),f=()=>n.refetch();return _.jsxs(_.Fragment,{children:[r&&!t?_.jsx("div",{className:"error",children:r}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:NBn,children:[_.jsx("span",{className:"k",children:Wh()}),_.jsx("span",{className:"v",children:!t&&s||u?_.jsxs(Wt,{className:"gap-1.5",role:"status",children:[_.jsx(Nt,{}),u?lIt():ba()]}):r?_.jsx(Wt,{variant:"warning",children:$v()}):t?t.loggedIn?t.sshKeyStatus==="matched"?_.jsx(Wt,{variant:"success",children:Tm()}):t.sshKeyStatus==="unknown"?_.jsx(Wt,{variant:"warning",children:$v()}):_.jsx(Wt,{variant:"warning",children:Pb()}):_.jsx(Wt,{variant:"warning",children:KL()}):null}),_.jsx("span",{className:"k",children:YWt()}),_.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),_.jsx("span",{className:"k",children:gZt()}),_.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?_.jsx(Wt,{variant:"success",children:_Wt()}):t.sshKeyStatus==="no_local_match"?_.jsx(Wt,{variant:"warning",children:VKt()}):t.sshKeyStatus==="none_registered"?_.jsx(Wt,{variant:"error",children:dKt()}):_.jsx(Wt,{children:YL()}):"—"})]}),e&&t&&!t.loggedIn&&_.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:dOt({command:Ce("orx login")})}),!e&&i>0&&_.jsx(g7n,{login:o,onComplete:()=>{h(!1),a(0),f()},onError:m=>{h(!1),sn(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?_.jsxs("p",{dir:"auto",className:Ua,children:[wIt()," ",_.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):_.jsxs("p",{dir:"auto",className:Ua,children:[JVt()," ",_.jsx("code",{children:"ssh-keygen -t ed25519"}),CJt()," ",_.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:Ua,children:Ltn({register:Ce(`orx ssh-key add ${t.sshKeyPath}`),load:Ce("ssh-add")})}):_.jsxs("p",{dir:"auto",className:Ua,children:[VVt()," ",_.jsx("code",{children:"ssh-add"}),IWt()," ",_.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(Ie,{onClick:()=>void f(),disabled:s||u,children:[_.jsx(Wa,{size:13})," ",s?ba():Am()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&_.jsxs(Ie,{variant:"primary",disabled:s||u,onClick:()=>{c(!t.loggedIn),h(!0),a(m=>m+1)},children:[u?_.jsx(Nt,{}):_.jsx(Of,{size:13})," ",t.loggedIn?Arn():rI()]})]})]})}const UBn={local:hTe,ssh:QTe,tinker:nRe,hf:eTe,modal:xTe,k8s:oTe,slurm:HTe,ray:DTe,openresearch:zTe},Uy={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"},BR=["hf","modal","slurm","ray","openresearch"],y4=["hf","modal","openresearch"],XH={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"]},lk=["tinker","hf","modal","ray","k8s"],GBn={tinker:$Me,hf:gMe,modal:SMe,openresearch:TMe},PR="__custom__";function n0(e,n){return!!(n&&!(XH[e]??[]).includes(n))}function VBn({settings:e,projectId:n,onSaved:t}){const r=gn({mutationFn:u3n}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=T.useState(s),[c,u]=T.useState(i),[h,f]=T.useState(n0(s,i)),[p,m]=T.useState(!1),[w,k]=T.useState(null),v=e.targets.find(B=>B.id===a),b=e.targets.filter(B=>B.configured||B.id===s),y=BR.includes(a),x=y4.includes(a),C=XH[a]??[],N=a===s&&(!y||c.trim()===i),j=bf[a](),A=GBn[a],z=p?Iin():x&&!c.trim()?kjt({destination:j}):a==="ssh"?qDt():LDt({destination:j});T.useEffect(()=>{o(s),u(i),f(n0(s,i))},[s,i]);async function M(B,G){const q=BR.includes(B);if(!(p||y4.includes(B)&&!G.trim())){m(!0),k(null);try{t(await r.mutateAsync({backend:B,flavor:q&&G.trim()||null,projectId:n}))}catch(Q){k(Q instanceof Error?Q.message:String(Q)),o(s),u(i),f(n0(s,i))}finally{m(!1)}}}function D(B){const G=e.targets.find(Q=>Q.id===B);if(!G)return;o(G.id);const q=G.id===s?i:"";u(q),f(n0(G.id,q)),y4.includes(G.id)||M(G.id,q)}function I(B){if(B===PR){f(!0);return}f(!1),u(B),(!x||B)&&M(a,B)}return _.jsxs("section",{className:"mb-8",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:cFt()}),_.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(cc,{choices:b.map(B=>({id:B.id,label:bf[B.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:B=>{const G=e.targets.find(q=>q.id===B.id);return G?_.jsx(Yh,{kind:Uy[G.id],size:16}):null},onSelect:D}),y&&_.jsx("div",{children:h?_.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(x&&!c.trim()){a===s&&(u(i),f(n0(s,i)));return}N||M(a,c)},placeholder:zPt(),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":Qz(),title:Qz(),onMouseDown:B=>B.preventDefault(),onClick:()=>f(!1),children:_.jsx(pc,{size:12})})]}):_.jsx(cc,{choices:[{id:"",label:x?mjt():rLt()},...c&&!C.includes(c)?[{id:c,label:mTt({value:Ce(c)})}]:[],...C.map(B=>({id:B,label:B})),{id:PR,label:DPt()}],value:c,variant:"field",dropDown:!0,disabled:p,onSelect:I})})]}),w&&_.jsx("div",{className:"error mt-2.5",children:w}),v&&!v.configured&&_.jsx("p",{className:Ua,children:BJt()})]}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:z}),A&&_.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:A()})]})}function KBn({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?njt():e.id==="openresearch"?rI():e.id==="ray"?bS():krn();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":bf[e.id](),"aria-describedby":i,"aria-haspopup":lk.includes(e.id)?"dialog":void 0}),_.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:_.jsx(Yh,{kind:Uy[e.id],size:48})}),_.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:bf[e.id]()}),_.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:UBn[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"?BMt():lin()," ",_.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:DTt()})]}):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?HL():e.configured?!r||lk.includes(e.id)?Rm():ran():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 WBn({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($0,{size:16})," ",PL()]}),_.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(Yh,{kind:Uy[e.id],size:36})}),_.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:bf[e.id]()})]}),n&&_.jsx(Wt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:HL()})]}),_.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(IBn,{}),e.id==="slurm"&&_.jsx(BBn,{}),e.id==="openresearch"&&_.jsx(qBn,{remote:r})]})]})}function QBn({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(RMt())||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(Yh,{kind:Uy[e.id],size:32}),_.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:bf[e.id]()})]}),_.jsx($t,{title:L0(),"aria-label":L0(),onClick:a,disabled:s.saving,children:_.jsx(br,{size:14})})]}),e.id==="tinker"&&_.jsx(YBn,{target:e}),e.id==="hf"&&_.jsx(JBn,{remote:n}),e.id==="modal"&&_.jsx(OBn,{}),e.id==="ray"&&_.jsx(PBn,{}),e.id==="k8s"&&_.jsx(MBn,{onEditState:i})]})}function XBn({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,D;const s=MI(e==null?void 0:e.id),i=_t(s),a=i.data??null,o=I=>{Vr(s.queryKey,B=>(typeof I=="function"?I(B??null):I)??void 0)},c=a?null:((M=i.error)==null?void 0:M.message)??null,[u,h]=T.useState(null),[f,p]=T.useState(null),m=m5n(),w=_t(m),k=w.data??null,v=((D=w.error)==null?void 0:D.message)??null;T.useEffect(()=>{h(null),p(null)},[e==null?void 0:e.id]);const b=I=>{o(I),p(null)},y=a?a.targets:null,x=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=y?[...y].sort((I,B)=>+(B.id===x)-+(I.id===x)):null,N=(C==null?void 0:C.filter(I=>I.configured))??[],j=(C==null?void 0:C.filter(I=>!I.configured))??[],A=I=>_.jsx(KBn,{target:I,isDefault:x===I.id,summary:I.id==="local"?k?HBn(k):v??pFt():void 0,onOpen:I.id==="local"?void 0:()=>h(I.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${I.id}`),z=u?a==null?void 0:a.targets.find(I=>I.id===u):null;return z&&!lk.includes(z.id)?_.jsx(WBn,{target:z,isDefault:x===z.id,onBack:()=>h(null),remote:r}):_.jsxs(_.Fragment,{children:[_.jsx("h1",{children:FL()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:KBt()}),_.jsx(mPn,{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(VBn,{settings:a,projectId:e==null?void 0:e.id,onSaved:b}),_.jsxs("section",{className:"mb-8",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:Rm()}),_.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(A)})]}),j.length>0&&_.jsxs("section",{className:"mb-3.5",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:mGt()}),_.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:j.map(A)})]}),z&&_.jsx(QBn,{target:z,remote:r,onClose:()=>h(null)})]}):_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",W$t()]})]})}function YBn({target:e}){var y;const n=gn({mutationFn:A4n}),[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(null),c=_j(),u=_t(c),h=u.data??null,f=a??((y=u.error)==null?void 0:y.message)??null,p=x=>{Vr(c.queryKey,C=>(typeof x=="function"?x(C??null):x)??void 0)},[m,w]=T.useState(!1),k=u.isPending||m;async function v(){if(!(k||s)){w(!0),o(null);try{await et.fetchQuery({..._j(),staleTime:0})}catch(x){o(x instanceof Error?x.message:String(x))}finally{w(!1)}}}async function b(x){if(x.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:[!h&&k?_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",ba()]}):h&&_.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[_.jsx("dt",{className:"font-medium text-subtext",children:Wh()}),_.jsx("dd",{className:"m-0",children:_.jsx(Wt,{variant:h.validationStatus==="valid"?"success":h.validationStatus==="invalid"?"error":"warning",children:h.validationStatus==="valid"?Tm():h.validationStatus==="invalid"?nin():h.validationStatus==="billingRequired"?Hsn():Pb()})})]}),(h==null?void 0:h.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:Dsn()})}),(h==null?void 0:h.processEnv)&&_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:Qsn()}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||h!==null&&h.validationStatus!=="missing"?Lnn():gS(),_.jsx(Kr,{type:"password",value:t,placeholder:(h==null?void 0:h.maskedKey)??"",onChange:x=>r(x.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(Ie,{type:"button",disabled:s||k,onClick:()=>void v(),children:[_.jsx(Wa,{size:13})," ",k?ba():Am()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!t.trim()||s||k,children:s?iI():hc()})]})]})]})}function ZBn({settings:e}){return e.validationStatus==="missing"?_.jsx(Wt,{variant:"warning",children:Pb()}):e.validationStatus==="invalid"?_.jsx(Wt,{variant:"error",children:Oqt()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?_.jsx(Wt,{variant:"success",children:Tm()}):e.jobsWrite===!1?_.jsxs("span",{className:"inline-flex items-center gap-2",children:[_.jsx(Wt,{variant:"warning",children:BVt()}),_.jsx(RS,{content:URt(),className:"text-subtext",children:_.jsx(DS,{size:15})})]}):null}function JBn({remote:e}){var y;const n=gn({mutationFn:z4n}),t=uj(),r=_t(t),s=r.data??null,i=x=>{Vr(t.queryKey,C=>(typeof x=="function"?x(C??null):x)??void 0)},a=s?null:((y=r.error)==null?void 0:y.message)??null,[o,c]=T.useState(""),[u,h]=T.useState(!1),[f,p]=T.useState(!1),[m,w]=T.useState(null),k=Hy();async function v(){if(!(u||f||!s&&!a)){p(!0),w(null);try{await et.fetchQuery({...uj(),staleTime:0})}catch(x){w(x instanceof Error?x.message:String(x))}finally{p(!1)}}}async function b(x){if(x.preventDefault(),!(!o.trim()||u||f||!s&&!a)){h(!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{h(!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:wS()}),_.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:Wh()}),_.jsx("dd",{className:"m-0 text-text",children:_.jsx(ZBn,{settings:s})})]})]}),s.validationStatus==="unreachable"&&s.validationError&&_.jsx("p",{className:Fy,children:s.validationError}),s.source==="env"&&_.jsx("p",{className:Ua,children:FHt()}),s.validationStatus==="valid"&&s.jobsWrite===null&&_.jsx(NC,{note:IRt({login:"`hf auth login`",url:Ce("huggingface.co/settings/tokens")}),className:Ua,disabled:e,onRun:k.start}),_.jsx(qy,{run:k.run,onComplete:()=>void r.refetch(),onClose:k.clear})]}):_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",zUt()]}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[s!=null&&s.configured?qnn():XDt(),_.jsx(Kr,{type:"password",value:o,onChange:x=>c(x.target.value),placeholder:(s==null?void 0:s.maskedToken)??OHt(),autoComplete:"off"})]}),m&&_.jsx("div",{className:"error",children:m}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(Ie,{type:"button",disabled:u||f||!s&&!a,onClick:()=>void v(),children:[_.jsx(Wa,{size:13})," ",f?ba():Am()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!o.trim()||u||f||!s&&!a,children:u?iI():hc()})]})]})]})}const YH=/^hf_[A-Za-z0-9]{10,}$/;function ZH(){return _.jsx("tr",{children:_.jsx("td",{colSpan:3,children:_.jsxs("p",{dir:"auto",className:Ua,children:[VJt()," ",_.jsx("code",{children:"HF_TOKEN"}),TYt()]})})})}const FR=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function uk(e,n){const t=n instanceof Error?n.message:String(n);sn(t.includes(e)?t:`${e}: ${t}`,"error")}function ePn({name:e,entry:n,onVars:t}){const r=gn({mutationFn:f=>kI(...f)}),s=gn({mutationFn:F4n}),[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){uk(e,f)}finally{c(!1)}}}async function h(){if(!o){c(!0);try{t(await s.mutateAsync(e))}catch(f){uk(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(Wt,{children:SQt()})]}):_.jsx(Kr,{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:ZL(),"aria-label":jee({name:Ce(e)}),autoComplete:"new-password",disabled:o})}),_.jsx("td",{children:n?_.jsx($t,{className:"[&:hover:not(:disabled)]:text-accent-red",title:w3({name:Ce(e)}),"aria-label":w3({name:Ce(e)}),onClick:()=>void h(),disabled:o,children:_.jsx(Df,{size:13})}):i.trim()&&_.jsx(Ie,{size:"small",onClick:()=>void u(),disabled:o,children:o?ka():hc()})})]}),!n&&e!=="HF_TOKEN"&&YH.test(i.trim())&&_.jsx(ZH,{})]})}function tPn({onVars:e,onDone:n}){const t=gn({mutationFn:f=>kI(...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){uk(r.trim(),f)}finally{c(!1)}}}const h=f=>{f.key==="Enter"&&(f.preventDefault(),u()),f.key==="Escape"&&!o&&n()};return _.jsxs(_.Fragment,{children:[_.jsxs("tr",{children:[_.jsx("td",{children:_.jsx(Kr,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:f=>s(f.target.value),onKeyDown:h,placeholder:"MY_API_KEY","aria-label":sVt(),autoComplete:"off",spellCheck:!1,disabled:o})}),_.jsx("td",{children:_.jsx(Kr,{variant:"inline",className:"text-base",type:"password",value:i,onChange:f=>a(f.target.value),onKeyDown:h,placeholder:ZL(),"aria-label":_Vt(),autoComplete:"new-password",disabled:o})}),_.jsxs("td",{children:[_.jsx(Ie,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?ka():hc()}),_.jsx($t,{title:df(),"aria-label":F$t(),onClick:n,disabled:o,children:_.jsx(br,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&YH.test(i.trim())&&_.jsx(ZH,{})]})}function nPn(){var u;const e=v5n(),n=_t(e),t=n.data??null,r=h=>{Vr(e.queryKey,f=>(typeof h=="function"?h(f??null):h)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=T.useState(!1),o=t===null?[]:t.map(h=>h.key).filter(h=>!FR.includes(h)),c=[...FR,...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:Uen()}),_.jsxs(Ie,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[_.jsx(Xh,{size:12})," ",jIt()]})]}),_.jsx("div",{className:_c,children:s?_.jsx("div",{className:"error",children:s}):t===null?_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",Qu()]}):_.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(h=>_.jsx(ePn,{name:h,entry:t.find(f=>f.key===h),onVars:r},h)),i&&_.jsx(tPn,{onVars:r,onDone:()=>a(!1)})]})})})]})}const r0=[{value:"system",label:zsn,icon:bCn},{value:"light",label:xsn,icon:GCn},{value:"dark",label:csn,icon:xCn}],rPn=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"},{id:"ar",label:"العربية"},{id:"es",label:"Español"},{id:"hi",label:"हिन्दी"}];function sPn(){const e=Yu(),[n,t]=KI(),r=s=>{var h;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?r0.findIndex(f=>f.value===n):o)+i+r0.length)%r0.length;t(r0[u].value),(h=a[u])==null||h.focus()};return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:wzt()}),_.jsxs("div",{className:`${_c} mt-3`,children:[_.jsxs("div",{className:`${fl} pb-3.5`,children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:sj()}),_.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":sj(),onKeyDown:r,children:r0.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:fl,children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:aOt()}),_.jsx("div",{className:"w-52 flex-none",children:_.jsx(cc,{choices:rPn,value:e,variant:"field",dropDown:!0,onSelect:s=>{FD(s)&&qI(s)}})})]})]})]})}const iPn={installer:ayn,"app-bundle":Rbn,appimage:Bbn,portable:yyn,cargo:Vbn,homebrew:Jbn,nix:dyn,unknown:Nyn},x4={cargo:Oyn,homebrew:Fyn,nix:Wyn};function aPn(){var f;const e=gn({mutationFn:p=>O4n(...p)}),{status:n,error:t,apply:r}=z6(),[s,i]=T.useState(null),[a,o]=T.useState(null),c=kB(n),u=s!==null||c.restarting;if(!n)return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:tj()}),t?_.jsx("div",{className:_c,children:_.jsx("div",{className:"error",children:t})}):_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",Qu()]})]});const h=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:tj()}),_.jsxs("div",{className:`${_c} mt-3`,children:[_.jsxs("div",{className:`${xf} pb-3.5`,children:[_.jsx("div",{className:"k",children:JL()}),_.jsx("div",{className:"v",children:n.current}),_.jsx("div",{className:"k",children:tUt()}),_.jsx("div",{className:"v",children:n.latest??"—"}),_.jsx("div",{className:"k",children:UL()}),_.jsx("div",{className:"v",children:iPn[n.channel]()})]}),n.restartRequired&&_.jsxs("div",{className:fl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:uYt()}),_.jsx("p",{children:c.error?hI({error:c.error}):rrn({installed:Ce(n.installedVersion??"—"),current:Ce(n.current??n.installedVersion??"—")})})]}),n.canRestart&&_.jsx(Ie,{size:"small",type:"button",disabled:u,onClick:c.restart,children:c.restarting?pI():dI()})]}),n.selfUpdates?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:fl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:Zz()}),_.jsxs("p",{children:[YGt(),n.envDisabled&&Ain()]})]}),_.jsx(TS,{type:"button",checked:n.autoUpdate,"aria-label":Zz(),disabled:u,onClick:()=>void h("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),_.jsxs("div",{className:fl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?kin({version:Ce(n.latest??"—")}):Hzt()}),_.jsxs("p",{children:[n.updateAvailable?CMt():ljt(),n.updateAvailable&&n.latestTag&&_.jsxs(_.Fragment,{children:[" ",_.jsx("a",{href:wB(n.latestTag),target:"_blank",rel:"noreferrer",className:"underline",children:nI()})]})]})]}),_.jsx(Ie,{size:"small",type:"button",disabled:u,onClick:()=>void h("apply",()=>R4n().then(r)),children:s==="apply"?fS():n.updateAvailable?min():Qzt()})]})]}):_.jsx("div",{className:fl,children:_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:sQt()}),_.jsx("p",{children:((f=x4[n.channel])==null?void 0:f.call(x4))??qtn()})]})}),n.channel==="app-bundle"&&_.jsx(cPn,{busy:s,disabled:u,run:h}),a&&_.jsx("div",{className:"error",children:a})]})]})}function oPn(){var f;const e=gn({mutationFn:j3n}),n=E5n(),t=_t(n),r=t.data??null,s=p=>{Vr(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,h=()=>{!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:Ten()}),r?_.jsxs("div",{className:`${_c} mt-3`,children:[_.jsxs("div",{className:fl,children:[_.jsxs("div",{children:[_.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[Wz(),r.locked&&r.reason&&_.jsx(RS,{content:`${xPt()} ${r.reason}.`,className:"text-subtext",children:_.jsx(DS,{size:15})})]}),_.jsx("p",{children:vVt()})]}),_.jsx(TS,{type:"button",checked:r.enabled,"aria-label":Wz(),disabled:i||r.locked,onClick:h})]}),u&&_.jsx("div",{className:"error",children:u})]}):u?_.jsx("div",{className:"error",children:u}):_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",Qu()]})]})}function cPn({busy:e,disabled:n,run:t}){const r=gn({mutationFn:D4n}),[s,i]=T.useState(null),[a,o]=T.useState(!1),c=u=>void t("cli",()=>r.mutateAsync(u).then(h=>{i(h),o(!1)}).catch(h=>{throw o(!u&&String((h==null?void 0:h.message)??h).includes("--force")),h}));return _.jsxs("div",{className:fl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:_Mt({command:Ce("orx")})}),s?_.jsxs("p",{children:[s.alreadyCurrent?Ijt({link:Ce(s.link)}):Ujt({link:Ce(s.link)}),!s.onPath&&pzt({directory:Ce(s.dir)})]}):_.jsx("p",{children:sMt({command:Ce("orx")})})]}),_.jsx(Ie,{size:"small",type:"button",disabled:n,onClick:()=>c(a),children:e==="cli"?fS():a?jnn():s?nnn():YRt()})]})}function lPn({remote:e}){var w;const n=gn({mutationFn:k=>zI(...k)}),t=ES(),r=_t(t),s=r.data??null,i=k=>{Vr(t.queryKey,v=>(typeof k=="function"?k(v??null):k)??void 0)},[a,o]=T.useState(!1),[c,u]=T.useState(null),h=c??((w=r.error)==null?void 0:w.message)??null,f=async()=>{await r.refetch({cancelRefetch:!1})},p=Hy(),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:oHt()}),s?_.jsxs("div",{className:`${_c} 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:hHt()}),_.jsx(Wt,{variant:s.githubAuthenticated?"success":s.ghInstalled?"warning":"error",children:s.githubAuthenticated?DL():$L()})]}),_.jsxs("div",{className:fl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:Yz()}),_.jsx("p",{children:rtn()})]}),_.jsx(TS,{type:"button",checked:s.githubForNewProjects,"aria-label":Yz(),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(JH,{ghInstalled:s.ghInstalled,remote:e,onCheck:f,onRun:p.start})}),_.jsx(qy,{run:p.run,onComplete:()=>void f(),onClose:p.clear}),h&&_.jsx("div",{className:"error",children:h})]}):h?_.jsx("div",{className:"error",children:h}):_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",Qu()]})]})}function JH({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(NC,{note:e?urn():vMt(),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(jh,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[hqt()," ",_.jsx(gf,{size:12})]}),_.jsx(Ie,{type:"button",variant:e?"warning":"default",disabled:s,onClick:a,children:s?ba():Am()})]})]})}function uPn(){var m,w,k;const e=gn({mutationFn:h4n}),n=gn({mutationFn:p4n}),t=S9n(),r=_t(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((w=r.data)==null?void 0:w.hasSession)??null,a=v=>Vr(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...v}),o=v=>a({hasToken:v}),[c,u]=T.useState(!1),[h,f]=T.useState(null),p=h??((k=r.error)==null?void 0:k.message);return _.jsxs("div",{className:ck,children:[_.jsx("h3",{children:WL()}),_.jsxs("div",{className:xf,children:[_.jsx("span",{className:"k",children:xHt()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:s?"success":"default",children:s===null?p?po():ba():s?rj():M3()})})]}),_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:utn()}),s?_.jsx("div",{className:E0,children:_.jsx(Ie,{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?nj():mnn()})}):_.jsx($R,{save:xI,onSaved:v=>o(v.hasToken),placeholder:gQt(),createHref:"https://www.overleaf.com/user/settings"}),_.jsxs("div",{className:xf,children:[_.jsx("span",{className:"k",children:$Yt()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:i?"success":"default",children:i===null?p?po():ba():i?rj():M3()})})]}),_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:GYt()}),i?_.jsx("div",{className:E0,children:_.jsx(Ie,{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?nj():lnn()})}):_.jsx($R,{save:v=>wI(v),onSaved:v=>a({hasSession:v.hasSession}),placeholder:j3(),createHref:"https://www.overleaf.com/project",createLabel:cbt()}),p&&_.jsx("div",{className:"error",children:p})]})}function _Pn({project:e,onProjectUpdate:n,remote:t}){var M;const r=gn({mutationFn:D=>zI(...D)}),s={...C5n((e==null?void 0:e.id)??""),enabled:!!e},i=_t(s),a=Hy(),o=i.data??null,c=D=>{Vr(s.queryKey,I=>(typeof D=="function"?D(I??null):D)??void 0)},[u,h]=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,b]=T.useState(!1),[y,x]=T.useState(null),C=!!(o!=null&&o.github.owner&&o.github.repo),N=async()=>{await i.refetch({cancelRefetch:!1})},j=D=>{const I=D instanceof Error?D.message:String(D);return I.toLowerCase().includes("archived")?nRt():I.includes("(fetch first)")||I.includes("non-fast-forward")?lRt():I.includes("403")||I.toLowerCase().includes("permission denied")?mRt():I},A=()=>{e&&(h(!0),p(null),E3n(e.id).then(D=>{c(D.git),n(D.project),et.fetchQuery(ES()).then(I=>{!I.githubForNewProjects&&!I.githubDefaultPromptSeen&&k(!0)}).catch(()=>{})}).catch(D=>p(j(D))).finally(()=>h(!1)))},z=D=>{b(!0),x(null),r.mutateAsync([D,!0]).then(()=>k(!1)).catch(I=>x(I instanceof Error?I.message:String(I))).finally(()=>b(!1))};return _.jsxs(_.Fragment,{children:[_.jsx("h1",{children:rYt()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:Xnn({project:(e==null?void 0:e.name)??lTt()})}),e?m&&!o?_.jsx("div",{className:"error",children:m}):o?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:ck,children:[_.jsx("h3",{children:HUt()}),_.jsxs("div",{className:xf,children:[_.jsx("span",{className:"k",children:$Qt()}),_.jsx("span",{className:"v",children:o.path}),_.jsx("span",{className:"k",children:"Git"}),_.jsx("span",{className:"v",children:o.gitVersion??wL()}),_.jsx("span",{className:"k",children:TZt()}),_.jsx("span",{className:"v",children:o.initialized?QTt({branch:Ce(o.currentBranch??yS()),state:o.clean?Ajt():ARt()}):LLt()}),_.jsx("span",{className:"k",children:x$t()}),_.jsx("span",{className:"v",children:o.baselineBranch}),_.jsx("span",{className:"k",children:XXt()}),_.jsx("span",{className:"v",children:o.remotes.length?o.remotes.map(D=>`${D.name}: ${D.url}`).join(" · "):xS()})]}),!o.initialized&&_.jsx("div",{className:E0,children:_.jsx(Ie,{variant:"primary",onClick:()=>void C3n(e.id).then(c).catch(D=>p(String(D))),children:WHt()})})]}),_.jsxs("div",{className:ck,children:[_.jsx("h3",{children:"GitHub"}),_.jsxs("div",{className:xf,children:[_.jsx("span",{className:"k",children:BL()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:o.github.authenticated?"success":o.github.ghInstalled?"warning":"error",children:o.github.authenticated?DL():$L()})}),_.jsx("span",{className:"k",children:ZQt()}),_.jsx("span",{className:"v",children:C?_.jsxs(_.Fragment,{children:[_.jsxs("span",{children:[o.github.owner,"/",o.github.repo]}),!o.github.enabled&&_.jsx(Wt,{children:sJt()})]}):_.jsx(Wt,{children:DUt()})}),o.github.enabled&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:YZt()}),_.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(JH,{ghInstalled:o.github.ghInstalled,remote:t,onCheck:()=>N(),onRun:a.start})}),_.jsx(qy,{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?Uin():nTt()}),_.jsxs("div",{className:E0,children:[C&&o.github.url&&_.jsxs(jh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[ej()," ",_.jsx(gf,{size:12})]}),_.jsx(Ie,{variant:"primary",disabled:u,onClick:A,children:u?tEt():W9t()})]})]}),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:jFt()}),_.jsxs("div",{className:E0,children:[o.github.url&&_.jsxs(jh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[ej()," ",_.jsx(gf,{size:12})]}),_.jsx(Ie,{disabled:u,onClick:()=>{h(!0),N3n(e.id).then(D=>{c(D.git),n(D.project)}).catch(D=>p(D instanceof Error?D.message:String(D))).finally(()=>h(!1))},children:u?cEt():F9t()})]})]})]}),_.jsx(uPn,{}),m&&_.jsx("div",{className:"error",children:j(m)})]}):_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",Qu()]}):_.jsx("div",{className:_c,children:_.jsx("p",{className:Ua,children:vWt()})}),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:()=>z(!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:nGt()}),_.jsx("p",{children:RJt()}),y&&_.jsx("div",{className:"error",children:y}),_.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[_.jsx(Ie,{disabled:v,onClick:()=>z(!1),children:BKt()}),_.jsx(Ie,{variant:"primary",disabled:v,onClick:()=>z(!0),children:v?ka():yOt()})]})]})})]})}const fPn={env:Qhn,config:npn,xdg:lpn,default:Hhn},w4={preparing:zhn,copying:Pdn,verifying:mpn,finalizing:Kdn},dPn=e=>{var n;return((n=w4[e])==null?void 0:n.call(w4))??e};function hPn(){var x;const e=b5n(),n=_t(e),t=n.data??null,r=t?null:((x=n.error)==null?void 0:x.message)??null,[s,i]=T.useState(""),[a,o]=T.useState(!1),[c,u]=T.useState(null),[h,f]=T.useState({kind:"idle"}),[p,m]=T.useState(null);T.useEffect(()=>{t&&i(C=>C||t.current)},[t]),T.useEffect(()=>FI(C=>{C.type==="progress"?f(N=>{const j=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||j}}):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 b(){if(!(a||!k)){o(!0),m(null),u(null);try{u(await q4n(k))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function y(C){if(C.preventDefault(),!(h.kind==="moving"||!k||v)&&(m(null),!!window.confirm(ohn({path:Ce(k)})))){f({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await U4n(k)}catch(N){f({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:UZt()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:Qrn()}),r?_.jsx("div",{className:_c,children:_.jsx("div",{className:"error",children:r})}):t?_.jsxs("div",{className:_c,children:[_.jsx("div",{className:"settings-card-head mb-3",children:_.jsx("h3",{children:HPt()})}),_.jsxs("div",{className:xf,children:[_.jsx("span",{className:"k",children:hPt()}),_.jsx("span",{className:"v",children:t.current}),_.jsx("span",{className:"k",children:XL()}),_.jsx("span",{className:"v",children:fPn[t.source]()})]}),!w&&_.jsxs("form",{className:EC,onSubmit:y,children:[_.jsxs("label",{children:[UGt(),_.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:h.kind==="moving"})]}),c&&!c.error&&c.ok&&_.jsxs("p",{className:Ua,children:[TXt()," ",ul(c.treeBytes??0),c.freeBytes!=null&&` — ${ehn({size:Ce(ul(c.freeBytes))})}`,c.sameFilesystem?Dhn():"","."]}),c&&c.ok===!1&&c.error&&_.jsx("div",{className:"error",children:c.error}),p&&_.jsx("div",{className:"error",children:p}),h.kind==="moving"&&_.jsx(GH,{value:h.copied,max:h.total,label:dPn(h.phase),caption:h.total>0?_.jsxs("span",{className:"text-sm",children:[ul(h.copied)," / ",ul(h.total)]}):void 0}),h.kind==="done"&&_.jsxs("p",{className:Ua,children:[AGt(),h.oldPathLeft&&_.jsxs(_.Fragment,{children:[" ",nIt({path:Ce(h.oldPathLeft)})]})]}),h.kind==="error"&&_.jsxs("div",{className:"error",children:[kGt()," ",h.message]}),_.jsxs("div",{className:"actions",children:[_.jsx(Ie,{type:"button",onClick:b,disabled:a||!k||v||h.kind==="moving",children:a?ba():jzt()}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!k||v||h.kind==="moving",children:h.kind==="moving"?xhn():hhn()})]})]})]}):_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",Qu()]})]})}const _k=e=>e==="running"||e==="starting";function pPn(e){return _k(e.status)?I0(Date.now()-e.createdAt):e.endedAt?I0(e.endedAt-e.createdAt):"—"}function eq({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:h$t()}),_.jsx("th",{children:Wh()}),_.jsx("th",{children:SZt()}),_.jsx("th",{children:SYt()})]})}),_.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(XS,{backend:t.backend}),r&&_.jsx(Qh,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:Jz(),"aria-label":Jz(),onClick:i=>i.stopPropagation(),children:_.jsx(gf,{size:12})})]})}),_.jsx("td",{children:_.jsx(pl,{status:ha(t)})}),_.jsx("td",{children:yo(t.createdAt)}),_.jsx("td",{children:pPn(t)})]},t.id)})})]})})}function mPn({projectId:e,onViewHistory:n}){var f;const t=_t({...Ru(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=>_k(p.status)).sort(c),h=r==null?void 0:r.filter(p=>!_k(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:[gYt(),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(Ie,{size:"small",onClick:o,disabled:i,children:[_.jsx(Wa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]}),_.jsx(Ie,{size:"small",onClick:n,children:h!=null&&h.length?fJe({count:Zt(h.length)}):iJe()})]})]}),s&&_.jsx("div",{className:"error",children:s}),!u||!h?_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",Qu()]}):_.jsx(eq,{instances:u,emptyLabel:e?$Ze():ZZe()})]})}function gPn({projectId:e,onBack:n}){var c;const t=_t({...Ru(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(h=>h+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($0,{size:14})," ",PL()]}),_.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[_.jsx("h1",{children:Nqt()}),_.jsxs(Ie,{size:"small",onClick:o,disabled:i,children:[_.jsx(Wa,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),s&&_.jsx("div",{className:"error",children:s}),r?_.jsx(eq,{instances:[...r].sort((u,h)=>h.createdAt-u.createdAt),emptyLabel:e?TZe():GZe()}):_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",Qu()]})]})}const tq=["projects","harnesses","storage"],vPn=[{id:"compute",label:FL,icon:_.jsx(OS,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:qL,icon:_.jsx(Of,{size:15}),activeTabs:["environment"]},{id:"settings",label:SS,icon:_.jsx(BS,{size:15}),activeTabs:["settings",...tq]}];function bPn(e){return tq.includes(e)}function yPn({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||bPn(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"}),h=new ResizeObserver(u);h.observe(c),u();const f=()=>h.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:SS()}),_.jsxs("div",{className:"settings-stack mt-4.5",children:[_.jsx("section",{className:Ad,children:_.jsx(sPn,{})}),_.jsx("section",{ref:e==="projects"?a:void 0,className:Ad,children:_.jsx(lPn,{remote:s})}),_.jsx("section",{ref:e==="harnesses"?a:void 0,className:Ad,children:_.jsx(TBn,{remote:s})}),!s&&_.jsx("section",{ref:e==="storage"?a:void 0,className:Ad,children:_.jsx(hPn,{})}),_.jsx("section",{className:Ad,children:_.jsx(oPn,{})}),!s&&_.jsx("section",{className:Ad,children:_.jsx(aPn,{})})]})]}),e==="compute"&&_.jsx(XBn,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&_.jsx(gPn,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&_.jsxs(_.Fragment,{children:[_.jsx("h1",{children:qL()}),_.jsx(nPn,{})]}),e==="git"&&_.jsx(_Pn,{project:n,onProjectUpdate:t,remote:s})]})}function em(e){const n=e.split("@")[0].replace(/[~^]$/,"");return n.charAt(0).toUpperCase()+n.slice(1).replaceAll("-"," ")}function zC(e){return e.replace(/@personal$|\^$/,"@u").replace(/@project$|~$/,"@p")}function fk(e){return`${e.plugin?`${em(e.plugin)}: `:""}${em(e.name)}`}const nq=["plan","goal","new","resume","model","compact","copy","export","side"],xPn={plan:()=>z2t(),goal:()=>bWe(),new:()=>vit(),resume:()=>pEt(),model:()=>dnt(),compact:()=>KAe(),copy:()=>bOe(),export:()=>dBe(),side:()=>Xan()};function wPn(e){return{name:e,get description(){return xPn[e]()},source:"command"}}function Gy(e){return nq.some(n=>n===e)}const pb={clear:"new",summarize:"compact"};function dk(e){const n=e.toLowerCase();return Gy(n)?n:Object.hasOwn(pb,n)?pb[n]:null}function rq(e){return Object.keys(pb).filter(n=>pb[n]===e)}function kPn(e,n){return e.name.toLowerCase().startsWith(n)||e.plugin&&`${e.plugin}:${e.name}`.toLowerCase().startsWith(n)?!0:e.source==="command"&&Gy(e.name)&&rq(e.name).some(t=>t.startsWith(n))}function k4(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?h:s}${a.slice(h.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 HR(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 sq(e){return nq.filter(n=>n!=="plan"||e)}function EPn(e,n){const t=e.filter(r=>!dk(r.name));for(const r of sq(n))t.push(wPn(r));return t.sort((r,s)=>+(s.source==="command")-+(r.source==="command")||fk(r).localeCompare(fk(s),void 0,{sensitivity:"base"}))}function S4(e){return e==="plan"||e==="goal"||e==="side"}function NPn(e,n){for(const t of sq(n).sort((r,s)=>+(r==="plan")-+(s==="plan"))){const r=[t,...rq(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 C4(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const zPn=["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 jPn=null;function qR(e,n){const t=jPn??(jPn=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(em(e)).width-t.measureText(`/${e}`).width;return Math.max(1,Math.ceil((s+6)/t.measureText(" ").width))}const APn={plan:cCn,goal:x$,new:HCn,resume:w$,model:OS,compact:$6n,copy:Mf,export:Vb,side:B0};function iq({name:e,className:n}){const t=Gy(e)?APn[e]:t7n;return _.jsx(t,{size:16,strokeWidth:1.5,className:n,"aria-hidden":"true"})}function aq({name:e}){return _.jsxs(_.Fragment,{children:[_.jsx(iq,{name:e,className:"me-1 inline-block align-middle"}),em(e)]})}function oq(e,n,t,r,s,i=!1){let a=0;return SPn(e,n).map((o,c,u)=>{var m,w;const h=a+o.text.length;a=h;const f=o.text.slice(1).toLowerCase();if(o.command&&s)return s(o.text,f,h,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(aq,{name:f})},c):i?_.jsx("span",{"aria-hidden":"true",children:o.text},c):_.jsx(T.Fragment,{children:p},c)})}function TPn({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(),[h,f]=T.useState(!1),p=_t({...z5n(n,s,r.harness),enabled:h,subscribed:h}),m=p.data??null,w=p.isFetching,[k,v]=T.useState({}),b=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},y=()=>{const N=a.current;if(!N)return;const j=N.getBoundingClientRect(),A=Math.min(420,window.innerWidth-32),z=Math.max(16,Math.min(j.left-4,window.innerWidth-A-16));v(j.top>300?{bottom:window.innerHeight-j.top+12,left:z,width:A}:{left:z,top:j.bottom+12,width:A})},x=()=>{b(),y(),f(!0)},C=()=>{b(),c.current=window.setTimeout(()=>f(!1),120)};return T.useEffect(()=>()=>b(),[]),T.useEffect(()=>{if(!h)return;const N=()=>y();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[h]),_.jsxs(T.Fragment,{children:[_.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":h,"aria-label":hJ({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:x,onMouseLeave:C,onFocus:x,onBlur:C,onKeyDown:N=>{var j,A;if(N.key==="Escape"){f(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),x();return}h&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(j=o.current)==null||j.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),h&&(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 j,A;N.preventDefault(),(j=i.current)==null||j.focus(),(A=i.current)==null||A.setSelectionRange(t,t),b()},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(aq,{name:n})})]})})]}),h&&ai.createPortal(_.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":wee({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:b,onMouseLeave:C,onFocus:b,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:em(n)}),_.jsx(Wt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:ron()})]}),_.jsx("div",{className:"p-4 text-sm text-text",children:w&&m===null?_.jsx("span",{className:"text-muted",children:uon()}):_.jsx(uc,{text:m??r.description})})]}),document.body)]})}function RPn({text:e,isCommand:n}){return _.jsx(_.Fragment,{children:oq(e,n,"skill-chip me-0.5 whitespace-nowrap font-normal text-skill-blue")})}function MPn({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 zPn)c.style.setProperty(p,f.getPropertyValue(p));c.style.width=`${o.clientWidth+parseFloat(f.borderLeftWidth)+parseFloat(f.borderRightWidth)}px`};u();const h=new ResizeObserver(u);return h.observe(o),()=>h.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:[oq(e,t,"",void 0,(o,c,u,h)=>{if(u===n)return _.jsx("span",{"aria-hidden":"true",children:o},`${h}:${u}`);const f=r.find(p=>p.name===zC(c));return f&&f.source!=="command"?_.jsx(TPn,{label:o,name:c,end:u,skill:f,projectId:s,textareaRef:i},`${h}:${u}`):_.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[_.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${h}:${u}`)},!0),"​"]})}function OPn({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(iq,{name:i.name,className:"shrink-0"}),_.jsx("span",{className:"skill-name shrink-0",children:fk(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:gon()}),i.source==="project"&&_.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:gL()})]},i.name))})}function DPn(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const hk=6.5,UR=2*Math.PI*hk;function LPn({usage:e}){return!e||e.usedTokens<=0?null:_.jsx(IPn,{usage:e})}function IPn({usage:e}){const{open:n,setOpen:t,ref:r}=Vi(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":DPn(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:ZMe(),onClick:()=>t(u=>!u),children:a===null?c1(s):_.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[_.jsx("circle",{cx:"8",cy:"8",r:hk,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),_.jsx("circle",{cx:"8",cy:"8",r:hk,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${UR*Math.max(a,2)/100} ${UR}`,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:GMe()}),_.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?iOe({value:Ce(c1(s))}):fOe({used:Ce(c1(s)),total:Ce(c1(i)),percent:Ce(c)})})]}),a!==null&&_.jsx(GH,{value:s,max:i,fillColor:o})]})]})}function $Pn(e,n,t){const r=e.map(t);return n<0?r:[...r.slice(0,n),_.jsxs("div",{role:"group","aria-label":Uz(),children:[_.jsx("div",{className:"px-2.5 pb-1 pt-2.5 text-sm font-medium text-subtext",children:Uz()}),r.slice(n)]},"from-terminal")]}function BPn({activeSessionId:e,onClose:n,onResume:t,onImport:r}){const s=T.useRef(null),i=T.useRef(null),{data:a,isPending:o,error:c}=_t(R5n()),{data:u=[]}=_t(zh()),{data:h=[]}=_t(LI()),[f,p]=T.useState(""),[m,w]=T.useState(0);Dm(s,n);const k=T.useMemo(()=>new Map(u.map(N=>[N.id,N.name])),[u]),v=T.useMemo(()=>{const N=f.trim().toLowerCase(),j=M=>!N||M.toLowerCase().includes(N),A=(a??[]).filter(M=>M.id!==e).filter(M=>j(`${M.title??""} ${k.get(M.projectId)??""} ${yu[M.harness]}`)).map(M=>({kind:"session",key:M.id,session:M})),z=h.filter(M=>j(`${M.title??""} ${M.cwd??""} ${yu[M.harness]}`)).map(M=>({kind:"native",key:`${M.harness}:${M.nativeId}`,chat:M}));return[...A,...z]},[a,h,f,e,k]),b=T.useMemo(()=>v.findIndex(N=>N.kind==="native"),[v]),y=Math.min(m,Math.max(0,v.length-1));T.useLayoutEffect(()=>{var N;(N=i.current)==null||N.scrollIntoView({block:"nearest"})},[y,v]);const x=N=>(N==null?void 0:N.split("/").filter(Boolean).at(-1))??"",C=N=>N.kind==="native"?r(N.chat):t(N.session);return ai.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":Vz(),tabIndex:-1,children:[_.jsx("div",{className:"border-b border-border p-3",children:_.jsx(Kr,{"data-initial-focus":!0,value:f,placeholder:Gz(),"aria-label":Gz(),role:"combobox","aria-autocomplete":"list","aria-expanded":v.length>0,"aria-controls":"resume-options","aria-activedescendant":v[y]?`resume-option-${v[y].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 j=N.key==="ArrowDown"?1:-1;w((y+j+v.length)%v.length)}else N.key==="Enter"&&v[y]&&(N.preventDefault(),C(v[y]))}})}),_.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?Vz():void 0,children:o?_.jsxs(Qr,{className:"px-2.5 py-2",role:"status",children:[_.jsx(Nt,{})," ",hS()]}):c&&!a?_.jsx("div",{className:"px-2.5 py-2 text-sm text-accent-red",role:"alert",children:dS({error:Ce(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:wEt()}):$Pn(v,b,(N,j)=>{var D;const A=N.kind==="native"?N.chat:null,z=N.kind==="session"?N.session:null;return _.jsxs(yn,{id:`resume-option-${N.key}`,ref:j===y?i:void 0,type:"button",role:"option","aria-selected":j===y,active:j===y,tabIndex:-1,className:"gap-2.5 text-text",onMouseEnter:()=>w(j),onClick:()=>C(N),children:[_.jsx(Th,{harness:(A==null?void 0:A.harness)??(z==null?void 0:z.harness)??"claude-code"}),_.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",children:((D=(A==null?void 0:A.title)??(z==null?void 0:z.title))==null?void 0:D.trim())||Od()}),_.jsx("span",{dir:"auto",className:"max-w-40 shrink-0 truncate text-muted",title:(A==null?void 0:A.cwd)??void 0,children:A?x(A.cwd):k.get((z==null?void 0:z.projectId)??"")??""}),_.jsx("span",{className:"shrink-0 text-muted tabular-nums",children:yo((A==null?void 0:A.updatedAt)??(z==null?void 0:z.updatedAt)??0)})]},N.key)})})]})}),document.body)}const mb="!";function GR(e){return e.startsWith(mb)?e.slice(mb.length).trim():null}function PPn(e){return e.startsWith(mb)?e.slice(mb.length):e}function FPn(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 HPn(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 qPn(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),r=>r[0].length)),t="`".repeat(Math.max(3,n+1));return` +`,u+3),p=f===-1?e.length:f;/^[ \t]*$/.test(e.slice(h,u))&&/^[ \t\r]*$/.test(e.slice(u+3,p))&&a.push(u)}for(let u=0;u+1`$$${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}`)),OPn(t,n)}function nq(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 IPn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function Wr(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=IPn(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const rq=T.createContext(void 0);function sq({projectId:e,sessionId:n,children:t}){const r=T.useMemo(()=>(i,a=!1)=>{if(/^(https?:)?\/\//i.test(i))return i;const o=cF(i);return o?(o.source==="absolute"?DI(o.path):o.source==="artifact"&&!a?df(e,o.path):K3(e,o.source==="artifact"?`artifacts/${o.path}`:o.path,{sessionId:n??void 0}))+o.hash:null},[e,n]),s=T.useMemo(()=>({sessionId:n??void 0}),[n]);return _.jsx(rq,{value:r,children:_.jsx(uy,{value:s,children:t})})}function $Pn({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}),[h,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=h.width&&c.width?Math.min(1,c.width*.9/h.width,c.height*.9/h.height):1;return si.createPortal(_.jsxs("dialog",{ref:s,tabIndex:-1,"aria-label":n||hL(),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:h.width?{width:h.width*p*a,height:h.height*p*a}:void 0,className:`pointer-events-auto block m-auto shrink-0 max-w-none rounded-lg shadow-modal ${h.width&&c.width?"visible":"invisible"}`})})}),_.jsxs("div",{className:"absolute top-5 right-5 flex gap-2",children:[_.jsx(Wh,{shape:"circle",href:e,download:t||!0,"aria-label":M3(),title:M3(),className:"bg-background shadow-popover",children:_.jsx(Wb,{size:16})}),_.jsx(It,{shape:"circle",onClick:r,"aria-label":q3(),title:q3(),className:"bg-background shadow-popover",children:_.jsx(xr,{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(It,{shape:"circle",disabled:a<=.25,onClick:()=>o(m=>Math.max(.25,m-.25)),"aria-label":Cz(),title:Cz(),children:_.jsx(I7n,{size:16})}),_.jsxs(Ie,{variant:"ghost",className:"min-w-16 tabular-nums",onClick:()=>o(1),title:Ez(),"aria-label":Ez(),children:[Math.round(a*100),"%"]}),_.jsx(It,{shape:"circle",disabled:a>=4,onClick:()=>o(m=>Math.min(4,m+.25)),"aria-label":Sz(),title:Sz(),children:_.jsx(Qh,{size:16})})]})]})]}),document.body)}function BPn({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:h=>{h.preventDefault(),h.stopPropagation(),c(!0)},onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),h.stopPropagation(),c(!0))},onError:!i&&n&&n!==e?()=>a(!0):void 0}),o&&u&&_.jsx($Pn,{src:u,alt:r,name:t,onClose:()=>c(!1)})]})}const PPn=1e5;function FPn({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(It,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:SS(),"aria-label":frt(),onClick:s,children:t?_.jsx(bi,{size:13}):_.jsx(Yu,{size:13})}),_.jsx("pre",{children:_.jsx("code",{children:AEn(e,n,PPn)})})]})}function HPn(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 KR(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=HPn(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:w4(e,s,a.index)});const h=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:c},position:w4(e,a.index,h),type:o==="run"?"runMention":"fileMention"}),s=h}return i?(siq(e)}function WR({path:e,line:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,i=n!=null?`${s}:${n}`:s,a=XEn(e,t),o=Wr(c=>r==null?void 0:r(e,n,t,void 0,c));return _.jsxs(_.Fragment,{children:[_.jsxs("button",{className:"file-chip",title:r?HZ({path:Ce(e)}):e,...o,...a.handlers,onKeyDown:c=>{var u,h;(h=(u=a.handlers).onKeyDown)==null||h.call(u,c),c.defaultPrevented||o.onKeyDown(c)},disabled:!r,children:[_.jsx(O$,{size:12}),_.jsx("span",{className:"file-chip-label",children:i}),_.jsx(F$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]}),a.menu&&_.jsx(YEn,{...a.menu,onOpen:()=>r==null?void 0:r(e,n,t,void 0,"keepOpen")})]})}function UPn({id:e,label:n,onOpenRun:t}){return _.jsxs("button",{className:"file-chip run-chip",title:t?pJ({id:Ce(e)}):mee({id:Ce(e)}),...Wr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[_.jsx(VS,{size:12}),_.jsx("span",{className:"file-chip-label",children:n||NI()}),_.jsx(F$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const aq={singleDollarTextMath:!0},GPn=Ty().use(zy).use(JH).use(eq,aq).use(NPn).use(qPn).use(ob).use(vOn).use(zH);function KPn(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const oq={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?v5(i[1]):null;return _.jsx(FPn,{code:a,lang:c})},pre:({children:e})=>_.jsx(_.Fragment,{children:e})};function VPn({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}){Qu();const o=T.useContext(rq),c=i??o,u=T.useMemo(()=>({"file-mention":h=>{const f=U5(h.path),p=h.lines&&gOn(h.lines)||f.line;return _.jsx(WR,{path:f.path,line:p,exp:h.exp,onOpenFile:t})},"run-mention":h=>_.jsx(UPn,{id:h.id,label:h.label,onOpenRun:r}),a:({node:h,href:f,children:p,"data-figure-src":m,"data-cited-href":w,...k})=>{const v=typeof m=="string"?cF(m):null;if(v&&t){const x=v.source==="artifact"?`artifacts/${v.path}`:v.path,C=s?s(x):x;if(C)return _.jsx("button",{type:"button",className:"text-primary underline cursor-pointer text-start",...Wr(N=>t(C,void 0,void 0,void 0,N)),children:p})}const b=typeof w=="string"?w:f,y=b?U5(b):null;if(y&&KPn(y.path)&&t){let x;try{x=decodeURI(y.path)}catch{return _.jsx("span",{children:p})}const C=s?s(x):x;return C?_.jsx(WR,{path:C,line:y.line,onOpenFile:t}):_.jsx("span",{children:p})}return _.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",...k,children:p})},figure:({children:h})=>_.jsx(VPn,{children:h}),figcaption:({children:h})=>_.jsx("figcaption",{className:"mt-3 text-sm italic leading-relaxed text-text",children:h}),th:({node:h,...f})=>_.jsx("th",{dir:"auto",...f}),td:({node:h,...f})=>_.jsx("td",{dir:"auto",...f}),img:({node:h,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(BPn,{...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},...oq}),[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(BDn,{content:nq(n,{predictMath:a}),processor:GPn,components:u,predict:a})})}),QR="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function WPn({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,c]=T.useState(!1),u=T.useRef(null),[h,f]=T.useState(!1),[p,m]=T.useState(""),w=T.useRef(null);T.useEffect(()=>{if(!o)return;const v=b=>{u.current&&!u.current.contains(b.target)&&c(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),T.useEffect(()=>{var v;h&&((v=w.current)==null||v.focus())},[h]);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(VS,{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?z4t({agent:Ce(n)}):x4t({agent:Ce(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",...Wr(t),children:W4t()})]}),h?_.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:w3t(),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:QR,children:[_.jsx(Ie,{size:"small",onClick:()=>{m(""),f(!1)},children:GL()}),_.jsx("span",{className:"plan-strip-spacer flex-1"}),_.jsxs(Ie,{size:"small",variant:"primary",onClick:k,children:[c3t(),_.jsx(M$,{size:13})]})]})]}):_.jsxs("div",{className:QR,children:[_.jsx(Ie,{size:"small",onClick:i,children:t3t()}),_.jsx(Ie,{size:"small",onClick:()=>f(!0),children:p3t()}),_.jsx("span",{className:"plan-strip-spacer flex-1"}),s?_.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[_.jsx(Ie,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:e4t()}),_.jsx(Ie,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":F4t(),onClick:()=>c(v=>!v),children:_.jsx(mc,{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(vn,{onClick:()=>{c(!1),r("bypassPermissions")},children:o4t()})})]}):_.jsx(Ie,{size:"small",variant:"primary",onClick:()=>r(),children:h4t()})]})]})}function XR({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,h]=T.useState(null);async function f(p){if(p.preventDefault(),!(o||!i.trim())){c(!0),h(null);try{n(await e(i.trim())),a("")}catch(m){h(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(Ie,{type:"submit",disabled:o||!i.trim(),children:o?Sa():pc()}),_.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??TQe()}),u&&_.jsx("div",{className:"error",children:u})]})}function cq({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 QPn({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:[Adn(),_.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:oI()},...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),d5n(r||null).catch(s=>{Zt(s instanceof Error?s.message:String(s),"error")}).finally(()=>t(!1))}})})]})}function XPn({host:e,connecting:n,reference:t,onChange:r}){const s=T.useId(),i=pn({mutationFn:f5n,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:LL()}),_.jsxs("div",{className:"mt-3 grid max-w-xl gap-3",children:[_.jsxs("label",{className:"text-sm text-subtext",children:[Ydn(),_.jsx(lc,{variant:"field",dropDown:!0,value:t!==null?"container":"host",disabled:n,choices:[{id:"host",label:Idn()},{id:"container",label:Udn()}],onSelect:o=>a(o==="container"?"":null)})]}),t!==null&&_.jsxs("label",{className:"text-sm text-subtext",htmlFor:`${s}-container`,children:[kdn(),_.jsx(Br,{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 fc=["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(" "),yf=["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(" "),YPn=["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(" "),Gy="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",Ua=["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(" "),BC=["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(" "),dl=["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(" "),mk=["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(" "),N0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),jd=["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(" "),ZPn=new Set(["gh auth login","hf auth login","claude auth status"]);function lq(e){return ZPn.has(e)?`/api/settings/commands/run?command=${encodeURIComponent(e)}`:void 0}function Ky(){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 PC({note:e,className:n,disabled:t,resolve:r=lq,onRun:s}){return e?_.jsx("p",{className:n,children:Fu(e,{canRun:i=>!t&&r(i)!==void 0,onRun:i=>{const a=r(i);a&&s(i,a)}})}):null}function Vy({run:e,onComplete:n,onClose:t}){return e?_.jsx($8n,{path:e.path,label:e.command,onComplete:n,onError:r=>Zt(r,"error"),onClose:t},`${e.command}-${e.attempt}`):null}function k4(e){return e.catalogPending?{cls:"warn",variant:"warning",label:_f()}:e.authCheckFailed?{cls:"warn",variant:"warning",label:Bv()}:e.agentReady&&!e.authenticated&&e.authMethod!=="local"?{cls:"warn",variant:"warning",label:$L()}:e.agentReady?{cls:"ok",variant:"success",label:e.authMethod==="thirdParty"||ny(e)?Rm():e.authMethod==="local"?ES():kJt()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:EUt()}:e.authMethod==="local"?{cls:"warn",variant:"warning",label:BL()}:e.needsConfigRepair||e.authState==="unknown"?{cls:"warn",variant:"warning",label:Bv()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:Itn()}:{cls:"warn",variant:"warning",label:cI()}:{cls:"warn",variant:"warning",label:YWt()}}function JPn({h:e}){if(e.id==="opencode"&&e.agentReady&&!e.authenticated&&!e.authMethod)return _.jsx(_.Fragment,{children:oMt()});const n=ny(e);return n?_.jsx(_.Fragment,{children:n}):e.authMethod?e.authMethod==="local"?_.jsx(_.Fragment,{children:$v()}):e.authMethod==="thirdParty"?_.jsx(_.Fragment,{children:pI()}):_.jsx(_.Fragment,{children:e.authMethod==="oauth"?h$t():CS()}):_.jsx(_.Fragment,{children:"—"})}function eFn(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 tFn({remote:e}){const n=Bu(),{data:t=null}=ut(n),[r,s]=T.useState(null),[i,a]=T.useState(!1),o=Ky(),[c,u]=T.useState(null),h=ut(XI()),f=(w,k=!1)=>{a(!0),hf(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:F3()}),!e&&c&&h.data&&_.jsx(iB,{harness:c,commands:h.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:F3(),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(Th,{harness:k.id})},renderLabel:w=>{const k=p.find(b=>b.id===w.id),v=k&&k4(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:fc,children:[_.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[_.jsx(Wt,{variant:k4(m).variant,children:k4(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(Ie,{size:"small",onClick:()=>u(m),disabled:!h.data,"aria-haspopup":"dialog",children:[_.jsx(Mf,{size:14})," ",AL()]}),_.jsxs(Ie,{size:"small",onClick:()=>f(!0,!0),disabled:i,children:[_.jsx(Va,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),_.jsxs("div",{className:Ns(yf,"[&_.v]:text-sm"),children:[_.jsx("span",{className:"k",children:VBt()}),_.jsx("span",{className:"v",children:m.binPath??FIt()}),_.jsx("span",{className:"k",children:hI()}),_.jsx("span",{className:"v",children:m.version??"—"}),_.jsx("span",{className:"k",children:hBt()}),_.jsx("span",{className:"v",children:_.jsx(JPn,{h:m})}),m.account&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:m.id==="opencode"?pI():AS()}),_.jsx("span",{className:"v",children:m.account})]}),m.org&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:lXt()}),_.jsx("span",{className:"v",children:m.org})]}),m.plan&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:uYt()}),_.jsx("span",{className:"v",children:m.plan})]}),_.jsx("span",{className:"k",children:tBt()}),_.jsx("span",{className:"v",children:m.catalogPending?_f():m.models.length>0?OLt({count:Jt(m.models.length),models:new Intl.ListFormat(E()).format(m.models.slice(0,4).map(w=>Ce(nv(w))))}):m.agentReady?O3():jS()})]}),_.jsx(PC,{note:m.agentNote,className:Ns(Ua,"text-sm"),disabled:e,resolve:w=>{var k;return eFn(m,(k=h.data)==null?void 0:k[m.id],w)??lq(w)},onRun:(w,k)=>o.start(w,k,m.id)}),o.run&&_.jsx("div",{hidden:o.run.owner!==m.id,children:_.jsx(Vy,{run:o.run,onComplete:()=>f(!0,!0),onClose:o.clear})}),m.id==="opencode"&&_.jsx(uB,{installed:m.installed})]}):null:_.jsxs(Pr,{children:[_.jsx(St,{})," ",FHt()]})]})}function nFn({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?_.jsx(Wt,{variant:"success",children:bFt()}):_.jsx(Wt,{variant:"error",children:YVt()}):_.jsx(Wt,{variant:"error",children:JPt()}):_.jsx(Wt,{variant:"error",children:dGt()})}function rFn({onEditState:e}){var A;const n=pn({mutationFn:r5n}),t=Sj(),r=ut(t),s=r.data??null,i=z=>{Vr(t.queryKey,M=>(typeof z=="function"?z(M??null):z)??void 0)},a=s?null:((A=r.error)==null?void 0:A.message)??null,[o,c]=T.useState(""),[u,h]=T.useState(""),[f,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(null),b=z=>{i(z),c(z.context??""),h(z.namespace)},y=T.useRef(null);T.useEffect(()=>{const z=y.current;y.current=s,s&&(!z||o===(z.context??"")&&u.trim()===z.namespace)&&(c(s.context??""),h(s.namespace??""))},[s,o,u]);const x=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!x;T.useEffect(()=>{e==null||e({dirty:C,saving:f})},[C,f,e]);async function N(){if(!(m||f||!x)){w(!0);try{await tt.fetchQuery({...Sj(),staleTime:0})}catch(z){Zt(z instanceof Error?z.message:String(z),"error")}finally{w(!1)}}}async function j(z){if(z.preventDefault(),!(f||m)){p(!0),v(null);try{b(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:Vh()}),_.jsx("dd",{className:"m-0",children:m||f?_.jsx(Wt,{children:ya()}):C?_.jsx(Wt,{children:EL()}):_.jsx(nFn,{s})})]}),x&&!m&&!f&&s.preflight.error&&_.jsx("p",{className:`${Gy} break-words`,children:s.preflight.error}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:j,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[EFt(),_.jsx(lc,{choices:[{id:"",label:s.currentContext?vDt({context:Ce(s.currentContext)}):_Dt()},...o&&!s.contexts.includes(o)?[{id:o,label:WIt({context:Ce(o)})}]:[],...s.contexts.map(z=>({id:z,label:z}))],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:[nVt(),_.jsx(Br,{type:"text",value:u,disabled:f||m,onChange:z=>h(z.target.value),placeholder:hHt(),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(Ie,{type:"button",onClick:()=>void N(),disabled:f||m||!x,children:[_.jsx(Va,{size:13})," ",m?ya():Am()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:f||m||x,children:f?Sa():pc()})]})]})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",yPt()]})})}function sFn(){var x;const e=pn({mutationFn:C=>i5n(...C)}),n=Cj(),t=ut(n),r=t.data??null,s=C=>{Vr(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,a]=T.useState(null),o=i??((x=t.error)==null?void 0:x.message)??null,[c,u]=T.useState(""),[h,f]=T.useState(""),[p,m]=T.useState(!1),w=t.isPending||p,[k,v]=T.useState(!1);async function b(){if(!(w||k)){m(!0),a(null);try{await tt.fetchQuery({...Cj(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function y(C){if(C.preventDefault(),!(!c.trim()||!h.trim()||w||k||r!=null&&r.processEnv)){v(!0),a(null);try{s(await e.mutateAsync([c.trim(),h.trim()])),u(""),f("")}catch(N){a(N instanceof Error?N.message:String(N))}finally{v(!1)}}}return _.jsxs(_.Fragment,{children:[!r&&w?_.jsxs(Pr,{children:[_.jsx(St,{})," ",NPt()]}):r&&_.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[_.jsx("dt",{className:"font-medium text-subtext",children:Vh()}),_.jsx("dd",{className:"m-0",children:_.jsx(Wt,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?Rm():Hb()})})]}),(r==null?void 0:r.processEnv)&&_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:KDt()}),_.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:[r!=null&&r.tokenConfigured?JDt():yLt(),_.jsx(Br,{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?aLt():NLt(),_.jsx(Br,{type:"password",value:h,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:dLt()}),o&&_.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(Ie,{type:"button",disabled:w||k,onClick:()=>void b(),children:[_.jsx(Va,{size:13})," ",Mm()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!c.trim()||!h.trim()||w||k||(r==null?void 0:r.processEnv),children:k?Sa():pc()})]})]})]})}const uq="rounded-sm border-border-strong bg-surface text-subtext",_q="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",iFn=5e3;function fq(e){const n=yi(),t=e.map(a=>Ej(a)),r=YV({queries:t.map(a=>({...a,refetchInterval:iFn}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{zn(n)&&Vr(Ej(a).queryKey,{running:!0})}]}function aFn({test:e,connecting:n,masterRunning:t,containerFailed:r=!1}){if(n)return _.jsx("span",{role:"status",children:_.jsx(Wt,{className:_q,children:YL()})});if(e===void 0)return _.jsx(Wt,{className:uq,children:aI()});const s=e.missingTools??[],i=e.reachable&&e.toolsFound&&t===!1,a=!e.reachable||r?_.jsx(Wt,{className:"rounded-sm",variant:"error",children:TS()}):e.toolsFound?i?_.jsx(Wt,{className:"rounded-sm",variant:"warning",children:ZL()}):_.jsx(Wt,{className:"rounded-sm",variant:"success",children:Tm()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:s.length===1?FLt({tool:Ce(s[0])}):WLt()});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:vo(e.testedAt)})]})}function oFn(){var D;const e=QI(),n=ut(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),[h,f]=T.useState(!1),[p,m]=T.useState({}),[w,k]=T.useState(null),[v,b]=T.useState(!1),[y,x]=T.useState(0),C=(t==null?void 0:t.filter(I=>{const B=i[I.host]??I.lastTest;return(B==null?void 0:B.reachable)&&B.toolsFound}).map(I=>I.host))??[],[N,j]=fq(C);function A(I){u.current+=1,f(!1),b(!1),x(B=>B+1),k(I),m(B=>({...B,[I]:!0}))}function z(){u.current+=1,f(!1),b(!1),k(null)}function M(I,B){m(G=>({...G,[I]:!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(QPn,{settings:n.data}),_.jsxs(Ie,{variant:"ghost",className:"ms-auto",onClick:()=>s(!0),children:[_.jsx(WS,{size:14})," ",wI()]})]}),t===null?_.jsxs(Pr,{children:[_.jsx(St,{})," ",uI()]}):t.length===0?_.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:UVt()}):_.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:t.map(I=>{var F,re,ie;const B=o[I.host]===void 0?I.container??null:o[I.host],G=i[I.host],U=B!==null&&((F=G==null?void 0:G.container)==null?void 0:F.reference)===B.trim()?G:void 0,Q=B!==null?U:G!=null&&G.container?I.lastTest:G??I.lastTest,V=(re=U==null?void 0:U.container)==null?void 0:re.error,Z=((ie=U==null?void 0:U.container)==null?void 0:ie.ready)===!1,J=(Q==null?void 0:Q.error)||V,$=w===I.host,L=p[I.host]??!1,q=$||!!J,P=`${I.user?`${I.user}@`:""}${I.hostname??I.host}${I.port?`:${I.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:I.host,children:I.host}),_.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:P,children:P})]})}),_.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(aFn,{test:Q,connecting:$&&!v,masterRunning:N[I.host],containerFailed:Z}),q&&_.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":L,"aria-label":L?cY({name:Ce(I.host)}):WY({name:Ce(I.host)}),onClick:ue=>{ue.stopPropagation(),M(I.host,L)},children:_.jsx(mc,{size:18,className:`text-muted transition-transform duration-120 ease-standard${L?" rotate-180":""}`})})]}),_.jsx(Ie,{size:"small",type:"button",className:"justify-self-end",onClick:ue=>{ue.stopPropagation(),$&&!v?z():A(I.host)},disabled:!$&&(w!==null&&!v||B!==null&&!B.trim()),children:$?v?ni():ff():(Q==null?void 0:Q.reachable)===!1||Z?ni():Q?mI():NS()})]})]}),_.jsx(XPn,{host:I,connecting:$&&!v,reference:B,onChange:ue=>{$&&z(),c(se=>({...se,[I.host]:ue})),a(se=>{const K={...se};return delete K[I.host],K})}}),q&&(L||$)&&_.jsxs("div",{className:`border-t border-t-border-variant py-3${L?"":" hidden"}`,children:[!$&&J&&_.jsx(B8n,{host:I.host,transcript:J}),$&&!h&&_.jsx(ZS,{host:I.host,backend:"ssh",active:L,onComplete:ue=>{if(ue.backend!=="ssh")return;j(I.host);const se=u.current;if(B===null){a(K=>({...K,[I.host]:{...ue.result,container:null}})),b(!1),k(null);return}f(!0),h5n(I.host,B.trim()).then(K=>{u.current===se&&a(oe=>({...oe,[I.host]:{...K,container:K.container??{reference:B.trim(),ready:!1,error:K.error??null}}}))}).catch(K=>{u.current===se&&a(oe=>({...oe,[I.host]:{...ue.result,container:{reference:B.trim(),ready:!1,error:K instanceof Error?K.message:String(K)}}}))}).finally(()=>{u.current===se&&(f(!1),b(!1),k(null))})},onError:ue=>{b(!0),a(se=>({...se,[I.host]:{container:B===null?null:{reference:B.trim(),ready:!1,error:ue},reachable:!1,toolsFound:!1,missingTools:[],error:ue,testedAt:Date.now()}}))}},y)]})]},I.host)})}),r&&_.jsx(DB,{onClose:()=>s(!1)})]})}function cFn({test:e,connecting:n,masterRunning:t}){return n?_.jsx(Wt,{className:_q,children:YL()}):e===null?_.jsx(Wt,{className:uq,children:aI()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?_.jsx(Wt,{className:"rounded-sm",variant:"warning",children:ZL()}):_.jsx(Wt,{className:"rounded-sm",variant:"success",children:Tm()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:zKt()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:CWt()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:TS()})}function lFn(){var J;const e=pn({mutationFn:C5n}),n=Okn(),t=ut(n),r=t.data??null,s=$=>{Vr(n.queryKey,L=>(typeof $=="function"?$(L??null):$)??void 0)},i=r?null:((J=t.error)==null?void 0:J.message)??null,[a,o]=T.useState(""),[c,u]=T.useState(""),[h,f]=T.useState(""),[p,m]=T.useState(""),[w,k]=T.useState(!1),[v,b]=T.useState(null),[y,x]=T.useState(null),[C,N]=T.useState(!1),[j,A]=T.useState(!1),[z,M]=T.useState(0),D=a&&(y!=null&&y.reachable)&&y.slurmFound&&y.toolsFound?[a]:[],[I,B]=fq(D);function G(){A(!1),M($=>$+1),N(!0)}const U=$=>{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??"")&&h.trim()===($.account??"")&&p.trim()===($.timeLimit??""))&&(o(r.host??""),u(r.partition??""),f(r.account??""),m(r.timeLimit??""))},[r,a,c,h,p]);const V=r!==null&&a===(r.host??"")&&c.trim()===(r.partition??"")&&h.trim()===(r.account??"")&&p.trim()===(r.timeLimit??"");async function Z($){if($.preventDefault(),!w){k(!0),b(null);try{U(await e.mutateAsync({host:a,partition:c.trim(),account:h.trim(),timeLimit:p.trim()}))}catch(L){b(L instanceof Error?L.message:String(L))}finally{k(!1)}}}return _.jsx(_.Fragment,{children:i?_.jsx("div",{className:"error",children:i}):r?_.jsxs(_.Fragment,{children:[!C&&(y==null?void 0:y.error)&&_.jsx("p",{className:Gy,children:y.error}),_.jsxs("form",{className:BC,onSubmit:Z,children:[_.jsx("div",{className:"max-w-xl",children:_.jsxs("label",{children:[hKt(),_.jsx(lc,{choices:[{id:"",label:oI()},...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($),x(null),N(!1),A(!1)}})]})}),_.jsxs("div",{className:"actions",children:[_.jsx(Ie,{type:"button",onClick:()=>{C&&!j?(A(!1),N(!1)):G()},disabled:!a,title:a?void 0:Lnn(),children:C?j?ni():ff():y?mI():NS()}),_.jsx("span",{role:"status",children:_.jsx(cFn,{test:y,connecting:C&&!j,masterRunning:I[a]})})]}),_.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[_.jsxs("div",{className:"row2",children:[_.jsxs("label",{children:[XXt(),_.jsx(Br,{type:"text",list:"slurm-partitions",value:c,onChange:$=>u($.target.value),placeholder:cj(),autoComplete:"off",spellCheck:!1}),_.jsx("datalist",{id:"slurm-partitions",children:y==null?void 0:y.partitions.map($=>_.jsx("option",{value:$},$))})]}),_.jsxs("label",{children:[AS(),_.jsx(Br,{type:"text",value:h,onChange:$=>f($.target.value),placeholder:cj(),autoComplete:"off",spellCheck:!1})]})]}),_.jsxs("label",{className:"mt-3 block max-w-xl",children:[vtn(),_.jsx(Br,{type:"text",value:p,onChange:$=>m($.target.value),placeholder:KPt(),autoComplete:"off",spellCheck:!1})]})]}),v&&_.jsx("div",{className:"error",children:v}),_.jsx("div",{className:"actions",children:_.jsx(Ie,{variant:"primary",type:"submit",disabled:w||V||C,children:w?Sa():pc()})})]}),C&&_.jsx(ZS,{host:a,backend:"slurm",onComplete:$=>{$.backend==="slurm"&&(x($.result),B(a),A(!1),N(!1))},onError:$=>{A(!0),x({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:$})}},z)]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",PGt()]})})}function uFn(){var C;const e=pn({mutationFn:N5n}),n=Dkn(),t=ut(n),r=t.data??null,s=N=>{Vr(n.queryKey,j=>(typeof N=="function"?N(j??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),[h,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 b=r!==null&&a===(r.address??"");async function y(N){if(N.preventDefault(),!c){u(!0),f(null);try{k(await e.mutateAsync({address:a}))}catch(j){f(j instanceof Error?j.message:String(j))}finally{u(!1)}}}async function x(){m("testing");try{m(await z5n(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:Gy,children:w.error}),_.jsxs("form",{className:BC,onSubmit:y,children:[_.jsxs("label",{children:[aGt(),_.jsx(Br,{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:[tqt(),": ",Ce(r.resolvedAddress)," · ",_I(),": ",r.source]}),h&&_.jsx("div",{className:"error",children:h}),_.jsxs("div",{className:"actions",children:[_.jsx(Ie,{variant:"primary",type:"submit",disabled:c||b,children:c?Sa():pc()}),_.jsx(Ie,{type:"button",onClick:()=>void x(),disabled:p==="testing",children:Aen()}),_.jsx(_Fn,{test:p})]}),(w==null?void 0:w.reachable)&&w.rayVersion&&_.jsxs("p",{className:"m-0 text-sm text-subtext",children:[SYt(),": ",w.rayVersion]})]})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",MGt()]})})}function _Fn({test:e}){return e===null?null:e==="testing"?_.jsx(Wt,{children:Ien()}):e.reachable?_.jsx(Wt,{variant:"success",children:TYt()}):_.jsx(Wt,{variant:"error",children:TS()})}function fFn(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:_l(e.memBytes),r=e.gpus.length===0?null:HMt({count:e.gpus.length});return[n,e.cpuCount>0?hRt({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function dFn({remote:e}){var p;const n=ut(Ikn()),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,h]=T.useState(!1),f=()=>n.refetch();return _.jsxs(_.Fragment,{children:[r&&!t?_.jsx("div",{className:"error",children:r}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:YPn,children:[_.jsx("span",{className:"k",children:Vh()}),_.jsx("span",{className:"v",children:!t&&s||u?_.jsxs(Wt,{className:"gap-1.5",role:"status",children:[_.jsx(St,{}),u?z$t():ya()]}):r?_.jsx(Wt,{variant:"warning",children:Bv()}):t?t.loggedIn?t.sshKeyStatus==="matched"?_.jsx(Wt,{variant:"success",children:Tm()}):t.sshKeyStatus==="unknown"?_.jsx(Wt,{variant:"warning",children:Bv()}):_.jsx(Wt,{variant:"warning",children:Hb()}):_.jsx(Wt,{variant:"warning",children:cI()}):null}),_.jsx("span",{className:"k",children:mXt()}),_.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),_.jsx("span",{className:"k",children:LJt()}),_.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?_.jsx(Wt,{variant:"success",children:AQt()}):t.sshKeyStatus==="no_local_match"?_.jsx(Wt,{variant:"warning",children:_Qt()}):t.sshKeyStatus==="none_registered"?_.jsx(Wt,{variant:"error",children:RWt()}):_.jsx(Wt,{children:fI()}):"—"})]}),e&&t&&!t.loggedIn&&_.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:RDt({command:Ce("orx login")})}),!e&&i>0&&_.jsx(I8n,{login:o,onComplete:()=>{h(!1),a(0),f()},onError:m=>{h(!1),Zt(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?_.jsxs("p",{dir:"auto",className:Ua,children:[F$t()," ",_.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):_.jsxs("p",{dir:"auto",className:Ua,children:[vWt()," ",_.jsx("code",{children:"ssh-keygen -t ed25519"}),Uen()," ",_.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:Ua,children:trn({register:Ce(`orx ssh-key add ${t.sshKeyPath}`),load:Ce("ssh-add")})}):_.jsxs("p",{dir:"auto",className:Ua,children:[_Wt()," ",_.jsx("code",{children:"ssh-add"}),nXt()," ",_.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(Ie,{onClick:()=>void f(),disabled:s||u,children:[_.jsx(Va,{size:13})," ",s?ya():Am()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&_.jsxs(Ie,{variant:"primary",disabled:s||u,onClick:()=>{c(!t.loggedIn),h(!0),a(m=>m+1)},children:[u?_.jsx(St,{}):_.jsx(Mf,{size:13})," ",t.loggedIn?Qsn():vI()]})]})]})}const hFn={local:lRe,ssh:URe,tinker:YRe,hf:QTe,modal:mRe,k8s:nRe,slurm:IRe,ray:ARe,openresearch:kRe},Wy={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"},YR=["hf","modal","slurm","ray","openresearch"],S4=["hf","modal","openresearch"],dq={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"]},gk=["tinker","hf","modal","ray","k8s"],pFn={tinker:MOe,hf:fOe,modal:bOe,openresearch:EOe},ZR="__custom__";function r0(e,n){return!!(n&&!(dq[e]??[]).includes(n))}function mFn({settings:e,projectId:n,onSaved:t}){const r=pn({mutationFn:A5n}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=T.useState(s),[c,u]=T.useState(i),[h,f]=T.useState(r0(s,i)),[p,m]=T.useState(!1),[w,k]=T.useState(null),v=e.targets.find(B=>B.id===a),b=e.targets.filter(B=>B.configured||B.id===s),y=YR.includes(a),x=S4.includes(a),C=dq[a]??[],N=a===s&&(!y||c.trim()===i),j=vf[a](),A=pFn[a],z=p?non():x&&!c.trim()?HAt({destination:j}):a==="ssh"?cIt():tIt({destination:j});T.useEffect(()=>{o(s),u(i),f(r0(s,i))},[s,i]);async function M(B,G){const U=YR.includes(B);if(!(p||S4.includes(B)&&!G.trim())){m(!0),k(null);try{t(await r.mutateAsync({backend:B,flavor:U&&G.trim()||null,projectId:n}))}catch(Q){k(Q instanceof Error?Q.message:String(Q)),o(s),u(i),f(r0(s,i))}finally{m(!1)}}}function D(B){const G=e.targets.find(Q=>Q.id===B);if(!G)return;o(G.id);const U=G.id===s?i:"";u(U),f(r0(G.id,U)),S4.includes(G.id)||M(G.id,U)}function I(B){if(B===ZR){f(!0);return}f(!1),u(B),(!x||B)&&M(a,B)}return _.jsxs("section",{className:"mb-8",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:NHt()}),_.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:b.map(B=>({id:B.id,label:vf[B.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:B=>{const G=e.targets.find(U=>U.id===B.id);return G?_.jsx(Xh,{kind:Wy[G.id],size:16}):null},onSelect:D}),y&&_.jsx("div",{children:h?_.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(x&&!c.trim()){a===s&&(u(i),f(r0(s,i)));return}N||M(a,c)},placeholder:VFt(),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":oj(),title:oj(),onMouseDown:B=>B.preventDefault(),onClick:()=>f(!1),children:_.jsx(mc,{size:12})})]}):_.jsx(lc,{choices:[{id:"",label:x?DAt():wIt()},...c&&!C.includes(c)?[{id:c,label:DRt({value:Ce(c)})}]:[],...C.map(B=>({id:B,label:B})),{id:ZR,label:eHt()}],value:c,variant:"field",dropDown:!0,disabled:p,onSelect:I})})]}),w&&_.jsx("div",{className:"error mt-2.5",children:w}),v&&!v.configured&&_.jsx("p",{className:Ua,children:stn()})]}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:z}),A&&_.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:A()})]})}function gFn({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?xAt():e.id==="openresearch"?vI():e.id==="ray"?NS():Hsn();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":vf[e.id](),"aria-describedby":i,"aria-haspopup":gk.includes(e.id)?"dialog":void 0}),_.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:_.jsx(Xh,{kind:Wy[e.id],size:48})}),_.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:vf[e.id]()}),_.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:hFn[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"?sDt():zan()," ",_.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:eMt()})]}):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?rI():e.configured?!r||gk.includes(e.id)?Rm():won():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 vFn({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(B0,{size:16})," ",tI()]}),_.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(Xh,{kind:Wy[e.id],size:36})}),_.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:vf[e.id]()})]}),n&&_.jsx(Wt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:rI()})]}),_.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(oFn,{}),e.id==="slurm"&&_.jsx(lFn,{}),e.id==="openresearch"&&_.jsx(dFn,{remote:r})]})]})}function bFn({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(YOt())||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(Xh,{kind:Wy[e.id],size:32}),_.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:vf[e.id]()})]}),_.jsx(It,{title:I0(),"aria-label":I0(),onClick:a,disabled:s.saving,children:_.jsx(xr,{size:14})})]}),e.id==="tinker"&&_.jsx(xFn,{target:e}),e.id==="hf"&&_.jsx(kFn,{remote:n}),e.id==="modal"&&_.jsx(sFn,{}),e.id==="ray"&&_.jsx(uFn,{}),e.id==="k8s"&&_.jsx(rFn,{onEditState:i})]})}function yFn({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,D;const s=WI(e==null?void 0:e.id),i=ut(s),a=i.data??null,o=I=>{Vr(s.queryKey,B=>(typeof I=="function"?I(B??null):I)??void 0)},c=a?null:((M=i.error)==null?void 0:M.message)??null,[u,h]=T.useState(null),[f,p]=T.useState(null),m=Lkn(),w=ut(m),k=w.data??null,v=((D=w.error)==null?void 0:D.message)??null;T.useEffect(()=>{h(null),p(null)},[e==null?void 0:e.id]);const b=I=>{o(I),p(null)},y=a?a.targets:null,x=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=y?[...y].sort((I,B)=>+(B.id===x)-+(I.id===x)):null,N=(C==null?void 0:C.filter(I=>I.configured))??[],j=(C==null?void 0:C.filter(I=>!I.configured))??[],A=I=>_.jsx(gFn,{target:I,isDefault:x===I.id,summary:I.id==="local"?k?fFn(k):v??OHt():void 0,onOpen:I.id==="local"?void 0:()=>h(I.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${I.id}`),z=u?a==null?void 0:a.targets.find(I=>I.id===u):null;return z&&!gk.includes(z.id)?_.jsx(vFn,{target:z,isDefault:x===z.id,onBack:()=>h(null),remote:r}):_.jsxs(_.Fragment,{children:[_.jsx("h1",{children:nI()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:fFt()}),_.jsx(PFn,{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(mFn,{settings:a,projectId:e==null?void 0:e.id,onSaved:b}),_.jsxs("section",{className:"mb-8",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:Rm()}),_.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(A)})]}),j.length>0&&_.jsxs("section",{className:"mb-3.5",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:DKt()}),_.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:j.map(A)})]}),z&&_.jsx(bFn,{target:z,remote:r,onClose:()=>h(null)})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",dPt()]})]})}function xFn({target:e}){var y;const n=pn({mutationFn:X3n}),[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(null),c=kj(),u=ut(c),h=u.data??null,f=a??((y=u.error)==null?void 0:y.message)??null,p=x=>{Vr(c.queryKey,C=>(typeof x=="function"?x(C??null):x)??void 0)},[m,w]=T.useState(!1),k=u.isPending||m;async function v(){if(!(k||s)){w(!0),o(null);try{await tt.fetchQuery({...kj(),staleTime:0})}catch(x){o(x instanceof Error?x.message:String(x))}finally{w(!1)}}}async function b(x){if(x.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:[!h&&k?_.jsxs(Pr,{children:[_.jsx(St,{})," ",ya()]}):h&&_.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[_.jsx("dt",{className:"font-medium text-subtext",children:Vh()}),_.jsx("dd",{className:"m-0",children:_.jsx(Wt,{variant:h.validationStatus==="valid"?"success":h.validationStatus==="invalid"?"error":"warning",children:h.validationStatus==="valid"?Tm():h.validationStatus==="invalid"?xan():h.validationStatus==="billingRequired"?oan():Hb()})})]}),(h==null?void 0:h.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:ean()})}),(h==null?void 0:h.processEnv)&&_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:han()}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||h!==null&&h.validationStatus!=="missing"?tsn():CS(),_.jsx(Br,{type:"password",value:t,placeholder:(h==null?void 0:h.maskedKey)??"",onChange:x=>r(x.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(Ie,{type:"button",disabled:s||k,onClick:()=>void v(),children:[_.jsx(Va,{size:13})," ",k?ya():Am()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!t.trim()||s||k,children:s?yI():pc()})]})]})]})}function wFn({settings:e}){return e.validationStatus==="missing"?_.jsx(Wt,{variant:"warning",children:Hb()}):e.validationStatus==="invalid"?_.jsx(Wt,{variant:"error",children:JUt()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?_.jsx(Wt,{variant:"success",children:Tm()}):e.jobsWrite===!1?_.jsxs("span",{className:"inline-flex items-center gap-2",children:[_.jsx(Wt,{variant:"warning",children:sWt()}),_.jsx(FS,{content:lOt(),className:"text-subtext",children:_.jsx(US,{size:15})})]}):null}function kFn({remote:e}){var y;const n=pn({mutationFn:W3n}),t=wj(),r=ut(t),s=r.data??null,i=x=>{Vr(t.queryKey,C=>(typeof x=="function"?x(C??null):x)??void 0)},a=s?null:((y=r.error)==null?void 0:y.message)??null,[o,c]=T.useState(""),[u,h]=T.useState(!1),[f,p]=T.useState(!1),[m,w]=T.useState(null),k=Ky();async function v(){if(!(u||f||!s&&!a)){p(!0),w(null);try{await tt.fetchQuery({...wj(),staleTime:0})}catch(x){w(x instanceof Error?x.message:String(x))}finally{p(!1)}}}async function b(x){if(x.preventDefault(),!(!o.trim()||u||f||!s&&!a)){h(!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{h(!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:AS()}),_.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:Vh()}),_.jsx("dd",{className:"m-0 text-text",children:_.jsx(wFn,{settings:s})})]})]}),s.validationStatus==="unreachable"&&s.validationError&&_.jsx("p",{className:Gy,children:s.validationError}),s.source==="env"&&_.jsx("p",{className:Ua,children:aUt()}),s.validationStatus==="valid"&&s.jobsWrite===null&&_.jsx(PC,{note:nOt({login:"`hf auth login`",url:Ce("huggingface.co/settings/tokens")}),className:Ua,disabled:e,onRun:k.start}),_.jsx(Vy,{run:k.run,onComplete:()=>void r.refetch(),onClose:k.clear})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",VGt()]}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[s!=null&&s.configured?csn():pIt(),_.jsx(Br,{type:"password",value:o,onChange:x=>c(x.target.value),placeholder:(s==null?void 0:s.maskedToken)??Jqt(),autoComplete:"off"})]}),m&&_.jsx("div",{className:"error",children:m}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(Ie,{type:"button",disabled:u||f||!s&&!a,onClick:()=>void v(),children:[_.jsx(Va,{size:13})," ",f?ya():Am()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!o.trim()||u||f||!s&&!a,children:u?yI():pc()})]})]})]})}const hq=/^hf_[A-Za-z0-9]{10,}$/;function pq(){return _.jsx("tr",{children:_.jsx("td",{colSpan:3,children:_.jsxs("p",{dir:"auto",className:Ua,children:[_tn()," ",_.jsx("code",{children:"HF_TOKEN"}),XZt()]})})})}const JR=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function vk(e,n){const t=n instanceof Error?n.message:String(n);Zt(t.includes(e)?t:`${e}: ${t}`,"error")}function SFn({name:e,entry:n,onVars:t}){const r=pn({mutationFn:f=>$I(...f)}),s=pn({mutationFn:o5n}),[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){vk(e,f)}finally{c(!1)}}}async function h(){if(!o){c(!0);try{t(await s.mutateAsync(e))}catch(f){vk(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(Wt,{children:qXt()})]}):_.jsx(Br,{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:dI(),"aria-label":Uee({name:Ce(e)}),autoComplete:"new-password",disabled:o})}),_.jsx("td",{children:n?_.jsx(It,{className:"[&:hover:not(:disabled)]:text-accent-red",title:N3({name:Ce(e)}),"aria-label":N3({name:Ce(e)}),onClick:()=>void h(),disabled:o,children:_.jsx(Of,{size:13})}):i.trim()&&_.jsx(Ie,{size:"small",onClick:()=>void u(),disabled:o,children:o?Sa():pc()})})]}),!n&&e!=="HF_TOKEN"&&hq.test(i.trim())&&_.jsx(pq,{})]})}function CFn({onVars:e,onDone:n}){const t=pn({mutationFn:f=>$I(...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){vk(r.trim(),f)}finally{c(!1)}}}const h=f=>{f.key==="Enter"&&(f.preventDefault(),u()),f.key==="Escape"&&!o&&n()};return _.jsxs(_.Fragment,{children:[_.jsxs("tr",{children:[_.jsx("td",{children:_.jsx(Br,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:f=>s(f.target.value),onKeyDown:h,placeholder:"MY_API_KEY","aria-label":kVt(),autoComplete:"off",spellCheck:!1,disabled:o})}),_.jsx("td",{children:_.jsx(Br,{variant:"inline",className:"text-base",type:"password",value:i,onChange:f=>a(f.target.value),onKeyDown:h,placeholder:dI(),"aria-label":AVt(),autoComplete:"new-password",disabled:o})}),_.jsxs("td",{children:[_.jsx(Ie,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?Sa():pc()}),_.jsx(It,{title:ff(),"aria-label":aPt(),onClick:n,disabled:o,children:_.jsx(xr,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&hq.test(i.trim())&&_.jsx(pq,{})]})}function EFn(){var u;const e=$kn(),n=ut(e),t=n.data??null,r=h=>{Vr(e.queryKey,f=>(typeof h=="function"?h(f??null):h)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=T.useState(!1),o=t===null?[]:t.map(h=>h.key).filter(h=>!JR.includes(h)),c=[...JR,...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:lnn()}),_.jsxs(Ie,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[_.jsx(Qh,{size:12})," ",W$t()]})]}),_.jsx("div",{className:fc,children:s?_.jsx("div",{className:"error",children:s}):t===null?_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]}):_.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(h=>_.jsx(SFn,{name:h,entry:t.find(f=>f.key===h),onVars:r},h)),i&&_.jsx(CFn,{onVars:r,onDone:()=>a(!1)})]})})})]})}const s0=[{value:"system",label:Vin,icon:B7n},{value:"light",label:Pin,icon:_8n},{value:"dark",label:Nin,icon:F7n}],NFn=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"},{id:"ar",label:"العربية"},{id:"es",label:"Español"},{id:"hi",label:"हिन्दी"}];function zFn(){const e=Qu(),[n,t]=c$(),r=s=>{var h;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?s0.findIndex(f=>f.value===n):o)+i+s0.length)%s0.length;t(s0[u].value),(h=a[u])==null||h.focus()};return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:Fjt()}),_.jsxs("div",{className:`${fc} mt-3`,children:[_.jsxs("div",{className:`${dl} pb-3.5`,children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:mj()}),_.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":mj(),onKeyDown:r,children:s0.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:dl,children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:CDt()}),_.jsx("div",{className:"w-52 flex-none",children:_.jsx(lc,{choices:NFn,value:e,variant:"field",dropDown:!0,onSelect:s=>{eL(s)&&s$(s)}})})]})]})]})}const jFn={installer:Cxn,"app-bundle":Yyn,appimage:sxn,portable:Bxn,cargo:_xn,homebrew:vxn,nix:Rxn,unknown:Kxn},C4={cargo:Jxn,homebrew:a2n,nix:d2n};function AFn(){var f;const e=pn({mutationFn:p=>e5n(...p)}),{status:n,error:t,apply:r}=I6(),[s,i]=T.useState(null),[a,o]=T.useState(null),c=$B(n),u=s!==null||c.restarting;if(!n)return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:dj()}),t?_.jsx("div",{className:fc,children:_.jsx("div",{className:"error",children:t})}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]})]});const h=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:dj()}),_.jsxs("div",{className:`${fc} mt-3`,children:[_.jsxs("div",{className:`${yf} pb-3.5`,children:[_.jsx("div",{className:"k",children:hI()}),_.jsx("div",{className:"v",children:n.current}),_.jsx("div",{className:"k",children:yGt()}),_.jsx("div",{className:"v",children:n.latest??"—"}),_.jsx("div",{className:"k",children:iI()}),_.jsx("div",{className:"v",children:jFn[n.channel]()})]}),n.restartRequired&&_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:jZt()}),_.jsx("p",{children:c.error?jI({error:c.error}):wsn({installed:Ce(n.installedVersion??"—"),current:Ce(n.current??n.installedVersion??"—")})})]}),n.canRestart&&_.jsx(Ie,{size:"small",type:"button",disabled:u,onClick:c.restart,children:c.restarting?AI():zI()})]}),n.selfUpdates?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:uj()}),_.jsxs("p",{children:[mVt(),n.envDisabled&&Qan()]})]}),_.jsx(PS,{type:"button",checked:n.autoUpdate,"aria-label":uj(),disabled:u,onClick:()=>void h("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?Han({version:Ce(n.latest??"—")}):oAt()}),_.jsxs("p",{children:[n.updateAvailable?UOt():zAt(),n.updateAvailable&&n.latestTag&&_.jsxs(_.Fragment,{children:[" ",_.jsx("a",{href:IB(n.latestTag),target:"_blank",rel:"noreferrer",className:"underline",children:gI()})]})]})]}),_.jsx(Ie,{size:"small",type:"button",disabled:u,onClick:()=>void h("apply",()=>Z3n().then(r)),children:s==="apply"?bS():n.updateAvailable?Dan():hAt()})]})]}):_.jsx("div",{className:dl,children:_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:kXt()}),_.jsx("p",{children:((f=C4[n.channel])==null?void 0:f.call(C4))??crn()})]})}),n.channel==="app-bundle"&&_.jsx(RFn,{busy:s,disabled:u,run:h}),a&&_.jsx("div",{className:"error",children:a})]})]})}function TFn(){var f;const e=pn({mutationFn:Q5n}),n=Kkn(),t=ut(n),r=t.data??null,s=p=>{Vr(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,h=()=>{!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:Xtn()}),r?_.jsxs("div",{className:`${fc} mt-3`,children:[_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[aj(),r.locked&&r.reason&&_.jsx(FS,{content:`${PFt()} ${r.reason}.`,className:"text-subtext",children:_.jsx(US,{size:15})})]}),_.jsx("p",{children:IVt()})]}),_.jsx(PS,{type:"button",checked:r.enabled,"aria-label":aj(),disabled:i||r.locked,onClick:h})]}),u&&_.jsx("div",{className:"error",children:u})]}):u?_.jsx("div",{className:"error",children:u}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]})]})}function RFn({busy:e,disabled:n,run:t}){const r=pn({mutationFn:t5n}),[s,i]=T.useState(null),[a,o]=T.useState(!1),c=u=>void t("cli",()=>r.mutateAsync(u).then(h=>{i(h),o(!1)}).catch(h=>{throw o(!u&&String((h==null?void 0:h.message)??h).includes("--force")),h}));return _.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:AOt({command:Ce("orx")})}),s?_.jsxs("p",{children:[s.alreadyCurrent?nTt({link:Ce(s.link)}):lTt({link:Ce(s.link)}),!s.onPath&&Ojt({directory:Ce(s.dir)})]}):_.jsx("p",{children:kOt({command:Ce("orx")})})]}),_.jsx(Ie,{size:"small",type:"button",disabled:n,onClick:()=>c(a),children:e==="cli"?bS():a?Wrn():s?xrn():mOt()})]})}function MFn({remote:e}){var w;const n=pn({mutationFn:k=>qI(...k)}),t=DS(),r=ut(t),s=r.data??null,i=k=>{Vr(t.queryKey,v=>(typeof k=="function"?k(v??null):k)??void 0)},[a,o]=T.useState(!1),[c,u]=T.useState(null),h=c??((w=r.error)==null?void 0:w.message)??null,f=async()=>{await r.refetch({cancelRefetch:!1})},p=Ky(),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:Eqt()}),s?_.jsxs("div",{className:`${fc} 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:Mqt()}),_.jsx(Wt,{variant:s.githubAuthenticated?"success":s.ghInstalled?"warning":"error",children:s.githubAuthenticated?XL():JL()})]}),_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:lj()}),_.jsx("p",{children:wnn()})]}),_.jsx(PS,{type:"button",checked:s.githubForNewProjects,"aria-label":lj(),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(mq,{ghInstalled:s.ghInstalled,remote:e,onCheck:f,onRun:p.start})}),_.jsx(Vy,{run:p.run,onComplete:()=>void f(),onClose:p.clear}),h&&_.jsx("div",{className:"error",children:h})]}):h?_.jsx("div",{className:"error",children:h}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]})]})}function mq({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(PC,{note:e?jsn():IOt(),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(jh,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[MUt()," ",_.jsx(mf,{size:12})]}),_.jsx(Ie,{type:"button",variant:e?"warning":"default",disabled:s,onClick:a,children:s?ya():Am()})]})]})}function OFn(){var m,w,k;const e=pn({mutationFn:O3n}),n=pn({mutationFn:D3n}),t=GEn(),r=ut(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((w=r.data)==null?void 0:w.hasSession)??null,a=v=>Vr(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...v}),o=v=>a({hasToken:v}),[c,u]=T.useState(!1),[h,f]=T.useState(null),p=h??((k=r.error)==null?void 0:k.message);return _.jsxs("div",{className:mk,children:[_.jsx("h3",{children:lI()}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:Pqt()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:s?"success":"default",children:s===null?p?fo():ya():s?pj():P3()})})]}),_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:jnn()}),s?_.jsx("div",{className:N0,children:_.jsx(Ie,{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?hj():Drn()})}):_.jsx(XR,{save:LI,onSaved:v=>o(v.hasToken),placeholder:LXt(),createHref:"https://www.overleaf.com/user/settings"}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:rJt()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:i?"success":"default",children:i===null?p?fo():ya():i?pj():P3()})})]}),_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:uJt()}),i?_.jsx("div",{className:N0,children:_.jsx(Ie,{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?hj():zrn()})}):_.jsx(XR,{save:v=>II(v),onSaved:v=>a({hasSession:v.hasSession}),placeholder:L3(),createHref:"https://www.overleaf.com/project",createLabel:Nyt()}),p&&_.jsx("div",{className:"error",children:p})]})}function DFn({project:e,onProjectUpdate:n,remote:t}){var M;const r=pn({mutationFn:D=>qI(...D)}),s={...Gkn((e==null?void 0:e.id)??""),enabled:!!e},i=ut(s),a=Ky(),o=i.data??null,c=D=>{Vr(s.queryKey,I=>(typeof D=="function"?D(I??null):D)??void 0)},[u,h]=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,b]=T.useState(!1),[y,x]=T.useState(null),C=!!(o!=null&&o.github.owner&&o.github.repo),N=async()=>{await i.refetch({cancelRefetch:!1})},j=D=>{const I=D instanceof Error?D.message:String(D);return I.toLowerCase().includes("archived")?xMt():I.includes("(fetch first)")||I.includes("non-fast-forward")?zMt():I.includes("403")||I.toLowerCase().includes("permission denied")?DMt():I},A=()=>{e&&(h(!0),p(null),K5n(e.id).then(D=>{c(D.git),n(D.project),tt.fetchQuery(DS()).then(I=>{!I.githubForNewProjects&&!I.githubDefaultPromptSeen&&k(!0)}).catch(()=>{})}).catch(D=>p(j(D))).finally(()=>h(!1)))},z=D=>{b(!0),x(null),r.mutateAsync([D,!0]).then(()=>k(!1)).catch(I=>x(I instanceof Error?I.message:String(I))).finally(()=>b(!1))};return _.jsxs(_.Fragment,{children:[_.jsx("h1",{children:wZt()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:psn({project:(e==null?void 0:e.name)??zRt()})}),e?m&&!o?_.jsx("div",{className:"error",children:m}):o?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:mk,children:[_.jsx("h3",{children:oKt()}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:rYt()}),_.jsx("span",{className:"v",children:o.path}),_.jsx("span",{className:"k",children:"Git"}),_.jsx("span",{className:"v",children:o.gitVersion??IL()}),_.jsx("span",{className:"k",children:XJt()}),_.jsx("span",{className:"v",children:o.initialized?hMt({branch:Ce(o.currentBranch??zS()),state:o.clean?QAt():QMt()}):t$t()}),_.jsx("span",{className:"k",children:PBt()}),_.jsx("span",{className:"v",children:o.baselineBranch}),_.jsx("span",{className:"k",children:pZt()}),_.jsx("span",{className:"v",children:o.remotes.length?o.remotes.map(D=>`${D.name}: ${D.url}`).join(" · "):jS()})]}),!o.initialized&&_.jsx("div",{className:N0,children:_.jsx(Ie,{variant:"primary",onClick:()=>void G5n(e.id).then(c).catch(D=>p(String(D))),children:dUt()})})]}),_.jsxs("div",{className:mk,children:[_.jsx("h3",{children:"GitHub"}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:eI()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:o.github.authenticated?"success":o.github.ghInstalled?"warning":"error",children:o.github.authenticated?XL():JL()})}),_.jsx("span",{className:"k",children:gYt()}),_.jsx("span",{className:"v",children:C?_.jsxs(_.Fragment,{children:[_.jsxs("span",{children:[o.github.owner,"/",o.github.repo]}),!o.github.enabled&&_.jsx(Wt,{children:ken()})]}):_.jsx(Wt,{children:eKt()})}),o.github.enabled&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:men()}),_.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(mq,{ghInstalled:o.github.ghInstalled,remote:t,onCheck:()=>N(),onRun:a.start})}),_.jsx(Vy,{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?lon():xRt()}),_.jsxs("div",{className:N0,children:[C&&o.github.url&&_.jsxs(jh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[fj()," ",_.jsx(mf,{size:12})]}),_.jsx(Ie,{variant:"primary",disabled:u,onClick:A,children:u?yNt():dNt()})]})]}),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:WHt()}),_.jsxs("div",{className:N0,children:[o.github.url&&_.jsxs(jh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[fj()," ",_.jsx(mf,{size:12})]}),_.jsx(Ie,{disabled:u,onClick:()=>{h(!0),V5n(e.id).then(D=>{c(D.git),n(D.project)}).catch(D=>p(D instanceof Error?D.message:String(D))).finally(()=>h(!1))},children:u?NNt():aNt()})]})]})]}),_.jsx(OFn,{}),m&&_.jsx("div",{className:"error",children:j(m)})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]}):_.jsx("div",{className:fc,children:_.jsx("p",{className:Ua,children:IQt()})}),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:()=>z(!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:xKt()}),_.jsx("p",{children:Yen()}),y&&_.jsx("div",{className:"error",children:y}),_.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[_.jsx(Ie,{disabled:v,onClick:()=>z(!1),children:sQt()}),_.jsx(Ie,{variant:"primary",disabled:v,onClick:()=>z(!0),children:v?Sa():BDt()})]})]})})]})}const LFn={env:h0n,config:x0n,xdg:z0n,default:o0n},E4={preparing:Vpn,copying:ipn,verifying:D0n,finalizing:fpn},IFn=e=>{var n;return((n=E4[e])==null?void 0:n.call(E4))??e};function $Fn(){var x;const e=Bkn(),n=ut(e),t=n.data??null,r=t?null:((x=n.error)==null?void 0:x.message)??null,[s,i]=T.useState(""),[a,o]=T.useState(!1),[c,u]=T.useState(null),[h,f]=T.useState({kind:"idle"}),[p,m]=T.useState(null);T.useEffect(()=>{t&&i(C=>C||t.current)},[t]),T.useEffect(()=>n$(C=>{C.type==="progress"?f(N=>{const j=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||j}}):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 b(){if(!(a||!k)){o(!0),m(null),u(null);try{u(await l5n(k))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function y(C){if(C.preventDefault(),!(h.kind==="moving"||!k||v)&&(m(null),!!window.confirm(Epn({path:Ce(k)})))){f({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await u5n(k)}catch(N){f({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:len()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:hin()}),r?_.jsx("div",{className:fc,children:_.jsx("div",{className:"error",children:r})}):t?_.jsxs("div",{className:fc,children:[_.jsx("div",{className:"settings-card-head mb-3",children:_.jsx("h3",{children:oHt()})}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:MFt()}),_.jsx("span",{className:"v",children:t.current}),_.jsx("span",{className:"k",children:_I()}),_.jsx("span",{className:"v",children:LFn[t.source]()})]}),!w&&_.jsxs("form",{className:BC,onSubmit:y,children:[_.jsxs("label",{children:[lVt(),_.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:h.kind==="moving"})]}),c&&!c.error&&c.ok&&_.jsxs("p",{className:Ua,children:[XYt()," ",_l(c.treeBytes??0),c.freeBytes!=null&&` — ${bpn({size:Ce(_l(c.freeBytes))})}`,c.sameFilesystem?e0n():"","."]}),c&&c.ok===!1&&c.error&&_.jsx("div",{className:"error",children:c.error}),p&&_.jsx("div",{className:"error",children:p}),h.kind==="moving"&&_.jsx(cq,{value:h.copied,max:h.total,label:IFn(h.phase),caption:h.total>0?_.jsxs("span",{className:"text-sm",children:[_l(h.copied)," / ",_l(h.total)]}):void 0}),h.kind==="done"&&_.jsxs("p",{className:Ua,children:[QKt(),h.oldPathLeft&&_.jsxs(_.Fragment,{children:[" ",x$t({path:Ce(h.oldPathLeft)})]})]}),h.kind==="error"&&_.jsxs("div",{className:"error",children:[HKt()," ",h.message]}),_.jsxs("div",{className:"actions",children:[_.jsx(Ie,{type:"button",onClick:b,disabled:a||!k||v||h.kind==="moving",children:a?ya():Wjt()}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!k||v||h.kind==="moving",children:h.kind==="moving"?Ppn():Mpn()})]})]})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]})]})}const bk=e=>e==="running"||e==="starting";function BFn(e){return bk(e.status)?$0(Date.now()-e.createdAt):e.endedAt?$0(e.endedAt-e.createdAt):"—"}function gq({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:MBt()}),_.jsx("th",{children:Vh()}),_.jsx("th",{children:qJt()}),_.jsx("th",{children:qZt()})]})}),_.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(i6,{backend:t.backend}),r&&_.jsx(Wh,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:_j(),"aria-label":_j(),onClick:i=>i.stopPropagation(),children:_.jsx(mf,{size:12})})]})}),_.jsx("td",{children:_.jsx(ml,{status:pa(t)})}),_.jsx("td",{children:vo(t.createdAt)}),_.jsx("td",{children:BFn(t)})]},t.id)})})]})})}function PFn({projectId:e,onViewHistory:n}){var f;const t=ut({...Tu(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=>bk(p.status)).sort(c),h=r==null?void 0:r.filter(p=>!bk(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:[LZt(),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(Ie,{size:"small",onClick:o,disabled:i,children:[_.jsx(Va,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]}),_.jsx(Ie,{size:"small",onClick:n,children:h!=null&&h.length?Met({count:Jt(h.length)}):Eet()})]})]}),s&&_.jsx("div",{className:"error",children:s}),!u||!h?_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]}):_.jsx(gq,{instances:u,emptyLabel:e?ret():vet()})]})}function FFn({projectId:e,onBack:n}){var c;const t=ut({...Tu(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(h=>h+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(B0,{size:14})," ",tI()]}),_.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[_.jsx("h1",{children:KUt()}),_.jsxs(Ie,{size:"small",onClick:o,disabled:i,children:[_.jsx(Va,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),s&&_.jsx("div",{className:"error",children:s}),r?_.jsx(gq,{instances:[...r].sort((u,h)=>h.createdAt-u.createdAt),emptyLabel:e?XJe():_et()}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]})]})}const vq=["projects","harnesses","storage"],HFn=[{id:"compute",label:nI,icon:_.jsx(qS,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:sI,icon:_.jsx(Mf,{size:15}),activeTabs:["environment"]},{id:"settings",label:RS,icon:_.jsx(WS,{size:15}),activeTabs:["settings",...vq]}];function qFn(e){return vq.includes(e)}function UFn({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||qFn(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"}),h=new ResizeObserver(u);h.observe(c),u();const f=()=>h.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:RS()}),_.jsxs("div",{className:"settings-stack mt-4.5",children:[_.jsx("section",{className:jd,children:_.jsx(zFn,{})}),_.jsx("section",{ref:e==="projects"?a:void 0,className:jd,children:_.jsx(MFn,{remote:s})}),_.jsx("section",{ref:e==="harnesses"?a:void 0,className:jd,children:_.jsx(tFn,{remote:s})}),!s&&_.jsx("section",{ref:e==="storage"?a:void 0,className:jd,children:_.jsx($Fn,{})}),_.jsx("section",{className:jd,children:_.jsx(TFn,{})}),!s&&_.jsx("section",{className:jd,children:_.jsx(AFn,{})})]})]}),e==="compute"&&_.jsx(yFn,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&_.jsx(FFn,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&_.jsxs(_.Fragment,{children:[_.jsx("h1",{children:sI()}),_.jsx(EFn,{})]}),e==="git"&&_.jsx(DFn,{project:n,onProjectUpdate:t,remote:s})]})}function tm(e){const n=e.split("@")[0].replace(/[~^]$/,"");return n.charAt(0).toUpperCase()+n.slice(1).replaceAll("-"," ")}function FC(e){return e.replace(/@personal$|\^$/,"@u").replace(/@project$|~$/,"@p")}function yk(e){return`${e.plugin?`${tm(e.plugin)}: `:""}${tm(e.name)}`}const bq=["plan","goal","new","resume","model","compact","copy","export","side"],GFn={plan:()=>Vwt(),goal:()=>$Qe(),new:()=>Iat(),resume:()=>ONt(),model:()=>Rrt(),compact:()=>HTe(),copy:()=>hDe(),export:()=>cPe(),side:()=>pcn()};function KFn(e){return{name:e,get description(){return GFn[e]()},source:"command"}}function Qy(e){return bq.some(n=>n===e)}const mb={clear:"new",summarize:"compact"};function xk(e){const n=e.toLowerCase();return Qy(n)?n:Object.hasOwn(mb,n)?mb[n]:null}function yq(e){return Object.keys(mb).filter(n=>mb[n]===e)}function VFn(e,n){return e.name.toLowerCase().startsWith(n)||e.plugin&&`${e.plugin}:${e.name}`.toLowerCase().startsWith(n)?!0:e.source==="command"&&Qy(e.name)&&yq(e.name).some(t=>t.startsWith(n))}function N4(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?h:s}${a.slice(h.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 eM(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 xq(e){return bq.filter(n=>n!=="plan"||e)}function XFn(e,n){const t=e.filter(r=>!xk(r.name));for(const r of xq(n))t.push(KFn(r));return t.sort((r,s)=>+(s.source==="command")-+(r.source==="command")||yk(r).localeCompare(yk(s),void 0,{sensitivity:"base"}))}function z4(e){return e==="plan"||e==="goal"||e==="side"}function YFn(e,n){for(const t of xq(n).sort((r,s)=>+(r==="plan")-+(s==="plan"))){const r=[t,...yq(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 j4(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const ZFn=["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 JFn=null;function tM(e,n){const t=JFn??(JFn=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(tm(e)).width-t.measureText(`/${e}`).width;return Math.max(1,Math.ceil((s+6)/t.measureText(" ").width))}const eHn={plan:z7n,goal:L$,new:c8n,resume:I$,model:qS,compact:s7n,copy:Yu,export:Wb,side:P0};function wq({name:e,className:n}){const t=Qy(e)?eHn[e]:x8n;return _.jsx(t,{size:16,strokeWidth:1.5,className:n,"aria-hidden":"true"})}function kq({name:e}){return _.jsxs(_.Fragment,{children:[_.jsx(wq,{name:e,className:"me-1 inline-block align-middle"}),tm(e)]})}function Sq(e,n,t,r,s,i=!1){let a=0;return WFn(e,n).map((o,c,u)=>{var m,w;const h=a+o.text.length;a=h;const f=o.text.slice(1).toLowerCase();if(o.command&&s)return s(o.text,f,h,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(kq,{name:f})},c):i?_.jsx("span",{"aria-hidden":"true",children:o.text},c):_.jsx(T.Fragment,{children:p},c)})}function tHn({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(),[h,f]=T.useState(!1),p=ut({...Wkn(n,s,r.harness),enabled:h,subscribed:h}),m=p.data??null,w=p.isFetching,[k,v]=T.useState({}),b=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},y=()=>{const N=a.current;if(!N)return;const j=N.getBoundingClientRect(),A=Math.min(420,window.innerWidth-32),z=Math.max(16,Math.min(j.left-4,window.innerWidth-A-16));v(j.top>300?{bottom:window.innerHeight-j.top+12,left:z,width:A}:{left:z,top:j.bottom+12,width:A})},x=()=>{b(),y(),f(!0)},C=()=>{b(),c.current=window.setTimeout(()=>f(!1),120)};return T.useEffect(()=>()=>b(),[]),T.useEffect(()=>{if(!h)return;const N=()=>y();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[h]),_.jsxs(T.Fragment,{children:[_.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":h,"aria-label":jJ({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:x,onMouseLeave:C,onFocus:x,onBlur:C,onKeyDown:N=>{var j,A;if(N.key==="Escape"){f(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),x();return}h&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(j=o.current)==null||j.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),h&&(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 j,A;N.preventDefault(),(j=i.current)==null||j.focus(),(A=i.current)==null||A.setSelectionRange(t,t),b()},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(kq,{name:n})})]})})]}),h&&si.createPortal(_.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":Iee({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:b,onMouseLeave:C,onFocus:b,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:tm(n)}),_.jsx(Wt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:wcn()})]}),_.jsx("div",{className:"p-4 text-sm text-text",children:w&&m===null?_.jsx("span",{className:"text-muted",children:jcn()}):_.jsx(_c,{text:m??r.description})})]}),document.body)]})}function nHn({text:e,isCommand:n}){return _.jsx(_.Fragment,{children:Sq(e,n,"skill-chip me-0.5 whitespace-nowrap font-normal text-skill-blue")})}function rHn({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 ZFn)c.style.setProperty(p,f.getPropertyValue(p));c.style.width=`${o.clientWidth+parseFloat(f.borderLeftWidth)+parseFloat(f.borderRightWidth)}px`};u();const h=new ResizeObserver(u);return h.observe(o),()=>h.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:[Sq(e,t,"",void 0,(o,c,u,h)=>{if(u===n)return _.jsx("span",{"aria-hidden":"true",children:o},`${h}:${u}`);const f=r.find(p=>p.name===FC(c));return f&&f.source!=="command"?_.jsx(tHn,{label:o,name:c,end:u,skill:f,projectId:s,textareaRef:i},`${h}:${u}`):_.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[_.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${h}:${u}`)},!0),"​"]})}function sHn({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(wq,{name:i.name,className:"shrink-0"}),_.jsx("span",{className:"skill-name shrink-0",children:yk(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:Lcn()}),i.source==="project"&&_.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:RL()})]},i.name))})}function iHn(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const wk=6.5,nM=2*Math.PI*wk;function aHn({usage:e}){return!e||e.usedTokens<=0?null:_.jsx(oHn,{usage:e})}function oHn({usage:e}){const{open:n,setOpen:t,ref:r}=Ki(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":iHn(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:VOe(),onClick:()=>t(u=>!u),children:a===null?c1(s):_.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[_.jsx("circle",{cx:"8",cy:"8",r:wk,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),_.jsx("circle",{cx:"8",cy:"8",r:wk,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${nM*Math.max(a,2)/100} ${nM}`,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:POe()}),_.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?eDe({value:Ce(c1(s))}):oDe({used:Ce(c1(s)),total:Ce(c1(i)),percent:Ce(c)})})]}),a!==null&&_.jsx(cq,{value:s,max:i,fillColor:o})]})]})}function cHn(e,n,t){const r=e.map(t);return n<0?r:[...r.slice(0,n),_.jsxs("div",{role:"group","aria-label":nj(),children:[_.jsx("div",{className:"px-2.5 pb-1 pt-2.5 text-sm font-medium text-subtext",children:nj()}),r.slice(n)]},"from-terminal")]}function lHn({activeSessionId:e,onClose:n,onResume:t,onImport:r}){const s=T.useRef(null),i=T.useRef(null),{data:a,isPending:o,error:c}=ut(Zkn()),{data:u=[]}=ut(zh()),{data:h=[]}=ut(YI()),[f,p]=T.useState(""),[m,w]=T.useState(0);Dm(s,n);const k=T.useMemo(()=>new Map(u.map(N=>[N.id,N.name])),[u]),v=T.useMemo(()=>{const N=f.trim().toLowerCase(),j=M=>!N||M.toLowerCase().includes(N),A=(a??[]).filter(M=>M.id!==e).filter(M=>j(`${M.title??""} ${k.get(M.projectId)??""} ${bu[M.harness]}`)).map(M=>({kind:"session",key:M.id,session:M})),z=h.filter(M=>j(`${M.title??""} ${M.cwd??""} ${bu[M.harness]}`)).map(M=>({kind:"native",key:`${M.harness}:${M.nativeId}`,chat:M}));return[...A,...z]},[a,h,f,e,k]),b=T.useMemo(()=>v.findIndex(N=>N.kind==="native"),[v]),y=Math.min(m,Math.max(0,v.length-1));T.useLayoutEffect(()=>{var N;(N=i.current)==null||N.scrollIntoView({block:"nearest"})},[y,v]);const x=N=>(N==null?void 0:N.split("/").filter(Boolean).at(-1))??"",C=N=>N.kind==="native"?r(N.chat):t(N.session);return si.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":sj(),tabIndex:-1,children:[_.jsx("div",{className:"border-b border-border p-3",children:_.jsx(Br,{"data-initial-focus":!0,value:f,placeholder:rj(),"aria-label":rj(),role:"combobox","aria-autocomplete":"list","aria-expanded":v.length>0,"aria-controls":"resume-options","aria-activedescendant":v[y]?`resume-option-${v[y].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 j=N.key==="ArrowDown"?1:-1;w((y+j+v.length)%v.length)}else N.key==="Enter"&&v[y]&&(N.preventDefault(),C(v[y]))}})}),_.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?sj():void 0,children:o?_.jsxs(Pr,{className:"px-2.5 py-2",role:"status",children:[_.jsx(St,{})," ",xS()]}):c&&!a?_.jsx("div",{className:"px-2.5 py-2 text-sm text-accent-red",role:"alert",children:yS({error:Ce(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:FNt()}):cHn(v,b,(N,j)=>{var D;const A=N.kind==="native"?N.chat:null,z=N.kind==="session"?N.session:null;return _.jsxs(vn,{id:`resume-option-${N.key}`,ref:j===y?i:void 0,type:"button",role:"option","aria-selected":j===y,active:j===y,tabIndex:-1,className:"gap-2.5 text-text",onMouseEnter:()=>w(j),onClick:()=>C(N),children:[_.jsx(Th,{harness:(A==null?void 0:A.harness)??(z==null?void 0:z.harness)??"claude-code"}),_.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",children:((D=(A==null?void 0:A.title)??(z==null?void 0:z.title))==null?void 0:D.trim())||Md()}),_.jsx("span",{dir:"auto",className:"max-w-40 shrink-0 truncate text-muted",title:(A==null?void 0:A.cwd)??void 0,children:A?x(A.cwd):k.get((z==null?void 0:z.projectId)??"")??""}),_.jsx("span",{className:"shrink-0 text-muted tabular-nums",children:vo((A==null?void 0:A.updatedAt)??(z==null?void 0:z.updatedAt)??0)})]},N.key)})})]})}),document.body)}const gb="!";function rM(e){return e.startsWith(gb)?e.slice(gb.length).trim():null}function uHn(e){return e.startsWith(gb)?e.slice(gb.length):e}function _Hn(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 fHn(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 dHn(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,"")} ${t} -`}function pk(e,n){return n?` +`}function kk(e,n){return n?` \\[ ${e} \\] -`:`\\(${e}\\)`}function UPn(e,n){const t=n.trim().split(` +`:`\\(${e}\\)`}function hHn(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 GPn(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 VPn(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function KPn(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function WPn(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const cq="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",jC="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",Wu=256,lq=1024,uq=2e4,E4=8,QPn="chat-annotations",XPn="side-chat-annotations";function F_(e){return e instanceof Element?e:e.parentElement}function VR(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function N4(e,n){return VR(e).compareBoundaryPoints(Range.START_TO_START,VR(n))<0}function KR(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 ZPn(e,n){var s,i;const t=F_(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=F_(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=F_(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 JPn(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 eFn(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},h={container:c.endContainer,offset:c.endOffset};if(N4(s,u)&&t.append(KR(s,u)),t.append(o.cloneNode(!0)),s=h,!N4(s,r))break}return i.length===0?t.append(e.cloneContents()):N4(s,r)&&t.append(KR(s,r)),ZPn(e,t),JPn(t),t}function tFn(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>tm(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` +`)}function pHn(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 mHn(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function gHn(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function vHn(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const Cq="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",HC="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",Vu=256,Eq=1024,Nq=2e4,A4=8,bHn="chat-annotations",yHn="side-chat-annotations";function P_(e){return e instanceof Element?e:e.parentElement}function sM(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function T4(e,n){return sM(e).compareBoundaryPoints(Range.START_TO_START,sM(n))<0}function iM(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const xHn=new Set(["A","B","CODE","EM","I","STRONG"]);function wHn(e,n){var s,i;const t=P_(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=P_(e.startContainer);for(;a&&a.matches(".md *")&&a.contains(t);){if(xHn.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=P_(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 kHn(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 SHn(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},h={container:c.endContainer,offset:c.endOffset};if(T4(s,u)&&t.append(iM(s,u)),t.append(o.cloneNode(!0)),s=h,!T4(s,r))break}return i.length===0?t.append(e.cloneContents()):T4(s,r)&&t.append(iM(s,r)),wHn(e,t),kHn(t),t}function CHn(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>nm(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` -${GPn(n,!!e.querySelector("tr:first-child th"))} +${pHn(n,!!e.querySelector("tr:first-child th"))} -`:""}function _q(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 h=Array.from(a.childNodes).map(f=>f instanceof HTMLElement&&f.matches("UL, OL")?` -${_q(f).trim()} -`:tm(f)).join("").trim();i.push(UPn(n?`${u}.`:"-",h))}return` +`:""}function zq(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 h=Array.from(a.childNodes).map(f=>f instanceof HTMLElement&&f.matches("UL, OL")?` +${zq(f).trim()} +`:nm(f)).join("").trim();i.push(hHn(n?`${u}.`:"-",h))}return` ${i.join(` `)} -`}function tm(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return FPn(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(tm).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?pk(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?pk(c,!1):""}if(e.tagName==="BR")return` -`;if(e.tagName==="TABLE")return tFn(e);if(e.matches("UL, OL"))return _q(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return HPn(e.textContent??"");if(e.tagName==="PRE")return qPn(e.textContent??"");const n=Array.from(e.childNodes).map(tm).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 nm(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return _Hn(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(nm).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?kk(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?kk(c,!1):""}if(e.tagName==="BR")return` +`;if(e.tagName==="TABLE")return CHn(e);if(e.matches("UL, OL"))return zq(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return fHn(e.textContent??"");if(e.tagName==="PRE")return dHn(e.textContent??"");const n=Array.from(e.childNodes).map(nm).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` @@ -1092,7 +1092,7 @@ ${n.trim().split(` `).map(c=>`> ${c}`).join(` `)} -`;const t=VPn(e.tagName,n);return t?` +`;const t=mHn(e.tagName,n);return t?` ${t} @@ -1100,37 +1100,37 @@ ${t} ${n.trim()} -`:n}function nFn(e,n){return tm(e).replace(/\r\n?/g,` +`:n}function EHn(e,n){return nm(e).replace(/\r\n?/g,` `).replace(/[ \t]+\n/g,` `).replace(/\n{3,}/g,` -`).trim()||n}function WR(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function rFn(e,n){var s,i,a,o;if(!KPn(e))return;const t=WR(e);if(t.length<8)return;let r;for(const c of n.querySelectorAll(".msg-assistant > .md .katex")){const h=[(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(WR).find(w=>WPn(w,t));if(!h)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:pk(f,p).trim(),delta:Math.abs(h.length-t.length)};(!r||m.delta .md .katex")){const h=[(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(aM).find(w=>vHn(w,t));if(!h)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:kk(f,p).trim(),delta:Math.abs(h.length-t.length)};(!r||m.deltaz.width>0&&z.height>0),w=m[0]??t.getBoundingClientRect(),k=m.filter(z=>z.topw.top),v=k.length>0?k:[w],b=Math.min(...v.map(z=>z.left)),y=Math.max(...v.map(z=>z.right)),x=Math.min(...v.map(z=>z.top)),C=Math.max(...v.map(z=>z.bottom)),N=34,j=74,A=x>=N+E4?x-N-E4:C+E4;return{text:nFn(p,f),range:t.cloneRange(),x:Math.min(window.innerWidth-j,Math.max(j,b+(y-b)/2)),top:A}}function iFn(e,n){const[t,r]=T.useState(null),s=T.useRef(!1),i=T.useCallback(()=>{const c=e.current;r(c?sFn(c):null)},[e]);T.useEffect(()=>{let c=null;const u=()=>{s.current||i()},h=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",h,!0),window.addEventListener("pointerup",f,!0),window.addEventListener("pointercancel",f,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",h,!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 h=u.target;h instanceof Element&&h.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 aFn(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 oFn({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?rFn(e.text,s):void 0)},[e.id,e.text]),_.jsx("div",{ref:n,children:_.jsx(uc,{text:t??e.text})})}function cFn({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(oFn,{annotation:t})]}),n&&_.jsx($t,{type:"button",size:"small","data-annotation-remove":!0,title:jke(),"aria-label":xJ({number:Zt(r+1)}),onClick:()=>n(t.id),children:_.jsx(br,{size:13})})]},t.id))}function AC({annotations:e,variant:n,onClear:t,onRemove:r}){const s=T.useRef(null),i=T.useRef(null),a=T.useId(),o=Vi(s),c=n==="sent",u=T.useRef(null),h=()=>{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,b;(b=((v=i.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||b.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?h: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(S$,{size:c?13:14,className:"text-muted"}),e.length===1?obe():c0e({count:Zt(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:NN(),"aria-label":NN(),onClick:t,children:_.jsx(br,{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(cFn,{annotations:e,onRemove:r?m:void 0})})]})}function lFn(e){return _.jsx(AC,{...e,variant:"composer"})}const uFn=["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(" "),QR=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),_Fn=["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(" "),fFn=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),mk="prompt-actions flex flex-wrap gap-2",XR=[],dFn=[],s0={};function L_(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function z4(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 hFn(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 ti(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function j4(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 A4(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Wu));s++);return r}function pFn(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 th(...e){const n=new Set,t=new RegExp(`^${of}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=Wu||r++>=lq)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function Vy(e){return e.replace(/^Exit code \d+\s*/i,"").split(` +`).trim();if(!f)return null;const p=SHn(t,e),m=Array.from(t.getClientRects()).filter(z=>z.width>0&&z.height>0),w=m[0]??t.getBoundingClientRect(),k=m.filter(z=>z.topw.top),v=k.length>0?k:[w],b=Math.min(...v.map(z=>z.left)),y=Math.max(...v.map(z=>z.right)),x=Math.min(...v.map(z=>z.top)),C=Math.max(...v.map(z=>z.bottom)),N=34,j=74,A=x>=N+A4?x-N-A4:C+A4;return{text:EHn(p,f),range:t.cloneRange(),x:Math.min(window.innerWidth-j,Math.max(j,b+(y-b)/2)),top:A}}function jHn(e,n){const[t,r]=T.useState(null),s=T.useRef(!1),i=T.useCallback(()=>{const c=e.current;r(c?zHn(c):null)},[e]);T.useEffect(()=>{let c=null;const u=()=>{s.current||i()},h=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",h,!0),window.addEventListener("pointerup",f,!0),window.addEventListener("pointercancel",f,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",h,!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 h=u.target;h instanceof Element&&h.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 AHn(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 THn({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?NHn(e.text,s):void 0)},[e.id,e.text]),_.jsx("div",{ref:n,children:_.jsx(_c,{text:t??e.text})})}function RHn({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:x6e()}),_.jsx(THn,{annotation:t})]}),n&&_.jsx(It,{type:"button",size:"small","data-annotation-remove":!0,title:SSe(),"aria-label":LJ({number:Jt(r+1)}),onClick:()=>n(t.id),children:_.jsx(xr,{size:13})})]},t.id))}function qC({annotations:e,variant:n,onClear:t,onRemove:r}){const s=T.useRef(null),i=T.useRef(null),a=T.useId(),o=Ki(s),c=n==="sent",u=T.useRef(null),h=()=>{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,b;(b=((v=i.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||b.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?h: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(B$,{size:c?13:14,className:"text-muted"}),e.length===1?nye():rme({count:Jt(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:FN(),"aria-label":FN(),onClick:t,children:_.jsx(xr,{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":h6e(),children:_.jsx(RHn,{annotations:e,onRemove:r?m:void 0})})]})}function MHn(e){return _.jsx(qC,{...e,variant:"composer"})}const OHn=["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(" "),oM=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),DHn=["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(" "),LHn=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),Sk="prompt-actions flex flex-wrap gap-2",cM=[],IHn=[],i0={};function D_(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function R4(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 $Hn(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 Js(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function M4(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 O4(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Vu));s++);return r}function BHn(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 eh(...e){const n=new Set,t=new RegExp(`^${af}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=Vu||r++>=Eq)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function Xy(e){return e.replace(/^Exit code \d+\s*/i,"").split(` `).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` -`).trim()}function mFn(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 gFn(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=NMn(r),fq(r)}function fq(e){return bFn(e).replace(/[\t\r ]+/g," ").trim()}function vFn(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&&hq(s)?{ref:r,path:s}:null}function wFn(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 YR(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 kFn(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=YR(s,o);if(!c)return null;s=c}return s?YR(s,e):e}const Wo="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",SFn=new RegExp(`\\bchat_(${Wo})\\b`,"gi"),of=`(?:${Wo}|[0-9a-f]{8})`;function nh(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 h=1,f=null,p=!1;for(let m=u;m{let h=!1;for(let f=u;fAMn(t.raw,n))}function Ba(e,n){return Ky(e,n).length>0}function CFn(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,uq).matchAll(SFn))if(n.add(t[0].toLowerCase()),n.size>=Wu)break;return[...n]}function gk(e,n){if(!e)return[];const t=new Set,r=e.slice(0,uq),s=n==="runs"?[new RegExp(`/runs/(${Wo})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${Wo})`,"gi"),new RegExp(`^\\s*RUN\\s+(${Wo})\\b`,"gim"),new RegExp(`={3,}\\s*(${Wo})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${Wo})`,"gi"),new RegExp(`^\\s*id:\\s*(${Wo})`,"gim"),new RegExp(`={3,}\\s*(${Wo})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=Wu)return[...t];const i=new RegExp(`^\\s*(${Wo})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=Wu)break;return[...t]}function mq(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 gq(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 vq(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 EFn(e,n,t=[],r=[]){const s=Ky(e,"logs"),i=new Set;if(s.length===0){if(!Ba(e,"logs"))return[];const o=t.length>0?[]:gk(n,"runs");for(const c of t.length>0?t:o.length>0?o:r)if(i.add(c),i.size>=Wu)break;return th([...i])}let a=!1;for(const{invocation:o,offset:c}of mq(e,s)){const u=Dh(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const h=u.slice(1);let f=null;for(let v=0;v0?[]:gk(n,"runs"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Wu)break}return th([...i])}function Td(e,n,t=[],r=[]){const s=Ky(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:c}of mq(e,s)){const u=Dh(o.raw),h=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let f=!1;h&&new RegExp(`^${of}$`,"i").test(h)&&(i.add(h),f=!0);const p=h?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(h):null;if(p){const m=p[1],w=gq(e,m,c,of);if(w.length>0){for(const v of w)i.add(v);f=!0}const k=vq(e,m,c,of);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?[]:gk(n,"experiments"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Wu)break}return th([...i])}const ZR=new WeakMap;function wf(e){const n=E(),t=ZR.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=NFn(e);return ZR.set(e,{locale:n,activity:r}),r}function NFn(e){var b,y,x,C,N,j;const n=e.tool??"tool",t=((b=e.state)==null?void 0:b.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=ti(i,"command","cmd"),o=pFn(i,"commandArgv"),c=((y=e.state)==null?void 0:y.output)||((x=e.state)==null?void 0:x.error),u=th(A4(i,"targetIds")),h=th(A4(i,"runTargetIds")),f=th(A4(i,"experimentTargetIds")),p=ti(i,"filePath","file_path","notebookPath","notebook_path","path"),m=ti(i,"description"),w=n.toLowerCase().split(/(?::|\.|__)+/),k=w.at(-1)??n.toLowerCase();if(k==="run"&&w.includes("web")){const A=j4(i,"search_query","q"),z=j4(i,"image_query","q"),M=j4(i,"find","pattern");return A?{kind:"web",label:lN({query:A})}:z?{kind:"web",label:zae({query:z})}:M?{kind:"web",label:hoe({pattern:M})}:Array.isArray(i.open)?{kind:"web",label:P3e()}:Array.isArray(i.weather)?{kind:"web",label:o2e()}:Array.isArray(i.finance)?{kind:"web",label:Kxe()}:Array.isArray(i.sports)?{kind:"web",label:e2e()}:Array.isArray(i.time)?{kind:"web",label:Pxe()}:{kind:"web",label:CN()}}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=gFn(a??(o==null?void 0:o.join(" "))??""),z=nh(A);let M=z.map(V=>V.raw);if(o!=null&&o.length){const V=jMn(o);M=V===null?[o]:nh(fq(V)).map(oe=>oe.raw)}let D=null;for(const V of M)if(D=TMn(V),D)break;const I=M.some(V=>{const oe=Dh(V);return oe!==null&&oe[0]!=="discover"&&oe[0]!=="paper"});if(D&&!I){const V=D.kind==="discover"?{keyword:Qie(),embedding:nae(),openalex:Wae(),biorxiv:lae(),pubmed:toe()}[D.strategy]:null,oe=D.kind==="discover"?D.query?Rne({activity:V??cN(),query:D.query}):V??cN():D.id?Vp({target:Ce(D.id)}):cse();return{kind:D.kind==="paper"?"read":"search",label:oe,litCall:D}}if(Ba(A,"agent\\s+spawn"))return{kind:"agent",label:V2e(),spawnedSessionIds:CFn(c),litCall:D??void 0};const B=z.map(V=>pq(V.raw)),G=Ba(A,"exp\\s+status"),q=Ba(A,"exp\\s+desc"),Q=Ky(A,"exp\\s+desc").some(V=>(Dh(V.raw)??[]).some(ce=>ce==="--set"||ce.startsWith("--set=")||ce==="--stdin")),K=Q?lce():tse(),Z=Q?rte():pie();if(Ba(A,"logs")){const V=EFn(A,c,h,u);return{kind:"project",label:V.length===1?tie():cie(),runIds:V,litCall:D??void 0}}if(Ba(A,"exp\\s+run"))return{kind:"project",label:s6e(),litCall:D??void 0};if(Ba(A,"exp\\s+wait"))return{kind:"project",label:a7e(),litCall:D??void 0};if(Ba(A,"exp\\s+cancel"))return{kind:"project",label:axe(),litCall:D??void 0};const J=Ba(A,"project\\s+view");if(J&&G&&q)return{kind:"project",label:Z,experimentIds:Td(A,c,f,u),litCall:D??void 0};if(J&&q)return{kind:"project",label:K,experimentIds:Td(A,c,f,u),litCall:D??void 0};if(J&&G)return{kind:"project",label:EN(),experimentIds:Td(A,c,f,u),litCall:D??void 0};if(J)return{kind:"project",label:cke(),litCall:D??void 0};if(G&&q)return{kind:"project",label:Z,experimentIds:Td(A,c,f,u),litCall:D??void 0};if(G)return{kind:"project",label:EN(),experimentIds:Td(A,c,f,u),litCall:D??void 0};if(q)return{kind:"project",label:K,experimentIds:Td(A,c,f,u),litCall:D??void 0};if(Ba(A,"runs?"))return{kind:"project",label:J4e(),litCall:D??void 0};if(Ba(A,"projects"))return{kind:"project",label:a3e(),litCall:D??void 0};if(Ba(A,"compute"))return{kind:"project",label:yxe(),litCall:D??void 0};const $=B.map(xFn).find(V=>V!=null);if($){const V=z4($.path);return{kind:V?"skill":"read",label:V?iw({name:Ce(V)}):Vp({target:Ce(L_($.path))}),filePath:$.path,fileRef:$.ref,labelTarget:V?`${V} skill`:L_($.path)}}const L=B.findIndex(V=>V!=null&&["sed","cat","head","tail"].includes(V.name)),F=L>=0?B[L]:null,U=F?yFn(F):null,H=U?kFn(U,z,L,ti(i,"cwd","workdir")):null;if(U&&H){const V=z4(H);return{kind:V?"skill":"read",label:V?iw({name:Ce(V)}):Vp({target:Ce(L_(U))}),filePath:H,labelTarget:V?`${V} skill`:L_(U)}}if(B.some(V=>(V==null?void 0:V.name)==="find"||(V==null?void 0:V.name)==="ls"||(V==null?void 0:V.name)==="rg"&&V.args.includes("--files")))return{kind:"search",label:LN()};const ae=B.findIndex(V=>(V==null?void 0:V.name)==="rg"||(V==null?void 0:V.name)==="grep");if(ae>=0){const V=wFn(z[ae].raw);return{kind:"search",label:V?ow({pattern:Ce(V)}):aw(),searchPattern:V??void 0}}const ie=B.find(V=>(V==null?void 0:V.name)==="git"),ue=ie==null?void 0:ie.args[0];if(ue==="grep"){const V=ie==null?void 0:ie.args.slice(1).find(oe=>!oe.startsWith("-"));return{kind:"search",label:V?ow({pattern:Ce(V)}):aw(),searchPattern:V}}if(ue==="status")return{kind:"command",label:Mxe()};if(ue==="diff")return{kind:"command",label:aSe()};if(ue==="log")return{kind:"command",label:tke()};const re=V=>B.some(oe=>!oe||!["cargo","pnpm","npm","yarn"].includes(oe.name)?!1:oe.args[0]===V||oe.args[0]==="run"&&oe.args[1]===V);return re("test")?{kind:"command",label:F5e()}:B.some(V=>(V==null?void 0:V.name)==="tsc")||re("typecheck")?{kind:"command",label:h2e()}:re("lint")?{kind:"command",label:dxe()}:re("build")?{kind:"command",label:Vye()}:{kind:"command",label:Ore({command:Ce(A)})}}case"skill":{const A=ti(i,"skill","name"),z=A?hFn(n,A):null;return{kind:"skill",label:A?dre({name:Ce(A)}):are(),filePath:z??void 0,labelTarget:z&&A?`${A} skill`:void 0}}case"read":{const A=p?L_(p):null,z=p?z4(p):null;return z?{kind:"skill",label:iw({name:Ce(z)}),filePath:p??void 0,labelTarget:`${z} skill`}:A?{kind:"read",label:Vp({target:Ce(A)}),filePath:p??void 0,labelTarget:A}:{kind:"read",label:W5e()}}case"edit":case"write":case"notebookedit":{const A=mFn(i),z=p??(A==null?void 0:A.path)??null,M=z?L_(z):null,D=M?(A==null?void 0:A.type)==="add"?Ite({target:Ce(M)}):(A==null?void 0:A.type)==="delete"?sne({target:Ce(M)}):vne({target:Ce(M)}):null;return M?{kind:"edit",label:D??RN(),filePath:z??void 0,labelTarget:M}:{kind:"edit",label:RN()}}case"grep":{const A=ti(i,"pattern");return{kind:"search",label:A?ow({pattern:Ce(A)}):aw(),searchPattern:A??void 0}}case"glob":{const A=ti(i,"pattern");return{kind:"search",label:A?Vne({pattern:Ce(A)}):LN()}}case"websearch":{const A=ti(i,"query"),z=ti(i,"url"),M=ti(i,"pattern");return A?{kind:"web",label:lN({query:A})}:M&&z?{kind:"web",label:Fae({pattern:M})}:z?{kind:"web",label:Nre({target:Ce(z)})}:{kind:"web",label:m??CN()}}case"webfetch":{const A=ti(i,"url");return{kind:"web",label:A?Vp({target:Ce(A)}):m??Nse()}}case"task":return{kind:"agent",label:m??Fre()};case"subagent":return{kind:"agent",label:zFn(i)};case"error":return{kind:"command",label:PCe()};case"importedchat":return{kind:"project",label:Bne()};case"contextcompaction":return{kind:"command",label:((C=e.state)==null?void 0:C.status)==="error"?Ate():((N=e.state)==null?void 0:N.status)==="running"?oN():gte(),progressLabel:oN()};default:{const A=m??p??a??((j=e.state)==null?void 0:j.title)??"";return{kind:"command",label:A?`${n}: ${A}`:n}}}}function zFn(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 Doe();case"sendInput":return zoe();case"resumeAgent":return Fse();case"wait":return mce();case"closeAgent":return ute()}switch(typeof e.kind=="string"?e.kind:""){case"started":return nce();case"interacted":return Lee();case"interrupted":return Qoe()}return Hoe()}function gb({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=_.jsx(Of,{...t});if(e.litCall)r=_.jsx(nF,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=_.jsx(d$,{...t});break;case"read":case"project":r=_.jsx(h$,{...t});break;case"search":r=_.jsx(N$,{...t});break;case"edit":r=_.jsx(IS,{...t});break;case"web":r=_.jsx(J6n,{...t});break;case"agent":r=_.jsx(FS,{...t});break}return _.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function T4({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?Wr(h=>n(c.id,h),{stopPropagation:!0}):{onClick:h=>{h.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?PY({target:r}):pee({count:Zt(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),o.current=!s&&c.detail===0,i(u=>!u)},children:s?iL():Uje({count:Zt(e.length)})})]})}function vk({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,c,u,h;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:$Mn(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,_.jsx(r6n,{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,...Wr(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:gN({number:Zt(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:gN({number:Zt(k+1)})})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(T4,{items:m,onSelect:r,targetType:Qpe()})]})]})}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))||nl()}));return _.jsxs(_.Fragment,{children:[e.label," — ",p.map((w,k)=>_.jsxs("span",{children:[k>0&&", ",t?_.jsx("button",{className:"tool-target",title:FZ({run:Ce(w)}),...Wr(v=>t(w,v),{stopPropagation:!0}),children:(s==null?void 0:s(w))||nl()}):_.jsx("span",{children:(s==null?void 0:s(w))||nl()})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(T4,{items:m,onOpen:t,targetType:d9e()})]})]})}if((h=e.experimentIds)!=null&&h.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))||nl()}));return _.jsxs(_.Fragment,{children:[e.label," — ",p.map((w,k)=>_.jsxs("span",{children:[k>0&&", ",i?_.jsx("button",{className:"tool-target",title:yZ({name:(a==null?void 0:a(w))||Ce(w)}),...Wr(v=>i(w,v),{stopPropagation:!0}),children:(a==null?void 0:a(w))||nl()}):_.jsx("span",{children:(a==null?void 0:a(w))||nl()})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(T4,{items:m,onOpen:i,targetType:Tge()})]})]})}return e.label}function TC(e){const n=e.progressLabel??{skill:yre(),read:Ose(),search:xoe(),edit:Cne(),project:wie(),web:Xee(),agent:Yte(),command:VD()}[e.kind];return{...e,label:n}}function bq(e,n){const t=wf({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:Jne(),read:Wre(),search:Hie(),edit:_ne(),project:Wse(),web:qee(),agent:Ute(),command:jie()}[t.kind]}function jFn(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const AFn=250;function TFn(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=AFn-(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 RFn=160;function yq(e){const[n,t]=T.useState(!1);return T.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),RFn);return()=>window.clearTimeout(r)},[e]),e&&n}function MFn(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:eL()}}function OFn(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])}function DFn(e){const n=[];let t=null;for(const r of e){const s=wf(r),i=OFn(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 xq({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 b=Date.now();c(b),b>=a&&window.clearInterval(v)},1e3);return()=>window.clearInterval(v)},[a]),e.id==="turn-retry"){const v=xMn(i??{},o);return _.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[_.jsx(Nt,{}),_.jsx("span",{children:v})]})}const u=eF(i==null?void 0:i.recoveryAction),h=i==null?void 0:i.turnId,f=JP(e)?J1e():s?R9e():QN(),p=s?K6n:PS,m=Vy(((k=e.state)==null?void 0:k.error)||QN());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(Ka,{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&&h&&(u==="retry"||u==="continue")&&_.jsx(Ie,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(h,u),children:t?aEe():u==="retry"?si():Ume()})]})}function JR({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}){const u=e.state,h=(u==null?void 0:u.status)==="error",f=Vy((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=h&&!!f,[m,w]=T.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return _.jsx(xq,{part:e,busy:!1,recovering:!1,usageLimited:I5(e)});const v=_.jsxs(_.Fragment,{children:[h&&_.jsxs("span",{className:"sr-only",children:[_S()," "]}),h?_.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:_.jsx(g$,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):_.jsx(gb,{activity:n,className:"text-muted"}),_.jsxs("span",{className:`${cq} ${h?"text-accent-red":"text-subtext"}`,children:[_.jsx(vk,{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:eZ({count:Zt(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?KY({activity:n.label}):cee({activity:n.label}),onClick:()=>w(b=>!b),children:_.jsx(Ka,{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:jC,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 LFn({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var z,M,D,I;const[c,u]=T.useState(!1),[h,f]=T.useState(!1),p=()=>{f(!0),u(B=>!B)},m=DFn(e),w=m.map(({activity:B})=>B),k=n?m.at(-1):void 0,v=k==null?void 0:k.part,b=k==null?void 0:k.activity,y=((z=v==null?void 0:v.state)==null?void 0:z.status)!=="error"?(b&&TC(b))??null:null,x=!!v&&((M=v.state)==null?void 0:M.status)==="running"&&!(y!=null&&y.progressLabel)&&(jFn((D=v.state)==null?void 0:D.input)||(y==null?void 0:y.kind)==="command"&&!ti(((I=v.state)==null?void 0:I.input)??{},"command","cmd")),C=TFn(y,x),N=yq(C!=null),j=C??MFn(w),A=C?C.label:eL();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(gb,{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(vk,{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(JR,{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(gb,{activity:j,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(vk,{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?kme():Sge(),children:_.jsx(Ka,{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:h&&m.map(({part:B,count:G,activity:q})=>_.jsx(JR,{part:B,repeatCount:G,activity:q,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 h;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:yi,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:x5e(),icon:IS,iconClass:"text-accent-amber"}:s.approved===!1?{label:o5e(),icon:br,iconClass:"text-accent-red"}:{label:h5e(),icon:Kb,iconClass:"text-muted"},w=m.icon;return _.jsxs("details",{className:_Fn,children:[_.jsxs("summary",{children:[_.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?nL():VN()}),_.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(Ka,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),_.jsxs("div",{className:`${QR} ms-6`,children:[_.jsx(uc,{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(AC,{annotations:p,variant:"sent"}),_.jsxs("details",{className:uFn,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:QR,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():VN()}),_.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(uc,{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",...Wr(p=>r(s.plan??"",e.id,p)),children:JCe()}),!o&&!f&&_.jsxs("div",{className:mk,children:[_.jsx(Ie,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:Nbe()}),_.jsx(Ie,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:Obe()}),_.jsx(Ie,{size:"small",onClick:()=>c({approve:!1}),children:pke()})]})]})}if(s.kind==="permission"){const f=s.toolInput??{},p=ti(f,"command","cmd","filePath","file_path","path")||"",m=typeof((h=s.toolInput)==null?void 0:h.reason)=="string"&&s.toolInput.reason||"",w=ti(f,"description")||"",k=m||w||bq(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(PS,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),_.jsx("span",{id:v,className:"text-base font-semibold text-text",children:cye()})]}),_.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(Ie,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:Swe()}),_.jsx(Ie,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:tye()})]})]})]})}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:fFn,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:mk,children:_.jsx(Ie,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>c({answers:i}),children:MCe()})})]})}function $Fn(e,n){return e.role==="user"?!0:e.parts.some(t=>Oh(t,n))}function BFn(e){const n=e.text??"",t=n.startsWith("data:")?n:e5n(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 RC(e){try{if(!navigator.clipboard)throw new Error(cL());await navigator.clipboard.writeText(e),sn(_f(),"success")}catch(n){sn(n instanceof Error?n.message:String(n),"error")}}function PFn(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 FFn({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:i,onSelect:a,pagerDisabled:o,onEdit:c,editDisabled:u}){const h=t>1,f=new Date(n),p=()=>RC(e);return _.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${h?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[h&&_.jsxs(_.Fragment,{children:[_.jsx($t,{size:"small",title:$N(),"aria-label":$N(),disabled:o||!s,onClick:()=>s&&a(s),children:_.jsx(p$,{size:14})}),_.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),_.jsx($t,{size:"small",title:IN(),"aria-label":IN(),disabled:o||!i,onClick:()=>i&&a(i),children:_.jsx(Ka,{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($t,{size:"small","aria-label":mS(),disabled:!e,onClick:p,children:_.jsx(Mf,{size:13})})]}),_.jsx($t,{size:"small",title:TN(),"aria-label":TN(),disabled:u,onClick:c,children:_.jsx(IS,{size:13})})]})}const HFn=T.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,busy:m=!1,recoveringTurnId:w,onRecover:k,skills:v,predictTextTail:b=!1,forkCount:y,forkIndex:x=0,forkPrevId:C,forkNextId:N,forkDisabled:j,branchDisabled:A,onFork:z,onSelectFork:M}){var Z,J;Yu();const[D,I]=T.useState(null),B=UFn(n);if(B)return _.jsx(GFn,{part:B});if(n.role==="user"){const $=n.parts.filter(ie=>ie.type==="text").map(ie=>ie.text??"").join(` -`),L=ie=>!!(v!=null&&v.some(ue=>ue.name===zC(ie))),F=n.parts.filter(ie=>ie.type==="image"&&ie.text).map(BFn),U=F.filter(ie=>!ie.isPdf),H=F.filter(ie=>ie.isPdf),ae=n.parts.filter(ie=>ie.type==="annotation"&&ie.text).map(ie=>({id:ie.id,text:ie.text??""}));if(D!==null){const ie=()=>{const ue=D.trim();!ue||j||(I(null),z(n.id,ue))};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":qwe(),value:D,autoFocus:!0,onChange:ue=>I(ue.target.value),onKeyDown:ue=>{ue.key==="Escape"?(ue.preventDefault(),I(null)):ue.key==="Enter"&&!ue.shiftKey&&!ue.nativeEvent.isComposing&&(ue.preventDefault(),ie())}}),_.jsxs("div",{className:`${mk} justify-end`,children:[_.jsx(Ie,{size:"small",onClick:()=>I(null),children:Jye()}),_.jsx(Ie,{size:"small",variant:"primary",onClick:ie,disabled:j||!D.trim(),children:S3()})]})]})})}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:[ae.length>0&&_.jsx(AC,{annotations:ae,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(RPn,{text:$,isCommand:L}),U.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:U.map((ie,ue)=>_.jsx("a",{href:ie.src,target:"_blank",rel:"noreferrer",children:_.jsx("img",{src:ie.src,alt:L0e()})},ue))}),H.length>0&&_.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:H.map((ie,ue)=>_.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:ie.src,target:"_blank",rel:"noreferrer",children:[_.jsx(Kb,{size:15}),_.jsx("span",{children:ie.name})]},ue))})]}),y!==void 0&&_.jsx(FFn,{text:$,createdAt:n.createdAt,count:y,index:x,prevId:C,nextId:N,onSelect:M,pagerDisabled:A,onEdit:()=>I($),editDisabled:j})]})}const G=n.parts.find($=>$.type==="tool"&&I5($)),q=n.parts.find(Gm)??G,Q=pMn(n.parts.filter($=>$!==q&&!(G&&I5($))),q),K=b&&!n.completedAt?"":ZP(n);return _.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[_.jsx(qFn,{message:n,parts:Q,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,predictTextTail:b}}),q&&_.jsx(xq,{part:q,usageLimited:!!G,busy:m,recovering:w===((J=(Z=q.state)==null?void 0:Z.input)==null?void 0:J.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($t,{size:"small",title:bN(),"aria-label":bN(),onClick:()=>void RC(K),children:_.jsx(Mf,{size:13})})})]})});function qFn({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:i}=XP(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:hv(i,t)});const u=e.completedAt??(r?Date.now():null),h=u===null?null:u-e.createdAt,f=h===null?null:h<6e4||h>=36e5?I0(h):KNe({minutes:Zt(Math.floor(h/6e4)),seconds:Zt(Math.floor(h/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(Ka,{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:hv(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),_.jsx("div",{className:"turn-answer",children:hv(i,t)})]})}function UFn(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===II?n:null}function GFn({part:e}){var c;const n=e.state,t=ti((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?VD():s&&i!==null?ume({code:Zt(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:[YD()," "]}),_.jsx(Of,{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:`${jC} 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 hv(e,n){var y,x;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,predictTextTail:m=!1}=n,w=e.filter(C=>C.type!=="steer"&&Oh(C,t)).at(-1),k=[];let v=[];const b=()=>{v.length!==0&&(k.push(_.jsx(LFn,{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(Oh(C,t)){if(C.type==="tool"&&(KFn(C.tool)||(((y=C.children)==null?void 0:y.length)??0)>0)){b(),k.push(_.jsx(QFn,{part:C,pendingTail:m&&((x=C.state)==null?void 0:x.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){v.push(C);continue}b(),C.type==="text"?k.push(_.jsx(uc,{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(IFn,{part:C,onRespond:h,onOpenFile:s,onOpenPlan:f},C.id))}return b(),k}function VFn(e){return wf(e).label}function KFn(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function wq(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 vb(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&vb(t.children,n);if(r)return r}return null}function WFn({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var w,k,v,b;const o=e.children??[],c=((w=e.state)==null?void 0:w.status)==="running",u=((k=e.state)==null?void 0:k.status)==="error",h=u?Vy(((v=e.state)==null?void 0:v.error)||((b=e.state)==null?void 0:b.output)||""):"",f=hv(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:c,pendingTailToolId:c?WP(o):null}),m=o.some(y=>y.type==="text"&&!!y.text)?"":wq(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:[_S()," "]}),h&&_.jsx("div",{className:jC,children:h.slice(0,2e4)}),f.length===0&&!m&&!h?_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?fS():bve()}):_.jsxs(_.Fragment,{children:[f,m&&_.jsx(uc,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function QFn({part:e,pendingTail:n,onOpenSubagent:t}){var u,h,f,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=Vy(((h=e.state)==null?void 0:h.error)||((f=e.state)==null?void 0:f.output)||""),i=n&&!r?TC(wf(e)):wf(e),a=yq(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!wq(e),c=_.jsxs(_.Fragment,{children:[r&&_.jsxs("span",{className:"sr-only",children:[_S()," "]}),r?_.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:_.jsx(g$,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):_.jsx(gb,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),_.jsx("span",{className:`${cq} ${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:hbe(),...Wr(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(Ka,{size:12})})]})}function XFn(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 MC(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=ti(o,"reason","description")||bq(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 YFn(e){const[n,t]=T.useState({text:"",sequence:0}),r=T.useRef(null);return T.useEffect(()=>{var w,k,v,b,y;const s=((w=e[0])==null?void 0:w.id)??"",{messageId:i,states:a}=XFn(e),o=MC(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(x=>({text:o?uN({label:ua(o.label)}):"",sequence:x.sequence+1}));return}const c=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,h=[...a].filter(([x,C])=>{var N;return((N=c.get(x))==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(x=>({text:uN({label:ua(o.label)}),sequence:x.sequence+1}));return}const f=(k=h.find(([,x])=>Gm(x.part)))==null?void 0:k[1].part;if((f==null?void 0:f.id)==="turn-recovery"){const x=eF((b=(v=f.state)==null?void 0:v.input)==null?void 0:b.recoveryAction);t(C=>({text:`${Sle()}${x?` ${x==="retry"?qce():Lce()}`:""}`,sequence:C.sequence+1}));return}if((f==null?void 0:f.id)==="turn-retry"){t(x=>({text:jce(),sequence:x.sequence+1}));return}const p=h.filter(([,x])=>x.status==="error");if(p.length>0){const x=p.slice(0,2).map(([,C])=>wf(C.part).label).join(", ");t(C=>({text:p.length===1?ule({labels:x}):gle({count:Zt(p.length),labels:x}),sequence:C.sequence+1}));return}const m=h.filter(([,x])=>x.status==="running");if(m.length>0){const x=(y=m.at(-1))==null?void 0:y[1].part;t(C=>({text:x?TC(wf(x)).label:Xce(),sequence:C.sequence+1}));return}h.some(([,x])=>x.status==="completed")&&t(x=>({text:rle(),sequence:x.sequence+1}))},[e]),n}const ZFn=T.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:i,allMessages:a,canFork:o,onFork:c,onSelectFork:u,busy:h,onOpenFile:f,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:y,onOpenSubagent:x,recoveringTurnId:C,onRecover:N,skills:j}){var $,L,F;Yu();const A=(($=MC(n))==null?void 0:$.id)??null,z=T.useMemo(()=>n.filter(U=>$Fn(U,A)),[n,A]),M=T.useMemo(()=>{const U=z.filter(H=>H.role==="user"&&!H.id.startsWith(sf));return dMn(a,n,U,H=>H.startsWith(sf))},[n,z,a]),D=T.useRef(new Set),[I,B]=T.useState(!1),G=T.useCallback(U=>z[U].id,[z]),q=T.useCallback(U=>{if(I)return z.map((ae,ie)=>ie);const H=new Set(VP(U));return z.forEach((ae,ie)=>{D.current.has(ae.id)&&H.add(ie)}),[...H].sort((ae,ie)=>ae-ie)},[z,I]),Q=uMn({count:z.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:G,estimateSize:()=>400,overscan:1,initialRect:{width:((L=t.current)==null?void 0:L.clientWidth)??0,height:((F=t.current)==null?void 0:F.clientHeight)??0},initialOffset:()=>{var U;return Math.max(0,z.length*400-(((U=t.current)==null?void 0:U.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:q});T.useLayoutEffect(()=>{const U=()=>Q.scrollToEnd();return r.current=U,i(),()=>{r.current=null}},[Q,r,i]),T.useEffect(()=>{const U=()=>{var ie;const H=window.getSelection();if(!H||H.isCollapsed||!H.rangeCount)return;const ae=H.getRangeAt(0);for(const ue of((ie=t.current)==null?void 0:ie.querySelectorAll("[data-message-id]"))??[])ae.intersectsNode(ue)&&ue.dataset.messageId&&D.current.add(ue.dataset.messageId)};return document.addEventListener("selectionchange",U),()=>document.removeEventListener("selectionchange",U)},[t]);const K=z.at(-1),Z=YFn(n),J=h?QP(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":I,onClick:()=>B(U=>!U),children:V9e()}),_.jsx("div",{className:"relative",style:{height:Q.getTotalSize()},children:Q.getVirtualItems().map(U=>{var re,V,oe,ce,me,ve;const H=z[U.index],ae=H.parts.find(Gm),ie=(V=(re=ae==null?void 0:ae.state)==null?void 0:re.input)==null?void 0:V.turnId,ue=ae?h||C!==null:!1;return _.jsx("div",{"data-index":U.index,"data-message-id":H.id,ref:Q.measureElement,className:"absolute left-0 w-full pb-4",style:{top:U.start},onClickCapture:Re=>{!(Re.target instanceof Element)||!Re.target.closest("[data-work-toggle]")||(s.current=!1,Q.setOptions({...Q.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(H.id),onFocusCapture:()=>D.current.add(H.id),children:_.jsx(HFn,{message:H,forkCount:(oe=M.get(H.id))==null?void 0:oe.count,forkIndex:(ce=M.get(H.id))==null?void 0:ce.index,forkPrevId:(me=M.get(H.id))==null?void 0:me.prevId,forkNextId:(ve=M.get(H.id))==null?void 0:ve.nextId,forkDisabled:!o,branchDisabled:h,onFork:c,onSelectFork:u,activePermissionId:A,pendingTailToolId:(J==null?void 0:J.messageId)===H.id?J.toolId:null,onOpenFile:f,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:y,onOpenSubagent:x,busy:ue,recoveringTurnId:ie===C?C:null,onRecover:N,skills:j,predictTextTail:h&&H===K&&H.role==="assistant"})},H.id)})})]})}),JFn=(e,n)=>e==="all"?!0:e==="archived"?n:!n;function R4(e){return e instanceof Element&&e.closest("[data-side-chat]")!==null}const kq=[{id:"active",label:Fbe,railLabel:rL},{id:"archived",label:kN,railLabel:kN},{id:"all",label:Wbe,railLabel:XD}];function eHn({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=Vi();return _.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[_.jsx($t,{size:"small",className:"rail-filter-btn",active:e!=="active",title:DN(),"aria-label":DN(),onClick:()=>r(i=>!i),children:_.jsx(z$,{size:13})}),t&&_.jsx("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",children:kq.map(i=>_.jsxs(yn,{onClick:()=>{n(i.id),r(!1)},children:[_.jsx("span",{children:i.label()}),e===i.id&&_.jsx(yi,{size:13})]},i.id))})]})}const tHn=14,nHn=500,rHn=1200;function Sq({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*tHn,nHn)}ms`},children:t},r))}):_.jsx(_.Fragment,{children:e})}function sHn({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:c,onDelete:u}){var N;const{open:h,setOpen:f,ref:p}=Vi(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[w,k]=T.useState(!1),[v,b]=T.useState(""),y=T.useRef(null);function x(){var j;b(((j=e.title)==null?void 0:j.trim())||""),k(!0)}function C(){var A;const j=v.trim();k(!1),j&&j!==(((A=e.title)==null?void 0:A.trim())||"")&&o(j)}return T.useEffect(()=>{var j,A;w&&((j=y.current)==null||j.focus(),(A=y.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] px-2.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":""} ${h?"menu-open":""} ${w?"editing":""}`,title:`${yu[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?J9e():""}`,onClick:()=>{w||(h?f(!1):a())},onKeyDown:j=>{j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),h?f(!1):a())},children:[e.parentSessionId&&!w&&_.jsx(FS,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),w?_.jsx("input",{ref:y,className:"session-title-input","aria-label":GSe(),value:v,onChange:j=>b(j.target.value),onClick:j=>j.stopPropagation(),onBlur:C,onKeyDown:j=>{j.stopPropagation(),j.key==="Enter"?(j.preventDefault(),C()):j.key==="Escape"&&(j.preventDefault(),k(!1))}}):_.jsx("span",{className:"session-title",children:_.jsx(Sq,{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:qN(),"aria-label":qN(),onClick:j=>{j.stopPropagation(),f(A=>!A)},children:_.jsx(Lm,{size:14})}),h&&_.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(yn,{onClick:j=>{j.stopPropagation(),f(!1),x()},children:_.jsx("span",{children:JD()})}),_.jsx(yn,{onClick:j=>{j.stopPropagation(),f(!1),c(!e.archived)},children:_.jsx("span",{children:e.archived?dNe():p0e()})}),_.jsx(yn,{danger:!0,onClick:j=>{j.stopPropagation(),f(!1),u()},children:_.jsx("span",{children:ZD()})})]})]})}const eM=[h$,N$,Of,Ah],iHn=()=>[{title:v6e(),prompt:_6e()},{title:R6e(),prompt:C6e()},{title:V6e(),prompt:B6e()},{title:aCe(),prompt:J6e()}],M4=[{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"}],tM="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function aHn(e,n){if(!e)return null;const t=e.model??null;return{...e,model:t,serviceTier:Hv(n,t,e.serviceTier),reasoningLevel:TI(n,t,e.reasoningLevel)}}function nM({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:i,onSelectMainView:a,onOpenFile:o,onOpenRun:c,runExperimentName:u,onOpenExperiment:h,experimentName:f,onOpenPlan:p,onOpenSubagent:m,runtime:w,onOpenDemoWelcome:k,composerFocusNonce:v=0,demoRunningRunId:b=null,activeSessionId:y,onActiveSessionChange:x,preferredAgent:C,onPreferredAgentChange:N,preferredAutonomy:j,onPreferredAutonomyChange:A,embedded:z=!1,onOpenSideChat:M,children:D}){var Ti,Fl,Rc,Lo,As,Yr,Jf;const I=gn({mutationFn:te=>X3n(...te)}),B=gn({mutationFn:te=>V3n(...te)}),G=gn({mutationFn:te=>Q3n(...te)}),q=gn({mutationFn:te=>W3n(...te)}),Q=gn({mutationFn:te=>F3n(...te)}),K=gn({mutationFn:te=>q3n(...te)}),Z=gn({mutationFn:te=>U3n(...te)}),J=gn({mutationFn:te=>G3n(...te)}),$=gn({mutationFn:H3}),L=T.useMemo(()=>Gi(e),[e]),{data:F=dFn}=_t(L),U=T.useCallback(te=>{Vr(L.queryKey,pe=>{if(!pe)return;const ze=typeof te=="function"?te(pe):te,Oe=new Map(pe.map(Pe=>[Pe.id,Pe]));for(const Pe of ze)Oe.get(Pe.id)!==Pe&&lo(et,L.queryKey,Pe.id),Oe.delete(Pe.id);for(const Pe of Oe.keys())lo(et,L.queryKey,Pe);return ze})},[L]),H=y,ae=T.useRef(x);ae.current=x;const ie=T.useRef({projectId:e});ie.current.projectId!==e&&(ie.current={projectId:e});const[ue,re]=T.useState(new Set),[V,oe]=T.useState("active"),[ce,me]=T.useState(""),[ve,Re]=T.useState(!1),[Fe,Xe]=T.useState(!1),[Te,$e]=T.useState([]),wt=T.useRef(0),ot=T.useRef({projectId:e,activeId:H,mainView:i});(ot.current.projectId!==e||ot.current.activeId!==H||ot.current.mainView!==i)&&(ot.current={projectId:e,activeId:H,mainView:i});const[Mt,jt]=T.useState([]),[Ft,Le]=T.useState(null),tt=H??"new",ke=T.useRef(new Map),ge=T.useRef(Kw);ge.current={draft:ce,attachments:Mt,annotations:Te};const Ne=e===Kp&&!z&&F.length>0&&F.every(te=>te.sideParentSessionId||Twn[te.id]===te.activeLeafId)?lj:null,qe=T.useRef(null);Ne!==null&&qe.current===null&&H!==null&&(qe.current=tt);const nt=tt===qe.current?Ne:null;T.useLayoutEffect(()=>{const te=ke.current.get(tt)??Kw;return ge.current=te,me(te.draft),jt(te.attachments),$e(te.annotations),()=>{const pe=SMn(ge.current,nt);pe?ke.current.set(tt,pe):ke.current.delete(tt)}},[tt,nt]);const[ht,rt]=T.useState(null),qt=T.useRef(Promise.resolve()),Xt=T.useRef(0),Jt=T.useRef(0),[an,At]=T.useState(null),bn=T.useRef(null),on=T.useRef(!1),Ot=T.useRef(null),[hn,cn,Sn]=I5n(e,i==="chat"?H:null),{data:Vn=cHn}=_t(Pu()),[hs,es]=T.useState(C);T.useEffect(()=>es(C),[C]);const[bt,ln]=T.useState({}),[xn,un]=T.useState(s0),[ur,Rn]=T.useState(null),Kn=T.useRef(!1),rr=T.useRef(null),[St,It]=T.useState(null),ir=T.useRef(!1),ar=T.useRef(null),[Tr,sr]=T.useState(new Map),Bn=T.useRef(new Map),Br=T.useRef(null),Ds=T.useRef(null),Pr=T.useRef(null),Us=T.useRef(!0),[We,ft]=T.useState(!0),Pn=T.useRef(null),[Wn,Ln]=T.useState(!1),En=Vi(),Rr=T.useCallback(te=>{var pe;wt.current+=1,$e(ze=>[...ze,{id:`annotation-${wt.current}`,...te}]),(pe=Pn.current)==null||pe.focus()},[]),_n=iFn(Ds,Rr);aFn(Te,z?XPn:QPn),T.useEffect(()=>{Ln(!1),_n.dismiss()},[H,e,_n.dismiss]);const[So,ci]=T.useState(0),[Ls,Fr]=T.useState(!1),[n_,Co]=T.useState(0),[Eo,Gs]=T.useState(0),Vs=T.useRef(!1);function Wi(te){if(!Mr)return;if(!_i&&te.source==="command"&&Gy(te.name)&&te.name!=="goal"){Sc(te.name,ce,Mr);return}const pe=te.name.replace(/@u$/,"^").replace(/@p$/,"~"),ze=te.source==="command"?1:qR(pe,Pn.current),Oe=CPn(ce,Mr,pe,ze);me(Oe.text),window.requestAnimationFrame(()=>{var Pe,yt;(Pe=Pn.current)==null||Pe.focus(),(yt=Pn.current)==null||yt.setSelectionRange(Oe.cursor,Oe.cursor),Gs(Oe.cursor)})}function Ks(te){if(Qi)return!1;const pe=te.selectionStart;if(Vs.current||pe!==te.selectionEnd)return!1;const ze=ce.slice(0,pe).replace(/[ \t]+$/,"").length,Oe=k4(ce,ze);if(!Oe||Oe.end!==ze||!Rl(Oe.query)||pe>ze&&pe-ze!==qR(Oe.query,te))return!1;const Pe=HR(ce,{...Oe,end:pe});return me(Pe.text),Gs(Pe.cursor),window.requestAnimationFrame(()=>te.setSelectionRange(Pe.cursor,Pe.cursor)),!0}function or(te){Le(null);let Oe=Mt.reduce((Pe,yt)=>Pe+yt.size,0);for(const Pe of te){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Pe.type))continue;if(Pe.size>31457280){Le(q0e({name:Ce(Pe.name)}));continue}if(Oe+Pe.size>41943040){Le(X0e());continue}Oe+=Pe.size;const yt=H,Kt=new FileReader;Kt.onload=()=>{const nn={dataUrl:Kt.result,mediaType:Pe.type,name:Pe.name,size:Pe.size};if(ot.current.activeId===yt){jt(mr=>[...mr,nn]);return}const pn=ke.current.get(yt??"new")??Kw;ke.current.set(yt??"new",{...pn,attachments:[...pn.attachments,nn]})},Kt.readAsDataURL(Pe)}}function Si(te){const pe=Array.from(te.clipboardData.items).filter(ze=>ze.kind==="file"&&(ze.type.startsWith("image/")||ze.type==="application/pdf")).map(ze=>ze.getAsFile()).filter(ze=>ze!==null);pe.length>0&&(te.preventDefault(),or(pe))}const Ct=F.find(te=>te.id===H),Na=hs??S8n(Vn),ts=Ct?{harness:Ct.harness,model:bt.model!==void 0?bt.model:Ct.model,serviceTier:bt.serviceTier!==void 0?bt.serviceTier:Ct.serviceTier,permissionMode:bt.permissionMode??Ct.permissionMode,reasoningLevel:bt.reasoningLevel??Ct.reasoningLevel}:Na?{...Na,...bt}:null,{data:Ws=oHn}=_t(N5n(ts==null?void 0:ts.harness,e)),ut=ts?Vn.find(te=>te.id===ts.harness):void 0,Pt=ut==null?void 0:ut.options,li=T.useMemo(()=>EPn(Ws,Pt==null?void 0:Pt.planActivation),[Ws,Pt==null?void 0:Pt.planActivation]),Ci=GR(ce),Ei=Ci!==null,Mr=k4(ce,Eo),ui=(Mr==null?void 0:Mr.query)??null,wc=ui===null?[]:li.filter(te=>kPn(te,ui)),Qi=!Ei&&ui!==null&&(Mr==null?void 0:Mr.end)===Eo&&wc.length>0,ns=Qi&&!Ls?wc:[],Qa=ns.length>0,Ni=Math.min(So,Math.max(0,ns.length-1));T.useEffect(()=>ci(0),[ui]);const Yt=aHn(ts,ut),zi=Ub(ut,Yt==null?void 0:Yt.model),jl=te=>{if(!Yt)return;const pe={...Yt,...te},ze={};te.model!==void 0&&te.model!==Yt.model&&(ze.model=te.model),te.serviceTier!==void 0&&te.serviceTier!==Yt.serviceTier&&(ze.serviceTier=te.serviceTier),te.permissionMode!==void 0&&te.permissionMode!==Yt.permissionMode&&(ze.permissionMode=te.permissionMode),te.reasoningLevel!==void 0&&te.reasoningLevel!==Yt.reasoningLevel&&(ze.reasoningLevel=te.reasoningLevel),un(Oe=>({...Oe,...ze})),es(pe),N(pe).catch(()=>{}),Ct?ln(Oe=>({...Oe,...te})):te.harness&&te.harness!==Yt.harness&&ln({})},In=T.useCallback(te=>{const pe=qt.current.catch(()=>{}).then(()=>{if(!Gn(L.queryKey))throw new DOMException("Workspace changed","AbortError");return te()});return qt.current=pe.then(()=>{},()=>{}),pe},[L]),_r=te=>{if(te==="plan"&&(ut==null?void 0:ut.id)==="claude-code"?(un(Oe=>({...Oe,permissionMode:te})),ln(Oe=>({...Oe,permissionMode:te}))):(ln(Oe=>{const Pe={...Oe};return delete Pe.permissionMode,Pe}),jl({permissionMode:te})),!Ct)return;const pe=Ct.id,ze=++Xt.current;rt(null),In(()=>I.mutateAsync([pe,te])).then(Oe=>{U(Pe=>Pe.map(yt=>yt.id===Oe.id?Oe:yt)),Xt.current===ze&&ln(Pe=>{const yt={...Pe};return delete yt.permissionMode,yt})}).catch(()=>{Xt.current===ze&&(ln(Oe=>{const Pe={...Oe};return delete Pe.permissionMode,Pe}),rt(MNe()))})},Is=te=>jl({reasoningLevel:te}),rs=te=>{if(!Ct){A(te);return}const pe=Ct.id,ze=Ct.autonomy,Oe=++Xt.current,Pe=yt=>U(Kt=>Kt.map(nn=>nn.id===yt.id?yt:nn));Pe({...Ct,autonomy:te}),rt(null),In(()=>G.mutateAsync([pe,te])).then(yt=>{Pe(yt),A(yt.autonomy)}).catch(()=>{U(yt=>yt.map(Kt=>Kt.id===pe&&Kt.autonomy===te?{...Kt,autonomy:ze}:Kt)),Xt.current===Oe&&rt(ENe())})},Qs=((Ti=Ct==null?void 0:Ct.goal)==null?void 0:Ti.trim())||"",Xi=(Yt==null?void 0:Yt.harness)==="claude-code"?Yt.permissionMode==="plan":(Pt==null?void 0:Pt.planActivation)==="command"?an??(Ct==null?void 0:Ct.planMode)??!1:!1;T.useEffect(()=>{an===null||(Ct==null?void 0:Ct.planMode)!==an||(bn.current=null,At(null))},[Ct==null?void 0:Ct.planMode,an]);async function Al(te){if(un(Oe=>({...Oe,planMode:te})),bn.current=te,At(te),!Ct)return;const pe=Ct.id,ze=++Jt.current;rt(null);try{const Oe=await In(()=>B.mutateAsync([pe,te]));U(Pe=>Pe.map(yt=>yt.id===Oe.id?Oe:yt)),Jt.current===ze&&(bn.current=null,At(null),rt(null))}catch(Oe){throw Jt.current===ze&&(bn.current=null,At(null)),Oe}}async function kc(){if((Yt==null?void 0:Yt.harness)==="claude-code"){_r("auto");return}if(Ct)try{await Al(!1)}catch{rt(gge())}}async function Hf(){const te=!Xi;try{if((Yt==null?void 0:Yt.harness)==="claude-code")_r(te?"plan":"auto");else if((Pt==null?void 0:Pt.planActivation)==="command")await Al(te);else throw new Error(i1())}catch{rt(WN())}}function No(te,pe=""){var ze;switch(te){case"plan":return Hf(),!1;case"new":return z?Ct!=null&&Ct.sideParentSessionId&&(M==null||M(Ct.sideParentSessionId,"")):Bl(),!1;case"resume":return Ln(!0),!0;case"model":return Co(Oe=>Oe+1),!0;case"compact":return Zi(),!1;case"goal":return Yi(pe),!1;case"side":return ss(pe),!1;case"copy":{const Oe=Xr.at(-1),Pe=Qn&&(Oe==null?void 0:Oe.role)==="assistant"&&!Oe.completedAt,yt=vMn(Pe?Xr.slice(0,-1):Xr);return yt?RC(yt):sn(Kve(),"info"),!1}case"export":{const Oe=((ze=Ct==null?void 0:Ct.title)==null?void 0:ze.trim())||Od(),Pe=Ct?bMn(Oe,Xr,{user:$ge(),assistant:yu[Ct.harness]}):null;return Pe?PFn(yMn(Oe),Pe):sn(ebe(),"info"),!1}}}function ss(te){z?sn(Aan(),"info"):!Ct||!M?sn(kan(),"info"):M(Ct.id,te)}async function r_(te){rt(null);const pe=ie.current;try{const ze=await Q.mutateAsync([e,te]);if(et.invalidateQueries({queryKey:LI().queryKey}),ie.current!==pe)return;U(Oe=>[ze,...Oe.filter(Pe=>Pe.id!==ze.id)]),oe("all"),x(ze.id,{projectId:ze.projectId})}catch(ze){if(ie.current!==pe)return;rt(R1e({error:Ce(ze instanceof Error?ze.message:String(ze))}))}}async function Yi(te){var Kt;const pe=te.trim();if(!pe){const nn=(Kt=Ct==null?void 0:Ct.goal)==null?void 0:Kt.trim();sn(nn?Zge({goal:ua(nn)}):_1e(),"info");return}const ze=ot.current,Oe=()=>ot.current.activeId===ze.activeId;rt(null);let Pe=H;if(!Pe){if(!(ut!=null&&ut.agentReady)||!Yt){rt(i1());return}try{Pe=(await Ll(Yt,C4(Pt==null?void 0:Pt.planActivation,void 0,bn.current))).id}catch(nn){rt(yN({error:Ce(nn instanceof Error?nn.message:String(nn))}));return}}const yt=/^(clear|none|off)$/i.test(pe);try{const nn=await In(()=>q.mutateAsync([Pe,yt?null:pe]));U(pn=>pn.map(mr=>mr.id===nn.id?nn:mr)),sn(yt?Gge():v1e(),"success")}catch(nn){if(!Oe())return;rt(yN({error:Ce(nn instanceof Error?nn.message:String(nn))}))}}async function Zi(){const te=H;if(!te){sn(Pve(),"info");return}if(Qn){rt(Ame());return}rt(null),V==="archived"&&oe("active");const pe=ot.current;try{const{message:ze}=await t5n(te);cn({type:"upsertMessage",sessionId:te,message:ze})}catch(ze){if(ot.current.activeId!==pe.activeId)return;rt(Ime({error:Ce(ze instanceof Error?ze.message:String(ze))}))}}function Sc(te,pe,ze){const Oe=HR(pe,ze);me(Oe.text),Fr(!0),!No(te)&&window.requestAnimationFrame(()=>{var Pe,yt;(Pe=Pn.current)==null||Pe.focus(),(yt=Pn.current)==null||yt.setSelectionRange(Oe.cursor,Oe.cursor),Gs(Oe.cursor)})}const Ns=T.useCallback(async(te=!1)=>{const pe=ie.current;if(pe.projectId!==e||!Gn(L.queryKey))return null;const ze=(et.getQueryData(L.queryKey)??[]).map(Oe=>Oe.id);try{const Oe=await et.fetchQuery({...L,...te?{staleTime:0}:{}});if(ie.current!==pe||!Gn(L.queryKey))return null;const Pe=Oe.filter(Kt=>!vl.has(Kt.id)),yt=new Set(Pe.map(Kt=>Kt.id));for(const Kt of ze)yt.has(Kt)||no(Kt);return Bn.current=new Map(Pe.map(Kt=>[Kt.id,Kt.title])),Pe}catch{return null}},[e]),za=T.useCallback(async te=>{ie.current.projectId!==e||!Gn(L.queryKey)||await Promise.all([et.fetchQuery({...ic(te),staleTime:0}),Ns(!0)]).catch(()=>{})},[e,Ns]);T.useEffect(()=>{const te=F$();re(e===Kp?new Set([Fb,Hb].filter(ze=>!te.has(ze))):new Set),Re(!1),Xe(!1),sr(new Map),Bn.current=new Map,Ns();const pe=ie.current;return()=>{ie.current===pe&&(ie.current={projectId:e})}},[e,Ns]),T.useEffect(()=>{un(s0),ar.current=null},[H]),T.useEffect(()=>Uv(te=>{switch(te.type){case"session":{if(te.session.projectId!==e||vl.has(te.session.id))return;const pe=Bn.current.has(te.session.id),ze=Bn.current.get(te.session.id)!==te.session.title;Bn.current.set(te.session.id,te.session.title),pe&&ze&&te.session.titleSource==="generated"&&(sr(Oe=>{const Pe=new Map(Oe);return Pe.set(te.session.id,(Oe.get(te.session.id)??0)+1),Pe}),window.setTimeout(()=>{sr(Oe=>{if(!Oe.has(te.session.id))return Oe;const Pe=new Map(Oe);return Pe.delete(te.session.id),Pe})},rHn));break}case"sessionDeleted":no(te.sessionId);break}}),[e]),T.useEffect(()=>Uv(te=>{te.type==="reconnected"&&Ns(!0)}),[Ns]);const Xa=H?hn.messagesBySession[H]??XR:XR,Ya=H?hn.activeLeafBySession[H]??null:null;rr.current=Ya;const Xr=T.useMemo(()=>_Mn(Xa,Ya),[Xa,Ya]),ps=T.useRef({projectId:e,ids:hn.busySessions});T.useEffect(()=>{const te=ps.current;ps.current={projectId:e,ids:hn.busySessions},te.projectId===e&&re(pe=>gMn(pe,te.ids,hn.busySessions,F,i==="chat"?H:null))},[e,hn.busySessions,F,H,i]);const Qn=H?hn.busySessions.has(H):!1,Tl=!Qn&&!!(ut!=null&&ut.agentReady),zo=Qn&&QP(Xr)!=null,op=Qn&&mMn(Xr),ji=H?hn.queuedBySession[H]??[]:[],jo=ji.some(te=>te.dispatchState==="retrying"),Za=ji.findIndex(te=>te.dispatchState==="blocked"),Ja=ji.reduce((te,pe)=>pe.dispatchState!=="retrying"||typeof pe.nextRetryAt!="number"?te:te===null?pe.nextRetryAt:Math.min(te,pe.nextRetryAt),null),[fn,ja]=T.useState(()=>Date.now());T.useEffect(()=>{if(!jo||Ja===null||(ja(Date.now()),Ja<=Date.now()))return;const te=window.setInterval(()=>{const pe=Date.now();ja(pe),pe>=Ja&&window.clearInterval(te)},1e3);return()=>window.clearInterval(te)},[jo,Ja]),T.useEffect(()=>{const te=ji.reduce((pe,ze)=>ze.planMode??pe,void 0);te!==void 0?(on.current=!0,bn.current=te,At(te)):on.current&&(on.current=!1,bn.current=null,At(null))},[ji]);const Ao=!!H&&!(H in hn.messagesBySession)&&Sn.isPending,Cc=T.useMemo(()=>{const te=new Set;for(const pe of hn.busySessions)(hn.messagesBySession[pe]??[]).some(ze=>ze.parts.some(Oe=>Oe.type==="prompt"&&Oe.prompt&&!Oe.prompt.resolved&&Oe.prompt.nativeId))&&te.add(pe);return te},[hn.busySessions,hn.messagesBySession]),Ec=H?Cc.has(H):!1,fr=Ct,s_=fr?Tr.get(fr.id):void 0,ms=T.useMemo(()=>{var te;for(let pe=Xr.length-1;pe>=0;pe--)for(const ze of Xr[pe].parts)if(ze.type==="prompt"&&((te=ze.prompt)==null?void 0:te.kind)==="plan"&&!ze.prompt.resolved)return{promptId:ze.id,plan:ze.prompt.plan??"",synthesized:!!ze.prompt.synthesized};return null},[Xr]),_i=T.useMemo(()=>H?hMn(Xr,fr==null?void 0:fr.harness,hn.busySessions.has(H)):null,[Xr,fr==null?void 0:fr.harness,H,hn.busySessions]),Ji=Ei&&!_i,Rl=te=>{if(_i||Ei)return!1;const pe=dk(te),ze=li.find(Oe=>Oe.name===zC(pe??te));return!ze||ze.source!=="command"?!!ze:pe&&S4(pe)?pe==="plan"||ce.trim().toLowerCase().startsWith(`/${te}`):ce.trim().toLowerCase()===`/${te}`},qf=T.useMemo(()=>li.filter(te=>te.source!=="command"),[li]),[Ai,Uf]=T.useState(null),Gf=Ai&&Ai.sessionId===H?Ai:null;T.useEffect(()=>{if(!Ai)return;const te=hn.busySessions.has(Ai.sessionId),pe=Ai.sessionId===H&&ms&&ms.promptId!==Ai.promptId;(!te||pe)&&Uf(null)},[Ai,ms,hn.busySessions,H]);const eo=T.useMemo(()=>MC(Xr),[Xr]),Vf=Qn&&!!(ut!=null&&ut.supportsSteering)&&!!(ut!=null&&ut.agentReady)&&!ms&&!_i&&!eo&&Mt.length===0&&Te.length===0,Xs=T.useMemo(()=>p&&H?(te,pe,ze)=>p(te,H,pe,ze):void 0,[p,H]),i_=T.useMemo(()=>m&&H?(te,pe,ze)=>m(H,te,pe,ze):void 0,[m,H]),Kf=T.useMemo(()=>o&&((te,pe,ze,Oe,Pe)=>o(te,H??void 0,pe,ze,Oe,Pe)),[o,H]);T.useEffect(()=>{Xt.current+=1,Jt.current+=1;const te=(H?hn.queuedBySession[H]??[]:[]).reduce((pe,ze)=>ze.planMode??pe,void 0);on.current=te!==void 0,bn.current=te??null,At(te??null),ln({}),rt(null)},[H]);const ea=i==="chat"&&(Xr.length>0||Qn),Ml=(Yt==null?void 0:Yt.harness)??null,a_=(Yt==null?void 0:Yt.model)??null,Nc=Sn.data?null:Sn.error,Ol=i==="chat"&&!z&&!ea&&!Ao&&!Nc,zc=_t({...tkn(e,Ml??"claude-code",a_,E()),enabled:Ol&&Ml!==null,subscribed:Ol&&Ml!==null}),o_=(Fl=zc.data)!=null&&Fl.blank?iHn():((Rc=zc.data)==null?void 0:Rc.prompts)??null,To=Ml!==null&&zc.isPending,jc=e===Kp?"demo":"project",Ro=te=>{me(te),Fr(!1),window.requestAnimationFrame(()=>{const pe=Pn.current;pe&&(pe.focus(),pe.setSelectionRange(te.length,te.length),Gs(te.length))})};T.useEffect(()=>{nt&&(me(te=>te||nt),Fr(!1),Gs(nt.length))},[nt]),T.useEffect(()=>{if(v===0)return;const te=window.requestAnimationFrame(()=>{const pe=Pn.current;pe&&(pe.focus(),pe.setSelectionRange(pe.value.length,pe.value.length),pe.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(te)},[v]);const Mo=T.useId(),Ac=e===Kp&&ce===lj&&!ve,gs=T.useCallback(te=>{const pe=te.scrollHeight-te.scrollTop-te.clientHeight<60;Us.current=pe,ft(pe)},[]),Aa=T.useCallback(()=>{var te;Us.current=!0,ft(!0),(te=Pr.current)==null||te.call(Pr)},[]);T.useEffect(()=>{const te=Br.current,pe=Ds.current;if(!te||!pe)return;const ze=new ResizeObserver(()=>{var Oe;Us.current?(Oe=Pr.current)==null||Oe.call(Pr):ft(te.scrollHeight-te.scrollTop-te.clientHeight<60)});return ze.observe(te),ze.observe(pe),()=>ze.disconnect()},[ea]);const Wf=T.useCallback(te=>{te.currentTarget.blur(),Aa()},[Aa]);async function Dl({queue:te=!1}={}){var Xn,vs,bs,$s,Ts,Oc;const pe=ce.trim(),ze=_i?null:NPn(pe,Pt==null?void 0:Pt.planActivation);if(ze&&ze.name!=="plan"){me(S4(ze.name)?"":ze.prompt),Fr(!1),No(ze.name,ze.prompt);return}if(bu({name:"first_action",surface:jc,action:"typed_prompt"}),ir.current)return;const Oe=!!ze,Pe=!Xi,yt=C4(Pt==null?void 0:Pt.planActivation,Oe?Pe:void 0,bn.current),Kt=Oe&&(ut==null?void 0:ut.id)==="claude-code"?Pe?"plan":"auto":void 0,nn=ze?ze.prompt:pe,pn=Mt,mr=Te,Mc=mr.map(wn=>({text:wn.text})),f_=e,d_=i;let h_=H;const Ri=()=>{const wn=ot.current;return Gn(L.queryKey)&&wn.projectId===f_&&wn.activeId===h_&&wn.mainView===d_},Y=()=>{Ri()&&(me(wn=>wn||pe),jt(wn=>wn.length?wn:pn),$e(wn=>wn.length?wn:mr))};if(Oe&&!nn&&pn.length===0&&mr.length===0){me(""),Fr(!1);try{if((ut==null?void 0:ut.id)==="claude-code")_r(Pe?"plan":"auto");else if((Pt==null?void 0:Pt.planActivation)==="command")await Al(Pe);else throw new Error(i1())}catch{rt(WN()),Y()}return}const _e=Yt?{...Yt,...Kt?{permissionMode:Kt}:{}}:null;Kt&&_r(Kt);let xe=null;const Me=bn.current;Oe&&(Pt==null?void 0:Pt.planActivation)==="command"&&(xe=++Jt.current,bn.current=Pe,At(Pe));const Ae=()=>{!Ri()||xe===null||Jt.current!==xe||(bn.current=Me,At(Me))};if(!nn&&pn.length===0&&mr.length===0)return;if((nn||mr.length>0)&&_i&&pn.length===0){me(""),$e([]),ro({promptId:_i,answers:[],note:nn||void 0,annotations:Mc}).then(wn=>{wn||Y()});return}const at=JSON.stringify({text:nn,images:pn.map(wn=>({mediaType:wn.mediaType,name:wn.name,dataUrl:wn.dataUrl})),annotations:Mc,settings:_e?{model:_e.model,serviceTier:_e.serviceTier,permissionMode:_e.permissionMode,planMode:yt,reasoningLevel:_e.reasoningLevel}:null}),Ke=((Xn=ar.current)==null?void 0:Xn.signature)===at?ar.current.id:`ct_${crypto.randomUUID()}`;if(ar.current={signature:at,id:Ke},Qn){if(!H||!(ut!=null&&ut.agentReady)){Ae();return}const wn=H;me(""),jt([]),$e([]),Le(null);const Rs=_e?{model:_e.model,serviceTier:_e.serviceTier,permissionMode:_e.permissionMode,planMode:(Pt==null?void 0:Pt.planActivation)==="command"?yt??(Ct==null?void 0:Ct.planMode):yt,reasoningLevel:_e.reasoningLevel}:{};Ri()&&ln({});const ta=pn.map(Yn=>({mediaType:Yn.mediaType,dataBase64:Yn.dataUrl.slice(Yn.dataUrl.indexOf(",")+1),name:Yn.name}));try{(vs=(await In(()=>q3(wn,nn,Rs,ta.length?ta:void 0,Mc,Ke,Vf&&!te&&!Oe?"steer":void 0))).turn)!=null&&vs.existing&&await za(wn),Ri()&&un(s0),((bs=ar.current)==null?void 0:bs.id)===Ke&&(ar.current=null)}catch{Ae(),Y()}return}if(!(ut!=null&&ut.agentReady)){Ae();return}if(!_e){Ae();return}let pt=H;try{me(Hn=>Hn===ce?"":Hn),jt(Hn=>Hn===pn?[]:Hn),$e(Hn=>Hn===mr?[]:Hn),Le(null),ir.current=!0;try{if(!pt){const cp=await Ll(_e,yt);pt=cp.id,h_=cp.id}if(!Gn(L.queryKey))return;const Hn=ic(pt);await et.fetchQuery({...Hn,...(($s=et.getQueryState(Hn.queryKey))==null?void 0:$s.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{ir.current=!1}if(!Gn(L.queryKey))return;cn({type:"optimisticUser",sessionId:pt,text:nn||j0e(),attachments:pn.map(Hn=>({url:Hn.dataUrl,mediaType:Hn.mediaType,name:Hn.name})),annotations:mr}),cn({type:"busy",sessionId:pt,busy:!0}),Ri()&&Aa(),Ri()&&V==="archived"&&oe("active");const wn=_e?{model:_e.model,serviceTier:_e.serviceTier,permissionMode:_e.permissionMode,planMode:yt,reasoningLevel:_e.reasoningLevel}:{};Ri()&&ln({});const Rs=pn.map(Hn=>({mediaType:Hn.mediaType,dataBase64:Hn.dataUrl.slice(Hn.dataUrl.indexOf(",")+1),name:Hn.name})),ta=pt;if(!ta)throw new Error(B9e());(Ts=(await In(()=>q3(ta,nn,wn,Rs.length?Rs:void 0,Mc,Ke))).turn)!=null&&Ts.existing&&await za(ta),Ri()&&un(s0),((Oc=ar.current)==null?void 0:Oc.id)===Ke&&(ar.current=null)}catch(wn){if(!Gn(L.queryKey)||(Y(),Ae(),!pt))return;const Rs=wn instanceof Error?wn.message:String(wn);if(!/session is busy/i.test(Rs)&&await et.fetchQuery({...Gi(e),staleTime:0}).then(Yn=>{var Hl;return!!((Hl=Yn.find(Hn=>Hn.id===pt))!=null&&Hl.busy)}).catch(()=>!1)){Ri()&&(me(Yn=>Yn===nn?"":Yn),jt(Yn=>Yn===pn?[]:Yn),$e(Yn=>Yn===mr?[]:Yn));return}cn({type:"busy",sessionId:pt,busy:!1}),cn({type:"localError",sessionId:pt,text:V1e({error:Ce(Rs)})})}}async function Ll(te,pe){const ze=ot.current,Oe=ie.current,Pe=await K.mutateAsync([e,te.harness,{model:te.model,serviceTier:te.serviceTier,permissionMode:te.permissionMode,planMode:pe,reasoningLevel:te.reasoningLevel,autonomy:j}]);return ie.current===Oe&&(U(yt=>[Pe,...yt.filter(Kt=>Kt.id!==Pe.id)]),et.getQueryData(L.queryKey)||Ns(!0)),ie.current===Oe&&ot.current===ze&&(ae.current(Pe.id,{replace:!0}),ot.current={...ze,activeId:Pe.id}),Pe}function Ta(){const te=PPn(ce);me(te),window.requestAnimationFrame(()=>{var pe,ze;(pe=Pn.current)==null||pe.focus(),(ze=Pn.current)==null||ze.setSelectionRange(te.length,te.length),Gs(te.length)})}async function Qf(){const te=Ci;if(!te)return;if(rt(null),Qn){rt(rme());return}const pe=ce,ze=ot.current;let Oe=H;const Pe=()=>{const pn=ot.current;return pn.projectId===ze.projectId&&pn.activeId===Oe&&pn.mainView===ze.mainView},yt=()=>{Pe()&&me(pn=>pn||pe)};me(""),Fr(!1);let Kt=H;if(!Kt){if(!(ut!=null&&ut.agentReady)||!Yt){yt(),rt(i1());return}try{const pn=C4(Pt==null?void 0:Pt.planActivation,void 0,bn.current);Kt=(await Ll(Yt,pn)).id,Oe=Kt,Pe()&&ln({})}catch(pn){yt();const mr=pn instanceof Error?pn.message:String(pn);Pe()&&rt(vN({error:Ce(mr)}));return}}Pe()&&V==="archived"&&oe("active");const nn=`${sf}shell-${Date.now()}`;cn({type:"localShell",sessionId:Kt,id:nn,command:te}),Pe()&&Aa();try{const{message:pn}=await n5n(Kt,te);cn({type:"upsertMessage",sessionId:Kt,message:pn})}catch(pn){const mr=pn instanceof Error?pn.message:String(pn);cn({type:"localShell",sessionId:Kt,id:nn,command:te,error:vN({error:Ce(mr)})})}}function c_(){H&&a5n(H).catch(()=>{rt(yEe())})}const Tc=T.useCallback(async(te,pe)=>{if(!(!H||Kn.current)){Kn.current=!0,rt(null),Rn(te);try{const ze=kMn({model:xn.model,serviceTier:xn.serviceTier,permissionMode:xn.permissionMode,planMode:xn.planMode,reasoningLevel:xn.reasoningLevel}),Oe=H;(await r5n(Oe,te,pe,ze)).turn.existing&&await za(Oe),un(s0)}catch{rt(R8e())}finally{Kn.current=!1,Rn(null)}}},[H,xn,za]),Il=T.useCallback((te,pe)=>{if(!H||Qn||!(ut!=null&&ut.agentReady))return;const ze=H;cn({type:"busy",sessionId:ze,busy:!0}),Aa(),In(()=>s5n(ze,te,pe)).catch(Oe=>{cn({type:"busy",sessionId:ze,busy:!1});const Pe=Oe instanceof Error?Oe.message:String(Oe);cn({type:"localError",sessionId:ze,text:V8e({error:Ce(Pe)})})})},[H,Qn,ut==null?void 0:ut.agentReady,Aa,In]),Xf=T.useCallback(te=>{if(!H||Qn)return;const pe=H,ze=rr.current;cn({type:"activeLeaf",sessionId:pe,leafId:te}),In(()=>i5n(pe,te)).catch(Oe=>{cn({type:"activeLeaf",sessionId:pe,leafId:ze});const Pe=Oe instanceof Error?Oe.message:String(Oe);cn({type:"localError",sessionId:pe,text:NEe({error:Ce(Pe)})})})},[H,Qn,In]);function to(te){if(!H)return;const pe=H;Z3n(pe,te).then(({removed:ze})=>{if(ze)return za(pe)}).catch(()=>rt(B8e()))}async function Oo(te){if(!H||St)return;const pe=H;rt(null),It(te);try{await J3n(pe,te),await za(pe)}catch{rt(a9e())}finally{It(null)}}const $l=T.useRef(!1);T.useEffect(()=>{const te=pe=>{$l.current=R4(pe.target)};return document.addEventListener("pointerdown",te,!0),()=>document.removeEventListener("pointerdown",te,!0)},[]),T.useEffect(()=>{if(!Qn||i!=="chat")return;function te(pe){var Oe;pe.key!=="Escape"||pe.defaultPrevented||(pe.target===document.body?$l.current:R4(pe.target))!==z||(pe.preventDefault(),c_(),(Oe=Pn.current)==null||Oe.focus())}return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Qn,H,i,z]);function no(te){Bb(te),ke.current.delete(te),qe.current===te&&(qe.current=null),ot.current.projectId===e&&ot.current.activeId===te&&ot.current.mainView==="chat"&&(me(""),jt([]),$e([]),ae.current(null,{replace:!0})),re(pe=>{if(!pe.has(te))return pe;const ze=new Set(pe);return ze.delete(te),ze}),Bn.current.delete(te)}function Yf(te,pe){const ze=te.archived;U(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,archived:pe}:Pe)),Z.mutateAsync([te.id,pe]).catch(()=>{U(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,archived:ze}:Pe))})}function l_(te,pe){const ze=te.title;U(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,title:pe}:Pe)),J.mutateAsync([te.id,pe]).catch(()=>{U(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,title:ze}:Pe))})}async function Do(te){var ze;const pe=((ze=te.title)==null?void 0:ze.trim())||Od();if(window.confirm(rge({title:ua(pe)}))){try{await $.mutateAsync(te.id)}catch(Oe){sn(uge({title:ua(pe),error:Ce(Oe instanceof Error?Oe.message:String(Oe))}),"error");return}no(te.id)}}const ro=T.useCallback(te=>{if(!H)return Promise.resolve(!1);const pe=H;return cn({type:"busy",sessionId:pe,busy:!0}),In(()=>o5n(pe,te)).then(()=>!0).catch(()=>!1).finally(()=>{Gn(L.queryKey)&&(et.fetchQuery({...ic(pe),staleTime:0}).catch(()=>{}),et.fetchQuery({...Gi(e),staleTime:0}).catch(()=>{}))})},[H,e,In,L]),u_=F.filter(te=>!te.sideParentSessionId&&JFn(V,te.archived)),zs=/Mac|iPhone|iPad/.test(navigator.platform),Fn=zs?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",__=zs?"⌘ Enter":"Ctrl + Enter",Bl=T.useCallback(()=>{oe("active"),x(null)},[x]),Pl=T.useCallback(te=>{oe("all"),x(te)},[x]);T.useEffect(()=>{if(z)return;const te=pe=>{pe.repeat||pe.key!=="Enter"||!pe.metaKey&&!pe.ctrlKey||pe.altKey||!pe.shiftKey||R4(pe.target)||(pe.preventDefault(),Bl())};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Bl,z]);const Zf=_.jsxs("aside",{className:"session-rail w-68 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]:overflow-y-auto [&_.rail-body]:pt-0 [&_.rail-body]:pb-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,_.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":Fn,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Bl,children:[_.jsx(Xh,{size:15}),y3e()]}),_.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 ${i==="skills"?"active":""}`,onClick:()=>a("skills"),children:[_.jsx(d$,{size:15}),M2e()]}),vPn.map(te=>_.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 ${i!=="chat"&&i!=="skills"&&te.activeTabs.includes(i)?"active":""}`,"data-onboarding":te.id==="compute"?"nav-compute":void 0,onClick:()=>a(te.id),children:[te.icon,te.label()]},te.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:((Lo=kq.find(te=>te.id===V))==null?void 0:Lo.railLabel())??rL()}),_.jsx("div",{className:"rail-section-actions flex items-center gap-0.5",children:_.jsx(eHn,{value:V,onChange:oe})})]}),_.jsxs("div",{className:"rail-body",children:[u_.map(te=>_.jsx(sHn,{session:te,active:te.id===H&&i==="chat",unread:ue.has(te.id),busy:hn.busySessions.has(te.id),waiting:Cc.has(te.id),revealTitle:Tr.get(te.id),onOpen:()=>{if(x(te.id),e===Kp){D7n(te.id);const pe=Awn[te.id];pe&&(bu({name:"demo_experiment_started",kind:"curated",experiment:pe}),bu({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:pe=>l_(te,pe),onSetArchived:pe=>Yf(te,pe),onDelete:()=>void Do(te)},te.id)),u_.length===0&&_.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:V==="archived"?Eve():F.length>0?fve():Mve()})]}),_.jsx(xB,{runtime:w})]}),js="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",Or=!r&&!z&&_.jsx($t,{title:UN(),"aria-label":UN(),onClick:s,className:"mac-titlebar:ms-16",children:_.jsx(C$,{size:20})});return i!=="chat"?_.jsxs(_.Fragment,{children:[r&&Zf,_.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&_.jsx("div",{className:"flex h-12 shrink-0 items-center",children:Or}),_.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:D})]})]}):_.jsxs(_.Fragment,{children:[r&&Zf,_.jsxs("section",{"data-side-chat":z||void 0,className:`chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 ${z?"":"mt-5"}`,children:[_.jsxs("div",{className:r||z?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] mac-titlebar:grid-cols-[6rem_minmax(0,1fr)_6rem] items-center",children:[Or,_.jsxs("div",{className:js,children:[_.jsx(H0,{variant:"header",title:fr?((As=fr.title)==null?void 0:As.trim())||Od():xN(),children:fr?_.jsx(Sq,{title:((Yr=fr.title)==null?void 0:Yr.trim())||Od(),animate:s_!==void 0},s_??"static"):xN()}),k&&_.jsx($t,{"data-tip":wN(),"aria-label":wN(),onClick:k,children:_.jsx(m6n,{size:15})})]})]}),Nc?_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[_.jsx("p",{children:Nc.message}),_.jsx(Ie,{onClick:()=>void Sn.refetch(),children:si()})]}):Ao?_.jsxs("div",{className:"chat-loading flex-1 flex items-center justify-center gap-3 text-subtext text-xl p-5 [&_.spinner]:w-5.5 [&_.spinner]:h-5.5 [&_.spinner]:border-[3px]","aria-live":"polite","aria-busy":"true",children:[_.jsx(Nt,{}),_.jsx("span",{children:d3e()})]}):!ea&&(fr!=null&&fr.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(B0,{size:22}),_.jsx("p",{className:"m-0 text-balance",children:man()})]}):ea?_.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:Br,tabIndex:0,role:"region","aria-label":((Jf=fr==null?void 0:fr.title)==null?void 0:Jf.trim())||Od(),onScroll:te=>{gs(te.currentTarget),_n.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:Ds,children:[_.jsx(FH,{projectId:e,sessionId:H,children:_.jsx(ZFn,{scrollRef:Br,scrollToEndRef:Pr,stickToBottom:Us,onPinToBottom:Aa,messages:Xr,allMessages:Xa,canFork:Tl,onFork:Il,onSelectFork:Xf,busy:Qn,onOpenFile:Kf,onOpenRun:c,onOpenSpawnedSession:Pl,runExperimentName:u,onOpenExperiment:h,experimentName:f,onRespond:ro,onOpenPlan:Xs,onOpenSubagent:i_,recoveringTurnId:ur,onRecover:Tc,skills:qf},H)}),Qn&&Ec&&_.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:d7e()}),Qn&&!Ec&&!zo&&!op&&_.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(QS,{})}),_.jsx("h2",{children:y7e()}),_.jsxs("div",{className:"chat-empty-project inline-flex items-center gap-[7px] mt-3 py-1.5 px-3 border border-border rounded-full text-subtext bg-surface text-lg font-medium",children:[_.jsx(Fu,{size:19}),_.jsx("span",{children:n})]}),To&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:tM,"aria-hidden":"true",children:eM.map((te,pe)=>_.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 ${M4[pe].box}`,children:[_.jsxs("span",{className:`flex w-full items-center gap-2.5 ${M4[pe].icon}`,children:[_.jsx(te,{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"})]},pe))}),_.jsxs(Qr,{className:"mt-3",role:"status",children:[_.jsx(Nt,{}),_.jsx("span",{children:dCe()})]})]}),o_&&o_.length>0&&_.jsx("div",{className:tM,role:"group","aria-label":yCe(),children:o_.map((te,pe)=>{const ze=eM[pe],Oe=M4[pe];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 ${Oe.box}`,onClick:()=>{bu({name:"project_starter_clicked",slot:pe+1}),bu({name:"first_action",surface:jc,action:"starter_click"}),Ro(te.prompt)},children:[_.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[_.jsx(ze,{size:17,className:Oe.icon}),te.title]}),_.jsx("span",{className:"w-full truncate text-sm text-subtext",children:te.prompt})]},pe)})})]}),_n.action&&_.jsxs(Ie,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:_n.action.x,top:_n.action.top,transform:"translateX(-50%)"},onMouseDown:te=>te.preventDefault(),onClick:_n.add,children:[_.jsx(S$,{size:14}),xye()]}),_.jsxs("div",{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:[ea&&_.jsx($t,{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 ${We?"opacity-0":"opacity-100"}`,title:KN(),"aria-label":KN(),inert:We,onClick:Wf,children:Qn&&!Ec?_.jsx(Lm,{size:18,className:"tool-running-shimmer-icon"}):_.jsx(JSn,{size:16})}),ms&&!(Gf&&ms.promptId===Gf.promptId)&&_.jsx(SBn,{synthesized:ms.synthesized,agentLabel:fr?yu[fr.harness]:OEe(),showResumeModes:(fr==null?void 0:fr.harness)==="claude-code",onView:te=>Xs==null?void 0:Xs(ms.plan,ms.promptId,te),onApprove:te=>ro({promptId:ms.promptId,approve:!0,...te?{resumeMode:te}:{}}),onReject:()=>ro({promptId:ms.promptId,approve:!1}),onRevise:te=>{H&&Uf({sessionId:H,promptId:ms.promptId}),ro({promptId:ms.promptId,approve:!1,note:te})}}),ji.length>0&&_.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:ji.map((te,pe)=>_.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:te.error?`${te.text} +`).trim()}function PHn(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 FHn(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=YOn(r),jq(r)}function jq(e){return qHn(e).replace(/[\t\r ]+/g," ").trim()}function HHn(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&&Tq(s)?{ref:r,path:s}:null}function KHn(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 lM(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 VHn(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=lM(s,o);if(!c)return null;s=c}return s?lM(s,e):e}const Qo="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",WHn=new RegExp(`\\bchat_(${Qo})\\b`,"gi"),af=`(?:${Qo}|[0-9a-f]{8})`;function th(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 h=1,f=null,p=!1;for(let m=u;m{let h=!1;for(let f=u;feDn(t.raw,n))}function Ba(e,n){return Yy(e,n).length>0}function QHn(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,Nq).matchAll(WHn))if(n.add(t[0].toLowerCase()),n.size>=Vu)break;return[...n]}function Ck(e,n){if(!e)return[];const t=new Set,r=e.slice(0,Nq),s=n==="runs"?[new RegExp(`/runs/(${Qo})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${Qo})`,"gi"),new RegExp(`^\\s*RUN\\s+(${Qo})\\b`,"gim"),new RegExp(`={3,}\\s*(${Qo})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${Qo})`,"gi"),new RegExp(`^\\s*id:\\s*(${Qo})`,"gim"),new RegExp(`={3,}\\s*(${Qo})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=Vu)return[...t];const i=new RegExp(`^\\s*(${Qo})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=Vu)break;return[...t]}function Mq(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 Oq(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 Dq(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 XHn(e,n,t=[],r=[]){const s=Yy(e,"logs"),i=new Set;if(s.length===0){if(!Ba(e,"logs"))return[];const o=t.length>0?[]:Ck(n,"runs");for(const c of t.length>0?t:o.length>0?o:r)if(i.add(c),i.size>=Vu)break;return eh([...i])}let a=!1;for(const{invocation:o,offset:c}of Mq(e,s)){const u=Dh(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const h=u.slice(1);let f=null;for(let v=0;v0?[]:Ck(n,"runs"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Vu)break}return eh([...i])}function Ad(e,n,t=[],r=[]){const s=Yy(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:c}of Mq(e,s)){const u=Dh(o.raw),h=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let f=!1;h&&new RegExp(`^${af}$`,"i").test(h)&&(i.add(h),f=!0);const p=h?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(h):null;if(p){const m=p[1],w=Oq(e,m,c,af);if(w.length>0){for(const v of w)i.add(v);f=!0}const k=Dq(e,m,c,af);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?[]:Ck(n,"experiments"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Vu)break}return eh([...i])}const uM=new WeakMap;function xf(e){const n=E(),t=uM.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=YHn(e);return uM.set(e,{locale:n,activity:r}),r}function YHn(e){var b,y,x,C,N,j;const n=e.tool??"tool",t=((b=e.state)==null?void 0:b.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=Js(i,"command","cmd"),o=BHn(i,"commandArgv"),c=((y=e.state)==null?void 0:y.output)||((x=e.state)==null?void 0:x.error),u=eh(O4(i,"targetIds")),h=eh(O4(i,"runTargetIds")),f=eh(O4(i,"experimentTargetIds")),p=Js(i,"filePath","file_path","notebookPath","notebook_path","path"),m=Js(i,"description"),w=n.toLowerCase().split(/(?::|\.|__)+/),k=w.at(-1)??n.toLowerCase();if(k==="run"&&w.includes("web")){const A=M4(i,"search_query","q"),z=M4(i,"image_query","q"),M=M4(i,"find","pattern");return A?{kind:"web",label:wN({query:A})}:z?{kind:"web",label:qae({query:z})}:M?{kind:"web",label:joe({pattern:M})}:Array.isArray(i.open)?{kind:"web",label:D5e()}:Array.isArray(i.weather)?{kind:"web",label:nwe()}:Array.isArray(i.finance)?{kind:"web",label:H2e()}:Array.isArray(i.sports)?{kind:"web",label:Q2e()}:Array.isArray(i.time)?{kind:"web",label:D2e()}:{kind:"web",label:BN()}}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:jke()};const A=FHn(a??(o==null?void 0:o.join(" "))??""),z=th(A);let M=z.map(K=>K.raw);if(o!=null&&o.length){const K=JOn(o);M=K===null?[o]:th(jq(K)).map(oe=>oe.raw)}let D=null;for(const K of M)if(D=tDn(K),D)break;const I=M.some(K=>{const oe=Dh(K);return oe!==null&&oe[0]!=="discover"&&oe[0]!=="paper"});if(D&&!I){const K=D.kind==="discover"?{keyword:uae(),embedding:gae(),openalex:loe(),biorxiv:Sae(),pubmed:moe()}[D.strategy]:null,oe=D.kind==="discover"?D.query?Vne({activity:K??xN(),query:D.query}):K??xN():D.id?Vp({target:Ce(D.id)}):kse();return{kind:D.kind==="paper"?"read":"search",label:oe,litCall:D}}if(Ba(A,"agent\\s+spawn"))return{kind:"agent",label:Fwe(),spawnedSessionIds:QHn(c),litCall:D??void 0};const B=z.map(K=>Rq(K.raw)),G=Ba(A,"exp\\s+status"),U=Ba(A,"exp\\s+desc"),Q=Yy(A,"exp\\s+desc").some(K=>(Dh(K.raw)??[]).some(ce=>ce==="--set"||ce.startsWith("--set=")||ce==="--stdin")),V=Q?Sce():mse(),Z=Q?vte():Aie();if(Ba(A,"logs")){const K=XHn(A,c,h,u);return{kind:"project",label:K.length===1?mie():kie(),runIds:K,litCall:D??void 0}}if(Ba(A,"exp\\s+run"))return{kind:"project",label:J6e(),litCall:D??void 0};if(Ba(A,"exp\\s+wait"))return{kind:"project",label:t8e(),litCall:D??void 0};if(Ba(A,"exp\\s+cancel"))return{kind:"project",label:t2e(),litCall:D??void 0};const J=Ba(A,"project\\s+view");if(J&&G&&U)return{kind:"project",label:Z,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(J&&U)return{kind:"project",label:V,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(J&&G)return{kind:"project",label:PN(),experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(J)return{kind:"project",label:rSe(),litCall:D??void 0};if(G&&U)return{kind:"project",label:Z,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(G)return{kind:"project",label:PN(),experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(U)return{kind:"project",label:V,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(Ba(A,"runs?"))return{kind:"project",label:W3e(),litCall:D??void 0};if(Ba(A,"projects"))return{kind:"project",label:t5e(),litCall:D??void 0};if(Ba(A,"compute"))return{kind:"project",label:p2e(),litCall:D??void 0};const $=B.map(GHn).find(K=>K!=null);if($){const K=R4($.path);return{kind:K?"skill":"read",label:K?lw({name:Ce(K)}):Vp({target:Ce(D_($.path))}),filePath:$.path,fileRef:$.ref,labelTarget:K?`${K} skill`:D_($.path)}}const L=B.findIndex(K=>K!=null&&["sed","cat","head","tail"].includes(K.name)),q=L>=0?B[L]:null,P=q?UHn(q):null,F=P?VHn(P,z,L,Js(i,"cwd","workdir")):null;if(P&&F){const K=R4(F);return{kind:K?"skill":"read",label:K?lw({name:Ce(K)}):Vp({target:Ce(D_(P))}),filePath:F,labelTarget:K?`${K} skill`:D_(P)}}if(B.some(K=>(K==null?void 0:K.name)==="find"||(K==null?void 0:K.name)==="ls"||(K==null?void 0:K.name)==="rg"&&K.args.includes("--files")))return{kind:"search",label:XN()};const re=B.findIndex(K=>(K==null?void 0:K.name)==="rg"||(K==null?void 0:K.name)==="grep");if(re>=0){const K=KHn(z[re].raw);return{kind:"search",label:K?_w({pattern:Ce(K)}):uw(),searchPattern:K??void 0}}const ie=B.find(K=>(K==null?void 0:K.name)==="git"),ue=ie==null?void 0:ie.args[0];if(ue==="grep"){const K=ie==null?void 0:ie.args.slice(1).find(oe=>!oe.startsWith("-"));return{kind:"search",label:K?_w({pattern:Ce(K)}):uw(),searchPattern:K}}if(ue==="status")return{kind:"command",label:z2e()};if(ue==="diff")return{kind:"command",label:t6e()};if(ue==="log")return{kind:"command",label:Xke()};const se=K=>B.some(oe=>!oe||!["cargo","pnpm","npm","yarn"].includes(oe.name)?!1:oe.args[0]===K||oe.args[0]==="run"&&oe.args[1]===K);return se("test")?{kind:"command",label:Lke()}:B.some(K=>(K==null?void 0:K.name)==="tsc")||se("typecheck")?{kind:"command",label:lwe()}:se("lint")?{kind:"command",label:c2e()}:se("build")?{kind:"command",label:Fxe()}:{kind:"command",label:Qre({command:Ce(A)})}}case"skill":{const A=Js(i,"skill","name"),z=A?$Hn(n,A):null;return{kind:"skill",label:A?zre({name:Ce(A)}):xre(),filePath:z??void 0,labelTarget:z&&A?`${A} skill`:void 0}}case"read":{const A=p?D_(p):null,z=p?R4(p):null;return z?{kind:"skill",label:lw({name:Ce(z)}),filePath:p??void 0,labelTarget:`${z} skill`}:A?{kind:"read",label:Vp({target:Ce(A)}),filePath:p??void 0,labelTarget:A}:{kind:"read",label:qke()}}case"edit":case"write":case"notebookedit":{const A=PHn(i),z=p??(A==null?void 0:A.path)??null,M=z?D_(z):null,D=M?(A==null?void 0:A.type)==="add"?Zte({target:Ce(M)}):(A==null?void 0:A.type)==="delete"?bne({target:Ce(M)}):Mne({target:Ce(M)}):null;return M?{kind:"edit",label:D??KN(),filePath:z??void 0,labelTarget:M}:{kind:"edit",label:KN()}}case"grep":{const A=Js(i,"pattern");return{kind:"search",label:A?_w({pattern:Ce(A)}):uw(),searchPattern:A??void 0}}case"glob":{const A=Js(i,"pattern");return{kind:"search",label:A?ore({pattern:Ce(A)}):XN()}}case"websearch":{const A=Js(i,"query"),z=Js(i,"url"),M=Js(i,"pattern");return A?{kind:"web",label:wN({query:A})}:M&&z?{kind:"web",label:noe({pattern:M})}:z?{kind:"web",label:Hre({target:Ce(z)})}:{kind:"web",label:m??BN()}}case"webfetch":{const A=Js(i,"url");return{kind:"web",label:A?Vp({target:Ce(A)}):m??Hse()}}case"task":return{kind:"agent",label:m??nse()};case"subagent":return{kind:"agent",label:ZHn(i)};case"error":return{kind:"command",label:D7e()};case"importedchat":return{kind:"project",label:ere()};case"contextcompaction":return{kind:"command",label:((C=e.state)==null?void 0:C.status)==="error"?Gte():((N=e.state)==null?void 0:N.status)==="running"?yN():Rte(),progressLabel:yN()};default:{const A=m??p??a??((j=e.state)==null?void 0:j.title)??"";return{kind:"command",label:A?`${n}: ${A}`:n}}}}function ZHn(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 Cte()}switch(typeof e.kind=="string"?e.kind:""){case"started":return gce();case"interacted":return Yee();case"interrupted":return uce()}return rce()}function vb({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=_.jsx(Mf,{...t});if(e.litCall)r=_.jsx(bF,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=_.jsx(z$,{...t});break;case"read":case"project":r=_.jsx(j$,{...t});break;case"search":r=_.jsx(H$,{...t});break;case"edit":r=_.jsx(KS,{...t});break;case"web":r=_.jsx(b7n,{...t});break;case"agent":r=_.jsx(XS,{...t});break}return _.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function D4({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?Wr(h=>n(c.id,h),{stopPropagation:!0}):{onClick:h=>{h.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?tZ({target:r}):Aee({count:Jt(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),o.current=!s&&c.detail===0,i(u=>!u)},children:s?vL():BAe({count:Jt(e.length)})})]})}function Ek({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,c,u,h;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:cDn(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,_.jsx(kCn,{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,...Wr(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:TN({number:Jt(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:z5e(),onClick:v=>{v.preventDefault(),v.stopPropagation(),r(w)},children:TN({number:Jt(k+1)})})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(D4,{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))||rl()}));return _.jsxs(_.Fragment,{children:[e.label," — ",p.map((w,k)=>_.jsxs("span",{children:[k>0&&", ",t?_.jsx("button",{className:"tool-target",title:nJ({run:Ce(w)}),...Wr(v=>t(w,v),{stopPropagation:!0}),children:(s==null?void 0:s(w))||rl()}):_.jsx("span",{children:(s==null?void 0:s(w))||rl()})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(D4,{items:m,onOpen:t,targetType:cEe()})]})]})}if((h=e.experimentIds)!=null&&h.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))||rl()}));return _.jsxs(_.Fragment,{children:[e.label," — ",p.map((w,k)=>_.jsxs("span",{children:[k>0&&", ",i?_.jsx("button",{className:"tool-target",title:DZ({name:(a==null?void 0:a(w))||Ce(w)}),...Wr(v=>i(w,v),{stopPropagation:!0}),children:(a==null?void 0:a(w))||rl()}):_.jsx("span",{children:(a==null?void 0:a(w))||rl()})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(D4,{items:m,onOpen:i,targetType:E1e()})]})]})}return e.label}function UC(e){const n=e.progressLabel??{skill:Dre(),read:Qse(),search:Loe(),edit:Pne(),project:Iie(),web:_te(),agent:fne(),command:iL()}[e.kind];return{...e,label:n}}function Lq(e,n){const t=xf({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:hre(),read:lse(),search:rae(),edit:Ene(),project:lie(),web:ste(),agent:ine(),command:Uie()}[t.kind]}function JHn(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const eqn=250;function tqn(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=eqn-(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 nqn=160;function Iq(e){const[n,t]=T.useState(!1);return T.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),nqn);return()=>window.clearTimeout(r)},[e]),e&&n}function rqn(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:dL()}}function sqn(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])}function iqn(e){const n=[];let t=null;for(const r of e){const s=xf(r),i=sqn(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 $q({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 b=Date.now();c(b),b>=a&&window.clearInterval(v)},1e3);return()=>window.clearInterval(v)},[a]),e.id==="turn-retry"){const v=GOn(i??{},o);return _.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[_.jsx(St,{}),_.jsx("span",{children:v})]})}const u=gF(i==null?void 0:i.recoveryAction),h=i==null?void 0:i.turnId,f=mF(e)?Wve():s?NEe():lz(),p=s?d7n:QS,m=Xy(((k=e.state)==null?void 0:k.error)||lz());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(Ka,{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&&h&&(u==="retry"||u==="continue")&&_.jsx(Ie,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(h,u),children:t?tNe():u==="retry"?ni():Bge()})]})}function _M({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}){const u=e.state,h=(u==null?void 0:u.status)==="error",f=Xy((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=h&&!!f,[m,w]=T.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return _.jsx($q,{part:e,busy:!1,recovering:!1,usageLimited:G5(e)});const v=_.jsxs(_.Fragment,{children:[h&&_.jsxs("span",{className:"sr-only",children:[vS()," "]}),h?_.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:_.jsx(R$,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):_.jsx(vb,{activity:n,className:"text-muted"}),_.jsxs("span",{className:`${Cq} ${h?"text-accent-red":"text-subtext"}`,children:[_.jsx(Ek,{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:pZ({count:Jt(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?cZ({activity:n.label}):kee({activity:n.label}),onClick:()=>w(b=>!b),children:_.jsx(Ka,{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:HC,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 aqn({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var z,M,D,I;const[c,u]=T.useState(!1),[h,f]=T.useState(!1),p=()=>{f(!0),u(B=>!B)},m=iqn(e),w=m.map(({activity:B})=>B),k=n?m.at(-1):void 0,v=k==null?void 0:k.part,b=k==null?void 0:k.activity,y=((z=v==null?void 0:v.state)==null?void 0:z.status)!=="error"?(b&&UC(b))??null:null,x=!!v&&((M=v.state)==null?void 0:M.status)==="running"&&!(y!=null&&y.progressLabel)&&(JHn((D=v.state)==null?void 0:D.input)||(y==null?void 0:y.kind)==="command"&&!Js(((I=v.state)==null?void 0:I.input)??{},"command","cmd")),C=tqn(y,x),N=Iq(C!=null),j=C??rqn(w),A=C?C.label:dL();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(vb,{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(Ek,{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(_M,{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(vb,{activity:j,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(Ek,{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?vge():b1e(),children:_.jsx(Ka,{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:h&&m.map(({part:B,count:G,activity:U})=>_.jsx(_M,{part:B,repeatCount:G,activity:U,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o},B.id))})})})]})}function oqn({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var h;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:Q5e(),icon:bi,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:mke(),icon:KS,iconClass:"text-accent-amber"}:s.approved===!1?{label:nke(),icon:xr,iconClass:"text-accent-red"}:{label:lke(),icon:Qb,iconClass:"text-muted"},w=m.icon;return _.jsxs("details",{className:DHn,children:[_.jsxs("summary",{children:[_.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?pL():az()}),_.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(Ka,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),_.jsxs("div",{className:`${oM} 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(qC,{annotations:p,variant:"sent"}),_.jsxs("details",{className:OHn,children:[_.jsxs("summary",{children:[_.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||e9e()}),_.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||W9e()})]}),_.jsxs("div",{className:oM,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?F8e():az()}),_.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",...Wr(p=>r(s.plan??"",e.id,p)),children:W7e()}),!o&&!f&&_.jsxs("div",{className:Sk,children:[_.jsx(Ie,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:wye()}),_.jsx(Ie,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:jye()}),_.jsx(Ie,{size:"small",onClick:()=>c({approve:!1}),children:uSe()})]})]})}if(s.kind==="permission"){const f=s.toolInput??{},p=Js(f,"command","cmd","filePath","file_path","path")||"",m=typeof((h=s.toolInput)==null?void 0:h.reason)=="string"&&s.toolInput.reason||"",w=Js(f,"description")||"",k=m||w||Lq(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(QS,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),_.jsx("span",{id:v,className:"text-base font-semibold text-text",children:rxe()})]}),_.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(Ie,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:b4e()}),_.jsx(Ie,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:Xye()})]})]})]})}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:LHn,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:Sk,children:_.jsx(Ie,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>c({answers:i}),children:z7e()})})]})}function cqn(e,n){return e.role==="user"?!0:e.parts.some(t=>Oh(t,n))}function lqn(e){const n=e.text??"",t=n.startsWith("data:")?n:ykn(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 GC(e){try{if(!navigator.clipboard)throw new Error(kL());await navigator.clipboard.writeText(e),Zt(uf(),"success")}catch(n){Zt(n instanceof Error?n.message:String(n),"error")}}function uqn(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 _qn({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:i,onSelect:a,pagerDisabled:o,onEdit:c,editDisabled:u}){const h=t>1,f=new Date(n),p=()=>GC(e);return _.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${h?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[h&&_.jsxs(_.Fragment,{children:[_.jsx(It,{size:"small",title:ZN(),"aria-label":ZN(),disabled:o||!s,onClick:()=>s&&a(s),children:_.jsx(A$,{size:14})}),_.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),_.jsx(It,{size:"small",title:YN(),"aria-label":YN(),disabled:o||!i,onClick:()=>i&&a(i),children:_.jsx(Ka,{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(It,{size:"small","aria-label":SS(),disabled:!e,onClick:p,children:_.jsx(Yu,{size:13})})]}),_.jsx(It,{size:"small",title:GN(),"aria-label":GN(),disabled:u,onClick:c,children:_.jsx(KS,{size:13})})]})}const fqn=T.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,busy:m=!1,recoveringTurnId:w,onRecover:k,skills:v,predictTextTail:b=!1,forkCount:y,forkIndex:x=0,forkPrevId:C,forkNextId:N,forkDisabled:j,branchDisabled:A,onFork:z,onSelectFork:M}){var Z,J;Qu();const[D,I]=T.useState(null),B=hqn(n);if(B)return _.jsx(pqn,{part:B});if(n.role==="user"){const $=n.parts.filter(ie=>ie.type==="text").map(ie=>ie.text??"").join(` +`),L=ie=>!!(v!=null&&v.some(ue=>ue.name===FC(ie))),q=n.parts.filter(ie=>ie.type==="image"&&ie.text).map(lqn),P=q.filter(ie=>!ie.isPdf),F=q.filter(ie=>ie.isPdf),re=n.parts.filter(ie=>ie.type==="annotation"&&ie.text).map(ie=>({id:ie.id,text:ie.text??""}));if(D!==null){const ie=()=>{const ue=D.trim();!ue||j||(I(null),z(n.id,ue))};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":$4e(),value:D,autoFocus:!0,onChange:ue=>I(ue.target.value),onKeyDown:ue=>{ue.key==="Escape"?(ue.preventDefault(),I(null)):ue.key==="Enter"&&!ue.shiftKey&&!ue.nativeEvent.isComposing&&(ue.preventDefault(),ie())}}),_.jsxs("div",{className:`${Sk} justify-end`,children:[_.jsx(Ie,{size:"small",onClick:()=>I(null),children:Wxe()}),_.jsx(Ie,{size:"small",variant:"primary",onClick:ie,disabled:j||!D.trim(),children:j3()})]})]})})}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:[re.length>0&&_.jsx(qC,{annotations:re,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(nHn,{text:$,isCommand:L}),P.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:P.map((ie,ue)=>_.jsx("a",{href:ie.src,target:"_blank",rel:"noreferrer",children:_.jsx("img",{src:ie.src,alt:Tme()})},ue))}),F.length>0&&_.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:F.map((ie,ue)=>_.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:ie.src,target:"_blank",rel:"noreferrer",children:[_.jsx(Qb,{size:15}),_.jsx("span",{children:ie.name})]},ue))})]}),y!==void 0&&_.jsx(_qn,{text:$,createdAt:n.createdAt,count:y,index:x,prevId:C,nextId:N,onSelect:M,pagerDisabled:A,onEdit:()=>I($),editDisabled:j})]})}const G=n.parts.find($=>$.type==="tool"&&G5($)),U=n.parts.find(Gm)??G,Q=BOn(n.parts.filter($=>$!==U&&!(G&&G5($))),U),V=b&&!n.completedAt?"":pF(n);return _.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[_.jsx(dqn,{message:n,parts:Q,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,predictTextTail:b}}),U&&_.jsx($q,{part:U,usageLimited:!!G,busy:m,recovering:w===((J=(Z=U.state)==null?void 0:Z.input)==null?void 0:J.turnId),onRecover:k}),V&&_.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(It,{size:"small",title:MN(),"aria-label":MN(),onClick:()=>void GC(V),children:_.jsx(Yu,{size:13})})})]})});function dqn({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:i}=dF(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:hv(i,t)});const u=e.completedAt??(r?Date.now():null),h=u===null?null:u-e.createdAt,f=h===null?null:h<6e4||h>=36e5?$0(h):Hze({minutes:Jt(Math.floor(h/6e4)),seconds:Jt(Math.floor(h/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?Dze():Qze({duration:f})}),_.jsx(Ka,{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:hv(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),_.jsx("div",{className:"turn-answer",children:hv(i,t)})]})}function hqn(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===ZI?n:null}function pqn({part:e}){var c;const n=e.state,t=Js((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?iL():s&&i!==null?ige({code:Jt(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:[uL()," "]}),_.jsx(Mf,{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:`${HC} 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 hv(e,n){var y,x;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,predictTextTail:m=!1}=n,w=e.filter(C=>C.type!=="steer"&&Oh(C,t)).at(-1),k=[];let v=[];const b=()=>{v.length!==0&&(k.push(_.jsx(aqn,{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(Oh(C,t)){if(C.type==="tool"&&(gqn(C.tool)||(((y=C.children)==null?void 0:y.length)??0)>0)){b(),k.push(_.jsx(bqn,{part:C,pendingTail:m&&((x=C.state)==null?void 0:x.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){v.push(C);continue}b(),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":w8e(),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(oqn,{part:C,onRespond:h,onOpenFile:s,onOpenPlan:f},C.id))}return b(),k}function mqn(e){return xf(e).label}function gqn(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function Bq(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 bb(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&bb(t.children,n);if(r)return r}return null}function vqn({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var w,k,v,b;const o=e.children??[],c=((w=e.state)==null?void 0:w.status)==="running",u=((k=e.state)==null?void 0:k.status)==="error",h=u?Xy(((v=e.state)==null?void 0:v.error)||((b=e.state)==null?void 0:b.output)||""):"",f=hv(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:c,pendingTailToolId:c?_F(o):null}),m=o.some(y=>y.type==="text"&&!!y.text)?"":Bq(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:[vS()," "]}),h&&_.jsx("div",{className:HC,children:h.slice(0,2e4)}),f.length===0&&!m&&!h?_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?bS():hbe()}):_.jsxs(_.Fragment,{children:[f,m&&_.jsx(_c,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function bqn({part:e,pendingTail:n,onOpenSubagent:t}){var u,h,f,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=Xy(((h=e.state)==null?void 0:h.error)||((f=e.state)==null?void 0:f.output)||""),i=n&&!r?UC(xf(e)):xf(e),a=Iq(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!Bq(e),c=_.jsxs(_.Fragment,{children:[r&&_.jsxs("span",{className:"sr-only",children:[vS()," "]}),r?_.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:_.jsx(R$,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):_.jsx(vb,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),_.jsx("span",{className:`${Cq} ${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:lye(),...Wr(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(Ka,{size:12})})]})}function yqn(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 KC(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=Js(o,"reason","description")||Lq(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 xqn(e){const[n,t]=T.useState({text:"",sequence:0}),r=T.useRef(null);return T.useEffect(()=>{var w,k,v,b,y;const s=((w=e[0])==null?void 0:w.id)??"",{messageId:i,states:a}=yqn(e),o=KC(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(x=>({text:o?kN({label:_a(o.label)}):"",sequence:x.sequence+1}));return}const c=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,h=[...a].filter(([x,C])=>{var N;return((N=c.get(x))==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(x=>({text:kN({label:_a(o.label)}),sequence:x.sequence+1}));return}const f=(k=h.find(([,x])=>Gm(x.part)))==null?void 0:k[1].part;if((f==null?void 0:f.id)==="turn-recovery"){const x=gF((b=(v=f.state)==null?void 0:v.input)==null?void 0:b.recoveryAction);t(C=>({text:`${Ble()}${x?` ${x==="retry"?sle():Yce()}`:""}`,sequence:C.sequence+1}));return}if((f==null?void 0:f.id)==="turn-retry"){t(x=>({text:Uce(),sequence:x.sequence+1}));return}const p=h.filter(([,x])=>x.status==="error");if(p.length>0){const x=p.slice(0,2).map(([,C])=>xf(C.part).label).join(", ");t(C=>({text:p.length===1?Cle({labels:x}):Rle({count:Jt(p.length),labels:x}),sequence:C.sequence+1}));return}const m=h.filter(([,x])=>x.status==="running");if(m.length>0){const x=(y=m.at(-1))==null?void 0:y[1].part;t(C=>({text:x?UC(xf(x)).label:_le(),sequence:C.sequence+1}));return}h.some(([,x])=>x.status==="completed")&&t(x=>({text:vle(),sequence:x.sequence+1}))},[e]),n}const wqn=T.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:i,allMessages:a,canFork:o,onFork:c,onSelectFork:u,busy:h,onOpenFile:f,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:y,onOpenSubagent:x,recoveringTurnId:C,onRecover:N,skills:j}){var $,L,q;Qu();const A=(($=KC(n))==null?void 0:$.id)??null,z=T.useMemo(()=>n.filter(P=>cqn(P,A)),[n,A]),M=T.useMemo(()=>{const P=z.filter(F=>F.role==="user"&&!F.id.startsWith(rf));return IOn(a,n,P,F=>F.startsWith(rf))},[n,z,a]),D=T.useRef(new Set),[I,B]=T.useState(!1),G=T.useCallback(P=>z[P].id,[z]),U=T.useCallback(P=>{if(I)return z.map((re,ie)=>ie);const F=new Set(lF(P));return z.forEach((re,ie)=>{D.current.has(re.id)&&F.add(ie)}),[...F].sort((re,ie)=>re-ie)},[z,I]),Q=OOn({count:z.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:G,estimateSize:()=>400,overscan:1,initialRect:{width:((L=t.current)==null?void 0:L.clientWidth)??0,height:((q=t.current)==null?void 0:q.clientHeight)??0},initialOffset:()=>{var P;return Math.max(0,z.length*400-(((P=t.current)==null?void 0:P.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:U});T.useLayoutEffect(()=>{const P=()=>Q.scrollToEnd();return r.current=P,i(),()=>{r.current=null}},[Q,r,i]),T.useEffect(()=>{const P=()=>{var ie;const F=window.getSelection();if(!F||F.isCollapsed||!F.rangeCount)return;const re=F.getRangeAt(0);for(const ue of((ie=t.current)==null?void 0:ie.querySelectorAll("[data-message-id]"))??[])re.intersectsNode(ue)&&ue.dataset.messageId&&D.current.add(ue.dataset.messageId)};return document.addEventListener("selectionchange",P),()=>document.removeEventListener("selectionchange",P)},[t]);const V=z.at(-1),Z=xqn(n),J=h?fF(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":I,onClick:()=>B(P=>!P),children:FEe()}),_.jsx("div",{className:"relative",style:{height:Q.getTotalSize()},children:Q.getVirtualItems().map(P=>{var se,K,oe,ce,pe,ve;const F=z[P.index],re=F.parts.find(Gm),ie=(K=(se=re==null?void 0:re.state)==null?void 0:se.input)==null?void 0:K.turnId,ue=re?h||C!==null:!1;return _.jsx("div",{"data-index":P.index,"data-message-id":F.id,ref:Q.measureElement,className:"absolute left-0 w-full pb-4",style:{top:P.start},onClickCapture:Me=>{!(Me.target instanceof Element)||!Me.target.closest("[data-work-toggle]")||(s.current=!1,Q.setOptions({...Q.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(F.id),onFocusCapture:()=>D.current.add(F.id),children:_.jsx(fqn,{message:F,forkCount:(oe=M.get(F.id))==null?void 0:oe.count,forkIndex:(ce=M.get(F.id))==null?void 0:ce.index,forkPrevId:(pe=M.get(F.id))==null?void 0:pe.prevId,forkNextId:(ve=M.get(F.id))==null?void 0:ve.nextId,forkDisabled:!o,branchDisabled:h,onFork:c,onSelectFork:u,activePermissionId:A,pendingTailToolId:(J==null?void 0:J.messageId)===F.id?J.toolId:null,onOpenFile:f,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:y,onOpenSubagent:x,busy:ue,recoveringTurnId:ie===C?C:null,onRecover:N,skills:j,predictTextTail:h&&F===V&&F.role==="assistant"})},F.id)})})]})}),kqn=(e,n)=>e==="all"?!0:e==="archived"?n:!n;function L4(e){return e instanceof Element&&e.closest("[data-side-chat]")!==null}const Pq=[{id:"active",label:Lye,railLabel:mL},{id:"archived",label:IN,railLabel:IN},{id:"all",label:qye,railLabel:lL}];function Sqn({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=Ki();return _.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[_.jsx(It,{size:"small",className:"rail-filter-btn",active:e!=="active",title:QN(),"aria-label":QN(),onClick:()=>r(i=>!i),children:_.jsx(q$,{size:13})}),t&&_.jsx("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",children:Pq.map(i=>_.jsxs(vn,{onClick:()=>{n(i.id),r(!1)},children:[_.jsx("span",{children:i.label()}),e===i.id&&_.jsx(bi,{size:13})]},i.id))})]})}const Cqn=14,Eqn=500,Nqn=1200;function Fq({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*Cqn,Eqn)}ms`},children:t},r))}):_.jsx(_.Fragment,{children:e})}function zqn({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:c,onDelete:u}){var N;const{open:h,setOpen:f,ref:p}=Ki(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[w,k]=T.useState(!1),[v,b]=T.useState(""),y=T.useRef(null);function x(){var j;b(((j=e.title)==null?void 0:j.trim())||""),k(!0)}function C(){var A;const j=v.trim();k(!1),j&&j!==(((A=e.title)==null?void 0:A.trim())||"")&&o(j)}return T.useEffect(()=>{var j,A;w&&((j=y.current)==null||j.focus(),(A=y.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] px-2.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":""} ${h?"menu-open":""} ${w?"editing":""}`,title:`${bu[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?WEe():""}`,onClick:()=>{w||(h?f(!1):a())},onKeyDown:j=>{j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),h?f(!1):a())},children:[e.parentSessionId&&!w&&_.jsx(XS,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),w?_.jsx("input",{ref:y,className:"session-title-input","aria-label":P6e(),value:v,onChange:j=>b(j.target.value),onClick:j=>j.stopPropagation(),onBlur:C,onKeyDown:j=>{j.stopPropagation(),j.key==="Enter"?(j.preventDefault(),C()):j.key==="Escape"&&(j.preventDefault(),k(!1))}}):_.jsx("span",{className:"session-title",children:_.jsx(Fq,{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:rz(),"aria-label":rz(),onClick:j=>{j.stopPropagation(),f(A=>!A)},children:_.jsx(Lm,{size:14})}),h&&_.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(vn,{onClick:j=>{j.stopPropagation(),f(!1),x()},children:_.jsx("span",{children:fL()})}),_.jsx(vn,{onClick:j=>{j.stopPropagation(),f(!1),c(!e.archived)},children:_.jsx("span",{children:e.archived?cze():ume()})}),_.jsx(vn,{danger:!0,onClick:j=>{j.stopPropagation(),f(!1),u()},children:_.jsx("span",{children:_L()})})]})]})}const fM=[j$,H$,Mf,Ah],jqn=()=>[{title:dCe(),prompt:aCe()},{title:NCe(),prompt:yCe()},{title:FCe(),prompt:OCe()},{title:t7e(),prompt:WCe()}],I4=[{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"}],dM="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function Aqn(e,n){if(!e)return null;const t=e.model??null;return{...e,model:t,serviceTier:qv(n,t,e.serviceTier),reasoningLevel:KI(n,t,e.reasoningLevel)}}function hM({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:i,onSelectMainView:a,onOpenFile:o,onOpenRun:c,runExperimentName:u,onOpenExperiment:h,experimentName:f,onOpenPlan:p,onOpenSubagent:m,runtime:w,onOpenDemoWelcome:k,composerFocusNonce:v=0,demoRunningRunId:b=null,activeSessionId:y,onActiveSessionChange:x,preferredAgent:C,onPreferredAgentChange:N,preferredAutonomy:j,onPreferredAutonomyChange:A,embedded:z=!1,onOpenSideChat:M,children:D}){var ui,to,Pl,Mc,Io,ys,xs;const I=pn({mutationFn:te=>mkn(...te)}),B=pn({mutationFn:te=>fkn(...te)}),G=pn({mutationFn:te=>pkn(...te)}),U=pn({mutationFn:te=>hkn(...te)}),Q=pn({mutationFn:te=>okn(...te)}),V=pn({mutationFn:te=>lkn(...te)}),Z=pn({mutationFn:te=>ukn(...te)}),J=pn({mutationFn:te=>_kn(...te)}),$=pn({mutationFn:Q3}),L=T.useMemo(()=>Gi(e),[e]),{data:q=IHn}=ut(L),P=T.useCallback(te=>{Vr(L.queryKey,ge=>{if(!ge)return;const Se=typeof te=="function"?te(ge):te,Oe=new Map(ge.map(Pe=>[Pe.id,Pe]));for(const Pe of Se)Oe.get(Pe.id)!==Pe&&oo(tt,L.queryKey,Pe.id),Oe.delete(Pe.id);for(const Pe of Oe.keys())oo(tt,L.queryKey,Pe);return Se})},[L]),F=y,re=T.useRef(x);re.current=x;const ie=T.useRef({projectId:e});ie.current.projectId!==e&&(ie.current={projectId:e});const[ue,se]=T.useState(new Set),[K,oe]=T.useState("active"),[ce,pe]=T.useState(""),[ve,Me]=T.useState(!1),[Fe,Ye]=T.useState(!1),[Te,$e]=T.useState([]),yt=T.useRef(0),ot=T.useRef({projectId:e,activeId:F,mainView:i});(ot.current.projectId!==e||ot.current.activeId!==F||ot.current.mainView!==i)&&(ot.current={projectId:e,activeId:F,mainView:i});const[Mt,jt]=T.useState([]),[Pt,Le]=T.useState(null),nt=F??"new",ke=T.useRef(new Map),me=T.useRef(Yw);me.current={draft:ce,attachments:Mt,annotations:Te};const je=e===Wp&&!z&&q.length>0&&q.every(te=>te.sideParentSessionId||X4n[te.id]===te.activeLeafId)?xj:null,qe=T.useRef(null);je!==null&&qe.current===null&&F!==null&&(qe.current=nt);const rt=nt===qe.current?je:null;T.useLayoutEffect(()=>{const te=ke.current.get(nt)??Yw;return me.current=te,pe(te.draft),jt(te.attachments),$e(te.annotations),()=>{const ge=WOn(me.current,rt);ge?ke.current.set(nt,ge):ke.current.delete(nt)}},[nt,rt]);const[dt,st]=T.useState(null),Ut=T.useRef(Promise.resolve()),Xt=T.useRef(0),en=T.useRef(0),[an,At]=T.useState(null),gn=T.useRef(null),on=T.useRef(!1),Ot=T.useRef(null),[dn,cn,kn]=rSn(e,i==="chat"?F:null),{data:Wn=Rqn}=ut(Bu()),[gs,ns]=T.useState(C);T.useEffect(()=>ns(C),[C]);const[gt,ln]=T.useState({}),[bn,un]=T.useState(i0),[_r,Mn]=T.useState(null),Qn=T.useRef(!1),ar=T.useRef(null),[wt,Ht]=T.useState(null),vr=T.useRef(!1),Pn=T.useRef(null),[Qr,Xn]=T.useState(new Map),Yn=T.useRef(new Map),Xr=T.useRef(null),As=T.useRef(null),Fr=T.useRef(null),We=T.useRef(!0),[vt,fr]=T.useState(!0),yn=T.useRef(null),[Hn,Zn]=T.useState(!1),Fn=Ki(),Yr=T.useCallback(te=>{var ge;yt.current+=1,$e(Se=>[...Se,{id:`annotation-${yt.current}`,...te}]),(ge=yn.current)==null||ge.focus()},[]),An=jHn(As,Yr);AHn(Te,z?yHn:bHn),T.useEffect(()=>{Zn(!1),An.dismiss()},[F,e,An.dismiss]);const[wo,ai]=T.useState(0),[Ds,Hr]=T.useState(!1),[t_,ko]=T.useState(0),[So,qs]=T.useState(0),Us=T.useRef(!1);function Wi(te){if(!Or)return;if(!li&&te.source==="command"&&Qy(te.name)&&te.name!=="goal"){Cc(te.name,ce,Or);return}const ge=te.name.replace(/@u$/,"^").replace(/@p$/,"~"),Se=te.source==="command"?1:tM(ge,yn.current),Oe=QFn(ce,Or,ge,Se);pe(Oe.text),window.requestAnimationFrame(()=>{var Pe,Et;(Pe=yn.current)==null||Pe.focus(),(Et=yn.current)==null||Et.setSelectionRange(Oe.cursor,Oe.cursor),qs(Oe.cursor)})}function Gs(te){if(Qi)return!1;const ge=te.selectionStart;if(Us.current||ge!==te.selectionEnd)return!1;const Se=ce.slice(0,ge).replace(/[ \t]+$/,"").length,Oe=N4(ce,Se);if(!Oe||Oe.end!==Se||!Ol(Oe.query)||ge>Se&&ge-Se!==tM(Oe.query,te))return!1;const Pe=eM(ce,{...Oe,end:ge});return pe(Pe.text),qs(Pe.cursor),window.requestAnimationFrame(()=>te.setSelectionRange(Pe.cursor,Pe.cursor)),!0}function cr(te){Le(null);let Oe=Mt.reduce((Pe,Et)=>Pe+Et.size,0);for(const Pe of te){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Pe.type))continue;if(Pe.size>31457280){Le($me({name:Ce(Pe.name)}));continue}if(Oe+Pe.size>41943040){Le(Gme());continue}Oe+=Pe.size;const Et=F,qt=new FileReader;qt.onload=()=>{const xn={dataUrl:qt.result,mediaType:Pe.type,name:Pe.name,size:Pe.size};if(ot.current.activeId===Et){jt(or=>[...or,xn]);return}const rn=ke.current.get(Et??"new")??Yw;ke.current.set(Et??"new",{...rn,attachments:[...rn.attachments,xn]})},qt.readAsDataURL(Pe)}}function Si(te){const ge=Array.from(te.clipboardData.items).filter(Se=>Se.kind==="file"&&(Se.type.startsWith("image/")||Se.type==="application/pdf")).map(Se=>Se.getAsFile()).filter(Se=>Se!==null);ge.length>0&&(te.preventDefault(),cr(ge))}const Ct=q.find(te=>te.id===F),za=gs??U9n(Wn),rs=Ct?{harness:Ct.harness,model:gt.model!==void 0?gt.model:Ct.model,serviceTier:gt.serviceTier!==void 0?gt.serviceTier:Ct.serviceTier,permissionMode:gt.permissionMode??Ct.permissionMode,reasoningLevel:gt.reasoningLevel??Ct.reasoningLevel}:za?{...za,...gt}:null,{data:Ks=Tqn}=ut(Vkn(rs==null?void 0:rs.harness,e)),_t=rs?Wn.find(te=>te.id===rs.harness):void 0,Bt=_t==null?void 0:_t.options,oi=T.useMemo(()=>XFn(Ks,Bt==null?void 0:Bt.planActivation),[Ks,Bt==null?void 0:Bt.planActivation]),Ci=rM(ce),Ei=Ci!==null,Or=N4(ce,So),ci=(Or==null?void 0:Or.query)??null,kc=ci===null?[]:oi.filter(te=>VFn(te,ci)),Qi=!Ei&&ci!==null&&(Or==null?void 0:Or.end)===So&&kc.length>0,ss=Qi&&!Ds?kc:[],Wa=ss.length>0,Ni=Math.min(wo,Math.max(0,ss.length-1));T.useEffect(()=>ai(0),[ci]);const Yt=Aqn(rs,_t),zi=Kb(_t,Yt==null?void 0:Yt.model),Tl=te=>{if(!Yt)return;const ge={...Yt,...te},Se={};te.model!==void 0&&te.model!==Yt.model&&(Se.model=te.model),te.serviceTier!==void 0&&te.serviceTier!==Yt.serviceTier&&(Se.serviceTier=te.serviceTier),te.permissionMode!==void 0&&te.permissionMode!==Yt.permissionMode&&(Se.permissionMode=te.permissionMode),te.reasoningLevel!==void 0&&te.reasoningLevel!==Yt.reasoningLevel&&(Se.reasoningLevel=te.reasoningLevel),un(Oe=>({...Oe,...Se})),ns(ge),N(ge).catch(()=>{}),Ct?ln(Oe=>({...Oe,...te})):te.harness&&te.harness!==Yt.harness&&ln({})},$n=T.useCallback(te=>{const ge=Ut.current.catch(()=>{}).then(()=>{if(!zn(L.queryKey))throw new DOMException("Workspace changed","AbortError");return te()});return Ut.current=ge.then(()=>{},()=>{}),ge},[L]),dr=te=>{if(te==="plan"&&(_t==null?void 0:_t.id)==="claude-code"?(un(Oe=>({...Oe,permissionMode:te})),ln(Oe=>({...Oe,permissionMode:te}))):(ln(Oe=>{const Pe={...Oe};return delete Pe.permissionMode,Pe}),Tl({permissionMode:te})),!Ct)return;const ge=Ct.id,Se=++Xt.current;st(null),$n(()=>I.mutateAsync([ge,te])).then(Oe=>{P(Pe=>Pe.map(Et=>Et.id===Oe.id?Oe:Et)),Xt.current===Se&&ln(Pe=>{const Et={...Pe};return delete Et.permissionMode,Et})}).catch(()=>{Xt.current===Se&&(ln(Oe=>{const Pe={...Oe};return delete Pe.permissionMode,Pe}),st(zze()))})},Ls=te=>Tl({reasoningLevel:te}),is=te=>{if(!Ct){A(te);return}const ge=Ct.id,Se=Ct.autonomy,Oe=++Xt.current,Pe=Et=>P(qt=>qt.map(xn=>xn.id===Et.id?Et:xn));Pe({...Ct,autonomy:te}),st(null),$n(()=>G.mutateAsync([ge,te])).then(Et=>{Pe(Et),A(Et.autonomy)}).catch(()=>{P(Et=>Et.map(qt=>qt.id===ge&&qt.autonomy===te?{...qt,autonomy:Se}:qt)),Xt.current===Oe&&st(xze())})},Vs=((ui=Ct==null?void 0:Ct.goal)==null?void 0:ui.trim())||"",Xi=(Yt==null?void 0:Yt.harness)==="claude-code"?Yt.permissionMode==="plan":(Bt==null?void 0:Bt.planActivation)==="command"?an??(Ct==null?void 0:Ct.planMode)??!1:!1;T.useEffect(()=>{an===null||(Ct==null?void 0:Ct.planMode)!==an||(gn.current=null,At(null))},[Ct==null?void 0:Ct.planMode,an]);async function Rl(te){if(un(Oe=>({...Oe,planMode:te})),gn.current=te,At(te),!Ct)return;const ge=Ct.id,Se=++en.current;st(null);try{const Oe=await $n(()=>B.mutateAsync([ge,te]));P(Pe=>Pe.map(Et=>Et.id===Oe.id?Oe:Et)),en.current===Se&&(gn.current=null,At(null),st(null))}catch(Oe){throw en.current===Se&&(gn.current=null,At(null)),Oe}}async function Sc(){if((Yt==null?void 0:Yt.harness)==="claude-code"){dr("auto");return}if(Ct)try{await Rl(!1)}catch{st(f1e())}}async function Ff(){const te=!Xi;try{if((Yt==null?void 0:Yt.harness)==="claude-code")dr(te?"plan":"auto");else if((Bt==null?void 0:Bt.planActivation)==="command")await Rl(te);else throw new Error(i1())}catch{st(cz())}}function Co(te,ge=""){var Se;switch(te){case"plan":return Ff(),!1;case"new":return z?Ct!=null&&Ct.sideParentSessionId&&(M==null||M(Ct.sideParentSessionId,"")):Lo(),!1;case"resume":return Zn(!0),!0;case"model":return ko(Oe=>Oe+1),!0;case"compact":return Zi(),!1;case"goal":return Yi(ge),!1;case"side":return as(ge),!1;case"copy":{const Oe=Zr.at(-1),Pe=Jn&&(Oe==null?void 0:Oe.role)==="assistant"&&!Oe.completedAt,Et=HOn(Pe?Zr.slice(0,-1):Zr);return Et?GC(Et):Zt(Hbe(),"info"),!1}case"export":{const Oe=((Se=Ct==null?void 0:Ct.title)==null?void 0:Se.trim())||Md(),Pe=Ct?qOn(Oe,Zr,{user:M1e(),assistant:bu[Ct.harness]}):null;return Pe?uqn(UOn(Oe),Pe):Zt(Qbe(),"info"),!1}}}function as(te){z?Zt(Qon(),"info"):!Ct||!M?Zt(Hon(),"info"):M(Ct.id,te)}async function n_(te){st(null);const ge=ie.current;try{const Se=await Q.mutateAsync([e,te]);if(tt.invalidateQueries({queryKey:YI().queryKey}),ie.current!==ge)return;P(Oe=>[Se,...Oe.filter(Pe=>Pe.id!==Se.id)]),oe("all"),x(Se.id,{projectId:Se.projectId})}catch(Se){if(ie.current!==ge)return;st(Nve({error:Ce(Se instanceof Error?Se.message:String(Se))}))}}async function Yi(te){var qt;const ge=te.trim();if(!ge){const xn=(qt=Ct==null?void 0:Ct.goal)==null?void 0:qt.trim();Zt(xn?V1e({goal:_a(xn)}):ave(),"info");return}const Se=ot.current,Oe=()=>ot.current.activeId===Se.activeId;st(null);let Pe=F;if(!Pe){if(!(_t!=null&&_t.agentReady)||!Yt){st(i1());return}try{Pe=(await Tc(Yt,j4(Bt==null?void 0:Bt.planActivation,void 0,gn.current))).id}catch(xn){st(ON({error:Ce(xn instanceof Error?xn.message:String(xn))}));return}}const Et=/^(clear|none|off)$/i.test(ge);try{const xn=await $n(()=>U.mutateAsync([Pe,Et?null:ge]));P(rn=>rn.map(or=>or.id===xn.id?xn:or)),Zt(Et?P1e():dve(),"success")}catch(xn){if(!Oe())return;st(ON({error:Ce(xn instanceof Error?xn.message:String(xn))}))}}async function Zi(){const te=F;if(!te){Zt(Dbe(),"info");return}if(Jn){st(Cge());return}st(null),K==="archived"&&oe("active");const ge=ot.current;try{const{message:Se}=await xkn(te);cn({type:"upsertMessage",sessionId:te,message:Se})}catch(Se){if(ot.current.activeId!==ge.activeId)return;st(Rge({error:Ce(Se instanceof Error?Se.message:String(Se))}))}}function Cc(te,ge,Se){const Oe=eM(ge,Se);pe(Oe.text),Hr(!0),!Co(te)&&window.requestAnimationFrame(()=>{var Pe,Et;(Pe=yn.current)==null||Pe.focus(),(Et=yn.current)==null||Et.setSelectionRange(Oe.cursor,Oe.cursor),qs(Oe.cursor)})}const Ts=T.useCallback(async(te=!1)=>{const ge=ie.current;if(ge.projectId!==e||!zn(L.queryKey))return null;const Se=(tt.getQueryData(L.queryKey)??[]).map(Oe=>Oe.id);try{const Oe=await tt.fetchQuery({...L,...te?{staleTime:0}:{}});if(ie.current!==ge||!zn(L.queryKey))return null;const Pe=Oe.filter(qt=>!bl.has(qt.id)),Et=new Set(Pe.map(qt=>qt.id));for(const qt of Se)Et.has(qt)||Ta(qt);return Yn.current=new Map(Pe.map(qt=>[qt.id,qt.title])),Pe}catch{return null}},[e]),ja=T.useCallback(async te=>{ie.current.projectId!==e||!zn(L.queryKey)||await Promise.all([tt.fetchQuery({...ac(te),staleTime:0}),Ts(!0)]).catch(()=>{})},[e,Ts]);T.useEffect(()=>{const te=nB();se(e===Wp?new Set([qb,Ub].filter(Se=>!te.has(Se))):new Set),Me(!1),Ye(!1),Xn(new Map),Yn.current=new Map,Ts();const ge=ie.current;return()=>{ie.current===ge&&(ie.current={projectId:e})}},[e,Ts]),T.useEffect(()=>{un(i0),Pn.current=null},[F]),T.useEffect(()=>Gv(te=>{switch(te.type){case"session":{if(te.session.projectId!==e||bl.has(te.session.id))return;const ge=Yn.current.has(te.session.id),Se=Yn.current.get(te.session.id)!==te.session.title;Yn.current.set(te.session.id,te.session.title),ge&&Se&&te.session.titleSource==="generated"&&(Xn(Oe=>{const Pe=new Map(Oe);return Pe.set(te.session.id,(Oe.get(te.session.id)??0)+1),Pe}),window.setTimeout(()=>{Xn(Oe=>{if(!Oe.has(te.session.id))return Oe;const Pe=new Map(Oe);return Pe.delete(te.session.id),Pe})},Nqn));break}case"sessionDeleted":Ta(te.sessionId);break}}),[e]),T.useEffect(()=>Gv(te=>{te.type==="reconnected"&&Ts(!0)}),[Ts]);const Qa=F?dn.messagesBySession[F]??cM:cM,Xa=F?dn.activeLeafBySession[F]??null:null;ar.current=Xa;const Zr=T.useMemo(()=>DOn(Qa,Xa),[Qa,Xa]),vs=T.useRef({projectId:e,ids:dn.busySessions});T.useEffect(()=>{const te=vs.current;vs.current={projectId:e,ids:dn.busySessions},te.projectId===e&&se(ge=>FOn(ge,te.ids,dn.busySessions,q,i==="chat"?F:null))},[e,dn.busySessions,q,F,i]);const Jn=F?dn.busySessions.has(F):!1,Ml=!Jn&&!!(_t!=null&&_t.agentReady),Eo=Jn&&fF(Zr)!=null,ap=Jn&&POn(Zr),ji=F?dn.queuedBySession[F]??[]:[],No=ji.some(te=>te.dispatchState==="retrying"),Ya=ji.findIndex(te=>te.dispatchState==="blocked"),Za=ji.reduce((te,ge)=>ge.dispatchState!=="retrying"||typeof ge.nextRetryAt!="number"?te:te===null?ge.nextRetryAt:Math.min(te,ge.nextRetryAt),null),[_n,Aa]=T.useState(()=>Date.now());T.useEffect(()=>{if(!No||Za===null||(Aa(Date.now()),Za<=Date.now()))return;const te=window.setInterval(()=>{const ge=Date.now();Aa(ge),ge>=Za&&window.clearInterval(te)},1e3);return()=>window.clearInterval(te)},[No,Za]),T.useEffect(()=>{const te=ji.reduce((ge,Se)=>Se.planMode??ge,void 0);te!==void 0?(on.current=!0,gn.current=te,At(te)):on.current&&(on.current=!1,gn.current=null,At(null))},[ji]);const zo=!!F&&!(F in dn.messagesBySession)&&kn.isPending,Ec=T.useMemo(()=>{const te=new Set;for(const ge of dn.busySessions)(dn.messagesBySession[ge]??[]).some(Se=>Se.parts.some(Oe=>Oe.type==="prompt"&&Oe.prompt&&!Oe.prompt.resolved&&Oe.prompt.nativeId))&&te.add(ge);return te},[dn.busySessions,dn.messagesBySession]),Nc=F?Ec.has(F):!1,hr=Ct,r_=hr?Qr.get(hr.id):void 0,bs=T.useMemo(()=>{var te;for(let ge=Zr.length-1;ge>=0;ge--)for(const Se of Zr[ge].parts)if(Se.type==="prompt"&&((te=Se.prompt)==null?void 0:te.kind)==="plan"&&!Se.prompt.resolved)return{promptId:Se.id,plan:Se.prompt.plan??"",synthesized:!!Se.prompt.synthesized};return null},[Zr]),li=T.useMemo(()=>F?$On(Zr,hr==null?void 0:hr.harness,dn.busySessions.has(F)):null,[Zr,hr==null?void 0:hr.harness,F,dn.busySessions]),Ji=Ei&&!li,Ol=te=>{if(li||Ei)return!1;const ge=xk(te),Se=oi.find(Oe=>Oe.name===FC(ge??te));return!Se||Se.source!=="command"?!!Se:ge&&z4(ge)?ge==="plan"||ce.trim().toLowerCase().startsWith(`/${te}`):ce.trim().toLowerCase()===`/${te}`},Hf=T.useMemo(()=>oi.filter(te=>te.source!=="command"),[oi]),[Ai,qf]=T.useState(null),Uf=Ai&&Ai.sessionId===F?Ai:null;T.useEffect(()=>{if(!Ai)return;const te=dn.busySessions.has(Ai.sessionId),ge=Ai.sessionId===F&&bs&&bs.promptId!==Ai.promptId;(!te||ge)&&qf(null)},[Ai,bs,dn.busySessions,F]);const Ja=T.useMemo(()=>KC(Zr),[Zr]),Gf=Jn&&!!(_t!=null&&_t.supportsSteering)&&!!(_t!=null&&_t.agentReady)&&!bs&&!li&&!Ja&&Mt.length===0&&Te.length===0,Ws=T.useMemo(()=>p&&F?(te,ge,Se)=>p(te,F,ge,Se):void 0,[p,F]),s_=T.useMemo(()=>m&&F?(te,ge,Se)=>m(F,te,ge,Se):void 0,[m,F]),Kf=T.useMemo(()=>o&&((te,ge,Se,Oe,Pe)=>o(te,F??void 0,ge,Se,Oe,Pe)),[o,F]);T.useEffect(()=>{Xt.current+=1,en.current+=1;const te=(F?dn.queuedBySession[F]??[]:[]).reduce((ge,Se)=>Se.planMode??ge,void 0);on.current=te!==void 0,gn.current=te??null,At(te??null),ln({}),st(null)},[F]);const ea=i==="chat"&&(Zr.length>0||Jn),Dl=(Yt==null?void 0:Yt.harness)??null,i_=(Yt==null?void 0:Yt.model)??null,zc=kn.data?null:kn.error,Ll=i==="chat"&&!z&&!ea&&!zo&&!zc,jc=ut({...xSn(e,Dl??"claude-code",i_,E()),enabled:Ll&&Dl!==null,subscribed:Ll&&Dl!==null}),a_=(to=jc.data)!=null&&to.blank?jqn():((Pl=jc.data)==null?void 0:Pl.prompts)??null,jo=Dl!==null&&jc.isPending,eo=e===Wp?"demo":"project",Ao=te=>{pe(te),Hr(!1),window.requestAnimationFrame(()=>{const ge=yn.current;ge&&(ge.focus(),ge.setSelectionRange(te.length,te.length),qs(te.length))})};T.useEffect(()=>{rt&&(pe(te=>te||rt),Hr(!1),qs(rt.length))},[rt]),T.useEffect(()=>{if(v===0)return;const te=window.requestAnimationFrame(()=>{const ge=yn.current;ge&&(ge.focus(),ge.setSelectionRange(ge.value.length,ge.value.length),ge.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(te)},[v]);const To=T.useId(),Ac=e===Wp&&ce===xj&&!ve,Vf=T.useCallback(te=>{const ge=te.scrollHeight-te.scrollTop-te.clientHeight<60;We.current=ge,fr(ge)},[]),Sr=T.useCallback(()=>{var te;We.current=!0,fr(!0),(te=Fr.current)==null||te.call(Fr)},[]);T.useEffect(()=>{const te=Xr.current,ge=As.current;if(!te||!ge)return;const Se=new ResizeObserver(()=>{var Oe;We.current?(Oe=Fr.current)==null||Oe.call(Fr):fr(te.scrollHeight-te.scrollTop-te.clientHeight<60)});return Se.observe(te),Se.observe(ge),()=>Se.disconnect()},[ea]);const Wf=T.useCallback(te=>{te.currentTarget.blur(),Sr()},[Sr]);async function o_({queue:te=!1}={}){var Lt,Un,ws,Rs,Jr,ta;const ge=ce.trim(),Se=li?null:YFn(ge,Bt==null?void 0:Bt.planActivation);if(Se&&Se.name!=="plan"){pe(z4(Se.name)?"":Se.prompt),Hr(!1),Co(Se.name,Se.prompt);return}if(vu({name:"first_action",surface:eo,action:"typed_prompt"}),vr.current)return;const Oe=!!Se,Pe=!Xi,Et=j4(Bt==null?void 0:Bt.planActivation,Oe?Pe:void 0,gn.current),qt=Oe&&(_t==null?void 0:_t.id)==="claude-code"?Pe?"plan":"auto":void 0,xn=Se?Se.prompt:ge,rn=Mt,or=Te,Oc=or.map(Cn=>({text:Cn.text})),Zf=e,f_=i;let d_=F;const Ri=()=>{const Cn=ot.current;return zn(L.queryKey)&&Cn.projectId===Zf&&Cn.activeId===d_&&Cn.mainView===f_},Dc=()=>{Ri()&&(pe(Cn=>Cn||ge),jt(Cn=>Cn.length?Cn:rn),$e(Cn=>Cn.length?Cn:or))};if(Oe&&!xn&&rn.length===0&&or.length===0){pe(""),Hr(!1);try{if((_t==null?void 0:_t.id)==="claude-code")dr(Pe?"plan":"auto");else if((Bt==null?void 0:Bt.planActivation)==="command")await Rl(Pe);else throw new Error(i1())}catch{st(cz()),Dc()}return}const Y=Yt?{...Yt,...qt?{permissionMode:qt}:{}}:null;qt&&dr(qt);let _e=null;const xe=gn.current;Oe&&(Bt==null?void 0:Bt.planActivation)==="command"&&(_e=++en.current,gn.current=Pe,At(Pe));const ze=()=>{!Ri()||_e===null||en.current!==_e||(gn.current=xe,At(xe))};if(!xn&&rn.length===0&&or.length===0)return;if((xn||or.length>0)&&li&&rn.length===0){pe(""),$e([]),Ti({promptId:li,answers:[],note:xn||void 0,annotations:Oc}).then(Cn=>{Cn||Dc()});return}const Re=JSON.stringify({text:xn,images:rn.map(Cn=>({mediaType:Cn.mediaType,name:Cn.name,dataUrl:Cn.dataUrl})),annotations:Oc,settings:Y?{model:Y.model,serviceTier:Y.serviceTier,permissionMode:Y.permissionMode,planMode:Et,reasoningLevel:Y.reasoningLevel}:null}),Xe=((Lt=Pn.current)==null?void 0:Lt.signature)===Re?Pn.current.id:`ct_${crypto.randomUUID()}`;if(Pn.current={signature:Re,id:Xe},Jn){if(!F||!(_t!=null&&_t.agentReady)){ze();return}const Cn=F;pe(""),jt([]),$e([]),Le(null);const os=Y?{model:Y.model,serviceTier:Y.serviceTier,permissionMode:Y.permissionMode,planMode:(Bt==null?void 0:Bt.planActivation)==="command"?Et??(Ct==null?void 0:Ct.planMode):Et,reasoningLevel:Y.reasoningLevel}:{};Ri()&&ln({});const na=rn.map(On=>({mediaType:On.mediaType,dataBase64:On.dataUrl.slice(On.dataUrl.indexOf(",")+1),name:On.name}));try{(Un=(await $n(()=>X3(Cn,xn,os,na.length?na:void 0,Oc,Xe,Gf&&!te&&!Oe?"steer":void 0))).turn)!=null&&Un.existing&&await ja(Cn),Ri()&&un(i0),((ws=Pn.current)==null?void 0:ws.id)===Xe&&(Pn.current=null)}catch{ze(),Dc()}return}if(!(_t!=null&&_t.agentReady)){ze();return}if(!Y){ze();return}let Ve=F;try{pe(Gn=>Gn===ce?"":Gn),jt(Gn=>Gn===rn?[]:Gn),$e(Gn=>Gn===or?[]:Gn),Le(null),vr.current=!0;try{if(!Ve){const lp=await Tc(Y,Et);Ve=lp.id,d_=lp.id}if(!zn(L.queryKey))return;const Gn=ac(Ve);await tt.fetchQuery({...Gn,...((Rs=tt.getQueryState(Gn.queryKey))==null?void 0:Rs.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{vr.current=!1}if(!zn(L.queryKey))return;cn({type:"optimisticUser",sessionId:Ve,text:xn||Sme(),attachments:rn.map(Gn=>({url:Gn.dataUrl,mediaType:Gn.mediaType,name:Gn.name})),annotations:or}),cn({type:"busy",sessionId:Ve,busy:!0}),Ri()&&Sr(),Ri()&&K==="archived"&&oe("active");const Cn=Y?{model:Y.model,serviceTier:Y.serviceTier,permissionMode:Y.permissionMode,planMode:Et,reasoningLevel:Y.reasoningLevel}:{};Ri()&&ln({});const os=rn.map(Gn=>({mediaType:Gn.mediaType,dataBase64:Gn.dataUrl.slice(Gn.dataUrl.indexOf(",")+1),name:Gn.name})),na=Ve;if(!na)throw new Error(OEe());(Jr=(await $n(()=>X3(na,xn,Cn,os.length?os:void 0,Oc,Xe))).turn)!=null&&Jr.existing&&await ja(na),Ri()&&un(i0),((ta=Pn.current)==null?void 0:ta.id)===Xe&&(Pn.current=null)}catch(Cn){if(!zn(L.queryKey)||(Dc(),ze(),!Ve))return;const os=Cn instanceof Error?Cn.message:String(Cn);if(!/session is busy/i.test(os)&&await tt.fetchQuery({...Gi(e),staleTime:0}).then(On=>{var Fl;return!!((Fl=On.find(Gn=>Gn.id===Ve))!=null&&Fl.busy)}).catch(()=>!1)){Ri()&&(pe(On=>On===xn?"":On),jt(On=>On===rn?[]:On),$e(On=>On===or?[]:On));return}cn({type:"busy",sessionId:Ve,busy:!1}),cn({type:"localError",sessionId:Ve,text:Fve({error:Ce(os)})})}}async function Tc(te,ge){const Se=ot.current,Oe=ie.current,Pe=await V.mutateAsync([e,te.harness,{model:te.model,serviceTier:te.serviceTier,permissionMode:te.permissionMode,planMode:ge,reasoningLevel:te.reasoningLevel,autonomy:j}]);return ie.current===Oe&&(P(Et=>[Pe,...Et.filter(qt=>qt.id!==Pe.id)]),tt.getQueryData(L.queryKey)||Ts(!0)),ie.current===Oe&&ot.current===Se&&(re.current(Pe.id,{replace:!0}),ot.current={...Se,activeId:Pe.id}),Pe}function Ro(){const te=uHn(ce);pe(te),window.requestAnimationFrame(()=>{var ge,Se;(ge=yn.current)==null||ge.focus(),(Se=yn.current)==null||Se.setSelectionRange(te.length,te.length),qs(te.length)})}async function Il(){const te=Ci;if(!te)return;if(st(null),Jn){st(Zme());return}const ge=ce,Se=ot.current;let Oe=F;const Pe=()=>{const rn=ot.current;return rn.projectId===Se.projectId&&rn.activeId===Oe&&rn.mainView===Se.mainView},Et=()=>{Pe()&&pe(rn=>rn||ge)};pe(""),Hr(!1);let qt=F;if(!qt){if(!(_t!=null&&_t.agentReady)||!Yt){Et(),st(i1());return}try{const rn=j4(Bt==null?void 0:Bt.planActivation,void 0,gn.current);qt=(await Tc(Yt,rn)).id,Oe=qt,Pe()&&ln({})}catch(rn){Et();const or=rn instanceof Error?rn.message:String(rn);Pe()&&st(RN({error:Ce(or)}));return}}Pe()&&K==="archived"&&oe("active");const xn=`${rf}shell-${Date.now()}`;cn({type:"localShell",sessionId:qt,id:xn,command:te}),Pe()&&Sr();try{const{message:rn}=await wkn(qt,te);cn({type:"upsertMessage",sessionId:qt,message:rn})}catch(rn){const or=rn instanceof Error?rn.message:String(rn);cn({type:"localShell",sessionId:qt,id:xn,command:te,error:RN({error:Ce(or)})})}}function Qf(){F&&Ekn(F).catch(()=>{st(pNe())})}const Xf=T.useCallback(async(te,ge)=>{if(!(!F||Qn.current)){Qn.current=!0,st(null),Mn(te);try{const Se=VOn({model:bn.model,serviceTier:bn.serviceTier,permissionMode:bn.permissionMode,planMode:bn.planMode,reasoningLevel:bn.reasoningLevel}),Oe=F;(await kkn(Oe,te,ge,Se)).turn.existing&&await ja(Oe),un(i0)}catch{st(N9e())}finally{Qn.current=!1,Mn(null)}}},[F,bn,ja]),Mo=T.useCallback((te,ge)=>{if(!F||Jn||!(_t!=null&&_t.agentReady))return;const Se=F;cn({type:"busy",sessionId:Se,busy:!0}),Sr(),$n(()=>Skn(Se,te,ge)).catch(Oe=>{cn({type:"busy",sessionId:Se,busy:!1});const Pe=Oe instanceof Error?Oe.message:String(Oe);cn({type:"localError",sessionId:Se,text:F9e({error:Ce(Pe)})})})},[F,Jn,_t==null?void 0:_t.agentReady,Sr,$n]),$l=T.useCallback(te=>{if(!F||Jn)return;const ge=F,Se=ar.current;cn({type:"activeLeaf",sessionId:ge,leafId:te}),$n(()=>Ckn(ge,te)).catch(Oe=>{cn({type:"activeLeaf",sessionId:ge,leafId:Se});const Pe=Oe instanceof Error?Oe.message:String(Oe);cn({type:"localError",sessionId:ge,text:wNe({error:Ce(Pe)})})})},[F,Jn,$n]);function Oo(te){if(!F)return;const ge=F;vkn(ge,te).then(({removed:Se})=>{if(Se)return ja(ge)}).catch(()=>st(O9e()))}async function Do(te){if(!F||wt)return;const ge=F;st(null),Ht(te);try{await bkn(ge,te),await ja(ge)}catch{st(tEe())}finally{Ht(null)}}const c_=T.useRef(!1);T.useEffect(()=>{const te=ge=>{c_.current=L4(ge.target)};return document.addEventListener("pointerdown",te,!0),()=>document.removeEventListener("pointerdown",te,!0)},[]),T.useEffect(()=>{if(!Jn||i!=="chat")return;function te(ge){var Oe;ge.key!=="Escape"||ge.defaultPrevented||(ge.target===document.body?c_.current:L4(ge.target))!==z||(ge.preventDefault(),Qf(),(Oe=yn.current)==null||Oe.focus())}return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Jn,F,i,z]);function Ta(te){Fb(te),ke.current.delete(te),qe.current===te&&(qe.current=null),ot.current.projectId===e&&ot.current.activeId===te&&ot.current.mainView==="chat"&&(pe(""),jt([]),$e([]),re.current(null,{replace:!0})),se(ge=>{if(!ge.has(te))return ge;const Se=new Set(ge);return Se.delete(te),Se}),Yn.current.delete(te)}function l_(te,ge){const Se=te.archived;P(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,archived:ge}:Pe)),Z.mutateAsync([te.id,ge]).catch(()=>{P(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,archived:Se}:Pe))})}function Yf(te,ge){const Se=te.title;P(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,title:ge}:Pe)),J.mutateAsync([te.id,ge]).catch(()=>{P(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,title:Se}:Pe))})}async function Bl(te){var Se;const ge=((Se=te.title)==null?void 0:Se.trim())||Md();if(window.confirm(Zge({title:_a(ge)}))){try{await $.mutateAsync(te.id)}catch(Oe){Zt(i1e({title:_a(ge),error:Ce(Oe instanceof Error?Oe.message:String(Oe))}),"error");return}Ta(te.id)}}const Ti=T.useCallback(te=>{if(!F)return Promise.resolve(!1);const ge=F;return cn({type:"busy",sessionId:ge,busy:!0}),$n(()=>Nkn(ge,te)).then(()=>!0).catch(()=>!1).finally(()=>{zn(L.queryKey)&&(tt.fetchQuery({...ac(ge),staleTime:0}).catch(()=>{}),tt.fetchQuery({...Gi(e),staleTime:0}).catch(()=>{}))})},[F,e,$n,L]),u_=q.filter(te=>!te.sideParentSessionId&&kqn(K,te.archived)),__=/Mac|iPhone|iPad/.test(navigator.platform),Is=__?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",er=__?"⌘ Enter":"Ctrl + Enter",Lo=T.useCallback(()=>{oe("active"),x(null)},[x]),op=T.useCallback(te=>{oe("all"),x(te)},[x]);T.useEffect(()=>{if(z)return;const te=ge=>{ge.repeat||ge.key!=="Enter"||!ge.metaKey&&!ge.ctrlKey||ge.altKey||!ge.shiftKey||L4(ge.target)||(ge.preventDefault(),Lo())};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Lo,z]);const Rc=_.jsxs("aside",{className:"session-rail w-68 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]:overflow-y-auto [&_.rail-body]:pt-0 [&_.rail-body]:pb-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,_.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":Is,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Lo,children:[_.jsx(Qh,{size:15}),p5e()]}),_.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 ${i==="skills"?"active":""}`,onClick:()=>a("skills"),children:[_.jsx(z$,{size:15}),zwe()]}),HFn.map(te=>_.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 ${i!=="chat"&&i!=="skills"&&te.activeTabs.includes(i)?"active":""}`,"data-onboarding":te.id==="compute"?"nav-compute":void 0,onClick:()=>a(te.id),children:[te.icon,te.label()]},te.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:((Mc=Pq.find(te=>te.id===K))==null?void 0:Mc.railLabel())??mL()}),_.jsx("div",{className:"rail-section-actions flex items-center gap-0.5",children:_.jsx(Sqn,{value:K,onChange:oe})})]}),_.jsxs("div",{className:"rail-body",children:[u_.map(te=>_.jsx(zqn,{session:te,active:te.id===F&&i==="chat",unread:ue.has(te.id),busy:dn.busySessions.has(te.id),waiting:Ec.has(te.id),revealTitle:Qr.get(te.id),onOpen:()=>{if(x(te.id),e===Wp){t9n(te.id);const ge=Q4n[te.id];ge&&(vu({name:"demo_experiment_started",kind:"curated",experiment:ge}),vu({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:ge=>Yf(te,ge),onSetArchived:ge=>l_(te,ge),onDelete:()=>void Bl(te)},te.id)),u_.length===0&&_.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:K==="archived"?xbe():q.length>0?obe():zbe()})]}),_.jsx(LB,{runtime:w})]}),cp="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",qn=!r&&!z&&_.jsx(It,{title:sz(),"aria-label":sz(),onClick:s,className:"mac-titlebar:ms-16",children:_.jsx(P$,{size:20})});return i!=="chat"?_.jsxs(_.Fragment,{children:[r&&Rc,_.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&_.jsx("div",{className:"flex h-12 shrink-0 items-center",children:qn}),_.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:D})]})]}):_.jsxs(_.Fragment,{children:[r&&Rc,_.jsxs("section",{"data-side-chat":z||void 0,className:`chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 ${z?"":"mt-5"}`,children:[_.jsxs("div",{className:r||z?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] mac-titlebar:grid-cols-[6rem_minmax(0,1fr)_6rem] items-center",children:[qn,_.jsxs("div",{className:cp,children:[_.jsx(q0,{variant:"header",title:hr?((Io=hr.title)==null?void 0:Io.trim())||Md():DN(),children:hr?_.jsx(Fq,{title:((ys=hr.title)==null?void 0:ys.trim())||Md(),animate:r_!==void 0},r_??"static"):DN()}),k&&_.jsx(It,{"data-tip":LN(),"aria-label":LN(),onClick:k,children:_.jsx(LCn,{size:15})})]})]}),zc?_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[_.jsx("p",{children:zc.message}),_.jsx(Ie,{onClick:()=>void kn.refetch(),children:ni()})]}):zo?_.jsxs("div",{className:"chat-loading flex-1 flex items-center justify-center gap-3 text-subtext text-xl p-5 [&_.spinner]:w-5.5 [&_.spinner]:h-5.5 [&_.spinner]:border-[3px]","aria-live":"polite","aria-busy":"true",children:[_.jsx(St,{}),_.jsx("span",{children:c5e()})]}):!ea&&(hr!=null&&hr.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(P0,{size:22}),_.jsx("p",{className:"m-0 text-balance",children:Don()})]}):ea?_.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:Xr,tabIndex:0,role:"region","aria-label":((xs=hr==null?void 0:hr.title)==null?void 0:xs.trim())||Md(),onScroll:te=>{Vf(te.currentTarget),An.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:As,children:[_.jsx(sq,{projectId:e,sessionId:F,children:_.jsx(wqn,{scrollRef:Xr,scrollToEndRef:Fr,stickToBottom:We,onPinToBottom:Sr,messages:Zr,allMessages:Qa,canFork:Ml,onFork:Mo,onSelectFork:$l,busy:Jn,onOpenFile:Kf,onOpenRun:c,onOpenSpawnedSession:op,runExperimentName:u,onOpenExperiment:h,experimentName:f,onRespond:Ti,onOpenPlan:Ws,onOpenSubagent:s_,recoveringTurnId:_r,onRecover:Xf,skills:Hf},F)}),Jn&&Nc&&_.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:c8e()}),Jn&&!Nc&&!Eo&&!ap&&_.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:_.jsx("span",{className:"tool-running-shimmer",children:LNe()})})]})}):_.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(s6,{})}),_.jsx("h2",{children:p8e()}),_.jsxs("div",{className:"chat-empty-project inline-flex items-center gap-[7px] mt-3 py-1.5 px-3 border border-border rounded-full text-subtext bg-surface text-lg font-medium",children:[_.jsx(Pu,{size:19}),_.jsx("span",{children:n})]}),jo&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:dM,"aria-hidden":"true",children:fM.map((te,ge)=>_.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 ${I4[ge].box}`,children:[_.jsxs("span",{className:`flex w-full items-center gap-2.5 ${I4[ge].icon}`,children:[_.jsx(te,{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"})]},ge))}),_.jsxs(Pr,{className:"mt-3",role:"status",children:[_.jsx(St,{}),_.jsx("span",{children:c7e()})]})]}),a_&&a_.length>0&&_.jsx("div",{className:dM,role:"group","aria-label":p7e(),children:a_.map((te,ge)=>{const Se=fM[ge],Oe=I4[ge];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 ${Oe.box}`,onClick:()=>{vu({name:"project_starter_clicked",slot:ge+1}),vu({name:"first_action",surface:eo,action:"starter_click"}),Ao(te.prompt)},children:[_.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[_.jsx(Se,{size:17,className:Oe.icon}),te.title]}),_.jsx("span",{className:"w-full truncate text-sm text-subtext",children:te.prompt})]},ge)})})]}),An.action&&_.jsxs(Ie,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:An.action.x,top:An.action.top,transform:"translateX(-50%)"},onMouseDown:te=>te.preventDefault(),onClick:An.add,children:[_.jsx(B$,{size:14}),mxe()]}),_.jsxs("div",{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:[ea&&_.jsx(It,{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 ${vt?"opacity-0":"opacity-100"}`,title:oz(),"aria-label":oz(),inert:vt,onClick:Wf,children:Jn&&!Nc?_.jsx(Lm,{size:18,className:"tool-running-shimmer-icon"}):_.jsx(bCn,{size:16})}),bs&&!(Uf&&bs.promptId===Uf.promptId)&&_.jsx(WPn,{synthesized:bs.synthesized,agentLabel:hr?bu[hr.harness]:jNe(),showResumeModes:(hr==null?void 0:hr.harness)==="claude-code",onView:te=>Ws==null?void 0:Ws(bs.plan,bs.promptId,te),onApprove:te=>Ti({promptId:bs.promptId,approve:!0,...te?{resumeMode:te}:{}}),onReject:()=>Ti({promptId:bs.promptId,approve:!1}),onRevise:te=>{F&&qf({sessionId:F,promptId:bs.promptId}),Ti({promptId:bs.promptId,approve:!1,note:te})}}),ji.length>0&&_.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:ji.map((te,ge)=>_.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:te.error?`${te.text} -${te.error}`:te.text,children:[te.dispatchState==="blocked"?_.jsx(PS,{size:13,className:"shrink-0 text-accent-amber"}):_.jsx(w6n,{size:13,className:"shrink-0 text-muted"}),_.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:te.text}),te.dispatchState!=="blocked"&&_.jsx("span",{className:"shrink-0 text-sm text-muted",children:te.dispatchState==="retrying"?wMn(te.nextRetryAt,fn):f8e()}),te.dispatchState==="blocked"?_.jsxs(_.Fragment,{children:[_.jsx("button",{onClick:()=>void Oo(te.id),"aria-label":HJ({text:te.text}),disabled:St!==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:St===te.id?OL():si()}),_.jsx("button",{onClick:()=>to(te.id),"aria-label":DJ({text:te.text}),disabled:St!==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()}),pe===Za&&peto(te.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(br,{size:11})})]},te.id))}),Ac&&_.jsxs("div",{id:Mo,role:"note",className:`composer-demo-hint ${rM}`,children:[_.jsx(Ah,{size:16,className:"shrink-0 text-primary"}),_.jsx("span",{className:"flex-1",dir:"auto",children:iwe()}),_.jsx($t,{size:"small","aria-label":s1(),title:s1(),onClick:()=>{var te;Re(!0),(te=Pn.current)==null||te.focus()},children:_.jsx(br,{size:14})})]}),b&&!Fe&&c&&_.jsxs("div",{role:"note",className:`composer-demo-run-hint ${rM}`,children:[_.jsx(Ah,{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:AN()}),_.jsxs(Ie,{size:"small",onClick:()=>c(b,"keepOpen"),children:[_.jsx(xo,{size:14}),C3()]}),_.jsx("span",{children:jN()})]}),_.jsx($t,{size:"small","aria-label":s1(),title:s1(),onClick:()=>{var te;Xe(!0),(te=Pn.current)==null||te.focus()},children:_.jsx(br,{size:14})})]}),_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:b?`${AN()} ${C3()} ${jN()}`:""}),_.jsxs("div",{className:`composer-box relative flex flex-col border ${Ji?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[ut&&!ut.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:ut.catalogPending?_.jsxs("span",{children:[ut.name," — ",ff()]}):_.jsxs(_.Fragment,{children:[_.jsxs("strong",{children:[ut.name," ",M4e()]})," ",ut.agentNote?Hu(ut.agentNote):C8e()]})}),Qa&&_.jsx(OPn,{skills:ns,activeIndex:Ni,onPick:Wi,onHover:ci}),Wn&&_.jsx(BPn,{activeSessionId:H,onClose:()=>Ln(!1),onResume:te=>{Ln(!1),oe("all"),x(te.id,{projectId:te.projectId})},onImport:te=>{Ln(!1),r_(te)}}),Te.length>0&&_.jsx(lFn,{annotations:Te,onClear:()=>{$e([]),window.requestAnimationFrame(()=>{var te;return(te=Pn.current)==null?void 0:te.focus()})},onRemove:te=>{const pe=Te.filter(ze=>ze.id!==te);$e(pe),pe.length===0&&window.requestAnimationFrame(()=>{var ze;return(ze=Pn.current)==null?void 0:ze.focus()})}}),Mt.length>0&&_.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:Mt.map((te,pe)=>{const ze=()=>jt(Oe=>Oe.filter((Pe,yt)=>yt!==pe));return te.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:te.name,children:[_.jsx(Kb,{size:22}),_.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:te.name??"document.pdf"}),_.jsx("button",{title:BN(),"aria-label":BN(),onClick:ze,children:_.jsx(br,{size:11})})]},pe):_.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:te.dataUrl,alt:tL()}),_.jsx("button",{title:PN(),"aria-label":PN(),onClick:ze,children:_.jsx(br,{size:11})})]},pe)})}),Ft&&_.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Ft}),ht&&_.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:ht}),_.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${Ji?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[_.jsx("textarea",{dir:"auto",ref:Pn,"aria-describedby":Ac?Mo:void 0,className:"relative z-1 bg-transparent",value:ce,placeholder:_i?aNe():Vf&&ut?dEe({harness:Ce(yu[ut.id]),shortcut:Ce(__)}):Yt?ut!=null&&ut.agentReady?B1e({harness:Ce(yu[Yt.harness])}):C1e({harness:Ce(yu[Yt.harness])}):w0e(),rows:2,onPaste:Si,onDragOver:te=>{te.dataTransfer.types.includes("Files")&&te.preventDefault()},onDrop:te=>{te.dataTransfer.files.length!==0&&(te.preventDefault(),or(Array.from(te.dataTransfer.files)))},onChange:te=>{const pe=te.target.value,ze=te.target.selectionStart;Gs(ze);const Oe=ze>0&&/\s/.test(pe[ze-1])&&!_i&&!Vs.current&&GR(pe)===null?k4(pe,ze-1):null,Pe=Oe&&dk(Oe.query),yt=Oe?(pe.slice(0,Oe.start)+pe.slice(Oe.end)).trim():"";if(Oe&&Pe&&(Pe==="plan"||!S4(Pe)&&!yt)&&li.some(Kt=>Kt.name===Pe)){Sc(Pe,pe,Oe);return}me(pe),Fr(!1)},onSelect:te=>Gs(te.currentTarget.selectionStart),onCompositionStart:()=>{Vs.current=!0},onCompositionEnd:()=>{Vs.current=!1},onKeyDown:te=>{if(Qa){if(te.key==="ArrowDown"||te.key==="ArrowUp"){te.preventDefault();const pe=te.key==="ArrowDown"?1:-1;ci((Ni+pe+ns.length)%ns.length);return}if(te.key==="Tab"||te.key==="Enter"){te.preventDefault(),Wi(ns[Ni]);return}if(te.key==="Escape"){te.preventDefault(),Fr(!0);return}}if(te.key==="Backspace"&&Ks(te.currentTarget)){te.preventDefault();return}if(te.key==="Enter"&&!te.shiftKey&&!te.nativeEvent.isComposing){if(te.preventDefault(),Ji){Qf();return}Dl({queue:te.metaKey||te.ctrlKey})}}}),_.jsx(MPn,{text:ce,editingTokenEnd:Mr==null?void 0:Mr.end,isCommand:Rl,skills:li,projectId:e,textareaRef:Pn})]}),_.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:En.ref,children:[_.jsx($t,{type:"button",className:"composer-bare",title:cw(),"aria-label":cw(),"aria-haspopup":"dialog","aria-expanded":En.open,onClick:()=>En.setOpen(te=>!te),children:_.jsx(WCn,{size:16})}),En.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:cw()}),_.jsx(PMn,{})]})]}),_.jsx("input",{ref:Ot,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:te=>{or(Array.from(te.target.files??[])),te.target.value=""}}),_.jsx($t,{type:"button",className:"composer-attach",title:SN(),"aria-label":SN(),onClick:()=>{var te;return(te=Ot.current)==null?void 0:te.click()},children:_.jsx(zCn,{size:16})}),Qs&&_.jsxs(Ie,{type:"button",variant:"ghost",active:!0,className:"group max-w-60",title:zN({goal:ua(Qs)}),"aria-label":zN({goal:ua(Qs)}),onClick:()=>void Yi("clear"),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(x$,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(br,{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:E4e()})]}),Xi&&_.jsxs(Ie,{type:"button",variant:"ghost",active:!0,className:"group",title:ON(),"aria-label":ON(),onClick:()=>void kc(),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(iCn,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(br,{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()})]}),Ji&&_.jsxs(Ie,{type:"button",variant:"ghost",active:!0,className:"group",title:MN(),"aria-label":MN(),onClick:Ta,children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(Of,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(br,{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:YD()})]}),_.jsx("div",{className:"min-w-0 flex-1"}),_.jsxs("div",{className:"flex min-w-0 items-center",children:[_.jsx(C8n,{value:Yt,onSelect:jl,onOpenSettings:()=>a("harnesses"),permissionChoices:ut!=null&&ut.agentReady?(Pt==null?void 0:Pt.permissionModes)??[]:[],defaultPermissionId:(Pt==null?void 0:Pt.defaultPermissionMode)??null,onSelectPermission:_r,reasoningChoices:ut!=null&&ut.agentReady?zi.choices:[],defaultReasoningId:zi.defaultId,onSelectReasoning:Is,autonomy:(Ct==null?void 0:Ct.autonomy)??j,onSelectAutonomy:rs,lockHarness:!!Ct,openRequest:n_}),_.jsx(LPn,{usage:Ct==null?void 0:Ct.contextUsage})]}),Qn&&!_i?_.jsx($t,{className:"send-btn",variant:"stop",title:GN(),"aria-label":GN(),onClick:c_,children:_.jsx(br,{size:16})}):_.jsx($t,{className:`send-btn ${Ac&&(ut!=null&&ut.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:Ji?HN():S3(),"aria-label":Ji?HN():S3(),onClick:()=>void(Ji?Qf():Dl()),disabled:Ji?!Ci||!H&&!(ut!=null&&ut.agentReady):!(ut!=null&&ut.agentReady)||!ce.trim()&&Mt.length===0&&Te.length===0,children:_.jsx(v$,{size:16})})]})]})]})]})]})}const rM="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",oHn=[],cHn=[];function ca({className:e,...n}){return _.jsx("div",{className:Ss("relative flex min-h-0 flex-1 flex-col",e),...n})}function rh({className:e,...n}){return _.jsx("div",{className:Ss("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function nc({className:e,...n}){return _.jsx("div",{className:Ss("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const sM=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function lHn({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c}){var k;const u=_t(ic(n)),h=((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)},[h]),T.useEffect(()=>{const v=f.current,b=p.current;if(!v||!b)return;const y=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return y.observe(b),y.observe(v),()=>y.disconnect()},[h===null]),h===null)return _.jsx(ca,{children:_.jsx("div",{className:sM,children:_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:lI()})})});let w=null;for(const v of h)if(w=vb(v.parts,t),w)break;return _.jsx(ca,{children:_.jsx("div",{className:sM,ref:f,onScroll:v=>{const b=v.currentTarget;m.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:_.jsx("div",{ref:p,children:w?_.jsx(FH,{projectId:e,sessionId:n,children:_.jsx(WFn,{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:jpn()})})})})}function uHn({experiment:e}){var s;const n=_t(EB(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return _.jsx(rh,{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:[wpe()," ",Ce(r)]}):t?t.diff.trim()?_.jsxs(_.Fragment,{children:[t.truncated&&_.jsx(fP,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),_.jsx(hP,{diff:t.diff,partial:t.truncated})]}):_.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?Lpe():ppe()}):_.jsx(nc,{children:jpe()})})}function Cq({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:sL()})]}),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(Im,{size:12}),_.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&_.jsx(Qh,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:_.jsx(ty,{size:13})}),_.jsx("span",{className:"flex-1"}),_.jsx($t,{title:XN(),"aria-label":XN(),onClick:c,children:o?_.jsx(Nt,{}):_.jsx(DCn,{size:13})})]})}const _Hn=/\.(md|mdx|markdown)$/i,fHn=/\.tex$/i,dHn=/\.html?$/i,hHn=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,pHn=/\.(csv|tsv|xlsx?|ods)$/i,mHn=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,gHn=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,vHn=/\.pdf$/i,bHn=/\.(docx?|log|rtf|txt)$/i;function yHn(e){return hHn.test(e)}function OC(e){return _Hn.test(e)}function Eq(e){return fHn.test(e)}function xHn(e){return dHn.test(e)}function Ph({name:e}){const n=OC(e)?"markdown":yHn(e)?"image":pHn.test(e)?"spreadsheet":mHn.test(e)?"code":gHn.test(e)?"archive":vHn.test(e)?"pdf":bHn.test(e)||Eq(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 Nq(e,n){const t=navigator.clipboard;if(!t){sn(cL(),"error");return}t.writeText(`${e.replace(/[\\/]+$/,"")}/${n}`).then(()=>sn(_f(),"success")).catch(r=>sn(r instanceof Error?r.message:String(r),"error"))}function zq({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(Kr,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":ePe({path:Ce(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 jq(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 Aq({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,h]=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 h({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 b;(b=o.current)!=null&&b.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(yn,{size:"compact",role:"menuitem",danger:k,onClick:()=>f(w),children:_.jsx("span",{children:m})});return ai.createPortal(_.jsxs("div",{ref:o,role:"menu","aria-label":PBe({path:Ce(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 b,y;if(m.key!=="ArrowDown"&&m.key!=="ArrowUp")return;m.preventDefault();const w=[...((b=o.current)==null?void 0:b.querySelectorAll("button"))??[]],k=w.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:w[0]),v=m.key==="ArrowDown"?1:-1;(y=w[(k+v+w.length)%w.length])==null||y.focus()},children:[p(KBe(),n),t&&p(JD(),t),r&&p(MBe(),r),p(hde(),s),i&&p(ZD(),i,!0)]}),document.body)}const bk=["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(" "),iM=["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 aM(){return{dirs:new Map,files:[]}}function Tq(e){const n=aM();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?_.jsx(pc,{size:13,className:iM}):_.jsx(Ka,{size:13,className:iM}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&_.jsx(DC,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:c,onRename:u,onCancelRename:h})]})}function DC({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u}){const h=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),f=[...e.files].sort((p,m)=>p.localeCompare(m));return _.jsxs(_.Fragment,{children:[h.map(p=>{const m=n?`${n}/${p}`:p;return _.jsx(wHn,{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:bk,style:{paddingInlineStart:8+t*14},children:[_.jsx(Ph,{name:p}),_.jsx(zq,{name:p,onCommit:k=>c(m,k),onCancel:u})]},`f:${m}`);const w=Wr(k=>i(m,k));return _.jsxs("button",{type:"button",className:bk,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:oZ({name:Ce(m)}),children:[_.jsx(Ph,{name:p}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function kHn({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var N,j;const c=t.branchName,u=_t({...zB(e,{ref:c}),enabled:r==="files",subscribed:r==="files"}),h=_t({...eb(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=EB(t.id),k=$K({queryKey:w.queryKey})>0,v=(j=h.data)!=null&&j.exists&&h.data.branch===c?t.chatSessionId??void 0:void 0,b=()=>{u.refetch()},y=T.useMemo(()=>f?Tq(f.entries):null,[f]),x=r==="files"?m:k,C=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(Cq,{view:r,onViewChange:i,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?qb(n.githubOwner,n.githubRepo,c):void 0,githubTitle:GD({branch:Ce(c)}),refreshing:x,onRefresh:()=>r==="files"?b():void et.invalidateQueries(w)}),r==="changes"?_.jsx(uHn,{experiment:t},t.id):_.jsxs(_.Fragment,{children:[(f==null?void 0:f.truncated)&&_.jsx(nc,{children:Vze()}),p&&y&&_.jsxs(nc,{children:[aje()," ",Ce(p)]}),_.jsx(rh,{children:y?y.dirs.size===0&&y.files.length===0?_.jsx(nc,{children:Jze()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(DC,{node:y,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(A,z)=>v?o(A,v,void 0,z):o(A,void 0,c,z)})}):_.jsx(nc,{children:p?dS({error:Ce(p)}):hS()})})]})]})}function LC({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 SHn({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var $,L,F;const c=n.id,h=(($=_t(Gi(c)).data)==null?void 0:$.some(U=>U.id===e&&U.busy))??!1,f=_t({...eb(e??""),enabled:!!e,refetchInterval:h?5e3:!1}),p=f.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},w=_t({...zB(c,m),enabled:!e||f.isSuccess,refetchInterval:h?5e3:!1}),k=w.data,v=(L=f.error??w.error)==null?void 0:L.message,b=f.isFetching||w.isFetching,[y,x]=T.useState(null),[C,N]=T.useState(null),j=T.useCallback(()=>{e&&et.invalidateQueries(eb(e)),et.invalidateQueries({queryKey:zt("getCodeTree",c),predicate:U=>!ID(U)})},[e,c]),A=T.useRef(h);T.useEffect(()=>{A.current&&!h&&j(),A.current=h},[h,j]);const z=T.useMemo(()=>k?Tq(k.entries):null,[k]),M=T.useCallback(U=>{const H=new Set(r);H.has(U)?H.delete(U):H.add(U),i(H)},[r,i]),D=e&&(p!=null&&p.exists)?p:null,I=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?W2n({branch:Ce(D.baselineBranch)}):yS()),B=((F=D==null?void 0:D.files)==null?void 0:F.length)??0,G=D?O2n({branch:Ce(`${I}${B>0?"*":""}`)}):F2n({branch:Ce(n.baselineBranch)}),q=D?D.branch:n.baselineBranch,Q=(U,H)=>D?a(U,e,void 0,H):a(U,void 0,n.baselineBranch,H),K=(k==null?void 0:k.root)==="worktree",Z=async(U,H)=>{try{await c4n(c,U,H,{sessionId:e}),j()}catch(ae){sn(ae instanceof Error?ae.message:String(ae),"error")}},J=U=>{const H=(k==null?void 0:k.path)??n.repoPath;Nq(H,U)};return _.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[_.jsx(Cq,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:G,branchTitle:G,githubHref:n.githubEnabled&&q?qb(n.githubOwner,n.githubRepo,q):void 0,githubTitle:q?GD({branch:Ce(q)}):void 0,refreshing:b,onRefresh:j}),v&&(p||k)&&_.jsxs(nc,{children:[jwn()," ",Ce(v)]}),!k||e&&!p?_.jsx(rh,{children:_.jsx(nc,{children:v?dS({error:Ce(v)}):hS()})}):D&&t==="changes"?_.jsx(rh,{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:pwn()}):_.jsxs(_.Fragment,{children:[D.diff.truncated&&_.jsx(fP,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),_.jsx(hP,{diff:D.diff.diff,partial:D.diff.truncated})]})}):_.jsxs(rh,{children:[k.truncated&&_.jsx(nc,{children:twn()}),z?z.dirs.size===0&&z.files.length===0?_.jsx(LC,{icon:Fu,title:wwn(),description:SVe()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(DC,{node:z,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:Q,renamingPath:C,onContextMenu:(U,H)=>{x(jq(U,H))},onRename:(U,H)=>{N(null),Z(U,{action:"rename",newName:H})},onCancelRename:()=>N(null)})}):_.jsx(nc,{children:cwn()})]}),y&&_.jsx(Aq,{target:y,onOpen:()=>Q(y.path,"keepOpen"),onRename:K&&o(y.path)?()=>N(y.path):void 0,onDuplicate:K?()=>void Z(y.path,{action:"duplicate"}):void 0,onCopyPath:()=>J(y.path),onDelete:K?()=>{window.confirm(EBe({path:Ce(y.path)}))&&Z(y.path,{action:"delete"})}:void 0,onClose:()=>x(null)})]})}function Rq({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=T.useMemo(()=>{if(!e)return[];const h=e.replace(/\r\n?/g,` -`),f=gB(h,YS(n));return h.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 h;r!==void 0&&(a?((h=o.current)==null||h.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:c}=J$(i.length),u=T.useMemo(()=>i.map((h,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:`${Z$} 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 ${Zv} ${Y$}`,children:vB(h)?_.jsx("br",{}):h})]},f)),[i,c,a]);return _.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${Zv}`,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 CHn="modulepreload",EHn=function(e){return"/"+e},oM={},NHn=function(n,t,r){let s=Promise.resolve();if(t&&t.length>0){let a=function(u){return Promise.all(u.map(h=>Promise.resolve(h).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=EHn(u),u in oM)return;oM[u]=!0;const h=u.endsWith(".css"),f=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const p=document.createElement("link");if(p.rel=h?"stylesheet":CHn,h||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),h)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)})},bb=T.createContext(null);function zHn({url:e,name:n}){return _.jsx(Qh,{size:"small",href:e,download:n,"aria-label":Mv({name:Ce(n)}),"data-tip":Mv({name:Ce(n)}),"data-tip-align":"end",children:_.jsx(Vb,{size:13})})}const jHn=T.lazy(()=>NHn(()=>import("./PdfPreview-DfZYK3-b.js"),__vite__mapDeps([0,1])).catch(e=>(console.error("PDF viewer failed to load",e),{default:Oq})));function Mq(e){return e==="image"||e==="audio"||e==="video"||e==="pdf"?e:null}function Oq({url:e,name:n}){return _.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[ant()," ",_.jsxs("a",{href:e,download:n,children:[E3()," ",Ce(n)]})]})}function yk({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(Oq,{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(Nt,{})}),children:_.jsx(jHn,{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&&ai.createPortal(_.jsx(zHn,{url:n,name:t}),a)]})}const AHn=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 Dq(e,n=!0){return _t({...AHn(e),enabled:n,subscribed:n}).data??null}function THn(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function RHn(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 h=u.join("/");if(!h)return null;const f=new URLSearchParams(c);f.delete("path");const p=f.toString();return{path:h,url:`${hf(e,h)}${p?`&${p}`:""}${i}`}}function MHn(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` ----`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const Lq="orx:files-tree-width",Iq="orx:artifacts-collapsed:",$q=180,Bq=320,OHn=8,DHn=280;function LHn(){try{const e=Number(localStorage.getItem(Lq));if(Number.isFinite(e)&&e>=$q&&e<=Bq)return e}catch{}return DHn}function IHn(e){try{const n=localStorage.getItem(`${Iq}${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 nm(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=nm(t.children??[],n);if(r)return r}}return null}function Pq({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(THn(i))return i;const a=RHn(e,n,i);if(!a)return null;const o=nm(r,a.path);if(!o)return a.url;const c=a.url.indexOf("#"),u=c===-1?a.url:a.url.slice(0,c),h=c===-1?"":a.url.slice(c);return`${u}&v=${o.modifiedAt}:${o.size}${h}`};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(HRn,{remarkPlugins:[LH,[IH,qH]],rehypePlugins:[_H],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},...UH},children:BH(MHn(t))})})}function $Hn(e){return e.presentation==="text"&&OC(e.name)?"markdown":Mq(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function BHn(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=NI,i=T6(e,n.path),a=_t({...i,enabled:s,subscribed:s}),o=T.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});T.useEffect(()=>{const h=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&h.projectId===e&&h.path===n.path&&(h.modifiedAt!==n.modifiedAt||h.size!==n.size||h.version!==null&&h.version!==r)&&et.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?xde():null),wantsText:s}}function PHn({projectId:e,entry:n,onDelete:t,artifactEntries:r}){const s=$Hn(n),i=Dq(hf(e,n.path)),{text:a,binary:o,truncated:c,error:u,wantsText:h}=BHn(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("/"),b=`${hf(e,n.path)}&v=${encodeURIComponent(i??`${n.modifiedAt}:${n.size}`)}`;let y;return s==="image"||s==="audio"||s==="video"||s==="pdf"?y=_.jsx(bb.Provider,{value:m,children:_.jsx(yk,{kind:s,url:b,name:n.name})}):s==="download"||!h||o?y=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[s==="download"||o?ode():cpe()," ",_.jsx("a",{href:b,...s==="download"||o?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:s==="download"||o?lL():zde()})]}):u?y=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[the()," ",Ce(u)]}):a===null?y=_.jsxs(Qr,{children:[_.jsx(Nt,{})," ",QD()]}):k&&!f?y=_.jsx(Pq,{projectId:e,folder:v,markdown:a,entries:r}):y=_.jsx(Rq,{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(Ph,{name:n.name}),_.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ce(n.path),children:n.name}),_.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0 @max-xl:hidden",children:[Dhe()," ",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:ul(n.size)}),k&&_.jsx($t,{size:"small",active:f,"data-tip":f?Dv():Fd(),"data-tip-align":"end","aria-label":f?Dv():Fd(),onClick:()=>p(x=>!x),children:_.jsx(i5,{size:13})}),_.jsx(Qh,{size:"small",href:b,target:"_blank",rel:"noopener noreferrer","data-tip":mN(),"data-tip-align":"end","aria-label":mN(),children:_.jsx(gf,{size:13})}),_.jsx($t,{size:"small","data-tip":pN(),"data-tip-align":"end","aria-label":pN(),onClick:()=>{window.confirm(uS({path:Ce(n.path)}))&&t(n.path)},children:_.jsx(Df,{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:[y,c&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:che()})]})]})}function Fq({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,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,OHn)*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?Ofe({name:Ce(p.name)}):ede({name:Ce(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},children:_.jsx(Ka,{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($t,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":Wde(),"data-tip-align":"end","aria-label":Kfe({name:Ce(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(uS({path:Ce(p.path)}))&&o(p.path)},children:_.jsx(Df,{size:12})})]}),k&&(((w=p.children)==null?void 0:w.length)??0)>0&&_.jsx(Fq,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,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(Ph,{name:p.name}),_.jsx(zq,{name:p.name,onCommit:k=>h(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:yX({path:Ce(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(Ph,{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 FHn({project:e,artifacts:n,onOpenFile:t,canRenameFile:r}){const[s,i]=T.useState(null),[a,o]=T.useState(()=>IHn(e.id)),[c,u]=T.useState(LHn),[h,f]=T.useState(null),[p,m]=T.useState(null),w=T.useRef(null);T.useEffect(()=>{try{localStorage.setItem(`${Iq}${e.id}`,JSON.stringify([...a]))}catch{}},[e.id,a]);const k=j=>{var I;j.preventDefault(),j.currentTarget.setPointerCapture(j.pointerId);const A=(I=w.current)==null?void 0:I.getBoundingClientRect(),z=document.body.style.userSelect;document.body.style.userSelect="none";const M=B=>{const G=Math.round(B.clientX-((A==null?void 0:A.left)??0)),q=Math.min(Math.max(G,$q),Bq);u(q);try{localStorage.setItem(Lq,String(q))}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 j=nm(n.entries,s);(!j||j.isDir)&&i(null)},[s,n]);const v=j=>o(A=>{const z=new Set(A);return z.has(j)?z.delete(j):z.add(j),z}),b=j=>{(s===j||s!=null&&s.startsWith(j+"/"))&&i(null),h3n(e.id,j).catch(()=>{})},y=async(j,A)=>{try{await p3n(e.id,j,A),A.action==="rename"&&s===j&&i(null)}catch(z){sn(z instanceof Error?z.message:String(z),"error")}},x=j=>{n&&Nq(n.dir,j)};if(!n)return _.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:_.jsxs(Qr,{className:"p-5",children:[_.jsx(Nt,{})," ",zhe()]})});const C=j=>_.jsx(Fq,{entries:j,depth:0,collapsed:a,selected:s,onToggle:v,onSelect:i,onOpenFile:t,onDelete:b,renamingPath:p,onContextMenu:(A,z)=>{f(jq(A,z))},onRename:(A,z)=>{m(null),y(A,{action:"rename",newName:z})},onCancelRename:()=>m(null)}),N=s?nm(n.entries,s):null;return n.entries.length===0?_.jsx(LC,{icon:LS,title:Hhe(),description:tpe()}):_.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:phe()})]})]}),N?_.jsx(PHn,{projectId:e.id,entry:N,onDelete:b,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(kCn,{size:22,strokeWidth:1.5}),_.jsx("span",{children:Dde()})]}),h&&_.jsx(Aq,{target:h,onOpen:()=>t(h.path),onRename:r(h.path)?()=>m(h.path):void 0,onDuplicate:()=>void y(h.path,{action:"duplicate"}),onCopyPath:()=>x(h.path),onDelete:()=>{window.confirm(uS({path:Ce(h.path)}))&&b(h.path)},onClose:()=>f(null)})]})}const Hq=20*1024*1024,qq="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",Uq="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",HHn="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",qHn="text-sm font-normal text-text",UHn="mt-1 mb-0 text-sm leading-relaxed text-text";function Gq(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 GHn(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function Vq({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(Nt,{}),_.jsx("span",{children:qun()})]}):_.jsxs(_.Fragment,{children:[_.jsx(ZCn,{size:20,strokeWidth:1.5}),_.jsx("span",{children:t})]})]})}function Kq({bytes:e,updatedAt:n}){return _.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[ul(e),n>0&&_.jsxs("span",{className:"text-muted",children:[" · ",yo(n)]})]})}function VHn({skill:e,onError:n}){const t=gn({mutationFn:$3n}),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:qHn,children:e.name}),e.origin&&_.jsx(Wt,{size:"small",children:e.origin})]}),_.jsx(Kq,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx($t,{size:"small","data-tip":e.origin?Vcn():Fln(),"data-tip-align":"end","aria-label":e.origin?aln({name:Ce(e.name)}):$on({name:Ce(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?Jcn({name:Ce(e.name)}):Ton({name:Ce(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:_.jsx(Df,{size:13})})]})}function KHn({template:e,onError:n}){const t=gn({mutationFn:D3n}),r=t.isPending,s=e.supportFiles.length;return _.jsxs("div",{className:HHn,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:UHn,children:[e.entry,s>0&&(s===1?Rcn():dln({count:Zt(s)}))]})]}),_.jsx(Kq,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx($t,{"data-tip":Wln(),"data-tip-align":"end","aria-label":Zon({name:Ce(e.name)}),disabled:r,onClick:()=>{window.confirm(Gon({name:Ce(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:_.jsx(Df,{size:13})})]})}function WHn(){var y;const e=gn({mutationFn:I3n}),n=_t(A5n()),t=n.data,r=T.useRef(null),[s,i]=T.useState(!1),[a,o]=T.useState(!1),c=T.useCallback(()=>{const x=r.current;i(!!x&&x.scrollTop>1),o(!!x&&x.scrollHeight-x.scrollTop-x.clientHeight>1)},[]);T.useLayoutEffect(()=>{c();const x=r.current;if(!x)return;const C=new ResizeObserver(c);return C.observe(x),()=>C.disconnect()},[t,c]);const u=n.isFetching,h=(y=n.error)==null?void 0:y.message,[f,p]=T.useState(!1),[m,w]=T.useState(null),k=()=>{n.refetch()},v=T.useRef(!1),b=T.useCallback(async x=>{if(!v.current){if(w(null),!GHn(x.name)){w(r_n());return}if(x.size>Hq){w(aI());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:x.name,contentBase64:await Gq(x)})}catch(C){w(C instanceof Error?C.message:String(C))}finally{v.current=!1,p(!1)}}},[]);return _.jsxs("section",{className:qq,children:[_.jsxs("div",{className:"flex items-baseline gap-2.5",children:[_.jsx("h3",{children:Lun()}),_.jsxs(Ie,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[_.jsx(Wa,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),_.jsx("p",{className:Uq,children:icn()}),_.jsx(Vq,{accept:".md,.markdown,.zip",busy:f,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:fcn()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:Son()})]}),onFile:x=>void b(x)}),m&&_.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),h&&_.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[yln()," ",h]}),t===void 0?h?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(Nt,{})," ",cun()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:wun()}):_.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(x=>_.jsx(VHn,{skill:x,onError:w},x.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 QHn(){var h;const e=gn({mutationFn:O3n}),n=_t(j5n()),t=n.data,r=(h=n.error)==null?void 0:h.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(u_n());return}if(f.size>Hq){o(aI());return}c.current=!0,i(!0);try{await e.mutateAsync({filename:f.name,contentBase64:await Gq(f)})}catch(m){o(m instanceof Error?m.message:String(m))}finally{c.current=!1,i(!1)}},[]);return _.jsxs("section",{className:qq,children:[_.jsx("h3",{children:tun()}),_.jsx("p",{className:Uq,children:Xun()}),_.jsx(Vq,{accept:".tex,.zip",busy:s,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:bcn()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:Xpn()})]}),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:[Nln()," ",r]}),t===void 0?r?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(Nt,{})," ",pun()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:jun()}):_.jsx("div",{className:"flex flex-col mt-1",children:t.map(f=>_.jsx(KHn,{template:f,onError:o},f.name))})]})}function XHn(){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:Oln()}),_.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:Bcn()}),_.jsx(WHn,{}),_.jsx(QHn,{})]})}const YHn="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Uo({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?YHn:""}`,onClick:i,onDoubleClick:a,title:s?qpn({label:n}):n,"aria-label":s?Lpn({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(br,{size:12})})]})}const cM=["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 ZHn({owner:e,repo:n,branch:t}){return!e||!n?_.jsx("span",{className:cM,children:_.jsx("code",{children:t})}):_.jsxs("a",{className:cM,href:qb(e,n,t),target:"_blank",rel:"noopener noreferrer",title:Ov({name:Ce(t)}),children:[_.jsx("code",{children:t}),_.jsx(ty,{size:12})]})}const O4=["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(" "),lM=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function uM(e){return new Date(e).toLocaleString(E(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function _M(e,n){return I0((e.endedAt??n)-e.createdAt)}function JHn({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=mI(r),c=r.some(f=>f.status==="running"||f.status==="starting"),[u,h]=T.useState(()=>Date.now());return T.useEffect(()=>{if(!c)return;h(Date.now());const f=window.setInterval(()=>h(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?ha(a):"idle"})]}),_.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&_.jsxs(Ie,{...Wr(f=>s(a.id,f)),children:[_.jsx(xo,{size:15}),XLe()]}),_.jsxs(Ie,{...Wr(i),children:[_.jsx(Wb,{size:15}),tLe()]})]}),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:wLe()}),_.jsx(uc,{text:e.description})]}),_.jsxs("section",{className:O4,children:[_.jsx("h2",{children:a?WDe():SIe()}),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:ha(a)}),_.jsx(XS,{backend:a.backend}),_.jsxs("span",{title:gIe(),children:[_.jsx(o6n,{size:13}),uM(a.createdAt)]}),_.jsxs("span",{title:jLe(),children:[_.jsx(y6n,{size:13}),_M(a,u)]}),a.commitSha&&_.jsxs("span",{title:cLe(),children:[_.jsx(X6n,{size:14}),_.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&_.jsxs("span",{children:[LLe()," ",a.exitCode]})]}),a.command&&_.jsxs("code",{className:lM,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(uc,{text:a.resultMarkdown})})]})]}),_.jsxs("section",{className:O4,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(ZHn,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&_.jsxs("span",{children:[qLe()," ",_.jsx("code",{children:n.slug})]}),_.jsxs("span",{title:uM(e.createdAt),children:[pLe()," ",yo(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&_.jsxs("code",{className:lM,children:["$ ",e.runCommand]})]}),r.length>0&&_.jsxs("section",{className:O4,children:[_.jsx("h2",{children:uIe()}),_.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",{...Wr(m=>s(f.id,m)),children:[_.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[rIe()," ",r.length-p]}),_.jsx(pl,{status:ha(f)}),_.jsx("span",{children:yo(f.createdAt)}),_.jsx("span",{children:_M(f,u)}),_.jsx(xo,{size:13})]},f.id))})]})]})})}function fM(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}=Xb(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 n4n(e,a);if(i)return;if(f.dataBase64&&r.write(fM(f.dataBase64)),a=f.nextOffset,f.eof)break}}catch{}finally{o=!1,c&&!i&&(c=!1,u())}}const h=$5n(e,f=>{if(i)return;const p=fM(f.dataBase64);!o&&f.offset===a?(r.write(p),a+=p.length):f.offset+p.length>a&&u()});return u(),()=>{i=!0,h(),s()}},[e]),_.jsx("div",{ref:n,className:"h-full w-full"})}function tqn({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:c}){const u=r.filter(h=>h.experimentId===e.id).sort((h,f)=>f.createdAt-h.createdAt);return t==="overview"?_.jsx(JHn,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(h,f)=>o("terminal",h,f),onOpenCode:h=>c("files",h)}):_.jsx(nqn,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function nqn({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=T.useState(null),[a,o]=T.useState(null),[c,u]=T.useState(!1),h=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 b=n.findIndex(y=>y.id===v);return b===-1?n.length:n.length-b};T.useEffect(()=>{if(!c)return;const v=b=>{var y;(y=h.current)!=null&&y.contains(b.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 bI(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(Ie,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[_.jsx(m$,{size:13}),m?dje():aL()]}),n.length>0&&f&&_.jsxs("div",{className:"run-history relative shrink-0",ref:h,children:[_.jsxs(Ie,{title:BOe(),"aria-expanded":c,onClick:()=>u(v=>!v),children:[_.jsxs("span",{children:[YN()," ",w(f.id)]}),_.jsx(pl,{status:m?"cancelling":ha(f)}),_.jsx(pc,{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(yn,{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:[YN()," ",w(v.id)]}),_.jsx(pl,{status:ha(v)}),_.jsx("span",{className:"ms-auto text-xs text-muted",children:yo(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(eqn,{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?po():EOe()})})]})}let xk=!1;function dM(e){xk=!0;try{return window.confirm(e)}finally{xk=!1}}const wk=e=>e.replace(/\r\n/g,` -`),hM=(e,n,t)=>{const r=wk(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r -`),conflict:null}},tl=e=>e.draft!==e.baseline,rqn=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),sqn=e=>e.crlf?e.draft.replace(/\n/g,`\r -`):e.draft;function iqn(e,n,t){return!tl(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class aqn{constructor(){Ys(this,"buffer",null);Ys(this,"listeners",new Set);Ys(this,"saving",!1);Ys(this,"saveError",null);Ys(this,"revision",0);Ys(this,"saveRevision",0);Ys(this,"getSnapshot",()=>this.buffer);Ys(this,"getRevision",()=>this.revision);Ys(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));Ys(this,"set",n=>{this.buffer=n,this.notify()});Ys(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});Ys(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});Ys(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&&(tl(this.buffer)||this.buffer.conflict!==null)}}function oqn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var Z,J,$;const c=_t({...k9n(),enabled:r,subscribed:r}),u=((Z=c.data)==null?void 0:Z.engine)??(c.isPending?void 0:null),h=((J=c.data)==null?void 0:J.hint)??null,f=(($=c.data)==null?void 0:$.installCommand)??null,[p,m]=T.useState(!1),[w,k]=T.useState(null),[v,b]=T.useState(null),[y,x]=T.useState(!1),[C,N]=T.useState(null),[j,A]=T.useState(null),[z,M]=T.useState(!1),[D,I]=T.useState(0),B=T.useCallback(L=>{M(L),L&&I(F=>F+1)},[]),G=T.useRef(o);G.current=o;const q=T.useRef(!1),Q=T.useRef(null),K=T.useCallback(()=>{if(q.current)return;Q.current=n,q.current=!0,m(!0);const L=G.current;A(null),b(null),N(null),f4n(e,n,{sessionId:t}).then(F=>{var H,ae;const U=F.pdfPath;if(F.ok&&U){k(ie=>({path:U,version:((ie==null?void 0:ie.version)??0)+1,source:L})),x(F.hadErrors),N(F.note),F.hadErrors&&b(((H=F.log)==null?void 0:H.trim())||null),B(!0);return}k(null),x(!1),N(F.note),M(!1),b(((ae=F.log)==null?void 0:ae.trim())||bJe())}).catch(F=>{k(null),x(!1),N(null),M(!1),A(F instanceof Error?F.message:String(F))}).finally(()=>{q.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:h,installCommand:f,compiling:p,compiled:w,stale:w!==null&&w.source!==o,log:v,builtWithErrors:y,note:C,error:j,showPdf:z,setShowPdf:B,viewNonce:D,compile:()=>{i==null||i(),K()},dismiss:()=>{A(null),b(null)}}}const cqn=3e4,lqn=3e4,uqn=5*6e4;function _qn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:c}){var ue,re,V,oe;const u=T.useMemo(()=>C9n(e,n,{sessionId:t}),[e,n,t]),h=_t({...u,enabled:r,subscribed:r}),f=((ue=h.data)==null?void 0:ue.hasToken)??!1,p=((re=h.data)==null?void 0:re.hasSession)??!1,m=((V=h.data)==null?void 0:V.link)??null,w=!h.isPending,[k,v]=T.useState(null),[b,y]=T.useState(0),[x,C]=T.useState(!1),[N,j]=T.useState(null),[A,z]=T.useState(null),[M,D]=T.useState(!1),I=T.useCallback(ce=>{Gn(u.queryKey)&&et.setQueryData(u.queryKey,me=>me&&{...me,hasSession:ce})},[u]),B=T.useCallback(ce=>{Gn(u.queryKey)&&et.setQueryData(u.queryKey,ce)},[u]);T.useEffect(()=>{j(null),y(0),L.current=!1,z(null),D(!1),K.current=!1},[r,e,n,t]),T.useEffect(()=>{D(!1)},[a]);const G=T.useRef(!1),q=T.useRef(c);q.current=c;const Q=T.useRef(o);Q.current=o;const K=T.useRef(!1),Z=T.useCallback(ce=>!f||!m||G.current||Q.current?!1:(G.current=!0,C(!0),z(null),w4n(e,n,{sessionId:t,resolve:ce}).then(me=>{K.current=!1,j(me),me.pulled.includes(n)&&(Q.current?D(!0):q.current(me.pulled))}).catch(me=>{K.current=!0,j(null),z(me instanceof Error?me.message:String(me))}).finally(()=>{G.current=!1,C(!1)}),!0),[e,n,t,f,m]),J=T.useRef(null),$=(k==null?void 0:k.state)==="live";T.useEffect(()=>{if(!r||!s||!w||!f||!m||o||$)return;const ce=`${n}:${m.projectId}:${a}`;J.current!==ce&&Z()&&(J.current=ce)},[r,s,w,f,m,n,a,o,x,Z,$]);const L=T.useRef(!1);!x&&N&&N.conflicts.length===0&&!A&&(L.current=!0);const F=r&&w&&!!m&&f&&p&&L.current,U=T.useRef(null),H=T.useRef(Promise.resolve()),ae=T.useRef(!1);ae.current=(k==null?void 0:k.state)==="stopped"&&k.error!=null;const ie=T.useRef(!1);return T.useEffect(()=>{if(!F)return;let ce=!1;const me=()=>{const Re=ie.current;ie.current=!1,!(!Re&&ae.current)&&(H.current=H.current.then(()=>{if(!ce)return g4n(e,n,{sessionId:t,retry:Re}).then(Fe=>{var Xe;ce||((U.current===null||((Xe=Fe.status)==null?void 0:Xe.state)==="stopped")&&v(Fe.status),U.current=Fe.key)}).catch(Fe=>{ce||v({state:"stopped",error:Fe instanceof Error?Fe.message:String(Fe),needsSession:!1,note:null})})}))};me();const ve=setInterval(me,lqn);return()=>{ce=!0,clearInterval(ve),U.current=null,v(null),H.current=H.current.then(()=>v4n(e,n,{sessionId:t})).catch(()=>{})}},[F,b,e,n,t]),T.useEffect(()=>U5n(ce=>{if(ce.key===U.current){if(ce.type==="live"){v(ce.status);return}ce.paths.includes(n)&&(Q.current?D(!0):q.current(ce.paths))}}),[n]),T.useEffect(()=>{if(!r||!s||!w||!f||!m||o||$)return;const ce=setInterval(()=>{G.current||K.current||et.fetchQuery({...E9n(e,n,{sessionId:t}),staleTime:0}).then(me=>{me.remoteChanged&&Z()}).catch(me=>{K.current=!0,z(me instanceof Error?me.message:String(me))})},cqn);return()=>clearInterval(ce)},[r,s,w,f,m,o,e,n,t,Z,$]),T.useEffect(()=>{if(!r||!s||!w||!f||!m||!$)return;const ce=setInterval(Z,uqn);return()=>clearInterval(ce)},[r,s,w,f,m,$,Z]),{hasToken:f,hasSession:p,live:k,retryLive:()=>{ie.current=!0,y(ce=>ce+1)},link:m,loaded:w,syncing:x,last:N,error:A??((oe=h.error)==null?void 0:oe.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>D(!1),uploadUrl:S4n(e,n,{sessionId:t}),saveToken:async ce=>{const me=await xI(ce);J.current=null,K.current=!1,z(null),Gn(u.queryKey)&&et.setQueryData(u.queryKey,ve=>ve&&{...ve,hasToken:me.hasToken})},saveSession:async ce=>{const me=await wI(ce,{host:m==null?void 0:m.host});I(me.hasSession),ie.current=!0,y(ve=>ve+1)},importSession:async()=>{const ce=await m4n({host:m==null?void 0:m.host});return I(ce.hasSession),ie.current=!0,y(me=>me+1),ce.source},linkProject:async ce=>{j(null),v(null),L.current=!1,J.current=null,B(await y4n(e,n,{project:ce,sessionId:t})),i==null||i()},unlink:async()=>{B(await x4n(e,n,{sessionId:t})),J.current=null,K.current=!1,j(null),z(null)},sync:ce=>{K.current=!1,Z(ce)&&(J.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}const pM=[{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"]}],fqn=4e6,dqn=200,mM=16e6,hqn=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)}),gM=e=>e.startsWith("//")?`https:${e}`:e;async function pqn(e,n){var s;let t=fqn;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>=dqn)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const h=u.headers.get("content-type")??"",f=Number(u.headers.get("content-length"));if(!c.some(w=>h.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 hqn(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function mqn(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(pM.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:u,typePrefixes:h}of pM){if(!o.matches(c))continue;const f=o.getAttribute(u);if(!f)continue;const p=n(f);p&&(p===f?o.setAttribute(u,gM(f)):s.push({element:o,attribute:u,url:p,typePrefixes:h}))}await pqn(s,t);for(const o of r.querySelectorAll("a[href]")){const c=o.getAttribute("href");!c||!nC(c)||(o.setAttribute("href",gM(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 gqn(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${mM-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>mM}}function vqn({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),gqn(e,n,t,c.signal).then(async({text:u,partial:h})=>({source:await mqn(u,s,c.signal),partial:h})).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(Nt,{})," ",uL()]}):_.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:RHe()}),_.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:BHe({name:Ce(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function bqn({overleaf:e}){var f;const n=T.useRef(null),{open:t,setOpen:r,ref:s}=Vi(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,h=u?A3():c?h1t():!e.hasToken||!e.link?jxt():e.syncing?jL():e.blocked?zL():CL();return T.useEffect(()=>{c&&r(!0)},[c,r]),T.useEffect(()=>{u&&sn(A3(),"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=b=>{var y;b.target instanceof Node&&!((y=s.current)!=null&&y.contains(b.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($t,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":h,"data-tip-align":"end","aria-label":oJ({status:h}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?_.jsx(Nt,{}):_.jsx(S6n,{size:13,className:u||c?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&ai.createPortal(_.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":WL(),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($t,{size:"small","aria-label":JFe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:_.jsx(br,{size:13})})}),_.jsx(Sqn,{overleaf:e})]}),document.body)]})}const L1=e=>ua(new Intl.ListFormat(E()).format(e.map(Ce)));function yqn(e){if(e.error)return evt();if(e.syncing)return jL();if(e.blocked)return zL();const n=e.last;return n?n.pulled.length&&n.pushed.length?Hyt({pulled:L1(n.pulled),pushed:L1(n.pushed)}):n.pulled.length?Dyt({paths:L1(n.pulled)}):n.pushed.length?Qyt({paths:L1(n.pushed)}):n.conflicts.length?tbt():CL():xyt()}function xqn({href:e}){return _.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:NL()})}function wqn(e){return e.state==="live"?xvt():e.state==="connecting"?hvt():e.error??Dvt()}function vM({overleaf:e,replacing:n}){const[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(!1),[c,u]=T.useState(null),h=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?Hxt():n?nxt():O1t();return _.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsx("p",{className:"text-sm text-subtext",children:f}),a&&_.jsx(Kr,{className:"basis-full min-w-0","aria-label":j3(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:j3(),autoComplete:"off"}),_.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&_.jsx(Nt,{}),a?_.jsx(Ie,{type:"button",disabled:s||!t.trim(),onClick:()=>h(()=>e.saveSession(t.trim())),children:s?ka():o1t()}):_.jsx(Ie,{type:"button",disabled:s,onClick:()=>h(e.importSession),children:F1t()}),_.jsx(Ie,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?EL():zyt()})]}),c&&_.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:c})]})}function kqn({overleaf:e}){if(!e.hasSession)return _.jsx(vM,{overleaf:e});const n=e.live;if(!n)return _.jsx("p",{className:"text-sm text-subtext",children:Hvt()});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:wqn(n)})]}),n.note&&_.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&_.jsx("div",{children:_.jsx(Ie,{onClick:e.retryLive,children:zvt()})}),t&&_.jsx(vM,{overleaf:e,replacing:!0})]})}function Sqn({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)},h=!e.hasToken||o;async function f(k){k.preventDefault();const v=n.trim();if(!(r||!v)){s(!0),a(null);try{h?(await e.saveToken(v),c(!1)):await e.linkProject(v),t("")}catch(b){a(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!h){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(Nt,{}),e.error?A3():yqn(e)]}),e.error&&_.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),_.jsx(kqn,{overleaf:e}),_.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[_.jsx(Ie,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?lxt():((m=e.live)==null?void 0:m.state)==="live"?t2t():void 0,onClick:()=>e.sync(),children:e.error?si():Wbt()}),_.jsxs(jh,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[Dbt()," ",_.jsx(gf,{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})," ",xbt()]}),_.jsxs("div",{className:"flex flex-wrap gap-2",children:[_.jsx(Ie,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"keep-local"}),children:zbt()}),_.jsx(Ie,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"take-overleaf"}),children:hyt()})]})]},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:SS()})}),_.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[_.jsx(Ie,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:Dz()}),_.jsx(jh,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:NL()}),_.jsx(Ie,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(v=>{a(v instanceof Error?v.message:String(v))}),children:tyt()})]})]})]})}return _.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:f,children:[_.jsx("div",{className:"pe-8 text-sm text-subtext",children:h?h2t():x2t()}),_.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[_.jsx(Kr,{className:"basis-full min-w-0","aria-label":h?Mz():Oz(),"aria-invalid":!!i,type:h?"password":"text",value:n,onChange:k=>t(k.target.value),placeholder:h?Mz():"https://www.overleaf.com/project/…",autoComplete:"off"}),_.jsx(Ie,{type:"submit",disabled:r||!n.trim(),children:r?h?ka():ba():h?wxt():ovt()}),_.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:h?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:h?x1t():Oz()})]}),(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(xqn,{href:e.uploadUrl}),o?_.jsx(Ie,{variant:"ghost",type:"button",onClick:()=>c(!1),children:EL()}):e.hasToken&&_.jsx(Ie,{variant:"ghost",type:"button",onClick:u,children:Dz()})]})]})}function Cqn({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($t,{"data-tip":n==="copied"?_f():n==="select"?vGe():KPe(),"aria-label":dFe(),onClick:()=>void s(),children:n==="copied"?_.jsx(yi,{size:13}):_.jsx(Mf,{size:13})})]})}function bM(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 Eqn({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:c,onScrollPositionChange:u,lineScrollRequest:h,onLineScrollRequestHandled:f,onEdit:p,artifactVersion:m,artifactEntries:w=[],bufferSession:k,remote:v=!1,restored:b=!1,onRestoreActivated:y,showSource:x=!1,onShowSourceChange:C}){var Pr,Us;const N=AB(e,n,t??"repo",r,s),j=_t({...N,enabled:!k.saving}),A=j.data??null,z=((Pr=j.error)==null?void 0:Pr.message)??null,M=We=>{Vr(N.queryKey,ft=>(typeof We=="function"?We(ft??null):We)??void 0)},[D,I]=T.useState(0),B=t==="artifacts",G=t==="abs",q=OC(n),Q=Eq(n),K=xHn(n),Z=q||K,[J,$]=T.useState(!1),L=!b||J,F=()=>{$(!0),y==null||y()};T.useSyncExternalStore(k.subscribe,k.getRevision);const U=k.getSnapshot(),H=k.set,ae=k.saving,ie=k.setSaving,ue=k.saveRevision,re=k.saveError,V=k.setSaveError,oe=T.useRef(null),ce=T.useRef(null),[me,ve]=T.useState(!1),[Re,Fe]=T.useState(null),Xe=T.useRef(c),Te=(A==null?void 0:A.file)??null,$e=U&&tl(U)?U.path:(A==null?void 0:A.source)==="checkout"?A.file.path:n,wt=$e.split("/").slice(0,-1).join("/"),ot=(A==null?void 0:A.source)==="artifact",Mt=T.useCallback(We=>{var ft;return((ft=D5(wt,We,G))==null?void 0:ft.path)??null},[G,wt]),jt=T.useCallback(We=>G?yI(We):ot?hf(e,We):B3(e,We,{sessionId:r,ref:s}),[ot,s,G,e,r]),Ft=T.useCallback(We=>{if(nC(We))return We;const ft=D5(wt,We,G);return ft?VRn(jt(ft.path),ft):null},[G,wt,jt]),Le=Mq(Te==null?void 0:Te.presentation),tt=(A==null?void 0:A.source)==="artifact"&&!B,ke=B&&(A==null?void 0:A.source)==="checkout",ge=!s&&(A==null?void 0:A.source)==="checkout"&&Te!=null&&!Te.notFound,Ne=r!=null&&(A==null?void 0:A.source)==="checkout"&&A.file.root==="clone",qe=ge&&Te!=null&&!Te.binary&&!Te.truncated&&!Le&&!Ne,nt=qe&&Te.version===void 0,ht=U!==null&&tl(U),rt=!nt&&(qe&&typeof Te.version=="string"||ht),qt=(U==null?void 0:U.draft)??wk((Te==null?void 0:Te.content)??""),Xt=(U==null?void 0:U.baseline)??wk((Te==null?void 0:Te.content)??""),Jt=rt&&U!==null&&tl(U),an=U!==null&&!ht&&typeof(Te==null?void 0:Te.version)=="string"&&U.version!==Te.version,At=j.isFetching||an?void 0:h,bn=async We=>{const ft=k.getSnapshot();if(!rt||!ft||!tl(ft))return!0;if(k.saving)return!1;if(ft.conflict&&We===void 0)return V(ft.conflict.exists?ZN():tz()),!1;const Pn=ft.draft,Wn=sqn(ft);ie(!0),V(null);try{await et.cancelQueries(N);const Ln=await o4n(e,$e,Wn,{sessionId:r,expectedVersion:We??ft.version});return k.getSnapshot()?(k.saved(Pn,Ln.version),M(Rr=>Rr&&Rr.source==="checkout"?{source:"checkout",file:{...Rr.file,content:Wn,version:Ln.version}}:Rr),!0):!1}catch(Ln){if(Ln instanceof I3){const En=k.getSnapshot();return!En||!tl(En)||H({...En,conflict:{currentVersion:Ln.currentVersion,exists:Ln.exists}}),!1}return V(Ln instanceof Error?Ln.message:String(Ln)),!1}finally{ie(!1)}},on=Q&&ge&&!Ne,Ot=oqn({projectId:e,filePath:$e,sessionId:r,enabled:on,autoRun:L,onManualAction:F,ready:Te!=null&&!Te.notFound,source:rt?qt:(Te==null?void 0:Te.content)??""}),hn=_qn({projectId:e,filePath:$e,sessionId:r,enabled:on,autoRun:L,onManualAction:F,savedSource:Xt,dirty:Jt,onPulled:T.useCallback(We=>{We.includes($e)&&I(ft=>ft+1)},[$e])}),cn=Q&&Ot.showPdf&&Ot.compiled!=null,Sn=nt&&ht,Vn=(rt||Sn)&&!(Z&&!x)&&!cn,hs=Te!==null&&!Te.notFound&&!Te.binary&&!Le&&!cn,es=hs&&!Vn&&(!K||x),bt=async()=>{if(Te)try{if(Te.truncated&&!Vn){const We=fetch(jt($e)).then(async ft=>{if(!ft.ok)throw new Error;return new Blob([await ft.text()],{type:"text/plain"})});await navigator.clipboard.write([new ClipboardItem({"text/plain":We})])}else await navigator.clipboard.writeText(Vn?qt:Te.content);ve(!0),window.setTimeout(()=>ve(!1),1500)}catch{sn(aFe(),"error")}},ln=We=>{if(!We.metaKey&&!We.ctrlKey||We.altKey||We.shiftKey||We.key.toLowerCase()!=="a"||!(We.target instanceof Node)||!We.currentTarget.contains(We.target))return;const ft=ce.current;if(!ft)return;We.preventDefault();const Pn=document.createRange();Pn.selectNodeContents(ft);const Wn=window.getSelection();Wn==null||Wn.removeAllRanges(),Wn==null||Wn.addRange(Pn)},xn=Ot.compiled?`${B3(e,Ot.compiled.path,{sessionId:r})}&v=${Ot.compiled.version}`:null,un=xn?`${xn}&view=${Ot.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,ur=Ot.compiled?Ot.compiled.path.split("/").pop()??Ot.compiled.path:null,Rn=async()=>{Jt&&!await bn()||Q&&Ot.engine&&Ot.compile()},Kn=async()=>{Jt&&(L?await Rn():await bn())},rr=bM(()=>l4n(e,$e,{sessionId:r})),St=bM(()=>u4n(e,$e,{sessionId:r})),It=v?Zqe():Te!=null&&Te.notFound?sz():s?Gqe({branch:Ce(s)}):ge?null:iUe(),ir=T.useCallback(()=>{k.saving||I(We=>We+1)},[k]),ar=()=>{H(null),V(null),ir()},Tr=Dq(jt($e),!s&&!ae);T.useEffect(()=>{if(!z||s)return;const We=window.setInterval(()=>{document.visibilityState!=="hidden"&&ir()},2e3);return()=>window.clearInterval(We)},[z,s,ir]);const sr=`${jt($e)}&v=${encodeURIComponent(Tr??m??"")}&reload=${D}`;T.useEffect(()=>{var Wn,Ln;if(!A||k.saving)return;const We=A,ft=k.getSnapshot();if(ft&&tl(ft)){const En=We.source==="checkout"?We.file:null,Rr=En!==null&&En.path===ft.path&&(!r||En.root==="worktree"),_n=iqn(ft,Rr&&typeof En.version=="string"?En.version:null,Rr&&!En.notFound);_n&&(_n.currentVersion!==((Wn=ft.conflict)==null?void 0:Wn.currentVersion)||_n.exists!==((Ln=ft.conflict)==null?void 0:Ln.exists))?H({...ft,conflict:_n}):!_n&&ft.conflict&&H({...ft,conflict:null})}(!ft||!tl(ft)&&(ft.version!==We.file.version||ft.path!==We.file.path))&&We.source==="checkout"&&!We.file.notFound&&!We.file.binary&&!We.file.truncated&&typeof We.file.version=="string"&&(H(hM(We.file.path,We.file.content,We.file.version)),V(null))},[A,k,r,ae,ue,U]);const Bn=JSON.stringify(N.queryKey),Br=T.useRef({sourceKey:Bn,nonce:D,artifactVersion:m,diskVersion:Tr});T.useEffect(()=>{const We=Br.current;Br.current={sourceKey:Bn,nonce:D,artifactVersion:m,diskVersion:Tr},We.sourceKey===Bn&&(We.nonce!==D||We.diskVersion!==null&&We.diskVersion!==Tr||We.artifactVersion!=null&&We.artifactVersion!==m)&&N9n(e,n,t??"repo",r,s)},[Bn,D,m,Tr,e,n,t,r,s]),T.useLayoutEffect(()=>{const We=oe.current,ft=Xe.current;!We||!Te||!ft||(We.scrollTop=ft.top,We.scrollLeft=ft.left)},[Te]);const Ds=We=>{if(We.source==="absolute")return vqe();if(B)return sqe({root:r?o1():a1()});if(s)return _qe({branch:Ce(s)});if(r&&We.source==="checkout"&&We.file.root==="clone")return gVe();const ft=We.source==="checkout"?We.file.root:We.checkoutRoot;return Cqe({root:ft==="worktree"?o1():a1()})};return _.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",onKeyDown:ln,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(Ph,{name:$e}),_.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ce($e),children:$e.split("/").pop()||$e}),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:NX({branch:Ce(a)}),children:[_.jsx(Im,{size:11}),a]}),Vn&&(ae||Jt||re)&&_.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${re?"text-accent-red":"text-muted"}`,title:re??(ae?ka():rVe()),children:ae?_.jsxs(_.Fragment,{children:[_.jsx(Nt,{})," ",_Ge()]}):re?sGe():_L()}),_.jsx("div",{ref:Fe,className:"contents"}),Q&&Ot.compiled&&_.jsx($t,{size:"small",active:!Ot.showPdf,"data-tip":Ot.stale&&Ot.showPdf?EUe():Ot.showPdf?Fd():cz(),"data-tip-align":"end","aria-label":Ot.showPdf?Fd():cz(),onClick:()=>Ot.setShowPdf(!Ot.showPdf),children:Ot.showPdf?_.jsx(i5,{size:13}):_.jsx(Kb,{size:13,className:Ot.stale?"text-accent-amber":void 0})}),Q&&xn&&ur&&_.jsx(Qh,{size:"small","data-tip":Ot.stale?fHe({name:Ce(ur)}):Mv({name:Ce(ur)}),"data-tip-align":"end","aria-label":Mv({name:Ce(ur)}),href:xn,download:ur,children:_.jsx(Vb,{size:13,className:Ot.stale?"text-accent-amber":void 0})}),on&&_.jsx(bqn,{overleaf:hn}),Q&&ge&&_.jsx($t,{size:"small","data-tip":Ot.compiled?az():JN(),"data-tip-align":"end","aria-label":Ot.compiled?az():JN(),disabled:Ot.compiling||!Ot.engine,onClick:()=>void Rn(),children:Ot.compiling?_.jsx(Nt,{}):_.jsx(O6n,{size:13})}),Z&&_.jsx($t,{size:"small",active:x,"data-tip":x?Dv():Fd(),"data-tip-align":"end","aria-label":x?Dv():Fd(),onClick:()=>C==null?void 0:C(!x),children:_.jsx(i5,{size:13})}),hs&&_.jsx($t,{size:"small","data-tip":me?_f():ez(),"data-tip-align":"end","aria-label":me?_f():ez(),onClick:()=>void bt(),children:me?_.jsx(yi,{size:13}):_.jsx(Mf,{size:13})}),Te!=null&&_.jsxs(_.Fragment,{children:[_.jsx($t,{size:"small","data-tip":It??rr.error??iz(),"data-tip-align":"end","aria-label":iz(),"aria-description":It??void 0,disabled:rr.busy||It!=null,onClick:()=>void rr.trigger(),children:rr.busy?_.jsx(Nt,{}):_.jsx(gf,{size:13})}),_.jsx($t,{size:"small","data-tip":It??St.error??oz(),"data-tip-align":"end","aria-label":oz(),"aria-description":It??void 0,disabled:St.busy||It!=null,onClick:()=>void St.trigger(),children:St.busy?_.jsx(Nt,{}):_.jsx(Fu,{size:13})})]})]}),!z&&ke&&(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:Rqe({root:A.file.root==="worktree"?o1():a1()})}),nt&&_.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:uVe()}),z&&Te!==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:[rz()," ",Ce(z)]}),(U==null?void 0:U.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:U.conflict.exists?ZN():tz()}),((Us=U==null?void 0:U.conflict)==null?void 0:Us.exists)&&U.conflict.currentVersion&&_.jsx(Ie,{disabled:ae,onPointerDown:We=>We.preventDefault(),onClick:()=>{var We;return void bn(((We=U.conflict)==null?void 0:We.currentVersion)??void 0)},children:bUe()}),_.jsx(Ie,{disabled:ae,onPointerDown:We=>We.preventDefault(),onClick:ar,children:GUe()})]}),(Ot.error||Ot.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 ${Ot.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Ot.error??(Ot.builtWithErrors?PPe():NPe())}),_.jsx($t,{"data-tip":BFe(),"data-tip-align":"end","aria-label":VFe(),onClick:Ot.dismiss,children:_.jsx(br,{size:13})})]}),Ot.log&&_.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Ot.log})]}),on&&hn.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:fUe()}),_.jsx(Ie,{onClick:()=>{hn.reloaded(),I(We=>We+1)},children:EFe()})]}),Q&&ge&&Ot.engine===null&&Ot.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:[Ot.installHint,Ot.installCommand&&_.jsx(Cqn,{command:Ot.installCommand})]}),Ot.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:Ot.note}),cn&&Ot.stale&&_.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:IGe()}),_.jsxs("div",{ref:oe,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",tabIndex:es?0:void 0,onScroll:We=>{const ft={top:Math.max(0,We.currentTarget.scrollTop),left:Math.max(0,We.currentTarget.scrollLeft)};Xe.current=ft,u==null||u(ft)},children:[!Vn&&!z&&!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:UGe()}),!Vn&&!z&&(A==null?void 0:A.source)==="artifact"&&!A.file.notFound&&tt&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:oPe({root:A.checkoutRoot==="worktree"?o1():a1()})}),z&&Te===null?_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[rz()," ",Ce(z)]}):Te===null?_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:uL()}):Vn?_.jsx(bB,{value:qt,onChange:We=>{const ft=k.getSnapshot()??(Te&&typeof Te.version=="string"?hM(Te.path,Te.content,Te.version):null);ft&&H(rqn(ft,We)),p==null||p(),re&&V(null)},onSave:()=>void Kn(),onBlur:()=>{xk||Kn()},readOnly:Sn,path:n,highlightLine:i,scrollRequest:At,onScrollRequestHandled:f,scrollPosition:Xe.current,onScrollPositionChange:We=>{Xe.current=We,u==null||u(We)}}):Te.notFound?_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:A?Ds(A):sz()}):Le?_.jsx(bb.Provider,{value:Re,children:_.jsx(yk,{kind:Le,url:sr,name:n.split("/").pop()??n})}):Te.binary?_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[hPe()," ",_.jsx("a",{href:sr,download:n.split("/").pop()??n,children:lL()})]}):cn&&un&&ur?_.jsx(bb.Provider,{value:Re,children:_.jsx(yk,{kind:"pdf",url:un,name:ur,download:!1},un)}):q&&!x?_.jsx("div",{ref:ce,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:ot?_.jsx(Pq,{projectId:e,folder:wt,markdown:Te.content,entries:w}):_.jsx(uc,{text:Te.content,resolveFilePath:Mt,resolveImageSrc:Ft,onOpenFile:o&&((We,ft,Pn,Wn,Ln)=>o(We,r,s,Ln))})}):K&&!x?_.jsx(vqn,{html:Te.content,truncated:Te.truncated,url:sr,name:$e,resolveSrc:Ft}):_.jsxs(_.Fragment,{children:[_.jsx("div",{ref:ce,children:_.jsx(Rq,{text:Te.content,path:n,highlightLine:i,scrollRequest:At,onScrollRequestHandled:f})}),Te.truncated&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:CHe()})]})]})]})}const D4=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function Nqn({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:i,setOpen:a,ref:o}=Vi(),c=T.useRef(null);return T.useEffect(()=>{if(!i)return;const u=h=>{var f;h.key==="Escape"&&((f=c.current)==null||f.focus())};return document.addEventListener("keydown",u,!0),()=>document.removeEventListener("keydown",u,!0)},[i]),_.jsx("div",{className:"rail-brand px-3 py-1.5 border-b border-border shrink-0",children:_.jsxs("div",{className:"project-switcher relative min-w-0",ref:o,children:[_.jsxs("div",{className:"flex h-7 items-center justify-between gap-1 px-0.5",children:[_.jsx($t,{size:"small",className:"project-back text-text","aria-label":uz(),onClick:n,children:_.jsx($0,{size:18})}),_.jsx("span",{className:"brand-project-label flex-1 text-xs font-medium tracking-wide uppercase text-subtext",children:gL()}),s&&_.jsx($t,{size:"small","data-tip":_z(),"data-tip-align":"end","aria-label":_z(),onClick:s,children:_.jsx(C$,{size:18})})]}),_.jsxs("button",{ref:c,className:`brand group flex h-8 w-full min-w-0 items-center gap-2 rounded-md px-2 text-start text-text hover:bg-surface focus-visible:outline-2 focus-visible:outline-text ${i?"open bg-surface":""}`,onClick:()=>a(u=>!u),"aria-expanded":i,children:[_.jsx("span",{className:"brand-project min-w-0 flex-1 truncate text-xl font-semibold",children:e}),_.jsx(pc,{className:`project-chevron shrink-0 text-muted transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100 ${i?"rotate-180 opacity-100":"opacity-0"}`,size:14})]}),i&&_.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 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 project-menu w-52.5 z-70",children:[_.jsx(yn,{onClick:()=>{a(!1),r()},children:_.jsxs("span",{className:D4,children:[_.jsx(y$,{size:14}),RXe()]})}),_.jsx(yn,{onClick:()=>{a(!1),n()},children:_.jsxs("span",{className:D4,children:[_.jsx(w$,{size:14}),uz()]})}),_.jsx(yn,{onClick:()=>{var u;(u=c.current)==null||u.focus(),a(!1),t()},children:_.jsxs("span",{className:D4,children:[_.jsx(H6n,{size:14}),BXe()]})})]})]})})}function zqn(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 h=(n.get(c)??[]).some(f=>f.archived||i(f.id));return r.set(c,h),h}function a(c){const u=s.get(c);if(u!==void 0)return u;const h=(n.get(c)??[]).some(f=>!f.archived||a(f.id));return s.set(c,h),h}const o=new Map;for(const c of e){let u=!1,h=!1,f=c.parentExperimentId?t.get(c.parentExperimentId):void 0;for(;f;)f.archived?h=!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&&h,restoreDown:i(c.id)})}return o}function Wq({id:e,name:n,actions:t,onArchive:r,compact:s=!1}){const i=T.useRef(null),a=Vi(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)},h=(f,p)=>{a.setOpen(!1),r(e,f,p)};return _.jsxs("div",{className:"nodrag ms-auto shrink-0",children:[s?_.jsx($t,{type:"button",ref:i,size:"small",className:"node-action","aria-label":aj({name:n}),"aria-expanded":a.open,onClick:u,children:_.jsx(Lm,{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":aj({name:n}),"aria-expanded":a.open,onClick:u,children:Bmn()}),a.open&&ai.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(yn,{onClick:()=>h("ancestors",!0),children:Cmn()}),t.archiveOnly&&_.jsx(yn,{onClick:()=>h("only",!0),children:Zmn()}),t.archiveDown&&_.jsx(yn,{onClick:()=>h("descendants",!0),children:Rmn()}),t.restoreOnly&&_.jsx(yn,{onClick:()=>h("only",!1),children:_I()}),t.restoreAbove&&_.jsx(yn,{onClick:()=>h("ancestors",!1),children:Zgn()}),t.restoreDown&&_.jsx(yn,{onClick:()=>h("descendants",!1),children:f1n()})]}),document.body)]})}function jqn({runs:e,experiments:n,archiveActions:t,emptyHint:r,onOpen:s,onOpenLogs:i,onOpenCode:a,onArchive:o,onCancel:c}){const[u,h]=T.useState(new Set),[f,p]=T.useState(null),m=new Map;for(const v of e){const b=m.get(v.experimentId);b?b.push(v):m.set(v.experimentId,[v])}for(const v of m.values())v.sort((b,y)=>y.createdAt-b.createdAt);const w=[...n].sort((v,b)=>{var C,N,j,A;const y=((N=(C=m.get(v.id))==null?void 0:C[0])==null?void 0:N.createdAt)??v.createdAt;return(((A=(j=m.get(b.id))==null?void 0:j[0])==null?void 0:A.createdAt)??b.createdAt)-y});if(w.length===0)return _.jsx(LC,{icon:Ah,title:r??GIe(),description:r?void 0:TIe()});async function k(v){p(null),h(b=>new Set(b).add(v));try{await c(v)}catch(b){h(y=>{const x=new Set(y);return x.delete(v),x}),p(b instanceof Error?b.message:String(b))}}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:[aBe()," ",f]}),_.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":K$e(),children:w.map(v=>{const b=m.get(v.id)??[],y=b[0]??null,x=b.find(A=>A.status==="running"||A.status==="starting"),C=x??y,N=!!(x&&(x.cancelRequested||u.has(x.id))),j=x?N?"cancelling":ha(x):y?ha(y):"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",...Wr(A=>s(v,A),{stopPropagation:!0}),children:v.title||v.slug}),v.archived&&_.jsx("span",{className:"text-muted text-xs",children:uI()}),_.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(Im,{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:j})}),_.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:_.jsx("span",{children:b.length===1?i$e():b$e({count:Zt(b.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:y?yo(y.createdAt):ZIe()})})]}),_.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":dX({name:v.title||v.slug}),onClick:A=>A.stopPropagation(),onDoubleClick:A=>A.stopPropagation(),onAuxClick:A=>A.stopPropagation(),children:[_.jsxs(Ie,{size:"small",disabled:!C,title:C?f$e():$Ie(),...Wr(A=>{C&&i(v.id,C.id,A)},{stopPropagation:!0}),children:[_.jsx(xo,{size:15}),C3()]}),_.jsxs(Ie,{size:"small",title:UD({branch:Ce(v.branchName)}),...Wr(A=>a(v.id,A),{stopPropagation:!0}),children:[_.jsx(Wb,{size:15}),P$e()]}),x&&_.jsxs(Ie,{size:"small",variant:"danger",disabled:N,title:N?E$e():M$e(),onClick:()=>void k(x.id),children:[_.jsx(m$,{size:15}),N?OAe():aL()]}),_.jsx(Wq,{id:v.id,name:v.title||v.slug,actions:t.get(v.id),onArchive:o})]})]},v.id)})})]})}function Aqn({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(Y0n())).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,h=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(h()[0]??c).focus();const f=p=>{if(p.key!=="Tab")return;const m=h();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()}},[]),ai.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($t,{className:"absolute end-3.5 top-3.5","aria-label":L3(),onClick:()=>o(()=>e("dismiss")),disabled:t,children:_.jsx(br,{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(QS,{})}),_.jsxs("div",{children:[_.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:k0n()}),_.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:_mn()})]})]}),_.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[_.jsxs("p",{dir:"auto",children:[smn()," ",_.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()}),r0n()]}),_.jsx("p",{dir:"auto",children:A0n()})]}),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(Ie,{onClick:()=>o(n),disabled:t,children:m0n()}),_.jsx(Ie,{variant:"primary",onClick:()=>o(()=>e("explore_demo")),disabled:t,children:t?ka():U0n()})]})]})}),document.body)}function ds(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Wy(){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}})}pv.prototype=Wy.prototype={constructor:pv,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)),xM.hasOwnProperty(n)?{space:xM[n],local:e}:e}function Oqn(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===kk&&n.documentElement.namespaceURI===kk?n.createElement(e):n.createElementNS(t,e)}}function Dqn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Qq(e){var n=Qy(e);return(n.local?Dqn:Oqn)(n)}function Lqn(){}function IC(e){return e==null?Lqn:function(){return this.querySelector(e)}}function Iqn(e){typeof e!="function"&&(e=IC(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=x&&(x=y+1);!(N=v[x])&&++x=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function cUn(e){e||(e=lUn);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 uUn(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function _Un(){return Array.from(this)}function fUn(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?kUn:typeof n=="function"?CUn:SUn)(e,n,t??"")):Fh(this.node(),e)}function Fh(e,n){return e.style.getPropertyValue(n)||eU(e).getComputedStyle(e,null).getPropertyValue(n)}function NUn(e){return function(){delete this[e]}}function zUn(e,n){return function(){this[e]=n}}function jUn(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function AUn(e,n){return arguments.length>1?this.each((n==null?NUn:typeof n=="function"?jUn:zUn)(e,n)):this.node()[e]}function tU(e){return e.trim().split(/^|\s+/)}function $C(e){return e.classList||new nU(e)}function nU(e){this._node=e,this._names=tU(e.getAttribute("class")||"")}nU.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 rU(e,n){for(var t=$C(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function sGn(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function Sk(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:c,dy:u,dispatch:h}){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:h}})}Sk.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function hGn(e){return!e.ctrlKey&&!e.button}function pGn(){return this.parentNode}function mGn(e,n){return n??{x:e.x,y:e.y}}function gGn(){return navigator.maxTouchPoints||"ontouchstart"in this}function lU(){var e=hGn,n=pGn,t=mGn,r=gGn,s={},i=Wy("start","drag","end"),a=0,o,c,u,h,f=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",v).on("touchmove.drag",b,dGn).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(h||!e.call(this,C,N))){var j=x(this,n.call(this,C,N),C,N,"mouse");j&&(_a(C.view).on("mousemove.drag",w,rm).on("mouseup.drag",k,rm),oU(C.view),L4(C),u=!1,o=C.clientX,c=C.clientY,j("start",C))}}function w(C){if(sh(C),!u){var N=C.clientX-o,j=C.clientY-c;u=N*N+j*j>f}s.mouse("drag",C)}function k(C){_a(C.view).on("mousemove.drag mouseup.drag",null),cU(C.view,u),sh(C),s.mouse("end",C)}function v(C,N){if(e.call(this,C,N)){var j=C.changedTouches,A=n.call(this,C,N),z=j.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?$1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?$1(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=bGn.exec(e))?new Ui(n[1],n[2],n[3],1):(n=yGn.exec(e))?new Ui(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=xGn.exec(e))?$1(n[1],n[2],n[3],n[4]):(n=wGn.exec(e))?$1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=kGn.exec(e))?zM(n[1],n[2]/100,n[3]/100,1):(n=SGn.exec(e))?zM(n[1],n[2]/100,n[3]/100,n[4]):wM.hasOwnProperty(e)?CM(wM[e]):e==="transparent"?new Ui(NaN,NaN,NaN,0):null}function CM(e){return new Ui(e>>16&255,e>>8&255,e&255,1)}function $1(e,n,t,r){return r<=0&&(e=n=t=NaN),new Ui(e,n,t,r)}function NGn(e){return e instanceof Qm||(e=kf(e)),e?(e=e.rgb(),new Ui(e.r,e.g,e.b,e.opacity)):new Ui}function Ck(e,n,t,r){return arguments.length===1?NGn(e):new Ui(e,n,t,r??1)}function Ui(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}BC(Ui,Ck,uU(Qm,{brighter(e){return e=e==null?xb:Math.pow(xb,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sm:Math.pow(sm,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ui(cf(this.r),cf(this.g),cf(this.b),wb(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:EM,formatHex:EM,formatHex8:zGn,formatRgb:NM,toString:NM}));function EM(){return`#${H_(this.r)}${H_(this.g)}${H_(this.b)}`}function zGn(){return`#${H_(this.r)}${H_(this.g)}${H_(this.b)}${H_((isNaN(this.opacity)?1:this.opacity)*255)}`}function NM(){const e=wb(this.opacity);return`${e===1?"rgb(":"rgba("}${cf(this.r)}, ${cf(this.g)}, ${cf(this.b)}${e===1?")":`, ${e})`}`}function wb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function cf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function H_(e){return e=cf(e),(e<16?"0":"")+e.toString(16)}function zM(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 _U(e){if(e instanceof ho)return new ho(e.h,e.s,e.l,e.opacity);if(e instanceof Qm||(e=kf(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 jGn(e,n,t,r){return arguments.length===1?_U(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}BC(ho,jGn,uU(Qm,{brighter(e){return e=e==null?xb:Math.pow(xb,e),new ho(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sm:Math.pow(sm,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 Ui(I4(e>=240?e-240:e+120,s,r),I4(e,s,r),I4(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new ho(jM(this.h),B1(this.s),B1(this.l),wb(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=wb(this.opacity);return`${e===1?"hsl(":"hsla("}${jM(this.h)}, ${B1(this.s)*100}%, ${B1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function jM(e){return e=(e||0)%360,e<0?e+360:e}function B1(e){return Math.max(0,Math.min(1,e||0))}function I4(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 PC=e=>()=>e;function AGn(e,n){return function(t){return e+t*n}}function TGn(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?fU:function(n,t){return t-n?TGn(n,t,e):PC(isNaN(n)?t:n)}}function fU(e,n){var t=n-e;return t?AGn(e,t):PC(isNaN(e)?n:e)}const kb=(function e(n){var t=RGn(n);function r(s,i){var a=t((s=Ck(s)).r,(i=Ck(i)).r),o=t(s.g,i.g),c=t(s.b,i.b),u=fU(s.opacity,i.opacity);return function(h){return s.r=a(h),s.g=o(h),s.b=c(h),s.opacity=u(h),s+""}}return r.gamma=e,r})(1);function MGn(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=$4.lastIndex;return t180?h+=360:h-u>180&&(u+=360),p.push({i:f.push(s(f)+"rotate(",null,r)-2,x:ec(u,h)})):h&&f.push(s(f)+"rotate("+h+r)}function o(u,h,f,p){u!==h?p.push({i:f.push(s(f)+"skewX(",null,r)-2,x:ec(u,h)}):h&&f.push(s(f)+"skewX("+h+r)}function c(u,h,f,p,m,w){if(u!==f||h!==p){var k=m.push(s(m)+"scale(",null,",",null,")");w.push({i:k-4,x:ec(u,f)},{i:k-2,x:ec(h,p)})}else(f!==1||p!==1)&&m.push(s(m)+"scale("+f+","+p+")")}return function(u,h){var f=[],p=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,f,p),a(u.rotate,h.rotate,f,p),o(u.skewX,h.skewX,f,p),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,p),u=h=null,function(m){for(var w=-1,k=p.length,v;++w=0&&e._call.call(void 0,n),e=e._next;--Hh}function RM(){Sf=(Cb=am.now())+Xy,Hh=f0=0;try{WGn()}finally{Hh=0,XGn(),Sf=0}}function QGn(){var e=am.now(),n=e-Cb;n>mU&&(Xy-=n,Cb=e)}function XGn(){for(var e,n=Sb,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:Sb=t);d0=e,zk(r)}function zk(e){if(!Hh){f0&&(f0=clearTimeout(f0));var n=e-Sf;n>24?(e<1/0&&(f0=setTimeout(RM,e-am.now()-Xy)),i0&&(i0=clearInterval(i0))):(i0||(Cb=am.now(),i0=setInterval(QGn,mU)),Hh=1,gU(RM))}}function MM(e,n,t){var r=new Eb;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var YGn=Wy("start","end","cancel","interrupt"),ZGn=[],bU=0,OM=1,jk=2,gv=3,DM=4,Ak=5,vv=6;function Yy(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;JGn(e,t,{name:n,index:r,group:s,on:YGn,tween:ZGn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:bU})}function HC(e,n){var t=ko(e,n);if(t.state>bU)throw new Error("too late; already scheduled");return t}function xc(e,n){var t=ko(e,n);if(t.state>gv)throw new Error("too late; already running");return t}function ko(e,n){var t=e.__transition;if(!t||!(t=t[n]))throw new Error("transition not found");return t}function JGn(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=vU(i,0,t.time);function i(u){t.state=OM,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var h,f,p,m;if(t.state!==OM)return c();for(h in r)if(m=r[h],m.name===t.name){if(m.state===gv)return MM(a);m.state===DM?(m.state=vv,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[h]):+hjk&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function jVn(e,n,t){var r,s,i=zVn(n)?HC:xc;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function AVn(e,n){var t=this._id;return arguments.length<2?ko(this.node(),t).on.on(e):this.each(jVn(t,e,n))}function TVn(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",TVn(this._id))}function MVn(e){var n=this._name,t=this._id;typeof e!="function"&&(e=IC(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function sKn(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 dl(e,n,t){this.k=e,this.x=n,this.y=t}dl.prototype={constructor:dl,scale:function(e){return e===1?this:new dl(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new dl(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 Zy=new dl(1,0,0);kU.prototype=dl.prototype;function kU(e){for(;!e.__zoom;)if(!(e=e.parentNode))return Zy;return e.__zoom}function B4(e){e.stopImmediatePropagation()}function a0(e){e.preventDefault(),e.stopImmediatePropagation()}function iKn(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function aKn(){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 LM(){return this.__zoom||Zy}function oKn(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function cKn(){return navigator.maxTouchPoints||"ontouchstart"in this}function lKn(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 SU(){var e=iKn,n=aKn,t=lKn,r=oKn,s=cKn,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,c=mv,u=Wy("start","zoom","end"),h,f,p,m=500,w=150,k=0,v=10;function b(q){q.property("__zoom",LM).on("wheel.zoom",z,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",I).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(q,Q,K,Z){var J=q.selection?q.selection():q;J.property("__zoom",LM),q!==J?N(q,Q,K,Z):J.interrupt().each(function(){j(this,arguments).event(Z).start().zoom(null,typeof Q=="function"?Q.apply(this,arguments):Q).end()})},b.scaleBy=function(q,Q,K,Z){b.scaleTo(q,function(){var J=this.__zoom.k,$=typeof Q=="function"?Q.apply(this,arguments):Q;return J*$},K,Z)},b.scaleTo=function(q,Q,K,Z){b.transform(q,function(){var J=n.apply(this,arguments),$=this.__zoom,L=K==null?C(J):typeof K=="function"?K.apply(this,arguments):K,F=$.invert(L),U=typeof Q=="function"?Q.apply(this,arguments):Q;return t(x(y($,U),L,F),J,a)},K,Z)},b.translateBy=function(q,Q,K,Z){b.transform(q,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)},b.translateTo=function(q,Q,K,Z,J){b.transform(q,function(){var $=n.apply(this,arguments),L=this.__zoom,F=Z==null?C($):typeof Z=="function"?Z.apply(this,arguments):Z;return t(Zy.translate(F[0],F[1]).scale(L.k).translate(typeof Q=="function"?-Q.apply(this,arguments):-Q,typeof K=="function"?-K.apply(this,arguments):-K),$,a)},Z,J)};function y(q,Q){return Q=Math.max(i[0],Math.min(i[1],Q)),Q===q.k?q:new dl(Q,q.x,q.y)}function x(q,Q,K){var Z=Q[0]-K[0]*q.k,J=Q[1]-K[1]*q.k;return Z===q.x&&J===q.y?q:new dl(q.k,Z,J)}function C(q){return[(+q[0][0]+ +q[1][0])/2,(+q[0][1]+ +q[1][1])/2]}function N(q,Q,K,Z){q.on("start.zoom",function(){j(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){j(this,arguments).event(Z).end()}).tween("zoom",function(){var J=this,$=arguments,L=j(J,$).event(Z),F=n.apply(J,$),U=K==null?C(F):typeof K=="function"?K.apply(J,$):K,H=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),ae=J.__zoom,ie=typeof Q=="function"?Q.apply(J,$):Q,ue=c(ae.invert(U).concat(H/ae.k),ie.invert(U).concat(H/ie.k));return function(re){if(re===1)re=ie;else{var V=ue(re),oe=H/V[2];re=new dl(oe,U[0]-V[0]*oe,U[1]-V[1]*oe)}L.zoom(null,re)}})}function j(q,Q,K){return!K&&q.__zooming||new A(q,Q)}function A(q,Q){this.that=q,this.args=Q,this.active=0,this.sourceEvent=null,this.extent=n.apply(q,Q),this.taps=0}A.prototype={event:function(q){return q&&(this.sourceEvent=q),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(q,Q){return this.mouse&&q!=="mouse"&&(this.mouse[1]=Q.invert(this.mouse[0])),this.touch0&&q!=="touch"&&(this.touch0[1]=Q.invert(this.touch0[0])),this.touch1&&q!=="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(q){var Q=_a(this.that).datum();u.call(q,this.that,new sKn(q,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),Q)}};function z(q,...Q){if(!e.apply(this,arguments))return;var K=j(this,Q).event(q),Z=this.__zoom,J=Math.max(i[0],Math.min(i[1],Z.k*Math.pow(2,r.apply(this,arguments)))),$=co(q);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===J)return;K.mouse=[$,Z.invert($)],bv(this),K.start()}a0(q),K.wheel=setTimeout(L,w),K.zoom("mouse",t(x(y(Z,J),K.mouse[0],K.mouse[1]),K.extent,a));function L(){K.wheel=null,K.end()}}function M(q,...Q){if(p||!e.apply(this,arguments))return;var K=q.currentTarget,Z=j(this,Q,!0).event(q),J=_a(q.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",H,!0),$=co(q,K),L=q.clientX,F=q.clientY;oU(q.view),B4(q),Z.mouse=[$,this.__zoom.invert($)],bv(this),Z.start();function U(ae){if(a0(ae),!Z.moved){var ie=ae.clientX-L,ue=ae.clientY-F;Z.moved=ie*ie+ue*ue>k}Z.event(ae).zoom("mouse",t(x(Z.that.__zoom,Z.mouse[0]=co(ae,K),Z.mouse[1]),Z.extent,a))}function H(ae){J.on("mousemove.zoom mouseup.zoom",null),cU(ae.view,Z.moved),a0(ae),Z.event(ae).end()}}function D(q,...Q){if(e.apply(this,arguments)){var K=this.__zoom,Z=co(q.changedTouches?q.changedTouches[0]:q,this),J=K.invert(Z),$=K.k*(q.shiftKey?.5:2),L=t(x(y(K,$),Z,J),n.apply(this,Q),a);a0(q),o>0?_a(this).transition().duration(o).call(N,L,Z,q):_a(this).call(b.transform,L,Z,q)}}function I(q,...Q){if(e.apply(this,arguments)){var K=q.touches,Z=K.length,J=j(this,Q,q.changedTouches.length===Z).event(q),$,L,F,U;for(B4(q),L=0;L`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.`},om=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],CU=["Enter"," ","Escape"],EU={"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 qh;(function(e){e.Strict="strict",e.Loose="loose"})(qh||(qh={}));var lf;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(lf||(lf={}));var cm;(function(e){e.Partial="partial",e.Full="full"})(cm||(cm={}));const NU={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var xu;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(xu||(xu={}));var Nb;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(Nb||(Nb={}));var Rt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Rt||(Rt={}));const IM={[Rt.Left]:Rt.Right,[Rt.Right]:Rt.Left,[Rt.Top]:Rt.Bottom,[Rt.Bottom]:Rt.Top};function zU(e){return e===null?null:e?"valid":"invalid"}const jU=e=>"id"in e&&"source"in e&&"target"in e,uKn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),UC=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Xm=(e,n=[0,0])=>{const{width:t,height:r}=zl(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},_Kn=(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):UC(s)?s:n.nodeLookup.get(s.id));const o=a?zb(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return Jy(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return ex(t)},Ym=(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=Jy(t,zb(s)),r=!0)}),r?ex(t):{x:0,y:0,width:0,height:0}},GC=(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,h=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,b=m.height??p.height??p.initialHeight??0,{x:y,y:x}=p.internals.positionAbsolute,C=MU(o,c,u,h,y,x,v,b),N=v*b,j=i&&C>0;(!p.internals.handleBounds||j||C>=N||p.dragging)&&f.push(p)}return f},fKn=(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 dKn(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 hKn({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=dKn(e,a),c=Ym(o),u=KC(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 AU({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},h=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&&Ef(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=Ef(f)?Cf(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)*h[0],y:p.y-u+(a.measured.height??0)*h[1]},positionAbsolute:p}}async function pKn({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),h=fKn(a,c);for(const p of c)o.has(p.id)&&!h.find(w=>w.id===p.id)&&h.push(p);if(!s)return{edges:h,nodes:a};const f=await s({nodes:a,edges:h});return typeof f=="boolean"?f?{edges:h,nodes:a}:{edges:[],nodes:[]}:f}const Uh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Cf=(e={x:0,y:0},n,t)=>({x:Uh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:Uh(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function TU(e,n,t){const{width:r,height:s}=zl(t),{x:i,y:a}=t.internals.positionAbsolute;return Cf(e,[[i,a],[i+r,a+s]],n)}const $M=(e,n,t)=>et?-Uh(Math.abs(e-t),1,n)/n:0,VC=(e,n,t=15,r=40)=>{const s=$M(e.x,r,n.width-r)*t,i=$M(e.y,r,n.height-r)*t;return[s,i]},Jy=(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)}),Tk=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),ex=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),lm=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=UC(e)?e.internals.positionAbsolute:Xm(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}},zb=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=UC(e)?e.internals.positionAbsolute:Xm(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)}},RU=(e,n)=>ex(Jy(Tk(e),Tk(n))),MU=(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)},jb=(e,n)=>MU(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),BM=e=>mo(e.width)&&mo(e.height)&&mo(e.x)&&mo(e.y),mo=e=>!isNaN(e)&&isFinite(e),OU=(e,n)=>(t,r)=>{},Zm=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Jm=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?Zm(o,a):o},Gh=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function Rd(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 mKn(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=Rd(e,t),s=Rd(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Rd(e.top??e.y??0,t),s=Rd(e.bottom??e.y??0,t),i=Rd(e.left??e.x??0,n),a=Rd(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 gKn(e,n,t,r,s,i){const{x:a,y:o}=Gh(e,[n,t,r]),{x:c,y:u}=Gh({x:e.x+e.width,y:e.y+e.height},[n,t,r]),h=s-c,f=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(h),bottom:Math.floor(f)}}const KC=(e,n,t,r,s,i)=>{const a=mKn(i,n,t),o=(n-a.x)/e.width,c=(t-a.y)/e.height,u=Math.min(o,c),h=Uh(u,r,s),f=e.x+e.width/2,p=e.y+e.height/2,m=n/2-f*h,w=t/2-p*h,k=gKn(e,m,w,h,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:h}},um=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ef(e){return e!=null&&e!=="parent"}function zl(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 DU(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 LU(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 PM(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function vKn(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function bKn(e){return{...EU,...e||{}}}function z0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=go(e),o=Jm({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:c,y:u}=t?Zm(o,n):o;return{xSnapped:c,ySnapped:u,...o}}const WC=e=>({width:e.offsetWidth,height:e.offsetHeight}),IU=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},yKn=["INPUT","SELECT","TEXTAREA"];function $U(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:yKn.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const BU=e=>"clientX"in e,go=(e,n)=>{var i,a;const t=BU(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)}},FM=(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,...WC(a)}})};function PU({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,h=Math.abs(c-e),f=Math.abs(u-n);return[c,u,h,f]}function H1(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function HM({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case Rt.Left:return[n-H1(n-r,i),t];case Rt.Right:return[n+H1(r-n,i),t];case Rt.Top:return[n,t-H1(t-s,i)];case Rt.Bottom:return[n,t+H1(s-t,i)]}}function FU({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top,curvature:a=.25}){const[o,c]=HM({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,h]=HM({pos:i,x1:r,y1:s,x2:e,y2:n,c:a}),[f,p,m,w]=PU({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:c,targetControlX:u,targetControlY:h});return[`M${e},${n} C${o},${c} ${u},${h} ${r},${s}`,f,p,m,w]}function HU({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,i=t0}const kKn=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,SKn=(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)),CKn=(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||kKn;let s;return jU(e)?s={...e}:s={...e,id:r(e)},SKn(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function qU({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,i,a,o]=HU({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,i,a,o]}const qM={[Rt.Left]:{x:-1,y:0},[Rt.Right]:{x:1,y:0},[Rt.Top]:{x:0,y:-1},[Rt.Bottom]:{x:0,y:1}},EKn=({source:e,sourcePosition:n=Rt.Bottom,target:t})=>n===Rt.Left||n===Rt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function NKn({source:e,sourcePosition:n=Rt.Bottom,target:t,targetPosition:r=Rt.Top,center:s,offset:i,stepPosition:a}){const o=qM[n],c=qM[r],u={x:e.x+o.x*i,y:e.y+o.y*i},h={x:t.x+c.x*i,y:t.y+c.y*i},f=EKn({source:u,sourcePosition:n,target:h}),p=f.x!==0?"x":"y",m=f[p];let w=[],k,v;const b={x:0,y:0},y={x:0,y:0},[,,x,C]=HU({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+(h.x-u.x)*a,v=s.y??(u.y+h.y)/2):(k=s.x??(u.x+h.x)/2,v=s.y??u.y+(h.y-u.y)*a);const z=[{x:k,y:u.y},{x:k,y:h.y}],M=[{x:u.x,y:v},{x:h.x,y:v}];o[p]===m?w=p==="x"?z:M:w=p==="x"?M:z}else{const z=[{x:u.x,y:h.y}],M=[{x:h.x,y:u.y}];if(p==="x"?w=o.x===m?M:z:w=o.y===m?z:M,n===r){const q=Math.abs(e[p]-t[p]);if(q<=i){const Q=Math.min(i-1,i-q);o[p]===m?b[p]=(u[p]>e[p]?-1:1)*Q:y[p]=(h[p]>t[p]?-1:1)*Q}}if(n!==r){const q=p==="x"?"y":"x",Q=o[p]===c[q],K=u[q]>h[q],Z=u[q]=G?(k=(D.x+I.x)/2,v=w[0].y):(k=w[0].x,v=(D.y+I.y)/2)}const N={x:u.x+b.x,y:u.y+b.y},j={x:h.x+y.x,y:h.y+y.y};return[[e,...N.x!==w[0].x||N.y!==w[0].y?[N]:[],...w,...j.x!==w[w.length-1].x||j.y!==w[w.length-1].y?[j]:[],t],k,v,x,C]}function zKn(e,n,t,r){const s=Math.min(UM(e,n)/2,UM(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 Mk(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function AKn(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=Mk(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 UU=1e3,TKn=10,QC={nodeOrigin:[0,0],nodeExtent:om,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},RKn={...QC,checkEquality:!0};function XC(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function MKn(e,n,t){const r=XC(QC,t);for(const s of e.values())if(s.parentId)ZC(s,e,n,r);else{const i=Xm(s,r.nodeOrigin),a=Ef(s.extent)?s.extent:r.nodeExtent,o=Cf(i,a,zl(s));s.internals.positionAbsolute=o}}function OKn(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 YC(e){return e==="manual"}function Ok(e,n,t,r={}){var h,f;const s=XC(RKn,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!YC(s.zIndexMode)?UU: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=Xm(p,s.nodeOrigin),k=Ef(p.extent)?p.extent:s.nodeExtent,v=Cf(w,k,zl(p));m={...s.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(f=p.measured)==null?void 0:f.height},internals:{positionAbsolute:v,handleBounds:OKn(p,m),z:GU(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&&ZC(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function DKn(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 ZC(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:c}=XC(QC,r),u=e.parentId,h=n.get(u);if(!h){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}DKn(e,t),s&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++s.i,h.internals.z=h.internals.z+s.i*TKn),s&&h.internals.rootParentIndex!==void 0&&(s.i=h.internals.rootParentIndex);const f=i&&!YC(c)?UU:0,{x:p,y:m,z:w}=LKn(e,h,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 GU(e,n,t){const r=mo(e.zIndex)?e.zIndex:0;return YC(t)?r:r+(e.selected?n:0)}function LKn(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,c=zl(e),u=Xm(e,t),h=Ef(e.extent)?Cf(u,e.extent,c):u;let f=Cf({x:a+h.x,y:o+h.y},r,c);e.extent==="parent"&&(f=TU(f,c,n));const p=GU(e,s,i),m=n.internals.z??0;return{x:f.x,y:f.y,z:m>=p?m+1:p}}function JC(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)??lm(c),h=RU(u,o.rect);i.set(o.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:o,parent:c},u)=>{var x;const h=c.internals.positionAbsolute,f=zl(c),p=c.origin??r,m=o.x0||w>0||b||y)&&(s.push({id:u,type:"position",position:{x:c.position.x-m+b,y:c.position.y-w+y}}),(x=t.get(u))==null||x.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=JC(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:c}}async function $Kn({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 WM(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 VU(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}`,h=`${i}-${o}--${s}-${a}`;WM("source",c,h,e,s,a),WM("target",c,u,e,i,o),n.set(r.id,r)}}function KU(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:KU(t,n):!1}function QM(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 BKn(e,n,t,r){const s=new Map;for(const[i,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!KU(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 P4({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,c;const s=[];for(const[u,h]of n){const f=(a=t.get(u))==null?void 0:a.internals.userNode;f&&s.push({...f,position:h.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 PKn({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=Zm(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},h=null,f=!1,p=null,m=!1,w=!1,k=null;function v({noDragClassName:y,handleSelector:x,domNode:C,isSelectable:N,nodeId:j,nodeClickDistance:A=0}){p=_a(C);function z({x:B,y:G}){const{nodeLookup:q,nodeExtent:Q,snapGrid:K,snapToGrid:Z,nodeOrigin:J,onNodeDrag:$,onSelectionDrag:L,onError:F,updateNodePositions:U}=n();i={x:B,y:G};let H=!1;const ae=o.size>1,ie=ae&&Q?Tk(Ym(o)):null,ue=ae&&Z?PKn({dragItems:o,snapGrid:K,x:B,y:G}):null;for(const[re,V]of o){if(!q.has(re))continue;let oe={x:B-V.distance.x,y:G-V.distance.y};Z&&(oe=ue?{x:Math.round(oe.x+ue.x),y:Math.round(oe.y+ue.y)}:Zm(oe,K));let ce=null;if(ae&&Q&&!V.extent&&ie){const{positionAbsolute:Re}=V.internals,Fe=Re.x-ie.x+Q[0][0],Xe=Re.x+V.measured.width-ie.x2+Q[1][0],Te=Re.y-ie.y+Q[0][1],$e=Re.y+V.measured.height-ie.y2+Q[1][1];ce=[[Fe,Te],[Xe,$e]]}const{position:me,positionAbsolute:ve}=AU({nodeId:re,nextPosition:oe,nodeLookup:q,nodeExtent:ce||Q,nodeOrigin:J,onError:F});H=H||V.position.x!==me.x||V.position.y!==me.y,V.position=me,V.internals.positionAbsolute=ve}if(w=w||H,!!H&&(U(o,!0),k&&(r||$||!j&&L))){const[re,V]=P4({nodeId:j,dragItems:o,nodeLookup:q});r==null||r(k,o,re,V),$==null||$(k,re,V),j||L==null||L(k,V)}}async function M(){if(!h)return;const{transform:B,panBy:G,autoPanSpeed:q,autoPanOnNodeDrag:Q}=n();if(!Q){c=!1,cancelAnimationFrame(a);return}const[K,Z]=VC(u,h,q);(K!==0||Z!==0)&&(i.x=(i.x??0)-K/B[2],i.y=(i.y??0)-Z/B[2],await G({x:K,y:Z})&&z(i)),a=requestAnimationFrame(M)}function D(B){var ae;const{nodeLookup:G,multiSelectionActive:q,nodesDraggable:Q,transform:K,snapGrid:Z,snapToGrid:J,selectNodesOnDrag:$,onNodeDragStart:L,onSelectionDragStart:F,unselectNodesAndEdges:U}=n();f=!0,(!$||!N)&&!q&&j&&((ae=G.get(j))!=null&&ae.selected||U()),N&&$&&j&&(e==null||e(j));const H=z0(B.sourceEvent,{transform:K,snapGrid:Z,snapToGrid:J,containerBounds:h});if(i=H,o=BKn(G,Q,H,j),o.size>0&&(t||L||!j&&F)){const[ie,ue]=P4({nodeId:j,dragItems:o,nodeLookup:G});t==null||t(B.sourceEvent,o,ie,ue),L==null||L(B.sourceEvent,ie,ue),j||F==null||F(B.sourceEvent,ue)}}const I=lU().clickDistance(A).on("start",B=>{const{domNode:G,nodeDragThreshold:q,transform:Q,snapGrid:K,snapToGrid:Z}=n();h=(G==null?void 0:G.getBoundingClientRect())||null,m=!1,w=!1,k=B.sourceEvent,q===0&&D(B),i=z0(B.sourceEvent,{transform:Q,snapGrid:K,snapToGrid:Z,containerBounds:h}),u=go(B.sourceEvent,h)}).on("drag",B=>{const{autoPanOnNodeDrag:G,transform:q,snapGrid:Q,snapToGrid:K,nodeDragThreshold:Z,nodeLookup:J}=n(),$=z0(B.sourceEvent,{transform:q,snapGrid:Q,snapToGrid:K,containerBounds:h});if(k=B.sourceEvent,(B.sourceEvent.type==="touchmove"&&B.sourceEvent.touches.length>1||j&&!J.has(j))&&(m=!0),!m){if(!c&&G&&f&&(c=!0,M()),!f){const L=go(B.sourceEvent,h),F=L.x-u.x,U=L.y-u.y;Math.sqrt(F*F+U*U)>Z&&D(B)}(i.x!==$.xSnapped||i.y!==$.ySnapped)&&o&&f&&(u=go(B.sourceEvent,h),z($))}}).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:G,updateNodePositions:q,onNodeDragStop:Q,onSelectionDragStop:K}=n();if(w&&(q(o,!1),w=!1),s||Q||!j&&K){const[Z,J]=P4({nodeId:j,dragItems:o,nodeLookup:G,dragging:!1});s==null||s(B.sourceEvent,o,Z,J),Q==null||Q(B.sourceEvent,Z,J),j||K==null||K(B.sourceEvent,J)}}}).filter(B=>{const G=B.target;return!B.button&&(!y||!QM(G,`.${y}`,C))&&(!x||QM(G,x,C))});p.call(I)}function b(){p==null||p.on(".drag",null)}return{update:v,destroy:b}}function HKn(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())jb(s,lm(i))>0&&r.push(i);return r}const qKn=250;function UKn(e,n,t,r){var o,c;let s=[],i=1/0;const a=HKn(e,t,n+qKn);for(const u of a){const h=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of h){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:p,y:m}=Nf(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(h=>h.type===u)??s[0]}return s[0]}function WU(e,n,t,r,s,i=!1){var u,h,f;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((h=a.internals.handleBounds)==null?void 0:h.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,...Nf(a,c,c.position,!0)}:c}function QU(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function GKn(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const XU=()=>!0;function VKn(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:c,lib:u,autoPanOnConnect:h,flowId:f,panBy:p,cancelConnection:m,onConnectStart:w,onConnect:k,onConnectEnd:v,isValidConnection:b=XU,onReconnectEnd:y,updateConnection:x,getTransform:C,getFromHandle:N,autoPanSpeed:j,dragThreshold:A=1,handleDomNode:z}){const M=IU(e.target);let D=0,I;const{x:B,y:G}=go(e),q=QU(i,z),Q=o==null?void 0:o.getBoundingClientRect();let K=!1;if(!Q||!q)return;const Z=WU(s,q,r,c,n);if(!Z)return;let J=go(e,Q),$=!1,L=null,F=!1,U=null;function H(){if(!h||!Q)return;const[me,ve]=VC(J,Q,j);p({x:me,y:ve}),D=requestAnimationFrame(H)}const ae={...Z,nodeId:s,type:q,position:Z.position},ie=c.get(s);let re={inProgress:!0,isValid:null,from:Nf(ie,ae,Rt.Left,!0),fromHandle:ae,fromPosition:ae.position,fromNode:ie,to:J,toHandle:null,toPosition:IM[ae.position],toNode:null,pointer:J};function V(){K=!0,x(re),w==null||w(e,{nodeId:s,handleId:r,handleType:q})}A===0&&V();function oe(me){if(!K){const{x:$e,y:wt}=go(me),ot=$e-B,Mt=wt-G;if(!(ot*ot+Mt*Mt>A*A))return;V()}if(!N()||!ae){ce(me);return}const ve=C();J=go(me,Q),I=UKn(Jm(J,ve,!1,[1,1]),t,c,ae),$||(H(),$=!0);const Re=YU(me,{handle:I,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:b,doc:M,lib:u,flowId:f,nodeLookup:c});U=Re.handleDomNode,L=Re.connection,F=GKn(!!I,Re.isValid);const Fe=c.get(s),Xe=Fe?Nf(Fe,ae,Rt.Left,!0):re.from,Te={...re,from:Xe,isValid:F,to:Re.toHandle&&F?Gh({x:Re.toHandle.x,y:Re.toHandle.y},ve):J,toHandle:Re.toHandle,toPosition:F&&Re.toHandle?Re.toHandle.position:IM[ae.position],toNode:Re.toHandle?c.get(Re.toHandle.nodeId):null,pointer:J};x(Te),re=Te}function ce(me){if(!("touches"in me&&me.touches.length>0)){if(K){(I||U)&&L&&F&&(k==null||k(L));const{inProgress:ve,...Re}=re,Fe={...Re,toPosition:re.toHandle?re.toPosition:null};v==null||v(me,Fe),i&&(y==null||y(me,Fe))}m(),cancelAnimationFrame(D),$=!1,F=!1,L=null,U=null,M.removeEventListener("mousemove",oe),M.removeEventListener("mouseup",ce),M.removeEventListener("touchmove",oe),M.removeEventListener("touchend",ce)}}M.addEventListener("mousemove",oe),M.addEventListener("mouseup",ce),M.addEventListener("touchmove",oe),M.addEventListener("touchend",ce)}function YU(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:c,isValidConnection:u=XU,nodeLookup:h}){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}=go(e),k=a.elementFromPoint(m,w),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const y=QU(void 0,v),x=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),N=v.classList.contains("connectable"),j=v.classList.contains("connectableend");if(!x||!y)return b;const A={source:f?x:r,sourceHandle:f?C:s,target:f?r:x,targetHandle:f?s:C};b.connection=A;const M=N&&j&&(t===qh.Strict?f&&y==="source"||!f&&y==="target":x!==r||C!==s);b.isValid=M&&u(A),b.toHandle=WU(x,y,C,h,t,!0)}return b}const Dk={onPointerDown:VKn,isValid:YU};function KKn({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=_a(e);function i({translateExtent:o,width:c,height:u,zoomStep:h=1,pannable:f=!0,zoomable:p=!0,inversePan:m=!1}){const w=x=>{if(x.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=x.sourceEvent.ctrlKey&&um()?10:1,j=-x.sourceEvent.deltaY*(x.sourceEvent.deltaMode===1?.05:x.sourceEvent.deltaMode?1:.002)*h,A=C[2]*Math.pow(2,j*N);n.scaleTo(A)};let k=[0,0];const v=x=>{(x.sourceEvent.type==="mousedown"||x.sourceEvent.type==="touchstart")&&(k=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY])},b=x=>{const C=t();if(x.sourceEvent.type!=="mousemove"&&x.sourceEvent.type!=="touchmove"||!n)return;const N=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY],j=[N[0]-k[0],N[1]-k[1]];k=N;const A=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),z={x:C[0]-j[0]*A,y:C[1]-j[1]*A},M=[[0,0],[c,u]];n.setViewportConstrained({x:z.x,y:z.y,zoom:C[2]},M,o)},y=SU().on("start",v).on("zoom",f?b:null).on("zoom.wheel",p?w:null);s.call(y,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:co}}const tx=e=>({x:e.x,y:e.y,zoom:e.k}),F4=({x:e,y:n,zoom:t})=>Zy.translate(e,n).scale(t),Gd=(e,n)=>e.target.closest(`.${n}`),ZU=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),WKn=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,H4=(e,n=0,t=WKn,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},JU=e=>{const n=e.ctrlKey&&um()?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 h=>{if(Gd(h,n))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const f=t.property("__zoom").k||1;if(h.ctrlKey&&a){const v=co(h),b=JU(h),y=f*Math.pow(2,b);r.scaleTo(t,y,v,h);return}const p=h.deltaMode===1?20:1;let m=s===lf.Vertical?0:h.deltaX*p,w=s===lf.Horizontal?0:h.deltaY*p;!um()&&h.shiftKey&&s!==lf.Vertical&&(m=h.deltaY*p,w=0),r.translateBy(t,-(m/f)*i,-(w/f)*i,{internal:!0});const k=tx(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,k),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(h,k))}}function XKn({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=Gd(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function YKn({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=tx(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 ZKn({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return i=>{var a,o;e.usedRightMouseButton=!!(t&&ZU(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,tx(i.transform)))}}function JKn({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&&ZU(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=tx(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,c)},t?150:0)}}}function eWn({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:c,lib:u,connectionInProgress:h}){return f=>{var v;const p=e||n,m=t&&f.ctrlKey,w=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Gd(f,`${u}-flow__node`)||Gd(f,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||h&&!w||Gd(f,o)&&w||Gd(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 tWn({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},h=e.getBoundingClientRect(),f=SU().scaleExtent([n,t]).translateExtent(r),p=_a(e).call(f);y({x:s.x,y:s.y,zoom:Uh(s.zoom,n,t)},[[0,0],[h.width,h.height]],r);const m=p.on("wheel.zoom"),w=p.on("dblclick.zoom");f.wheelDelta(JU);async function k(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?N0:mv).transform(H4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}function v({noWheelClassName:I,noPanClassName:B,onPaneContextMenu:G,userSelectionActive:q,panOnScroll:Q,panOnDrag:K,panOnScrollMode:Z,panOnScrollSpeed:J,preventScrolling:$,zoomOnPinch:L,zoomOnScroll:F,zoomOnDoubleClick:U,zoomActivationKeyPressed:H,lib:ae,onTransformChange:ie,connectionInProgress:ue,paneClickDistance:re,selectionOnDrag:V}){q&&!u.isZoomingOrPanning&&b();const oe=Q&&!H&&!q;f.clickDistance(V?1/0:!mo(re)||re<0?0:re);const ce=oe?QKn({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:f,panOnScrollMode:Z,panOnScrollSpeed:J,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):XKn({noWheelClassName:I,preventScrolling:$,d3ZoomHandler:m});p.on("wheel.zoom",ce,{passive:!1});const me=YKn({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});f.on("start",me);const ve=ZKn({zoomPanValues:u,panOnDrag:K,onPaneContextMenu:!!G,onPanZoom:i,onTransformChange:ie});f.on("zoom",ve);const Re=JKn({zoomPanValues:u,panOnDrag:K,panOnScroll:Q,onPaneContextMenu:G,onPanZoomEnd:o,onDraggingChange:c});f.on("end",Re);const Fe=eWn({zoomActivationKeyPressed:H,panOnDrag:K,zoomOnScroll:F,panOnScroll:Q,zoomOnDoubleClick:U,zoomOnPinch:L,userSelectionActive:q,noPanClassName:B,noWheelClassName:I,lib:ae,connectionInProgress:ue});f.filter(Fe),U?p.on("dblclick.zoom",w):p.on("dblclick.zoom",null)}function b(){f.on("zoom",null)}async function y(I,B,G){const q=F4(I),Q=f==null?void 0:f.constrain()(q,B,G);return Q&&await k(Q),Q}async function x(I,B){const G=F4(I);return await k(G,B),G}function C(I){if(p){const B=F4(I),G=p.property("__zoom");(G.k!==I.zoom||G.x!==I.x||G.y!==I.y)&&(f==null||f.transform(p,B,null,{sync:!0}))}}function N(){const I=p?kU(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}async function j(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?N0:mv).scaleTo(H4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}async function A(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?N0:mv).scaleBy(H4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}function z(I){f==null||f.scaleExtent(I)}function M(I){f==null||f.translateExtent(I)}function D(I){const B=!mo(I)||I<0?0:I;f==null||f.clickDistance(B)}return{update:v,destroy:b,setViewport:x,setViewportConstrained:y,getViewport:N,scaleTo:j,scaleBy:A,setScaleExtent:z,setTranslateExtent:M,syncViewport:C,setClickDistance:D}}var Vh;(function(e){e.Line="line",e.Handle="handle"})(Vh||(Vh={}));function nWn({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 XM(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 pu(e,n){return Math.max(0,n-e)}function mu(e,n){return Math.max(0,e-n)}function q1(e,n,t){return Math.max(0,n-e,e-t)}function YM(e,n){return e?!n:n}function rWn(e,n,t,r,s,i,a,o){let{affectsX:c,affectsY:u}=n;const{isHorizontal:h,isVertical:f}=n,p=h&&f,{xSnapped:m,ySnapped:w}=t,{minWidth:k,maxWidth:v,minHeight:b,maxHeight:y}=r,{x,y:C,width:N,height:j,aspectRatio:A}=e;let z=Math.floor(h?m-e.pointerX:0),M=Math.floor(f?w-e.pointerY:0);const D=N+(c?-z:z),I=j+(u?-M:M),B=-i[0]*N,G=-i[1]*j;let q=q1(D,k,v),Q=q1(I,b,y);if(a){let J=0,$=0;c&&z<0?J=pu(x+z+B,a[0][0]):!c&&z>0&&(J=mu(x+D+B,a[1][0])),u&&M<0?$=pu(C+M+G,a[0][1]):!u&&M>0&&($=mu(C+I+G,a[1][1])),q=Math.max(q,J),Q=Math.max(Q,$)}if(o){let J=0,$=0;c&&z>0?J=mu(x+z,o[0][0]):!c&&z<0&&(J=pu(x+D,o[1][0])),u&&M>0?$=mu(C+M,o[0][1]):!u&&M<0&&($=pu(C+I,o[1][1])),q=Math.max(q,J),Q=Math.max(Q,$)}if(s){if(h){const J=q1(D/A,b,y)*A;if(q=Math.max(q,J),a){let $=0;!c&&!u||c&&!u&&p?$=mu(C+G+D/A,a[1][1])*A:$=pu(C+G+(c?z:-z)/A,a[0][1])*A,q=Math.max(q,$)}if(o){let $=0;!c&&!u||c&&!u&&p?$=pu(C+D/A,o[1][1])*A:$=mu(C+(c?z:-z)/A,o[0][1])*A,q=Math.max(q,$)}}if(f){const J=q1(I*A,k,v)/A;if(Q=Math.max(Q,J),a){let $=0;!c&&!u||u&&!c&&p?$=mu(x+I*A+B,a[1][0])/A:$=pu(x+(u?M:-M)*A+B,a[0][0])/A,Q=Math.max(Q,$)}if(o){let $=0;!c&&!u||u&&!c&&p?$=pu(x+I*A,o[1][0])/A:$=mu(x+(u?M:-M)*A,o[0][0])/A,Q=Math.max(Q,$)}}}M=M+(M<0?Q:-Q),z=z+(z<0?q:-q),s&&(p?D>I*A?M=(YM(c,u)?-z:z)/A:z=(YM(c,u)?-M:M)*A:h?(M=z/A,u=c):(z=M*A,c=u));const K=c?x+z:x,Z=u?C+M:C;return{width:N+(c?-z:z),height:j+(u?-M:M),x:i[0]*z*(c?-1:1)+K,y:i[1]*M*(u?-1:1)+Z}}const eG={width:0,height:0,x:0,y:0},sWn={...eG,pointerX:0,pointerY:0,aspectRatio:1};function iWn(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 aWn({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=_a(e);let a={controlDirection:XM("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:h,keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:w,onResizeEnd:k,shouldResize:v}){let b={...eG},y={...sWn};a={boundaries:h,resizeDirection:p,keepAspectRatio:f,controlDirection:XM(u)};let x,C=null,N=[],j,A,z,M=!1;const D=lU().on("start",I=>{const{nodeLookup:B,transform:G,snapGrid:q,snapToGrid:Q,nodeOrigin:K,paneDomNode:Z}=t();if(x=B.get(n),!x)return;C=(Z==null?void 0:Z.getBoundingClientRect())??null;const{xSnapped:J,ySnapped:$}=z0(I.sourceEvent,{transform:G,snapGrid:q,snapToGrid:Q,containerBounds:C});b={width:x.measured.width??0,height:x.measured.height??0,x:x.position.x??0,y:x.position.y??0},y={...b,pointerX:J,pointerY:$,aspectRatio:b.width/b.height},j=void 0,A=Ef(x.extent)?x.extent:void 0,x.parentId&&(x.extent==="parent"||x.expandParent)&&(j=B.get(x.parentId)),j&&x.extent==="parent"&&(A=[[0,0],[j.measured.width,j.measured.height]]),N=[],z=void 0;for(const[L,F]of B)if(F.parentId===n&&(N.push({id:L,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){const U=iWn(F,x,F.origin??K);z?z=[[Math.min(U[0][0],z[0][0]),Math.min(U[0][1],z[0][1])],[Math.max(U[1][0],z[1][0]),Math.max(U[1][1],z[1][1])]]:z=U}m==null||m(I,{...b})}).on("drag",I=>{const{transform:B,snapGrid:G,snapToGrid:q,nodeOrigin:Q}=t(),K=z0(I.sourceEvent,{transform:B,snapGrid:G,snapToGrid:q,containerBounds:C}),Z=[];if(!x)return;const{x:J,y:$,width:L,height:F}=b,U={},H=x.origin??Q,{width:ae,height:ie,x:ue,y:re}=rWn(y,a.controlDirection,K,a.boundaries,a.keepAspectRatio,H,A,z),V=ae!==L,oe=ie!==F,ce=ue!==J&&V,me=re!==$&&oe;if(!ce&&!me&&!V&&!oe)return;if((ce||me||H[0]===1||H[1]===1)&&(U.x=ce?ue:b.x,U.y=me?re:b.y,b.x=U.x,b.y=U.y,N.length>0)){const Xe=ue-J,Te=re-$;for(const $e of N)$e.position={x:$e.position.x-Xe+H[0]*(ae-L),y:$e.position.y-Te+H[1]*(ie-F)},Z.push($e)}if((V||oe)&&(U.width=V&&(!a.resizeDirection||a.resizeDirection==="horizontal")?ae:b.width,U.height=oe&&(!a.resizeDirection||a.resizeDirection==="vertical")?ie:b.height,b.width=U.width,b.height=U.height),j&&x.expandParent){const Xe=H[0]*(U.width??0);U.x&&U.x{M&&(k==null||k(I,{...b}),s==null||s({...b}),M=!1)});i.call(D)}function c(){i.on(".drag",null)}return{update:o,destroy:c}}const oWn={},ZM=e=>{let n;const t=new Set,r=(h,f)=>{const p=typeof h=="function"?h(n):h;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:h=>(t.add(h),()=>t.delete(h)),destroy:()=>{(oWn?"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},cWn=e=>e?ZM(e):ZM,{useDebugValue:lWn}=st,{useSyncExternalStoreWithSelector:uWn}=hQ,_Wn=e=>e;function tG(e,n=_Wn,t){const r=uWn(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return lWn(r),r}const JM=(e,n)=>{const t=cWn(e),r=(s,i=n)=>tG(t,s,i);return Object.assign(r,t),r},fWn=(e,n)=>e?JM(e,n):JM;function zr(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 nx=T.createContext(null),dWn=nx.Provider,nG=wo.error001("react");function $n(e,n){const t=T.useContext(nx);if(t===null)throw new Error(nG);return tG(t,e,n)}function Ar(){const e=T.useContext(nx);if(e===null)throw new Error(nG);return T.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const eO={display:"none"},hWn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},rG="react-flow__node-desc",sG="react-flow__edge-desc",pWn="react-flow__aria-live",mWn=e=>e.ariaLiveMessage,gWn=e=>e.ariaLabelConfig;function vWn({rfId:e}){const n=$n(mWn);return _.jsx("div",{id:`${pWn}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:hWn,children:n})}function bWn({rfId:e,disableKeyboardA11y:n}){const t=$n(gWn);return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:`${rG}-${e}`,style:eO,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),_.jsx("div",{id:`${sG}-${e}`,style:eO,children:t["edge.a11yDescription.default"]}),!n&&_.jsx(vWn,{rfId:e})]})}const rx=T.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return _.jsx("div",{className:ds(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});rx.displayName="Panel";const tO="https://reactflow.dev?utm_source=attribution";function yWn({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:_.jsx(rx,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${tO}`,children:_.jsx("a",{href:tO,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const xWn=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}},U1=e=>e.id;function wWn(e,n){return zr(e.selectedNodes.map(U1),n.selectedNodes.map(U1))&&zr(e.selectedEdges.map(U1),n.selectedEdges.map(U1))}function kWn({onSelectionChange:e}){const n=Ar(),{selectedNodes:t,selectedEdges:r}=$n(xWn,wWn);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 SWn=e=>!!e.onSelectionChangeHandlers;function CWn({onSelectionChange:e}){const n=$n(SWn);return e||n?_.jsx(kWn,{onSelectionChange:e}):null}const iG=[0,0],EWn={x:0,y:0,zoom:1},NWn=["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"],nO=[...NWn,"rfId"],zWn=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}),rO={translateExtent:om,nodeOrigin:iG,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function jWn(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:c}=$n(zWn,zr),u=Ar();T.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=rO,o()}),[]);const h=T.useRef(rO);return T.useEffect(()=>{for(const f of nO){const p=e[f],m=h.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:bKn(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}h.current=e},nO.map(f=>e[f])),null}function sO(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function AWn(e){var r;const[n,t]=T.useState(e==="system"?null:e);return T.useEffect(()=>{if(e!=="system"){t(e);return}const s=sO(),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=sO())!=null&&r.matches?"dark":"light"}const iO=typeof document<"u"?document:null;function _m(e=null,n={target:iO,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("+",` +${te.error}`:te.text,children:[te.dispatchState==="blocked"?_.jsx(QS,{size:13,className:"shrink-0 text-accent-amber"}):_.jsx(HCn,{size:13,className:"shrink-0 text-muted"}),_.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:te.text}),te.dispatchState!=="blocked"&&_.jsx("span",{className:"shrink-0 text-sm text-muted",children:te.dispatchState==="retrying"?KOn(te.nextRetryAt,_n):o9e()}),te.dispatchState==="blocked"?_.jsxs(_.Fragment,{children:[_.jsx("button",{onClick:()=>void Do(te.id),"aria-label":ree({text:te.text}),disabled:wt!==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:wt===te.id?QL():ni()}),_.jsx("button",{onClick:()=>Oo(te.id),"aria-label":XJ({text:te.text}),disabled:wt!==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:gSe()}),ge===Ya&&geOo(te.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(xr,{size:11})})]},te.id))}),Ac&&_.jsxs("div",{id:To,role:"note",className:`composer-demo-hint ${pM}`,children:[_.jsx(Ah,{size:16,className:"shrink-0 text-primary"}),_.jsx("span",{className:"flex-1",dir:"auto",children:e4e()}),_.jsx(It,{size:"small","aria-label":s1(),title:s1(),onClick:()=>{var te;Me(!0),(te=yn.current)==null||te.focus()},children:_.jsx(xr,{size:14})})]}),b&&!Fe&&c&&_.jsxs("div",{role:"note",className:`composer-demo-run-hint ${pM}`,children:[_.jsx(Ah,{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:UN()}),_.jsxs(Ie,{size:"small",onClick:()=>c(b,"keepOpen"),children:[_.jsx(bo,{size:14}),A3()]}),_.jsx("span",{children:qN()})]}),_.jsx(It,{size:"small","aria-label":s1(),title:s1(),onClick:()=>{var te;Ye(!0),(te=yn.current)==null||te.focus()},children:_.jsx(xr,{size:14})})]}),_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:b?`${UN()} ${A3()} ${qN()}`:""}),_.jsxs("div",{className:`composer-box relative flex flex-col border ${Ji?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[_t&&!_t.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:_t.catalogPending?_.jsxs("span",{children:[_t.name," — ",_f()]}):_.jsxs(_.Fragment,{children:[_.jsxs("strong",{children:[_t.name," ",z3e()]})," ",_t.agentNote?Fu(_t.agentNote):y9e()]})}),Wa&&_.jsx(sHn,{skills:ss,activeIndex:Ni,onPick:Wi,onHover:ai}),Hn&&_.jsx(lHn,{activeSessionId:F,onClose:()=>Zn(!1),onResume:te=>{Zn(!1),oe("all"),x(te.id,{projectId:te.projectId})},onImport:te=>{Zn(!1),n_(te)}}),Te.length>0&&_.jsx(MHn,{annotations:Te,onClear:()=>{$e([]),window.requestAnimationFrame(()=>{var te;return(te=yn.current)==null?void 0:te.focus()})},onRemove:te=>{const ge=Te.filter(Se=>Se.id!==te);$e(ge),ge.length===0&&window.requestAnimationFrame(()=>{var Se;return(Se=yn.current)==null?void 0:Se.focus()})}}),Mt.length>0&&_.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:Mt.map((te,ge)=>{const Se=()=>jt(Oe=>Oe.filter((Pe,Et)=>Et!==ge));return te.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:te.name,children:[_.jsx(Qb,{size:22}),_.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:te.name??"document.pdf"}),_.jsx("button",{title:JN(),"aria-label":JN(),onClick:Se,children:_.jsx(xr,{size:11})})]},ge):_.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:te.dataUrl,alt:hL()}),_.jsx("button",{title:ez(),"aria-label":ez(),onClick:Se,children:_.jsx(xr,{size:11})})]},ge)})}),Pt&&_.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Pt}),dt&&_.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:dt}),_.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${Ji?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[_.jsx("textarea",{dir:"auto",ref:yn,"aria-describedby":Ac?To:void 0,className:"relative z-1 bg-transparent",value:ce,placeholder:li?tze():Gf&&_t?cNe({harness:Ce(bu[_t.id]),shortcut:Ce(er)}):Yt?_t!=null&&_t.agentReady?Ove({harness:Ce(bu[Yt.harness])}):yve({harness:Ce(bu[Yt.harness])}):gme(),rows:2,onPaste:Si,onDragOver:te=>{te.dataTransfer.types.includes("Files")&&te.preventDefault()},onDrop:te=>{te.dataTransfer.files.length!==0&&(te.preventDefault(),cr(Array.from(te.dataTransfer.files)))},onChange:te=>{const ge=te.target.value,Se=te.target.selectionStart;qs(Se);const Oe=Se>0&&/\s/.test(ge[Se-1])&&!li&&!Us.current&&rM(ge)===null?N4(ge,Se-1):null,Pe=Oe&&xk(Oe.query),Et=Oe?(ge.slice(0,Oe.start)+ge.slice(Oe.end)).trim():"";if(Oe&&Pe&&(Pe==="plan"||!z4(Pe)&&!Et)&&oi.some(qt=>qt.name===Pe)){Cc(Pe,ge,Oe);return}pe(ge),Hr(!1)},onSelect:te=>qs(te.currentTarget.selectionStart),onCompositionStart:()=>{Us.current=!0},onCompositionEnd:()=>{Us.current=!1},onKeyDown:te=>{if(Wa){if(te.key==="ArrowDown"||te.key==="ArrowUp"){te.preventDefault();const ge=te.key==="ArrowDown"?1:-1;ai((Ni+ge+ss.length)%ss.length);return}if(te.key==="Tab"||te.key==="Enter"){te.preventDefault(),Wi(ss[Ni]);return}if(te.key==="Escape"){te.preventDefault(),Hr(!0);return}}if(te.key==="Backspace"&&Gs(te.currentTarget)){te.preventDefault();return}if(te.key==="Enter"&&!te.shiftKey&&!te.nativeEvent.isComposing){if(te.preventDefault(),Ji){Il();return}o_({queue:te.metaKey||te.ctrlKey})}}}),_.jsx(rHn,{text:ce,editingTokenEnd:Or==null?void 0:Or.end,isCommand:Ol,skills:oi,projectId:e,textareaRef:yn})]}),_.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:Fn.ref,children:[_.jsx(It,{type:"button",className:"composer-bare",title:fw(),"aria-label":fw(),"aria-haspopup":"dialog","aria-expanded":Fn.open,onClick:()=>Fn.setOpen(te=>!te),children:_.jsx(h8n,{size:16})}),Fn.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:fw()}),_.jsx(uDn,{})]})]}),_.jsx("input",{ref:Ot,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:te=>{cr(Array.from(te.target.files??[])),te.target.value=""}}),_.jsx(It,{type:"button",className:"composer-attach",title:$N(),"aria-label":$N(),onClick:()=>{var te;return(te=Ot.current)==null?void 0:te.click()},children:_.jsx(W7n,{size:16})}),Vs&&_.jsxs(Ie,{type:"button",variant:"ghost",active:!0,className:"group max-w-60",title:HN({goal:_a(Vs)}),"aria-label":HN({goal:_a(Vs)}),onClick:()=>void Yi("clear"),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(L$,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(xr,{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:x3e()})]}),Xi&&_.jsxs(Ie,{type:"button",variant:"ghost",active:!0,className:"group",title:WN(),"aria-label":WN(),onClick:()=>void Sc(),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(C7n,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(xr,{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:H5e()})]}),Ji&&_.jsxs(Ie,{type:"button",variant:"ghost",active:!0,className:"group",title:VN(),"aria-label":VN(),onClick:Ro,children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(Mf,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(xr,{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:uL()})]}),_.jsx("div",{className:"min-w-0 flex-1"}),_.jsxs("div",{className:"flex min-w-0 items-center",children:[_.jsx(G9n,{value:Yt,onSelect:Tl,onOpenSettings:()=>a("harnesses"),permissionChoices:_t!=null&&_t.agentReady?(Bt==null?void 0:Bt.permissionModes)??[]:[],defaultPermissionId:(Bt==null?void 0:Bt.defaultPermissionMode)??null,onSelectPermission:dr,reasoningChoices:_t!=null&&_t.agentReady?zi.choices:[],defaultReasoningId:zi.defaultId,onSelectReasoning:Ls,autonomy:(Ct==null?void 0:Ct.autonomy)??j,onSelectAutonomy:is,lockHarness:!!Ct,openRequest:t_}),_.jsx(aHn,{usage:Ct==null?void 0:Ct.contextUsage})]}),Jn&&!li?_.jsx(It,{className:"send-btn",variant:"stop",title:iz(),"aria-label":iz(),onClick:Qf,children:_.jsx(xr,{size:16})}):_.jsx(It,{className:`send-btn ${Ac&&(_t!=null&&_t.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:Ji?nz():j3(),"aria-label":Ji?nz():j3(),onClick:()=>void(Ji?Il():o_()),disabled:Ji?!Ci||!F&&!(_t!=null&&_t.agentReady):!(_t!=null&&_t.agentReady)||!ce.trim()&&Mt.length===0&&Te.length===0,children:_.jsx(M$,{size:16})})]})]})]})]})]})}const pM="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",Tqn=[],Rqn=[];function la({className:e,...n}){return _.jsx("div",{className:Ns("relative flex min-h-0 flex-1 flex-col",e),...n})}function nh({className:e,...n}){return _.jsx("div",{className:Ns("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function rc({className:e,...n}){return _.jsx("div",{className:Ns("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const mM=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function Mqn({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c}){var k;const u=ut(ac(n)),h=((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)},[h]),T.useEffect(()=>{const v=f.current,b=p.current;if(!v||!b)return;const y=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return y.observe(b),y.observe(v),()=>y.disconnect()},[h===null]),h===null)return _.jsx(la,{children:_.jsx("div",{className:mM,children:_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:SI()})})});let w=null;for(const v of h)if(w=bb(v.parts,t),w)break;return _.jsx(la,{children:_.jsx("div",{className:mM,ref:f,onScroll:v=>{const b=v.currentTarget;m.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:_.jsx("div",{ref:p,children:w?_.jsx(sq,{projectId:e,sessionId:n,children:_.jsx(vqn,{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:W0n()})})})})}function Oqn({experiment:e}){var s;const n=ut(HB(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return _.jsx(nh,{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(rc,{children:[g0e()," ",Ce(r)]}):t?t.diff.trim()?_.jsxs(_.Fragment,{children:[t.truncated&&_.jsx(jP,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),_.jsx(TP,{diff:t.diff,partial:t.truncated})]}):_.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?T0e():u0e()}):_.jsx(rc,{children:S0e()})})}function Hq({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":xje(),children:[_.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:zje()}),_.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:gL()})]}),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(Im,{size:12}),_.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&_.jsx(Wh,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:_.jsx(ry,{size:13})}),_.jsx("span",{className:"flex-1"}),_.jsx(It,{title:uz(),"aria-label":uz(),onClick:c,children:o?_.jsx(St,{}):_.jsx(t8n,{size:13})})]})}const Dqn=/\.(md|mdx|markdown)$/i,Lqn=/\.tex$/i,Iqn=/\.html?$/i,$qn=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,Bqn=/\.(csv|tsv|xlsx?|ods)$/i,Pqn=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,Fqn=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,Hqn=/\.pdf$/i,qqn=/\.(docx?|log|rtf|txt)$/i;function Uqn(e){return $qn.test(e)}function VC(e){return Dqn.test(e)}function qq(e){return Lqn.test(e)}function Gqn(e){return Iqn.test(e)}function wf({name:e}){const n=VC(e)?"markdown":Uqn(e)?"image":Bqn.test(e)?"spreadsheet":Pqn.test(e)?"code":Fqn.test(e)?"archive":Hqn.test(e)?"pdf":qqn.test(e)||qq(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})}const Nk=["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(" "),gM=["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 vM(){return{dirs:new Map,files:[]}}function Uq(e){const n=vM();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?_.jsx(mc,{size:13,className:gM}):_.jsx(Ka,{size:13,className:gM}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&_.jsx(WC,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:c,onRename:u,onCancelRename:h})]})}function WC({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u}){const h=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),f=[...e.files].sort((p,m)=>p.localeCompare(m));return _.jsxs(_.Fragment,{children:[h.map(p=>{const m=n?`${n}/${p}`:p;return _.jsx(Kqn,{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:Nk,style:{paddingInlineStart:8+t*14},children:[_.jsx(wf,{name:p}),_.jsx(KB,{name:p,onCommit:k=>c(m,k),onCancel:u})]},`f:${m}`);const w=Wr(k=>i(m,k));return _.jsxs("button",{type:"button",className:Nk,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:wZ({name:Ce(m)}),children:[_.jsx(wf,{name:p}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function Vqn({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var N,j;const c=t.branchName,u=ut({...UB(e,{ref:c}),enabled:r==="files",subscribed:r==="files"}),h=ut({...tb(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=HB(t.id),k=ZV({queryKey:w.queryKey})>0,v=(j=h.data)!=null&&j.exists&&h.data.branch===c?t.chatSessionId??void 0:void 0,b=()=>{u.refetch()},y=T.useMemo(()=>f?Uq(f.entries):null,[f]),x=r==="files"?m:k,C=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(Hq,{view:r,onViewChange:i,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?Gb(n.githubOwner,n.githubRepo,c):void 0,githubTitle:sL({branch:Ce(c)}),refreshing:x,onRefresh:()=>r==="files"?b():void tt.invalidateQueries(w)}),r==="changes"?_.jsx(Oqn,{experiment:t},t.id):_.jsxs(_.Fragment,{children:[(f==null?void 0:f.truncated)&&_.jsx(rc,{children:Fje()}),p&&y&&_.jsxs(rc,{children:[tAe()," ",Ce(p)]}),_.jsx(nh,{children:y?y.dirs.size===0&&y.files.length===0?_.jsx(rc,{children:Wje()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(WC,{node:y,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(A,z)=>v?o(A,v,void 0,z):o(A,void 0,c,z)})}):_.jsx(rc,{children:p?yS({error:Ce(p)}):xS()})})]})]})}function QC({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 Wqn({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var $,L,q;const c=n.id,h=(($=ut(Gi(c)).data)==null?void 0:$.some(P=>P.id===e&&P.busy))??!1,f=ut({...tb(e??""),enabled:!!e,refetchInterval:h?5e3:!1}),p=f.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},w=ut({...UB(c,m),enabled:!e||f.isSuccess,refetchInterval:h?5e3:!1}),k=w.data,v=(L=f.error??w.error)==null?void 0:L.message,b=f.isFetching||w.isFetching,[y,x]=T.useState(null),[C,N]=T.useState(null),j=T.useCallback(()=>{e&&tt.invalidateQueries(tb(e)),tt.invalidateQueries({queryKey:kt("getCodeTree",c),predicate:P=>!XD(P)})},[e,c]),A=T.useRef(h);T.useEffect(()=>{A.current&&!h&&j(),A.current=h},[h,j]);const z=T.useMemo(()=>k?Uq(k.entries):null,[k]),M=T.useCallback(P=>{const F=new Set(r);F.has(P)?F.delete(P):F.add(P),i(F)},[r,i]),D=e&&(p!=null&&p.exists)?p:null,I=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?d4n({branch:Ce(D.baselineBranch)}):zS()),B=((q=D==null?void 0:D.files)==null?void 0:q.length)??0,G=D?Jwn({branch:Ce(`${I}${B>0?"*":""}`)}):a4n({branch:Ce(n.baselineBranch)}),U=D?D.branch:n.baselineBranch,Q=(P,F)=>D?a(P,e,void 0,F):a(P,void 0,n.baselineBranch,F),V=(k==null?void 0:k.root)==="worktree",Z=async(P,F)=>{try{await N3n(c,P,F,{sessionId:e}),j()}catch(re){Zt(re instanceof Error?re.message:String(re),"error")}},J=P=>{const F=(k==null?void 0:k.path)??n.repoPath;QEn(F,P)};return _.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[_.jsx(Hq,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:G,branchTitle:G,githubHref:n.githubEnabled&&U?Gb(n.githubOwner,n.githubRepo,U):void 0,githubTitle:U?sL({branch:Ce(U)}):void 0,refreshing:b,onRefresh:j}),v&&(p||k)&&_.jsxs(rc,{children:[W4n()," ",Ce(v)]}),!k||e&&!p?_.jsx(nh,{children:_.jsx(rc,{children:v?yS({error:Ce(v)}):xS()})}):D&&t==="changes"?_.jsx(nh,{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:O4n()}):_.jsxs(_.Fragment,{children:[D.diff.truncated&&_.jsx(jP,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),_.jsx(TP,{diff:D.diff.diff,partial:D.diff.truncated})]})}):_.jsxs(nh,{children:[k.truncated&&_.jsx(rc,{children:y4n()}),z?z.dirs.size===0&&z.files.length===0?_.jsx(QC,{icon:Pu,title:F4n(),description:qVe()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(WC,{node:z,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:Q,renamingPath:C,onContextMenu:(P,F)=>{x(q6(P,F))},onRename:(P,F)=>{N(null),Z(P,{action:"rename",newName:F})},onCancelRename:()=>N(null)})}):_.jsx(rc,{children:N4n()})]}),y&&_.jsx(U6,{target:y,onOpen:()=>Q(y.path,"keepOpen"),onRename:V&&o(y.path)?()=>N(y.path):void 0,onDuplicate:V?()=>void Z(y.path,{action:"duplicate"}):void 0,onCopyPath:()=>J(y.path),onDelete:V?()=>{window.confirm(KPe({path:Ce(y.path)}))&&Z(y.path,{action:"delete"})}:void 0,onClose:()=>x(null)})]})}function Gq({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=T.useMemo(()=>{if(!e)return[];const h=e.replace(/\r\n?/g,` +`),f=RB(h,a6(n));return h.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 h;r!==void 0&&(a?((h=o.current)==null||h.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:c}=hB(i.length),u=T.useMemo(()=>i.map((h,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:`${dB} 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 ${Jv} ${fB}`,children:MB(h)?_.jsx("br",{}):h})]},f)),[i,c,a]);return _.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${Jv}`,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 Qqn="modulepreload",Xqn=function(e){return"/"+e},bM={},Yqn=function(n,t,r){let s=Promise.resolve();if(t&&t.length>0){let a=function(u){return Promise.all(u.map(h=>Promise.resolve(h).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=Xqn(u),u in bM)return;bM[u]=!0;const h=u.endsWith(".css"),f=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const p=document.createElement("link");if(p.rel=h?"stylesheet":Qqn,h||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),h)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)})},yb=T.createContext(null);function Zqn({url:e,name:n}){return _.jsx(Wh,{size:"small",href:e,download:n,"aria-label":Mv({name:Ce(n)}),"data-tip":Mv({name:Ce(n)}),"data-tip-align":"end",children:_.jsx(Wb,{size:13})})}const Jqn=T.lazy(()=>Yqn(()=>import("./PdfPreview--NppkCR0.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:[Crt()," ",_.jsxs("a",{href:e,download:n,children:[M3()," ",Ce(n)]})]})}function zk({kind:e,url:n,name:t,download:r=!0}){const[s,i]=T.useState(!1),a=T.useContext(yb);if(T.useEffect(()=>i(!1),[e,n]),s)return _.jsx(Vq,{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(St,{})}),children:_.jsx(Jqn,{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&&si.createPortal(_.jsx(Zqn,{url:n,name:t}),a)]})}const eUn=e=>({queryKey:kt("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 ut({...eUn(e),enabled:n,subscribed:n}).data??null}function XC({projectId:e,request:n,remote:t}){var a,o,c;const r=ut(P6(e,n)),s=yi(),i=!r.isError&&!r.isFetching?(a=r.data)==null?void 0:a.absolutePath:null;return _.jsxs("div",{className:"flex shrink-0 min-w-0 items-center gap-1 border-b border-border-variant px-3 py-1 text-xs text-subtext",children:[_.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",title:i??((o=r.error)==null?void 0:o.message),children:((c=r.error)==null?void 0:c.message)??(i?t?xL({path:Ce(i)}):Ce(i):n.ref?wS({branch:Ce(n.ref)}):wL())}),r.isPending&&_.jsx(St,{}),i&&_.jsxs(_.Fragment,{children:[_.jsx(It,{size:"small","aria-label":T3(),"data-tip":T3(),onClick:()=>{zn(s)&&ly(i)},children:_.jsx(Yu,{size:13})}),!t&&_.jsx(It,{size:"small","aria-label":R3(),"data-tip":R3(),onClick:()=>{zn(s)&&MS(e,n.path,n).catch(u=>Zt(u instanceof Error?u.message:String(u),"error"))},children:_.jsx(Pu,{size:13})})]})]})}function tUn(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function nUn(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 h=u.join("/");if(!h)return null;const f=new URLSearchParams(c);f.delete("path");const p=f.toString();return{path:h,url:`${df(e,h)}${p?`&${p}`:""}${i}`}}function rUn(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,sUn=8,iUn=280;function aUn(){try{const e=Number(localStorage.getItem(Qq));if(Number.isFinite(e)&&e>=Yq&&e<=Zq)return e}catch{}return iUn}function oUn(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 rh(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=rh(t.children??[],n);if(r)return r}}return null}function Jq({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(tUn(i))return i;const a=nUn(e,n,i);if(!a)return null;const o=rh(r,a.path);if(!o)return a.url;const c=a.url.indexOf("#"),u=c===-1?a.url:a.url.slice(0,c),h=c===-1?"":a.url.slice(c);return`${u}&v=${o.modifiedAt}:${o.size}${h}`};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(fOn,{remarkPlugins:[JH,[eq,aq]],rehypePlugins:[zH],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},...oq},children:nq(rUn(t))})})}function cUn(e){return e.presentation==="text"&&VC(e.name)?"markdown":Kq(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function lUn(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=HI,i=F6(e,n.path),a=ut({...i,enabled:s,subscribed:s}),o=T.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});T.useEffect(()=>{const h=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&h.projectId===e&&h.path===n.path&&(h.modifiedAt!==n.modifiedAt||h.size!==n.size||h.version!==null&&h.version!==r)&&tt.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 uUn({projectId:e,entry:n,onDelete:t,artifactEntries:r,remote:s}){const i=cUn(n),a=Wq(df(e,n.path)),{text:o,binary:c,truncated:u,error:h,wantsText:f}=lUn(e,n,i,a),[p,m]=T.useState(!1),[w,k]=T.useState(null),v=i==="markdown",b=n.path.split("/").slice(0,-1).join("/"),y=`${df(e,n.path)}&v=${encodeURIComponent(a??`${n.modifiedAt}:${n.size}`)}`;let x;return i==="image"||i==="audio"||i==="video"||i==="pdf"?x=_.jsx(yb.Provider,{value:w,children:_.jsx(zk,{kind:i,url:y,name:n.name})}):i==="download"||!f||c?x=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[i==="download"||c?wde():r0e()," ",_.jsx("a",{href:y,...i==="download"||c?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:i==="download"||c?SL():qde()})]}):h?x=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Xhe()," ",Ce(h)]}):o===null?x=_.jsxs(Pr,{children:[_.jsx(St,{})," ",cL()]}):v&&!p?x=_.jsx(Jq,{projectId:e,folder:b,markdown:o,entries:r}):x=_.jsx(Gq,{text:o,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(wf,{name:n.name}),_.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ce(n.path),children:n.name}),_.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0 @max-xl:hidden",children:[Ape()," ",new Date(n.modifiedAt).toLocaleString(E(),{dateStyle:"medium",timeStyle:"short"})]}),_.jsx("div",{ref:k,className:"contents"}),(i==="text"||i==="download")&&_.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:_l(n.size)}),v&&_.jsx(It,{size:"small",active:p,"data-tip":p?Dv():Pd(),"data-tip-align":"end","aria-label":p?Dv():Pd(),onClick:()=>m(C=>!C),children:_.jsx(f5,{size:13})}),_.jsx(Wh,{size:"small",href:y,target:"_blank",rel:"noopener noreferrer","data-tip":AN(),"data-tip-align":"end","aria-label":AN(),children:_.jsx(mf,{size:13})}),_.jsx(It,{size:"small","data-tip":jN(),"data-tip-align":"end","aria-label":jN(),onClick:()=>{window.confirm(gS({path:Ce(n.path)}))&&t(n.path)},children:_.jsx(Of,{size:13})})]}),_.jsx(XC,{projectId:e,request:{path:n.path,source:"artifacts"},remote:s}),_.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 ${v&&!p?"doc":""}`,children:[x,u&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:rpe()})]})]})}function eU({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,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,sUn)*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),onContextMenu:v=>{v.preventDefault(),u(v,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:Ce(p.name)}):pde({name:Ce(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},onKeyDown:v=>{(v.key==="ContextMenu"||v.shiftKey&&v.key==="F10")&&(v.preventDefault(),u(v,p.path))},children:_.jsx(Ka,{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(It,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":qhe(),"data-tip-align":"end","aria-label":cde({name:Ce(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(gS({path:Ce(p.path)}))&&o(p.path)},children:_.jsx(Of,{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:h,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(wf,{name:p.name}),_.jsx(KB,{name:p.name,onCommit:k=>h(p.path,k),onCancel:f})]},p.path):_.jsxs("button",{type:"button","data-artifact-path":p.path,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:DX({path:Ce(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(wf,{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 _Un({project:e,artifacts:n,onOpenFile:t,canRenameFile:r,remote:s}){var L,q;const[i,a]=T.useState(null),[o,c]=T.useState(null),[u,h]=T.useState(""),[f,p]=T.useState(""),[m,w]=T.useState(0);T.useEffect(()=>{const P=window.setTimeout(()=>p(u.trim()),250);return()=>window.clearTimeout(P)},[u]);const k=JV({...qEn(e.id,f),enabled:f.length>0}),v=T.useMemo(()=>{var P;return((P=k.data)==null?void 0:P.pages.flatMap(F=>F.entries))??[]},[k.data]),b=T.useMemo(()=>FB((n==null?void 0:n.entries)??[],o?[o]:[]),[n==null?void 0:n.entries,o]),y=u.trim().length>0,[x,C]=T.useState(()=>oUn(e.id)),[N,j]=T.useState(aUn),[A,z]=T.useState(null),[M,D]=T.useState(null),I=T.useRef(null);T.useEffect(()=>{var F;if(!i||y||!m)return;const P=(F=I.current)==null?void 0:F.querySelector(`[data-artifact-path="${CSS.escape(i)}"]`);P==null||P.scrollIntoView({block:"nearest"})},[i,y,m,b]),T.useEffect(()=>{try{localStorage.setItem(`${Xq}${e.id}`,JSON.stringify([...x]))}catch{}},[e.id,x]);const B=P=>{var se;P.preventDefault(),P.currentTarget.setPointerCapture(P.pointerId);const F=(se=I.current)==null?void 0:se.getBoundingClientRect(),re=document.body.style.userSelect;document.body.style.userSelect="none";const ie=K=>{const oe=Math.round(K.clientX-((F==null?void 0:F.left)??0)),ce=Math.min(Math.max(oe,Yq),Zq);j(ce);try{localStorage.setItem(Qq,String(ce))}catch{}},ue=()=>{window.removeEventListener("pointermove",ie),window.removeEventListener("pointerup",ue),window.removeEventListener("pointercancel",ue),document.body.style.userSelect=re};window.addEventListener("pointermove",ie),window.addEventListener("pointerup",ue),window.addEventListener("pointercancel",ue)};T.useEffect(()=>{if(!i||!n)return;const P=rh(b,i);(!P||P.isDir)&&a(null)},[i,n,b]);const G=P=>C(F=>{const re=new Set(F);return re.has(P)?re.delete(P):re.add(P),re}),U=P=>{(i===P||i!=null&&i.startsWith(P+"/"))&&a(null),((o==null?void 0:o.path)===P||o!=null&&o.path.startsWith(P+"/"))&&c(null),O5n(e.id,P).catch(()=>{})},Q=async(P,F)=>{try{await D5n(e.id,P,F),F.action==="rename"&&i===P&&a(null),F.action==="rename"&&((o==null?void 0:o.path)===P||o!=null&&o.path.startsWith(P+"/"))&&c(null)}catch(re){Zt(re instanceof Error?re.message:String(re),"error")}},V=P=>{const F=yi();ly(tt.fetchQuery(P6(e.id,{path:P,source:"artifacts"})).then(re=>{if(!zn(F)||!re.absolutePath)throw new Error(Lv());return re.absolutePath}))};if(!n)return _.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:_.jsxs(Pr,{className:"p-5",children:[_.jsx(St,{})," ",kpe()]})});const Z=P=>_.jsx(eU,{entries:P,depth:0,collapsed:x,selected:i,onToggle:G,onSelect:a,onOpenFile:t,onDelete:U,renamingPath:M,onContextMenu:(F,re)=>{z(q6(F,re))},onRename:(F,re)=>{D(null),Q(F,{action:"rename",newName:re})},onCancelRename:()=>D(null)}),J=i?rh(b,i):null,$=P=>{c(P),a(P.path),C(F=>{const re=new Set(F),ie=P.path.split("/");for(let ue=1;ueF+1)};return _.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:I,style:{width:N},children:[_.jsx(XC,{projectId:e.id,request:{path:"",source:"artifacts"},remote:s}),_.jsx("div",{className:"shrink-0 p-2",children:_.jsx(Br,{"aria-label":zN(),placeholder:zN(),value:u,onChange:P=>h(P.target.value),onKeyDown:P=>{P.key==="Escape"&&(P.preventDefault(),P.stopPropagation(),h(""))}})}),_.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:B}),_.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[y?_.jsx(_.Fragment,{children:f!==u.trim()||k.isPending?_.jsxs(Pr,{children:[_.jsx(St,{})," ",khe()]}):_.jsxs(_.Fragment,{children:[k.error&&_.jsx("p",{role:"alert",className:"m-0 px-3 py-2 text-sm text-accent-red",children:k.error.message}),!k.error&&v.length===0&&_.jsx("p",{role:"status",className:"m-0 px-3 py-2 text-sm text-subtext",children:uhe()}),v.map(P=>_.jsxs("button",{type:"button",className:"flex w-full min-w-0 items-center gap-2 px-3 py-2 text-start text-sm text-text hover:bg-panel",title:P.path,onClick:()=>$(P),children:[_.jsx(wf,{name:P.name}),_.jsx("span",{className:"min-w-0 break-all",children:P.path})]},P.path)),k.hasNextPage&&_.jsx(Ie,{disabled:k.isFetchingNextPage,onClick:()=>void k.fetchNextPage(),children:rhe()}),((L=k.data)==null?void 0:L.pages.some(P=>P.incomplete))&&_.jsx("p",{role:"status",className:"m-0 px-3 py-2 text-sm text-accent-amber",children:Xde()})]})}):b.length?Z(b):_.jsx(QC,{icon:GS,title:Ipe(),description:Xpe()}),!y&&n.truncated&&_.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:upe()})]})]}),J?_.jsx(uUn,{projectId:e.id,entry:J,onDelete:U,artifactEntries:b,remote:s},J.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(q7n,{size:22,strokeWidth:1.5}),_.jsx("span",{children:Ahe()})]}),A&&_.jsx(U6,{target:A,onOpen:(q=rh(b,A.path))!=null&&q.isDir?void 0:()=>t(A.path),onReveal:s?void 0:()=>{MS(e.id,A.path,{source:"artifacts"}).catch(P=>Zt(P instanceof Error?P.message:String(P),"error"))},onRename:r(A.path)?()=>D(A.path):void 0,onDuplicate:()=>void Q(A.path,{action:"duplicate"}),onCopyPath:()=>V(A.path),onDelete:()=>{window.confirm(gS({path:Ce(A.path)}))&&U(A.path)},onClose:()=>z(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",fUn="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",dUn="text-sm font-normal text-text",hUn="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 pUn(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(St,{}),_.jsx("span",{children:cfn()})]}):_.jsxs(_.Fragment,{children:[_.jsx(v8n,{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:[_l(e),n>0&&_.jsxs("span",{className:"text-muted",children:[" · ",vo(n)]})]})}function mUn({skill:e,onError:n}){const t=pn({mutationFn:skn}),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:dUn,children:e.name}),e.origin&&_.jsx(Wt,{size:"small",children:e.origin})]}),_.jsx(aU,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx(It,{size:"small","data-tip":e.origin?_un():a_n(),"data-tip-align":"end","aria-label":e.origin?Cun({name:Ce(e.name)}):rln({name:Ce(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?vun({name:Ce(e.name)}):Xcn({name:Ce(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:_.jsx(Of,{size:13})})]})}function gUn({template:e,onError:n}){const t=pn({mutationFn:tkn}),r=t.isPending,s=e.supportFiles.length;return _.jsxs("div",{className:fUn,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:hUn,children:[e.entry,s>0&&(s===1?Yln():Run({count:Jt(s)}))]})]}),_.jsx(aU,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx(It,{"data-tip":d_n(),"data-tip-align":"end","aria-label":gln({name:Ce(e.name)}),disabled:r,onClick:()=>{window.confirm(uln({name:Ce(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:_.jsx(Of,{size:13})})]})}function vUn(){var y;const e=pn({mutationFn:rkn}),n=ut(Xkn()),t=n.data,r=T.useRef(null),[s,i]=T.useState(!1),[a,o]=T.useState(!1),c=T.useCallback(()=>{const x=r.current;i(!!x&&x.scrollTop>1),o(!!x&&x.scrollHeight-x.scrollTop-x.clientHeight>1)},[]);T.useLayoutEffect(()=>{c();const x=r.current;if(!x)return;const C=new ResizeObserver(c);return C.observe(x),()=>C.disconnect()},[t,c]);const u=n.isFetching,h=(y=n.error)==null?void 0:y.message,[f,p]=T.useState(!1),[m,w]=T.useState(null),k=()=>{n.refetch()},v=T.useRef(!1),b=T.useCallback(async x=>{if(!v.current){if(w(null),!pUn(x.name)){w(wfn());return}if(x.size>tU){w(xI());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:x.name,contentBase64:await sU(x)})}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:tfn()}),_.jsxs(Ie,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[_.jsx(Va,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),_.jsx("p",{className:rU,children:Sln()}),_.jsx(iU,{accept:".md,.markdown,.zip",busy:f,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:Tln()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:qcn()})]}),onFile:x=>void b(x)}),m&&_.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),h&&_.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Bun()," ",h]}),t===void 0?h?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(St,{})," ",N_n()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:F_n()}):_.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(x=>_.jsx(mUn,{skill:x,onError:w},x.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 bUn(){var h;const e=pn({mutationFn:ekn}),n=ut(Qkn()),t=n.data,r=(h=n.error)==null?void 0:h.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(jfn());return}if(f.size>tU){o(xI());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:y_n()}),_.jsx("p",{className:rU,children:pfn()}),_.jsx(iU,{accept:".tex,.zip",busy:s,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:$ln()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:pmn()})]}),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:[Kun()," ",r]}),t===void 0?r?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(St,{})," ",O_n()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:W_n()}):_.jsx("div",{className:"flex flex-col mt-1",children:t.map(f=>_.jsx(gUn,{template:f,onError:o},f.name))})]})}function yUn(){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:Jun()}),_.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:sun()}),_.jsx(vUn,{}),_.jsx(bUn,{})]})}const xUn="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Go({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?xUn:""}`,onClick:i,onDoubleClick:a,title:s?cmn({label:n}):n,"aria-label":s?tmn({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:cje(),onPointerDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),o()},children:_.jsx(xr,{size:12})})]})}const yM=["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 wUn({owner:e,repo:n,branch:t}){return!e||!n?_.jsx("span",{className:yM,children:_.jsx("code",{children:t})}):_.jsxs("a",{className:yM,href:Gb(e,n,t),target:"_blank",rel:"noopener noreferrer",title:Ov({name:Ce(t)}),children:[_.jsx("code",{children:t}),_.jsx(ry,{size:12})]})}const $4=["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(" "),xM=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function wM(e){return new Date(e).toLocaleString(E(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function kM(e,n){return $0((e.endedAt??n)-e.createdAt)}function kUn({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=TI(r),c=r.some(f=>f.status==="running"||f.status==="starting"),[u,h]=T.useState(()=>Date.now());return T.useEffect(()=>{if(!c)return;h(Date.now());const f=window.setInterval(()=>h(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(ml,{status:a?pa(a):"idle"})]}),_.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&_.jsxs(Ie,{...Wr(f=>s(a.id,f)),children:[_.jsx(bo,{size:15}),GIe()]}),_.jsxs(Ie,{...Wr(i),children:[_.jsx(Xb,{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:gIe()}),_.jsx(_c,{text:e.description})]}),_.jsxs("section",{className:$4,children:[_.jsx("h2",{children:a?qLe():b$e()}),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(ml,{status:pa(a)}),_.jsx(i6,{backend:a.backend}),_.jsxs("span",{title:f$e(),children:[_.jsx(NCn,{size:13}),wM(a.createdAt)]}),_.jsxs("span",{title:SIe(),children:[_.jsx(PCn,{size:13}),kM(a,u)]}),a.commitSha&&_.jsxs("span",{title:rIe(),children:[_.jsx(m7n,{size:14}),_.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&_.jsxs("span",{children:[TIe()," ",a.exitCode]})]}),a.command&&_.jsxs("code",{className:xM,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:$4,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(wUn,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&_.jsxs("span",{children:[$Ie()," ",_.jsx("code",{children:n.slug})]}),_.jsxs("span",{title:wM(e.createdAt),children:[uIe()," ",vo(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&_.jsxs("code",{className:xM,children:["$ ",e.runCommand]})]}),r.length>0&&_.jsxs("section",{className:$4,children:[_.jsx("h2",{children:i$e()}),_.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",{...Wr(m=>s(f.id,m)),children:[_.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[ZIe()," ",r.length-p]}),_.jsx(ml,{status:pa(f)}),_.jsx("span",{children:vo(f.createdAt)}),_.jsx("span",{children:kM(f,u)}),_.jsx(bo,{size:13})]},f.id))})]})]})})}function SM(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}=Zb(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 x3n(e,a);if(i)return;if(f.dataBase64&&r.write(SM(f.dataBase64)),a=f.nextOffset,f.eof)break}}catch{}finally{o=!1,c&&!i&&(c=!1,u())}}const h=sSn(e,f=>{if(i)return;const p=SM(f.dataBase64);!o&&f.offset===a?(r.write(p),a+=p.length):f.offset+p.length>a&&u()});return u(),()=>{i=!0,h(),s()}},[e]),_.jsx("div",{ref:n,className:"h-full w-full"})}function CUn({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:c}){const u=r.filter(h=>h.experimentId===e.id).sort((h,f)=>f.createdAt-h.createdAt);return t==="overview"?_.jsx(kUn,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(h,f)=>o("terminal",h,f),onOpenCode:h=>c("files",h)}):_.jsx(EUn,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function EUn({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=T.useState(null),[a,o]=T.useState(null),[c,u]=T.useState(!1),h=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 b=n.findIndex(y=>y.id===v);return b===-1?n.length:n.length-b};T.useEffect(()=>{if(!c)return;const v=b=>{var y;(y=h.current)!=null&&y.contains(b.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 OI(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(Ie,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[_.jsx(T$,{size:13}),m?cAe():bL()]}),n.length>0&&f&&_.jsxs("div",{className:"run-history relative shrink-0",ref:h,children:[_.jsxs(Ie,{title:ODe(),"aria-expanded":c,onClick:()=>u(v=>!v),children:[_.jsxs("span",{children:[_z()," ",w(f.id)]}),_.jsx(ml,{status:m?"cancelling":pa(f)}),_.jsx(mc,{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(vn,{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:[_z()," ",w(v.id)]}),_.jsx(ml,{status:pa(v)}),_.jsx("span",{className:"ms-auto text-xs text-muted",children:vo(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(SUn,{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?fo():xDe()})})]})}let jk=!1;function CM(e){jk=!0;try{return window.confirm(e)}finally{jk=!1}}const Ak=e=>e.replace(/\r\n/g,` +`),EM=(e,n,t)=>{const r=Ak(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r +`),conflict:null}},nl=e=>e.draft!==e.baseline,NUn=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),zUn=e=>e.crlf?e.draft.replace(/\n/g,`\r +`):e.draft;function jUn(e,n,t){return!nl(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class AUn{constructor(){Qs(this,"buffer",null);Qs(this,"listeners",new Set);Qs(this,"saving",!1);Qs(this,"saveError",null);Qs(this,"revision",0);Qs(this,"saveRevision",0);Qs(this,"getSnapshot",()=>this.buffer);Qs(this,"getRevision",()=>this.revision);Qs(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));Qs(this,"set",n=>{this.buffer=n,this.notify()});Qs(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});Qs(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});Qs(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&&(nl(this.buffer)||this.buffer.conflict!==null)}}function TUn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var Z,J,$;const c=ut({...UEn(),enabled:r,subscribed:r}),u=((Z=c.data)==null?void 0:Z.engine)??(c.isPending?void 0:null),h=((J=c.data)==null?void 0:J.hint)??null,f=(($=c.data)==null?void 0:$.installCommand)??null,[p,m]=T.useState(!1),[w,k]=T.useState(null),[v,b]=T.useState(null),[y,x]=T.useState(!1),[C,N]=T.useState(null),[j,A]=T.useState(null),[z,M]=T.useState(!1),[D,I]=T.useState(0),B=T.useCallback(L=>{M(L),L&&I(q=>q+1)},[]),G=T.useRef(o);G.current=o;const U=T.useRef(!1),Q=T.useRef(null),V=T.useCallback(()=>{if(U.current)return;Q.current=n,U.current=!0,m(!0);const L=G.current;A(null),b(null),N(null),R3n(e,n,{sessionId:t}).then(q=>{var F,re;const P=q.pdfPath;if(q.ok&&P){k(ie=>({path:P,version:((ie==null?void 0:ie.version)??0)+1,source:L})),x(q.hadErrors),N(q.note),q.hadErrors&&b(((F=q.log)==null?void 0:F.trim())||null),B(!0);return}k(null),x(!1),N(q.note),M(!1),b(((re=q.log)==null?void 0:re.trim())||Pet())}).catch(q=>{k(null),x(!1),N(null),M(!1),A(q instanceof Error?q.message:String(q))}).finally(()=>{U.current=!1,m(!1)})},[e,n,t,B]);return T.useEffect(()=>{!r||!s||!a||!u||Q.current!==n&&V()},[r,s,a,u,n,V]),{engine:u,installHint:h,installCommand:f,compiling:p,compiled:w,stale:w!==null&&w.source!==o,log:v,builtWithErrors:y,note:C,error:j,showPdf:z,setShowPdf:B,viewNonce:D,compile:()=>{i==null||i(),V()},dismiss:()=>{A(null),b(null)}}}const RUn=3e4,MUn=3e4,OUn=5*6e4;function DUn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:c}){var ue,se,K,oe;const u=T.useMemo(()=>KEn(e,n,{sessionId:t}),[e,n,t]),h=ut({...u,enabled:r,subscribed:r}),f=((ue=h.data)==null?void 0:ue.hasToken)??!1,p=((se=h.data)==null?void 0:se.hasSession)??!1,m=((K=h.data)==null?void 0:K.link)??null,w=!h.isPending,[k,v]=T.useState(null),[b,y]=T.useState(0),[x,C]=T.useState(!1),[N,j]=T.useState(null),[A,z]=T.useState(null),[M,D]=T.useState(!1),I=T.useCallback(ce=>{zn(u.queryKey)&&tt.setQueryData(u.queryKey,pe=>pe&&{...pe,hasSession:ce})},[u]),B=T.useCallback(ce=>{zn(u.queryKey)&&tt.setQueryData(u.queryKey,ce)},[u]);T.useEffect(()=>{j(null),y(0),L.current=!1,z(null),D(!1),V.current=!1},[r,e,n,t]),T.useEffect(()=>{D(!1)},[a]);const G=T.useRef(!1),U=T.useRef(c);U.current=c;const Q=T.useRef(o);Q.current=o;const V=T.useRef(!1),Z=T.useCallback(ce=>!f||!m||G.current||Q.current?!1:(G.current=!0,C(!0),z(null),H3n(e,n,{sessionId:t,resolve:ce}).then(pe=>{V.current=!1,j(pe),pe.pulled.includes(n)&&(Q.current?D(!0):U.current(pe.pulled))}).catch(pe=>{V.current=!0,j(null),z(pe instanceof Error?pe.message:String(pe))}).finally(()=>{G.current=!1,C(!1)}),!0),[e,n,t,f,m]),J=T.useRef(null),$=(k==null?void 0:k.state)==="live";T.useEffect(()=>{if(!r||!s||!w||!f||!m||o||$)return;const ce=`${n}:${m.projectId}:${a}`;J.current!==ce&&Z()&&(J.current=ce)},[r,s,w,f,m,n,a,o,x,Z,$]);const L=T.useRef(!1);!x&&N&&N.conflicts.length===0&&!A&&(L.current=!0);const q=r&&w&&!!m&&f&&p&&L.current,P=T.useRef(null),F=T.useRef(Promise.resolve()),re=T.useRef(!1);re.current=(k==null?void 0:k.state)==="stopped"&&k.error!=null;const ie=T.useRef(!1);return T.useEffect(()=>{if(!q)return;let ce=!1;const pe=()=>{const Me=ie.current;ie.current=!1,!(!Me&&re.current)&&(F.current=F.current.then(()=>{if(!ce)return I3n(e,n,{sessionId:t,retry:Me}).then(Fe=>{var Ye;ce||((P.current===null||((Ye=Fe.status)==null?void 0:Ye.state)==="stopped")&&v(Fe.status),P.current=Fe.key)}).catch(Fe=>{ce||v({state:"stopped",error:Fe instanceof Error?Fe.message:String(Fe),needsSession:!1,note:null})})}))};pe();const ve=setInterval(pe,MUn);return()=>{ce=!0,clearInterval(ve),P.current=null,v(null),F.current=F.current.then(()=>$3n(e,n,{sessionId:t})).catch(()=>{})}},[q,b,e,n,t]),T.useEffect(()=>uSn(ce=>{if(ce.key===P.current){if(ce.type==="live"){v(ce.status);return}ce.paths.includes(n)&&(Q.current?D(!0):U.current(ce.paths))}}),[n]),T.useEffect(()=>{if(!r||!s||!w||!f||!m||o||$)return;const ce=setInterval(()=>{G.current||V.current||tt.fetchQuery({...VEn(e,n,{sessionId:t}),staleTime:0}).then(pe=>{pe.remoteChanged&&Z()}).catch(pe=>{V.current=!0,z(pe instanceof Error?pe.message:String(pe))})},RUn);return()=>clearInterval(ce)},[r,s,w,f,m,o,e,n,t,Z,$]),T.useEffect(()=>{if(!r||!s||!w||!f||!m||!$)return;const ce=setInterval(Z,OUn);return()=>clearInterval(ce)},[r,s,w,f,m,$,Z]),{hasToken:f,hasSession:p,live:k,retryLive:()=>{ie.current=!0,y(ce=>ce+1)},link:m,loaded:w,syncing:x,last:N,error:A??((oe=h.error)==null?void 0:oe.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>D(!1),uploadUrl:U3n(e,n,{sessionId:t}),saveToken:async ce=>{const pe=await LI(ce);J.current=null,V.current=!1,z(null),zn(u.queryKey)&&tt.setQueryData(u.queryKey,ve=>ve&&{...ve,hasToken:pe.hasToken})},saveSession:async ce=>{const pe=await II(ce,{host:m==null?void 0:m.host});I(pe.hasSession),ie.current=!0,y(ve=>ve+1)},importSession:async()=>{const ce=await L3n({host:m==null?void 0:m.host});return I(ce.hasSession),ie.current=!0,y(pe=>pe+1),ce.source},linkProject:async ce=>{j(null),v(null),L.current=!1,J.current=null,B(await P3n(e,n,{project:ce,sessionId:t})),i==null||i()},unlink:async()=>{B(await F3n(e,n,{sessionId:t})),J.current=null,V.current=!1,j(null),z(null)},sync:ce=>{V.current=!1,Z(ce)&&(J.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}const NM=[{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"]}],LUn=4e6,IUn=200,zM=16e6,$Un=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)}),jM=e=>e.startsWith("//")?`https:${e}`:e;async function BUn(e,n){var s;let t=LUn;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>=IUn)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const h=u.headers.get("content-type")??"",f=Number(u.headers.get("content-length"));if(!c.some(w=>h.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 $Un(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function PUn(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(NM.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:u,typePrefixes:h}of NM){if(!o.matches(c))continue;const f=o.getAttribute(u);if(!f)continue;const p=n(f);p&&(p===f?o.setAttribute(u,jM(f)):s.push({element:o,attribute:u,url:p,typePrefixes:h}))}await BUn(s,t);for(const o of r.querySelectorAll("a[href]")){const c=o.getAttribute("href");!c||!pC(c)||(o.setAttribute("href",jM(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 FUn(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${zM-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>zM}}function HUn({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),FUn(e,n,t,c.signal).then(async({text:u,partial:h})=>({source:await PUn(u,s,c.signal),partial:h})).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(St,{})," ",CL()]}):_.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:Zqe()}),_.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:iUe({name:Ce(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function qUn({overleaf:e}){var f;const n=T.useRef(null),{open:t,setOpen:r,ref:s}=Ki(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,h=u?I3():c?Mvt():!e.hasToken||!e.link?W2t():e.syncing?UL():e.blocked?qL():PL();return T.useEffect(()=>{c&&r(!0)},[c,r]),T.useEffect(()=>{u&&Zt(I3(),"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=b=>{var y;b.target instanceof Node&&!((y=s.current)!=null&&y.contains(b.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(It,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":h,"data-tip-align":"end","aria-label":wJ({status:h}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?_.jsx(St,{}):_.jsx(UCn,{size:13,className:u||c?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&si.createPortal(_.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":lI(),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(It,{size:"small","aria-label":bqe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:_.jsx(xr,{size:13})})}),_.jsx(WUn,{overleaf:e})]}),document.body)]})}const L1=e=>_a(new Intl.ListFormat(E()).format(e.map(Ce)));function UUn(e){if(e.error)return bbt();if(e.syncing)return UL();if(e.blocked)return qL();const n=e.last;return n?n.pulled.length&&n.pushed.length?o2t({pulled:L1(n.pulled),pushed:L1(n.pushed)}):n.pulled.length?e2t({paths:L1(n.pulled)}):n.pushed.length?h2t({paths:L1(n.pushed)}):n.conflicts.length?yyt():PL():Pxt()}function GUn({href:e}){return _.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:HL()})}function KUn(e){return e.state==="live"?Pbt():e.state==="connecting"?Mbt():e.error??eyt()}function AM({overleaf:e,replacing:n}){const[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(!1),[c,u]=T.useState(null),h=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?owt():n?x2t():Jvt();return _.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsx("p",{className:"text-sm text-subtext",children:f}),a&&_.jsx(Br,{className:"basis-full min-w-0","aria-label":L3(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:L3(),autoComplete:"off"}),_.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&_.jsx(St,{}),a?_.jsx(Ie,{type:"button",disabled:s||!t.trim(),onClick:()=>h(()=>e.saveSession(t.trim())),children:s?Sa():Evt()}):_.jsx(Ie,{type:"button",disabled:s,onClick:()=>h(e.importSession),children:abt()}),_.jsx(Ie,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?FL():Vxt()})]}),c&&_.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:c})]})}function VUn({overleaf:e}){if(!e.hasSession)return _.jsx(AM,{overleaf:e});const n=e.live;if(!n)return _.jsx("p",{className:"text-sm text-subtext",children:oyt()});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:KUn(n)})]}),n.note&&_.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&_.jsx("div",{children:_.jsx(Ie,{onClick:e.retryLive,children:Vbt()})}),t&&_.jsx(AM,{overleaf:e,replacing:!0})]})}function WUn({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)},h=!e.hasToken||o;async function f(k){k.preventDefault();const v=n.trim();if(!(r||!v)){s(!0),a(null);try{h?(await e.saveToken(v),c(!1)):await e.linkProject(v),t("")}catch(b){a(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!h){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(St,{}),e.error?I3():UUn(e)]}),e.error&&_.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),_.jsx(VUn,{overleaf:e}),_.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[_.jsx(Ie,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?z2t():((m=e.live)==null?void 0:m.state)==="live"?ywt():void 0,onClick:()=>e.sync(),children:e.error?ni():dxt()}),_.jsxs(jh,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[ext()," ",_.jsx(mf,{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})," ",Pyt()]}),_.jsxs("div",{className:"flex flex-wrap gap-2",children:[_.jsx(Ie,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"keep-local"}),children:Vyt()}),_.jsx(Ie,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"take-overleaf"}),children:Mxt()})]})]},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:RS()})}),_.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[_.jsx(Ie,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:Vz()}),_.jsx(jh,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:HL()}),_.jsx(Ie,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(v=>{a(v instanceof Error?v.message:String(v))}),children:yxt()})]})]})]})}return _.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:f,children:[_.jsx("div",{className:"pe-8 text-sm text-subtext",children:h?Mwt():Pwt()}),_.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[_.jsx(Br,{className:"basis-full min-w-0","aria-label":h?Gz():Kz(),"aria-invalid":!!i,type:h?"password":"text",value:n,onChange:k=>t(k.target.value),placeholder:h?Gz():"https://www.overleaf.com/project/…",autoComplete:"off"}),_.jsx(Ie,{type:"submit",disabled:r||!n.trim(),children:r?h?Sa():ya():h?F2t():Ebt()}),_.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:h?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:h?Pvt():Kz()})]}),(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(GUn,{href:e.uploadUrl}),o?_.jsx(Ie,{variant:"ghost",type:"button",onClick:()=>c(!1),children:FL()}):e.hasToken&&_.jsx(Ie,{variant:"ghost",type:"button",onClick:u,children:Vz()})]})]})}function QUn({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(It,{"data-tip":n==="copied"?uf():n==="select"?IKe():dHe(),"aria-label":MHe(),onClick:()=>void s(),children:n==="copied"?_.jsx(bi,{size:13}):_.jsx(Yu,{size:13})})]})}function XUn(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 YUn({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:c,onScrollPositionChange:u,lineScrollRequest:h,onLineScrollRequestHandled:f,onEdit:p,artifactVersion:m,artifactEntries:w=[],bufferSession:k,remote:v=!1,restored:b=!1,onRestoreActivated:y,showSource:x=!1,onShowSourceChange:C}){var As,Fr;const N=H6(e,n,t??"repo",r,s),j=ut({...N,enabled:!k.saving}),A=j.data??null,z=((As=j.error)==null?void 0:As.message)??null,M=We=>{Vr(N.queryKey,vt=>(typeof We=="function"?We(vt??null):We)??void 0)},[D,I]=T.useState(0),B=t==="artifacts",G=t==="abs",U=VC(n),Q=qq(n),V=Gqn(n),Z=U||V,[J,$]=T.useState(!1),L=!b||J,q=()=>{$(!0),y==null||y()};T.useSyncExternalStore(k.subscribe,k.getRevision);const P=k.getSnapshot(),F=k.set,re=k.saving,ie=k.setSaving,ue=k.saveRevision,se=k.saveError,K=k.setSaveError,oe=T.useRef(null),ce=T.useRef(null),[pe,ve]=T.useState(!1),[Me,Fe]=T.useState(null),Ye=T.useRef(c),Te=(A==null?void 0:A.file)??null,$e=P&&nl(P)?P.path:(A==null?void 0:A.source)==="checkout"?A.file.path:n,yt=$e.split("/").slice(0,-1).join("/"),ot=(A==null?void 0:A.source)==="artifact",Mt=T.useCallback(We=>{var vt;return((vt=q5(yt,We,G))==null?void 0:vt.path)??null},[G,yt]),jt=T.useCallback(We=>G?DI(We):ot?df(e,We):K3(e,We,{sessionId:r,ref:s}),[ot,s,G,e,r]),Pt=T.useCallback(We=>{if(pC(We))return We;const vt=q5(yt,We,G);return vt?mOn(jt(vt.path),vt):null},[G,yt,jt]),Le=Kq(Te==null?void 0:Te.presentation),nt=(A==null?void 0:A.source)==="artifact"&&!B,ke=B&&(A==null?void 0:A.source)==="checkout",me=!s&&(A==null?void 0:A.source)==="checkout"&&Te!=null&&!Te.notFound,je=r!=null&&(A==null?void 0:A.source)==="checkout"&&A.file.root==="clone",qe=me&&Te!=null&&!Te.binary&&!Te.truncated&&!Le&&!je,rt=qe&&Te.version===void 0,dt=P!==null&&nl(P),st=!rt&&(qe&&typeof Te.version=="string"||dt),Ut=(P==null?void 0:P.draft)??Ak((Te==null?void 0:Te.content)??""),Xt=(P==null?void 0:P.baseline)??Ak((Te==null?void 0:Te.content)??""),en=st&&P!==null&&nl(P),an=P!==null&&!dt&&typeof(Te==null?void 0:Te.version)=="string"&&P.version!==Te.version,At=j.isFetching||an?void 0:h,gn=async We=>{const vt=k.getSnapshot();if(!st||!vt||!nl(vt))return!0;if(k.saving)return!1;if(vt.conflict&&We===void 0)return K(vt.conflict.exists?fz():pz()),!1;const fr=vt.draft,yn=zUn(vt);ie(!0),K(null);try{await tt.cancelQueries(N);const Hn=await E3n(e,$e,yn,{sessionId:r,expectedVersion:We??vt.version});return k.getSnapshot()?(k.saved(fr,Hn.version),M(Fn=>Fn&&Fn.source==="checkout"?{source:"checkout",file:{...Fn.file,content:yn,version:Hn.version}}:Fn),!0):!1}catch(Hn){if(Hn instanceof U3){const Zn=k.getSnapshot();return!Zn||!nl(Zn)||F({...Zn,conflict:{currentVersion:Hn.currentVersion,exists:Hn.exists}}),!1}return K(Hn instanceof Error?Hn.message:String(Hn)),!1}finally{ie(!1)}},on=Q&&me&&!je,Ot=TUn({projectId:e,filePath:$e,sessionId:r,enabled:on,autoRun:L,onManualAction:q,ready:Te!=null&&!Te.notFound,source:st?Ut:(Te==null?void 0:Te.content)??""}),dn=DUn({projectId:e,filePath:$e,sessionId:r,enabled:on,autoRun:L,onManualAction:q,savedSource:Xt,dirty:en,onPulled:T.useCallback(We=>{We.includes($e)&&I(vt=>vt+1)},[$e])}),cn=Q&&Ot.showPdf&&Ot.compiled!=null,kn=rt&&dt,Wn=(st||kn)&&!(Z&&!x)&&!cn,gs=Te!==null&&!Te.notFound&&!Te.binary&&!Le&&!cn,ns=gs&&!Wn&&(!V||x),gt=async()=>{if(Te)try{if(Te.truncated&&!Wn){const We=fetch(jt($e)).then(async vt=>{if(!vt.ok)throw new Error;return new Blob([await vt.text()],{type:"text/plain"})});await navigator.clipboard.write([new ClipboardItem({"text/plain":We})])}else await navigator.clipboard.writeText(Wn?Ut:Te.content);ve(!0),window.setTimeout(()=>ve(!1),1500)}catch{Zt(EHe(),"error")}},ln=We=>{if(!We.metaKey&&!We.ctrlKey||We.altKey||We.shiftKey||We.key.toLowerCase()!=="a"||!(We.target instanceof Node)||!We.currentTarget.contains(We.target))return;const vt=ce.current;if(!vt)return;We.preventDefault();const fr=document.createRange();fr.selectNodeContents(vt);const yn=window.getSelection();yn==null||yn.removeAllRanges(),yn==null||yn.addRange(fr)},bn=Ot.compiled?`${K3(e,Ot.compiled.path,{sessionId:r})}&v=${Ot.compiled.version}`:null,un=bn?`${bn}&view=${Ot.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,_r=Ot.compiled?Ot.compiled.path.split("/").pop()??Ot.compiled.path:null,Mn=async()=>{en&&!await gn()||Q&&Ot.engine&&Ot.compile()},Qn=async()=>{en&&(L?await Mn():await gn())},ar=XUn(()=>z3n(e,$e,{sessionId:r})),wt=v?gGe():Te!=null&&Te.notFound?Lv():s?wS({branch:Ce(s)}):me?null:SGe(),Ht=T.useCallback(()=>{k.saving||I(We=>We+1)},[k]),vr=()=>{F(null),K(null),Ht()},Pn=Wq(jt($e),!s&&!re);T.useEffect(()=>{if(!z||s)return;const We=window.setInterval(()=>{document.visibilityState!=="hidden"&&Ht()},2e3);return()=>window.clearInterval(We)},[z,s,Ht]);const Qr=`${jt($e)}&v=${encodeURIComponent(Pn??m??"")}&reload=${D}`;T.useEffect(()=>{var yn,Hn;if(!A||k.saving)return;const We=A,vt=k.getSnapshot();if(vt&&nl(vt)){const Zn=We.source==="checkout"?We.file:null,Fn=Zn!==null&&Zn.path===vt.path&&(!r||Zn.root==="worktree"),Yr=jUn(vt,Fn&&typeof Zn.version=="string"?Zn.version:null,Fn&&!Zn.notFound);Yr&&(Yr.currentVersion!==((yn=vt.conflict)==null?void 0:yn.currentVersion)||Yr.exists!==((Hn=vt.conflict)==null?void 0:Hn.exists))?F({...vt,conflict:Yr}):!Yr&&vt.conflict&&F({...vt,conflict:null})}(!vt||!nl(vt)&&(vt.version!==We.file.version||vt.path!==We.file.path))&&We.source==="checkout"&&!We.file.notFound&&!We.file.binary&&!We.file.truncated&&typeof We.file.version=="string"&&(F(EM(We.file.path,We.file.content,We.file.version)),K(null))},[A,k,r,re,ue,P]);const Xn=JSON.stringify(N.queryKey),Yn=T.useRef({sourceKey:Xn,nonce:D,artifactVersion:m,diskVersion:Pn});T.useEffect(()=>{const We=Yn.current;Yn.current={sourceKey:Xn,nonce:D,artifactVersion:m,diskVersion:Pn},We.sourceKey===Xn&&(We.nonce!==D||We.diskVersion!==null&&We.diskVersion!==Pn||We.artifactVersion!=null&&We.artifactVersion!==m)&&WEn(e,n,t??"repo",r,s)},[Xn,D,m,Pn,e,n,t,r,s]),T.useLayoutEffect(()=>{const We=oe.current,vt=Ye.current;!We||!Te||!vt||(We.scrollTop=vt.top,We.scrollLeft=vt.left)},[Te]);const Xr=We=>{if(We.source==="absolute")return $Ue();if(B)return SUe({root:r?o1():a1()});if(s)return TUe({branch:Ce(s)});if(r&&We.source==="checkout"&&We.file.root==="clone")return LVe();const vt=We.source==="checkout"?We.file.root:We.checkoutRoot;return GUe({root:vt==="worktree"?o1():a1()})};return _.jsx(uy,{value:A?k5(A,r,s):{sessionId:r,ref:s},children:_.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",onKeyDown:ln,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(wf,{name:$e}),_.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ce($e),children:$e.split("/").pop()||$e}),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:HX({branch:Ce(a)}),children:[_.jsx(Im,{size:11}),a]}),Wn&&(re||en||se)&&_.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${se?"text-accent-red":"text-muted"}`,title:se??(re?Sa():wVe()),children:re?_.jsxs(_.Fragment,{children:[_.jsx(St,{})," ",AKe()]}):se?kKe():EL()}),_.jsx("div",{ref:Fe,className:"contents"}),Q&&Ot.compiled&&_.jsx(It,{size:"small",active:!Ot.showPdf,"data-tip":Ot.stale&&Ot.showPdf?GGe():Ot.showPdf?Pd():yz(),"data-tip-align":"end","aria-label":Ot.showPdf?Pd():yz(),onClick:()=>Ot.setShowPdf(!Ot.showPdf),children:Ot.showPdf?_.jsx(f5,{size:13}):_.jsx(Qb,{size:13,className:Ot.stale?"text-accent-amber":void 0})}),Q&&bn&&_r&&_.jsx(Wh,{size:"small","data-tip":Ot.stale?Rqe({name:Ce(_r)}):Mv({name:Ce(_r)}),"data-tip-align":"end","aria-label":Mv({name:Ce(_r)}),href:bn,download:_r,children:_.jsx(Wb,{size:13,className:Ot.stale?"text-accent-amber":void 0})}),on&&_.jsx(qUn,{overleaf:dn}),Q&&me&&_.jsx(It,{size:"small","data-tip":Ot.compiled?bz():dz(),"data-tip-align":"end","aria-label":Ot.compiled?bz():dz(),disabled:Ot.compiling||!Ot.engine,onClick:()=>void Mn(),children:Ot.compiling?_.jsx(St,{}):_.jsx(e7n,{size:13})}),Z&&_.jsx(It,{size:"small",active:x,"data-tip":x?Dv():Pd(),"data-tip-align":"end","aria-label":x?Dv():Pd(),onClick:()=>C==null?void 0:C(!x),children:_.jsx(f5,{size:13})}),gs&&_.jsx(It,{size:"small","data-tip":pe?uf():hz(),"data-tip-align":"end","aria-label":pe?uf():hz(),onClick:()=>void gt(),children:pe?_.jsx(bi,{size:13}):_.jsx(Yu,{size:13})}),Te!=null&&_.jsx(_.Fragment,{children:_.jsx(It,{size:"small","data-tip":wt??ar.error??vz(),"data-tip-align":"end","aria-label":vz(),"aria-description":wt??void 0,disabled:ar.busy||wt!=null,onClick:()=>void ar.trigger(),children:ar.busy?_.jsx(St,{}):_.jsx(mf,{size:13})})})]}),A&&!A.file.notFound&&_.jsx(XC,{projectId:e,request:k5(A,r,s),remote:v}),!z&&ke&&(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:ZUe({root:A.file.root==="worktree"?o1():a1()})}),rt&&_.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:jVe()}),z&&Te!==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:[gz()," ",Ce(z)]}),(P==null?void 0:P.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:P.conflict.exists?fz():pz()}),((Fr=P==null?void 0:P.conflict)==null?void 0:Fr.exists)&&P.conflict.currentVersion&&_.jsx(Ie,{disabled:re,onPointerDown:We=>We.preventDefault(),onClick:()=>{var We;return void gn(((We=P.conflict)==null?void 0:We.currentVersion)??void 0)},children:$Ge()}),_.jsx(Ie,{disabled:re,onPointerDown:We=>We.preventDefault(),onClick:vr,children:uKe()})]}),(Ot.error||Ot.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 ${Ot.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Ot.error??(Ot.builtWithErrors?aHe():VFe())}),_.jsx(It,{"data-tip":iqe(),"data-tip-align":"end","aria-label":fqe(),onClick:Ot.dismiss,children:_.jsx(xr,{size:13})})]}),Ot.log&&_.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Ot.log})]}),on&&dn.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:TGe()}),_.jsx(Ie,{onClick:()=>{dn.reloaded(),I(We=>We+1)},children:KHe()})]}),Q&&me&&Ot.engine===null&&Ot.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:[Ot.installHint,Ot.installCommand&&_.jsx(QUn,{command:Ot.installCommand})]}),Ot.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:Ot.note}),cn&&Ot.stale&&_.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:nVe()}),_.jsxs("div",{ref:oe,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",tabIndex:ns?0:void 0,onScroll:We=>{const vt={top:Math.max(0,We.currentTarget.scrollTop),left:Math.max(0,We.currentTarget.scrollLeft)};Ye.current=vt,u==null||u(vt)},children:[!Wn&&!z&&!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:lVe()}),!Wn&&!z&&(A==null?void 0:A.source)==="artifact"&&!A.file.notFound&&nt&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:NFe({root:A.checkoutRoot==="worktree"?o1():a1()})}),z&&Te===null?_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[gz()," ",Ce(z)]}):Te===null?_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:CL()}):Wn?_.jsx(OB,{value:Ut,onChange:We=>{const vt=k.getSnapshot()??(Te&&typeof Te.version=="string"?EM(Te.path,Te.content,Te.version):null);vt&&F(NUn(vt,We)),p==null||p(),se&&K(null)},onSave:()=>void Qn(),onBlur:()=>{jk||Qn()},readOnly:kn,path:n,highlightLine:i,scrollRequest:At,onScrollRequestHandled:f,scrollPosition:Ye.current,onScrollPositionChange:We=>{Ye.current=We,u==null||u(We)}}):Te.notFound?_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:A?Xr(A):Lv()}):Le?_.jsx(yb.Provider,{value:Me,children:_.jsx(zk,{kind:Le,url:Qr,name:n.split("/").pop()??n})}):Te.binary?_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[OFe()," ",_.jsx("a",{href:Qr,download:n.split("/").pop()??n,children:SL()})]}):cn&&un&&_r?_.jsx(yb.Provider,{value:Me,children:_.jsx(zk,{kind:"pdf",url:un,name:_r,download:!1},un)}):U&&!x?_.jsx("div",{ref:ce,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:ot?_.jsx(Jq,{projectId:e,folder:yt,markdown:Te.content,entries:w}):_.jsx(_c,{text:Te.content,resolveFilePath:Mt,resolveImageSrc:Pt,onOpenFile:o&&((We,vt,fr,yn,Hn)=>o(We,r,s,Hn))})}):V&&!x?_.jsx(HUn,{html:Te.content,truncated:Te.truncated,url:Qr,name:$e,resolveSrc:Pt}):_.jsxs(_.Fragment,{children:[_.jsx("div",{ref:ce,children:_.jsx(Gq,{text:Te.content,path:n,highlightLine:i,scrollRequest:At,onScrollRequestHandled:f})}),Te.truncated&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Gqe()})]})]})]})})}const B4=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function ZUn({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:i,setOpen:a,ref:o}=Ki(),c=T.useRef(null);return T.useEffect(()=>{if(!i)return;const u=h=>{var f;h.key==="Escape"&&((f=c.current)==null||f.focus())};return document.addEventListener("keydown",u,!0),()=>document.removeEventListener("keydown",u,!0)},[i]),_.jsx("div",{className:"rail-brand px-3 py-1.5 border-b border-border shrink-0",children:_.jsxs("div",{className:"project-switcher relative min-w-0",ref:o,children:[_.jsxs("div",{className:"flex h-7 items-center justify-between gap-1 px-0.5",children:[_.jsx(It,{size:"small",className:"project-back text-text","aria-label":wz(),onClick:n,children:_.jsx(B0,{size:18})}),_.jsx("span",{className:"brand-project-label flex-1 text-xs font-medium tracking-wide uppercase text-subtext",children:RL()}),s&&_.jsx(It,{size:"small","data-tip":kz(),"data-tip-align":"end","aria-label":kz(),onClick:s,children:_.jsx(P$,{size:18})})]}),_.jsxs("button",{ref:c,className:`brand group flex h-8 w-full min-w-0 items-center gap-2 rounded-md px-2 text-start text-text hover:bg-surface focus-visible:outline-2 focus-visible:outline-text ${i?"open bg-surface":""}`,onClick:()=>a(u=>!u),"aria-expanded":i,children:[_.jsx("span",{className:"brand-project min-w-0 flex-1 truncate text-xl font-semibold",children:e}),_.jsx(mc,{className:`project-chevron shrink-0 text-muted transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100 ${i?"rotate-180 opacity-100":"opacity-0"}`,size:14})]}),i&&_.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 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 project-menu w-52.5 z-70",children:[_.jsx(vn,{onClick:()=>{a(!1),r()},children:_.jsxs("span",{className:B4,children:[_.jsx(D$,{size:14}),YYe()]})}),_.jsx(vn,{onClick:()=>{a(!1),n()},children:_.jsxs("span",{className:B4,children:[_.jsx(I$,{size:14}),wz()]})}),_.jsx(vn,{onClick:()=>{var u;(u=c.current)==null||u.focus(),a(!1),t()},children:_.jsxs("span",{className:B4,children:[_.jsx(c7n,{size:14}),sZe()]})})]})]})})}function JUn(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 h=(n.get(c)??[]).some(f=>f.archived||i(f.id));return r.set(c,h),h}function a(c){const u=s.get(c);if(u!==void 0)return u;const h=(n.get(c)??[]).some(f=>!f.archived||a(f.id));return s.set(c,h),h}const o=new Map;for(const c of e){let u=!1,h=!1,f=c.parentExperimentId?t.get(c.parentExperimentId):void 0;for(;f;)f.archived?h=!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&&h,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=Ki(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)},h=(f,p)=>{a.setOpen(!1),r(e,f,p)};return _.jsxs("div",{className:"nodrag ms-auto shrink-0",children:[s?_.jsx(It,{type:"button",ref:i,size:"small",className:"node-action","aria-label":vj({name:n}),"aria-expanded":a.open,onClick:u,children:_.jsx(Lm,{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":vj({name:n}),"aria-expanded":a.open,onClick:u,children:s1n()}),a.open&&si.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(vn,{onClick:()=>h("ancestors",!0),children:Ugn()}),t.archiveOnly&&_.jsx(vn,{onClick:()=>h("only",!0),children:g1n()}),t.archiveDown&&_.jsx(vn,{onClick:()=>h("descendants",!0),children:Ygn()}),t.restoreOnly&&_.jsx(vn,{onClick:()=>h("only",!1),children:EI()}),t.restoreAbove&&_.jsx(vn,{onClick:()=>h("ancestors",!1),children:gvn()}),t.restoreDown&&_.jsx(vn,{onClick:()=>h("descendants",!1),children:Tvn()})]}),document.body)]})}function eGn({runs:e,experiments:n,archiveActions:t,emptyHint:r,onOpen:s,onOpenLogs:i,onOpenCode:a,onArchive:o,onCancel:c}){const[u,h]=T.useState(new Set),[f,p]=T.useState(null),m=new Map;for(const v of e){const b=m.get(v.experimentId);b?b.push(v):m.set(v.experimentId,[v])}for(const v of m.values())v.sort((b,y)=>y.createdAt-b.createdAt);const w=[...n].sort((v,b)=>{var C,N,j,A;const y=((N=(C=m.get(v.id))==null?void 0:C[0])==null?void 0:N.createdAt)??v.createdAt;return(((A=(j=m.get(b.id))==null?void 0:j[0])==null?void 0:A.createdAt)??b.createdAt)-y});if(w.length===0)return _.jsx(QC,{icon:Ah,title:r??P$e(),description:r?void 0:E$e()});async function k(v){p(null),h(b=>new Set(b).add(v));try{await c(v)}catch(b){h(y=>{const x=new Set(y);return x.delete(v),x}),p(b instanceof Error?b.message:String(b))}}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:[tPe()," ",f]}),_.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":HBe(),children:w.map(v=>{const b=m.get(v.id)??[],y=b[0]??null,x=b.find(A=>A.status==="running"||A.status==="starting"),C=x??y,N=!!(x&&(x.cancelRequested||u.has(x.id))),j=x?N?"cancelling":pa(x):y?pa(y):"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",...Wr(A=>s(v,A),{stopPropagation:!0}),children:v.title||v.slug}),v.archived&&_.jsx("span",{className:"text-muted text-xs",children:CI()}),_.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(Im,{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(ml,{status:j})}),_.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:_.jsx("span",{children:b.length===1?eBe():hBe({count:Jt(b.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:y?vo(y.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":zX({name:v.title||v.slug}),onClick:A=>A.stopPropagation(),onDoubleClick:A=>A.stopPropagation(),onAuxClick:A=>A.stopPropagation(),children:[_.jsxs(Ie,{size:"small",disabled:!C,title:C?oBe():M$e(),...Wr(A=>{C&&i(v.id,C.id,A)},{stopPropagation:!0}),children:[_.jsx(bo,{size:15}),A3()]}),_.jsxs(Ie,{size:"small",title:rL({branch:Ce(v.branchName)}),...Wr(A=>a(v.id,A),{stopPropagation:!0}),children:[_.jsx(Xb,{size:15}),DBe()]}),x&&_.jsxs(Ie,{size:"small",variant:"danger",disabled:N,title:N?xBe():zBe(),onClick:()=>void k(x.id),children:[_.jsx(T$,{size:15}),N?jTe():bL()]}),_.jsx(oU,{id:v.id,name:v.title||v.slug,actions:t.get(v.id),onArchive:o})]})]},v.id)})})]})}function tGn({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(mgn())).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,h=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(h()[0]??c).focus();const f=p=>{if(p.key!=="Tab")return;const m=h();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()}},[]),si.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(It,{className:"absolute end-3.5 top-3.5","aria-label":q3(),onClick:()=>o(()=>e("dismiss")),disabled:t,children:_.jsx(xr,{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(s6,{})}),_.jsxs("div",{children:[_.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:Hmn()}),_.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:Agn()})]})]}),_.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[_.jsxs("p",{dir:"auto",children:[kgn()," ",_.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:ngn()}),wmn()]}),_.jsx("p",{dir:"auto",children:Qmn()})]}),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(Ie,{onClick:()=>o(n),disabled:t,children:Dmn()}),_.jsx(Ie,{variant:"primary",onClick:()=>o(()=>e("explore_demo")),disabled:t,children:t?Sa():lgn()})]})]})}),document.body)}function ms(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Zy(){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}})}pv.prototype=Zy.prototype={constructor:pv,on:function(e,n){var t=this._,r=rGn(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)),RM.hasOwnProperty(n)?{space:RM[n],local:e}:e}function iGn(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===Tk&&n.documentElement.namespaceURI===Tk?n.createElement(e):n.createElementNS(t,e)}}function aGn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function cU(e){var n=Jy(e);return(n.local?aGn:iGn)(n)}function oGn(){}function YC(e){return e==null?oGn:function(){return this.querySelector(e)}}function cGn(e){typeof e!="function"&&(e=YC(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=x&&(x=y+1);!(N=v[x])&&++x=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function MGn(e){e||(e=OGn);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 DGn(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function LGn(){return Array.from(this)}function IGn(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?WGn:typeof n=="function"?XGn:QGn)(e,n,t??"")):Ph(this.node(),e)}function Ph(e,n){return e.style.getPropertyValue(n)||dU(e).getComputedStyle(e,null).getPropertyValue(n)}function ZGn(e){return function(){delete this[e]}}function JGn(e,n){return function(){this[e]=n}}function eKn(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function tKn(e,n){return arguments.length>1?this.each((n==null?ZGn:typeof n=="function"?eKn:JGn)(e,n)):this.node()[e]}function hU(e){return e.trim().split(/^|\s+/)}function ZC(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=ZC(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function jKn(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function Rk(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:c,dy:u,dispatch:h}){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:h}})}Rk.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function BKn(e){return!e.ctrlKey&&!e.button}function PKn(){return this.parentNode}function FKn(e,n){return n??{x:e.x,y:e.y}}function HKn(){return navigator.maxTouchPoints||"ontouchstart"in this}function wU(){var e=BKn,n=PKn,t=FKn,r=HKn,s={},i=Zy("start","drag","end"),a=0,o,c,u,h,f=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",v).on("touchmove.drag",b,$Kn).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(h||!e.call(this,C,N))){var j=x(this,n.call(this,C,N),C,N,"mouse");j&&(fa(C.view).on("mousemove.drag",w,rm).on("mouseup.drag",k,rm),yU(C.view),P4(C),u=!1,o=C.clientX,c=C.clientY,j("start",C))}}function w(C){if(sh(C),!u){var N=C.clientX-o,j=C.clientY-c;u=N*N+j*j>f}s.mouse("drag",C)}function k(C){fa(C.view).on("mousemove.drag mouseup.drag",null),xU(C.view,u),sh(C),s.mouse("end",C)}function v(C,N){if(e.call(this,C,N)){var j=C.changedTouches,A=n.call(this,C,N),z=j.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?$1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?$1(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=UKn.exec(e))?new Ui(n[1],n[2],n[3],1):(n=GKn.exec(e))?new Ui(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=KKn.exec(e))?$1(n[1],n[2],n[3],n[4]):(n=VKn.exec(e))?$1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=WKn.exec(e))?BM(n[1],n[2]/100,n[3]/100,1):(n=QKn.exec(e))?BM(n[1],n[2]/100,n[3]/100,n[4]):MM.hasOwnProperty(e)?LM(MM[e]):e==="transparent"?new Ui(NaN,NaN,NaN,0):null}function LM(e){return new Ui(e>>16&255,e>>8&255,e&255,1)}function $1(e,n,t,r){return r<=0&&(e=n=t=NaN),new Ui(e,n,t,r)}function ZKn(e){return e instanceof Qm||(e=kf(e)),e?(e=e.rgb(),new Ui(e.r,e.g,e.b,e.opacity)):new Ui}function Mk(e,n,t,r){return arguments.length===1?ZKn(e):new Ui(e,n,t,r??1)}function Ui(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}JC(Ui,Mk,kU(Qm,{brighter(e){return e=e==null?wb:Math.pow(wb,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sm:Math.pow(sm,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ui(of(this.r),of(this.g),of(this.b),kb(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:IM,formatHex:IM,formatHex8:JKn,formatRgb:$M,toString:$M}));function IM(){return`#${F_(this.r)}${F_(this.g)}${F_(this.b)}`}function JKn(){return`#${F_(this.r)}${F_(this.g)}${F_(this.b)}${F_((isNaN(this.opacity)?1:this.opacity)*255)}`}function $M(){const e=kb(this.opacity);return`${e===1?"rgb(":"rgba("}${of(this.r)}, ${of(this.g)}, ${of(this.b)}${e===1?")":`, ${e})`}`}function kb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function of(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function F_(e){return e=of(e),(e<16?"0":"")+e.toString(16)}function BM(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new _o(e,n,t,r)}function SU(e){if(e instanceof _o)return new _o(e.h,e.s,e.l,e.opacity);if(e instanceof Qm||(e=kf(e)),!e)return new _o;if(e instanceof _o)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 _o(a,o,c,e.opacity)}function eVn(e,n,t,r){return arguments.length===1?SU(e):new _o(e,n,t,r??1)}function _o(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}JC(_o,eVn,kU(Qm,{brighter(e){return e=e==null?wb:Math.pow(wb,e),new _o(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sm:Math.pow(sm,e),new _o(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 Ui(F4(e>=240?e-240:e+120,s,r),F4(e,s,r),F4(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new _o(PM(this.h),B1(this.s),B1(this.l),kb(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=kb(this.opacity);return`${e===1?"hsl(":"hsla("}${PM(this.h)}, ${B1(this.s)*100}%, ${B1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function PM(e){return e=(e||0)%360,e<0?e+360:e}function B1(e){return Math.max(0,Math.min(1,e||0))}function F4(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 e7=e=>()=>e;function tVn(e,n){return function(t){return e+t*n}}function nVn(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 rVn(e){return(e=+e)==1?CU:function(n,t){return t-n?nVn(n,t,e):e7(isNaN(n)?t:n)}}function CU(e,n){var t=n-e;return t?tVn(e,t):e7(isNaN(e)?n:e)}const Sb=(function e(n){var t=rVn(n);function r(s,i){var a=t((s=Mk(s)).r,(i=Mk(i)).r),o=t(s.g,i.g),c=t(s.b,i.b),u=CU(s.opacity,i.opacity);return function(h){return s.r=a(h),s.g=o(h),s.b=c(h),s.opacity=u(h),s+""}}return r.gamma=e,r})(1);function sVn(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:tc(r,s)})),t=H4.lastIndex;return t180?h+=360:h-u>180&&(u+=360),p.push({i:f.push(s(f)+"rotate(",null,r)-2,x:tc(u,h)})):h&&f.push(s(f)+"rotate("+h+r)}function o(u,h,f,p){u!==h?p.push({i:f.push(s(f)+"skewX(",null,r)-2,x:tc(u,h)}):h&&f.push(s(f)+"skewX("+h+r)}function c(u,h,f,p,m,w){if(u!==f||h!==p){var k=m.push(s(m)+"scale(",null,",",null,")");w.push({i:k-4,x:tc(u,f)},{i:k-2,x:tc(h,p)})}else(f!==1||p!==1)&&m.push(s(m)+"scale("+f+","+p+")")}return function(u,h){var f=[],p=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,f,p),a(u.rotate,h.rotate,f,p),o(u.skewX,h.skewX,f,p),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,p),u=h=null,function(m){for(var w=-1,k=p.length,v;++w=0&&e._call.call(void 0,n),e=e._next;--Fh}function qM(){Sf=(Eb=am.now())+ex,Fh=d0=0;try{bVn()}finally{Fh=0,xVn(),Sf=0}}function yVn(){var e=am.now(),n=e-Eb;n>jU&&(ex-=n,Eb=e)}function xVn(){for(var e,n=Cb,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:Cb=t);h0=e,Lk(r)}function Lk(e){if(!Fh){d0&&(d0=clearTimeout(d0));var n=e-Sf;n>24?(e<1/0&&(d0=setTimeout(qM,e-am.now()-ex)),a0&&(a0=clearInterval(a0))):(a0||(Eb=am.now(),a0=setInterval(yVn,jU)),Fh=1,AU(qM))}}function UM(e,n,t){var r=new Nb;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var wVn=Zy("start","end","cancel","interrupt"),kVn=[],RU=0,GM=1,Ik=2,gv=3,KM=4,$k=5,vv=6;function tx(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;SVn(e,t,{name:n,index:r,group:s,on:wVn,tween:kVn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:RU})}function n7(e,n){var t=xo(e,n);if(t.state>RU)throw new Error("too late; already scheduled");return t}function wc(e,n){var t=xo(e,n);if(t.state>gv)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 SVn(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=TU(i,0,t.time);function i(u){t.state=GM,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var h,f,p,m;if(t.state!==GM)return c();for(h in r)if(m=r[h],m.name===t.name){if(m.state===gv)return UM(a);m.state===KM?(m.state=vv,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[h]):+hIk&&r.state<$k,r.state=vv,r.timer.stop(),r.on.call(s?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete t[a]}i&&delete e.__transition}}function CVn(e){return this.each(function(){bv(this,e)})}function EVn(e,n){var t,r;return function(){var s=wc(this,e),i=s.tween;if(i!==t){r=t=i;for(var a=0,o=r.length;a=0&&(n=n.slice(0,t)),!n||n==="start"})}function eWn(e,n,t){var r,s,i=JVn(n)?n7:wc;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function tWn(e,n){var t=this._id;return arguments.length<2?xo(this.node(),t).on.on(e):this.each(eWn(t,e,n))}function nWn(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function rWn(){return this.on("end.remove",nWn(this._id))}function sWn(e){var n=this._name,t=this._id;typeof e!="function"&&(e=YC(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function jWn(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 hl(e,n,t){this.k=e,this.x=n,this.y=t}hl.prototype={constructor:hl,scale:function(e){return e===1?this:new hl(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new hl(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 nx=new hl(1,0,0);LU.prototype=hl.prototype;function LU(e){for(;!e.__zoom;)if(!(e=e.parentNode))return nx;return e.__zoom}function q4(e){e.stopImmediatePropagation()}function o0(e){e.preventDefault(),e.stopImmediatePropagation()}function AWn(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function TWn(){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 VM(){return this.__zoom||nx}function RWn(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function MWn(){return navigator.maxTouchPoints||"ontouchstart"in this}function OWn(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=AWn,n=TWn,t=OWn,r=RWn,s=MWn,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,c=mv,u=Zy("start","zoom","end"),h,f,p,m=500,w=150,k=0,v=10;function b(U){U.property("__zoom",VM).on("wheel.zoom",z,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",I).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(U,Q,V,Z){var J=U.selection?U.selection():U;J.property("__zoom",VM),U!==J?N(U,Q,V,Z):J.interrupt().each(function(){j(this,arguments).event(Z).start().zoom(null,typeof Q=="function"?Q.apply(this,arguments):Q).end()})},b.scaleBy=function(U,Q,V,Z){b.scaleTo(U,function(){var J=this.__zoom.k,$=typeof Q=="function"?Q.apply(this,arguments):Q;return J*$},V,Z)},b.scaleTo=function(U,Q,V,Z){b.transform(U,function(){var J=n.apply(this,arguments),$=this.__zoom,L=V==null?C(J):typeof V=="function"?V.apply(this,arguments):V,q=$.invert(L),P=typeof Q=="function"?Q.apply(this,arguments):Q;return t(x(y($,P),L,q),J,a)},V,Z)},b.translateBy=function(U,Q,V,Z){b.transform(U,function(){return t(this.__zoom.translate(typeof Q=="function"?Q.apply(this,arguments):Q,typeof V=="function"?V.apply(this,arguments):V),n.apply(this,arguments),a)},null,Z)},b.translateTo=function(U,Q,V,Z,J){b.transform(U,function(){var $=n.apply(this,arguments),L=this.__zoom,q=Z==null?C($):typeof Z=="function"?Z.apply(this,arguments):Z;return t(nx.translate(q[0],q[1]).scale(L.k).translate(typeof Q=="function"?-Q.apply(this,arguments):-Q,typeof V=="function"?-V.apply(this,arguments):-V),$,a)},Z,J)};function y(U,Q){return Q=Math.max(i[0],Math.min(i[1],Q)),Q===U.k?U:new hl(Q,U.x,U.y)}function x(U,Q,V){var Z=Q[0]-V[0]*U.k,J=Q[1]-V[1]*U.k;return Z===U.x&&J===U.y?U:new hl(U.k,Z,J)}function C(U){return[(+U[0][0]+ +U[1][0])/2,(+U[0][1]+ +U[1][1])/2]}function N(U,Q,V,Z){U.on("start.zoom",function(){j(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){j(this,arguments).event(Z).end()}).tween("zoom",function(){var J=this,$=arguments,L=j(J,$).event(Z),q=n.apply(J,$),P=V==null?C(q):typeof V=="function"?V.apply(J,$):V,F=Math.max(q[1][0]-q[0][0],q[1][1]-q[0][1]),re=J.__zoom,ie=typeof Q=="function"?Q.apply(J,$):Q,ue=c(re.invert(P).concat(F/re.k),ie.invert(P).concat(F/ie.k));return function(se){if(se===1)se=ie;else{var K=ue(se),oe=F/K[2];se=new hl(oe,P[0]-K[0]*oe,P[1]-K[1]*oe)}L.zoom(null,se)}})}function j(U,Q,V){return!V&&U.__zooming||new A(U,Q)}function A(U,Q){this.that=U,this.args=Q,this.active=0,this.sourceEvent=null,this.extent=n.apply(U,Q),this.taps=0}A.prototype={event:function(U){return U&&(this.sourceEvent=U),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(U,Q){return this.mouse&&U!=="mouse"&&(this.mouse[1]=Q.invert(this.mouse[0])),this.touch0&&U!=="touch"&&(this.touch0[1]=Q.invert(this.touch0[0])),this.touch1&&U!=="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(U){var Q=fa(this.that).datum();u.call(U,this.that,new jWn(U,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),Q)}};function z(U,...Q){if(!e.apply(this,arguments))return;var V=j(this,Q).event(U),Z=this.__zoom,J=Math.max(i[0],Math.min(i[1],Z.k*Math.pow(2,r.apply(this,arguments)))),$=ao(U);if(V.wheel)(V.mouse[0][0]!==$[0]||V.mouse[0][1]!==$[1])&&(V.mouse[1]=Z.invert(V.mouse[0]=$)),clearTimeout(V.wheel);else{if(Z.k===J)return;V.mouse=[$,Z.invert($)],bv(this),V.start()}o0(U),V.wheel=setTimeout(L,w),V.zoom("mouse",t(x(y(Z,J),V.mouse[0],V.mouse[1]),V.extent,a));function L(){V.wheel=null,V.end()}}function M(U,...Q){if(p||!e.apply(this,arguments))return;var V=U.currentTarget,Z=j(this,Q,!0).event(U),J=fa(U.view).on("mousemove.zoom",P,!0).on("mouseup.zoom",F,!0),$=ao(U,V),L=U.clientX,q=U.clientY;yU(U.view),q4(U),Z.mouse=[$,this.__zoom.invert($)],bv(this),Z.start();function P(re){if(o0(re),!Z.moved){var ie=re.clientX-L,ue=re.clientY-q;Z.moved=ie*ie+ue*ue>k}Z.event(re).zoom("mouse",t(x(Z.that.__zoom,Z.mouse[0]=ao(re,V),Z.mouse[1]),Z.extent,a))}function F(re){J.on("mousemove.zoom mouseup.zoom",null),xU(re.view,Z.moved),o0(re),Z.event(re).end()}}function D(U,...Q){if(e.apply(this,arguments)){var V=this.__zoom,Z=ao(U.changedTouches?U.changedTouches[0]:U,this),J=V.invert(Z),$=V.k*(U.shiftKey?.5:2),L=t(x(y(V,$),Z,J),n.apply(this,Q),a);o0(U),o>0?fa(this).transition().duration(o).call(N,L,Z,U):fa(this).call(b.transform,L,Z,U)}}function I(U,...Q){if(e.apply(this,arguments)){var V=U.touches,Z=V.length,J=j(this,Q,U.changedTouches.length===Z).event(U),$,L,q,P;for(q4(U),L=0;L`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.`},om=[[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 Hh;(function(e){e.Strict="strict",e.Loose="loose"})(Hh||(Hh={}));var cf;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(cf||(cf={}));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 yu;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(yu||(yu={}));var zb;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(zb||(zb={}));var Rt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Rt||(Rt={}));const WM={[Rt.Left]:Rt.Right,[Rt.Right]:Rt.Left,[Rt.Top]:Rt.Bottom,[Rt.Bottom]:Rt.Top};function FU(e){return e===null?null:e?"valid":"invalid"}const HU=e=>"id"in e&&"source"in e&&"target"in e,DWn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),s7=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Xm=(e,n=[0,0])=>{const{width:t,height:r}=Al(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},LWn=(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):s7(s)?s:n.nodeLookup.get(s.id));const o=a?jb(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return rx(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return sx(t)},Ym=(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=rx(t,jb(s)),r=!0)}),r?sx(t):{x:0,y:0,width:0,height:0}},i7=(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,h=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,b=m.height??p.height??p.initialHeight??0,{x:y,y:x}=p.internals.positionAbsolute,C=KU(o,c,u,h,y,x,v,b),N=v*b,j=i&&C>0;(!p.internals.handleBounds||j||C>=N||p.dragging)&&f.push(p)}return f},IWn=(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 $Wn(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 BWn({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=$Wn(e,a),c=Ym(o),u=o7(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},h=a.origin??r;let f=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!o)i==null||i("005",yo.error005());else{const m=o.measured.width,w=o.measured.height;m&&w&&(f=[[c,u],[c+m,u+w]])}else o&&Ef(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=Ef(f)?Cf(n,f,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",yo.error015())),{position:{x:p.x-c+(a.measured.width??0)*h[0],y:p.y-u+(a.measured.height??0)*h[1]},positionAbsolute:p}}async function PWn({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),h=IWn(a,c);for(const p of c)o.has(p.id)&&!h.find(w=>w.id===p.id)&&h.push(p);if(!s)return{edges:h,nodes:a};const f=await s({nodes:a,edges:h});return typeof f=="boolean"?f?{edges:h,nodes:a}:{edges:[],nodes:[]}:f}const qh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Cf=(e={x:0,y:0},n,t)=>({x:qh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:qh(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}=Al(t),{x:i,y:a}=t.internals.positionAbsolute;return Cf(e,[[i,a],[i+r,a+s]],n)}const QM=(e,n,t)=>et?-qh(Math.abs(e-t),1,n)/n:0,a7=(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]},rx=(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)}),Bk=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),sx=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),lm=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=s7(e)?e.internals.positionAbsolute:Xm(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}},jb=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=s7(e)?e.internals.positionAbsolute:Xm(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)=>sx(rx(Bk(e),Bk(n))),KU=(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)},Ab=(e,n)=>KU(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),XM=e=>ho(e.width)&&ho(e.height)&&ho(e.x)&&ho(e.y),ho=e=>!isNaN(e)&&isFinite(e),VU=(e,n)=>(t,r)=>{},Zm=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Jm=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?Zm(o,a):o},Uh=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function Td(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 FWn(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=Td(e,t),s=Td(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Td(e.top??e.y??0,t),s=Td(e.bottom??e.y??0,t),i=Td(e.left??e.x??0,n),a=Td(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 HWn(e,n,t,r,s,i){const{x:a,y:o}=Uh(e,[n,t,r]),{x:c,y:u}=Uh({x:e.x+e.width,y:e.y+e.height},[n,t,r]),h=s-c,f=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(h),bottom:Math.floor(f)}}const o7=(e,n,t,r,s,i)=>{const a=FWn(i,n,t),o=(n-a.x)/e.width,c=(t-a.y)/e.height,u=Math.min(o,c),h=qh(u,r,s),f=e.x+e.width/2,p=e.y+e.height/2,m=n/2-f*h,w=t/2-p*h,k=HWn(e,m,w,h,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:h}},um=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ef(e){return e!=null&&e!=="parent"}function Al(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 YM(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function qWn(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function UWn(e){return{...BU,...e||{}}}function j0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=po(e),o=Jm({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:c,y:u}=t?Zm(o,n):o;return{xSnapped:c,ySnapped:u,...o}}const c7=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)},GWn=["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:GWn.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const ZU=e=>"clientX"in e,po=(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)}},ZM=(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,...c7(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,h=Math.abs(c-e),f=Math.abs(u-n);return[c,u,h,f]}function H1(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function JM({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case Rt.Left:return[n-H1(n-r,i),t];case Rt.Right:return[n+H1(r-n,i),t];case Rt.Top:return[n,t-H1(t-s,i)];case Rt.Bottom:return[n,t+H1(s-t,i)]}}function eG({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top,curvature:a=.25}){const[o,c]=JM({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,h]=JM({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:h});return[`M${e},${n} C${o},${c} ${u},${h} ${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 WWn=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,QWn=(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)),XWn=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",yo.error006()),n;const r=t.getEdgeId||WWn;let s;return HU(e)?s={...e}:s={...e,id:r(e)},QWn(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 eO={[Rt.Left]:{x:-1,y:0},[Rt.Right]:{x:1,y:0},[Rt.Top]:{x:0,y:-1},[Rt.Bottom]:{x:0,y:1}},YWn=({source:e,sourcePosition:n=Rt.Bottom,target:t})=>n===Rt.Left||n===Rt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function ZWn({source:e,sourcePosition:n=Rt.Bottom,target:t,targetPosition:r=Rt.Top,center:s,offset:i,stepPosition:a}){const o=eO[n],c=eO[r],u={x:e.x+o.x*i,y:e.y+o.y*i},h={x:t.x+c.x*i,y:t.y+c.y*i},f=YWn({source:u,sourcePosition:n,target:h}),p=f.x!==0?"x":"y",m=f[p];let w=[],k,v;const b={x:0,y:0},y={x:0,y:0},[,,x,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+(h.x-u.x)*a,v=s.y??(u.y+h.y)/2):(k=s.x??(u.x+h.x)/2,v=s.y??u.y+(h.y-u.y)*a);const z=[{x:k,y:u.y},{x:k,y:h.y}],M=[{x:u.x,y:v},{x:h.x,y:v}];o[p]===m?w=p==="x"?z:M:w=p==="x"?M:z}else{const z=[{x:u.x,y:h.y}],M=[{x:h.x,y:u.y}];if(p==="x"?w=o.x===m?M:z:w=o.y===m?z:M,n===r){const U=Math.abs(e[p]-t[p]);if(U<=i){const Q=Math.min(i-1,i-U);o[p]===m?b[p]=(u[p]>e[p]?-1:1)*Q:y[p]=(h[p]>t[p]?-1:1)*Q}}if(n!==r){const U=p==="x"?"y":"x",Q=o[p]===c[U],V=u[U]>h[U],Z=u[U]=G?(k=(D.x+I.x)/2,v=w[0].y):(k=w[0].x,v=(D.y+I.y)/2)}const N={x:u.x+b.x,y:u.y+b.y},j={x:h.x+y.x,y:h.y+y.y};return[[e,...N.x!==w[0].x||N.y!==w[0].y?[N]:[],...w,...j.x!==w[w.length-1].x||j.y!==w[w.length-1].y?[j]:[],t],k,v,x,C]}function JWn(e,n,t,r){const s=Math.min(tO(e,n)/2,tO(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 Fk(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function tQn(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=Fk(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,nQn=10,l7={nodeOrigin:[0,0],nodeExtent:om,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},rQn={...l7,checkEquality:!0};function u7(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function sQn(e,n,t){const r=u7(l7,t);for(const s of e.values())if(s.parentId)f7(s,e,n,r);else{const i=Xm(s,r.nodeOrigin),a=Ef(s.extent)?s.extent:r.nodeExtent,o=Cf(i,a,Al(s));s.internals.positionAbsolute=o}}function iQn(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 _7(e){return e==="manual"}function Hk(e,n,t,r={}){var h,f;const s=u7(rQn,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!_7(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=Xm(p,s.nodeOrigin),k=Ef(p.extent)?p.extent:s.nodeExtent,v=Cf(w,k,Al(p));m={...s.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(f=p.measured)==null?void 0:f.height},internals:{positionAbsolute:v,handleBounds:iQn(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&&f7(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function aQn(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 f7(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:c}=u7(l7,r),u=e.parentId,h=n.get(u);if(!h){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}aQn(e,t),s&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++s.i,h.internals.z=h.internals.z+s.i*nQn),s&&h.internals.rootParentIndex!==void 0&&(s.i=h.internals.rootParentIndex);const f=i&&!_7(c)?rG:0,{x:p,y:m,z:w}=oQn(e,h,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=ho(e.zIndex)?e.zIndex:0;return _7(t)?r:r+(e.selected?n:0)}function oQn(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,c=Al(e),u=Xm(e,t),h=Ef(e.extent)?Cf(u,e.extent,c):u;let f=Cf({x:a+h.x,y:o+h.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 d7(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)??lm(c),h=GU(u,o.rect);i.set(o.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:o,parent:c},u)=>{var x;const h=c.internals.positionAbsolute,f=Al(c),p=c.origin??r,m=o.x0||w>0||b||y)&&(s.push({id:u,type:"position",position:{x:c.position.x-m+b,y:c.position.y-w+y}}),(x=t.get(u))==null||x.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=d7(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:c}}async function lQn({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 iO(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}`,h=`${i}-${o}--${s}-${a}`;iO("source",c,h,e,s,a),iO("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 aO(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 uQn(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 U4({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,c;const s=[];for(const[u,h]of n){const f=(a=t.get(u))==null?void 0:a.internals.userNode;f&&s.push({...f,position:h.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 _Qn({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=Zm(i,n);return{x:a.x-i.x,y:a.y-i.y}}function fQn({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},h=null,f=!1,p=null,m=!1,w=!1,k=null;function v({noDragClassName:y,handleSelector:x,domNode:C,isSelectable:N,nodeId:j,nodeClickDistance:A=0}){p=fa(C);function z({x:B,y:G}){const{nodeLookup:U,nodeExtent:Q,snapGrid:V,snapToGrid:Z,nodeOrigin:J,onNodeDrag:$,onSelectionDrag:L,onError:q,updateNodePositions:P}=n();i={x:B,y:G};let F=!1;const re=o.size>1,ie=re&&Q?Bk(Ym(o)):null,ue=re&&Z?_Qn({dragItems:o,snapGrid:V,x:B,y:G}):null;for(const[se,K]of o){if(!U.has(se))continue;let oe={x:B-K.distance.x,y:G-K.distance.y};Z&&(oe=ue?{x:Math.round(oe.x+ue.x),y:Math.round(oe.y+ue.y)}:Zm(oe,V));let ce=null;if(re&&Q&&!K.extent&&ie){const{positionAbsolute:Me}=K.internals,Fe=Me.x-ie.x+Q[0][0],Ye=Me.x+K.measured.width-ie.x2+Q[1][0],Te=Me.y-ie.y+Q[0][1],$e=Me.y+K.measured.height-ie.y2+Q[1][1];ce=[[Fe,Te],[Ye,$e]]}const{position:pe,positionAbsolute:ve}=qU({nodeId:se,nextPosition:oe,nodeLookup:U,nodeExtent:ce||Q,nodeOrigin:J,onError:q});F=F||K.position.x!==pe.x||K.position.y!==pe.y,K.position=pe,K.internals.positionAbsolute=ve}if(w=w||F,!!F&&(P(o,!0),k&&(r||$||!j&&L))){const[se,K]=U4({nodeId:j,dragItems:o,nodeLookup:U});r==null||r(k,o,se,K),$==null||$(k,se,K),j||L==null||L(k,K)}}async function M(){if(!h)return;const{transform:B,panBy:G,autoPanSpeed:U,autoPanOnNodeDrag:Q}=n();if(!Q){c=!1,cancelAnimationFrame(a);return}const[V,Z]=a7(u,h,U);(V!==0||Z!==0)&&(i.x=(i.x??0)-V/B[2],i.y=(i.y??0)-Z/B[2],await G({x:V,y:Z})&&z(i)),a=requestAnimationFrame(M)}function D(B){var re;const{nodeLookup:G,multiSelectionActive:U,nodesDraggable:Q,transform:V,snapGrid:Z,snapToGrid:J,selectNodesOnDrag:$,onNodeDragStart:L,onSelectionDragStart:q,unselectNodesAndEdges:P}=n();f=!0,(!$||!N)&&!U&&j&&((re=G.get(j))!=null&&re.selected||P()),N&&$&&j&&(e==null||e(j));const F=j0(B.sourceEvent,{transform:V,snapGrid:Z,snapToGrid:J,containerBounds:h});if(i=F,o=uQn(G,Q,F,j),o.size>0&&(t||L||!j&&q)){const[ie,ue]=U4({nodeId:j,dragItems:o,nodeLookup:G});t==null||t(B.sourceEvent,o,ie,ue),L==null||L(B.sourceEvent,ie,ue),j||q==null||q(B.sourceEvent,ue)}}const I=wU().clickDistance(A).on("start",B=>{const{domNode:G,nodeDragThreshold:U,transform:Q,snapGrid:V,snapToGrid:Z}=n();h=(G==null?void 0:G.getBoundingClientRect())||null,m=!1,w=!1,k=B.sourceEvent,U===0&&D(B),i=j0(B.sourceEvent,{transform:Q,snapGrid:V,snapToGrid:Z,containerBounds:h}),u=po(B.sourceEvent,h)}).on("drag",B=>{const{autoPanOnNodeDrag:G,transform:U,snapGrid:Q,snapToGrid:V,nodeDragThreshold:Z,nodeLookup:J}=n(),$=j0(B.sourceEvent,{transform:U,snapGrid:Q,snapToGrid:V,containerBounds:h});if(k=B.sourceEvent,(B.sourceEvent.type==="touchmove"&&B.sourceEvent.touches.length>1||j&&!J.has(j))&&(m=!0),!m){if(!c&&G&&f&&(c=!0,M()),!f){const L=po(B.sourceEvent,h),q=L.x-u.x,P=L.y-u.y;Math.sqrt(q*q+P*P)>Z&&D(B)}(i.x!==$.xSnapped||i.y!==$.ySnapped)&&o&&f&&(u=po(B.sourceEvent,h),z($))}}).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:G,updateNodePositions:U,onNodeDragStop:Q,onSelectionDragStop:V}=n();if(w&&(U(o,!1),w=!1),s||Q||!j&&V){const[Z,J]=U4({nodeId:j,dragItems:o,nodeLookup:G,dragging:!1});s==null||s(B.sourceEvent,o,Z,J),Q==null||Q(B.sourceEvent,Z,J),j||V==null||V(B.sourceEvent,J)}}}).filter(B=>{const G=B.target;return!B.button&&(!y||!aO(G,`.${y}`,C))&&(!x||aO(G,x,C))});p.call(I)}function b(){p==null||p.on(".drag",null)}return{update:v,destroy:b}}function dQn(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())Ab(s,lm(i))>0&&r.push(i);return r}const hQn=250;function pQn(e,n,t,r){var o,c;let s=[],i=1/0;const a=dQn(e,t,n+hQn);for(const u of a){const h=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of h){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:p,y:m}=Nf(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(h=>h.type===u)??s[0]}return s[0]}function oG(e,n,t,r,s,i=!1){var u,h,f;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((h=a.internals.handleBounds)==null?void 0:h.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,...Nf(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 mQn(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const lG=()=>!0;function gQn(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:c,lib:u,autoPanOnConnect:h,flowId:f,panBy:p,cancelConnection:m,onConnectStart:w,onConnect:k,onConnectEnd:v,isValidConnection:b=lG,onReconnectEnd:y,updateConnection:x,getTransform:C,getFromHandle:N,autoPanSpeed:j,dragThreshold:A=1,handleDomNode:z}){const M=XU(e.target);let D=0,I;const{x:B,y:G}=po(e),U=cG(i,z),Q=o==null?void 0:o.getBoundingClientRect();let V=!1;if(!Q||!U)return;const Z=oG(s,U,r,c,n);if(!Z)return;let J=po(e,Q),$=!1,L=null,q=!1,P=null;function F(){if(!h||!Q)return;const[pe,ve]=a7(J,Q,j);p({x:pe,y:ve}),D=requestAnimationFrame(F)}const re={...Z,nodeId:s,type:U,position:Z.position},ie=c.get(s);let se={inProgress:!0,isValid:null,from:Nf(ie,re,Rt.Left,!0),fromHandle:re,fromPosition:re.position,fromNode:ie,to:J,toHandle:null,toPosition:WM[re.position],toNode:null,pointer:J};function K(){V=!0,x(se),w==null||w(e,{nodeId:s,handleId:r,handleType:U})}A===0&&K();function oe(pe){if(!V){const{x:$e,y:yt}=po(pe),ot=$e-B,Mt=yt-G;if(!(ot*ot+Mt*Mt>A*A))return;K()}if(!N()||!re){ce(pe);return}const ve=C();J=po(pe,Q),I=pQn(Jm(J,ve,!1,[1,1]),t,c,re),$||(F(),$=!0);const Me=uG(pe,{handle:I,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:b,doc:M,lib:u,flowId:f,nodeLookup:c});P=Me.handleDomNode,L=Me.connection,q=mQn(!!I,Me.isValid);const Fe=c.get(s),Ye=Fe?Nf(Fe,re,Rt.Left,!0):se.from,Te={...se,from:Ye,isValid:q,to:Me.toHandle&&q?Uh({x:Me.toHandle.x,y:Me.toHandle.y},ve):J,toHandle:Me.toHandle,toPosition:q&&Me.toHandle?Me.toHandle.position:WM[re.position],toNode:Me.toHandle?c.get(Me.toHandle.nodeId):null,pointer:J};x(Te),se=Te}function ce(pe){if(!("touches"in pe&&pe.touches.length>0)){if(V){(I||P)&&L&&q&&(k==null||k(L));const{inProgress:ve,...Me}=se,Fe={...Me,toPosition:se.toHandle?se.toPosition:null};v==null||v(pe,Fe),i&&(y==null||y(pe,Fe))}m(),cancelAnimationFrame(D),$=!1,q=!1,L=null,P=null,M.removeEventListener("mousemove",oe),M.removeEventListener("mouseup",ce),M.removeEventListener("touchmove",oe),M.removeEventListener("touchend",ce)}}M.addEventListener("mousemove",oe),M.addEventListener("mouseup",ce),M.addEventListener("touchmove",oe),M.addEventListener("touchend",ce)}function uG(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:c,isValidConnection:u=lG,nodeLookup:h}){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}=po(e),k=a.elementFromPoint(m,w),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const y=cG(void 0,v),x=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),N=v.classList.contains("connectable"),j=v.classList.contains("connectableend");if(!x||!y)return b;const A={source:f?x:r,sourceHandle:f?C:s,target:f?r:x,targetHandle:f?s:C};b.connection=A;const M=N&&j&&(t===Hh.Strict?f&&y==="source"||!f&&y==="target":x!==r||C!==s);b.isValid=M&&u(A),b.toHandle=oG(x,y,C,h,t,!0)}return b}const qk={onPointerDown:gQn,isValid:uG};function vQn({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=fa(e);function i({translateExtent:o,width:c,height:u,zoomStep:h=1,pannable:f=!0,zoomable:p=!0,inversePan:m=!1}){const w=x=>{if(x.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=x.sourceEvent.ctrlKey&&um()?10:1,j=-x.sourceEvent.deltaY*(x.sourceEvent.deltaMode===1?.05:x.sourceEvent.deltaMode?1:.002)*h,A=C[2]*Math.pow(2,j*N);n.scaleTo(A)};let k=[0,0];const v=x=>{(x.sourceEvent.type==="mousedown"||x.sourceEvent.type==="touchstart")&&(k=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY])},b=x=>{const C=t();if(x.sourceEvent.type!=="mousemove"&&x.sourceEvent.type!=="touchmove"||!n)return;const N=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY],j=[N[0]-k[0],N[1]-k[1]];k=N;const A=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),z={x:C[0]-j[0]*A,y:C[1]-j[1]*A},M=[[0,0],[c,u]];n.setViewportConstrained({x:z.x,y:z.y,zoom:C[2]},M,o)},y=IU().on("start",v).on("zoom",f?b:null).on("zoom.wheel",p?w:null);s.call(y,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:ao}}const ix=e=>({x:e.x,y:e.y,zoom:e.k}),G4=({x:e,y:n,zoom:t})=>nx.translate(e,n).scale(t),Ud=(e,n)=>e.target.closest(`.${n}`),_G=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),bQn=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,K4=(e,n=0,t=bQn,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&&um()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function yQn({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:o,onPanZoom:c,onPanZoomEnd:u}){return h=>{if(Ud(h,n))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const f=t.property("__zoom").k||1;if(h.ctrlKey&&a){const v=ao(h),b=fG(h),y=f*Math.pow(2,b);r.scaleTo(t,y,v,h);return}const p=h.deltaMode===1?20:1;let m=s===cf.Vertical?0:h.deltaX*p,w=s===cf.Horizontal?0:h.deltaY*p;!um()&&h.shiftKey&&s!==cf.Vertical&&(m=h.deltaY*p,w=0),r.translateBy(t,-(m/f)*i,-(w/f)*i,{internal:!0});const k=ix(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,k),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(h,k))}}function xQn({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=Ud(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function wQn({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=ix(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 kQn({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,ix(i.transform)))}}function SQn({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=ix(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,c)},t?150:0)}}}function CQn({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:c,lib:u,connectionInProgress:h}){return f=>{var v;const p=e||n,m=t&&f.ctrlKey,w=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Ud(f,`${u}-flow__node`)||Ud(f,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||h&&!w||Ud(f,o)&&w||Ud(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 EQn({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},h=e.getBoundingClientRect(),f=IU().scaleExtent([n,t]).translateExtent(r),p=fa(e).call(f);y({x:s.x,y:s.y,zoom:qh(s.zoom,n,t)},[[0,0],[h.width,h.height]],r);const m=p.on("wheel.zoom"),w=p.on("dblclick.zoom");f.wheelDelta(fG);async function k(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?z0:mv).transform(K4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}function v({noWheelClassName:I,noPanClassName:B,onPaneContextMenu:G,userSelectionActive:U,panOnScroll:Q,panOnDrag:V,panOnScrollMode:Z,panOnScrollSpeed:J,preventScrolling:$,zoomOnPinch:L,zoomOnScroll:q,zoomOnDoubleClick:P,zoomActivationKeyPressed:F,lib:re,onTransformChange:ie,connectionInProgress:ue,paneClickDistance:se,selectionOnDrag:K}){U&&!u.isZoomingOrPanning&&b();const oe=Q&&!F&&!U;f.clickDistance(K?1/0:!ho(se)||se<0?0:se);const ce=oe?yQn({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:f,panOnScrollMode:Z,panOnScrollSpeed:J,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):xQn({noWheelClassName:I,preventScrolling:$,d3ZoomHandler:m});p.on("wheel.zoom",ce,{passive:!1});const pe=wQn({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});f.on("start",pe);const ve=kQn({zoomPanValues:u,panOnDrag:V,onPaneContextMenu:!!G,onPanZoom:i,onTransformChange:ie});f.on("zoom",ve);const Me=SQn({zoomPanValues:u,panOnDrag:V,panOnScroll:Q,onPaneContextMenu:G,onPanZoomEnd:o,onDraggingChange:c});f.on("end",Me);const Fe=CQn({zoomActivationKeyPressed:F,panOnDrag:V,zoomOnScroll:q,panOnScroll:Q,zoomOnDoubleClick:P,zoomOnPinch:L,userSelectionActive:U,noPanClassName:B,noWheelClassName:I,lib:re,connectionInProgress:ue});f.filter(Fe),P?p.on("dblclick.zoom",w):p.on("dblclick.zoom",null)}function b(){f.on("zoom",null)}async function y(I,B,G){const U=G4(I),Q=f==null?void 0:f.constrain()(U,B,G);return Q&&await k(Q),Q}async function x(I,B){const G=G4(I);return await k(G,B),G}function C(I){if(p){const B=G4(I),G=p.property("__zoom");(G.k!==I.zoom||G.x!==I.x||G.y!==I.y)&&(f==null||f.transform(p,B,null,{sync:!0}))}}function N(){const I=p?LU(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}async function j(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?z0:mv).scaleTo(K4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}async function A(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?z0:mv).scaleBy(K4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}function z(I){f==null||f.scaleExtent(I)}function M(I){f==null||f.translateExtent(I)}function D(I){const B=!ho(I)||I<0?0:I;f==null||f.clickDistance(B)}return{update:v,destroy:b,setViewport:x,setViewportConstrained:y,getViewport:N,scaleTo:j,scaleBy:A,setScaleExtent:z,setTranslateExtent:M,syncViewport:C,setClickDistance:D}}var Gh;(function(e){e.Line="line",e.Handle="handle"})(Gh||(Gh={}));function NQn({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 oO(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 hu(e,n){return Math.max(0,n-e)}function pu(e,n){return Math.max(0,e-n)}function q1(e,n,t){return Math.max(0,n-e,e-t)}function cO(e,n){return e?!n:n}function zQn(e,n,t,r,s,i,a,o){let{affectsX:c,affectsY:u}=n;const{isHorizontal:h,isVertical:f}=n,p=h&&f,{xSnapped:m,ySnapped:w}=t,{minWidth:k,maxWidth:v,minHeight:b,maxHeight:y}=r,{x,y:C,width:N,height:j,aspectRatio:A}=e;let z=Math.floor(h?m-e.pointerX:0),M=Math.floor(f?w-e.pointerY:0);const D=N+(c?-z:z),I=j+(u?-M:M),B=-i[0]*N,G=-i[1]*j;let U=q1(D,k,v),Q=q1(I,b,y);if(a){let J=0,$=0;c&&z<0?J=hu(x+z+B,a[0][0]):!c&&z>0&&(J=pu(x+D+B,a[1][0])),u&&M<0?$=hu(C+M+G,a[0][1]):!u&&M>0&&($=pu(C+I+G,a[1][1])),U=Math.max(U,J),Q=Math.max(Q,$)}if(o){let J=0,$=0;c&&z>0?J=pu(x+z,o[0][0]):!c&&z<0&&(J=hu(x+D,o[1][0])),u&&M>0?$=pu(C+M,o[0][1]):!u&&M<0&&($=hu(C+I,o[1][1])),U=Math.max(U,J),Q=Math.max(Q,$)}if(s){if(h){const J=q1(D/A,b,y)*A;if(U=Math.max(U,J),a){let $=0;!c&&!u||c&&!u&&p?$=pu(C+G+D/A,a[1][1])*A:$=hu(C+G+(c?z:-z)/A,a[0][1])*A,U=Math.max(U,$)}if(o){let $=0;!c&&!u||c&&!u&&p?$=hu(C+D/A,o[1][1])*A:$=pu(C+(c?z:-z)/A,o[0][1])*A,U=Math.max(U,$)}}if(f){const J=q1(I*A,k,v)/A;if(Q=Math.max(Q,J),a){let $=0;!c&&!u||u&&!c&&p?$=pu(x+I*A+B,a[1][0])/A:$=hu(x+(u?M:-M)*A+B,a[0][0])/A,Q=Math.max(Q,$)}if(o){let $=0;!c&&!u||u&&!c&&p?$=hu(x+I*A,o[1][0])/A:$=pu(x+(u?M:-M)*A,o[0][0])/A,Q=Math.max(Q,$)}}}M=M+(M<0?Q:-Q),z=z+(z<0?U:-U),s&&(p?D>I*A?M=(cO(c,u)?-z:z)/A:z=(cO(c,u)?-M:M)*A:h?(M=z/A,u=c):(z=M*A,c=u));const V=c?x+z:x,Z=u?C+M:C;return{width:N+(c?-z:z),height:j+(u?-M:M),x:i[0]*z*(c?-1:1)+V,y:i[1]*M*(u?-1:1)+Z}}const dG={width:0,height:0,x:0,y:0},jQn={...dG,pointerX:0,pointerY:0,aspectRatio:1};function AQn(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 TQn({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=fa(e);let a={controlDirection:oO("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:h,keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:w,onResizeEnd:k,shouldResize:v}){let b={...dG},y={...jQn};a={boundaries:h,resizeDirection:p,keepAspectRatio:f,controlDirection:oO(u)};let x,C=null,N=[],j,A,z,M=!1;const D=wU().on("start",I=>{const{nodeLookup:B,transform:G,snapGrid:U,snapToGrid:Q,nodeOrigin:V,paneDomNode:Z}=t();if(x=B.get(n),!x)return;C=(Z==null?void 0:Z.getBoundingClientRect())??null;const{xSnapped:J,ySnapped:$}=j0(I.sourceEvent,{transform:G,snapGrid:U,snapToGrid:Q,containerBounds:C});b={width:x.measured.width??0,height:x.measured.height??0,x:x.position.x??0,y:x.position.y??0},y={...b,pointerX:J,pointerY:$,aspectRatio:b.width/b.height},j=void 0,A=Ef(x.extent)?x.extent:void 0,x.parentId&&(x.extent==="parent"||x.expandParent)&&(j=B.get(x.parentId)),j&&x.extent==="parent"&&(A=[[0,0],[j.measured.width,j.measured.height]]),N=[],z=void 0;for(const[L,q]of B)if(q.parentId===n&&(N.push({id:L,position:{...q.position},extent:q.extent}),q.extent==="parent"||q.expandParent)){const P=AQn(q,x,q.origin??V);z?z=[[Math.min(P[0][0],z[0][0]),Math.min(P[0][1],z[0][1])],[Math.max(P[1][0],z[1][0]),Math.max(P[1][1],z[1][1])]]:z=P}m==null||m(I,{...b})}).on("drag",I=>{const{transform:B,snapGrid:G,snapToGrid:U,nodeOrigin:Q}=t(),V=j0(I.sourceEvent,{transform:B,snapGrid:G,snapToGrid:U,containerBounds:C}),Z=[];if(!x)return;const{x:J,y:$,width:L,height:q}=b,P={},F=x.origin??Q,{width:re,height:ie,x:ue,y:se}=zQn(y,a.controlDirection,V,a.boundaries,a.keepAspectRatio,F,A,z),K=re!==L,oe=ie!==q,ce=ue!==J&&K,pe=se!==$&&oe;if(!ce&&!pe&&!K&&!oe)return;if((ce||pe||F[0]===1||F[1]===1)&&(P.x=ce?ue:b.x,P.y=pe?se:b.y,b.x=P.x,b.y=P.y,N.length>0)){const Ye=ue-J,Te=se-$;for(const $e of N)$e.position={x:$e.position.x-Ye+F[0]*(re-L),y:$e.position.y-Te+F[1]*(ie-q)},Z.push($e)}if((K||oe)&&(P.width=K&&(!a.resizeDirection||a.resizeDirection==="horizontal")?re:b.width,P.height=oe&&(!a.resizeDirection||a.resizeDirection==="vertical")?ie:b.height,b.width=P.width,b.height=P.height),j&&x.expandParent){const Ye=F[0]*(P.width??0);P.x&&P.x{M&&(k==null||k(I,{...b}),s==null||s({...b}),M=!1)});i.call(D)}function c(){i.on(".drag",null)}return{update:o,destroy:c}}const RQn={},lO=e=>{let n;const t=new Set,r=(h,f)=>{const p=typeof h=="function"?h(n):h;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:h=>(t.add(h),()=>t.delete(h)),destroy:()=>{(RQn?"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},MQn=e=>e?lO(e):lO,{useDebugValue:OQn}=it,{useSyncExternalStoreWithSelector:DQn}=jQ,LQn=e=>e;function hG(e,n=LQn,t){const r=DQn(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return OQn(r),r}const uO=(e,n)=>{const t=MQn(e),r=(s,i=n)=>hG(t,s,i);return Object.assign(r,t),r},IQn=(e,n)=>e?uO(e,n):uO;function Tr(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 ax=T.createContext(null),$Qn=ax.Provider,pG=yo.error001("react");function Bn(e,n){const t=T.useContext(ax);if(t===null)throw new Error(pG);return hG(t,e,n)}function Mr(){const e=T.useContext(ax);if(e===null)throw new Error(pG);return T.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const _O={display:"none"},BQn={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",PQn="react-flow__aria-live",FQn=e=>e.ariaLiveMessage,HQn=e=>e.ariaLabelConfig;function qQn({rfId:e}){const n=Bn(FQn);return _.jsx("div",{id:`${PQn}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:BQn,children:n})}function UQn({rfId:e,disableKeyboardA11y:n}){const t=Bn(HQn);return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:`${mG}-${e}`,style:_O,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),_.jsx("div",{id:`${gG}-${e}`,style:_O,children:t["edge.a11yDescription.default"]}),!n&&_.jsx(qQn,{rfId:e})]})}const ox=T.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return _.jsx("div",{className:ms(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});ox.displayName="Panel";const fO="https://reactflow.dev?utm_source=attribution";function GQn({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:_.jsx(ox,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${fO}`,children:_.jsx("a",{href:fO,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const KQn=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}},U1=e=>e.id;function VQn(e,n){return Tr(e.selectedNodes.map(U1),n.selectedNodes.map(U1))&&Tr(e.selectedEdges.map(U1),n.selectedEdges.map(U1))}function WQn({onSelectionChange:e}){const n=Mr(),{selectedNodes:t,selectedEdges:r}=Bn(KQn,VQn);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 QQn=e=>!!e.onSelectionChangeHandlers;function XQn({onSelectionChange:e}){const n=Bn(QQn);return e||n?_.jsx(WQn,{onSelectionChange:e}):null}const vG=[0,0],YQn={x:0,y:0,zoom:1},ZQn=["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"],dO=[...ZQn,"rfId"],JQn=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}),hO={translateExtent:om,nodeOrigin:vG,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function eXn(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:c}=Bn(JQn,Tr),u=Mr();T.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=hO,o()}),[]);const h=T.useRef(hO);return T.useEffect(()=>{for(const f of dO){const p=e[f],m=h.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:UWn(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}h.current=e},dO.map(f=>e[f])),null}function pO(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function tXn(e){var r;const[n,t]=T.useState(e==="system"?null:e);return T.useEffect(()=>{if(e!=="system"){t(e);return}const s=pO(),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=pO())!=null&&r.matches?"dark":"light"}const mO=typeof document<"u"?document:null;function _m(e=null,n={target:mO,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(` -`)),h=u.reduce((f,p)=>f.concat(...p),[]);return[u,h]}return[[],[]]},[e]);return T.useEffect(()=>{const c=(n==null?void 0:n.target)??iO,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const h=m=>{var v,b;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&$U(m))return!1;const k=oO(m.code,o);if(i.current.add(m[k]),aO(a,i.current,!1)){const y=((b=(v=m.composedPath)==null?void 0:v.call(m))==null?void 0:b[0])||m.target,x=(y==null?void 0:y.nodeName)==="BUTTON"||(y==null?void 0:y.nodeName)==="A";n.preventDefault!==!1&&(s.current||!x)&&m.preventDefault(),r(!0)}},f=m=>{const w=oO(m.code,o);aO(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",h),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function aO(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function oO(e,n){return n.includes(e)?"code":"key"}const TWn=()=>{const e=Ar();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=KC(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},h=t.snapGrid??s,f=t.snapToGrid??i;return Jm(u,r,f,h)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=Gh(n,t);return{x:a.x+s,y:a.y+i}}}),[])};function aG(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 MWn(e,n){return aG(e,n)}function OWn(e,n){return aG(e,n)}function I_(e,n){return{id:e,type:"select",selected:n}}function Vd(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(I_(i.id,a)))}return r}function cO({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 lO(e){return{id:e.id,type:"remove"}}const DWn=OU();function LWn(e,n,t={}){return CKn(e,n,{...t,onError:t.onError??DWn})}const uO=e=>uKn(e),IWn=e=>jU(e);function oG(e){return T.forwardRef(e)}const $Wn=typeof window<"u"?T.useLayoutEffect:T.useEffect;function _O(e){const[n,t]=T.useState(BigInt(0)),[r]=T.useState(()=>BWn(()=>t(s=>s+BigInt(1))));return $Wn(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function BWn(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const cG=T.createContext(null);function PWn({children:e}){const n=Ar(),t=T.useCallback(o=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:h,onNodesChange:f,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:w}=n.getState();let k=c;for(const b of o)k=typeof b=="function"?b(k):b;let v=cO({items:k,lookup:p});for(const b of w.values())v=b(v);h&&u(k),v.length>0?f==null||f(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:y,setNodes:x}=n.getState();b&&x(y)})},[]),r=_O(t),s=T.useCallback(o=>{const{edges:c=[],setEdges:u,hasDefaultEdges:h,onEdgesChange:f,edgeLookup:p}=n.getState();let m=c;for(const w of o)m=typeof w=="function"?w(m):w;h?u(m):f&&f(cO({items:m,lookup:p}))},[]),i=_O(s),a=T.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return _.jsx(cG.Provider,{value:a,children:e})}function FWn(){const e=T.useContext(cG);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const HWn=e=>!!e.panZoom;function e7(){const e=TWn(),n=Ar(),t=FWn(),r=$n(HWn),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 b,y;const{nodeLookup:p,nodeOrigin:m}=n.getState(),w=uO(f)?f:p.get(f.id),k=w.parentId?LU(w.position,w.measured,w.parentId,p,m):w.position,v={...w,position:k,width:((b=w.measured)==null?void 0:b.width)??w.width,height:((y=w.measured)==null?void 0:y.height)??w.height};return lm(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&&uO(v)?v:{...k,...v}}return k}))},h=(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&&IWn(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(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x:w,y:k,zoom:v}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:m,edges:w,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:y,onDelete:x,onBeforeDelete:C}=n.getState(),{nodes:N,edges:j}=await pKn({nodesToRemove:f,edgesToRemove:p,nodes:m,edges:w,onBeforeDelete:C}),A=j.length>0,z=N.length>0;if(A){const M=j.map(lO);v==null||v(j),y(M)}if(z){const M=N.map(lO);k==null||k(N),b(M)}return(z||A)&&(x==null||x({nodes:N,edges:j})),{deletedNodes:N,deletedEdges:j}},getIntersectingNodes:(f,p=!0,m)=>{const w=BM(f),k=w?f:c(f),v=m!==void 0;return k?(m||n.getState().nodes).filter(b=>{const y=n.getState().nodeLookup.get(b.id);if(y&&!w&&(b.id===f.id||!y.internals.positionAbsolute))return!1;const x=lm(v?b:y),C=jb(x,k);return p&&C>0||C>=x.width*x.height||C>=k.width*k.height}):[]},isNodeIntersecting:(f,p,m=!0)=>{const k=BM(f)?f:c(f);if(!k)return!1;const v=jb(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:h,updateEdgeData:(f,p,m={replace:!1})=>{h(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 _Kn(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??vKn();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 fO=e=>e.selected,qWn=typeof window<"u"?window:void 0;function UWn({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=Ar(),{deleteElements:r}=e7(),s=_m(e,{actInsideInputWithModifier:!1}),i=_m(n,{target:qWn});T.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(fO),edges:a.filter(fO)}),t.setState({nodesSelectionActive:!1})}},[s]),T.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function GWn(e){const n=Ar();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=WC(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 sx={position:"absolute",width:"100%",height:"100%",top:0,left:0},VWn=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function KWn({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=lf.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:c,translateExtent:u,minZoom:h,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:w,noWheelClassName:k,noPanClassName:v,onViewportChange:b,isControlledViewport:y,paneClickDistance:x,selectionOnDrag:C}){const N=Ar(),j=T.useRef(null),{userSelectionActive:A,lib:z,connectionInProgress:M}=$n(VWn,zr),D=_m(p),I=T.useRef();GWn(j);const B=T.useCallback(G=>{b==null||b({x:G[0],y:G[1],zoom:G[2]}),y||N.setState({transform:G})},[b,y]);return T.useEffect(()=>{if(j.current){I.current=tWn({domNode:j.current,minZoom:h,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:K=>N.setState(Z=>Z.paneDragging===K?Z:{paneDragging:K}),onPanZoomStart:(K,Z)=>{const{onViewportChangeStart:J,onMoveStart:$}=N.getState();$==null||$(K,Z),J==null||J(Z)},onPanZoom:(K,Z)=>{const{onViewportChange:J,onMove:$}=N.getState();$==null||$(K,Z),J==null||J(Z)},onPanZoomEnd:(K,Z)=>{const{onViewportChangeEnd:J,onMoveEnd:$}=N.getState();$==null||$(K,Z),J==null||J(Z)}});const{x:G,y:q,zoom:Q}=I.current.getViewport();return N.setState({panZoom:I.current,transform:[G,q,Q],domNode:j.current.closest(".react-flow")}),()=>{var K;(K=I.current)==null||K.destroy()}}},[]),T.useEffect(()=>{var G;(G=I.current)==null||G.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:z,onTransformChange:B,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:x})},[e,n,t,r,s,i,a,o,D,m,v,A,k,z,B,M,C,x]),_.jsx("div",{className:"react-flow__renderer",ref:j,style:sx,children:w})}const WWn=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function QWn(){const{userSelectionActive:e,userSelectionRect:n}=$n(WWn,zr);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 q4=(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 YWn({isSelecting:e,selectionKeyPressed:n,selectionMode:t=cm.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:h,onPaneScroll:f,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:w,children:k}){const v=T.useRef(0),b=Ar(),{userSelectionActive:y,elementsSelectable:x,dragging:C,panBy:N,autoPanSpeed:j}=$n(XWn,zr),A=x&&(e||y),z=T.useRef(null),M=T.useRef(),D=T.useRef(new Set),I=T.useRef(new Set),B=T.useRef(!1),G=T.useRef(!1),q=T.useRef({x:0,y:0}),Q=T.useRef(!1),K=V=>{if(G.current||B.current||b.getState().connection.inProgress){G.current=!1,B.current=!1;return}u==null||u(V),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},Z=V=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){V.preventDefault();return}h==null||h(V)},J=f?V=>f(V):void 0,$=V=>{G.current&&(V.stopPropagation(),G.current=!1)},L=V=>{var $e,wt;const{domNode:oe,transform:ce}=b.getState();if(M.current=oe==null?void 0:oe.getBoundingClientRect(),!M.current)return;const me=V.target===z.current;if(!me&&!!V.target.closest(".nokey")||!e||!(a&&me||n)||V.button!==0||!V.isPrimary)return;(wt=($e=V.target)==null?void 0:$e.setPointerCapture)==null||wt.call($e,V.pointerId),G.current=!1;const{x:Fe,y:Xe}=go(V.nativeEvent,M.current),Te=Jm({x:Fe,y:Xe},ce);b.setState({userSelectionRect:{width:0,height:0,startX:Te.x,startY:Te.y,x:Fe,y:Xe}}),me||(V.stopPropagation(),V.preventDefault())};function F(V,oe){const{userSelectionRect:ce}=b.getState();if(!ce)return;const{transform:me,nodeLookup:ve,edgeLookup:Re,connectionLookup:Fe,triggerNodeChanges:Xe,triggerEdgeChanges:Te,defaultEdgeOptions:$e}=b.getState(),wt={x:ce.startX,y:ce.startY},{x:ot,y:Mt}=Gh(wt,me),jt={startX:wt.x,startY:wt.y,x:Vke.id)),I.current=new Set;const tt=($e==null?void 0:$e.selectable)??!0;for(const ke of D.current){const ge=Fe.get(ke);if(ge)for(const{edgeId:Ne}of ge.values()){const qe=Re.get(Ne);qe&&(qe.selectable??tt)&&I.current.add(Ne)}}if(!PM(Ft,D.current)){const ke=Vd(ve,D.current,!0);Xe(ke)}if(!PM(Le,I.current)){const ke=Vd(Re,I.current);Te(ke)}b.setState({userSelectionRect:jt,userSelectionActive:!0,nodesSelectionActive:!1})}function U(){if(!s||!M.current)return;const[V,oe]=VC(q.current,M.current,j);N({x:V,y:oe}).then(ce=>{if(!G.current||!ce){v.current=requestAnimationFrame(U);return}const{x:me,y:ve}=q.current;F(me,ve),v.current=requestAnimationFrame(U)})}const H=()=>{cancelAnimationFrame(v.current),v.current=0,Q.current=!1};T.useEffect(()=>()=>H(),[]);const ae=V=>{const{userSelectionRect:oe,transform:ce,resetSelectedElements:me}=b.getState();if(!M.current||!oe)return;const{x:ve,y:Re}=go(V.nativeEvent,M.current);q.current={x:ve,y:Re};const Fe=Gh({x:oe.startX,y:oe.startY},ce);if(!G.current){const Xe=n?0:i;if(Math.hypot(ve-Fe.x,Re-Fe.y)<=Xe)return;me(),o==null||o(V)}G.current=!0,Q.current||(U(),Q.current=!0),F(ve,Re)},ie=V=>{var oe,ce;if(!A){V.target===z.current&&b.getState().connection.inProgress&&(B.current=!0);return}V.button===0&&((ce=(oe=V.target)==null?void 0:oe.releasePointerCapture)==null||ce.call(oe,V.pointerId),!y&&V.target===z.current&&b.getState().userSelectionRect&&(K==null||K(V)),b.setState({userSelectionActive:!1,userSelectionRect:null}),G.current&&(c==null||c(V),b.setState({nodesSelectionActive:D.current.size>0})),H())},ue=V=>{var oe,ce;(ce=(oe=V.target)==null?void 0:oe.releasePointerCapture)==null||ce.call(oe,V.pointerId),H()},re=r===!0||Array.isArray(r)&&r.includes(0);return _.jsxs("div",{className:ds(["react-flow__pane",{draggable:re,dragging:C,selection:e}]),onClick:A?void 0:q4(K,z),onContextMenu:q4(Z,z),onWheel:q4(J,z),onPointerEnter:A?void 0:p,onPointerMove:A?ae:m,onPointerUp:ie,onPointerCancel:A?ue:void 0,onPointerDownCapture:A?L:void 0,onClickCapture:A?$:void 0,onPointerLeave:w,ref:z,style:sx,children:[k,_.jsx(QWn,{})]})}function Lk({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 h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):s([e])}function lG({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=Ar(),[c,u]=T.useState(!1),h=T.useRef();return T.useEffect(()=>{h.current=FKn({getStoreItems:()=>o.getState(),onNodeMouseDown:f=>{Lk({id:f,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),T.useEffect(()=>{if(!(n||!e.current||!h.current))return h.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var f;(f=h.current)==null||f.destroy()}},[t,r,n,i,e,s,a]),c}const ZWn=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function uG(){const e=Ar();return T.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:c,nodeLookup:u,nodeOrigin:h}=e.getState(),f=new Map,p=ZWn(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[,b]of u){if(!p(b))continue;let y={x:b.internals.positionAbsolute.x+k,y:b.internals.positionAbsolute.y+v};s&&(y=Zm(y,i));const{position:x,positionAbsolute:C}=AU({nodeId:b.id,nextPosition:y,nodeLookup:u,nodeExtent:r,nodeOrigin:h,onError:o});b.position=x,b.internals.positionAbsolute=C,f.set(b.id,b)}c(f)},[])}const t7=T.createContext(null),JWn=t7.Provider;t7.Consumer;const _G=()=>T.useContext(t7),eQn=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),fG=T.createContext(null);function tQn({children:e}){const n=$n(eQn,zr);return _.jsx(fG.Provider,{value:n,children:e})}function nQn(){const e=T.useContext(fG);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const rQn={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},sQn=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:c,isValid:u}=a;if(!o&&!s)return rQn;const h=(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:h,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===qh.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:h&&u}};function iQn({type:e="source",position:n=Rt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:c,className:u,onMouseDown:h,onTouchStart:f,...p},m){var Q,K;const w=a||null,k=e==="target",v=Ar(),b=_G(),{connectOnClick:y,noPanClassName:x,rfId:C}=nQn(),{connectingFrom:N,connectingTo:j,clickConnecting:A,isPossibleEndHandle:z,connectionInProcess:M,clickConnectionInProcess:D,valid:I}=$n(sQn(b,w,e),zr);b||(K=(Q=v.getState()).onError)==null||K.call(Q,"010",wo.error010());const B=Z=>{const{defaultEdgeOptions:J,onConnect:$,hasDefaultEdges:L}=v.getState(),F={...J,...Z};if(L){const{edges:U,setEdges:H,onError:ae}=v.getState();H(LWn(F,U,{onError:ae}))}$==null||$(F),o==null||o(F)},G=Z=>{if(!b)return;const J=BU(Z.nativeEvent);if(s&&(J&&Z.button===0||!J)){const $=v.getState();Dk.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:k,handleId:w,nodeId:b,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...L)=>{var F,U;return(U=(F=v.getState()).onConnectEnd)==null?void 0:U.call(F,...L)},updateConnection:$.updateConnection,onConnect:B,isValidConnection:t||((...L)=>{var F,U;return((U=(F=v.getState()).isValidConnection)==null?void 0:U.call(F,...L))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}J?h==null||h(Z):f==null||f(Z)},q=Z=>{const{onClickConnectStart:J,onClickConnectEnd:$,connectionClickStartHandle:L,connectionMode:F,isValidConnection:U,lib:H,rfId:ae,nodeLookup:ie,connection:ue}=v.getState();if(!b||!L&&!s)return;if(!L){J==null||J(Z.nativeEvent,{nodeId:b,handleId:w,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:w}});return}const re=IU(Z.target),V=t||U,{connection:oe,isValid:ce}=Dk.isValid(Z.nativeEvent,{handle:{nodeId:b,id:w,type:e},connectionMode:F,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:V,flowId:ae,doc:re,lib:H,nodeLookup:ie});ce&&oe&&B(oe);const me=structuredClone(ue);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":b,"data-handlepos":n,"data-id":`${C}-${b}-${w}-${e}`,className:ds(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",x,u,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:i,clickconnecting:A,connectingfrom:N,connectingto:j,valid:I,connectionindicator:r&&(!M||z)&&(M||D?i:s)}]),onMouseDown:G,onTouchStart:G,onClick:y?q:void 0,ref:m,...p,children:c})}const fc=T.memo(oG(iQn));function aQn({data:e,isConnectable:n,sourcePosition:t=Rt.Bottom}){return _.jsxs(_.Fragment,{children:[e==null?void 0:e.label,_.jsx(fc,{type:"source",position:t,isConnectable:n})]})}function oQn({data:e,isConnectable:n,targetPosition:t=Rt.Top,sourcePosition:r=Rt.Bottom}){return _.jsxs(_.Fragment,{children:[_.jsx(fc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,_.jsx(fc,{type:"source",position:r,isConnectable:n})]})}function cQn(){return null}function lQn({data:e,isConnectable:n,targetPosition:t=Rt.Top}){return _.jsxs(_.Fragment,{children:[_.jsx(fc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Ab={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},dO={input:aQn,default:oQn,output:lQn,group:cQn};function uQn(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 _Qn=e=>{const{width:n,height:t,x:r,y:s}=Ym(e.nodeLookup,{filter:i=>!!i.selected});return{width:mo(n)?n:null,height:mo(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 fQn({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=Ar(),{width:s,height:i,transformString:a,userSelectionActive:o}=$n(_Qn,zr),c=uG(),u=T.useRef(null);T.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const h=!o&&s!==null&&i!==null;if(lG({nodeRef:u,disabled:!h}),!h)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(Ab,m.key)&&(m.preventDefault(),c({direction:Ab[m.key],factor:m.shiftKey?4:1}))};return _.jsx("div",{className:ds(["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 hO=typeof window<"u"?window:void 0,dQn=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function dG({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:o,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:h,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:w,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:y,zoomOnPinch:x,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:j,zoomOnDoubleClick:A,panOnDrag:z,autoPanOnSelection:M,defaultViewport:D,translateExtent:I,minZoom:B,maxZoom:G,preventScrolling:q,onSelectionContextMenu:Q,noWheelClassName:K,noPanClassName:Z,disableKeyboardA11y:J,onViewportChange:$,isControlledViewport:L}){const{nodesSelectionActive:F,userSelectionActive:U}=$n(dQn,zr),H=_m(u,{target:hO}),ae=_m(k,{target:hO}),ie=ae||z,ue=ae||C,re=h&&ie!==!0,V=H||U||re;return UWn({deleteKeyCode:c,multiSelectionKeyCode:w}),_.jsx(KWn,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:y,zoomOnPinch:x,panOnScroll:ue,panOnScrollSpeed:N,panOnScrollMode:j,zoomOnDoubleClick:A,panOnDrag:!H&&ie,defaultViewport:D,translateExtent:I,minZoom:B,maxZoom:G,zoomActivationKeyCode:v,preventScrolling:q,noWheelClassName:K,noPanClassName:Z,onViewportChange:$,isControlledViewport:L,paneClickDistance:o,selectionOnDrag:re,children:_.jsxs(YWn,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:ie,autoPanOnSelection:M,isSelecting:!!V,selectionMode:f,selectionKeyPressed:H,paneClickDistance:o,selectionOnDrag:re,children:[e,F&&_.jsx(fQn,{onSelectionContextMenu:Q,noPanClassName:Z,disableKeyboardA11y:J})]})})}dG.displayName="FlowRenderer";const hQn=T.memo(dG),pQn=e=>n=>e?GC(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 mQn(e){return $n(T.useCallback(pQn(e),[e]),zr)}const gQn=e=>e.updateNodeInternals;function vQn(){const e=$n(gQn),[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 bQn({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=Ar(),i=T.useRef(null),a=T.useRef(null),o=T.useRef(e.sourcePosition),c=T.useRef(e.targetPosition),u=T.useRef(n),h=t&&!!e.internals.handleBounds;return T.useEffect(()=>{i.current&&!e.hidden&&(!h||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[h,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 yQn({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:c,nodesConnectable:u,nodesFocusable:h,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:w,rfId:k,nodeTypes:v,nodeClickDistance:b,onError:y}){const{node:x,internals:C,isParent:N}=$n(V=>{const oe=V.nodeLookup.get(e),ce=V.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:ce}},zr);let j=x.type||"default",A=(v==null?void 0:v[j])||dO[j];A===void 0&&(y==null||y("003",wo.error003(j)),j="default",A=(v==null?void 0:v.default)||dO.default);const z=!!(x.draggable||o&&typeof x.draggable>"u"),M=!!(x.selectable||c&&typeof x.selectable>"u"),D=!!(x.connectable||u&&typeof x.connectable>"u"),I=!!(x.focusable||h&&typeof x.focusable>"u"),B=Ar(),G=DU(x),q=bQn({node:x,nodeType:j,hasDimensions:G,resizeObserver:f}),Q=lG({nodeRef:q,disabled:x.hidden||!z,noDragClassName:p,handleSelector:x.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:b}),K=uG();if(x.hidden)return null;const Z=zl(x),J=uQn(x),$=M||z||n||t||r||s,L=t?V=>t(V,{...C.userNode}):void 0,F=r?V=>r(V,{...C.userNode}):void 0,U=s?V=>s(V,{...C.userNode}):void 0,H=i?V=>i(V,{...C.userNode}):void 0,ae=a?V=>a(V,{...C.userNode}):void 0,ie=V=>{const{selectNodesOnDrag:oe,nodeDragThreshold:ce}=B.getState();M&&(!oe||!z||ce>0)&&Lk({id:e,store:B,nodeRef:q}),n&&n(V,{...C.userNode})},ue=V=>{if(!($U(V.nativeEvent)||w)){if(CU.includes(V.key)&&M){const oe=V.key==="Escape";Lk({id:e,store:B,unselect:oe,nodeRef:q})}else if(z&&x.selected&&Object.prototype.hasOwnProperty.call(Ab,V.key)){V.preventDefault();const{ariaLabelConfig:oe}=B.getState();B.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:V.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),K({direction:Ab[V.key],factor:V.shiftKey?4:1})}}},re=()=>{var Fe;if(w||!((Fe=q.current)!=null&&Fe.matches(":focus-visible")))return;const{transform:V,width:oe,height:ce,autoPanOnNodeFocus:me,setCenter:ve}=B.getState();if(!me)return;GC(new Map([[e,x]]),{x:0,y:0,width:oe,height:ce},V,!0).length>0||ve(x.position.x+Z.width/2,x.position.y+Z.height/2,{zoom:V[2]})};return _.jsx("div",{className:ds(["react-flow__node",`react-flow__node-${j}`,{[m]:z},x.className,{selected:x.selected,selectable:M,parent:N,draggable:z,dragging:Q}]),ref:q,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:G?"visible":"hidden",...x.style,...J},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:F,onMouseLeave:U,onContextMenu:H,onClick:ie,onDoubleClick:ae,onKeyDown:I?ue:void 0,tabIndex:I?0:void 0,onFocus:I?re:void 0,role:x.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${rG}-${k}`,"aria-label":x.ariaLabel,...x.domAttributes,children:_.jsx(JWn,{value:e,children:_.jsx(A,{id:e,data:x.data,type:j,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:x.selected??!1,selectable:M,draggable:z,deletable:x.deletable??!0,isConnectable:D,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:Q,dragHandle:x.dragHandle,zIndex:C.z,parentId:x.parentId,...Z})})})}var xQn=T.memo(yQn);const wQn=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function hG(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:i}=$n(wQn,zr),a=mQn(e.onlyRenderVisibleElements),o=vQn();return _.jsx("div",{className:"react-flow__nodes",style:sx,children:a.map(c=>_.jsx(xQn,{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))})}hG.displayName="NodeRenderer";const kQn=T.memo(hG);function SQn(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&&wKn({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),zr)}const CQn=({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"})},EQn=({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"})},pO={[Nb.Arrow]:CQn,[Nb.ArrowClosed]:EQn};function NQn(e){const n=Ar();return T.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(pO,e)?pO[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",wo.error009(e)),null)},[e])}const zQn=({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=NQn(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},pG=({defaultColor:e,rfId:n})=>{const t=$n(i=>i.edges),r=$n(i=>i.defaultEdgeOptions),s=T.useMemo(()=>AKn(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(zQn,{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};pG.displayName="MarkerDefinitions";var jQn=T.memo(pG);function mG({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:c,className:u,...h}){const[f,p]=T.useState({x:1,y:0,width:0,height:0}),m=ds(["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",...h,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}mG.displayName="EdgeText";const AQn=T.memo(mG);function ix({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c,interactionWidth:u=20,...h}){return _.jsxs(_.Fragment,{children:[_.jsx("path",{...h,d:e,fill:"none",className:ds(["react-flow__edge-path",h.className])}),u?_.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&mo(n)&&mo(t)?_.jsx(AQn,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c}):null]})}function mO({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===Rt.Left||e===Rt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function gG({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top}){const[a,o]=mO({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,u]=mO({pos:i,x1:r,y1:s,x2:e,y2:n}),[h,f,p,m]=PU({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}`,h,f,p,m]}function vG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a,targetPosition:o,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:b})=>{const[y,x,C]=gG({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),N=e.isInternal?void 0:n;return _.jsx(ix,{id:N,path:y,labelX:x,labelY:C,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:b})})}const TQn=vG({isInternal:!1}),bG=vG({isInternal:!0});TQn.displayName="SimpleBezierEdge";bG.displayName="SimpleBezierEdgeInternal";function yG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,sourcePosition:m=Rt.Bottom,targetPosition:w=Rt.Top,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:y})=>{const[x,C,N]=Rk({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:w,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset,stepPosition:b==null?void 0:b.stepPosition}),j=e.isInternal?void 0:n;return _.jsx(ix,{id:j,path:x,labelX:C,labelY:N,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,markerEnd:k,markerStart:v,interactionWidth:y})})}const xG=yG({isInternal:!1}),wG=yG({isInternal:!0});xG.displayName="SmoothStepEdge";wG.displayName="SmoothStepEdgeInternal";function kG(e){return T.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return _.jsx(xG,{...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=kG({isInternal:!1}),SG=kG({isInternal:!0});RQn.displayName="StepEdge";SG.displayName="StepEdgeInternal";function CG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:w,interactionWidth:k})=>{const[v,b,y]=qU({sourceX:t,sourceY:r,targetX:s,targetY:i}),x=e.isInternal?void 0:n;return _.jsx(ix,{id:x,path:v,labelX:b,labelY:y,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:w,interactionWidth:k})})}const MQn=CG({isInternal:!1}),EG=CG({isInternal:!0});MQn.displayName="StraightEdge";EG.displayName="StraightEdgeInternal";function NG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=Rt.Bottom,targetPosition:o=Rt.Top,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:y})=>{const[x,C,N]=FU({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:b==null?void 0:b.curvature}),j=e.isInternal?void 0:n;return _.jsx(ix,{id:j,path:x,labelX:C,labelY:N,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:y})})}const OQn=NG({isInternal:!1}),zG=NG({isInternal:!0});OQn.displayName="BezierEdge";zG.displayName="BezierEdgeInternal";const gO={default:zG,straight:EG,step:SG,smoothstep:wG,simplebezier:bG},vO={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},DQn=(e,n,t)=>t===Rt.Left?e-n:t===Rt.Right?e+n:e,LQn=(e,n,t)=>t===Rt.Top?e-n:t===Rt.Bottom?e+n:e,bO="react-flow__edgeupdater";function yO({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:ds([bO,`${bO}-${o}`]),cx:DQn(n,r,e),cy:LQn(t,r,e),r,stroke:"transparent",fill:"transparent"})}function IQn({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:c,onReconnect:u,onReconnectStart:h,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){const w=Ar(),k=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:j,domNode:A,connectionMode:z,connectionRadius:M,lib:D,onConnectStart:I,cancelConnection:B,nodeLookup:G,rfId:q,panBy:Q,updateConnection:K}=w.getState(),Z=N.type==="target",J=(F,U)=>{p(!1),f==null||f(F,t,N.type,U)},$=F=>u==null?void 0:u(t,F),L=(F,U)=>{p(!0),h==null||h(C,t,N.type),I==null||I(F,U)};Dk.onPointerDown(C.nativeEvent,{autoPanOnConnect:j,connectionMode:z,connectionRadius:M,domNode:A,handleId:N.id,nodeId:N.nodeId,nodeLookup:G,isTarget:Z,edgeUpdaterType:N.type,lib:D,flowId:q,cancelConnection:B,panBy:Q,isValidConnection:(...F)=>{var U,H;return((H=(U=w.getState()).isValidConnection)==null?void 0:H.call(U,...F))??!0},onConnect:$,onConnectStart:L,onConnectEnd:(...F)=>{var U,H;return(H=(U=w.getState()).onConnectEnd)==null?void 0:H.call(U,...F)},onReconnectEnd:J,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"}),b=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),y=()=>m(!0),x=()=>m(!1);return _.jsxs(_.Fragment,{children:[(e===!0||e==="source")&&_.jsx(yO,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:y,onMouseOut:x,type:"source"}),(e===!0||e==="target")&&_.jsx(yO,{position:c,centerX:i,centerY:a,radius:n,onMouseDown:b,onMouseEnter:y,onMouseOut:x,type:"target"})]})}function $Qn({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,reconnectRadius:h,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:w,edgeTypes:k,noPanClassName:v,onError:b,disableKeyboardA11y:y}){let x=$n(ve=>ve.edgeLookup.get(e));const C=$n(ve=>ve.defaultEdgeOptions);x=C?{...C,...x}:x;let N=x.type||"default",j=(k==null?void 0:k[N])||gO[N];j===void 0&&(b==null||b("011",wo.error011(N)),N="default",j=(k==null?void 0:k.default)||gO.default);const A=!!(x.focusable||n&&typeof x.focusable>"u"),z=typeof f<"u"&&(x.reconnectable||t&&typeof x.reconnectable>"u"),M=!!(x.selectable||r&&typeof x.selectable>"u"),D=T.useRef(null),[I,B]=T.useState(!1),[G,q]=T.useState(!1),Q=Ar(),{zIndex:K=x.zIndex,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:F,targetPosition:U}=$n(T.useCallback(ve=>{const Re=ve.nodeLookup.get(x.source),Fe=ve.nodeLookup.get(x.target);if(!Re||!Fe)return vO;const Xe=jKn({id:e,sourceNode:Re,targetNode:Fe,sourceHandle:x.sourceHandle||null,targetHandle:x.targetHandle||null,connectionMode:ve.connectionMode,onError:b}),Te=xKn({selected:x.selected,zIndex:x.zIndex,sourceNode:Re,targetNode:Fe,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode});return{...Xe||vO,zIndex:Te}},[x.source,x.target,x.sourceHandle,x.targetHandle,x.selected,x.zIndex]),zr),H=T.useMemo(()=>x.markerStart?`url('#${Mk(x.markerStart,w)}')`:void 0,[x.markerStart,w]),ae=T.useMemo(()=>x.markerEnd?`url('#${Mk(x.markerEnd,w)}')`:void 0,[x.markerEnd,w]);if(x.hidden||Z===null||J===null||$===null||L===null)return null;const ie=ve=>{var Te;const{addSelectedEdges:Re,unselectNodesAndEdges:Fe,multiSelectionActive:Xe}=Q.getState();M&&(Q.setState({nodesSelectionActive:!1}),x.selected&&Xe?(Fe({nodes:[],edges:[x]}),(Te=D.current)==null||Te.blur()):Re([e])),s&&s(ve,x)},ue=i?ve=>{i(ve,{...x})}:void 0,re=a?ve=>{a(ve,{...x})}:void 0,V=o?ve=>{o(ve,{...x})}:void 0,oe=c?ve=>{c(ve,{...x})}:void 0,ce=u?ve=>{u(ve,{...x})}:void 0,me=ve=>{var Re;if(!y&&CU.includes(ve.key)&&M){const{unselectNodesAndEdges:Fe,addSelectedEdges:Xe}=Q.getState();ve.key==="Escape"?((Re=D.current)==null||Re.blur(),Fe({edges:[x]})):Xe([e])}};return _.jsx("svg",{style:{zIndex:K},children:_.jsxs("g",{className:ds(["react-flow__edge",`react-flow__edge-${N}`,x.className,v,{selected:x.selected,animated:x.animated,inactive:!M&&!s,updating:I,selectable:M}]),onClick:ie,onDoubleClick:ue,onContextMenu:re,onMouseEnter:V,onMouseMove:oe,onMouseLeave:ce,onKeyDown:A?me:void 0,tabIndex:A?0:void 0,role:x.ariaRole??(A?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":x.ariaLabel===null?void 0:x.ariaLabel||`Edge from ${x.source} to ${x.target}`,"aria-describedby":A?`${sG}-${w}`:void 0,ref:D,...x.domAttributes,children:[!G&&_.jsx(j,{id:e,source:x.source,target:x.target,type:x.type,selected:x.selected,animated:x.animated,selectable:M,deletable:x.deletable??!0,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:F,targetPosition:U,data:x.data,style:x.style,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerStart:H,markerEnd:ae,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth}),z&&_.jsx(IQn,{edge:x,isReconnectable:z,reconnectRadius:h,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:F,targetPosition:U,setUpdateHover:B,setReconnecting:q})]})})}var BQn=T.memo($Qn);const PQn=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function jG({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:h,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:y,onError:x}=$n(PQn,zr),C=SQn(n);return _.jsxs("div",{className:"react-flow__edges",children:[_.jsx(jQn,{defaultColor:e,rfId:t}),C.map(N=>_.jsx(BQn,{id:N,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:y,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,onClick:h,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,rfId:t,onError:x,edgeTypes:r,disableKeyboardA11y:k},N))]})}jG.displayName="EdgeRenderer";const FQn=T.memo(jG),HQn=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function qQn({children:e}){const n=$n(HQn);return _.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function UQn(e){const n=e7(),t=T.useRef(!1);T.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const GQn=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function VQn(e){const n=$n(GQn),t=Ar();return T.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function KQn(e){return e.connection.inProgress?{...e.connection,to:Jm(e.connection.to,e.transform)}:{...e.connection}}function WQn(e){return KQn}function QQn(e){const n=WQn();return $n(n,zr)}const XQn=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function YQn({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:c}=$n(XQn,zr);return!(i&&s&&c)?null:_.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:_.jsx("g",{className:ds(["react-flow__connection",zU(o)]),children:_.jsx(AG,{style:n,type:t,CustomComponent:r,isValid:o})})})}const AG=({style:e,type:n=xu.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:c,to:u,toNode:h,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:zU(r),toNode:h,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 xu.Bezier:[w]=FU(k);break;case xu.SimpleBezier:[w]=gG(k);break;case xu.Step:[w]=Rk({...k,borderRadius:0});break;case xu.SmoothStep:[w]=Rk(k);break;default:[w]=qU(k)}return _.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};AG.displayName="ConnectionLine";const ZQn={};function xO(e=ZQn){T.useRef(e),Ar(),T.useEffect(()=>{},[e])}function JQn(){Ar(),T.useRef(!1),T.useEffect(()=>{},[])}function TG({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:w,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:y,selectionOnDrag:x,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:j,zoomActivationKeyCode:A,deleteKeyCode:z,onlyRenderVisibleElements:M,elementsSelectable:D,defaultViewport:I,translateExtent:B,minZoom:G,maxZoom:q,preventScrolling:Q,defaultMarkerColor:K,zoomOnScroll:Z,zoomOnPinch:J,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:F,zoomOnDoubleClick:U,panOnDrag:H,autoPanOnSelection:ae,onPaneClick:ie,onPaneMouseEnter:ue,onPaneMouseMove:re,onPaneMouseLeave:V,onPaneScroll:oe,onPaneContextMenu:ce,paneClickDistance:me,nodeClickDistance:ve,onEdgeContextMenu:Re,onEdgeMouseEnter:Fe,onEdgeMouseMove:Xe,onEdgeMouseLeave:Te,reconnectRadius:$e,onReconnect:wt,onReconnectStart:ot,onReconnectEnd:Mt,noDragClassName:jt,noWheelClassName:Ft,noPanClassName:Le,disableKeyboardA11y:tt,nodeExtent:ke,rfId:ge,viewport:Ne,onViewportChange:qe}){return xO(e),xO(n),JQn(),UQn(t),VQn(Ne),_.jsx(hQn,{onPaneClick:ie,onPaneMouseEnter:ue,onPaneMouseMove:re,onPaneMouseLeave:V,onPaneContextMenu:ce,onPaneScroll:oe,paneClickDistance:me,deleteKeyCode:z,selectionKeyCode:y,selectionOnDrag:x,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:j,zoomActivationKeyCode:A,elementsSelectable:D,zoomOnScroll:Z,zoomOnPinch:J,zoomOnDoubleClick:U,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:F,panOnDrag:H,autoPanOnSelection:ae,defaultViewport:I,translateExtent:B,minZoom:G,maxZoom:q,onSelectionContextMenu:f,preventScrolling:Q,noDragClassName:jt,noWheelClassName:Ft,noPanClassName:Le,disableKeyboardA11y:tt,onViewportChange:qe,isControlledViewport:!!Ne,children:_.jsxs(qQn,{children:[_.jsx(FQn,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:wt,onReconnectStart:ot,onReconnectEnd:Mt,onlyRenderVisibleElements:M,onEdgeContextMenu:Re,onEdgeMouseEnter:Fe,onEdgeMouseMove:Xe,onEdgeMouseLeave:Te,reconnectRadius:$e,defaultMarkerColor:K,noPanClassName:Le,disableKeyboardA11y:tt,rfId:ge}),_.jsx(YQn,{style:k,type:w,component:v,containerStyle:b}),_.jsx("div",{className:"react-flow__edgelabel-renderer"}),_.jsx(kQn,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,nodeClickDistance:ve,onlyRenderVisibleElements:M,noPanClassName:Le,noDragClassName:jt,disableKeyboardA11y:tt,nodeExtent:ke,rfId:ge}),_.jsx("div",{className:"react-flow__viewport-portal"})]})})}TG.displayName="GraphView";const eXn=T.memo(TG),tXn=OU(),wO=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c=.5,maxZoom:u=2,nodeOrigin:h,nodeExtent:f,zIndexMode:p="basic"}={})=>{const m=new Map,w=new Map,k=new Map,v=new Map,b=r??n??[],y=t??e??[],x=h??[0,0],C=f??om;VU(k,v,b);const{nodesInitialized:N}=Ok(y,m,w,{nodeOrigin:x,nodeExtent:C,zIndexMode:p});let j=[0,0,1];if(a&&s&&i){const A=Ym(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:z,y:M,zoom:D}=KC(A,s,i,c,u,(o==null?void 0:o.padding)??.1);j=[z,M,D]}return{rfId:"1",width:s??0,height:i??0,transform:j,nodes:y,nodesInitialized:N,nodeLookup:m,parentLookup:w,edges:b,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:om,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:qh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,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:{...NU},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:tXn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:EU,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},nXn=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:f,zIndexMode:p})=>fWn((m,w)=>{async function k(){const{nodeLookup:v,panZoom:b,fitViewOptions:y,fitViewResolver:x,width:C,height:N,minZoom:j,maxZoom:A}=w();b&&(await hKn({nodes:v,width:C,height:N,panZoom:b,minZoom:j,maxZoom:A},y),x==null||x.resolve(!0),m({fitViewResolver:null}))}return{...wO({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:f,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:y,nodeOrigin:x,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:j,nodesSelectionActive:A}=w(),{nodesInitialized:z,hasSelectedNodes:M}=Ok(v,b,y,{nodeOrigin:x,nodeExtent:f,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:j}),D=A&&M;N&&z?(k(),m({nodes:v,nodesInitialized:z,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):m({nodes:v,nodesInitialized:z,nodesSelectionActive:D})},setEdges:v=>{const{connectionLookup:b,edgeLookup:y}=w();VU(b,y,v),m({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:y}=w();y(v),m({hasDefaultNodes:!0})}if(b){const{setEdges:y}=w();y(b),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:y,parentLookup:x,domNode:C,nodeOrigin:N,nodeExtent:j,debug:A,fitViewQueued:z,zIndexMode:M}=w(),{changes:D,updatedInternals:I}=IKn(v,y,x,C,N,j,M);I&&(MKn(y,x,{nodeOrigin:N,nodeExtent:j,zIndexMode:M}),z?(k(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(D==null?void 0:D.length)>0&&(A&&console.log("React Flow: trigger node changes",D),b==null||b(D)))},updateNodePositions:(v,b=!1)=>{const y=[];let x=[];const{nodeLookup:C,triggerNodeChanges:N,connection:j,updateConnection:A,onNodesChangeMiddlewareMap:z}=w();for(const[M,D]of v){const I=C.get(M),B=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(D!=null&&D.position)),G={id:M,type:"position",position:B?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:b};if(I&&j.inProgress&&j.fromNode.id===I.id){const q=Nf(I,j.fromHandle,Rt.Left,!0);A({...j,from:q})}B&&I.parentId&&y.push({id:M,parentId:I.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),x.push(G)}if(y.length>0){const{parentLookup:M,nodeOrigin:D}=w(),I=JC(y,C,M,D);x.push(...I)}for(const M of z.values())x=M(x);N(x)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:y,nodes:x,hasDefaultNodes:C,debug:N}=w();if(v!=null&&v.length){if(C){const j=MWn(v,x);y(j)}N&&console.log("React Flow: trigger node changes",v),b==null||b(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:y,edges:x,hasDefaultEdges:C,debug:N}=w();if(v!=null&&v.length){if(C){const j=OWn(v,x);y(j)}N&&console.log("React Flow: trigger edge changes",v),b==null||b(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:y,nodeLookup:x,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(b){const j=v.map(A=>I_(A,!0));C(j);return}C(Vd(x,new Set([...v]),!0)),N(Vd(y))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:y,nodeLookup:x,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(b){const j=v.map(A=>I_(A,!0));N(j);return}N(Vd(y,new Set([...v]))),C(Vd(x,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:y,nodes:x,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:j}=w(),A=v||x,z=b||y,M=[];for(const I of A){if(!I.selected)continue;const B=C.get(I.id);B&&(B.selected=!1),M.push(I_(I.id,!1))}const D=[];for(const I of z)I.selected&&D.push(I_(I.id,!1));N(M),j(D)},setMinZoom:v=>{const{panZoom:b,maxZoom:y}=w();b==null||b.setScaleExtent([v,y]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:y}=w();b==null||b.setScaleExtent([y,v]),m({maxZoom:v})},setTranslateExtent:v=>{var b;(b=w().panZoom)==null||b.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:y,triggerEdgeChanges:x,elementsSelectable:C}=w();if(!C)return;const N=b.reduce((A,z)=>z.selected?[...A,I_(z.id,!1)]:A,[]),j=v.reduce((A,z)=>z.selected?[...A,I_(z.id,!1)]:A,[]);y(N),x(j)},setNodeExtent:v=>{const{nodes:b,nodeLookup:y,parentLookup:x,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:j,zIndexMode:A}=w();v[0][0]===j[0][0]&&v[0][1]===j[0][1]&&v[1][0]===j[1][0]&&v[1][1]===j[1][1]||(Ok(b,y,x,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:A}),m({nodeExtent:v}))},panBy:v=>{const{transform:b,width:y,height:x,panZoom:C,translateExtent:N}=w();return $Kn({delta:v,panZoom:C,transform:b,translateExtent:N,width:y,height:x})},setCenter:async(v,b,y)=>{const{width:x,height:C,maxZoom:N,panZoom:j}=w();if(!j)return!1;const A=typeof(y==null?void 0:y.zoom)<"u"?y.zoom:N;return await j.setViewport({x:x/2-v*A,y:C/2-b*A,zoom:A},{duration:y==null?void 0:y.duration,ease:y==null?void 0:y.ease,interpolate:y==null?void 0:y.interpolate}),!0},cancelConnection:()=>{m({connection:{...NU}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...wO()})}},Object.is);function rXn({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:c,fitView:u,nodeOrigin:h,nodeExtent:f,zIndexMode:p,children:m}){const[w]=T.useState(()=>nXn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:c,nodeOrigin:h,nodeExtent:f,zIndexMode:p}));return _.jsx(dWn,{value:w,children:_.jsx(PWn,{children:_.jsx(tQn,{children:m})})})}function sXn({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:c,minZoom:u,maxZoom:h,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return T.useContext(nx)?_.jsx(_.Fragment,{children:e}):_.jsx(rXn,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:h,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const iXn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function aXn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:c,onInit:u,onMove:h,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:y,onNodeMouseMove:x,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:j,onNodeDragStart:A,onNodeDrag:z,onNodeDragStop:M,onNodesDelete:D,onEdgesDelete:I,onDelete:B,onSelectionChange:G,onSelectionDragStart:q,onSelectionDrag:Q,onSelectionDragStop:K,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:$,onBeforeDelete:L,connectionMode:F,connectionLineType:U=xu.Bezier,connectionLineStyle:H,connectionLineComponent:ae,connectionLineContainerStyle:ie,deleteKeyCode:ue="Backspace",selectionKeyCode:re="Shift",selectionOnDrag:V=!1,selectionMode:oe=cm.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:me=um()?"Meta":"Control",zoomActivationKeyCode:ve=um()?"Meta":"Control",snapToGrid:Re,snapGrid:Fe,onlyRenderVisibleElements:Xe=!1,selectNodesOnDrag:Te,nodesDraggable:$e,autoPanOnNodeFocus:wt,nodesConnectable:ot,nodesFocusable:Mt,nodeOrigin:jt=iG,edgesFocusable:Ft,edgesReconnectable:Le,elementsSelectable:tt=!0,defaultViewport:ke=EWn,minZoom:ge=.5,maxZoom:Ne=2,translateExtent:qe=om,preventScrolling:nt=!0,nodeExtent:ht,defaultMarkerColor:rt="#b1b1b7",zoomOnScroll:qt=!0,zoomOnPinch:Xt=!0,panOnScroll:Jt=!1,panOnScrollSpeed:an=.5,panOnScrollMode:At=lf.Free,zoomOnDoubleClick:bn=!0,panOnDrag:on=!0,onPaneClick:Ot,onPaneMouseEnter:hn,onPaneMouseMove:cn,onPaneMouseLeave:Sn,onPaneScroll:Vn,onPaneContextMenu:hs,paneClickDistance:es=1,nodeClickDistance:bt=0,children:ln,onReconnect:xn,onReconnectStart:un,onReconnectEnd:ur,onEdgeContextMenu:Rn,onEdgeDoubleClick:Kn,onEdgeMouseEnter:rr,onEdgeMouseMove:St,onEdgeMouseLeave:It,reconnectRadius:ir=10,onNodesChange:ar,onEdgesChange:Tr,noDragClassName:sr="nodrag",noWheelClassName:Bn="nowheel",noPanClassName:Br="nopan",fitView:Ds,fitViewOptions:Pr,connectOnClick:Us,attributionPosition:We,proOptions:ft,defaultEdgeOptions:Pn,elevateNodesOnSelect:Wn=!0,elevateEdgesOnSelect:Ln=!1,disableKeyboardA11y:En=!1,autoPanOnConnect:Rr,autoPanOnNodeDrag:_n,autoPanOnSelection:So=!0,autoPanSpeed:ci,connectionRadius:Ls,isValidConnection:Fr,onError:n_,style:Co,id:Eo,nodeDragThreshold:Gs,connectionDragThreshold:Vs,viewport:Wi,onViewportChange:Ks,width:or,height:Si,colorMode:Ct="light",debug:Na,onScroll:ts,ariaLabelConfig:Ws,zIndexMode:ut="basic",...Pt},li){const Ci=Eo||"1",Ei=AWn(Ct),Mr=T.useCallback(ui=>{ui.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),ts==null||ts(ui)},[ts]);return _.jsx("div",{"data-testid":"rf__wrapper",...Pt,onScroll:Mr,style:{...Co,...iXn},ref:li,className:ds(["react-flow",s,Ei]),id:Eo,role:"application",children:_.jsxs(sXn,{nodes:e,edges:n,width:or,height:Si,fitView:Ds,fitViewOptions:Pr,minZoom:ge,maxZoom:Ne,nodeOrigin:jt,nodeExtent:ht,zIndexMode:ut,children:[_.jsx(jWn,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:$e,autoPanOnNodeFocus:wt,nodesConnectable:ot,nodesFocusable:Mt,edgesFocusable:Ft,edgesReconnectable:Le,elementsSelectable:tt,elevateNodesOnSelect:Wn,elevateEdgesOnSelect:Ln,minZoom:ge,maxZoom:Ne,nodeExtent:ht,onNodesChange:ar,onEdgesChange:Tr,snapToGrid:Re,snapGrid:Fe,connectionMode:F,translateExtent:qe,connectOnClick:Us,defaultEdgeOptions:Pn,fitView:Ds,fitViewOptions:Pr,onNodesDelete:D,onEdgesDelete:I,onDelete:B,onNodeDragStart:A,onNodeDrag:z,onNodeDragStop:M,onSelectionDrag:Q,onSelectionDragStart:q,onSelectionDragStop:K,onMove:h,onMoveStart:f,onMoveEnd:p,noPanClassName:Br,nodeOrigin:jt,rfId:Ci,autoPanOnConnect:Rr,autoPanOnNodeDrag:_n,autoPanSpeed:ci,onError:n_,connectionRadius:Ls,isValidConnection:Fr,selectNodesOnDrag:Te,nodeDragThreshold:Gs,connectionDragThreshold:Vs,onBeforeDelete:L,debug:Na,ariaLabelConfig:Ws,zIndexMode:ut}),_.jsx(eXn,{onInit:u,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:y,onNodeMouseMove:x,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:j,nodeTypes:i,edgeTypes:a,connectionLineType:U,connectionLineStyle:H,connectionLineComponent:ae,connectionLineContainerStyle:ie,selectionKeyCode:re,selectionOnDrag:V,selectionMode:oe,deleteKeyCode:ue,multiSelectionKeyCode:me,panActivationKeyCode:ce,zoomActivationKeyCode:ve,onlyRenderVisibleElements:Xe,defaultViewport:ke,translateExtent:qe,minZoom:ge,maxZoom:Ne,preventScrolling:nt,zoomOnScroll:qt,zoomOnPinch:Xt,zoomOnDoubleClick:bn,panOnScroll:Jt,panOnScrollSpeed:an,panOnScrollMode:At,panOnDrag:on,autoPanOnSelection:So,onPaneClick:Ot,onPaneMouseEnter:hn,onPaneMouseMove:cn,onPaneMouseLeave:Sn,onPaneScroll:Vn,onPaneContextMenu:hs,paneClickDistance:es,nodeClickDistance:bt,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:$,onReconnect:xn,onReconnectStart:un,onReconnectEnd:ur,onEdgeContextMenu:Rn,onEdgeDoubleClick:Kn,onEdgeMouseEnter:rr,onEdgeMouseMove:St,onEdgeMouseLeave:It,reconnectRadius:ir,defaultMarkerColor:rt,noDragClassName:sr,noWheelClassName:Bn,noPanClassName:Br,rfId:Ci,disableKeyboardA11y:En,nodeExtent:ht,viewport:Wi,onViewportChange:Ks}),_.jsx(CWn,{onSelectionChange:G}),ln,_.jsx(yWn,{proOptions:ft,position:We}),_.jsx(bWn,{rfId:Ci,disableKeyboardA11y:En})]})})}var oXn=oG(aXn);function cXn({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:ds(["react-flow__background-pattern",t,r])})}function lXn({radius:e,className:n}){return _.jsx("circle",{cx:e,cy:e,r:e,className:ds(["react-flow__background-pattern","dots",n])})}var gl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(gl||(gl={}));const uXn={[gl.Dots]:1,[gl.Lines]:1,[gl.Cross]:6},_Xn=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function RG({id:e,variant:n=gl.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:c,className:u,patternClassName:h}){const f=T.useRef(null),{transform:p,patternId:m}=$n(_Xn,zr),w=r||uXn[n],k=n===gl.Dots,v=n===gl.Cross,b=Array.isArray(t)?t:[t,t],y=[b[0]*p[2]||1,b[1]*p[2]||1],x=w*p[2],C=Array.isArray(i)?i:[i,i],N=v?[x,x]:y,j=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],A=`${m}${e||""}`;return _.jsxs("svg",{className:ds(["react-flow__background",u]),style:{...c,...sx,"--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]%y[0],y:p[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${j[0]},-${j[1]})`,children:k?_.jsx(lXn,{radius:x/2,className:h}):_.jsx(cXn,{dimensions:N,lineWidth:s,variant:n,className:h})}),_.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${A})`})]})}RG.displayName="Background";const fXn=T.memo(RG);function dXn(){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 hXn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:_.jsx("path",{d:"M0 0h32v4.2H0z"})})}function pXn(){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 mXn(){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 gXn(){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 G1({children:e,className:n,...t}){return _.jsx("button",{type:"button",className:ds(["react-flow__controls-button",n]),...t,children:e})}const vXn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function MG({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:c,className:u,children:h,position:f="bottom-left",orientation:p="vertical","aria-label":m}){const w=Ar(),{isInteractive:k,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:y}=$n(vXn,zr),{zoomIn:x,zoomOut:C,fitView:N}=e7(),j=()=>{x(),i==null||i()},A=()=>{C(),a==null||a()},z=()=>{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(rx,{className:ds(["react-flow__controls",D,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":m??y["controls.ariaLabel"],children:[n&&_.jsxs(_.Fragment,{children:[_.jsx(G1,{onClick:j,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:b,children:_.jsx(dXn,{})}),_.jsx(G1,{onClick:A,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:v,children:_.jsx(hXn,{})})]}),t&&_.jsx(G1,{className:"react-flow__controls-fitview",onClick:z,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:_.jsx(pXn,{})}),r&&_.jsx(G1,{className:"react-flow__controls-interactive",onClick:M,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:k?_.jsx(gXn,{}):_.jsx(mXn,{})}),h]})}MG.displayName="Controls";T.memo(MG);function bXn({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:c,className:u,borderRadius:h,shapeRendering:f,selected:p,onClick:m}){const{background:w,backgroundColor:k}=i||{},v=a||w||k;return _.jsx("rect",{className:ds(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:h,ry:h,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:c},shapeRendering:f,onClick:m?b=>m(b,e):void 0})}const yXn=T.memo(bXn),xXn=e=>e.nodes.map(n=>n.id),U4=e=>e instanceof Function?e:()=>e;function wXn({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=yXn,onClick:a}){const o=$n(xXn,zr),c=U4(n),u=U4(e),h=U4(t),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return _.jsx(_.Fragment,{children:o.map(p=>_.jsx(SXn,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:f},p))})}function kXn({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:c}){const{node:u,x:h,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:b,y}=k.internals.positionAbsolute,{width:x,height:C}=zl(v);return{node:v,x:b,y,width:x,height:C}},zr);return!u||u.hidden||!DU(u)?null:_.jsx(o,{x:h,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 SXn=T.memo(kXn);var CXn=T.memo(wXn);const EXn=200,NXn=150,zXn=e=>!e.hidden,jXn=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?RU(Ym(e.nodeLookup,{filter:zXn}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},AXn="react-flow__minimap-desc";function OG({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:c,maskColor:u,maskStrokeColor:h,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:w,pannable:k=!1,zoomable:v=!1,ariaLabel:b,inversePan:y,zoomStep:x=1,offsetScale:C=5}){const N=Ar(),j=T.useRef(null),{boundingRect:A,viewBB:z,rfId:M,panZoom:D,translateExtent:I,flowWidth:B,flowHeight:G,ariaLabelConfig:q}=$n(jXn,zr),Q=(e==null?void 0:e.width)??EXn,K=(e==null?void 0:e.height)??NXn,Z=A.width/Q,J=A.height/K,$=Math.max(Z,J),L=$*Q,F=$*K,U=C*$,H=A.x-(L-A.width)/2-U,ae=A.y-(F-A.height)/2-U,ie=L+U*2,ue=F+U*2,re=`${AXn}-${M}`,V=T.useRef(0),oe=T.useRef();V.current=$,T.useEffect(()=>{if(j.current&&D)return oe.current=KKn({domNode:j.current,panZoom:D,getTransform:()=>N.getState().transform,getViewScale:()=>V.current}),()=>{var Re;(Re=oe.current)==null||Re.destroy()}},[D]),T.useEffect(()=>{var Re;(Re=oe.current)==null||Re.update({translateExtent:I,width:B,height:G,inversePan:y,pannable:k,zoomStep:x,zoomable:v})},[k,v,y,x,I,B,G]);const ce=m?Re=>{var Te;const[Fe,Xe]=((Te=oe.current)==null?void 0:Te.pointer(Re))||[0,0];m(Re,{x:Fe,y:Xe})}:void 0,me=w?T.useCallback((Re,Fe)=>{const Xe=N.getState().nodeLookup.get(Fe).internals.userNode;w(Re,Xe)},[]):void 0,ve=b??q["minimap.ariaLabel"];return _.jsx(rx,{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 h=="string"?h: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:ds(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:_.jsxs("svg",{width:Q,height:K,viewBox:`${H} ${ae} ${ie} ${ue}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":re,ref:j,onClick:ce,children:[ve&&_.jsx("title",{id:re,children:ve}),_.jsx(CXn,{onClick:me,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),_.jsx("path",{className:"react-flow__minimap-mask",d:`M${H-U},${ae-U}h${ie+U*2}v${ue+U*2}h${-ie-U*2}z - M${z.x},${z.y}h${z.width}v${z.height}h${-z.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}OG.displayName="MiniMap";T.memo(OG);const TXn=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,RXn={[Vh.Line]:"right",[Vh.Handle]:"bottom-right"};function MXn({nodeId:e,position:n,variant:t=Vh.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:w,onResizeStart:k,onResize:v,onResizeEnd:b}){const y=_G(),x=typeof e=="string"?e:y,C=Ar(),N=T.useRef(null),j=t===Vh.Handle,A=$n(T.useCallback(TXn(j&&m),[j,m]),zr),z=T.useRef(null),M=n??RXn[t];T.useEffect(()=>{if(!(!N.current||!x))return z.current||(z.current=aWn({domNode:N.current,nodeId:x,getStoreItems:()=>{const{nodeLookup:I,transform:B,snapGrid:G,snapToGrid:q,nodeOrigin:Q,domNode:K}=C.getState();return{nodeLookup:I,transform:B,snapGrid:G,snapToGrid:q,nodeOrigin:Q,paneDomNode:K}},onChange:(I,B)=>{const{triggerNodeChanges:G,nodeLookup:q,parentLookup:Q,nodeOrigin:K}=C.getState(),Z=[],J={x:I.x,y:I.y},$=q.get(x);if($&&$.expandParent&&$.parentId){const L=$.origin??K,F=I.width??$.measured.width??0,U=I.height??$.measured.height??0,H={id:$.id,parentId:$.parentId,rect:{width:F,height:U,...LU({x:I.x??$.position.x,y:I.y??$.position.y},{width:F,height:U},$.parentId,q,L)}},ae=JC([H],q,Q,K);Z.push(...ae),J.x=I.x?Math.max(L[0]*F,I.x):void 0,J.y=I.y?Math.max(L[1]*U,I.y):void 0}if(J.x!==void 0&&J.y!==void 0){const L={id:x,type:"position",position:{...J}};Z.push(L)}if(I.width!==void 0&&I.height!==void 0){const F={id:x,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};Z.push(F)}for(const L of B){const F={...L,type:"position"};Z.push(F)}G(Z)},onEnd:({width:I,height:B})=>{const G={id:x,type:"dimensions",resizing:!1,dimensions:{width:I,height:B}};C.getState().triggerNodeChanges([G])}})),z.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:c,maxWidth:u,maxHeight:h},keepAspectRatio:f,resizeDirection:p,onResizeStart:k,onResize:v,onResizeEnd:b,shouldResize:w}),()=>{var I;(I=z.current)==null||I.destroy()}},[M,o,c,u,h,f,k,v,b,w]);const D=M.split("-");return _.jsx("div",{className:ds(["react-flow__resize-control","nodrag",...D,t,r]),ref:N,style:{...s,scale:A,...a&&{[j?"backgroundColor":"borderColor"]:a}},children:i})}T.memo(MXn);function OXn(){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 V1=8;function DXn(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=T.useState({viewWidth:0,viewHeight:0});T.useEffect(()=>{function h(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",h),h(),()=>window.removeEventListener("resize",h)},[]);let o=0,c=0,u=0;if(e){const{distance:h}=e;switch(e.anchor){case"left":o=e.x-t-h,c=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+h,c=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,c=e.y+e.height+h;break;case"above":o=e.x+e.width/2-t/2,c=e.y-r-h;break}const f=o,p=c;o=Math.min(Math.max(o,V1),i-t-V1),c=Math.min(Math.max(c,V1),s-r-V1),u=e.anchor==="left"||e.anchor==="right"?p-c:f-o}return{x:o,y:c,arrowAdjustment:u}}const G4=380,V4=12,LXn=350,IXn=150,Ik=new EventTarget;function $Xn(){Ik.dispatchEvent(new Event("move"))}function BXn(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 Ik.addEventListener("move",u),()=>{Ik.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),T.useEffect(()=>{r(u=>{var f;if(!u)return u;const h=((f=e.current)==null?void 0:f.getBoundingClientRect())??null;return h&&u.x===h.x&&u.y===h.y&&u.width===h.width&&u.height===h.height?u:h})},[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)},LXn)},[e]),o=T.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),IXn)},[]),c=T.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:c}}function PXn(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=OXn(),h=s.right+V4+G4<=window.innerWidth,f=s.x-V4-G4>=0,p=h?"right":f?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:w}=DXn({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:V4},u),k=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:v}=_t({...x9n(k??""),enabled:!!k,subscribed:!!k}),b=T.useMemo(()=>{if(!v)return null;const B=v;let G=B.diff;if(B.truncated){const Z=G.lastIndexOf(` +`)),h=u.reduce((f,p)=>f.concat(...p),[]);return[u,h]}return[[],[]]},[e]);return T.useEffect(()=>{const c=(n==null?void 0:n.target)??mO,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const h=m=>{var v,b;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&YU(m))return!1;const k=vO(m.code,o);if(i.current.add(m[k]),gO(a,i.current,!1)){const y=((b=(v=m.composedPath)==null?void 0:v.call(m))==null?void 0:b[0])||m.target,x=(y==null?void 0:y.nodeName)==="BUTTON"||(y==null?void 0:y.nodeName)==="A";n.preventDefault!==!1&&(s.current||!x)&&m.preventDefault(),r(!0)}},f=m=>{const w=vO(m.code,o);gO(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",h),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function gO(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function vO(e,n){return n.includes(e)?"code":"key"}const nXn=()=>{const e=Mr();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=o7(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},h=t.snapGrid??s,f=t.snapToGrid??i;return Jm(u,r,f,h)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=Uh(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)rXn(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 rXn(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 sXn(e,n){return bG(e,n)}function iXn(e,n){return bG(e,n)}function L_(e,n){return{id:e,type:"select",selected:n}}function Gd(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(L_(i.id,a)))}return r}function bO({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 yO(e){return{id:e.id,type:"remove"}}const aXn=VU();function oXn(e,n,t={}){return XWn(e,n,{...t,onError:t.onError??aXn})}const xO=e=>DWn(e),cXn=e=>HU(e);function yG(e){return T.forwardRef(e)}const lXn=typeof window<"u"?T.useLayoutEffect:T.useEffect;function wO(e){const[n,t]=T.useState(BigInt(0)),[r]=T.useState(()=>uXn(()=>t(s=>s+BigInt(1))));return lXn(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function uXn(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const xG=T.createContext(null);function _Xn({children:e}){const n=Mr(),t=T.useCallback(o=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:h,onNodesChange:f,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:w}=n.getState();let k=c;for(const b of o)k=typeof b=="function"?b(k):b;let v=bO({items:k,lookup:p});for(const b of w.values())v=b(v);h&&u(k),v.length>0?f==null||f(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:y,setNodes:x}=n.getState();b&&x(y)})},[]),r=wO(t),s=T.useCallback(o=>{const{edges:c=[],setEdges:u,hasDefaultEdges:h,onEdgesChange:f,edgeLookup:p}=n.getState();let m=c;for(const w of o)m=typeof w=="function"?w(m):w;h?u(m):f&&f(bO({items:m,lookup:p}))},[]),i=wO(s),a=T.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return _.jsx(xG.Provider,{value:a,children:e})}function fXn(){const e=T.useContext(xG);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const dXn=e=>!!e.panZoom;function h7(){const e=nXn(),n=Mr(),t=fXn(),r=Bn(dXn),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 b,y;const{nodeLookup:p,nodeOrigin:m}=n.getState(),w=xO(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:((b=w.measured)==null?void 0:b.width)??w.width,height:((y=w.measured)==null?void 0:y.height)??w.height};return lm(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&&xO(v)?v:{...k,...v}}return k}))},h=(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&&cXn(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(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x:w,y:k,zoom:v}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:m,edges:w,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:y,onDelete:x,onBeforeDelete:C}=n.getState(),{nodes:N,edges:j}=await PWn({nodesToRemove:f,edgesToRemove:p,nodes:m,edges:w,onBeforeDelete:C}),A=j.length>0,z=N.length>0;if(A){const M=j.map(yO);v==null||v(j),y(M)}if(z){const M=N.map(yO);k==null||k(N),b(M)}return(z||A)&&(x==null||x({nodes:N,edges:j})),{deletedNodes:N,deletedEdges:j}},getIntersectingNodes:(f,p=!0,m)=>{const w=XM(f),k=w?f:c(f),v=m!==void 0;return k?(m||n.getState().nodes).filter(b=>{const y=n.getState().nodeLookup.get(b.id);if(y&&!w&&(b.id===f.id||!y.internals.positionAbsolute))return!1;const x=lm(v?b:y),C=Ab(x,k);return p&&C>0||C>=x.width*x.height||C>=k.width*k.height}):[]},isNodeIntersecting:(f,p,m=!0)=>{const k=XM(f)?f:c(f);if(!k)return!1;const v=Ab(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:h,updateEdgeData:(f,p,m={replace:!1})=>{h(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 LWn(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??qWn();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 kO=e=>e.selected,hXn=typeof window<"u"?window:void 0;function pXn({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=Mr(),{deleteElements:r}=h7(),s=_m(e,{actInsideInputWithModifier:!1}),i=_m(n,{target:hXn});T.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(kO),edges:a.filter(kO)}),t.setState({nodesSelectionActive:!1})}},[s]),T.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function mXn(e){const n=Mr();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=c7(e.current);(r.height===0||r.width===0)&&((o=(a=n.getState()).onError)==null||o.call(a,"004",yo.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 cx={position:"absolute",width:"100%",height:"100%",top:0,left:0},gXn=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function vXn({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=cf.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:c,translateExtent:u,minZoom:h,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:w,noWheelClassName:k,noPanClassName:v,onViewportChange:b,isControlledViewport:y,paneClickDistance:x,selectionOnDrag:C}){const N=Mr(),j=T.useRef(null),{userSelectionActive:A,lib:z,connectionInProgress:M}=Bn(gXn,Tr),D=_m(p),I=T.useRef();mXn(j);const B=T.useCallback(G=>{b==null||b({x:G[0],y:G[1],zoom:G[2]}),y||N.setState({transform:G})},[b,y]);return T.useEffect(()=>{if(j.current){I.current=EQn({domNode:j.current,minZoom:h,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:V=>N.setState(Z=>Z.paneDragging===V?Z:{paneDragging:V}),onPanZoomStart:(V,Z)=>{const{onViewportChangeStart:J,onMoveStart:$}=N.getState();$==null||$(V,Z),J==null||J(Z)},onPanZoom:(V,Z)=>{const{onViewportChange:J,onMove:$}=N.getState();$==null||$(V,Z),J==null||J(Z)},onPanZoomEnd:(V,Z)=>{const{onViewportChangeEnd:J,onMoveEnd:$}=N.getState();$==null||$(V,Z),J==null||J(Z)}});const{x:G,y:U,zoom:Q}=I.current.getViewport();return N.setState({panZoom:I.current,transform:[G,U,Q],domNode:j.current.closest(".react-flow")}),()=>{var V;(V=I.current)==null||V.destroy()}}},[]),T.useEffect(()=>{var G;(G=I.current)==null||G.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:z,onTransformChange:B,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:x})},[e,n,t,r,s,i,a,o,D,m,v,A,k,z,B,M,C,x]),_.jsx("div",{className:"react-flow__renderer",ref:j,style:cx,children:w})}const bXn=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function yXn(){const{userSelectionActive:e,userSelectionRect:n}=Bn(bXn,Tr);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 V4=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},xXn=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function wXn({isSelecting:e,selectionKeyPressed:n,selectionMode:t=cm.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:h,onPaneScroll:f,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:w,children:k}){const v=T.useRef(0),b=Mr(),{userSelectionActive:y,elementsSelectable:x,dragging:C,panBy:N,autoPanSpeed:j}=Bn(xXn,Tr),A=x&&(e||y),z=T.useRef(null),M=T.useRef(),D=T.useRef(new Set),I=T.useRef(new Set),B=T.useRef(!1),G=T.useRef(!1),U=T.useRef({x:0,y:0}),Q=T.useRef(!1),V=K=>{if(G.current||B.current||b.getState().connection.inProgress){G.current=!1,B.current=!1;return}u==null||u(K),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},Z=K=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){K.preventDefault();return}h==null||h(K)},J=f?K=>f(K):void 0,$=K=>{G.current&&(K.stopPropagation(),G.current=!1)},L=K=>{var $e,yt;const{domNode:oe,transform:ce}=b.getState();if(M.current=oe==null?void 0:oe.getBoundingClientRect(),!M.current)return;const pe=K.target===z.current;if(!pe&&!!K.target.closest(".nokey")||!e||!(a&&pe||n)||K.button!==0||!K.isPrimary)return;(yt=($e=K.target)==null?void 0:$e.setPointerCapture)==null||yt.call($e,K.pointerId),G.current=!1;const{x:Fe,y:Ye}=po(K.nativeEvent,M.current),Te=Jm({x:Fe,y:Ye},ce);b.setState({userSelectionRect:{width:0,height:0,startX:Te.x,startY:Te.y,x:Fe,y:Ye}}),pe||(K.stopPropagation(),K.preventDefault())};function q(K,oe){const{userSelectionRect:ce}=b.getState();if(!ce)return;const{transform:pe,nodeLookup:ve,edgeLookup:Me,connectionLookup:Fe,triggerNodeChanges:Ye,triggerEdgeChanges:Te,defaultEdgeOptions:$e}=b.getState(),yt={x:ce.startX,y:ce.startY},{x:ot,y:Mt}=Uh(yt,pe),jt={startX:yt.x,startY:yt.y,x:Kke.id)),I.current=new Set;const nt=($e==null?void 0:$e.selectable)??!0;for(const ke of D.current){const me=Fe.get(ke);if(me)for(const{edgeId:je}of me.values()){const qe=Me.get(je);qe&&(qe.selectable??nt)&&I.current.add(je)}}if(!YM(Pt,D.current)){const ke=Gd(ve,D.current,!0);Ye(ke)}if(!YM(Le,I.current)){const ke=Gd(Me,I.current);Te(ke)}b.setState({userSelectionRect:jt,userSelectionActive:!0,nodesSelectionActive:!1})}function P(){if(!s||!M.current)return;const[K,oe]=a7(U.current,M.current,j);N({x:K,y:oe}).then(ce=>{if(!G.current||!ce){v.current=requestAnimationFrame(P);return}const{x:pe,y:ve}=U.current;q(pe,ve),v.current=requestAnimationFrame(P)})}const F=()=>{cancelAnimationFrame(v.current),v.current=0,Q.current=!1};T.useEffect(()=>()=>F(),[]);const re=K=>{const{userSelectionRect:oe,transform:ce,resetSelectedElements:pe}=b.getState();if(!M.current||!oe)return;const{x:ve,y:Me}=po(K.nativeEvent,M.current);U.current={x:ve,y:Me};const Fe=Uh({x:oe.startX,y:oe.startY},ce);if(!G.current){const Ye=n?0:i;if(Math.hypot(ve-Fe.x,Me-Fe.y)<=Ye)return;pe(),o==null||o(K)}G.current=!0,Q.current||(P(),Q.current=!0),q(ve,Me)},ie=K=>{var oe,ce;if(!A){K.target===z.current&&b.getState().connection.inProgress&&(B.current=!0);return}K.button===0&&((ce=(oe=K.target)==null?void 0:oe.releasePointerCapture)==null||ce.call(oe,K.pointerId),!y&&K.target===z.current&&b.getState().userSelectionRect&&(V==null||V(K)),b.setState({userSelectionActive:!1,userSelectionRect:null}),G.current&&(c==null||c(K),b.setState({nodesSelectionActive:D.current.size>0})),F())},ue=K=>{var oe,ce;(ce=(oe=K.target)==null?void 0:oe.releasePointerCapture)==null||ce.call(oe,K.pointerId),F()},se=r===!0||Array.isArray(r)&&r.includes(0);return _.jsxs("div",{className:ms(["react-flow__pane",{draggable:se,dragging:C,selection:e}]),onClick:A?void 0:V4(V,z),onContextMenu:V4(Z,z),onWheel:V4(J,z),onPointerEnter:A?void 0:p,onPointerMove:A?re:m,onPointerUp:ie,onPointerCancel:A?ue:void 0,onPointerDownCapture:A?L:void 0,onClickCapture:A?$:void 0,onPointerLeave:w,ref:z,style:cx,children:[k,_.jsx(yXn,{})]})}function Uk({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",yo.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):s([e])}function wG({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=Mr(),[c,u]=T.useState(!1),h=T.useRef();return T.useEffect(()=>{h.current=fQn({getStoreItems:()=>o.getState(),onNodeMouseDown:f=>{Uk({id:f,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),T.useEffect(()=>{if(!(n||!e.current||!h.current))return h.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var f;(f=h.current)==null||f.destroy()}},[t,r,n,i,e,s,a]),c}const kXn=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function kG(){const e=Mr();return T.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:c,nodeLookup:u,nodeOrigin:h}=e.getState(),f=new Map,p=kXn(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[,b]of u){if(!p(b))continue;let y={x:b.internals.positionAbsolute.x+k,y:b.internals.positionAbsolute.y+v};s&&(y=Zm(y,i));const{position:x,positionAbsolute:C}=qU({nodeId:b.id,nextPosition:y,nodeLookup:u,nodeExtent:r,nodeOrigin:h,onError:o});b.position=x,b.internals.positionAbsolute=C,f.set(b.id,b)}c(f)},[])}const p7=T.createContext(null),SXn=p7.Provider;p7.Consumer;const SG=()=>T.useContext(p7),CXn=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),CG=T.createContext(null);function EXn({children:e}){const n=Bn(CXn,Tr);return _.jsx(CG.Provider,{value:n,children:e})}function NXn(){const e=T.useContext(CG);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const zXn={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},jXn=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:c,isValid:u}=a;if(!o&&!s)return zXn;const h=(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:h,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===Hh.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:h&&u}};function AXn({type:e="source",position:n=Rt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:c,className:u,onMouseDown:h,onTouchStart:f,...p},m){var Q,V;const w=a||null,k=e==="target",v=Mr(),b=SG(),{connectOnClick:y,noPanClassName:x,rfId:C}=NXn(),{connectingFrom:N,connectingTo:j,clickConnecting:A,isPossibleEndHandle:z,connectionInProcess:M,clickConnectionInProcess:D,valid:I}=Bn(jXn(b,w,e),Tr);b||(V=(Q=v.getState()).onError)==null||V.call(Q,"010",yo.error010());const B=Z=>{const{defaultEdgeOptions:J,onConnect:$,hasDefaultEdges:L}=v.getState(),q={...J,...Z};if(L){const{edges:P,setEdges:F,onError:re}=v.getState();F(oXn(q,P,{onError:re}))}$==null||$(q),o==null||o(q)},G=Z=>{if(!b)return;const J=ZU(Z.nativeEvent);if(s&&(J&&Z.button===0||!J)){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:b,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...L)=>{var q,P;return(P=(q=v.getState()).onConnectEnd)==null?void 0:P.call(q,...L)},updateConnection:$.updateConnection,onConnect:B,isValidConnection:t||((...L)=>{var q,P;return((P=(q=v.getState()).isValidConnection)==null?void 0:P.call(q,...L))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}J?h==null||h(Z):f==null||f(Z)},U=Z=>{const{onClickConnectStart:J,onClickConnectEnd:$,connectionClickStartHandle:L,connectionMode:q,isValidConnection:P,lib:F,rfId:re,nodeLookup:ie,connection:ue}=v.getState();if(!b||!L&&!s)return;if(!L){J==null||J(Z.nativeEvent,{nodeId:b,handleId:w,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:w}});return}const se=XU(Z.target),K=t||P,{connection:oe,isValid:ce}=qk.isValid(Z.nativeEvent,{handle:{nodeId:b,id:w,type:e},connectionMode:q,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:K,flowId:re,doc:se,lib:F,nodeLookup:ie});ce&&oe&&B(oe);const pe=structuredClone(ue);delete pe.inProgress,pe.toPosition=pe.toHandle?pe.toHandle.position:null,$==null||$(Z,pe),v.setState({connectionClickStartHandle:null})};return _.jsx("div",{"data-handleid":w,"data-nodeid":b,"data-handlepos":n,"data-id":`${C}-${b}-${w}-${e}`,className:ms(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",x,u,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:i,clickconnecting:A,connectingfrom:N,connectingto:j,valid:I,connectionindicator:r&&(!M||z)&&(M||D?i:s)}]),onMouseDown:G,onTouchStart:G,onClick:y?U:void 0,ref:m,...p,children:c})}const dc=T.memo(yG(AXn));function TXn({data:e,isConnectable:n,sourcePosition:t=Rt.Bottom}){return _.jsxs(_.Fragment,{children:[e==null?void 0:e.label,_.jsx(dc,{type:"source",position:t,isConnectable:n})]})}function RXn({data:e,isConnectable:n,targetPosition:t=Rt.Top,sourcePosition:r=Rt.Bottom}){return _.jsxs(_.Fragment,{children:[_.jsx(dc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,_.jsx(dc,{type:"source",position:r,isConnectable:n})]})}function MXn(){return null}function OXn({data:e,isConnectable:n,targetPosition:t=Rt.Top}){return _.jsxs(_.Fragment,{children:[_.jsx(dc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Tb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},SO={input:TXn,default:RXn,output:OXn,group:MXn};function DXn(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 LXn=e=>{const{width:n,height:t,x:r,y:s}=Ym(e.nodeLookup,{filter:i=>!!i.selected});return{width:ho(n)?n:null,height:ho(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 IXn({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=Mr(),{width:s,height:i,transformString:a,userSelectionActive:o}=Bn(LXn,Tr),c=kG(),u=T.useRef(null);T.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const h=!o&&s!==null&&i!==null;if(wG({nodeRef:u,disabled:!h}),!h)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(Tb,m.key)&&(m.preventDefault(),c({direction:Tb[m.key],factor:m.shiftKey?4:1}))};return _.jsx("div",{className:ms(["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 CO=typeof window<"u"?window:void 0,$Xn=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:h,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:w,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:y,zoomOnPinch:x,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:j,zoomOnDoubleClick:A,panOnDrag:z,autoPanOnSelection:M,defaultViewport:D,translateExtent:I,minZoom:B,maxZoom:G,preventScrolling:U,onSelectionContextMenu:Q,noWheelClassName:V,noPanClassName:Z,disableKeyboardA11y:J,onViewportChange:$,isControlledViewport:L}){const{nodesSelectionActive:q,userSelectionActive:P}=Bn($Xn,Tr),F=_m(u,{target:CO}),re=_m(k,{target:CO}),ie=re||z,ue=re||C,se=h&&ie!==!0,K=F||P||se;return pXn({deleteKeyCode:c,multiSelectionKeyCode:w}),_.jsx(vXn,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:y,zoomOnPinch:x,panOnScroll:ue,panOnScrollSpeed:N,panOnScrollMode:j,zoomOnDoubleClick:A,panOnDrag:!F&&ie,defaultViewport:D,translateExtent:I,minZoom:B,maxZoom:G,zoomActivationKeyCode:v,preventScrolling:U,noWheelClassName:V,noPanClassName:Z,onViewportChange:$,isControlledViewport:L,paneClickDistance:o,selectionOnDrag:se,children:_.jsxs(wXn,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:ie,autoPanOnSelection:M,isSelecting:!!K,selectionMode:f,selectionKeyPressed:F,paneClickDistance:o,selectionOnDrag:se,children:[e,q&&_.jsx(IXn,{onSelectionContextMenu:Q,noPanClassName:Z,disableKeyboardA11y:J})]})})}EG.displayName="FlowRenderer";const BXn=T.memo(EG),PXn=e=>n=>e?i7(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 FXn(e){return Bn(T.useCallback(PXn(e),[e]),Tr)}const HXn=e=>e.updateNodeInternals;function qXn(){const e=Bn(HXn),[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 UXn({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=Mr(),i=T.useRef(null),a=T.useRef(null),o=T.useRef(e.sourcePosition),c=T.useRef(e.targetPosition),u=T.useRef(n),h=t&&!!e.internals.handleBounds;return T.useEffect(()=>{i.current&&!e.hidden&&(!h||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[h,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 GXn({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:c,nodesConnectable:u,nodesFocusable:h,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:w,rfId:k,nodeTypes:v,nodeClickDistance:b,onError:y}){const{node:x,internals:C,isParent:N}=Bn(K=>{const oe=K.nodeLookup.get(e),ce=K.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:ce}},Tr);let j=x.type||"default",A=(v==null?void 0:v[j])||SO[j];A===void 0&&(y==null||y("003",yo.error003(j)),j="default",A=(v==null?void 0:v.default)||SO.default);const z=!!(x.draggable||o&&typeof x.draggable>"u"),M=!!(x.selectable||c&&typeof x.selectable>"u"),D=!!(x.connectable||u&&typeof x.connectable>"u"),I=!!(x.focusable||h&&typeof x.focusable>"u"),B=Mr(),G=WU(x),U=UXn({node:x,nodeType:j,hasDimensions:G,resizeObserver:f}),Q=wG({nodeRef:U,disabled:x.hidden||!z,noDragClassName:p,handleSelector:x.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:b}),V=kG();if(x.hidden)return null;const Z=Al(x),J=DXn(x),$=M||z||n||t||r||s,L=t?K=>t(K,{...C.userNode}):void 0,q=r?K=>r(K,{...C.userNode}):void 0,P=s?K=>s(K,{...C.userNode}):void 0,F=i?K=>i(K,{...C.userNode}):void 0,re=a?K=>a(K,{...C.userNode}):void 0,ie=K=>{const{selectNodesOnDrag:oe,nodeDragThreshold:ce}=B.getState();M&&(!oe||!z||ce>0)&&Uk({id:e,store:B,nodeRef:U}),n&&n(K,{...C.userNode})},ue=K=>{if(!(YU(K.nativeEvent)||w)){if($U.includes(K.key)&&M){const oe=K.key==="Escape";Uk({id:e,store:B,unselect:oe,nodeRef:U})}else if(z&&x.selected&&Object.prototype.hasOwnProperty.call(Tb,K.key)){K.preventDefault();const{ariaLabelConfig:oe}=B.getState();B.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:K.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),V({direction:Tb[K.key],factor:K.shiftKey?4:1})}}},se=()=>{var Fe;if(w||!((Fe=U.current)!=null&&Fe.matches(":focus-visible")))return;const{transform:K,width:oe,height:ce,autoPanOnNodeFocus:pe,setCenter:ve}=B.getState();if(!pe)return;i7(new Map([[e,x]]),{x:0,y:0,width:oe,height:ce},K,!0).length>0||ve(x.position.x+Z.width/2,x.position.y+Z.height/2,{zoom:K[2]})};return _.jsx("div",{className:ms(["react-flow__node",`react-flow__node-${j}`,{[m]:z},x.className,{selected:x.selected,selectable:M,parent:N,draggable:z,dragging:Q}]),ref:U,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:G?"visible":"hidden",...x.style,...J},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:q,onMouseLeave:P,onContextMenu:F,onClick:ie,onDoubleClick:re,onKeyDown:I?ue:void 0,tabIndex:I?0:void 0,onFocus:I?se:void 0,role:x.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${mG}-${k}`,"aria-label":x.ariaLabel,...x.domAttributes,children:_.jsx(SXn,{value:e,children:_.jsx(A,{id:e,data:x.data,type:j,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:x.selected??!1,selectable:M,draggable:z,deletable:x.deletable??!0,isConnectable:D,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:Q,dragHandle:x.dragHandle,zIndex:C.z,parentId:x.parentId,...Z})})})}var KXn=T.memo(GXn);const VXn=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}=Bn(VXn,Tr),a=FXn(e.onlyRenderVisibleElements),o=qXn();return _.jsx("div",{className:"react-flow__nodes",style:cx,children:a.map(c=>_.jsx(KXn,{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 WXn=T.memo(NG);function QXn(e){return Bn(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&&VWn({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Tr)}const XXn=({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"})},YXn=({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"})},EO={[zb.Arrow]:XXn,[zb.ArrowClosed]:YXn};function ZXn(e){const n=Mr();return T.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(EO,e)?EO[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",yo.error009(e)),null)},[e])}const JXn=({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=ZXn(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=Bn(i=>i.edges),r=Bn(i=>i.defaultEdgeOptions),s=T.useMemo(()=>tQn(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(JXn,{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 eYn=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,...h}){const[f,p]=T.useState({x:1,y:0,width:0,height:0}),m=ms(["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",...h,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 tYn=T.memo(jG);function lx({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c,interactionWidth:u=20,...h}){return _.jsxs(_.Fragment,{children:[_.jsx("path",{...h,d:e,fill:"none",className:ms(["react-flow__edge-path",h.className])}),u?_.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&ho(n)&&ho(t)?_.jsx(tYn,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c}):null]})}function NO({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===Rt.Left||e===Rt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function AG({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top}){const[a,o]=NO({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,u]=NO({pos:i,x1:r,y1:s,x2:e,y2:n}),[h,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}`,h,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:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:b})=>{const[y,x,C]=AG({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),N=e.isInternal?void 0:n;return _.jsx(lx,{id:N,path:y,labelX:x,labelY:C,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:b})})}const nYn=TG({isInternal:!1}),RG=TG({isInternal:!0});nYn.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:h,labelBgBorderRadius:f,style:p,sourcePosition:m=Rt.Bottom,targetPosition:w=Rt.Top,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:y})=>{const[x,C,N]=Pk({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:w,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset,stepPosition:b==null?void 0:b.stepPosition}),j=e.isInternal?void 0:n;return _.jsx(lx,{id:j,path:x,labelX:C,labelY:N,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,markerEnd:k,markerStart:v,interactionWidth:y})})}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 rYn=LG({isInternal:!1}),IG=LG({isInternal:!0});rYn.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:h,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:w,interactionWidth:k})=>{const[v,b,y]=nG({sourceX:t,sourceY:r,targetX:s,targetY:i}),x=e.isInternal?void 0:n;return _.jsx(lx,{id:x,path:v,labelX:b,labelY:y,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:w,interactionWidth:k})})}const sYn=$G({isInternal:!1}),BG=$G({isInternal:!0});sYn.displayName="StraightEdge";BG.displayName="StraightEdgeInternal";function PG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=Rt.Bottom,targetPosition:o=Rt.Top,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:y})=>{const[x,C,N]=eG({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:b==null?void 0:b.curvature}),j=e.isInternal?void 0:n;return _.jsx(lx,{id:j,path:x,labelX:C,labelY:N,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:y})})}const iYn=PG({isInternal:!1}),FG=PG({isInternal:!0});iYn.displayName="BezierEdge";FG.displayName="BezierEdgeInternal";const zO={default:FG,straight:BG,step:IG,smoothstep:DG,simplebezier:RG},jO={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},aYn=(e,n,t)=>t===Rt.Left?e-n:t===Rt.Right?e+n:e,oYn=(e,n,t)=>t===Rt.Top?e-n:t===Rt.Bottom?e+n:e,AO="react-flow__edgeupdater";function TO({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:ms([AO,`${AO}-${o}`]),cx:aYn(n,r,e),cy:oYn(t,r,e),r,stroke:"transparent",fill:"transparent"})}function cYn({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:c,onReconnect:u,onReconnectStart:h,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){const w=Mr(),k=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:j,domNode:A,connectionMode:z,connectionRadius:M,lib:D,onConnectStart:I,cancelConnection:B,nodeLookup:G,rfId:U,panBy:Q,updateConnection:V}=w.getState(),Z=N.type==="target",J=(q,P)=>{p(!1),f==null||f(q,t,N.type,P)},$=q=>u==null?void 0:u(t,q),L=(q,P)=>{p(!0),h==null||h(C,t,N.type),I==null||I(q,P)};qk.onPointerDown(C.nativeEvent,{autoPanOnConnect:j,connectionMode:z,connectionRadius:M,domNode:A,handleId:N.id,nodeId:N.nodeId,nodeLookup:G,isTarget:Z,edgeUpdaterType:N.type,lib:D,flowId:U,cancelConnection:B,panBy:Q,isValidConnection:(...q)=>{var P,F;return((F=(P=w.getState()).isValidConnection)==null?void 0:F.call(P,...q))??!0},onConnect:$,onConnectStart:L,onConnectEnd:(...q)=>{var P,F;return(F=(P=w.getState()).onConnectEnd)==null?void 0:F.call(P,...q)},onReconnectEnd:J,updateConnection:V,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"}),b=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),y=()=>m(!0),x=()=>m(!1);return _.jsxs(_.Fragment,{children:[(e===!0||e==="source")&&_.jsx(TO,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:y,onMouseOut:x,type:"source"}),(e===!0||e==="target")&&_.jsx(TO,{position:c,centerX:i,centerY:a,radius:n,onMouseDown:b,onMouseEnter:y,onMouseOut:x,type:"target"})]})}function lYn({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,reconnectRadius:h,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:w,edgeTypes:k,noPanClassName:v,onError:b,disableKeyboardA11y:y}){let x=Bn(ve=>ve.edgeLookup.get(e));const C=Bn(ve=>ve.defaultEdgeOptions);x=C?{...C,...x}:x;let N=x.type||"default",j=(k==null?void 0:k[N])||zO[N];j===void 0&&(b==null||b("011",yo.error011(N)),N="default",j=(k==null?void 0:k.default)||zO.default);const A=!!(x.focusable||n&&typeof x.focusable>"u"),z=typeof f<"u"&&(x.reconnectable||t&&typeof x.reconnectable>"u"),M=!!(x.selectable||r&&typeof x.selectable>"u"),D=T.useRef(null),[I,B]=T.useState(!1),[G,U]=T.useState(!1),Q=Mr(),{zIndex:V=x.zIndex,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:q,targetPosition:P}=Bn(T.useCallback(ve=>{const Me=ve.nodeLookup.get(x.source),Fe=ve.nodeLookup.get(x.target);if(!Me||!Fe)return jO;const Ye=eQn({id:e,sourceNode:Me,targetNode:Fe,sourceHandle:x.sourceHandle||null,targetHandle:x.targetHandle||null,connectionMode:ve.connectionMode,onError:b}),Te=KWn({selected:x.selected,zIndex:x.zIndex,sourceNode:Me,targetNode:Fe,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode});return{...Ye||jO,zIndex:Te}},[x.source,x.target,x.sourceHandle,x.targetHandle,x.selected,x.zIndex]),Tr),F=T.useMemo(()=>x.markerStart?`url('#${Fk(x.markerStart,w)}')`:void 0,[x.markerStart,w]),re=T.useMemo(()=>x.markerEnd?`url('#${Fk(x.markerEnd,w)}')`:void 0,[x.markerEnd,w]);if(x.hidden||Z===null||J===null||$===null||L===null)return null;const ie=ve=>{var Te;const{addSelectedEdges:Me,unselectNodesAndEdges:Fe,multiSelectionActive:Ye}=Q.getState();M&&(Q.setState({nodesSelectionActive:!1}),x.selected&&Ye?(Fe({nodes:[],edges:[x]}),(Te=D.current)==null||Te.blur()):Me([e])),s&&s(ve,x)},ue=i?ve=>{i(ve,{...x})}:void 0,se=a?ve=>{a(ve,{...x})}:void 0,K=o?ve=>{o(ve,{...x})}:void 0,oe=c?ve=>{c(ve,{...x})}:void 0,ce=u?ve=>{u(ve,{...x})}:void 0,pe=ve=>{var Me;if(!y&&$U.includes(ve.key)&&M){const{unselectNodesAndEdges:Fe,addSelectedEdges:Ye}=Q.getState();ve.key==="Escape"?((Me=D.current)==null||Me.blur(),Fe({edges:[x]})):Ye([e])}};return _.jsx("svg",{style:{zIndex:V},children:_.jsxs("g",{className:ms(["react-flow__edge",`react-flow__edge-${N}`,x.className,v,{selected:x.selected,animated:x.animated,inactive:!M&&!s,updating:I,selectable:M}]),onClick:ie,onDoubleClick:ue,onContextMenu:se,onMouseEnter:K,onMouseMove:oe,onMouseLeave:ce,onKeyDown:A?pe:void 0,tabIndex:A?0:void 0,role:x.ariaRole??(A?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":x.ariaLabel===null?void 0:x.ariaLabel||`Edge from ${x.source} to ${x.target}`,"aria-describedby":A?`${gG}-${w}`:void 0,ref:D,...x.domAttributes,children:[!G&&_.jsx(j,{id:e,source:x.source,target:x.target,type:x.type,selected:x.selected,animated:x.animated,selectable:M,deletable:x.deletable??!0,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:q,targetPosition:P,data:x.data,style:x.style,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerStart:F,markerEnd:re,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth}),z&&_.jsx(cYn,{edge:x,isReconnectable:z,reconnectRadius:h,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:q,targetPosition:P,setUpdateHover:B,setReconnecting:U})]})})}var uYn=T.memo(lYn);const _Yn=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:h,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:y,onError:x}=Bn(_Yn,Tr),C=QXn(n);return _.jsxs("div",{className:"react-flow__edges",children:[_.jsx(eYn,{defaultColor:e,rfId:t}),C.map(N=>_.jsx(uYn,{id:N,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:y,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,onClick:h,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,rfId:t,onError:x,edgeTypes:r,disableKeyboardA11y:k},N))]})}HG.displayName="EdgeRenderer";const fYn=T.memo(HG),dYn=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function hYn({children:e}){const n=Bn(dYn);return _.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function pYn(e){const n=h7(),t=T.useRef(!1);T.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const mYn=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function gYn(e){const n=Bn(mYn),t=Mr();return T.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function vYn(e){return e.connection.inProgress?{...e.connection,to:Jm(e.connection.to,e.transform)}:{...e.connection}}function bYn(e){return vYn}function yYn(e){const n=bYn();return Bn(n,Tr)}const xYn=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function wYn({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:c}=Bn(xYn,Tr);return!(i&&s&&c)?null:_.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:_.jsx("g",{className:ms(["react-flow__connection",FU(o)]),children:_.jsx(qG,{style:n,type:t,CustomComponent:r,isValid:o})})})}const qG=({style:e,type:n=yu.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:c,to:u,toNode:h,toHandle:f,toPosition:p,pointer:m}=yYn();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:h,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 yu.Bezier:[w]=eG(k);break;case yu.SimpleBezier:[w]=AG(k);break;case yu.Step:[w]=Pk({...k,borderRadius:0});break;case yu.SmoothStep:[w]=Pk(k);break;default:[w]=nG(k)}return _.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};qG.displayName="ConnectionLine";const kYn={};function RO(e=kYn){T.useRef(e),Mr(),T.useEffect(()=>{},[e])}function SYn(){Mr(),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:h,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:w,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:y,selectionOnDrag:x,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:j,zoomActivationKeyCode:A,deleteKeyCode:z,onlyRenderVisibleElements:M,elementsSelectable:D,defaultViewport:I,translateExtent:B,minZoom:G,maxZoom:U,preventScrolling:Q,defaultMarkerColor:V,zoomOnScroll:Z,zoomOnPinch:J,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:q,zoomOnDoubleClick:P,panOnDrag:F,autoPanOnSelection:re,onPaneClick:ie,onPaneMouseEnter:ue,onPaneMouseMove:se,onPaneMouseLeave:K,onPaneScroll:oe,onPaneContextMenu:ce,paneClickDistance:pe,nodeClickDistance:ve,onEdgeContextMenu:Me,onEdgeMouseEnter:Fe,onEdgeMouseMove:Ye,onEdgeMouseLeave:Te,reconnectRadius:$e,onReconnect:yt,onReconnectStart:ot,onReconnectEnd:Mt,noDragClassName:jt,noWheelClassName:Pt,noPanClassName:Le,disableKeyboardA11y:nt,nodeExtent:ke,rfId:me,viewport:je,onViewportChange:qe}){return RO(e),RO(n),SYn(),pYn(t),gYn(je),_.jsx(BXn,{onPaneClick:ie,onPaneMouseEnter:ue,onPaneMouseMove:se,onPaneMouseLeave:K,onPaneContextMenu:ce,onPaneScroll:oe,paneClickDistance:pe,deleteKeyCode:z,selectionKeyCode:y,selectionOnDrag:x,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:j,zoomActivationKeyCode:A,elementsSelectable:D,zoomOnScroll:Z,zoomOnPinch:J,zoomOnDoubleClick:P,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:q,panOnDrag:F,autoPanOnSelection:re,defaultViewport:I,translateExtent:B,minZoom:G,maxZoom:U,onSelectionContextMenu:f,preventScrolling:Q,noDragClassName:jt,noWheelClassName:Pt,noPanClassName:Le,disableKeyboardA11y:nt,onViewportChange:qe,isControlledViewport:!!je,children:_.jsxs(hYn,{children:[_.jsx(fYn,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:yt,onReconnectStart:ot,onReconnectEnd:Mt,onlyRenderVisibleElements:M,onEdgeContextMenu:Me,onEdgeMouseEnter:Fe,onEdgeMouseMove:Ye,onEdgeMouseLeave:Te,reconnectRadius:$e,defaultMarkerColor:V,noPanClassName:Le,disableKeyboardA11y:nt,rfId:me}),_.jsx(wYn,{style:k,type:w,component:v,containerStyle:b}),_.jsx("div",{className:"react-flow__edgelabel-renderer"}),_.jsx(WXn,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,nodeClickDistance:ve,onlyRenderVisibleElements:M,noPanClassName:Le,noDragClassName:jt,disableKeyboardA11y:nt,nodeExtent:ke,rfId:me}),_.jsx("div",{className:"react-flow__viewport-portal"})]})})}UG.displayName="GraphView";const CYn=T.memo(UG),EYn=VU(),MO=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c=.5,maxZoom:u=2,nodeOrigin:h,nodeExtent:f,zIndexMode:p="basic"}={})=>{const m=new Map,w=new Map,k=new Map,v=new Map,b=r??n??[],y=t??e??[],x=h??[0,0],C=f??om;iG(k,v,b);const{nodesInitialized:N}=Hk(y,m,w,{nodeOrigin:x,nodeExtent:C,zIndexMode:p});let j=[0,0,1];if(a&&s&&i){const A=Ym(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:z,y:M,zoom:D}=o7(A,s,i,c,u,(o==null?void 0:o.padding)??.1);j=[z,M,D]}return{rfId:"1",width:s??0,height:i??0,transform:j,nodes:y,nodesInitialized:N,nodeLookup:m,parentLookup:w,edges:b,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:om,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Hh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,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:EYn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:BU,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},NYn=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:f,zIndexMode:p})=>IQn((m,w)=>{async function k(){const{nodeLookup:v,panZoom:b,fitViewOptions:y,fitViewResolver:x,width:C,height:N,minZoom:j,maxZoom:A}=w();b&&(await BWn({nodes:v,width:C,height:N,panZoom:b,minZoom:j,maxZoom:A},y),x==null||x.resolve(!0),m({fitViewResolver:null}))}return{...MO({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:f,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:y,nodeOrigin:x,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:j,nodesSelectionActive:A}=w(),{nodesInitialized:z,hasSelectedNodes:M}=Hk(v,b,y,{nodeOrigin:x,nodeExtent:f,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:j}),D=A&&M;N&&z?(k(),m({nodes:v,nodesInitialized:z,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):m({nodes:v,nodesInitialized:z,nodesSelectionActive:D})},setEdges:v=>{const{connectionLookup:b,edgeLookup:y}=w();iG(b,y,v),m({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:y}=w();y(v),m({hasDefaultNodes:!0})}if(b){const{setEdges:y}=w();y(b),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:y,parentLookup:x,domNode:C,nodeOrigin:N,nodeExtent:j,debug:A,fitViewQueued:z,zIndexMode:M}=w(),{changes:D,updatedInternals:I}=cQn(v,y,x,C,N,j,M);I&&(sQn(y,x,{nodeOrigin:N,nodeExtent:j,zIndexMode:M}),z?(k(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(D==null?void 0:D.length)>0&&(A&&console.log("React Flow: trigger node changes",D),b==null||b(D)))},updateNodePositions:(v,b=!1)=>{const y=[];let x=[];const{nodeLookup:C,triggerNodeChanges:N,connection:j,updateConnection:A,onNodesChangeMiddlewareMap:z}=w();for(const[M,D]of v){const I=C.get(M),B=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(D!=null&&D.position)),G={id:M,type:"position",position:B?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:b};if(I&&j.inProgress&&j.fromNode.id===I.id){const U=Nf(I,j.fromHandle,Rt.Left,!0);A({...j,from:U})}B&&I.parentId&&y.push({id:M,parentId:I.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),x.push(G)}if(y.length>0){const{parentLookup:M,nodeOrigin:D}=w(),I=d7(y,C,M,D);x.push(...I)}for(const M of z.values())x=M(x);N(x)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:y,nodes:x,hasDefaultNodes:C,debug:N}=w();if(v!=null&&v.length){if(C){const j=sXn(v,x);y(j)}N&&console.log("React Flow: trigger node changes",v),b==null||b(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:y,edges:x,hasDefaultEdges:C,debug:N}=w();if(v!=null&&v.length){if(C){const j=iXn(v,x);y(j)}N&&console.log("React Flow: trigger edge changes",v),b==null||b(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:y,nodeLookup:x,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(b){const j=v.map(A=>L_(A,!0));C(j);return}C(Gd(x,new Set([...v]),!0)),N(Gd(y))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:y,nodeLookup:x,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(b){const j=v.map(A=>L_(A,!0));N(j);return}N(Gd(y,new Set([...v]))),C(Gd(x,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:y,nodes:x,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:j}=w(),A=v||x,z=b||y,M=[];for(const I of A){if(!I.selected)continue;const B=C.get(I.id);B&&(B.selected=!1),M.push(L_(I.id,!1))}const D=[];for(const I of z)I.selected&&D.push(L_(I.id,!1));N(M),j(D)},setMinZoom:v=>{const{panZoom:b,maxZoom:y}=w();b==null||b.setScaleExtent([v,y]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:y}=w();b==null||b.setScaleExtent([y,v]),m({maxZoom:v})},setTranslateExtent:v=>{var b;(b=w().panZoom)==null||b.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:y,triggerEdgeChanges:x,elementsSelectable:C}=w();if(!C)return;const N=b.reduce((A,z)=>z.selected?[...A,L_(z.id,!1)]:A,[]),j=v.reduce((A,z)=>z.selected?[...A,L_(z.id,!1)]:A,[]);y(N),x(j)},setNodeExtent:v=>{const{nodes:b,nodeLookup:y,parentLookup:x,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:j,zIndexMode:A}=w();v[0][0]===j[0][0]&&v[0][1]===j[0][1]&&v[1][0]===j[1][0]&&v[1][1]===j[1][1]||(Hk(b,y,x,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:A}),m({nodeExtent:v}))},panBy:v=>{const{transform:b,width:y,height:x,panZoom:C,translateExtent:N}=w();return lQn({delta:v,panZoom:C,transform:b,translateExtent:N,width:y,height:x})},setCenter:async(v,b,y)=>{const{width:x,height:C,maxZoom:N,panZoom:j}=w();if(!j)return!1;const A=typeof(y==null?void 0:y.zoom)<"u"?y.zoom:N;return await j.setViewport({x:x/2-v*A,y:C/2-b*A,zoom:A},{duration:y==null?void 0:y.duration,ease:y==null?void 0:y.ease,interpolate:y==null?void 0:y.interpolate}),!0},cancelConnection:()=>{m({connection:{...PU}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...MO()})}},Object.is);function zYn({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:c,fitView:u,nodeOrigin:h,nodeExtent:f,zIndexMode:p,children:m}){const[w]=T.useState(()=>NYn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:c,nodeOrigin:h,nodeExtent:f,zIndexMode:p}));return _.jsx($Qn,{value:w,children:_.jsx(_Xn,{children:_.jsx(EXn,{children:m})})})}function jYn({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:c,minZoom:u,maxZoom:h,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return T.useContext(ax)?_.jsx(_.Fragment,{children:e}):_.jsx(zYn,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:h,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const AYn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function TYn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:c,onInit:u,onMove:h,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:y,onNodeMouseMove:x,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:j,onNodeDragStart:A,onNodeDrag:z,onNodeDragStop:M,onNodesDelete:D,onEdgesDelete:I,onDelete:B,onSelectionChange:G,onSelectionDragStart:U,onSelectionDrag:Q,onSelectionDragStop:V,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:$,onBeforeDelete:L,connectionMode:q,connectionLineType:P=yu.Bezier,connectionLineStyle:F,connectionLineComponent:re,connectionLineContainerStyle:ie,deleteKeyCode:ue="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:K=!1,selectionMode:oe=cm.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:pe=um()?"Meta":"Control",zoomActivationKeyCode:ve=um()?"Meta":"Control",snapToGrid:Me,snapGrid:Fe,onlyRenderVisibleElements:Ye=!1,selectNodesOnDrag:Te,nodesDraggable:$e,autoPanOnNodeFocus:yt,nodesConnectable:ot,nodesFocusable:Mt,nodeOrigin:jt=vG,edgesFocusable:Pt,edgesReconnectable:Le,elementsSelectable:nt=!0,defaultViewport:ke=YQn,minZoom:me=.5,maxZoom:je=2,translateExtent:qe=om,preventScrolling:rt=!0,nodeExtent:dt,defaultMarkerColor:st="#b1b1b7",zoomOnScroll:Ut=!0,zoomOnPinch:Xt=!0,panOnScroll:en=!1,panOnScrollSpeed:an=.5,panOnScrollMode:At=cf.Free,zoomOnDoubleClick:gn=!0,panOnDrag:on=!0,onPaneClick:Ot,onPaneMouseEnter:dn,onPaneMouseMove:cn,onPaneMouseLeave:kn,onPaneScroll:Wn,onPaneContextMenu:gs,paneClickDistance:ns=1,nodeClickDistance:gt=0,children:ln,onReconnect:bn,onReconnectStart:un,onReconnectEnd:_r,onEdgeContextMenu:Mn,onEdgeDoubleClick:Qn,onEdgeMouseEnter:ar,onEdgeMouseMove:wt,onEdgeMouseLeave:Ht,reconnectRadius:vr=10,onNodesChange:Pn,onEdgesChange:Qr,noDragClassName:Xn="nodrag",noWheelClassName:Yn="nowheel",noPanClassName:Xr="nopan",fitView:As,fitViewOptions:Fr,connectOnClick:We,attributionPosition:vt,proOptions:fr,defaultEdgeOptions:yn,elevateNodesOnSelect:Hn=!0,elevateEdgesOnSelect:Zn=!1,disableKeyboardA11y:Fn=!1,autoPanOnConnect:Yr,autoPanOnNodeDrag:An,autoPanOnSelection:wo=!0,autoPanSpeed:ai,connectionRadius:Ds,isValidConnection:Hr,onError:t_,style:ko,id:So,nodeDragThreshold:qs,connectionDragThreshold:Us,viewport:Wi,onViewportChange:Gs,width:cr,height:Si,colorMode:Ct="light",debug:za,onScroll:rs,ariaLabelConfig:Ks,zIndexMode:_t="basic",...Bt},oi){const Ci=So||"1",Ei=tXn(Ct),Or=T.useCallback(ci=>{ci.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),rs==null||rs(ci)},[rs]);return _.jsx("div",{"data-testid":"rf__wrapper",...Bt,onScroll:Or,style:{...ko,...AYn},ref:oi,className:ms(["react-flow",s,Ei]),id:So,role:"application",children:_.jsxs(jYn,{nodes:e,edges:n,width:cr,height:Si,fitView:As,fitViewOptions:Fr,minZoom:me,maxZoom:je,nodeOrigin:jt,nodeExtent:dt,zIndexMode:_t,children:[_.jsx(eXn,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:$e,autoPanOnNodeFocus:yt,nodesConnectable:ot,nodesFocusable:Mt,edgesFocusable:Pt,edgesReconnectable:Le,elementsSelectable:nt,elevateNodesOnSelect:Hn,elevateEdgesOnSelect:Zn,minZoom:me,maxZoom:je,nodeExtent:dt,onNodesChange:Pn,onEdgesChange:Qr,snapToGrid:Me,snapGrid:Fe,connectionMode:q,translateExtent:qe,connectOnClick:We,defaultEdgeOptions:yn,fitView:As,fitViewOptions:Fr,onNodesDelete:D,onEdgesDelete:I,onDelete:B,onNodeDragStart:A,onNodeDrag:z,onNodeDragStop:M,onSelectionDrag:Q,onSelectionDragStart:U,onSelectionDragStop:V,onMove:h,onMoveStart:f,onMoveEnd:p,noPanClassName:Xr,nodeOrigin:jt,rfId:Ci,autoPanOnConnect:Yr,autoPanOnNodeDrag:An,autoPanSpeed:ai,onError:t_,connectionRadius:Ds,isValidConnection:Hr,selectNodesOnDrag:Te,nodeDragThreshold:qs,connectionDragThreshold:Us,onBeforeDelete:L,debug:za,ariaLabelConfig:Ks,zIndexMode:_t}),_.jsx(CYn,{onInit:u,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:y,onNodeMouseMove:x,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:j,nodeTypes:i,edgeTypes:a,connectionLineType:P,connectionLineStyle:F,connectionLineComponent:re,connectionLineContainerStyle:ie,selectionKeyCode:se,selectionOnDrag:K,selectionMode:oe,deleteKeyCode:ue,multiSelectionKeyCode:pe,panActivationKeyCode:ce,zoomActivationKeyCode:ve,onlyRenderVisibleElements:Ye,defaultViewport:ke,translateExtent:qe,minZoom:me,maxZoom:je,preventScrolling:rt,zoomOnScroll:Ut,zoomOnPinch:Xt,zoomOnDoubleClick:gn,panOnScroll:en,panOnScrollSpeed:an,panOnScrollMode:At,panOnDrag:on,autoPanOnSelection:wo,onPaneClick:Ot,onPaneMouseEnter:dn,onPaneMouseMove:cn,onPaneMouseLeave:kn,onPaneScroll:Wn,onPaneContextMenu:gs,paneClickDistance:ns,nodeClickDistance:gt,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:$,onReconnect:bn,onReconnectStart:un,onReconnectEnd:_r,onEdgeContextMenu:Mn,onEdgeDoubleClick:Qn,onEdgeMouseEnter:ar,onEdgeMouseMove:wt,onEdgeMouseLeave:Ht,reconnectRadius:vr,defaultMarkerColor:st,noDragClassName:Xn,noWheelClassName:Yn,noPanClassName:Xr,rfId:Ci,disableKeyboardA11y:Fn,nodeExtent:dt,viewport:Wi,onViewportChange:Gs}),_.jsx(XQn,{onSelectionChange:G}),ln,_.jsx(GQn,{proOptions:fr,position:vt}),_.jsx(UQn,{rfId:Ci,disableKeyboardA11y:Fn})]})})}var RYn=yG(TYn);function MYn({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:ms(["react-flow__background-pattern",t,r])})}function OYn({radius:e,className:n}){return _.jsx("circle",{cx:e,cy:e,r:e,className:ms(["react-flow__background-pattern","dots",n])})}var vl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(vl||(vl={}));const DYn={[vl.Dots]:1,[vl.Lines]:1,[vl.Cross]:6},LYn=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function GG({id:e,variant:n=vl.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:c,className:u,patternClassName:h}){const f=T.useRef(null),{transform:p,patternId:m}=Bn(LYn,Tr),w=r||DYn[n],k=n===vl.Dots,v=n===vl.Cross,b=Array.isArray(t)?t:[t,t],y=[b[0]*p[2]||1,b[1]*p[2]||1],x=w*p[2],C=Array.isArray(i)?i:[i,i],N=v?[x,x]:y,j=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],A=`${m}${e||""}`;return _.jsxs("svg",{className:ms(["react-flow__background",u]),style:{...c,...cx,"--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]%y[0],y:p[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${j[0]},-${j[1]})`,children:k?_.jsx(OYn,{radius:x/2,className:h}):_.jsx(MYn,{dimensions:N,lineWidth:s,variant:n,className:h})}),_.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${A})`})]})}GG.displayName="Background";const IYn=T.memo(GG);function $Yn(){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 BYn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:_.jsx("path",{d:"M0 0h32v4.2H0z"})})}function PYn(){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 FYn(){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 HYn(){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 G1({children:e,className:n,...t}){return _.jsx("button",{type:"button",className:ms(["react-flow__controls-button",n]),...t,children:e})}const qYn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function KG({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:c,className:u,children:h,position:f="bottom-left",orientation:p="vertical","aria-label":m}){const w=Mr(),{isInteractive:k,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:y}=Bn(qYn,Tr),{zoomIn:x,zoomOut:C,fitView:N}=h7(),j=()=>{x(),i==null||i()},A=()=>{C(),a==null||a()},z=()=>{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(ox,{className:ms(["react-flow__controls",D,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":m??y["controls.ariaLabel"],children:[n&&_.jsxs(_.Fragment,{children:[_.jsx(G1,{onClick:j,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:b,children:_.jsx($Yn,{})}),_.jsx(G1,{onClick:A,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:v,children:_.jsx(BYn,{})})]}),t&&_.jsx(G1,{className:"react-flow__controls-fitview",onClick:z,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:_.jsx(PYn,{})}),r&&_.jsx(G1,{className:"react-flow__controls-interactive",onClick:M,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:k?_.jsx(HYn,{}):_.jsx(FYn,{})}),h]})}KG.displayName="Controls";T.memo(KG);function UYn({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:c,className:u,borderRadius:h,shapeRendering:f,selected:p,onClick:m}){const{background:w,backgroundColor:k}=i||{},v=a||w||k;return _.jsx("rect",{className:ms(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:h,ry:h,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:c},shapeRendering:f,onClick:m?b=>m(b,e):void 0})}const GYn=T.memo(UYn),KYn=e=>e.nodes.map(n=>n.id),W4=e=>e instanceof Function?e:()=>e;function VYn({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=GYn,onClick:a}){const o=Bn(KYn,Tr),c=W4(n),u=W4(e),h=W4(t),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return _.jsx(_.Fragment,{children:o.map(p=>_.jsx(QYn,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:f},p))})}function WYn({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:c}){const{node:u,x:h,y:f,width:p,height:m}=Bn(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:b,y}=k.internals.positionAbsolute,{width:x,height:C}=Al(v);return{node:v,x:b,y,width:x,height:C}},Tr);return!u||u.hidden||!WU(u)?null:_.jsx(o,{x:h,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 QYn=T.memo(WYn);var XYn=T.memo(VYn);const YYn=200,ZYn=150,JYn=e=>!e.hidden,eZn=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(Ym(e.nodeLookup,{filter:JYn}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},tZn="react-flow__minimap-desc";function VG({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:c,maskColor:u,maskStrokeColor:h,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:w,pannable:k=!1,zoomable:v=!1,ariaLabel:b,inversePan:y,zoomStep:x=1,offsetScale:C=5}){const N=Mr(),j=T.useRef(null),{boundingRect:A,viewBB:z,rfId:M,panZoom:D,translateExtent:I,flowWidth:B,flowHeight:G,ariaLabelConfig:U}=Bn(eZn,Tr),Q=(e==null?void 0:e.width)??YYn,V=(e==null?void 0:e.height)??ZYn,Z=A.width/Q,J=A.height/V,$=Math.max(Z,J),L=$*Q,q=$*V,P=C*$,F=A.x-(L-A.width)/2-P,re=A.y-(q-A.height)/2-P,ie=L+P*2,ue=q+P*2,se=`${tZn}-${M}`,K=T.useRef(0),oe=T.useRef();K.current=$,T.useEffect(()=>{if(j.current&&D)return oe.current=vQn({domNode:j.current,panZoom:D,getTransform:()=>N.getState().transform,getViewScale:()=>K.current}),()=>{var Me;(Me=oe.current)==null||Me.destroy()}},[D]),T.useEffect(()=>{var Me;(Me=oe.current)==null||Me.update({translateExtent:I,width:B,height:G,inversePan:y,pannable:k,zoomStep:x,zoomable:v})},[k,v,y,x,I,B,G]);const ce=m?Me=>{var Te;const[Fe,Ye]=((Te=oe.current)==null?void 0:Te.pointer(Me))||[0,0];m(Me,{x:Fe,y:Ye})}:void 0,pe=w?T.useCallback((Me,Fe)=>{const Ye=N.getState().nodeLookup.get(Fe).internals.userNode;w(Me,Ye)},[]):void 0,ve=b??U["minimap.ariaLabel"];return _.jsx(ox,{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 h=="string"?h: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:ms(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:_.jsxs("svg",{width:Q,height:V,viewBox:`${F} ${re} ${ie} ${ue}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:j,onClick:ce,children:[ve&&_.jsx("title",{id:se,children:ve}),_.jsx(XYn,{onClick:pe,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),_.jsx("path",{className:"react-flow__minimap-mask",d:`M${F-P},${re-P}h${ie+P*2}v${ue+P*2}h${-ie-P*2}z + M${z.x},${z.y}h${z.width}v${z.height}h${-z.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}VG.displayName="MiniMap";T.memo(VG);const nZn=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,rZn={[Gh.Line]:"right",[Gh.Handle]:"bottom-right"};function sZn({nodeId:e,position:n,variant:t=Gh.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:w,onResizeStart:k,onResize:v,onResizeEnd:b}){const y=SG(),x=typeof e=="string"?e:y,C=Mr(),N=T.useRef(null),j=t===Gh.Handle,A=Bn(T.useCallback(nZn(j&&m),[j,m]),Tr),z=T.useRef(null),M=n??rZn[t];T.useEffect(()=>{if(!(!N.current||!x))return z.current||(z.current=TQn({domNode:N.current,nodeId:x,getStoreItems:()=>{const{nodeLookup:I,transform:B,snapGrid:G,snapToGrid:U,nodeOrigin:Q,domNode:V}=C.getState();return{nodeLookup:I,transform:B,snapGrid:G,snapToGrid:U,nodeOrigin:Q,paneDomNode:V}},onChange:(I,B)=>{const{triggerNodeChanges:G,nodeLookup:U,parentLookup:Q,nodeOrigin:V}=C.getState(),Z=[],J={x:I.x,y:I.y},$=U.get(x);if($&&$.expandParent&&$.parentId){const L=$.origin??V,q=I.width??$.measured.width??0,P=I.height??$.measured.height??0,F={id:$.id,parentId:$.parentId,rect:{width:q,height:P,...QU({x:I.x??$.position.x,y:I.y??$.position.y},{width:q,height:P},$.parentId,U,L)}},re=d7([F],U,Q,V);Z.push(...re),J.x=I.x?Math.max(L[0]*q,I.x):void 0,J.y=I.y?Math.max(L[1]*P,I.y):void 0}if(J.x!==void 0&&J.y!==void 0){const L={id:x,type:"position",position:{...J}};Z.push(L)}if(I.width!==void 0&&I.height!==void 0){const q={id:x,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};Z.push(q)}for(const L of B){const q={...L,type:"position"};Z.push(q)}G(Z)},onEnd:({width:I,height:B})=>{const G={id:x,type:"dimensions",resizing:!1,dimensions:{width:I,height:B}};C.getState().triggerNodeChanges([G])}})),z.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:c,maxWidth:u,maxHeight:h},keepAspectRatio:f,resizeDirection:p,onResizeStart:k,onResize:v,onResizeEnd:b,shouldResize:w}),()=>{var I;(I=z.current)==null||I.destroy()}},[M,o,c,u,h,f,k,v,b,w]);const D=M.split("-");return _.jsx("div",{className:ms(["react-flow__resize-control","nodrag",...D,t,r]),ref:N,style:{...s,scale:A,...a&&{[j?"backgroundColor":"borderColor"]:a}},children:i})}T.memo(sZn);function iZn(){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 K1=8;function aZn(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=T.useState({viewWidth:0,viewHeight:0});T.useEffect(()=>{function h(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",h),h(),()=>window.removeEventListener("resize",h)},[]);let o=0,c=0,u=0;if(e){const{distance:h}=e;switch(e.anchor){case"left":o=e.x-t-h,c=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+h,c=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,c=e.y+e.height+h;break;case"above":o=e.x+e.width/2-t/2,c=e.y-r-h;break}const f=o,p=c;o=Math.min(Math.max(o,K1),i-t-K1),c=Math.min(Math.max(c,K1),s-r-K1),u=e.anchor==="left"||e.anchor==="right"?p-c:f-o}return{x:o,y:c,arrowAdjustment:u}}const Q4=380,X4=12,oZn=350,cZn=150,Gk=new EventTarget;function lZn(){Gk.dispatchEvent(new Event("move"))}function uZn(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 Gk.addEventListener("move",u),()=>{Gk.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),T.useEffect(()=>{r(u=>{var f;if(!u)return u;const h=((f=e.current)==null?void 0:f.getBoundingClientRect())??null;return h&&u.x===h.x&&u.y===h.y&&u.width===h.width&&u.height===h.height?u:h})},[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)},oZn)},[e]),o=T.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),cZn)},[]),c=T.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:c}}function _Zn(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 fZn({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:a,onMouseEnter:o,onMouseLeave:c}){const u=iZn(),h=s.right+X4+Q4<=window.innerWidth,f=s.x-X4-Q4>=0,p=h?"right":f?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:w}=aZn({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:X4},u),k=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:v}=ut({...FEn(k??""),enabled:!!k,subscribed:!!k}),b=T.useMemo(()=>{if(!v)return null;const B=v;let G=B.diff;if(B.truncated){const Z=G.lastIndexOf(` diff --git `);G=Z!==-1?G.slice(0,Z+1):G.slice(0,G.lastIndexOf(` -`)+1)}let q=[];try{q=G.trim()?v5(G):[]}catch{return null}if(B.truncated&&q.every(Z=>Z.hunks.length===0))return null;let Q=0,K=0;for(const Z of q){const J=xy(Z);Q+=J.additions,K+=J.deletions}return{fileCount:q.length,additions:Q,deletions:K,truncated:B.truncated}},[v]),y={done:0,failed:0,cancelled:0,live:0};for(const B of n)B.status==="done"?y.done+=1:B.status==="failed"?y.failed+=1:B.status==="cancelled"?y.cancelled+=1:y.live+=1;const x=t?I0((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,j=mI(n),A=T.useRef(null),[z,M]=T.useState(!1),[D,I]=T.useState(!1);return T.useEffect(()=>{M(!1)},[N]),T.useEffect(()=>{const B=A.current;B&&I(B.scrollHeight>B.clientHeight+1)},[N,z]),ai.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:G4,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?ha(t):"idle"})]}),e.title&&_.jsx("div",{className:"hc-title",children:e.title}),_.jsxs("div",{className:"hc-actions",children:[i&&_.jsxs("button",{type:"button",...Wr(i),children:[_.jsx(xo,{size:13}),FDe()]}),_.jsxs("button",{type:"button",...Wr(a),children:[_.jsx(Wb,{size:13}),yDe()]})]}),N&&_.jsx("div",{className:`hc-body${z?" expanded":""}`,ref:A,children:N}),N&&(D||z)&&_.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>M(B=>!B),children:z?iL():xAe()}),C&&_.jsx("div",{className:"hc-failure",children:C}),j&&_.jsx("div",{className:"hc-monitoring",title:j,children:j}),_.jsxs("div",{className:"hc-stats",children:[_.jsx("span",{children:new Intl.ListFormat(E(),{style:"short"}).format([n.length===1?JYe():aZe({count:Zt(n.length)}),...y.done>0?[_Ye({count:Zt(y.done)})]:[],...y.failed>0?[vYe({count:Zt(y.failed)})]:[],...y.cancelled>0?[sYe({count:Zt(y.cancelled)})]:[],...y.live>0?[BYe({count:Zt(y.live)})]:[]])}),t&&CS(t.backend)&&_.jsx(XS,{backend:t.backend}),x&&_.jsx("span",{children:x}),t&&_.jsx("span",{children:yo(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(Im,{size:12}),e.branchName]}),r&&_.jsxs("span",{children:[ODe()," ",_.jsx("span",{children:r})]})]}),b&&b.fileCount>0&&_.jsx("div",{className:"hc-git-row",title:b.truncated?oY({parent:Ce(r??"parent")}):eY({parent:Ce(r??"parent")}),children:_.jsxs("span",{children:[b.truncated&&"≥ ",_.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",b.additions]})," ",_.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",b.deletions]})," · ",b.fileCount===1&&!b.truncated?VYe():b.truncated?RYe({count:Zt(b.fileCount)}):CYe({count:Zt(b.fileCount)})]})})]}),_.jsxs("div",{className:"hc-foot",children:[_.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),_.jsxs("span",{children:[NDe()," ",PXn(e.createdAt)]})]})]}),document.body)}const kO=["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(" "),HXn=264,qXn=132,yv=44,UXn=72,GXn=148,VXn=44,KXn=160,WXn=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 XXn(e,n){const t=new Map,r=o=>{const c=t.get(o)??1+o.children.reduce((u,h)=>u+r(h),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 h=[];let f=0;for(const p of o.children)i(p)?h.push(...a(p)):f+=r(p);return f>0&&h.push({kind:"elided",id:`el-${o.exp.id}`,count:f,children:[]}),[{kind:"exp",exp:o.exp,children:h}]}if(!i(o))return[];let c=0;const u=[];return(function h(f){c+=1;for(const p of f.children)n(p)?u.push(...a(p)):i(p)?h(p):c+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:c,children:u}]}return e.flatMap(a)}function YXn(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 $k(e){return e.kind==="exp"?HXn:e.kind==="archived"?KXn:GXn}function ZXn(e){return e.kind==="exp"?qXn:VXn}function K1(e){return e.kind==="exp"?e.exp.id:e.id}function xv(e){if(e.children.length===0)return $k(e);const n=e.children.reduce((t,r)=>t+xv(r),0)+yv*(e.children.length-1);return Math.max($k(e),n)}function JXn(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const eYn=T.memo(function({data:n}){Yu();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:c,onOpenView:u,onOpenCode:h,onArchive:f,actions:p}=n,m=r?ha(r):void 0,w=m==="running"||m==="starting"||m==="cancelling",k=i?vgn():w?C1n():nl(),v=s.slice(-8),b=T.useRef(null),y=BXn(b,n);return _.jsxs("div",{ref:b,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:y.onMouseEnter,onMouseLeave:y.onMouseLeave,children:[_.jsx(fc,{type:"target",position:Rt.Top}),_.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...Wr(x=>u(t.id,"overview",x)),children:[_.jsxs("div",{className:"node-eyebrow",children:[_.jsx("span",{children:t.archived?uI():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:Mvn()}),v.length>0?_.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:v.map(x=>_.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 ${JXn(ha(x))}`,title:R6(ha(x))},x.id))}):_.jsx("span",{children:bvn()}),_.jsx("span",{className:"flex-1"}),r&&_.jsx("span",{children:yo(r.createdAt)})]})]}),_.jsxs("div",{className:"node-actions",onClick:x=>x.stopPropagation(),children:[s.length>0&&_.jsxs("button",{className:"node-action",title:Evn(),...Wr(x=>u(t.id,"terminal",x)),children:[_.jsx(xo,{size:13}),fI()]}),_.jsxs("button",{className:"node-action",title:UD({branch:Ce(t.branchName)}),...Wr(x=>h(t.id,t.branchName,"files",x)),children:[_.jsx(Wb,{size:13}),V1n()]}),o&&c&&_.jsx("a",{className:"node-action",title:Ov({name:Ce(t.branchName)}),"aria-label":Ov({name:Ce(t.branchName)}),href:qb(o,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:x=>x.stopPropagation(),children:_.jsx(ty,{size:13})}),_.jsx(Wq,{id:t.id,name:t.slug,actions:p,onArchive:f,compact:!0})]}),_.jsx(fc,{type:"source",position:Rt.Bottom}),y.rect&&_.jsx(FXn,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:y.rect,onOpenLogs:s.length>0?x=>u(t.id,"terminal",x):void 0,onOpenCode:x=>h(t.id,t.branchName,"files",x),onMouseEnter:y.keepOpen,onMouseLeave:y.onMouseLeave})]})}),tYn=T.memo(function({data:n}){Yu();const{rootId:t,count:r,onRestoreRegion:s}=n,i=T.useRef(null),a=Vi(i),[o,c]=T.useState({top:0,left:0}),u=()=>{if(!a.open&&i.current){const h=i.current.getBoundingClientRect(),f=window.innerHeight-h.bottom>=44;c({top:f?h.bottom+4:Math.max(4,h.top-44),left:Math.max(4,Math.min(h.left,window.innerWidth-232))})}a.setOpen(h=>!h)};return _.jsxs("div",{className:"archived-node w-40 h-11",children:[_.jsx(fc,{type:"target",position:Rt.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(YSn,{size:15,className:"shrink-0 text-subtext","aria-hidden":"true"}),_.jsx("span",{children:_gn({count:Zt(r)})})]}),_.jsx(fc,{type:"source",position:Rt.Bottom}),a.open&&ai.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(yn,{onClick:()=>{a.setOpen(!1),s(t)},children:r===1?_I():i1n({count:Zt(r)})})}),document.body)]})}),nYn=T.memo(function({data:n}){Yu();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:Pvn(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[_.jsx(fc,{type:"target",position:Rt.Top}),_.jsx(Lm,{size:14}),_.jsxs("span",{className:"elided-node-label",children:[t===1?Ggn():Tgn({count:Zt(t)}),_.jsx("span",{className:"elided-node-sub",children:$gn()})]}),_.jsx(fc,{type:"source",position:Rt.Bottom})]})}),rYn={exp:eYn,archived:tYn,elided:nYn},DG={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},sYn={...DG.style,strokeDasharray:"4 4"};function iYn({experiments:e,archiveActions:n,showArchived:t,runs:r,project:s,onOpenView:i,onOpenCode:a,onArchive:o,agentSessionId:c,onShowProjectScope:u,onRestoreRegion:h,viewport:f,onViewportChange:p}){const{nodes:m,edges:w}=T.useMemo(()=>{const k=new Map;for(const z of r){const M=k.get(z.experimentId);M?M.push(z):k.set(z.experimentId,[z])}for(const z of k.values())z.sort((M,D)=>M.createdAt-D.createdAt);const v=[],b=[],y=z=>!c||z.exp.chatSessionId===c,x=XXn(QXn(e),y),C=t?x:YXn(x),N=new Map(e.map(z=>[z.id,z.slug]));function j(z,M,D){const I=M-$k(z)/2;if(z.kind==="exp"){const q=k.get(z.exp.id)??[];v.push({id:z.exp.id,type:"exp",position:{x:I,y:D},data:{exp:z.exp,latestRun:q[q.length-1]??null,runs:q,isBaseline:!z.exp.parentExperimentId,parentSlug:z.exp.parentExperimentId?N.get(z.exp.parentExperimentId)??null:null,githubOwner:s.githubEnabled?s.githubOwner:"",githubRepo:s.githubEnabled?s.githubRepo:"",onOpenView:i,onOpenCode:a,onArchive:o,actions:n.get(z.exp.id)}})}else z.kind==="archived"?v.push({id:z.id,type:"archived",position:{x:I,y:D},data:{rootId:z.rootId,count:z.count,onRestoreRegion:h}}):v.push({id:z.id,type:"elided",position:{x:I,y:D},data:{count:z.count,onShowProjectScope:u}});if(z.children.length===0)return;const B=z.children.reduce((q,Q)=>q+xv(Q),0)+yv*(z.children.length-1);let G=M-B/2;for(const q of z.children){const Q=xv(q),K=z.kind!=="exp"||q.kind!=="exp"||z.exp.archived||q.exp.archived;b.push({id:`e-${K1(z)}-${K1(q)}`,source:K1(z),target:K1(q),...K?{style:sYn}:{}}),j(q,G+Q/2,D+ZXn(z)+(q.kind==="archived"?WXn:UXn)),G+=Q+yv}}let A=0;for(const z of C){const M=xv(z);j(z,A+M/2,0),A+=M+yv}return{nodes:v,edges:b}},[e,n,t,r,i,a,o,s.githubOwner,s.githubRepo,s.githubEnabled,c,u,h]);return e.length===0?_.jsxs("div",{className:kO,children:[_.jsx("p",{className:"empty-state-title",children:fvn()}),_.jsx("p",{className:"empty-state-hint",children:B1n()})]}):m.length===0&&c?_.jsxs("div",{className:kO,children:[_.jsx("p",{className:"empty-state-title",children:ivn()}),_.jsx("p",{className:"empty-state-hint",children:R1n()})]}):_.jsx(oXn,{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:rYn,defaultEdgeOptions:DG,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:$Xn,onMoveEnd:(k,v)=>{k&&p(v)},minZoom:.15,defaultViewport:f??void 0,fitView:f===null,fitViewOptions:{padding:.25,maxZoom:1},children:_.jsx(fXn,{variant:gl.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},c??"project")}const o0=["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 aYn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function oYn(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("~/")||rC(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},h=i.startsWith("/")&&c?u(c):null,f=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(h!==null)return h?{path:h,source:"artifacts"}:null;if(f!==null)i=f;else{const p=s?aYn(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 cYn(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const lYn=10,SO=1448,uYn=80,_Yn=48;function CO(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 EO(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 W1=e=>Ce(e instanceof Error?e.message:String(e));function fYn({runtime:e,projectId:n,pane:t}){var f_,d_,h_,Ri;const r=gn({mutationFn:Bwn}),s=xi(),i=LD({select:Y=>Y.location}),a=vf(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=(a==null?void 0:a.kind)==="task"?a.sessionId??null:c.current;(a==null?void 0:a.kind)==="task"&&(c.current=u);const h=t!==void 0,f=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[p,m]=T.useState(null),[w,k]=T.useState(0),v=`${i.href} +`)+1)}let U=[];try{U=G.trim()?E5(G):[]}catch{return null}if(B.truncated&&U.every(Z=>Z.hunks.length===0))return null;let Q=0,V=0;for(const Z of U){const J=Cy(Z);Q+=J.additions,V+=J.deletions}return{fileCount:U.length,additions:Q,deletions:V,truncated:B.truncated}},[v]),y={done:0,failed:0,cancelled:0,live:0};for(const B of n)B.status==="done"?y.done+=1:B.status==="failed"?y.failed+=1:B.status==="cancelled"?y.cancelled+=1:y.live+=1;const x=t?$0((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,j=TI(n),A=T.useRef(null),[z,M]=T.useState(!1),[D,I]=T.useState(!1);return T.useEffect(()=>{M(!1)},[N]),T.useEffect(()=>{const B=A.current;B&&I(B.scrollHeight>B.clientHeight+1)},[N,z]),si.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:Q4,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(ml,{status:t?pa(t):"idle"})]}),e.title&&_.jsx("div",{className:"hc-title",children:e.title}),_.jsxs("div",{className:"hc-actions",children:[i&&_.jsxs("button",{type:"button",...Wr(i),children:[_.jsx(bo,{size:13}),LLe()]}),_.jsxs("button",{type:"button",...Wr(a),children:[_.jsx(Xb,{size:13}),pLe()]})]}),N&&_.jsx("div",{className:`hc-body${z?" expanded":""}`,ref:A,children:N}),N&&(D||z)&&_.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>M(B=>!B),children:z?vL():mTe()}),C&&_.jsx("div",{className:"hc-failure",children:C}),j&&_.jsx("div",{className:"hc-monitoring",title:j,children:j}),_.jsxs("div",{className:"hc-stats",children:[_.jsx("span",{children:new Intl.ListFormat(E(),{style:"short"}).format([n.length===1?vJe():CJe({count:Jt(n.length)}),...y.done>0?[AZe({count:Jt(y.done)})]:[],...y.failed>0?[IZe({count:Jt(y.failed)})]:[],...y.cancelled>0?[kZe({count:Jt(y.cancelled)})]:[],...y.live>0?[sJe({count:Jt(y.live)})]:[]])}),t&&OS(t.backend)&&_.jsx(i6,{backend:t.backend}),x&&_.jsx("span",{children:x}),t&&_.jsx("span",{children:vo(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(Im,{size:12}),e.branchName]}),r&&_.jsxs("span",{children:[jLe()," ",_.jsx("span",{children:r})]})]}),b&&b.fileCount>0&&_.jsx("div",{className:"hc-git-row",title:b.truncated?wY({parent:Ce(r??"parent")}):pY({parent:Ce(r??"parent")}),children:_.jsxs("span",{children:[b.truncated&&"≥ ",_.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",b.additions]})," ",_.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",b.deletions]})," · ",b.fileCount===1&&!b.truncated?_Je():b.truncated?YZe({count:Jt(b.fileCount)}):UZe({count:Jt(b.fileCount)})]})})]}),_.jsxs("div",{className:"hc-foot",children:[_.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),_.jsxs("span",{children:[wLe()," ",_Zn(e.createdAt)]})]})]}),document.body)}const OO=["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(" "),dZn=264,hZn=132,yv=44,pZn=72,mZn=148,gZn=44,vZn=160,bZn=64;function yZn(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 xZn(e,n){const t=new Map,r=o=>{const c=t.get(o)??1+o.children.reduce((u,h)=>u+r(h),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 h=[];let f=0;for(const p of o.children)i(p)?h.push(...a(p)):f+=r(p);return f>0&&h.push({kind:"elided",id:`el-${o.exp.id}`,count:f,children:[]}),[{kind:"exp",exp:o.exp,children:h}]}if(!i(o))return[];let c=0;const u=[];return(function h(f){c+=1;for(const p of f.children)n(p)?u.push(...a(p)):i(p)?h(p):c+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:c,children:u}]}return e.flatMap(a)}function wZn(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 Kk(e){return e.kind==="exp"?dZn:e.kind==="archived"?vZn:mZn}function kZn(e){return e.kind==="exp"?hZn:gZn}function V1(e){return e.kind==="exp"?e.exp.id:e.id}function xv(e){if(e.children.length===0)return Kk(e);const n=e.children.reduce((t,r)=>t+xv(r),0)+yv*(e.children.length-1);return Math.max(Kk(e),n)}function SZn(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const CZn=T.memo(function({data:n}){Qu();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:c,onOpenView:u,onOpenCode:h,onArchive:f,actions:p}=n,m=r?pa(r):void 0,w=m==="running"||m==="starting"||m==="cancelling",k=i?I1n():w?Uvn():rl(),v=s.slice(-8),b=T.useRef(null),y=uZn(b,n);return _.jsxs("div",{ref:b,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:y.onMouseEnter,onMouseLeave:y.onMouseLeave,children:[_.jsx(dc,{type:"target",position:Rt.Top}),_.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...Wr(x=>u(t.id,"overview",x)),children:[_.jsxs("div",{className:"node-eyebrow",children:[_.jsx("span",{children:t.archived?CI():k}),_.jsx(ml,{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:Zbn()}),v.length>0?_.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:v.map(x=>_.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 ${SZn(pa(x))}`,title:G6(pa(x))},x.id))}):_.jsx("span",{children:$bn()}),_.jsx("span",{className:"flex-1"}),r&&_.jsx("span",{children:vo(r.createdAt)})]})]}),_.jsxs("div",{className:"node-actions",onClick:x=>x.stopPropagation(),children:[s.length>0&&_.jsxs("button",{className:"node-action",title:Gbn(),...Wr(x=>u(t.id,"terminal",x)),children:[_.jsx(bo,{size:13}),NI()]}),_.jsxs("button",{className:"node-action",title:rL({branch:Ce(t.branchName)}),...Wr(x=>h(t.id,t.branchName,"files",x)),children:[_.jsx(Xb,{size:13}),_bn()]}),o&&c&&_.jsx("a",{className:"node-action",title:Ov({name:Ce(t.branchName)}),"aria-label":Ov({name:Ce(t.branchName)}),href:Gb(o,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:x=>x.stopPropagation(),children:_.jsx(ry,{size:13})}),_.jsx(oU,{id:t.id,name:t.slug,actions:p,onArchive:f,compact:!0})]}),_.jsx(dc,{type:"source",position:Rt.Bottom}),y.rect&&_.jsx(fZn,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:y.rect,onOpenLogs:s.length>0?x=>u(t.id,"terminal",x):void 0,onOpenCode:x=>h(t.id,t.branchName,"files",x),onMouseEnter:y.keepOpen,onMouseLeave:y.onMouseLeave})]})}),EZn=T.memo(function({data:n}){Qu();const{rootId:t,count:r,onRestoreRegion:s}=n,i=T.useRef(null),a=Ki(i),[o,c]=T.useState({top:0,left:0}),u=()=>{if(!a.open&&i.current){const h=i.current.getBoundingClientRect(),f=window.innerHeight-h.bottom>=44;c({top:f?h.bottom+4:Math.max(4,h.top-44),left:Math.max(4,Math.min(h.left,window.innerWidth-232))})}a.setOpen(h=>!h)};return _.jsxs("div",{className:"archived-node w-40 h-11",children:[_.jsx(dc,{type:"target",position:Rt.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(gCn,{size:15,className:"shrink-0 text-subtext","aria-hidden":"true"}),_.jsx("span",{children:A1n({count:Jt(r)})})]}),_.jsx(dc,{type:"source",position:Rt.Bottom}),a.open&&si.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(vn,{onClick:()=>{a.setOpen(!1),s(t)},children:r===1?EI():Svn({count:Jt(r)})})}),document.body)]})}),NZn=T.memo(function({data:n}){Qu();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:iyn(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[_.jsx(dc,{type:"target",position:Rt.Top}),_.jsx(Lm,{size:14}),_.jsxs("span",{className:"elided-node-label",children:[t===1?uvn():X1n({count:Jt(t)}),_.jsx("span",{className:"elided-node-sub",children:rvn()})]}),_.jsx(dc,{type:"source",position:Rt.Bottom})]})}),zZn={exp:CZn,archived:EZn,elided:NZn},WG={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},jZn={...WG.style,strokeDasharray:"4 4"};function AZn({experiments:e,archiveActions:n,showArchived:t,runs:r,project:s,onOpenView:i,onOpenCode:a,onArchive:o,agentSessionId:c,onShowProjectScope:u,onRestoreRegion:h,viewport:f,onViewportChange:p}){const{nodes:m,edges:w}=T.useMemo(()=>{const k=new Map;for(const z of r){const M=k.get(z.experimentId);M?M.push(z):k.set(z.experimentId,[z])}for(const z of k.values())z.sort((M,D)=>M.createdAt-D.createdAt);const v=[],b=[],y=z=>!c||z.exp.chatSessionId===c,x=xZn(yZn(e),y),C=t?x:wZn(x),N=new Map(e.map(z=>[z.id,z.slug]));function j(z,M,D){const I=M-Kk(z)/2;if(z.kind==="exp"){const U=k.get(z.exp.id)??[];v.push({id:z.exp.id,type:"exp",position:{x:I,y:D},data:{exp:z.exp,latestRun:U[U.length-1]??null,runs:U,isBaseline:!z.exp.parentExperimentId,parentSlug:z.exp.parentExperimentId?N.get(z.exp.parentExperimentId)??null:null,githubOwner:s.githubEnabled?s.githubOwner:"",githubRepo:s.githubEnabled?s.githubRepo:"",onOpenView:i,onOpenCode:a,onArchive:o,actions:n.get(z.exp.id)}})}else z.kind==="archived"?v.push({id:z.id,type:"archived",position:{x:I,y:D},data:{rootId:z.rootId,count:z.count,onRestoreRegion:h}}):v.push({id:z.id,type:"elided",position:{x:I,y:D},data:{count:z.count,onShowProjectScope:u}});if(z.children.length===0)return;const B=z.children.reduce((U,Q)=>U+xv(Q),0)+yv*(z.children.length-1);let G=M-B/2;for(const U of z.children){const Q=xv(U),V=z.kind!=="exp"||U.kind!=="exp"||z.exp.archived||U.exp.archived;b.push({id:`e-${V1(z)}-${V1(U)}`,source:V1(z),target:V1(U),...V?{style:jZn}:{}}),j(U,G+Q/2,D+kZn(z)+(U.kind==="archived"?bZn:pZn)),G+=Q+yv}}let A=0;for(const z of C){const M=xv(z);j(z,A+M/2,0),A+=M+yv}return{nodes:v,edges:b}},[e,n,t,r,i,a,o,s.githubOwner,s.githubRepo,s.githubEnabled,c,u,h]);return e.length===0?_.jsxs("div",{className:OO,children:[_.jsx("p",{className:"empty-state-title",children:Tbn()}),_.jsx("p",{className:"empty-state-hint",children:sbn()})]}):m.length===0&&c?_.jsxs("div",{className:OO,children:[_.jsx("p",{className:"empty-state-title",children:Sbn()}),_.jsx("p",{className:"empty-state-hint",children:Yvn()})]}):_.jsx(RYn,{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:zZn,defaultEdgeOptions:WG,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:lZn,onMoveEnd:(k,v)=>{k&&p(v)},minZoom:.15,defaultViewport:f??void 0,fitView:f===null,fitViewOptions:{padding:.25,maxZoom:1},children:_.jsx(IYn,{variant:vl.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},c??"project")}const c0=["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 TZn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function RZn(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("~/")||mC(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},h=i.startsWith("/")&&c?u(c):null,f=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(h!==null)return h?{path:h,source:"artifacts"}:null;if(f!==null)i=f;else{const p=s?TZn(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 MZn(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const OZn=10,DO=1448,DZn=80,LZn=48;function LO(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 IO(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 W1=e=>Ce(e instanceof Error?e.message:String(e));function IZn({runtime:e,projectId:n,pane:t}){var f_,d_,Ri,Dc;const r=pn({mutationFn:s3n}),s=xi(),i=QD({select:Y=>Y.location}),a=gf(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=(a==null?void 0:a.kind)==="task"?a.sessionId??null:c.current;(a==null?void 0:a.kind)==="task"&&(c.current=u);const h=t!==void 0,f=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[p,m]=T.useState(null),[w,k]=T.useState(0),v=`${i.href} ${JSON.stringify(t??null)} -${w}`,b=T.useRef({key:"",value:0});b.current.key!==v&&(b.current={key:v,value:b.current.value+1});const y=T.useMemo(()=>{const Y=t?uo(t):"experiments";return typeof Y=="object"&&"path"in Y&&Y.line&&p!==b.current.value?{...Y,lineScrollRequest:b.current.value}:Y},[t,p,i.href,w]),x=_t(Gi(n)),C=T.useMemo(()=>{var Y;return((Y=x.data)==null?void 0:Y.map(_e=>_e.id))??null},[x.data]),N=T.useRef(new Set),j=T.useRef(new Set),A=T.useRef({}),[z,M]=T.useState(0),D=T.useRef({projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"});D.current={projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"};const I=T.useCallback((Y,_e=!1)=>{const xe=D.current;xe.projectId&&s.navigate({href:iv(xe.projectId,xe.activeSessionId,Y),replace:_e})},[s]),B=T.useCallback(Y=>{const _e=_l(Y);I(_e.kind==="file"?{..._e,line:void 0}:_e)},[I]),G=T.useCallback(()=>I(void 0),[I]),q=T.useCallback(Y=>{(t==null?void 0:t.kind)==="experiment"&&I({...t,runId:Y??void 0})},[t,I]),Q=T.useCallback(Y=>{s.navigate({href:Y?`/projects/${encodeURIComponent(Y)}`:"/projects"})},[s]),K=T.useCallback(Y=>{var _e;if(n)if(Y==="chat"){const xe=c.current;s.navigate({href:iv(n,xe,(_e=Iu(Ns.current,xe??"new"))==null?void 0:_e.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${Y==="skills"?"skills":`settings/${Y}`}`})},[s,n]),Z=Yu(),{status:J}=z6(e.kind==="local"),$=T.useMemo(()=>zh(),[n]),L=_t($),F=L.data??null,U=T.useCallback(Y=>{Vr($.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[$]),H=T.useMemo(()=>Om(),[n]),ae=_t(H),ie=ae.data??null,ue=T.useCallback(Y=>{Vr(H.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[H]),re=T.useRef(void 0);re.current=ie==null?void 0:ie.tourCompleted;const V=[!x.data&&x.error?XD():null,!L.data&&L.error?g0():null,!ae.data&&ae.error?V_e():null].filter(Y=>Y!==null),oe=V.length?afe({items:new Intl.ListFormat(Z).format(V)}):null,ce=T.useRef(null),me=_t(Vv(n)),ve=me.data??[],Re=!me.isPending,[Fe,Xe]=T.useState(!1),$e=_t(Ru(n)).data??[],wt=T.useRef($e);wt.current=$e;const ot=T.useRef(new Map),Mt=T.useRef(new Set),jt=T.useRef(null),Ft=T.useRef(!1),Le=T.useRef(new Map),tt=T.useRef(new Map),ke=T.useRef(0),ge=T.useRef(ve);ge.current=ve;const qe=_t(w9n(n)).data??null,[nt,ht]=T.useState("table"),[rt,qt]=T.useState(!1),[Xt,Jt]=T.useState("project"),an=T.useRef(null),{open:At,setOpen:bn,ref:on}=Vi(an),[Ot,hn]=T.useState(!1),cn=ve.every(Y=>Y.chatSessionId),Sn=u&&cn?Xt:"project",Vn=T.useMemo(()=>Sn!=="agent"?ve:ve.filter(Y=>Y.chatSessionId===u),[ve,Sn,u]),hs=T.useMemo(()=>Vn.filter(Y=>rt||!Y.archived),[Vn,rt]),es=T.useMemo(()=>zqn(ve),[ve]),bt=T.useCallback(async(Y,_e,xe)=>{try{await e4n(Y,_e,xe),await et.invalidateQueries({queryKey:Vv(n).queryKey})}catch(Me){sn(Me instanceof Error?Me.message:String(Me),"error")}},[n]),ln=T.useCallback(Y=>{bt(Y,Sn==="agent"?"taskRegion":"region",!1)},[bt,Sn]),xn=T.useMemo(()=>{if(Sn!=="agent")return $e;const Y=new Set(Vn.map(_e=>_e.id));return $e.filter(_e=>Y.has(_e.experimentId))},[$e,Vn,Sn]),[un,ur]=T.useState([]),[Rn,Kn]=T.useState(!1),[rr,St]=T.useState(!1),[It,ir]=T.useState(!1),[ar,Tr]=T.useState(!1),[sr,Bn]=T.useState(null),[Br,Ds]=T.useState([]),[Pr,Us]=T.useState([]),We=T.useRef(new Map),ft=T.useRef(new Map),Pn=Y=>{let _e=ft.current.get(Y);return _e||(_e=new aqn,ft.current.set(Y,_e)),_e},[Wn,Ln]=T.useState([]),[En,Rr]=T.useState([]),[_n,So]=T.useState([]),[ci,Ls]=T.useState([]),[Fr,n_]=T.useState([]),[Co,Eo]=T.useState(null),[Gs,Vs]=T.useState("files"),[Wi,Ks]=T.useState(new Set),[or,Si]=T.useState(!1),[Ct,Na]=T.useState(null),[ts,Ws]=T.useState(q$),[ut,Pt]=T.useState(()=>window.innerWidth>=SO),li=o==="chat"&&!h&&ut,[Ci,Ei]=T.useState(!0),[Mr,ui]=T.useState(!1),wc=T.useRef(VS()),Qi=T.useRef(u);Qi.current=u;const ns=T.useRef(un);ns.current=un;const Qa=T.useRef(Fr);Qa.current=Fr;const Ni=T.useRef(null),Yt=T.useCallback(Y=>{const _e=[...Y];Qa.current=_e,n_(_e)},[]),zi=T.useCallback(Y=>{Ni.current=Y,Eo(Y)},[]),jl=T.useCallback(Y=>{const _e=Tt(Y);Ds(Ae=>Qp(Ae,_e)),Us(Ae=>Qp(Ae,_e)),Ln(Ae=>Qp(Ae,_e)),Rr(Ae=>Qp(Ae,_e)),Ls(Ae=>Qp(Ae,_e));const xe=ja.current;if(xe&&"path"in Y){const Ae=qs(xe,Qi.current,Y);We.current.delete(Ae),ft.current.delete(Ae),j.current.delete(Ae),N.current.delete(Ae)}const Me=ns.current.filter(Ae=>Tt(Ae)!==_e);ns.current=Me,ur(Me)},[]),In=T.useCallback(Y=>{const _e=Tt(Y),xe=[...ns.current.filter(Me=>Tt(Me)!==_e),m1(Y)];ns.current=xe,ur(xe),B(Y)},[B]),_r=T.useCallback((Y,_e,xe)=>{const Me=Tt(Y),Ae=Ni.current,at=_Bn({order:Qa.current,previewKey:Ae?Tt(Ae):null},Me,_e);at.replacedKey&&Ae&&typeof Ae!="string"&&Tt(Ae)===at.replacedKey&&jl(Ae),Yt(at.order),at.previewKey===null?zi(null):at.previewKey===Me&&zi(m1(Y));const Ke=[...ns.current.filter(pt=>Tt(pt)!==Me),m1(Y)];ns.current=Ke,ur(Ke),I(_l(Y,xe))},[jl,Yt,zi,I]),Is=T.useCallback(Y=>{const _e=Ni.current;_e&&Tt(_e)===Tt(Y)&&zi(null)},[zi]);T.useEffect(()=>{let Y=!1;const _e=Me=>{const Ae=Ni.current,at=Me.target;if(at instanceof Element&&at.closest("input, textarea, [contenteditable='true']")!==null){Y=!1;return}if(Ae&&Tt(Ae)===Tt(wc.current.rightTab)&&(Me.metaKey||Me.ctrlKey)&&!Me.altKey&&!Me.shiftKey&&Me.key.toLowerCase()==="k"){Me.preventDefault(),Y=!0;return}if(Y&&Me.key==="Enter"){Me.preventDefault(),Y=!1;const pt=Ni.current;pt&&Is(pt);return}Y=!1},xe=()=>{Y=!1};return window.addEventListener("keydown",_e),window.addEventListener("blur",xe),window.addEventListener("pointerdown",xe),()=>{window.removeEventListener("keydown",_e),window.removeEventListener("blur",xe),window.removeEventListener("pointerdown",xe)}},[Is]);const rs=T.useCallback((Y,_e)=>{const xe=Tt(Y),Me=Ni.current;Me&&Tt(Me)===xe&&zi(null);const Ae=fBn({order:Qa.current,previewKey:Me?Tt(Me):null},xe,ns.current.map(Tt));Yt(Ae.order);const at=ns.current.filter(pt=>Tt(pt)!==xe);if(ns.current=at,ur(at),!_e)return;const Ke=Ae.fallbackKey?at.find(pt=>Tt(pt)===Ae.fallbackKey):void 0;Ke?B(Ke):(G(),Si(!1))},[Yt,zi,B,G]),Qs=K,Xi=T.useMemo(()=>({rightTab:m1(y),tabHistory:un,experimentsTabOpen:Rn,filesTabOpen:rr,artifactsTabOpen:It,terminalTabOpen:ar,expTabs:Br,fileTabs:Pr,planTabs:Wn,subagentTabs:En,sideTabs:_n,codeTabs:ci,contentTabOrder:Qa.current,previewTab:Ni.current,filesView:Gs,filesToggled:Wi,selectedRunId:f,scope:Xt,panelOpen:h,panelMax:or,treeViewport:Ct}),[y,un,Rn,rr,It,ar,Br,Pr,Wn,En,_n,ci,Fr,Co,Gs,Wi,f,Xt,h,or,Ct]);wc.current=Xi;const Al=T.useCallback(()=>Object.fromEntries(We.current),[]),kc=T.useRef(void 0),Hf=T.useCallback(()=>{clearTimeout(kc.current),kc.current=setTimeout(()=>M(Y=>Y+1),200)},[]);T.useEffect(()=>()=>clearTimeout(kc.current),[]);const No=T.useCallback((Y,_e,xe)=>{if(ur(Y.tabHistory),ns.current=Y.tabHistory,Kn(Y.experimentsTabOpen),St(Y.filesTabOpen),ir(Y.artifactsTabOpen),Tr(Y.terminalTabOpen),Ds(Y.expTabs),Us(Y.fileTabs),Ln(Ae=>Ae===Y.planTabs?Ae:Y.planTabs.map(at=>{var Ke;return{...at,plan:((Ke=Ae.find(pt=>pt.sessionId===at.sessionId&&pt.promptId===at.promptId))==null?void 0:Ke.plan)??""}})),Rr(Y.subagentTabs),So(Y.sideTabs),Ls(Y.codeTabs),Yt(Y.contentTabOrder),zi(Y.previewTab),Vs(Y.filesView),Ks(Y.filesToggled),Jt(Y.scope),Si(Y.panelMax),Na(Y.treeViewport),hn(D.current.activeSessionId===Yd&&Y.fileTabs.some(Ae=>j_(Ae,{path:pw,source:"artifacts"}))),xe){for(const[Ae,at]of Object.entries((_e==null?void 0:_e.scroll)??{}))We.current.set(Ae,at);Object.assign(A.current,_e==null?void 0:_e.sourceModes)}const Me=D.current;if(Me.projectId)for(const Ae of Y.fileTabs){const at=qs(Me.projectId,Me.activeSessionId,Ae);j.current.has(at)||N.current.add(at)}},[Yt,zi]),{ready:ss,loaded:r_,error:Yi,retry:Zi,capture:Sc,workspace:Ns}=N7n({projectId:ie&&C!==null&&((a==null?void 0:a.kind)!=="task"||!u||C.includes(u))?n:null,taskKey:u??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",firstDemoOpen:(ie==null?void 0:ie.tourCompleted)===!1,state:Xi,apply:No,getScroll:Al,sourceModes:A.current,revision:z}),za=T.useRef(null);T.useLayoutEffect(()=>{if(!ss||!Re||(a==null?void 0:a.kind)!=="task")return;const Y=za.current;(Y==null?void 0:Y.projectId)===n&&Y.taskId===u&&Y.scope!==Sn&&Na(null),za.current={projectId:n,taskId:u,scope:Sn}},[ss,Re,a==null?void 0:a.kind,n,u,Sn]);const Xa=T.useCallback((Y,_e)=>{var pt;const xe=(_e==null?void 0:_e.projectId)??n;if(!xe)return;const Me=xe===n;Y&&Me&&_e!=null&&_e.replace&&u===null&&(Sc(),C7n(xe,Y));const Ae=Iu(B$(xe),Y??"new"),at=Ae?Ae.active:Vo(xe)?(pt=KS(Y??void 0,re.current===!1))==null?void 0:pt.active:void 0,Ke=Me&&(_e!=null&&_e.replace)&&Y&&u===null?D.current.pane:at;s.navigate({href:iv(xe,Y,Ke),replace:Me&&(_e==null?void 0:_e.replace)})},[s,n,u,Sc]);T.useEffect(()=>{ss&&(a==null?void 0:a.kind)!=="task"&&!c.current&&Ns.current.lastTaskId&&(C!=null&&C.includes(Ns.current.lastTaskId))&&(c.current=Ns.current.lastTaskId,M(Y=>Y+1))},[ss,a==null?void 0:a.kind,Ns,C]),qQ({shouldBlockFn:({next:Y})=>{var _e;return((_e=vf(Y.pathname))==null?void 0:_e.projectId)!==n&&[...ft.current.values()].some(xe=>xe.needsProtection)&&!dM(nz())},enableBeforeUnload:()=>[...ft.current.values()].some(Y=>Y.needsProtection)});const Ya=T.useRef(null);T.useEffect(()=>{const Y=Qb(i.href);!ie||!ss||!Y||(Zb.queue({lastLocation:Y,railOpen:Ci,panelWidth:ts,experimentsView:nt},Ya.current===Y?250:0),Ya.current=Y)},[i.href,ie,ss,Ci,ts,nt]);const Xr=(ie==null?void 0:ie.onboardingCompleted)??!1,[ps,Qn]=T.useState(!1),[Tl,zo]=T.useState(null),[op,ji]=T.useState(0),jo=T.useCallback(()=>Qn(!0),[]),Za=T.useCallback(async Y=>{const _e=re.current===!1,xe=await r.mutateAsync({tourCompleted:!0});_e&&bu({name:"demo_welcome_choice",choice:Y}),ue(Me=>Me&&{...Me,tourCompleted:xe.tourCompleted}),Qn(!1),Y==="explore_demo"&&ji(Me=>Me+1)},[]),Ja=T.useCallback(async()=>{await Za("create_project"),ui(!0)},[Za]);T.useEffect(()=>{!n||!Vo(n)||!Xr||ie!=null&&ie.tourCompleted||jo()},[n,Xr,jo,ie==null?void 0:ie.tourCompleted]);const fn=(F==null?void 0:F.find(Y=>Y.id===n))??null;T.useEffect(()=>{const Y=oe||ie===null?null:fn==null?void 0:fn.name;document.title=Y?`${ua(Y)} — OpenResearch`:"OpenResearch"},[oe,ie,fn]);const ja=T.useRef(n);ja.current=n;const Ao=T.useCallback(Y=>{n&&bu({name:"first_action",surface:Vo(n)?"demo":"project",action:Y})},[n]);T.useEffect(()=>{o!=="chat"&&o!=="skills"&&Ao("open_settings")},[o,Ao]);const Cc=T.useCallback((Y=!1)=>{Y&&(!D.current.isTask||D.current.pane)||(Ao("open_experiment"),Kn(!0),I({kind:"home",view:"experiments"},Y))},[I,Ao]),Ec=()=>{L.refetch(),ae.refetch(),x.refetch()},fr=T.useRef(!1);T.useEffect(()=>{if(!ie||fr.current)return;fr.current=!0,ce.current=ie.preferredAgent;const Y=US()??ie.workspace;Y&&(Ei(Y.railOpen),Ws(Math.min(Y.panelWidth,Hd())),ht(Y.experimentsView))},[ie]),T.useEffect(()=>{C&&c.current&&!C.includes(c.current)&&(c.current=null)},[C]);const s_=T.useRef(Promise.resolve()),ms=T.useRef(0),_i=T.useCallback(Y=>{const _e=++ms.current;ue(Me=>Me&&{...Me,preferredAgent:Y});const xe=s_.current.then(()=>r.mutateAsync({preferredAgent:Y})).then(Me=>{ce.current=Me.preferredAgent,_e===ms.current&&ue(Ae=>Ae&&{...Ae,preferredAgent:Me.preferredAgent})}).catch(Me=>{throw _e===ms.current&&ue(Ae=>Ae&&{...Ae,preferredAgent:ce.current}),Me});return s_.current=xe.catch(()=>{}),xe},[]),Ji=T.useRef(Promise.resolve()),Rl=T.useRef(0),qf=T.useCallback(Y=>{const _e=++Rl.current;ue(xe=>xe&&{...xe,preferredAutonomy:Y}),Ji.current=Ji.current.then(()=>r.mutateAsync({preferredAutonomy:Y})).catch(()=>{_e===Rl.current&&ae.refetch()})},[]);T.useEffect(()=>{const Y=()=>{Ws(_e=>Math.min(_e,Hd())),Pt(window.innerWidth>=SO)};return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)},[]);const Ai=T.useCallback(Y=>{Ft.current=!1,Le.current.clear(),tt.current.clear();const _e=++ke.current;et.fetchQuery(Ru(Y)).then(xe=>{if(ja.current!==Y||jt.current!==Y||ke.current!==_e)return;Le.current=new Map(xe.map(Ae=>[Ae.id,Ae]));const Me=[...tt.current.values()].some(Ae=>{const at=Le.current.get(Ae.id);return!at||at.status!=="running"&&at.updatedAt<=Ae.updatedAt});tt.current.clear();for(const Ae of xe){const at=ot.current.get(Ae.id);(!at||at.updatedAt{var at;return xe.some(Ke=>Ke.id===Ae&&Ke.status==="running")?Ae:((at=xe.find(Ke=>Ke.status==="running"))==null?void 0:at.id)??null}),Me&&Cc(!0)}).catch(()=>{ke.current===_e&&(tt.current.clear(),Xe(!0))})},[Cc]);T.useEffect(()=>{if(n)return jt.current=n,ot.current.clear(),Mt.current.clear(),Ywn(n).catch(()=>{}),Ai(n),()=>{ke.current++}},[Ai,n]);const Uf=T.useCallback(()=>{ir(!0),In("artifacts")},[In]),Gf=T.useCallback(()=>{Tr(!0),In("terminal")},[In]),eo=u??(n?`project:${n}`:null);T.useEffect(()=>{Bn(h?y==="terminal"?eo:Y=>Y===eo?Y:null:null)},[h,y,eo]),Y5n({onReconnect:()=>{const Y=ja.current;Y&&(jt.current=Y,ot.current.clear(),Mt.current.clear(),Ai(Y))},onRun:Y=>{if(Y.projectId!==ja.current||Y.projectId!==jt.current)return;const _e=ot.current.get(Y.id),xe=Mt.current.has(Y.id);if(_e&&_e.updatedAt>Y.updatedAt||(ot.current.set(Y.id,Y),Mt.current.add(Y.id),Vo(Y.projectId)&&zo(at=>Y.status==="running"?at??Y.id:at===Y.id?null:at),Y.status!=="running"||(_e==null?void 0:_e.status)==="running"))return;const Me=Le.current.get(Y.id),Ae=Ft.current&&(!Me||Me.status!=="running"&&Me.updatedAt<=Y.updatedAt);xe&&_e||Ae?Cc(!0):Ft.current||tt.current.set(Y.id,Y)}});const Vf=T.useCallback(()=>Jt("project"),[]),Xs=T.useCallback((Y,_e="overview",xe="preview",Me)=>{Ao("open_experiment");const Ae={id:Y,view:_e};Ds(at=>at.some(Ke=>kw(Ke,Ae))?at:[...at,Ae]),_e==="terminal"&&Vo(ja.current)&&Ws(at=>Math.max(at,Xj())),_r(Ae,xe,Me)},[_r]),i_=T.useCallback((Y,_e="preview")=>{const xe=wt.current.filter(Ae=>Ae.id===Y||Ae.id.startsWith(Y)),Me=xe.length===1?xe[0]:null;Me&&Xs(Me.experimentId,"terminal",_e,Me.id)},[Xs]),Kf=T.useMemo(()=>new Map(ve.map(Y=>{var _e;return[Y.id,((_e=Y.title)==null?void 0:_e.trim())||Y.slug||nl()]})),[ve,Z]),ea=EO(Kf),Ml=T.useMemo(()=>{const Y=new Map;for(const _e of $e)Y.set(_e.id,ea.get(_e.experimentId)??nl());return Y},[ea,$e,Z]),a_=EO(Ml),Nc=T.useCallback(Y=>{const _e=a_.get(Y);if(_e)return _e;const xe=[...a_].filter(([Me])=>Me.startsWith(Y));return xe.length===1?xe[0][1]:""},[a_]),Ol=T.useCallback(Y=>{const _e=ea.get(Y);if(_e)return _e;const xe=[...ea].filter(([Me])=>Me.startsWith(Y));return xe.length===1?xe[0][1]:""},[ea]),zc=T.useCallback((Y,_e="preview")=>{const xe=ge.current.filter(Me=>Me.id===Y||Me.id.startsWith(Y));xe.length===1&&Xs(xe[0].id,"overview",_e)},[Xs]),o_=T.useCallback(Y=>{const _e=Br.findIndex(xe=>kw(xe,Y));_e!==-1&&(Ds(xe=>xe.filter((Me,Ae)=>Ae!==_e)),rs(Y,Tt(y)===Tt(Y)))},[Br,rs,y]),To=T.useCallback((Y,_e="preview")=>{Y.line!=null&&k(Ae=>Ae+1);const xe=ja.current;if(xe){const Ae=qs(xe,Qi.current,Y);wc.current.fileTabs.some(at=>j_(at,Y))||N.current.delete(Ae),j.current.add(Ae)}const Me=I$(Y);Us(Ae=>{const at=Ae.findIndex(pt=>j_(pt,Y));if(at===-1)return[...Ae,Me];const Ke=Ae.slice();return Ke[at]=Me,Ke}),_r(Y,_e)},[_r]),jc=T.useCallback((Y,_e,xe,Me,Ae,at)=>{const Ke=F==null?void 0:F.find($s=>$s.id===n),pt=oYn(Y,Ke==null?void 0:Ke.repoPath,_e,(Ke==null?void 0:Ke.artifactsDir)??(Ke==null?void 0:Ke.filesDir),Ke==null?void 0:Ke.slug);if(!pt)return null;const Xn=Ae?ge.current.find($s=>$s.id===Ae||Ae.length>=6&&$s.id.startsWith(Ae)):void 0,vs=xe??(Xn==null?void 0:Xn.branchName),bs=pt.source==null||pt.source==="repo";return vs&&bs&&(pt.ref=vs),at&&!pt.ref&&bs&&(pt.branchLabel=at),Me!=null&&(pt.line=Me),pt},[F,n]),Ro=T.useCallback((Y,_e,xe,Me,Ae,at,Ke="preview")=>{const pt=jc(Y,_e,xe,Me,Ae,at);pt&&To(pt,Ke)},[To,jc]),Mo=T.useCallback(Y=>To({path:Y,source:"artifacts"},"keepOpen"),[To]),Ac=T.useCallback((Y,_e,xe,Me,Ae,at="preview")=>{const Ke=jc(Y,_e,Ae,xe,Me);Ke&&To(Ke,at)},[To,jc]),gs=T.useCallback((Y,_e)=>{Is(Y),_e()},[Is]),Aa=T.useCallback(Y=>{var Me;const _e=Pr.findIndex(Ae=>j_(Ae,Y));if(_e===-1)return;const xe=n?qs(n,u,Y):null;xe&&((Me=ft.current.get(xe))!=null&&Me.needsProtection)&&!dM(nz())||(Us(Ae=>Ae.filter((at,Ke)=>Ke!==_e)),xe&&(We.current.delete(xe),ft.current.delete(xe),j.current.delete(xe),N.current.delete(xe),delete A.current[xe]),u===Yd&&j_(Y,{path:pw,source:"artifacts"})&&hn(!1),rs(Y,Tt(y)===Tt(Y)))},[u,Pr,rs,n,y]),Wf=T.useCallback(Y=>{Y.lineScrollRequest!==void 0&&m(Y.lineScrollRequest)},[]),Dl=T.useCallback((Y,_e,xe,Me="preview")=>{const Ae={kind:"plan",sessionId:_e,promptId:xe,plan:Y};Ln(at=>{const Ke=at.findIndex(Xn=>Xn.promptId===xe);if(Ke===-1)return[...at,Ae];const pt=at.slice();return pt[Ke]=Ae,pt}),_r(Ae,Me)},[_r]),Ll=T.useCallback(Y=>{const _e=Wn.findIndex(xe=>xe.promptId===Y.promptId);_e!==-1&&(Ln(xe=>xe.filter((Me,Ae)=>Ae!==_e)),rs(Y,Tt(y)===Tt(Y)))},[rs,Wn,y]),Ta=T.useCallback((Y,_e,xe,Me="preview")=>{const Ae={kind:"subagent",sessionId:Y,spawnPartId:_e,label:xe};Rr(at=>at.some(Ke=>Ke.spawnPartId===_e)?at:[...at,Ae]),_r(Ae,Me)},[_r]),Qf=T.useCallback(Y=>{const _e=En.findIndex(xe=>xe.spawnPartId===Y.spawnPartId);_e!==-1&&(Rr(xe=>xe.filter((Me,Ae)=>Ae!==_e)),rs(Y,Tt(y)===Tt(Y)))},[rs,y,En]),c_=T.useCallback(Y=>{const _e={kind:"side",sessionId:Y};So(xe=>xe.some(Me=>Me.sessionId===Y)?xe:[...xe,_e]),Ws(xe=>Math.max(xe,Xj())),_r(_e,"keepOpen")},[_r]),Tc=T.useCallback(Y=>{_n.some(_e=>_e.sessionId===Y.sessionId)&&(So(_e=>_e.filter(xe=>xe.sessionId!==Y.sessionId)),rs(Y,Tt(y)===Tt(Y)))},[rs,y,_n]);T.useEffect(()=>{const Y=x.data;if(Y)for(const _e of _n)Y.some(xe=>xe.id===_e.sessionId)||Tc(_e)},[x.data,_n,Tc]);const Il=T.useCallback(async(Y,_e)=>{let xe;try{xe=await K3n(Y)}catch(Me){sn(qan({error:W1(Me)}),"error");return}if(D.current.activeSessionId!==Y){H3(xe.id).catch(Me=>{sn(ij({error:W1(Me)}),"error")});return}if(Vr(Gi(xe.projectId).queryKey,Me=>Me&&[xe,...Me.filter(Ae=>Ae.id!==xe.id)]),c_(xe.id),!!_e)try{await et.fetchQuery(ic(xe.id)),await q3(xe.id,_e)}catch(Me){sn(W1(Me),"error")}},[c_]),Xf=T.useCallback(Y=>{Tc(Y),H3(Y.sessionId).catch(_e=>{sn(ij({error:W1(_e)}),"error")})},[Tc]),[to,Oo]=T.useState({});T.useEffect(()=>{if(Oo(Ke=>{const pt=new Set(En.map(Xn=>Xn.spawnPartId));return Object.keys(Ke).every(Xn=>pt.has(Xn))?Ke:Object.fromEntries(Object.entries(Ke).filter(([Xn])=>pt.has(Xn)))}),En.length===0)return;let Y=!0;const _e=new Set,xe=(Ke,pt,Xn)=>{Oo(vs=>{var $s;let bs=vs;for(const Ts of pt)if(!(Xn&&_e.has(Ts.spawnPartId)))for(const Oc of Ke){const wn=vb(Oc.parts,Ts.spawnPartId);if(!wn)continue;Xn||_e.add(Ts.spawnPartId);const Rs={label:VFn(wn),running:(($s=wn.state)==null?void 0:$s.status)==="running"},ta=bs[Ts.spawnPartId];(!ta||ta.label!==Rs.label||ta.running!==Rs.running)&&(bs===vs&&(bs={...vs}),bs[Ts.spawnPartId]=Rs);break}return bs})};let Me=0;const Ae=()=>{const Ke=++Me;for(const pt of new Set(En.map(Xn=>Xn.sessionId)))et.fetchQuery({...ic(pt),staleTime:0}).then(({messages:Xn})=>{Y&&Ke===Me&&xe(Xn,En.filter(vs=>vs.sessionId===pt),!0)}).catch(()=>{})};Ae();const at=Uv(Ke=>{if(Ke.type==="reconnected"){_e.clear(),Ae();return}if(Ke.type!=="message")return;const pt=En.filter(Xn=>Xn.sessionId===Ke.sessionId);pt.length&&xe([Ke.message],pt,!1)});return()=>{Y=!1,at()}},[En]);const $l=T.useCallback((Y,_e,xe="files",Me="preview")=>{const Ae={code:!0,experimentId:Y,branch:_e,view:xe,toggled:new Set};Ls(at=>at.some(Ke=>Ed(Ke,Ae))?at.map(Ke=>Ed(Ke,Ae)?{...Ke,experimentId:Y,view:xe}:Ke):[...at,Ae]),_r(Ae,Me)},[_r]),no=T.useCallback((Y,_e)=>{Ls(xe=>xe.map(Me=>Ed(Me,Y)?{...Me,..._e}:Me)),_e.view&&I(_l({...Y,..._e}))},[]),Yf=T.useCallback(Y=>{const _e=ci.findIndex(xe=>Ed(xe,Y));_e!==-1&&(Ls(xe=>xe.filter((Me,Ae)=>Ae!==_e)),rs(Y,Tt(y)===Tt(Y)))},[ci,rs,y]),l_=T.useCallback(()=>{St(!0),In("files")},[In]),Do=T.useCallback(Y=>{Y==="experiments"?Kn(!1):Y==="files"?St(!1):Y==="terminal"?(Tr(!1),Bn(null)):ir(!1),rs(Y,y===Y)},[rs,y]),ro=Y=>{Y.preventDefault(),Y.currentTarget.setPointerCapture(Y.pointerId);const xe=document.body.style.userSelect;document.body.style.userSelect="none";const Me=or,Ae=Y.clientX,at=ts;let Ke=!1;function pt(){window.removeEventListener("pointermove",Xn),window.removeEventListener("pointerup",pt),window.removeEventListener("pointercancel",pt),document.body.style.userSelect=xe}function Xn(vs){if(Me){const Oc=vs.clientX-Ae;if(Ke||Oc<_Yn)return;Ke=!0,Si(!1);const wn=Math.min(Math.max(at,Xv),Hd());Ws(wn),window.removeEventListener("pointermove",Xn);return}const bs=Math.round(window.innerWidth-vs.clientX-lYn),$s=Hd();if(bs>$s+uYn){Si(!0);return}Si(!1);const Ts=Math.min(Math.max(bs,Xv),$s);Ws(Ts)}window.addEventListener("pointermove",Xn),window.addEventListener("pointerup",pt),window.addEventListener("pointercancel",pt)},u_=(Y,_e)=>{U(xe=>xe?CO(xe,Y):[Y]),s.navigate({href:`/projects/${encodeURIComponent(Y.id)}${_e?"/settings/git":""}`}),_e&&sn(_e,"error")},zs=typeof y=="object"&&"id"in y?y:null,Fn=typeof y=="object"&&"path"in y?y:null,__=(Fn==null?void 0:Fn.source)==="artifacts"&&qe?nm(qe.entries,Fn.path):null,Bl=__?`${__.modifiedAt}:${__.size}`:null,Pl=u===Yd&&Ot?Pr.find(Y=>j_(Y,{path:pw,source:"artifacts"})):void 0,Zf=Pl?[Pl]:[],js=typeof y=="object"&&"kind"in y&&y.kind==="plan"?y:null,Or=js==null?void 0:js.sessionId,Ti=js==null?void 0:js.promptId,Fl=!!(Or&&Ti&&(C!=null&&C.includes(Or))),Rc=_t({...ic(Or??""),enabled:Fl,subscribed:Fl}),Lo=T.useMemo(()=>{var _e;if(!Or||!Ti||!Rc.data)return null;const Y=Rc.data.messages.flatMap(xe=>{const Me=vb(xe.parts,Ti);return Me?[Me]:[]})[0];return{key:`${Or}:${Ti}`,text:((_e=Y==null?void 0:Y.prompt)==null?void 0:_e.plan)??null}},[Or,Ti,Rc.data]),As=typeof y=="object"&&"kind"in y&&y.kind==="subagent"?y:null,Yr=typeof y=="object"&&"kind"in y&&y.kind==="side"?y:null,Jf=Yr?(f_=x.data)==null?void 0:f_.find(Y=>Y.id===Yr.sessionId):void 0,te=typeof y=="object"&&"code"in y?y:null,pe=te?ci.find(Y=>Ed(Y,te))??null:null,ze=new Map;for(const Y of[...Br,...Pr,...Wn,...En,..._n,...ci])ze.set(Tt(Y),Y);const Oe=Pl?Tt(Pl):null,Pe=Fr.filter(Y=>Y!==Oe).map(Y=>ze.get(Y)).filter(w7n),yt=Y=>Co!==null&&Tt(Co)===Tt(Y),Kt=Y=>_.jsx(Uo,{active:Fn!==null&&j_(Fn,Y),label:Y.path.split("/").pop()||Y.path,icon:_.jsx(b$,{size:12,className:"shrink-0"}),preview:yt(Y),onSelect:()=>In(Y),onPromote:()=>Is(Y),onClose:()=>Aa(Y)},`file:${GS(Y)}`),nn=zs?ve.find(Y=>Y.id===zs.id)??null:null,pn=pe?ve.find(Y=>Y.id===pe.experimentId&&Y.branchName===pe.branch)??null:null,mr=Y=>{var xe,Me,Ae,at;if("path"in Y)return Kt(Y);if("id"in Y){const Ke=ve.find(pt=>pt.id===Y.id);return _.jsx(Uo,{active:zs!==null&&kw(zs,Y),label:Ke?Ke.title||Ke.slug:"…",icon:Y.view==="overview"?_.jsx(l6n,{size:12,className:"shrink-0"}):_.jsx(xo,{size:12,className:"shrink-0"}),preview:yt(Y),onSelect:()=>In(Y),onPromote:()=>Is(Y),onClose:()=>o_(Y)},Tt(Y))}if("kind"in Y&&Y.kind==="plan")return _.jsx(Uo,{active:js!==null&&js.promptId===Y.promptId,label:nL(),icon:_.jsx($S,{size:12,className:"shrink-0"}),preview:yt(Y),onSelect:()=>In(Y),onPromote:()=>Is(Y),onClose:()=>Ll(Y)},Tt(Y));if("kind"in Y&&Y.kind==="side"){const Ke=(xe=x.data)==null?void 0:xe.find(pt=>pt.id===Y.sessionId);return _.jsx(Uo,{active:Yr!==null&&Yr.sessionId===Y.sessionId,label:((Me=Ke==null?void 0:Ke.title)==null?void 0:Me.trim())||D3(),shimmer:(Ke==null?void 0:Ke.busy)??!1,icon:_.jsx(B0,{size:12,className:"shrink-0"}),preview:yt(Y),onSelect:()=>In(Y),onPromote:()=>Is(Y),onClose:()=>Xf(Y)},Tt(Y))}if("kind"in Y)return _.jsx(Uo,{active:As!==null&&As.spawnPartId===Y.spawnPartId,label:((Ae=to[Y.spawnPartId])==null?void 0:Ae.label)??Y.label??dfe(),shimmer:((at=to[Y.spawnPartId])==null?void 0:at.running)??!1,icon:_.jsx(FS,{size:12,className:"shrink-0"}),preview:yt(Y),onSelect:()=>In(Y),onPromote:()=>Is(Y),onClose:()=>Qf(Y)},Tt(Y));const _e=ve.find(Ke=>Ke.id===Y.experimentId);return _.jsx(Uo,{active:pe!==null&&Ed(pe,Y),label:(_e==null?void 0:_e.slug)??Y.branch,icon:_.jsx(Fu,{size:12,className:"shrink-0"}),preview:yt(Y),onSelect:()=>In(Y),onPromote:()=>Is(Y),onClose:()=>Yf(Y)},Tt(Y))};if(!a||a.kind==="resume")return null;if(oe)return _.jsxs("div",{className:"app flex flex-col h-full",children:[_.jsxs("div",{className:o0,children:[_.jsx("p",{children:oe}),_.jsx(Ie,{variant:"primary",onClick:Ec,children:si()})]}),e.kind==="ssh"&&_.jsx(u5,{runtime:e,corner:!0})]});if(F&&!fn)return _.jsxs("div",{className:o0,children:[po(),_.jsx(Ie,{onClick:()=>Q(null),children:g0()})]});if(Yi&&!ss)return _.jsxs("div",{className:o0,children:[_.jsx("p",{role:"alert",children:Yi}),_.jsx(Ie,{onClick:Zi,children:si()})]});if(F===null||ie===null||!r_||C===null)return _.jsxs("div",{className:"app flex flex-col h-full",children:[_.jsx("div",{className:o0,children:_.jsx(Nt,{})}),e.kind==="ssh"&&_.jsx(u5,{runtime:e,corner:!0})]});if(!fn||(a==null?void 0:a.kind)==="task"&&u&&!(C!=null&&C.includes(u)))return _.jsxs("div",{className:o0,children:[po(),_.jsx(Ie,{onClick:()=>Q(null),children:g0()})]});const Mc=_.jsx(Nqn,{projectName:((d_=F.find(Y=>Y.id===n))==null?void 0:d_.name)??"",onHome:()=>void s.navigate({to:"/projects"}),onNewProject:()=>ui(!0),onRepository:()=>Qs("git"),onCollapse:()=>Ei(!1)});return _.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&_.jsx(K$,{}),e.kind==="local"&&_.jsx(SB,{status:J}),Yi&&_.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:Yi}),_.jsx(Ie,{onClick:Zi,children:si()})]}),_.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${li?"workspace-card-visible":""}`,children:[n&&_.jsx(nM,{projectId:n,projectName:(fn==null?void 0:fn.name)??"",railHeader:Mc,railOpen:Ci,onShowRail:()=>Ei(!0),mainView:o,onSelectMainView:Qs,onOpenFile:Ac,onOpenRun:i_,runExperimentName:Nc,onOpenExperiment:zc,experimentName:Ol,onOpenPlan:Dl,onOpenSubagent:Ta,onOpenSideChat:(Y,_e)=>void Il(Y,_e),composerFocusNonce:op,demoRunningRunId:Tl,runtime:e,onOpenDemoWelcome:fn&&Vo(fn.id)?jo:void 0,activeSessionId:u,onActiveSessionChange:Xa,preferredAgent:ie.preferredAgent,onPreferredAgentChange:_i,preferredAutonomy:ie.preferredAutonomy??$3,onPreferredAutonomyChange:qf,children:o==="skills"?_.jsx(XHn,{}):o!=="chat"?_.jsx(yPn,{remote:e.kind==="ssh",tab:o,project:fn,onProjectUpdate:Y=>{U(_e=>_e?CO(_e,Y):[Y])},onSelectTab:Qs}):null}),o==="chat"&&_.jsx(Gzn,{expanded:li,experiments:ve,runs:$e,onOpenExperiment:(Y,_e)=>Xs(Y,"overview","preview",_e),rightOffset:h?ts+28:void 0,activeView:h&&(y==="files"||y==="artifacts"||y==="experiments"||y==="terminal")?y:null,projectId:fn.id,onCompute:()=>Qs("compute"),sessionId:u,busy:((h_=x.data)==null?void 0:h_.some(Y=>Y.id===u&&Y.busy))??!1,onChanges:()=>{Vs("changes"),l_()},onFiles:()=>{Vs("files"),l_()},onTerminal:Gf,onArtifacts:Uf,onExperiments:()=>Cc(),onSideChat:u?()=>void Il(u,""):void 0}),o==="chat"&&h&&_.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 ${or?"max":""}`,style:or?void 0:{width:ts},"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 ${or?"cursor-e-resize":"cursor-col-resize"}`,title:or?nue():Qle(),onPointerDown:ro}),_.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:[Zf.map(Kt),rr&&_.jsx(Uo,{active:y==="files",label:k3(),icon:_.jsx(Fu,{size:12,className:"shrink-0"}),onSelect:()=>In("files"),onClose:()=>Do("files")}),ar&&_.jsx(Uo,{active:y==="terminal",label:Pv(),icon:_.jsx(xo,{size:12,className:"shrink-0"}),onSelect:()=>In("terminal"),onClose:()=>Do("terminal")}),It&&_.jsx(Uo,{active:y==="artifacts",label:KD(),icon:_.jsx(LS,{size:12,className:"shrink-0"}),onSelect:()=>In("artifacts"),onClose:()=>Do("artifacts")}),Rn&&_.jsx(Uo,{active:y==="experiments",label:WD(),icon:_.jsx(Ah,{size:12,className:"shrink-0"}),onSelect:()=>In("experiments"),onClose:()=>Do("experiments")}),Pe.map(mr)]}),_.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[_.jsx($t,{title:or?hN():dN(),"aria-label":or?hN():dN(),onClick:()=>Si(Y=>!Y),children:or?_.jsx(pCn,{size:14}):_.jsx(_Cn,{size:14})}),_.jsx($t,{title:L0(),"aria-label":L0(),onClick:()=>{G(),Si(!1)},children:_.jsx(br,{size:14})})]})]}),y==="terminal"&&ar?null:!ss||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!Re||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!Fe?_.jsx(ca,{children:_.jsx(Nt,{})}):zs&&(!nn||f&&!$e.some(Y=>Y.id===f&&Y.experimentId===zs.id))||te&&!pn||t&&"sessionId"in t&&t.sessionId&&!(C!=null&&C.includes(t.sessionId))?_.jsx(ca,{children:_.jsx("div",{className:"p-6 text-subtext",children:po()})}):y==="artifacts"?_.jsx(ca,{children:fn&&_.jsx(FHn,{project:fn,artifacts:qe,onOpenFile:Mo,canRenameFile:Y=>{var _e;return!((_e=ft.current.get(qs(fn.id,u,{path:Y,source:"artifacts"})))!=null&&_e.needsProtection)}},fn.id)}):y==="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:on,children:[_.jsx($t,{size:"small",ref:an,className:"experiment-scope-trigger",active:Sn==="agent",title:xue({scope:Sn==="agent"?_N():fN()}),"aria-label":Kue(),"aria-expanded":At,onClick:()=>bn(Y=>!Y),children:_.jsx(G6n,{size:16,strokeWidth:2.5})}),At&&_.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(yn,{"aria-pressed":Sn==="agent",disabled:!u||!cn,title:u?cn?void 0:e_e():h_e(),onClick:()=>{Jt("agent"),bn(!1)},children:[_.jsx("span",{children:_N()}),Sn==="agent"&&_.jsx(yi,{size:13})]}),_.jsxs(yn,{"aria-pressed":Sn==="project",onClick:()=>{Jt("project"),bn(!1)},children:[_.jsx("span",{children:fN()}),Sn==="project"&&_.jsx(yi,{size:13})]}),_.jsx("div",{className:"my-1 border-t border-border-variant"}),_.jsxs(yn,{"aria-pressed":rt,onClick:()=>{qt(Y=>!Y),bn(!1)},children:[_.jsx("span",{children:J_e()}),rt&&_.jsx(yi,{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":zue(),children:[_.jsx("button",{className:nt==="table"?"active":"","aria-pressed":nt==="table",onClick:()=>ht("table"),children:yfe()}),_.jsx("button",{className:nt==="tree"?"active":"","aria-pressed":nt==="tree",onClick:()=>ht("tree"),children:Nfe()})]})]})]}),_.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:nt==="tree"?fn&&_.jsx(iYn,{experiments:ve,archiveActions:es,showArchived:rt,runs:xn,project:fn,onOpenView:Xs,onOpenCode:$l,onArchive:bt,agentSessionId:Sn==="agent"?u:null,onShowProjectScope:Vf,onRestoreRegion:ln,viewport:Ct,onViewportChange:Na}):_.jsx(jqn,{archiveActions:es,runs:xn,emptyHint:!rt&&Vn.length>0&&hs.length===0?vmn():Sn==="agent"&&ve.length>0?o_e():void 0,experiments:hs,onOpen:(Y,_e)=>{Xs(Y.id,"overview",_e)},onOpenLogs:(Y,_e,xe)=>{Xs(Y,"terminal",xe,_e)},onOpenCode:(Y,_e)=>{const xe=ve.find(Me=>Me.id===Y);xe&&$l(xe.id,xe.branchName,"files",_e)},onArchive:bt,onCancel:bI})})]}):y==="files"?_.jsx(ca,{children:fn?_.jsx(SHn,{sessionId:u??void 0,project:fn,view:Gs,toggled:Wi,onViewChange:Vs,onToggledChange:Ks,canRenameFile:Y=>{var _e;return!((_e=ft.current.get(qs(fn.id,u,{path:Y,source:"repo",sessionId:u??void 0})))!=null&&_e.needsProtection)},onOpenFile:(Y,_e,xe,Me)=>Ro(Y,_e,xe,void 0,void 0,void 0,Me)},`files:${u??`project:${fn.id}`}`):_.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:_.jsx(rh,{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(y$,{size:22}),_.jsx("p",{children:B_e()})]})})})}):Fn?_.jsx(ca,{children:n&&_.jsx(Eqn,{remote:e.kind==="ssh",restored:N.current.has(qs(n,u,Fn)),onRestoreActivated:()=>{const Y=qs(n,u,Fn);N.current.delete(Y),j.current.add(Y)},showSource:A.current[qs(n,u,Fn)]??!1,onShowSourceChange:Y=>{A.current[qs(n,u,Fn)]=Y,M(_e=>_e+1)},projectId:n,path:Fn.path,source:Fn.source,sessionId:Fn.source==="artifacts"?u??void 0:Fn.sessionId,gitRef:Fn.ref,line:Fn.line,branchLabel:cYn(Fn,fn==null?void 0:fn.baselineBranch),artifactVersion:Bl,artifactEntries:Fn.source==="artifacts"?qe==null?void 0:qe.entries:void 0,bufferSession:Pn(qs(n,u,Fn)),onOpenFile:(Y,_e,xe,Me)=>gs(Fn,()=>Ro(Y,_e,xe,void 0,void 0,void 0,Me)),scrollPosition:We.current.get(qs(n,u,Fn)),onScrollPositionChange:Y=>{We.current.set(qs(n,u,Fn),Y),Hf()},lineScrollRequest:Fn.lineScrollRequest,onLineScrollRequestHandled:()=>Wf(Fn),onEdit:()=>Is(Fn)},qs(n,u,Fn))}):js?_.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(uc,{text:(Lo==null?void 0:Lo.key)===`${js.sessionId}:${js.promptId}`?Lo.text??po():((Ri=Wn.find(Y=>Y.promptId===js.promptId))==null?void 0:Ri.plan)||QD(),onOpenFile:(Y,_e,xe,Me,Ae)=>gs(js,()=>Ro(Y,js.sessionId,Me,_e,xe,void 0,Ae))})})}):Yr&&n?_.jsx(ca,{children:Jf?_.jsx("div",{className:"flex min-h-0 flex-1",children:_.jsx(nM,{embedded:!0,projectId:n,projectName:(fn==null?void 0:fn.name)??"",railOpen:!1,onShowRail:()=>Ei(!0),mainView:"chat",onSelectMainView:Qs,onOpenFile:(Y,_e,xe,Me,Ae,at)=>gs(Yr,()=>Ac(Y,_e,xe,Me,Ae,at)),onOpenRun:(Y,_e)=>gs(Yr,()=>i_(Y,_e)),runExperimentName:Nc,onOpenExperiment:(Y,_e)=>gs(Yr,()=>zc(Y,_e)),experimentName:Ol,onOpenPlan:(Y,_e,xe,Me)=>gs(Yr,()=>Dl(Y,_e,xe,Me)),onOpenSubagent:(Y,_e,xe,Me)=>gs(Yr,()=>Ta(Y,_e,xe,Me)),runtime:e,activeSessionId:Yr.sessionId,onOpenSideChat:(Y,_e)=>void Il(Y,_e),onActiveSessionChange:(Y,_e)=>{var Me;const xe=!((Me=et.getQueryData(Gi(n).queryKey))!=null&&Me.some(Ae=>Ae.id===Yr.sessionId));Y===null&&xe?Tc(Yr):Xa(Y,_e)},preferredAgent:ie.preferredAgent,onPreferredAgentChange:_i,preferredAutonomy:ie.preferredAutonomy??$3,onPreferredAutonomyChange:qf},Yr.sessionId)}):_.jsx("div",{className:"p-6 text-sm text-muted",children:lI()})}):As?_.jsx(lHn,{projectId:n,sessionId:As.sessionId,spawnPartId:As.spawnPartId,onOpenFile:(Y,_e,xe,Me,Ae)=>gs(As,()=>Ac(Y,As.sessionId,_e,xe,Me,Ae)),onOpenRun:(Y,_e)=>gs(As,()=>i_(Y,_e)),runExperimentName:Nc,onOpenExperiment:(Y,_e)=>gs(As,()=>zc(Y,_e)),experimentName:Ol,onOpenSubagent:(Y,_e,xe)=>gs(As,()=>Ta(As.sessionId,Y,_e,xe))},As.spawnPartId):pe?_.jsx(ca,{children:n&&fn&&pe&&pn&&_.jsx(kHn,{projectId:n,project:fn,experiment:pn,view:pe.view,toggled:pe.toggled,onViewChange:Y=>no(pe,{view:Y}),onToggledChange:Y=>no(pe,{toggled:Y}),onOpenFile:(Y,_e,xe,Me)=>gs(pe,()=>Ro(Y,_e,xe,void 0,void 0,pn.branchName,Me))},`code:${pe.branch}`)}):_.jsx(ca,{children:zs&&nn&&fn&&_.jsx(tqn,{experiment:nn,project:fn,view:zs.view,runs:$e,selectedRunId:f,onSelectRun:q,parentExperiment:ve.find(Y=>Y.id===nn.parentExperimentId)??null,onOpenView:(Y,_e,xe)=>{gs(zs,()=>Xs(nn.id,Y,xe,_e))},onOpenCode:(Y,_e)=>gs(zs,()=>$l(nn.id,nn.branchName,Y,_e))},`${zs.id}:${zs.view}`)}),ar&&sr!==null&&sr===eo&&fn&&_.jsx(ca,{className:y==="terminal"?void 0:"hidden",children:_.jsx(Kzn,{projectId:fn.id,sessionId:u,active:y==="terminal"},eo)})]})]}),Mr&&_.jsx(V$,{remote:e.kind==="ssh",onClose:()=>ui(!1),onCreated:(Y,_e)=>{ui(!1),u_(Y,_e)}}),ps&&fn&&Vo(fn.id)&&_.jsx(Aqn,{onClose:Za,onCreateProject:Ja})]})}const Bk=dc()({validateSearch:e=>({pane:HS(e.pane)}),beforeLoad:({location:e})=>{if(!vf(e.pathname))throw mW()},component:dYn});function dYn(){const{projectId:e}=Bk.useParams(),{pane:n}=Bk.useSearch(),t=xi(),r=LD({select:s=>s.location});return T.useEffect(()=>{const s=hYn(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),_.jsxs(_.Fragment,{children:[_.jsx(M0,{}),_.jsx(fYn,{projectId:e,pane:n,runtime:P$()},e)]})}function hYn(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&HS(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const LG=dc()({component:pYn});function pYn(){const{projectId:e}=LG.useParams();return _.jsx(p9n,{projectId:e})}const mYn=dc()({}),gYn=dc()({}),vYn=dc()({}),bYn=dc()({}),yYn=g9n.update({id:"/",path:"/",getParentRoute:()=>Jb}),n7=v9n.update({id:"/projects",path:"/projects",getParentRoute:()=>Jb}),xYn=b9n.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>Jb}),wYn=y9n.update({id:"/",path:"/",getParentRoute:()=>n7}),ap=Bk.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>n7}),kYn=LG.update({id:"/",path:"/",getParentRoute:()=>ap}),SYn=mYn.update({id:"/skills",path:"/skills",getParentRoute:()=>ap}),CYn=gYn.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>ap}),EYn=vYn.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>ap}),NYn=bYn.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>ap}),zYn={ProjectsProjectIdSkillsRoute:SYn,ProjectsProjectIdIndexRoute:kYn,ProjectsProjectIdSettingsTabRoute:CYn,ProjectsProjectIdTasksSessionIdRoute:EYn,ProjectsProjectIdTasksNewRoute:NYn},jYn=ap._addFileChildren(zYn),AYn={ProjectsProjectIdRoute:jYn,ProjectsIndexRoute:wYn},TYn=n7._addFileChildren(AYn),RYn={IndexRoute:yYn,ProjectsRoute:TYn,RemoteLaunchRoute:xYn},MYn=Jb._addFileChildren(RYn)._addFileTypes(),OYn=$Q({routeTree:MYn,context:{queryClient:et},trailingSlash:"never",defaultPendingComponent:j6,defaultErrorComponent:A6,defaultNotFoundComponent:d9n}),Q1={minimize:"",maximize:"",restore:"",close:""};function DYn(e){const n=new MutationObserver(e);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-maximized"]}),()=>n.disconnect()}function IG(e){var n;(n=window.ipc)==null||n.postMessage(`titlebar:${e}`)}function K4(e){return n=>{n.button===0&&(n.preventDefault(),IG(`resize:${e}`))}}function W4({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:()=>IG(t),children:n})}function LYn(){const e=T.useSyncExternalStore(DYn,()=>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:K4("n")}),_.jsx("div",{className:"fixed start-0 top-0 z-300 size-2 cursor-nwse-resize",onMouseDown:K4("nw")}),_.jsx("div",{className:"fixed end-0 top-0 z-300 size-2 cursor-nesw-resize",onMouseDown:K4("ne")})]}),_.jsxs("div",{className:"fixed end-0 top-0 z-300 flex",children:[_.jsx(W4,{label:pxn(),glyph:Q1.minimize,message:"minimize",className:"hover:bg-panel"}),_.jsx(W4,{label:e?wxn():cxn(),glyph:e?Q1.restore:Q1.maximize,message:"zoom",className:"hover:bg-panel"}),_.jsx(W4,{label:txn(),glyph:Q1.close,message:"close",className:"hover:bg-accent-red hover:text-white"})]})]})}const $G=E();document.documentElement.lang=$G;document.documentElement.dir="ltr";jI($G);VK.createRoot(document.getElementById("root")).render(_.jsxs(T.StrictMode,{children:[_.jsx(aK,{client:et,children:_.jsx(FQ,{router:OYn})}),_.jsx(HSn,{}),UI&&_.jsx(LYn,{})]}));export{pc as C,$t as I,bb as M,Xh as P,N$ as S,gCn as a,fz as b,ct as c,Kr as d,zHn as e,Zt as f,E as g,ai as h,dz as i,_ as j,T as r}; +${w}`,b=T.useRef({key:"",value:0});b.current.key!==v&&(b.current={key:v,value:b.current.value+1});const y=T.useMemo(()=>{const Y=t?co(t):"experiments";return typeof Y=="object"&&"path"in Y&&Y.line&&p!==b.current.value?{...Y,lineScrollRequest:b.current.value}:Y},[t,p,i.href,w]),x=ut(Gi(n)),C=T.useMemo(()=>{var Y;return((Y=x.data)==null?void 0:Y.map(_e=>_e.id))??null},[x.data]),N=T.useRef(new Set),j=T.useRef(new Set),A=T.useRef({}),[z,M]=T.useState(0),D=T.useRef({projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"});D.current={projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"};const I=T.useCallback((Y,_e=!1)=>{const xe=D.current;xe.projectId&&s.navigate({href:iv(xe.projectId,xe.activeSessionId,Y),replace:_e})},[s]),B=T.useCallback(Y=>{const _e=fl(Y);I(_e.kind==="file"?{..._e,line:void 0}:_e)},[I]),G=T.useCallback(()=>I(void 0),[I]),U=T.useCallback(Y=>{(t==null?void 0:t.kind)==="experiment"&&I({...t,runId:Y??void 0})},[t,I]),Q=T.useCallback(Y=>{s.navigate({href:Y?`/projects/${encodeURIComponent(Y)}`:"/projects"})},[s]),V=T.useCallback(Y=>{var _e;if(n)if(Y==="chat"){const xe=c.current;s.navigate({href:iv(n,xe,(_e=Lu(Ts.current,xe??"new"))==null?void 0:_e.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${Y==="skills"?"skills":`settings/${Y}`}`})},[s,n]),Z=Qu(),{status:J}=I6(e.kind==="local"),$=T.useMemo(()=>zh(),[n]),L=ut($),q=L.data??null,P=T.useCallback(Y=>{Vr($.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[$]),F=T.useMemo(()=>Om(),[n]),re=ut(F),ie=re.data??null,ue=T.useCallback(Y=>{Vr(F.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[F]),se=T.useRef(void 0);se.current=ie==null?void 0:ie.tourCompleted;const K=[!x.data&&x.error?lL():null,!L.data&&L.error?v0():null,!re.data&&re.error?ofe():null].filter(Y=>Y!==null),oe=K.length?xfe({items:new Intl.ListFormat(Z).format(K)}):null,ce=T.useRef(null),pe=ut(Vv(n)),ve=pe.data??[],Me=!pe.isPending,[Fe,Ye]=T.useState(!1),$e=ut(Tu(n)).data??[],yt=T.useRef($e);yt.current=$e;const ot=T.useRef(new Map),Mt=T.useRef(new Set),jt=T.useRef(null),Pt=T.useRef(!1),Le=T.useRef(new Map),nt=T.useRef(new Map),ke=T.useRef(0),me=T.useRef(ve);me.current=ve;const qe=ut(HEn(n)).data??null,[rt,dt]=T.useState("table"),[st,Ut]=T.useState(!1),[Xt,en]=T.useState("project"),an=T.useRef(null),{open:At,setOpen:gn,ref:on}=Ki(an),[Ot,dn]=T.useState(!1),cn=ve.every(Y=>Y.chatSessionId),kn=u&&cn?Xt:"project",Wn=T.useMemo(()=>kn!=="agent"?ve:ve.filter(Y=>Y.chatSessionId===u),[ve,kn,u]),gs=T.useMemo(()=>Wn.filter(Y=>st||!Y.archived),[Wn,st]),ns=T.useMemo(()=>JUn(ve),[ve]),gt=T.useCallback(async(Y,_e,xe)=>{try{await b3n(Y,_e,xe),await tt.invalidateQueries({queryKey:Vv(n).queryKey})}catch(ze){Zt(ze instanceof Error?ze.message:String(ze),"error")}},[n]),ln=T.useCallback(Y=>{gt(Y,kn==="agent"?"taskRegion":"region",!1)},[gt,kn]),bn=T.useMemo(()=>{if(kn!=="agent")return $e;const Y=new Set(Wn.map(_e=>_e.id));return $e.filter(_e=>Y.has(_e.experimentId))},[$e,Wn,kn]),[un,_r]=T.useState([]),[Mn,Qn]=T.useState(!1),[ar,wt]=T.useState(!1),[Ht,vr]=T.useState(!1),[Pn,Qr]=T.useState(!1),[Xn,Yn]=T.useState(null),[Xr,As]=T.useState([]),[Fr,We]=T.useState([]),vt=T.useRef(new Map),fr=T.useRef(new Map),yn=Y=>{let _e=fr.current.get(Y);return _e||(_e=new AUn,fr.current.set(Y,_e)),_e},[Hn,Zn]=T.useState([]),[Fn,Yr]=T.useState([]),[An,wo]=T.useState([]),[ai,Ds]=T.useState([]),[Hr,t_]=T.useState([]),[ko,So]=T.useState(null),[qs,Us]=T.useState("files"),[Wi,Gs]=T.useState(new Set),[cr,Si]=T.useState(!1),[Ct,za]=T.useState(null),[rs,Ks]=T.useState(sB),[_t,Bt]=T.useState(()=>window.innerWidth>=DO),oi=o==="chat"&&!h&&_t,[Ci,Ei]=T.useState(!0),[Or,ci]=T.useState(!1),kc=T.useRef(t6()),Qi=T.useRef(u);Qi.current=u;const ss=T.useRef(un);ss.current=un;const Wa=T.useRef(Hr);Wa.current=Hr;const Ni=T.useRef(null),Yt=T.useCallback(Y=>{const _e=[...Y];Wa.current=_e,t_(_e)},[]),zi=T.useCallback(Y=>{Ni.current=Y,So(Y)},[]),Tl=T.useCallback(Y=>{const _e=Tt(Y);As(Re=>Xp(Re,_e)),We(Re=>Xp(Re,_e)),Zn(Re=>Xp(Re,_e)),Yr(Re=>Xp(Re,_e)),Ds(Re=>Xp(Re,_e));const xe=Aa.current;if(xe&&"path"in Y){const Re=Hs(xe,Qi.current,Y);vt.current.delete(Re),fr.current.delete(Re),j.current.delete(Re),N.current.delete(Re)}const ze=ss.current.filter(Re=>Tt(Re)!==_e);ss.current=ze,_r(ze)},[]),$n=T.useCallback(Y=>{const _e=Tt(Y),xe=[...ss.current.filter(ze=>Tt(ze)!==_e),m1(Y)];ss.current=xe,_r(xe),B(Y)},[B]),dr=T.useCallback((Y,_e,xe)=>{const ze=Tt(Y),Re=Ni.current,Xe=DPn({order:Wa.current,previewKey:Re?Tt(Re):null},ze,_e);Xe.replacedKey&&Re&&typeof Re!="string"&&Tt(Re)===Xe.replacedKey&&Tl(Re),Yt(Xe.order),Xe.previewKey===null?zi(null):Xe.previewKey===ze&&zi(m1(Y));const Ve=[...ss.current.filter(Lt=>Tt(Lt)!==ze),m1(Y)];ss.current=Ve,_r(Ve),I(fl(Y,xe))},[Tl,Yt,zi,I]),Ls=T.useCallback(Y=>{const _e=Ni.current;_e&&Tt(_e)===Tt(Y)&&zi(null)},[zi]);T.useEffect(()=>{let Y=!1;const _e=ze=>{const Re=Ni.current,Xe=ze.target;if(Xe instanceof Element&&Xe.closest("input, textarea, [contenteditable='true']")!==null){Y=!1;return}if(Re&&Tt(Re)===Tt(kc.current.rightTab)&&(ze.metaKey||ze.ctrlKey)&&!ze.altKey&&!ze.shiftKey&&ze.key.toLowerCase()==="k"){ze.preventDefault(),Y=!0;return}if(Y&&ze.key==="Enter"){ze.preventDefault(),Y=!1;const Lt=Ni.current;Lt&&Ls(Lt);return}Y=!1},xe=()=>{Y=!1};return window.addEventListener("keydown",_e),window.addEventListener("blur",xe),window.addEventListener("pointerdown",xe),()=>{window.removeEventListener("keydown",_e),window.removeEventListener("blur",xe),window.removeEventListener("pointerdown",xe)}},[Ls]);const is=T.useCallback((Y,_e)=>{const xe=Tt(Y),ze=Ni.current;ze&&Tt(ze)===xe&&zi(null);const Re=LPn({order:Wa.current,previewKey:ze?Tt(ze):null},xe,ss.current.map(Tt));Yt(Re.order);const Xe=ss.current.filter(Lt=>Tt(Lt)!==xe);if(ss.current=Xe,_r(Xe),!_e)return;const Ve=Re.fallbackKey?Xe.find(Lt=>Tt(Lt)===Re.fallbackKey):void 0;Ve?B(Ve):(G(),Si(!1))},[Yt,zi,B,G]),Vs=V,Xi=T.useMemo(()=>({rightTab:m1(y),tabHistory:un,experimentsTabOpen:Mn,filesTabOpen:ar,artifactsTabOpen:Ht,terminalTabOpen:Pn,expTabs:Xr,fileTabs:Fr,planTabs:Hn,subagentTabs:Fn,sideTabs:An,codeTabs:ai,contentTabOrder:Wa.current,previewTab:Ni.current,filesView:qs,filesToggled:Wi,selectedRunId:f,scope:Xt,panelOpen:h,panelMax:cr,treeViewport:Ct}),[y,un,Mn,ar,Ht,Pn,Xr,Fr,Hn,Fn,An,ai,Hr,ko,qs,Wi,f,Xt,h,cr,Ct]);kc.current=Xi;const Rl=T.useCallback(()=>Object.fromEntries(vt.current),[]),Sc=T.useRef(void 0),Ff=T.useCallback(()=>{clearTimeout(Sc.current),Sc.current=setTimeout(()=>M(Y=>Y+1),200)},[]);T.useEffect(()=>()=>clearTimeout(Sc.current),[]);const Co=T.useCallback((Y,_e,xe)=>{if(_r(Y.tabHistory),ss.current=Y.tabHistory,Qn(Y.experimentsTabOpen),wt(Y.filesTabOpen),vr(Y.artifactsTabOpen),Qr(Y.terminalTabOpen),As(Y.expTabs),We(Y.fileTabs),Zn(Re=>Re===Y.planTabs?Re:Y.planTabs.map(Xe=>{var Ve;return{...Xe,plan:((Ve=Re.find(Lt=>Lt.sessionId===Xe.sessionId&&Lt.promptId===Xe.promptId))==null?void 0:Ve.plan)??""}})),Yr(Y.subagentTabs),wo(Y.sideTabs),Ds(Y.codeTabs),Yt(Y.contentTabOrder),zi(Y.previewTab),Us(Y.filesView),Gs(Y.filesToggled),en(Y.scope),Si(Y.panelMax),za(Y.treeViewport),dn(D.current.activeSessionId===Xd&&Y.fileTabs.some(Re=>z_(Re,{path:bw,source:"artifacts"}))),xe){for(const[Re,Xe]of Object.entries((_e==null?void 0:_e.scroll)??{}))vt.current.set(Re,Xe);Object.assign(A.current,_e==null?void 0:_e.sourceModes)}const ze=D.current;if(ze.projectId)for(const Re of Y.fileTabs){const Xe=Hs(ze.projectId,ze.activeSessionId,Re);j.current.has(Xe)||N.current.add(Xe)}},[Yt,zi]),{ready:as,loaded:n_,error:Yi,retry:Zi,capture:Cc,workspace:Ts}=V8n({projectId:ie&&C!==null&&((a==null?void 0:a.kind)!=="task"||!u||C.includes(u))?n:null,taskKey:u??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",firstDemoOpen:(ie==null?void 0:ie.tourCompleted)===!1,state:Xi,apply:Co,getScroll:Rl,sourceModes:A.current,revision:z}),ja=T.useRef(null);T.useLayoutEffect(()=>{if(!as||!Me||(a==null?void 0:a.kind)!=="task")return;const Y=ja.current;(Y==null?void 0:Y.projectId)===n&&Y.taskId===u&&Y.scope!==kn&&za(null),ja.current={projectId:n,taskId:u,scope:kn}},[as,Me,a==null?void 0:a.kind,n,u,kn]);const Qa=T.useCallback((Y,_e)=>{var Lt;const xe=(_e==null?void 0:_e.projectId)??n;if(!xe)return;const ze=xe===n;Y&&ze&&_e!=null&&_e.replace&&u===null&&(Cc(),G8n(xe,Y));const Re=Lu(eB(xe),Y??"new"),Xe=Re?Re.active:Vo(xe)?(Lt=n6(Y??void 0,se.current===!1))==null?void 0:Lt.active:void 0,Ve=ze&&(_e!=null&&_e.replace)&&Y&&u===null?D.current.pane:Xe;s.navigate({href:iv(xe,Y,Ve),replace:ze&&(_e==null?void 0:_e.replace)})},[s,n,u,Cc]);T.useEffect(()=>{as&&(a==null?void 0:a.kind)!=="task"&&!c.current&&Ts.current.lastTaskId&&(C!=null&&C.includes(Ts.current.lastTaskId))&&(c.current=Ts.current.lastTaskId,M(Y=>Y+1))},[as,a==null?void 0:a.kind,Ts,C]),sX({shouldBlockFn:({next:Y})=>{var _e;return((_e=gf(Y.pathname))==null?void 0:_e.projectId)!==n&&[...fr.current.values()].some(xe=>xe.needsProtection)&&!CM(mz())},enableBeforeUnload:()=>[...fr.current.values()].some(Y=>Y.needsProtection)});const Xa=T.useRef(null);T.useEffect(()=>{const Y=Yb(i.href);!ie||!as||!Y||(ey.queue({lastLocation:Y,railOpen:Ci,panelWidth:rs,experimentsView:rt},Xa.current===Y?250:0),Xa.current=Y)},[i.href,ie,as,Ci,rs,rt]);const Zr=(ie==null?void 0:ie.onboardingCompleted)??!1,[vs,Jn]=T.useState(!1),[Ml,Eo]=T.useState(null),[ap,ji]=T.useState(0),No=T.useCallback(()=>Jn(!0),[]),Ya=T.useCallback(async Y=>{const _e=se.current===!1,xe=await r.mutateAsync({tourCompleted:!0});_e&&vu({name:"demo_welcome_choice",choice:Y}),ue(ze=>ze&&{...ze,tourCompleted:xe.tourCompleted}),Jn(!1),Y==="explore_demo"&&ji(ze=>ze+1)},[]),Za=T.useCallback(async()=>{await Ya("create_project"),ci(!0)},[Ya]);T.useEffect(()=>{!n||!Vo(n)||!Zr||ie!=null&&ie.tourCompleted||No()},[n,Zr,No,ie==null?void 0:ie.tourCompleted]);const _n=(q==null?void 0:q.find(Y=>Y.id===n))??null;T.useEffect(()=>{const Y=oe||ie===null?null:_n==null?void 0:_n.name;document.title=Y?`${_a(Y)} — OpenResearch`:"OpenResearch"},[oe,ie,_n]);const Aa=T.useRef(n);Aa.current=n;const zo=T.useCallback(Y=>{n&&vu({name:"first_action",surface:Vo(n)?"demo":"project",action:Y})},[n]);T.useEffect(()=>{o!=="chat"&&o!=="skills"&&zo("open_settings")},[o,zo]);const Ec=T.useCallback((Y=!1)=>{Y&&(!D.current.isTask||D.current.pane)||(zo("open_experiment"),Qn(!0),I({kind:"home",view:"experiments"},Y))},[I,zo]),Nc=()=>{L.refetch(),re.refetch(),x.refetch()},hr=T.useRef(!1);T.useEffect(()=>{if(!ie||hr.current)return;hr.current=!0,ce.current=ie.preferredAgent;const Y=JS()??ie.workspace;Y&&(Ei(Y.railOpen),Ks(Math.min(Y.panelWidth,Fd())),dt(Y.experimentsView))},[ie]),T.useEffect(()=>{C&&c.current&&!C.includes(c.current)&&(c.current=null)},[C]);const r_=T.useRef(Promise.resolve()),bs=T.useRef(0),li=T.useCallback(Y=>{const _e=++bs.current;ue(ze=>ze&&{...ze,preferredAgent:Y});const xe=r_.current.then(()=>r.mutateAsync({preferredAgent:Y})).then(ze=>{ce.current=ze.preferredAgent,_e===bs.current&&ue(Re=>Re&&{...Re,preferredAgent:ze.preferredAgent})}).catch(ze=>{throw _e===bs.current&&ue(Re=>Re&&{...Re,preferredAgent:ce.current}),ze});return r_.current=xe.catch(()=>{}),xe},[]),Ji=T.useRef(Promise.resolve()),Ol=T.useRef(0),Hf=T.useCallback(Y=>{const _e=++Ol.current;ue(xe=>xe&&{...xe,preferredAutonomy:Y}),Ji.current=Ji.current.then(()=>r.mutateAsync({preferredAutonomy:Y})).catch(()=>{_e===Ol.current&&re.refetch()})},[]);T.useEffect(()=>{const Y=()=>{Ks(_e=>Math.min(_e,Fd())),Bt(window.innerWidth>=DO)};return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)},[]);const Ai=T.useCallback(Y=>{Pt.current=!1,Le.current.clear(),nt.current.clear();const _e=++ke.current;tt.fetchQuery(Tu(Y)).then(xe=>{if(Aa.current!==Y||jt.current!==Y||ke.current!==_e)return;Le.current=new Map(xe.map(Re=>[Re.id,Re]));const ze=[...nt.current.values()].some(Re=>{const Xe=Le.current.get(Re.id);return!Xe||Xe.status!=="running"&&Xe.updatedAt<=Re.updatedAt});nt.current.clear();for(const Re of xe){const Xe=ot.current.get(Re.id);(!Xe||Xe.updatedAt{var Xe;return xe.some(Ve=>Ve.id===Re&&Ve.status==="running")?Re:((Xe=xe.find(Ve=>Ve.status==="running"))==null?void 0:Xe.id)??null}),ze&&Ec(!0)}).catch(()=>{ke.current===_e&&(nt.current.clear(),Ye(!0))})},[Ec]);T.useEffect(()=>{if(n)return jt.current=n,ot.current.clear(),Mt.current.clear(),m3n(n).catch(()=>{}),Ai(n),()=>{ke.current++}},[Ai,n]);const qf=T.useCallback(()=>{vr(!0),$n("artifacts")},[$n]),Uf=T.useCallback(()=>{Qr(!0),$n("terminal")},[$n]),Ja=u??(n?`project:${n}`:null);T.useEffect(()=>{Yn(h?y==="terminal"?Ja:Y=>Y===Ja?Y:null:null)},[h,y,Ja]),gSn({onReconnect:()=>{const Y=Aa.current;Y&&(jt.current=Y,ot.current.clear(),Mt.current.clear(),Ai(Y))},onRun:Y=>{if(Y.projectId!==Aa.current||Y.projectId!==jt.current)return;const _e=ot.current.get(Y.id),xe=Mt.current.has(Y.id);if(_e&&_e.updatedAt>Y.updatedAt||(ot.current.set(Y.id,Y),Mt.current.add(Y.id),Vo(Y.projectId)&&Eo(Xe=>Y.status==="running"?Xe??Y.id:Xe===Y.id?null:Xe),Y.status!=="running"||(_e==null?void 0:_e.status)==="running"))return;const ze=Le.current.get(Y.id),Re=Pt.current&&(!ze||ze.status!=="running"&&ze.updatedAt<=Y.updatedAt);xe&&_e||Re?Ec(!0):Pt.current||nt.current.set(Y.id,Y)}});const Gf=T.useCallback(()=>en("project"),[]),Ws=T.useCallback((Y,_e="overview",xe="preview",ze)=>{zo("open_experiment");const Re={id:Y,view:_e};As(Xe=>Xe.some(Ve=>Nw(Ve,Re))?Xe:[...Xe,Re]),_e==="terminal"&&Vo(Aa.current)&&Ks(Xe=>Math.max(Xe,cA())),dr(Re,xe,ze)},[dr]),s_=T.useCallback((Y,_e="preview")=>{const xe=yt.current.filter(Re=>Re.id===Y||Re.id.startsWith(Y)),ze=xe.length===1?xe[0]:null;ze&&Ws(ze.experimentId,"terminal",_e,ze.id)},[Ws]),Kf=T.useMemo(()=>new Map(ve.map(Y=>{var _e;return[Y.id,((_e=Y.title)==null?void 0:_e.trim())||Y.slug||rl()]})),[ve,Z]),ea=IO(Kf),Dl=T.useMemo(()=>{const Y=new Map;for(const _e of $e)Y.set(_e.id,ea.get(_e.experimentId)??rl());return Y},[ea,$e,Z]),i_=IO(Dl),zc=T.useCallback(Y=>{const _e=i_.get(Y);if(_e)return _e;const xe=[...i_].filter(([ze])=>ze.startsWith(Y));return xe.length===1?xe[0][1]:""},[i_]),Ll=T.useCallback(Y=>{const _e=ea.get(Y);if(_e)return _e;const xe=[...ea].filter(([ze])=>ze.startsWith(Y));return xe.length===1?xe[0][1]:""},[ea]),jc=T.useCallback((Y,_e="preview")=>{const xe=me.current.filter(ze=>ze.id===Y||ze.id.startsWith(Y));xe.length===1&&Ws(xe[0].id,"overview",_e)},[Ws]),a_=T.useCallback(Y=>{const _e=Xr.findIndex(xe=>Nw(xe,Y));_e!==-1&&(As(xe=>xe.filter((ze,Re)=>Re!==_e)),is(Y,Tt(y)===Tt(Y)))},[Xr,is,y]),jo=T.useCallback((Y,_e="preview")=>{Y.line!=null&&k(Re=>Re+1);const xe=Aa.current;if(xe){const Re=Hs(xe,Qi.current,Y);kc.current.fileTabs.some(Xe=>z_(Xe,Y))||N.current.delete(Re),j.current.add(Re)}const ze=Z$(Y);We(Re=>{const Xe=Re.findIndex(Lt=>z_(Lt,Y));if(Xe===-1)return[...Re,ze];const Ve=Re.slice();return Ve[Xe]=ze,Ve}),dr(Y,_e)},[dr]),eo=T.useCallback((Y,_e,xe,ze,Re,Xe)=>{const Ve=q==null?void 0:q.find(Jr=>Jr.id===n),Lt=RZn(Y,Ve==null?void 0:Ve.repoPath,_e,(Ve==null?void 0:Ve.artifactsDir)??(Ve==null?void 0:Ve.filesDir),Ve==null?void 0:Ve.slug);if(!Lt)return null;const Un=Re?me.current.find(Jr=>Jr.id===Re||Re.length>=6&&Jr.id.startsWith(Re)):void 0,ws=xe??(Un==null?void 0:Un.branchName),Rs=Lt.source==null||Lt.source==="repo";return ws&&Rs&&(Lt.ref=ws),Xe&&!Lt.ref&&Rs&&(Lt.branchLabel=Xe),ze!=null&&(Lt.line=ze),Lt},[q,n]),Ao=T.useCallback((Y,_e,xe,ze,Re,Xe,Ve="preview")=>{const Lt=eo(Y,_e,xe,ze,Re,Xe);Lt&&jo(Lt,Ve)},[jo,eo]),To=T.useCallback(Y=>jo({path:Y,source:"artifacts"},"keepOpen"),[jo]),Ac=T.useCallback((Y,_e,xe,ze,Re,Xe="preview")=>{const Ve=eo(Y,_e,Re,xe,ze);Ve&&jo(Ve,Xe)},[jo,eo]),Vf=T.useMemo(()=>({projectId:n??"",remote:e.kind==="ssh",resolve:(Y,_e,xe)=>{const ze=(_e==null?void 0:_e.source)==="artifacts"?`artifacts/${Y}`:Y,Re=eo(ze,_e?_e.sessionId:u??void 0,_e==null?void 0:_e.ref,void 0,xe);return Re?{path:Re.path,source:Re.source??"repo",sessionId:Re.sessionId,ref:Re.ref}:null}}),[n,e.kind,eo,u]),Sr=T.useCallback((Y,_e)=>{Ls(Y),_e()},[Ls]),Wf=T.useCallback(Y=>{var ze;const _e=Fr.findIndex(Re=>z_(Re,Y));if(_e===-1)return;const xe=n?Hs(n,u,Y):null;xe&&((ze=fr.current.get(xe))!=null&&ze.needsProtection)&&!CM(mz())||(We(Re=>Re.filter((Xe,Ve)=>Ve!==_e)),xe&&(vt.current.delete(xe),fr.current.delete(xe),j.current.delete(xe),N.current.delete(xe),delete A.current[xe]),u===Xd&&z_(Y,{path:bw,source:"artifacts"})&&dn(!1),is(Y,Tt(y)===Tt(Y)))},[u,Fr,is,n,y]),o_=T.useCallback(Y=>{Y.lineScrollRequest!==void 0&&m(Y.lineScrollRequest)},[]),Tc=T.useCallback((Y,_e,xe,ze="preview")=>{const Re={kind:"plan",sessionId:_e,promptId:xe,plan:Y};Zn(Xe=>{const Ve=Xe.findIndex(Un=>Un.promptId===xe);if(Ve===-1)return[...Xe,Re];const Lt=Xe.slice();return Lt[Ve]=Re,Lt}),dr(Re,ze)},[dr]),Ro=T.useCallback(Y=>{const _e=Hn.findIndex(xe=>xe.promptId===Y.promptId);_e!==-1&&(Zn(xe=>xe.filter((ze,Re)=>Re!==_e)),is(Y,Tt(y)===Tt(Y)))},[is,Hn,y]),Il=T.useCallback((Y,_e,xe,ze="preview")=>{const Re={kind:"subagent",sessionId:Y,spawnPartId:_e,label:xe};Yr(Xe=>Xe.some(Ve=>Ve.spawnPartId===_e)?Xe:[...Xe,Re]),dr(Re,ze)},[dr]),Qf=T.useCallback(Y=>{const _e=Fn.findIndex(xe=>xe.spawnPartId===Y.spawnPartId);_e!==-1&&(Yr(xe=>xe.filter((ze,Re)=>Re!==_e)),is(Y,Tt(y)===Tt(Y)))},[is,y,Fn]),Xf=T.useCallback(Y=>{const _e={kind:"side",sessionId:Y};wo(xe=>xe.some(ze=>ze.sessionId===Y)?xe:[...xe,_e]),Ks(xe=>Math.max(xe,cA())),dr(_e,"keepOpen")},[dr]),Mo=T.useCallback(Y=>{An.some(_e=>_e.sessionId===Y.sessionId)&&(wo(_e=>_e.filter(xe=>xe.sessionId!==Y.sessionId)),is(Y,Tt(y)===Tt(Y)))},[is,y,An]);T.useEffect(()=>{const Y=x.data;if(Y)for(const _e of An)Y.some(xe=>xe.id===_e.sessionId)||Mo(_e)},[x.data,An,Mo]);const $l=T.useCallback(async(Y,_e)=>{let xe;try{xe=await dkn(Y)}catch(ze){Zt(ccn({error:W1(ze)}),"error");return}if(D.current.activeSessionId!==Y){Q3(xe.id).catch(ze=>{Zt(gj({error:W1(ze)}),"error")});return}if(Vr(Gi(xe.projectId).queryKey,ze=>ze&&[xe,...ze.filter(Re=>Re.id!==xe.id)]),Xf(xe.id),!!_e)try{await tt.fetchQuery(ac(xe.id)),await X3(xe.id,_e)}catch(ze){Zt(W1(ze),"error")}},[Xf]),Oo=T.useCallback(Y=>{Mo(Y),Q3(Y.sessionId).catch(_e=>{Zt(gj({error:W1(_e)}),"error")})},[Mo]),[Do,c_]=T.useState({});T.useEffect(()=>{if(c_(Ve=>{const Lt=new Set(Fn.map(Un=>Un.spawnPartId));return Object.keys(Ve).every(Un=>Lt.has(Un))?Ve:Object.fromEntries(Object.entries(Ve).filter(([Un])=>Lt.has(Un)))}),Fn.length===0)return;let Y=!0;const _e=new Set,xe=(Ve,Lt,Un)=>{c_(ws=>{var Jr;let Rs=ws;for(const ta of Lt)if(!(Un&&_e.has(ta.spawnPartId)))for(const Cn of Ve){const os=bb(Cn.parts,ta.spawnPartId);if(!os)continue;Un||_e.add(ta.spawnPartId);const na={label:mqn(os),running:((Jr=os.state)==null?void 0:Jr.status)==="running"},On=Rs[ta.spawnPartId];(!On||On.label!==na.label||On.running!==na.running)&&(Rs===ws&&(Rs={...ws}),Rs[ta.spawnPartId]=na);break}return Rs})};let ze=0;const Re=()=>{const Ve=++ze;for(const Lt of new Set(Fn.map(Un=>Un.sessionId)))tt.fetchQuery({...ac(Lt),staleTime:0}).then(({messages:Un})=>{Y&&Ve===ze&&xe(Un,Fn.filter(ws=>ws.sessionId===Lt),!0)}).catch(()=>{})};Re();const Xe=Gv(Ve=>{if(Ve.type==="reconnected"){_e.clear(),Re();return}if(Ve.type!=="message")return;const Lt=Fn.filter(Un=>Un.sessionId===Ve.sessionId);Lt.length&&xe([Ve.message],Lt,!1)});return()=>{Y=!1,Xe()}},[Fn]);const Ta=T.useCallback((Y,_e,xe="files",ze="preview")=>{const Re={code:!0,experimentId:Y,branch:_e,view:xe,toggled:new Set};Ds(Xe=>Xe.some(Ve=>Cd(Ve,Re))?Xe.map(Ve=>Cd(Ve,Re)?{...Ve,experimentId:Y,view:xe}:Ve):[...Xe,Re]),dr(Re,ze)},[dr]),l_=T.useCallback((Y,_e)=>{Ds(xe=>xe.map(ze=>Cd(ze,Y)?{...ze,..._e}:ze)),_e.view&&I(fl({...Y,..._e}))},[]),Yf=T.useCallback(Y=>{const _e=ai.findIndex(xe=>Cd(xe,Y));_e!==-1&&(Ds(xe=>xe.filter((ze,Re)=>Re!==_e)),is(Y,Tt(y)===Tt(Y)))},[ai,is,y]),Bl=T.useCallback(()=>{wt(!0),$n("files")},[$n]),Ti=T.useCallback(Y=>{Y==="experiments"?Qn(!1):Y==="files"?wt(!1):Y==="terminal"?(Qr(!1),Yn(null)):vr(!1),is(Y,y===Y)},[is,y]),u_=Y=>{Y.preventDefault(),Y.currentTarget.setPointerCapture(Y.pointerId);const xe=document.body.style.userSelect;document.body.style.userSelect="none";const ze=cr,Re=Y.clientX,Xe=rs;let Ve=!1;function Lt(){window.removeEventListener("pointermove",Un),window.removeEventListener("pointerup",Lt),window.removeEventListener("pointercancel",Lt),document.body.style.userSelect=xe}function Un(ws){if(ze){const Cn=ws.clientX-Re;if(Ve||CnJr+DZn){Si(!0);return}Si(!1);const ta=Math.min(Math.max(Rs,Yv),Jr);Ks(ta)}window.addEventListener("pointermove",Un),window.addEventListener("pointerup",Lt),window.addEventListener("pointercancel",Lt)},__=(Y,_e)=>{P(xe=>xe?LO(xe,Y):[Y]),s.navigate({href:`/projects/${encodeURIComponent(Y.id)}${_e?"/settings/git":""}`}),_e&&Zt(_e,"error")},Is=typeof y=="object"&&"id"in y?y:null,er=typeof y=="object"&&"path"in y?y:null,Lo=(er==null?void 0:er.source)==="artifacts"&&qe?rh(qe.entries,er.path):null,op=Lo?`${Lo.modifiedAt}:${Lo.size}`:null,Rc=u===Xd&&Ot?Fr.find(Y=>z_(Y,{path:bw,source:"artifacts"})):void 0,cp=Rc?[Rc]:[],qn=typeof y=="object"&&"kind"in y&&y.kind==="plan"?y:null,ui=qn==null?void 0:qn.sessionId,to=qn==null?void 0:qn.promptId,Pl=!!(ui&&to&&(C!=null&&C.includes(ui))),Mc=ut({...ac(ui??""),enabled:Pl,subscribed:Pl}),Io=T.useMemo(()=>{var _e;if(!ui||!to||!Mc.data)return null;const Y=Mc.data.messages.flatMap(xe=>{const ze=bb(xe.parts,to);return ze?[ze]:[]})[0];return{key:`${ui}:${to}`,text:((_e=Y==null?void 0:Y.prompt)==null?void 0:_e.plan)??null}},[ui,to,Mc.data]),ys=typeof y=="object"&&"kind"in y&&y.kind==="subagent"?y:null,xs=typeof y=="object"&&"kind"in y&&y.kind==="side"?y:null,te=xs?(f_=x.data)==null?void 0:f_.find(Y=>Y.id===xs.sessionId):void 0,ge=typeof y=="object"&&"code"in y?y:null,Se=ge?ai.find(Y=>Cd(Y,ge))??null:null,Oe=new Map;for(const Y of[...Xr,...Fr,...Hn,...Fn,...An,...ai])Oe.set(Tt(Y),Y);const Pe=Rc?Tt(Rc):null,Et=Hr.filter(Y=>Y!==Pe).map(Y=>Oe.get(Y)).filter(H8n),qt=Y=>ko!==null&&Tt(ko)===Tt(Y),xn=Y=>_.jsx(Go,{active:er!==null&&z_(er,Y),label:Y.path.split("/").pop()||Y.path,icon:_.jsx(O$,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>Wf(Y)},`file:${e6(Y)}`),rn=Is?ve.find(Y=>Y.id===Is.id)??null:null,or=Se?ve.find(Y=>Y.id===Se.experimentId&&Y.branchName===Se.branch)??null:null,Oc=Y=>{var xe,ze,Re,Xe;if("path"in Y)return xn(Y);if("id"in Y){const Ve=ve.find(Lt=>Lt.id===Y.id);return _.jsx(Go,{active:Is!==null&&Nw(Is,Y),label:Ve?Ve.title||Ve.slug:"…",icon:Y.view==="overview"?_.jsx(jCn,{size:12,className:"shrink-0"}):_.jsx(bo,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>a_(Y)},Tt(Y))}if("kind"in Y&&Y.kind==="plan")return _.jsx(Go,{active:qn!==null&&qn.promptId===Y.promptId,label:pL(),icon:_.jsx(VS,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>Ro(Y)},Tt(Y));if("kind"in Y&&Y.kind==="side"){const Ve=(xe=x.data)==null?void 0:xe.find(Lt=>Lt.id===Y.sessionId);return _.jsx(Go,{active:xs!==null&&xs.sessionId===Y.sessionId,label:((ze=Ve==null?void 0:Ve.title)==null?void 0:ze.trim())||H3(),shimmer:(Ve==null?void 0:Ve.busy)??!1,icon:_.jsx(P0,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>Oo(Y)},Tt(Y))}if("kind"in Y)return _.jsx(Go,{active:ys!==null&&ys.spawnPartId===Y.spawnPartId,label:((Re=Do[Y.spawnPartId])==null?void 0:Re.label)??Y.label??zfe(),shimmer:((Xe=Do[Y.spawnPartId])==null?void 0:Xe.running)??!1,icon:_.jsx(XS,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>Qf(Y)},Tt(Y));const _e=ve.find(Ve=>Ve.id===Y.experimentId);return _.jsx(Go,{active:Se!==null&&Cd(Se,Y),label:(_e==null?void 0:_e.slug)??Y.branch,icon:_.jsx(Pu,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>Yf(Y)},Tt(Y))};if(!a||a.kind==="resume")return null;if(oe)return _.jsxs("div",{className:"app flex flex-col h-full",children:[_.jsxs("div",{className:c0,children:[_.jsx("p",{children:oe}),_.jsx(Ie,{variant:"primary",onClick:Nc,children:ni()})]}),e.kind==="ssh"&&_.jsx(g5,{runtime:e,corner:!0})]});if(q&&!_n)return _.jsxs("div",{className:c0,children:[fo(),_.jsx(Ie,{onClick:()=>Q(null),children:v0()})]});if(Yi&&!as)return _.jsxs("div",{className:c0,children:[_.jsx("p",{role:"alert",children:Yi}),_.jsx(Ie,{onClick:Zi,children:ni()})]});if(q===null||ie===null||!n_||C===null)return _.jsxs("div",{className:"app flex flex-col h-full",children:[_.jsx("div",{className:c0,children:_.jsx(St,{})}),e.kind==="ssh"&&_.jsx(g5,{runtime:e,corner:!0})]});if(!_n||(a==null?void 0:a.kind)==="task"&&u&&!(C!=null&&C.includes(u)))return _.jsxs("div",{className:c0,children:[fo(),_.jsx(Ie,{onClick:()=>Q(null),children:v0()})]});const Zf=_.jsx(ZUn,{projectName:((d_=q.find(Y=>Y.id===n))==null?void 0:d_.name)??"",onHome:()=>void s.navigate({to:"/projects"}),onNewProject:()=>ci(!0),onRepository:()=>Vs("git"),onCollapse:()=>Ei(!1)});return _.jsx(VB,{value:Vf,children:_.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&_.jsx(cB,{}),e.kind==="local"&&_.jsx(BB,{status:J}),Yi&&_.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:Yi}),_.jsx(Ie,{onClick:Zi,children:ni()})]}),_.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${oi?"workspace-card-visible":""}`,children:[n&&_.jsx(hM,{projectId:n,projectName:(_n==null?void 0:_n.name)??"",railHeader:Zf,railOpen:Ci,onShowRail:()=>Ei(!0),mainView:o,onSelectMainView:Vs,onOpenFile:Ac,onOpenRun:s_,runExperimentName:zc,onOpenExperiment:jc,experimentName:Ll,onOpenPlan:Tc,onOpenSubagent:Il,onOpenSideChat:(Y,_e)=>void $l(Y,_e),composerFocusNonce:ap,demoRunningRunId:Ml,runtime:e,onOpenDemoWelcome:_n&&Vo(_n.id)?No:void 0,activeSessionId:u,onActiveSessionChange:Qa,preferredAgent:ie.preferredAgent,onPreferredAgentChange:li,preferredAutonomy:ie.preferredAutonomy??G3,onPreferredAutonomyChange:Hf,children:o==="skills"?_.jsx(yUn,{}):o!=="chat"?_.jsx(UFn,{remote:e.kind==="ssh",tab:o,project:_n,onProjectUpdate:Y=>{P(_e=>_e?LO(_e,Y):[Y])},onSelectTab:Vs}):null}),o==="chat"&&_.jsx(pAn,{expanded:oi,experiments:ve,runs:$e,onOpenExperiment:(Y,_e)=>Ws(Y,"overview","preview",_e),rightOffset:h?rs+28:void 0,activeView:h&&(y==="files"||y==="artifacts"||y==="experiments"||y==="terminal")?y:null,projectId:_n.id,onCompute:()=>Vs("compute"),sessionId:u,busy:((Ri=x.data)==null?void 0:Ri.some(Y=>Y.id===u&&Y.busy))??!1,onChanges:()=>{Us("changes"),Bl()},onFiles:()=>{Us("files"),Bl()},onTerminal:Uf,onArtifacts:qf,onExperiments:()=>Ec(),onSideChat:u?()=>void $l(u,""):void 0}),o==="chat"&&h&&_.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 ${cr?"max":""}`,style:cr?void 0:{width:rs},"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 ${cr?"cursor-e-resize":"cursor-col-resize"}`,title:cr?gue():uue(),onPointerDown:u_}),_.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:[cp.map(xn),ar&&_.jsx(Go,{active:y==="files",label:z3(),icon:_.jsx(Pu,{size:12,className:"shrink-0"}),onSelect:()=>$n("files"),onClose:()=>Ti("files")}),Pn&&_.jsx(Go,{active:y==="terminal",label:Fv(),icon:_.jsx(bo,{size:12,className:"shrink-0"}),onSelect:()=>$n("terminal"),onClose:()=>Ti("terminal")}),Ht&&_.jsx(Go,{active:y==="artifacts",label:aL(),icon:_.jsx(GS,{size:12,className:"shrink-0"}),onSelect:()=>$n("artifacts"),onClose:()=>Ti("artifacts")}),Mn&&_.jsx(Go,{active:y==="experiments",label:oL(),icon:_.jsx(Ah,{size:12,className:"shrink-0"}),onSelect:()=>$n("experiments"),onClose:()=>Ti("experiments")}),Et.map(Oc)]}),_.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[_.jsx(It,{title:cr?NN():EN(),"aria-label":cr?NN():EN(),onClick:()=>Si(Y=>!Y),children:cr?_.jsx(D7n,{size:14}):_.jsx(T7n,{size:14})}),_.jsx(It,{title:I0(),"aria-label":I0(),onClick:()=>{G(),Si(!1)},children:_.jsx(xr,{size:14})})]})]}),y==="terminal"&&Pn?null:!as||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!Me||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!Fe?_.jsx(la,{children:_.jsx(St,{})}):Is&&(!rn||f&&!$e.some(Y=>Y.id===f&&Y.experimentId===Is.id))||ge&&!or||t&&"sessionId"in t&&t.sessionId&&!(C!=null&&C.includes(t.sessionId))?_.jsx(la,{children:_.jsx("div",{className:"p-6 text-subtext",children:fo()})}):y==="artifacts"?_.jsx(la,{children:_n&&_.jsx(_Un,{project:_n,artifacts:qe,remote:e.kind==="ssh",onOpenFile:To,canRenameFile:Y=>{var _e;return!((_e=fr.current.get(Hs(_n.id,u,{path:Y,source:"artifacts"})))!=null&&_e.needsProtection)}},_n.id)}):y==="experiments"?_.jsxs(la,{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:on,children:[_.jsx(It,{size:"small",ref:an,className:"experiment-scope-trigger",active:kn==="agent",title:Lue({scope:kn==="agent"?SN():CN()}),"aria-label":c_e(),"aria-expanded":At,onClick:()=>gn(Y=>!Y),children:_.jsx(_7n,{size:16,strokeWidth:2.5})}),At&&_.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(vn,{"aria-pressed":kn==="agent",disabled:!u||!cn,title:u?cn?void 0:p_e():j_e(),onClick:()=>{en("agent"),gn(!1)},children:[_.jsx("span",{children:SN()}),kn==="agent"&&_.jsx(bi,{size:13})]}),_.jsxs(vn,{"aria-pressed":kn==="project",onClick:()=>{en("project"),gn(!1)},children:[_.jsx("span",{children:CN()}),kn==="project"&&_.jsx(bi,{size:13})]}),_.jsx("div",{className:"my-1 border-t border-border-variant"}),_.jsxs(vn,{"aria-pressed":st,onClick:()=>{Ut(Y=>!Y),gn(!1)},children:[_.jsx("span",{children:hfe()}),st&&_.jsx(bi,{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:rt==="table"?"active":"","aria-pressed":rt==="table",onClick:()=>dt("table"),children:Dfe()}),_.jsx("button",{className:rt==="tree"?"active":"","aria-pressed":rt==="tree",onClick:()=>dt("tree"),children:Hfe()})]})]})]}),_.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:rt==="tree"?_n&&_.jsx(AZn,{experiments:ve,archiveActions:ns,showArchived:st,runs:bn,project:_n,onOpenView:Ws,onOpenCode:Ta,onArchive:gt,agentSessionId:kn==="agent"?u:null,onShowProjectScope:Gf,onRestoreRegion:ln,viewport:Ct,onViewportChange:za}):_.jsx(eGn,{archiveActions:ns,runs:bn,emptyHint:!st&&Wn.length>0&&gs.length===0?Ign():kn==="agent"&&ve.length>0?w_e():void 0,experiments:gs,onOpen:(Y,_e)=>{Ws(Y.id,"overview",_e)},onOpenLogs:(Y,_e,xe)=>{Ws(Y,"terminal",xe,_e)},onOpenCode:(Y,_e)=>{const xe=ve.find(ze=>ze.id===Y);xe&&Ta(xe.id,xe.branchName,"files",_e)},onArchive:gt,onCancel:OI})})]}):y==="files"?_.jsx(la,{children:_n?_.jsx(Wqn,{sessionId:u??void 0,project:_n,view:qs,toggled:Wi,onViewChange:Us,onToggledChange:Gs,canRenameFile:Y=>{var _e;return!((_e=fr.current.get(Hs(_n.id,u,{path:Y,source:"repo",sessionId:u??void 0})))!=null&&_e.needsProtection)},onOpenFile:(Y,_e,xe,ze)=>Ao(Y,_e,xe,void 0,void 0,void 0,ze)},`files:${u??`project:${_n.id}`}`):_.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:_.jsx(nh,{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(D$,{size:22}),_.jsx("p",{children:efe()})]})})})}):er?_.jsx(la,{children:n&&_.jsx(YUn,{remote:e.kind==="ssh",restored:N.current.has(Hs(n,u,er)),onRestoreActivated:()=>{const Y=Hs(n,u,er);N.current.delete(Y),j.current.add(Y)},showSource:A.current[Hs(n,u,er)]??!1,onShowSourceChange:Y=>{A.current[Hs(n,u,er)]=Y,M(_e=>_e+1)},projectId:n,path:er.path,source:er.source,sessionId:er.source==="artifacts"?u??void 0:er.sessionId,gitRef:er.ref,line:er.line,branchLabel:MZn(er,_n==null?void 0:_n.baselineBranch),artifactVersion:op,artifactEntries:er.source==="artifacts"?qe==null?void 0:qe.entries:void 0,bufferSession:yn(Hs(n,u,er)),onOpenFile:(Y,_e,xe,ze)=>Sr(er,()=>Ao(Y,_e,xe,void 0,void 0,void 0,ze)),scrollPosition:vt.current.get(Hs(n,u,er)),onScrollPositionChange:Y=>{vt.current.set(Hs(n,u,er),Y),Ff()},lineScrollRequest:er.lineScrollRequest,onLineScrollRequestHandled:()=>o_(er),onEdit:()=>Ls(er)},Hs(n,u,er))}):qn?_.jsx(la,{children:_.jsx(uy,{value:{sessionId:qn.sessionId},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:(Io==null?void 0:Io.key)===`${qn.sessionId}:${qn.promptId}`?Io.text??fo():((Dc=Hn.find(Y=>Y.promptId===qn.promptId))==null?void 0:Dc.plan)||cL(),onOpenFile:(Y,_e,xe,ze,Re)=>Sr(qn,()=>Ao(Y,qn.sessionId,ze,_e,xe,void 0,Re))})})})}):xs&&n?_.jsx(la,{children:te?_.jsx("div",{className:"flex min-h-0 flex-1",children:_.jsx(hM,{embedded:!0,projectId:n,projectName:(_n==null?void 0:_n.name)??"",railOpen:!1,onShowRail:()=>Ei(!0),mainView:"chat",onSelectMainView:Vs,onOpenFile:(Y,_e,xe,ze,Re,Xe)=>Sr(xs,()=>Ac(Y,_e,xe,ze,Re,Xe)),onOpenRun:(Y,_e)=>Sr(xs,()=>s_(Y,_e)),runExperimentName:zc,onOpenExperiment:(Y,_e)=>Sr(xs,()=>jc(Y,_e)),experimentName:Ll,onOpenPlan:(Y,_e,xe,ze)=>Sr(xs,()=>Tc(Y,_e,xe,ze)),onOpenSubagent:(Y,_e,xe,ze)=>Sr(xs,()=>Il(Y,_e,xe,ze)),runtime:e,activeSessionId:xs.sessionId,onOpenSideChat:(Y,_e)=>void $l(Y,_e),onActiveSessionChange:(Y,_e)=>{var ze;const xe=!((ze=tt.getQueryData(Gi(n).queryKey))!=null&&ze.some(Re=>Re.id===xs.sessionId));Y===null&&xe?Mo(xs):Qa(Y,_e)},preferredAgent:ie.preferredAgent,onPreferredAgentChange:li,preferredAutonomy:ie.preferredAutonomy??G3,onPreferredAutonomyChange:Hf},xs.sessionId)}):_.jsx("div",{className:"p-6 text-sm text-muted",children:SI()})}):ys?_.jsx(Mqn,{projectId:n,sessionId:ys.sessionId,spawnPartId:ys.spawnPartId,onOpenFile:(Y,_e,xe,ze,Re)=>Sr(ys,()=>Ac(Y,ys.sessionId,_e,xe,ze,Re)),onOpenRun:(Y,_e)=>Sr(ys,()=>s_(Y,_e)),runExperimentName:zc,onOpenExperiment:(Y,_e)=>Sr(ys,()=>jc(Y,_e)),experimentName:Ll,onOpenSubagent:(Y,_e,xe)=>Sr(ys,()=>Il(ys.sessionId,Y,_e,xe))},ys.spawnPartId):Se?_.jsx(la,{children:n&&_n&&Se&&or&&_.jsx(Vqn,{projectId:n,project:_n,experiment:or,view:Se.view,toggled:Se.toggled,onViewChange:Y=>l_(Se,{view:Y}),onToggledChange:Y=>l_(Se,{toggled:Y}),onOpenFile:(Y,_e,xe,ze)=>Sr(Se,()=>Ao(Y,_e,xe,void 0,void 0,or.branchName,ze))},`code:${Se.branch}`)}):_.jsx(la,{children:Is&&rn&&_n&&_.jsx(CUn,{experiment:rn,project:_n,view:Is.view,runs:$e,selectedRunId:f,onSelectRun:U,parentExperiment:ve.find(Y=>Y.id===rn.parentExperimentId)??null,onOpenView:(Y,_e,xe)=>{Sr(Is,()=>Ws(rn.id,Y,xe,_e))},onOpenCode:(Y,_e)=>Sr(Is,()=>Ta(rn.id,rn.branchName,Y,_e))},`${Is.id}:${Is.view}`)}),Pn&&Xn!==null&&Xn===Ja&&_n&&_.jsx(la,{className:y==="terminal"?void 0:"hidden",children:_.jsx(gAn,{projectId:_n.id,sessionId:u,active:y==="terminal"},Ja)})]})]}),Or&&_.jsx(oB,{remote:e.kind==="ssh",onClose:()=>ci(!1),onCreated:(Y,_e)=>{ci(!1),__(Y,_e)}}),vs&&_n&&Vo(_n.id)&&_.jsx(tGn,{onClose:Ya,onCreateProject:Za})]})})}const Vk=hc()({validateSearch:e=>({pane:YS(e.pane)}),beforeLoad:({location:e})=>{if(!gf(e.pathname))throw TW()},component:$Zn});function $Zn(){const{projectId:e}=Vk.useParams(),{pane:n}=Vk.useSearch(),t=xi(),r=QD({select:s=>s.location});return T.useEffect(()=>{const s=BZn(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),_.jsxs(_.Fragment,{children:[_.jsx(O0,{}),_.jsx(IZn,{projectId:e,pane:n,runtime:tB()},e)]})}function BZn(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&YS(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const QG=hc()({component:PZn});function PZn(){const{projectId:e}=QG.useParams();return _.jsx(DEn,{projectId:e})}const FZn=hc()({}),HZn=hc()({}),qZn=hc()({}),UZn=hc()({}),GZn=IEn.update({id:"/",path:"/",getParentRoute:()=>ty}),m7=$En.update({id:"/projects",path:"/projects",getParentRoute:()=>ty}),KZn=BEn.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>ty}),VZn=PEn.update({id:"/",path:"/",getParentRoute:()=>m7}),ip=Vk.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>m7}),WZn=QG.update({id:"/",path:"/",getParentRoute:()=>ip}),QZn=FZn.update({id:"/skills",path:"/skills",getParentRoute:()=>ip}),XZn=HZn.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>ip}),YZn=qZn.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>ip}),ZZn=UZn.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>ip}),JZn={ProjectsProjectIdSkillsRoute:QZn,ProjectsProjectIdIndexRoute:WZn,ProjectsProjectIdSettingsTabRoute:XZn,ProjectsProjectIdTasksSessionIdRoute:YZn,ProjectsProjectIdTasksNewRoute:ZZn},eJn=ip._addFileChildren(JZn),tJn={ProjectsProjectIdRoute:eJn,ProjectsIndexRoute:VZn},nJn=m7._addFileChildren(tJn),rJn={IndexRoute:GZn,ProjectsRoute:nJn,RemoteLaunchRoute:KZn},sJn=ty._addFileChildren(rJn)._addFileTypes(),iJn=JQ({routeTree:sJn,context:{queryClient:tt},trailingSlash:"never",defaultPendingComponent:$6,defaultErrorComponent:B6,defaultNotFoundComponent:MEn}),Q1={minimize:"",maximize:"",restore:"",close:""};function aJn(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 Y4(e){return n=>{n.button===0&&(n.preventDefault(),XG(`resize:${e}`))}}function Z4({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 oJn(){const e=T.useSyncExternalStore(aJn,()=>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:Y4("n")}),_.jsx("div",{className:"fixed start-0 top-0 z-300 size-2 cursor-nwse-resize",onMouseDown:Y4("nw")}),_.jsx("div",{className:"fixed end-0 top-0 z-300 size-2 cursor-nesw-resize",onMouseDown:Y4("ne")})]}),_.jsxs("div",{className:"fixed end-0 top-0 z-300 flex",children:[_.jsx(Z4,{label:O2n(),glyph:Q1.minimize,message:"minimize",className:"hover:bg-panel"}),_.jsx(Z4,{label:e?F2n():N2n(),glyph:e?Q1.restore:Q1.maximize,message:"zoom",className:"hover:bg-panel"}),_.jsx(Z4,{label:y2n(),glyph:Q1.close,message:"close",className:"hover:bg-accent-red hover:text-white"})]})]})}const YG=E();document.documentElement.lang=YG;document.documentElement.dir="ltr";UI(YG);oW.createRoot(document.getElementById("root")).render(_.jsxs(T.StrictMode,{children:[_.jsx(bV,{client:tt,children:_.jsx(nX,{router:iJn})}),_.jsx(cCn,{}),i$&&_.jsx(oJn,{})]}));export{mc as C,It as I,yb as M,Qh as P,H$ as S,I7n as a,Sz as b,ct as c,Br as d,Zqn as e,Jt as f,E as g,si as h,Cz as i,_ as j,T as r}; diff --git a/ui/dist/assets/index-IGs9wcek.css b/ui/dist/assets/index-IGs9wcek.css new file mode 100644 index 000000000..38a7c3586 --- /dev/null +++ b/ui/dist/assets/index-IGs9wcek.css @@ -0,0 +1 @@ +/*! tailwindcss v4.3.3 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-leading:initial;--tw-translate-x:0;--tw-translate-y:0;--tw-translate-z:0;--tw-rotate-x:initial;--tw-rotate-y:initial;--tw-rotate-z:initial;--tw-skew-x:initial;--tw-skew-y:initial;--tw-space-y-reverse:0;--tw-divide-y-reverse:0;--tw-border-style:solid;--tw-gradient-position:initial;--tw-gradient-from:#0000;--tw-gradient-via:#0000;--tw-gradient-to:#0000;--tw-gradient-stops:initial;--tw-gradient-via-stops:initial;--tw-gradient-from-position:0%;--tw-gradient-via-position:50%;--tw-gradient-to-position:100%;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-content:""}}}@layer theme{:root,:host{--spacing:.25rem;--container-xl:36rem;--container-2xl:42rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height: 1.5 ;--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--text-xl:1.25rem;--text-xl--line-height:calc(1.75 / 1.25);--text-2xl:1.5rem;--text-2xl--line-height:calc(2 / 1.5);--text-3xl:1.875rem;--text-3xl--line-height: 1.2 ;--text-4xl:2.25rem;--text-4xl--line-height:calc(2.5 / 2.25);--text-5xl:3rem;--text-5xl--line-height:1;--text-6xl:3.75rem;--text-6xl--line-height:1;--font-weight-normal:400;--font-weight-medium:500;--font-weight-semibold:600;--tracking-wide:.025em;--leading-tight:1.25;--leading-snug:1.375;--leading-normal:1.5;--leading-relaxed:1.625;--radius-sm:6px;--radius-md:8px;--radius-2xl:1rem;--animate-spin:spin 1s linear infinite;--animate-pulse:pulse 2s cubic-bezier(.4, 0, .6, 1) infinite;--blur-3xl:64px;--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--color-diff-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-selection:color-mix(in oklab, var(--surface) 76%, var(--primary))}}:root,:host{--color-diff-gutter-selection:var(--surface)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-gutter-selection:color-mix(in oklab, var(--surface) 68%, var(--primary))}}:root,:host{--color-diff-insert-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-gutter:color-mix(in oklab, var(--base) 84%, var(--accent-green))}}:root,:host{--color-diff-delete-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-gutter:color-mix(in oklab, var(--base) 86%, var(--accent-red))}}:root,:host{--color-diff-insert-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-code:color-mix(in oklab, var(--base) 91%, var(--accent-green))}}:root,:host{--color-diff-delete-code:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-code:color-mix(in oklab, var(--base) 92%, var(--accent-red))}}:root,:host{--color-diff-insert-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-insert-edit:color-mix(in oklab, var(--base) 72%, var(--accent-green))}}:root,:host{--color-diff-delete-edit:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-delete-edit:color-mix(in oklab, var(--base) 78%, var(--accent-red))}}:root,:host{--color-diff-omit-gutter:var(--base)}@supports (color:color-mix(in lab,red,red)){:root,:host{--color-diff-omit-gutter:color-mix(in oklab, var(--base) 86%, var(--text))}}}@layer base{*{box-sizing:border-box}html,body,#root{height:100%;margin:0}body{background:var(--base);color:var(--text);font-family:var(--sans);font-size:1rem;line-height:1.45;overflow:hidden}::selection{background:var(--highlight)}.chat-thread-inner ::selection{background:var(--chat-annotation-highlight)}::highlight(chat-annotations){background:var(--chat-annotation-highlight)}::highlight(side-chat-annotations){background:var(--chat-annotation-highlight)}.file-view-editarea::selection{background:var(--editor-selection)}button{font:inherit;color:inherit;cursor:pointer;background:0 0;border:none;padding:0}input,textarea,select{font:inherit;color:var(--text);background:var(--base);border:1px solid var(--border);border-radius:var(--radius-md);outline:none;padding:6px 10px}input:focus,textarea:focus,select:focus{border-color:var(--text)}input::placeholder,textarea::placeholder{color:var(--muted);opacity:1}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:var(--border);border-radius:var(--radius-sm);background-clip:padding-box;border:2px solid #0000}::-webkit-scrollbar-track{background:0 0}}@layer vendor{.react-flow{--xy-edge-stroke-default:#b1b1b7;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#555;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#ffffff80;--xy-minimap-background-color-default:#fff;--xy-minimap-mask-background-color-default:#f0f0f099;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#e2e2e2;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:transparent;--xy-background-pattern-dots-color-default:#91919a;--xy-background-pattern-lines-color-default:#eee;--xy-background-pattern-cross-color-default:#e2e2e2;background-color:var(--xy-background-color,var(--xy-background-color-default));--xy-node-color-default:inherit;--xy-node-border-default:1px solid #1a192b;--xy-node-background-color-default:#fff;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #00000014;--xy-node-boxshadow-selected-default:0 0 0 .5px #1a192b;--xy-node-border-radius-default:3px;--xy-handle-background-color-default:#1a192b;--xy-handle-border-color-default:#fff;--xy-selection-background-color-default:#0059dc14;--xy-selection-border-default:1px dotted #0059dccc;--xy-controls-button-background-color-default:#fefefe;--xy-controls-button-background-color-hover-default:#f4f4f4;--xy-controls-button-color-default:inherit;--xy-controls-button-color-hover-default:inherit;--xy-controls-button-border-color-default:#eee;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#fff;--xy-edge-label-color-default:inherit;--xy-resize-background-color-default:#3367d9;direction:ltr}.react-flow.dark{--xy-edge-stroke-default:#3e3e3e;--xy-edge-stroke-width-default:1;--xy-edge-stroke-selected-default:#727272;--xy-connectionline-stroke-default:#b1b1b7;--xy-connectionline-stroke-width-default:1;--xy-attribution-background-color-default:#96969640;--xy-minimap-background-color-default:#141414;--xy-minimap-mask-background-color-default:#3c3c3c99;--xy-minimap-mask-stroke-color-default:transparent;--xy-minimap-mask-stroke-width-default:1;--xy-minimap-node-background-color-default:#2b2b2b;--xy-minimap-node-stroke-color-default:transparent;--xy-minimap-node-stroke-width-default:2;--xy-background-color-default:#141414;--xy-background-pattern-dots-color-default:#777;--xy-background-pattern-lines-color-default:#777;--xy-background-pattern-cross-color-default:#777;--xy-node-color-default:#f8f8f8;--xy-node-border-default:1px solid #3c3c3c;--xy-node-background-color-default:#1e1e1e;--xy-node-group-background-color-default:#f0f0f040;--xy-node-boxshadow-hover-default:0 1px 4px 1px #ffffff14;--xy-node-boxshadow-selected-default:0 0 0 .5px #999;--xy-handle-background-color-default:#bebebe;--xy-handle-border-color-default:#1e1e1e;--xy-selection-background-color-default:#c8c8dc14;--xy-selection-border-default:1px dotted #c8c8dccc;--xy-controls-button-background-color-default:#2b2b2b;--xy-controls-button-background-color-hover-default:#3e3e3e;--xy-controls-button-color-default:#f8f8f8;--xy-controls-button-color-hover-default:#fff;--xy-controls-button-border-color-default:#5b5b5b;--xy-controls-box-shadow-default:0 0 2px 1px #00000014;--xy-edge-label-background-color-default:#141414;--xy-edge-label-color-default:#f8f8f8}.react-flow__background{background-color:var(--xy-background-color-props,var(--xy-background-color,var(--xy-background-color-default)));pointer-events:none;z-index:-1}.react-flow__container{width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__pane{z-index:1;touch-action:none}.react-flow__pane.draggable{cursor:grab}.react-flow__pane.dragging{cursor:grabbing}.react-flow__pane.selection{cursor:pointer}.react-flow__viewport{transform-origin:0 0;z-index:2;pointer-events:none}.react-flow__renderer{z-index:4}.react-flow__selection{z-index:6}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible{outline:none}.react-flow__edge-path{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default));stroke-width:var(--xy-edge-stroke-width,var(--xy-edge-stroke-width-default));fill:none}.react-flow__connection-path{stroke:var(--xy-connectionline-stroke,var(--xy-connectionline-stroke-default));stroke-width:var(--xy-connectionline-stroke-width,var(--xy-connectionline-stroke-width-default));fill:none}.react-flow .react-flow__edges{position:absolute}.react-flow .react-flow__edges svg{pointer-events:none;position:absolute;overflow:visible}.react-flow__edge{pointer-events:visibleStroke}.react-flow__edge.selectable{cursor:pointer}.react-flow__edge.animated path{stroke-dasharray:5;animation:.5s linear infinite dashdraw}.react-flow__edge.animated path.react-flow__edge-interaction{stroke-dasharray:none;animation:none}.react-flow__edge.inactive{pointer-events:none}.react-flow__edge.selected,.react-flow__edge:focus,.react-flow__edge:focus-visible{outline:none}.react-flow__edge.selected .react-flow__edge-path,.react-flow__edge.selectable:focus .react-flow__edge-path,.react-flow__edge.selectable:focus-visible .react-flow__edge-path{stroke:var(--xy-edge-stroke-selected,var(--xy-edge-stroke-selected-default))}.react-flow__edge-textwrapper{pointer-events:all}.react-flow__edge .react-flow__edge-text{pointer-events:none;-webkit-user-select:none;user-select:none}.react-flow__arrowhead polyline{stroke:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__arrowhead polyline.arrowclosed{fill:var(--xy-edge-stroke,var(--xy-edge-stroke-default))}.react-flow__connection{pointer-events:none}.react-flow__connection .animated{stroke-dasharray:5;animation:.5s linear infinite dashdraw}svg.react-flow__connectionline{z-index:1001;position:absolute;overflow:visible}.react-flow__nodes{pointer-events:none;transform-origin:0 0}.react-flow__node{-webkit-user-select:none;user-select:none;pointer-events:all;transform-origin:0 0;box-sizing:border-box;cursor:default;position:absolute}.react-flow__node.selectable{cursor:pointer}.react-flow__node.draggable{cursor:grab;pointer-events:all}.react-flow__node.draggable.dragging{cursor:grabbing}.react-flow__nodesselection{z-index:3;transform-origin:0 0;pointer-events:none}.react-flow__nodesselection-rect{pointer-events:all;cursor:grab;position:absolute}.react-flow__handle{pointer-events:none;background-color:var(--xy-handle-background-color,var(--xy-handle-background-color-default));border:1px solid var(--xy-handle-border-color,var(--xy-handle-border-color-default));border-radius:100%;width:6px;min-width:5px;height:6px;min-height:5px;position:absolute}.react-flow__handle.connectingfrom{pointer-events:all}.react-flow__handle.connectionindicator{pointer-events:all;cursor:crosshair}.react-flow__handle-bottom{top:auto;bottom:0;left:50%;transform:translate(-50%,50%)}.react-flow__handle-top{top:0;left:50%;transform:translate(-50%,-50%)}.react-flow__handle-left{top:50%;left:0;transform:translate(-50%,-50%)}.react-flow__handle-right{top:50%;right:0;transform:translate(50%,-50%)}.react-flow__edgeupdater{cursor:move;pointer-events:all}.react-flow__pane.selection .react-flow__panel{pointer-events:none}.react-flow__panel{z-index:5;margin:15px;position:absolute}.react-flow__panel.top{top:0}.react-flow__panel.bottom{bottom:0}.react-flow__panel.top.center,.react-flow__panel.bottom.center{left:50%;transform:translate(-15px)translate(-50%)}.react-flow__panel.left{left:0}.react-flow__panel.right{right:0}.react-flow__panel.left.center,.react-flow__panel.right.center{top:50%;transform:translateY(-15px)translateY(-50%)}.react-flow__attribution{background:var(--xy-attribution-background-color,var(--xy-attribution-background-color-default));margin:0;padding:2px 3px;font-size:10px}.react-flow__attribution a{color:#999;text-decoration:none}@keyframes dashdraw{0%{stroke-dashoffset:10px}}.react-flow__edgelabel-renderer{pointer-events:none;-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__viewport-portal{-webkit-user-select:none;user-select:none;width:100%;height:100%;position:absolute;top:0;left:0}.react-flow__minimap{background:var(--xy-minimap-background-color-props,var(--xy-minimap-background-color,var(--xy-minimap-background-color-default)))}.react-flow__minimap-svg{display:block}.react-flow__minimap-mask{fill:var(--xy-minimap-mask-background-color-props,var(--xy-minimap-mask-background-color,var(--xy-minimap-mask-background-color-default)));stroke:var(--xy-minimap-mask-stroke-color-props,var(--xy-minimap-mask-stroke-color,var(--xy-minimap-mask-stroke-color-default)));stroke-width:var(--xy-minimap-mask-stroke-width-props,var(--xy-minimap-mask-stroke-width,var(--xy-minimap-mask-stroke-width-default)))}.react-flow__minimap-node{fill:var(--xy-minimap-node-background-color-props,var(--xy-minimap-node-background-color,var(--xy-minimap-node-background-color-default)));stroke:var(--xy-minimap-node-stroke-color-props,var(--xy-minimap-node-stroke-color,var(--xy-minimap-node-stroke-color-default)));stroke-width:var(--xy-minimap-node-stroke-width-props,var(--xy-minimap-node-stroke-width,var(--xy-minimap-node-stroke-width-default)))}.react-flow__background-pattern.dots{fill:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-dots-color-default)))}.react-flow__background-pattern.lines{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-lines-color-default)))}.react-flow__background-pattern.cross{stroke:var(--xy-background-pattern-color-props,var(--xy-background-pattern-color,var(--xy-background-pattern-cross-color-default)))}.react-flow__controls{box-shadow:var(--xy-controls-box-shadow,var(--xy-controls-box-shadow-default));flex-direction:column;display:flex}.react-flow__controls.horizontal{flex-direction:row}.react-flow__controls-button{background:var(--xy-controls-button-background-color,var(--xy-controls-button-background-color-default));border:none;border-bottom:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)));width:26px;height:26px;color:var(--xy-controls-button-color-props,var(--xy-controls-button-color,var(--xy-controls-button-color-default)));cursor:pointer;-webkit-user-select:none;user-select:none;justify-content:center;align-items:center;padding:4px;display:flex}.react-flow__controls-button svg{fill:currentColor;width:100%;max-width:12px;max-height:12px}.react-flow__edge.updating .react-flow__edge-path{stroke:#777}.react-flow__edge-text{font-size:10px}.react-flow__node.selectable:focus,.react-flow__node.selectable:focus-visible{outline:none}.react-flow__node-input,.react-flow__node-default,.react-flow__node-output,.react-flow__node-group{border-radius:var(--xy-node-border-radius,var(--xy-node-border-radius-default));width:150px;color:var(--xy-node-color,var(--xy-node-color-default));text-align:center;border:var(--xy-node-border,var(--xy-node-border-default));background-color:var(--xy-node-background-color,var(--xy-node-background-color-default));padding:10px;font-size:12px}.react-flow__node-input.selectable:hover,.react-flow__node-default.selectable:hover,.react-flow__node-output.selectable:hover,.react-flow__node-group.selectable:hover{box-shadow:var(--xy-node-boxshadow-hover,var(--xy-node-boxshadow-hover-default))}.react-flow__node-input.selectable.selected,.react-flow__node-input.selectable:focus,.react-flow__node-input.selectable:focus-visible,.react-flow__node-default.selectable.selected,.react-flow__node-default.selectable:focus,.react-flow__node-default.selectable:focus-visible,.react-flow__node-output.selectable.selected,.react-flow__node-output.selectable:focus,.react-flow__node-output.selectable:focus-visible,.react-flow__node-group.selectable.selected,.react-flow__node-group.selectable:focus,.react-flow__node-group.selectable:focus-visible{box-shadow:var(--xy-node-boxshadow-selected,var(--xy-node-boxshadow-selected-default))}.react-flow__node-group{background-color:var(--xy-node-group-background-color,var(--xy-node-group-background-color-default))}.react-flow__nodesselection-rect,.react-flow__selection{background:var(--xy-selection-background-color,var(--xy-selection-background-color-default));border:var(--xy-selection-border,var(--xy-selection-border-default))}.react-flow__nodesselection-rect:focus,.react-flow__nodesselection-rect:focus-visible,.react-flow__selection:focus,.react-flow__selection:focus-visible{outline:none}.react-flow__controls-button:hover{background:var(--xy-controls-button-background-color-hover-props,var(--xy-controls-button-background-color-hover,var(--xy-controls-button-background-color-hover-default)));color:var(--xy-controls-button-color-hover-props,var(--xy-controls-button-color-hover,var(--xy-controls-button-color-hover-default)))}.react-flow__controls-button:disabled{pointer-events:none}.react-flow__controls-button:disabled svg{fill-opacity:.4}.react-flow__controls-button:last-child{border-bottom:none}.react-flow__controls.horizontal .react-flow__controls-button{border-bottom:none;border-right:1px solid var(--xy-controls-button-border-color-props,var(--xy-controls-button-border-color,var(--xy-controls-button-border-color-default)))}.react-flow__controls.horizontal .react-flow__controls-button:last-child{border-right:none}.react-flow__resize-control{position:absolute}.react-flow__resize-control.left,.react-flow__resize-control.right{cursor:ew-resize}.react-flow__resize-control.top,.react-flow__resize-control.bottom{cursor:ns-resize}.react-flow__resize-control.top.left,.react-flow__resize-control.bottom.right{cursor:nwse-resize}.react-flow__resize-control.bottom.left,.react-flow__resize-control.top.right{cursor:nesw-resize}.react-flow__resize-control.handle{background-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border:1px solid #fff;border-radius:1px;width:5px;height:5px;translate:-50% -50%}.react-flow__resize-control.handle.left{top:50%;left:0}.react-flow__resize-control.handle.right{top:50%;left:100%}.react-flow__resize-control.handle.top{top:0;left:50%}.react-flow__resize-control.handle.bottom{top:100%;left:50%}.react-flow__resize-control.handle.top.left,.react-flow__resize-control.handle.bottom.left{left:0}.react-flow__resize-control.handle.top.right,.react-flow__resize-control.handle.bottom.right{left:100%}.react-flow__resize-control.line{border-color:var(--xy-resize-background-color,var(--xy-resize-background-color-default));border-style:solid;border-width:0}.react-flow__resize-control.line.left,.react-flow__resize-control.line.right{width:1px;height:100%;top:0;transform:translate(-50%)}.react-flow__resize-control.line.left{border-left-width:1px;left:0}.react-flow__resize-control.line.right{border-right-width:1px;left:100%}.react-flow__resize-control.line.top,.react-flow__resize-control.line.bottom{width:100%;height:1px;left:0;transform:translateY(-50%)}.react-flow__resize-control.line.top{border-top-width:1px;top:0}.react-flow__resize-control.line.bottom{border-bottom-width:1px;top:100%}.react-flow__edge-textbg{fill:var(--xy-edge-label-background-color,var(--xy-edge-label-background-color-default))}.react-flow__edge-text{fill:var(--xy-edge-label-color,var(--xy-edge-label-color-default))}.xterm{cursor:text;-webkit-user-select:none;user-select:none;position:relative}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{z-index:5;position:absolute;top:0}.xterm .xterm-helper-textarea{opacity:0;z-index:-5;white-space:nowrap;resize:none;border:0;width:0;height:0;margin:0;padding:0;position:absolute;top:0;left:-9999em;overflow:hidden}.xterm .composition-view{color:#fff;white-space:nowrap;z-index:1;background:#000;display:none;position:absolute}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{cursor:default;background-color:#000;position:absolute;top:0;right:0;bottom:0;left:0;overflow-y:scroll}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;top:0;left:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{visibility:hidden;line-height:normal;display:inline-block;position:absolute;top:0;left:-9999em}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{z-index:10;color:#0000;pointer-events:none;position:absolute;top:0;right:0;bottom:0;left:0}.xterm .xterm-accessibility-tree:not(.debug) ::selection{color:#0000}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{width:1px;height:1px;position:absolute;left:-9999px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{-webkit-text-decoration:underline double;text-decoration:underline double}.xterm-underline-3{-webkit-text-decoration:underline wavy;text-decoration:underline wavy}.xterm-underline-4{-webkit-text-decoration:underline dotted;text-decoration:underline dotted}.xterm-underline-5{-webkit-text-decoration:underline dashed;text-decoration:underline dashed}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:underline overline}.xterm-overline.xterm-underline-2{-webkit-text-decoration:overline double underline;text-decoration:overline double underline}.xterm-overline.xterm-underline-3{-webkit-text-decoration:overline wavy underline;text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{-webkit-text-decoration:overline dotted underline;text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{-webkit-text-decoration:overline dashed underline;text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;pointer-events:none;position:absolute;top:0;right:0}.xterm-decoration-top{z-index:2;position:relative}@font-face{font-display:block;font-family:KaTeX_AMS;font-style:normal;font-weight:400;src:url(/assets/KaTeX_AMS-Regular-BQhdFMY1.woff2)format("woff2"),url(/assets/KaTeX_AMS-Regular-DMm9YOAa.woff)format("woff"),url(/assets/KaTeX_AMS-Regular-DRggAlZN.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Caligraphic-Bold-Dq_IR9rO.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Bold-BEiXGLvX.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Bold-ATXxdsX0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Caligraphic;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Caligraphic-Regular-Di6jR-x-.woff2)format("woff2"),url(/assets/KaTeX_Caligraphic-Regular-CTRA-rTL.woff)format("woff"),url(/assets/KaTeX_Caligraphic-Regular-wX97UBjC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Fraktur-Bold-CL6g_b3V.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Bold-BsDP51OF.woff)format("woff"),url(/assets/KaTeX_Fraktur-Bold-BdnERNNW.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Fraktur;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Fraktur-Regular-CTYiF6lA.woff2)format("woff2"),url(/assets/KaTeX_Fraktur-Regular-Dxdc4cR9.woff)format("woff"),url(/assets/KaTeX_Fraktur-Regular-CB_wures.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:700;src:url(/assets/KaTeX_Main-Bold-Cx986IdX.woff2)format("woff2"),url(/assets/KaTeX_Main-Bold-Jm3AIy58.woff)format("woff"),url(/assets/KaTeX_Main-Bold-waoOVXN0.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Main-BoldItalic-DxDJ3AOS.woff2)format("woff2"),url(/assets/KaTeX_Main-BoldItalic-SpSLRI95.woff)format("woff"),url(/assets/KaTeX_Main-BoldItalic-DzxPMmG6.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Main-Italic-NWA7e6Wa.woff2)format("woff2"),url(/assets/KaTeX_Main-Italic-BMLOBm91.woff)format("woff"),url(/assets/KaTeX_Main-Italic-3WenGoN9.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Main;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Main-Regular-B22Nviop.woff2)format("woff2"),url(/assets/KaTeX_Main-Regular-Dr94JaBh.woff)format("woff"),url(/assets/KaTeX_Main-Regular-ypZvNtVU.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:700;src:url(/assets/KaTeX_Math-BoldItalic-CZnvNsCZ.woff2)format("woff2"),url(/assets/KaTeX_Math-BoldItalic-iY-2wyZ7.woff)format("woff"),url(/assets/KaTeX_Math-BoldItalic-B3XSjfu4.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Math;font-style:italic;font-weight:400;src:url(/assets/KaTeX_Math-Italic-t53AETM-.woff2)format("woff2"),url(/assets/KaTeX_Math-Italic-DA0__PXp.woff)format("woff"),url(/assets/KaTeX_Math-Italic-flOr_0UB.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:700;src:url(/assets/KaTeX_SansSerif-Bold-D1sUS0GD.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Bold-DbIhKOiC.woff)format("woff"),url(/assets/KaTeX_SansSerif-Bold-CFMepnvq.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:italic;font-weight:400;src:url(/assets/KaTeX_SansSerif-Italic-C3H0VqGB.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Italic-DN2j7dab.woff)format("woff"),url(/assets/KaTeX_SansSerif-Italic-YYjJ1zSn.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_SansSerif;font-style:normal;font-weight:400;src:url(/assets/KaTeX_SansSerif-Regular-DDBCnlJ7.woff2)format("woff2"),url(/assets/KaTeX_SansSerif-Regular-CS6fqUqJ.woff)format("woff"),url(/assets/KaTeX_SansSerif-Regular-BNo7hRIc.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Script;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Script-Regular-D3wIWfF6.woff2)format("woff2"),url(/assets/KaTeX_Script-Regular-D5yQViql.woff)format("woff"),url(/assets/KaTeX_Script-Regular-C5JkGWo-.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size1;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size1-Regular-mCD8mA8B.woff2)format("woff2"),url(/assets/KaTeX_Size1-Regular-C195tn64.woff)format("woff"),url(/assets/KaTeX_Size1-Regular-Dbsnue_I.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size2;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size2-Regular-Dy4dx90m.woff2)format("woff2"),url(/assets/KaTeX_Size2-Regular-oD1tc_U0.woff)format("woff"),url(/assets/KaTeX_Size2-Regular-B7gKUWhC.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size3;font-style:normal;font-weight:400;src:url(data:font/woff2;base64,d09GMgABAAAAAA4oAA4AAAAAHbQAAA3TAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAABmAAgRQIDgmcDBEICo1oijYBNgIkA14LMgAEIAWJAAeBHAyBHBvbGiMRdnO0IkRRkiYDgr9KsJ1NUAf2kILNxgUmgqIgq1P89vcbIcmsQbRps3vCcXdYOKSWEPEKgZgQkprQQsxIXUgq0DqpGKmIvrgkeVGtEQD9DzAO29fM9jYhxZEsL2FeURH2JN4MIcTdO049NCVdxQ/w9NrSYFEBKTDKpLKfNkCGDc1RwjZLQcm3vqJ2UW9Xfa3tgAHz6ivp6vgC2yD4/6352ndnN0X0TL7seypkjZlMsjmZnf0Mm5Q+JykRWQBKCVCVPbARPXWyQtb5VgLB6Biq7/Uixcj2WGqdI8tGSgkuRG+t910GKP2D7AQH0DB9FMDW/obJZ8giFI3Wg8Cvevz0M+5m0rTh7XDBlvo9Y4vm13EXmfttwI4mBo1EG15fxJhUiCLbiiyCf/ZA6MFAhg3pGIZGdGIVjtPn6UcMk9A/UUr9PhoNsCENw1APAq0gpH73e+M+0ueyHbabc3vkbcdtzcf/fiy+NxQEjf9ud/ELBHAXJ0nk4z+MXH2Ev/kWyV4k7SkvpPc9Qr38F6RPWnM9cN6DJ0AdD1BhtgABtmoRoFCvPsBAumNm6soZG2Gk5GyVTo2sJncSyp0jQTYoR6WDvTwaaEcHsxHfvuWhHA3a6bN7twRKtcGok6NsCi7jYRrM2jExsUFMxMQYuJbMhuWNOumEJy9hi29Dmg5zMp/A5+hhPG19j1vBrq8JTLr8ki5VLPmG/PynJHVul440bxg5xuymHUFPBshC+nA9I1FmwbRBTNHAcik3Oae0cxKoI3MOriM42UrPe51nsaGxJ+WfXubAsP84aabUlQSJ1IiE0iPETLUU4CATgfXSCSpuRFRmCGbO+wSpAnzaeaCYW1VNEysRtuXCEL1kUFUbbtMv3Tilt/1c11jt3Q5bbMa84cpWipp8Elw3MZhOHsOlwwVUQM3lAR35JiFQbaYCRnMF2lxAWoOg2gyoIV4PouX8HytNIfLhqpJtXB4vjiViUI8IJ7bkC4ikkQvKksnOTKICwnqWSZ9YS5f0WCxmpgjbIq7EJcM4aI2nmhLNY2JIUgOjXZFWBHb+x5oh6cwb0Tv1ackHdKi0I9OO2wE9aogIOn540CCCziyhN+IaejtgAONKznHlHyutPrHGwCx9S6B8kfS4Mfi4Eyv7OU730bT1SCBjt834cXsf43zVjPUqqJjgrjeGnBxSG4aYAKFuVbeCfkDIjAqMb6yLNIbCuvXhMH2/+k2vkNpkORhR59N1CkzoOENvneIosjYmuTxlhUzaGEJQ/iWqx4dmwpmKjrwTiTGTCVozNAYqk/zXOndWxuWSmJkQpJw3pK5KX6QrLt5LATMqpmPAQhkhK6PUjzHUn7E0gHE0kPE0iKkolgkUx9SZmVAdDgpffdyJKg3k7VmzYGCwVXGz/tXmkOIp+vcWs+EMuhhvN0h9uhfzWJziBQmCREGSIFmQIkgVpAnSBRmC//6hkLZwaVhwxlrJSOdqlFtOYxlau9F2QN5Y98xmIAsiM1HVp2VFX+DHHGg6Ecjh3vmqtidX3qHI2qycTk/iwxSt5UzTmEP92ZBnEWTk4Mx8Mpl78ZDokxg/KWb+Q0QkvdKVmq3TMW+RXEgrsziSAfNXFMhDc60N5N9jQzjfO0kBKpUZl0ZmwJ41j/B9Hz6wmRaJB84niNmQrzp9eSlQCDDzazGDdVi3P36VZQ+Jy4f9UBNp+3zTjqI4abaFAm+GShVaXlsGdF3FYzZcDI6cori4kMxUECl9IjJZpzkvitAoxKue+90pDMvcKRxLl53TmOKCmV/xRolNKSqqUxc6LStOETmFOiLZZptlZepcKiAzteG8PEdpnQpbOMNcMsR4RR2Bs0cKFEvSmIjAFcnarqwUL4lDhHmnVkwu1IwshbiCcgvOheZuYyOteufZZwlcTlLgnZ3o/WcYdzZHW/WGaqaVfmTZ1aWCceJjkbZqsfbkOtcFlUZM/jy+hXHDbaUobWqqXaeWobbLO99yG5N3U4wxco0rQGGcOLASFMXeJoham8M+/x6O2WywK2l4HGbq1CoUyC/IZikQhdq3SiuNrvAEj0AVu9x2x3lp/xWzahaxidezFVtdcb5uEnzyl0ZmYiuKI0exvCd4Xc9CV1KB0db00z92wDPde0kukbvZIWN6jUWFTmPIC/Y4UPCm8UfDTFZpZNon1qLFTkBhxzB+FjQRA2Q/YRJT8pQigslMaUpFyAG8TMlXigiqmAZX4xgijKjRlGpLE0GdplRfCaJo0JQaSxNBk6ZmMzcya0FmrcisDdn0Q3HI2sWSppYigmlM1XT/kLQZSNpMJG0WkjYbSZuDpM1F0uYhFc1HxU4m1QJjDK6iL0S5uSj5rgXc3RejEigtcRBtqYPQsiTskmO5vosV+q4VGIKbOkDg0jtRrq+Em1YloaTFar3EGr1EUC8R0kus1Uus00usL97ABr2BjXoDm/QGNhuWtMVBKOwg/i78lT7hBsAvDmwHc/ao3vmUbBmhjeYySZNWvGkfZAgISDSaDo1SVpzGDsAEkF8B+gEapViUoZgUWXcRIGFZNm6gWbAKk0bp0k1MHG9fLYtV4iS2SmLEQFARzRcnf9PUS0LVn05/J9MiRRBU3v2IrvW974v4N00L7ZMk0wXP1409CHo/an8zTRHD3eSJ6m8D4YMkZNl3M79sqeuAsr/m3f+8/yl7A50aiAEJgeBeMWzu7ui9UfUBCe2TIqZIoOd/3/udRBOQidQZUERzb2/VwZN1H/Sju82ew2H2Wfr6qvfVf3hqwDvAIpkQVFy4B9Pe9e4/XvPeceu7h3dvO56iJPf0+A6cqA2ip18ER+iFgggiuOkvj24bby0N9j2UHIkgqIt+sVgfodC4YghLSMjSZbH0VR/6dMDrYJeKHilKTemt6v6kvzvn3/RrdWtr0GoN/xL+Sex/cPYLUpepx9cz/D46UPU5KXgAQa+NDps1v6J3xP1i2HtaDB0M9aX2deA7SYff//+gUCovMmIK/qfsFcOk+4Y5ZN97XlG6zebqtMbKgeRFi51vnxTQYBUik2rS/Cn6PC8ADR8FGxsRPB82dzfND90gIcshOcYUkfjherBz53odpm6TP8txlwOZ71xmfHHOvq053qFF/MRlS3jP0ELudrf2OeN8DHvp6ZceLe8qKYvWz/7yp0u4dKPfli3CYq0O13Ih71mylJ80tOi10On8wi+F4+LWgDPeJ30msSQt9/vkmHq9/Lvo2b461mP801v3W4xTcs6CbvF9UDdrSt+A8OUbpSh55qAUFXWznBBfdeJ8a4d7ugT5tvxUza3h9m4H7ptTqiG4z0g5dc0X29OcGlhpGFMpQo9ytTS+NViZpNdvU4kWx+LKxNY10kQ1yqGXrhe4/1nvP7E+nd5A92TtaRplbHSqoIdOqtRWti+fkB5/n1+/VvCmz12pG1kpQWsfi1ftlBobm0bpngs16CHkbIwdLnParxtTV3QYRlfJ0KFskH7pdN/YDn+yRuSd7sNH3aO0DYPggk6uWuXrfOc+fa3VTxFVvKaNxHsiHmsXyCLIE5yuOeN3/Jdf8HBL/5M6shjyhxHx9BjB1O0+4NLOnjLLSxwO7ukN4jMbOIcD879KLSi6Pk61Oqm2377n8079PXEEQ7cy7OKEC9nbpet118fxweTafpt69x/Bt8UqGzNQt7aelpc44dn5cqhwf71+qKp/Zf/+a0zcizOUWpl/iBcSXip0pplkatCchoH5c5aUM8I7/dWxAej8WicPL1URFZ9BDJelUwEwTkGqUhgSlydVes95YdXvhh9Gfz/aeFWvgVb4tuLbcv4+wLdutVZv/cUonwBD/6eDlE0aSiKK/uoH3+J1wDE/jMVqY2ysGufN84oIXB0sPzy8ollX/LegY74DgJXJR57sn+VGza0x3DnuIgABFM15LmajjjsNlYj+JEZGbuRYcAMOWxFkPN2w6Wd46xo4gVWQR/X4lyI/R6K/YK0110GzudPRW7Y+UOBGTfNNzHeYT0fiH0taunBpq9HEW8OKSaBGj21L0MqenEmNRWBAWDWAk4CpNoEZJ2tTaPFgbQYj8HxtFilErs3BTRwT8uO1NXQaWfIotchmPkAF5mMBAliEmZiOGVgCG9LgRzpscMAOOwowlT3JhusdazXGSC/hxR3UlmWVwWHpOIKheqONvjyhSiTHIkVUco5bnji8m//zL7PKaT1Vl5I6UE609f+gkr6MZKVyKc7zJRmCahLsdlyA5fdQkRSan9LgnnLEyGSkaKJCJog0wAgvepWBt80+1yKln1bMVtCljfNWDueKLsWwaEbBSfSPTEmVRsUcYYMnEjcjeyCZzBXK9E9BYBXLKjOSpUDR+nEV3TFSUdQaz+ot98QxgXwx0GQ+EEUAKB2qZPkQQ0GqFD8UPFMqyaCHM24BZmSGic9EYMagKizOw9Hz50DMrDLrqqLkTAhplMictiCAx5S3BIUQdeJeLnBy2CNtMfz6cV4u8XKoFZQesbf9YZiIERiHjaNodDW6LgcirX/mPnJIkBGDUpTBhSa0EIr38D5hCIszhCM8URGBqImoWjpvpt1ebu/v3Gl3qJfMnNM+9V+kiRFyROTPHQWOcs1dNW94/ukKMPZBvDi55i5CttdeJz84DLngLqjcdwEZ87bFFR8CIG35OAkDVN6VRDZ7aq67NteYqZ2lpT8oYB2CytoBd6VuAx4WgiAsnuj3WohG+LugzXiQRDeM3XYXlULv4dp5VFYC)format("woff2"),url(/assets/KaTeX_Size3-Regular-CTq5MqoE.woff)format("woff"),url(/assets/KaTeX_Size3-Regular-DgpXs0kz.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Size4;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Size4-Regular-Dl5lxZxV.woff2)format("woff2"),url(/assets/KaTeX_Size4-Regular-BF-4gkZK.woff)format("woff"),url(/assets/KaTeX_Size4-Regular-DWFBv043.ttf)format("truetype")}@font-face{font-display:block;font-family:KaTeX_Typewriter;font-style:normal;font-weight:400;src:url(/assets/KaTeX_Typewriter-Regular-CO6r4hn1.woff2)format("woff2"),url(/assets/KaTeX_Typewriter-Regular-C0xS9mPB.woff)format("woff"),url(/assets/KaTeX_Typewriter-Regular-D3Ib7_Hf.ttf)format("truetype")}.katex{text-indent:0;text-rendering:auto;font:1.21em/1.2 KaTeX_Main,Times New Roman,serif;position:relative}.katex *{border-color:currentColor;-ms-high-contrast-adjust:none!important}.katex .katex-version:after{content:"0.16.47"}.katex .katex-mathml{clip-path:inset(50%);border:0;width:1px;height:1px;padding:0;position:absolute;overflow:hidden}.katex .katex-html>.newline{display:block}.katex .base{white-space:nowrap;width:min-content;position:relative}.katex .base,.katex .strut{display:inline-block}.katex .textbf{font-weight:700}.katex .textit{font-style:italic}.katex .textrm{font-family:KaTeX_Main}.katex .textsf{font-family:KaTeX_SansSerif}.katex .texttt{font-family:KaTeX_Typewriter}.katex .mathnormal{font-family:KaTeX_Math;font-style:italic}.katex .mathit{font-family:KaTeX_Main;font-style:italic}.katex .mathrm{font-style:normal}.katex .mathbf{font-family:KaTeX_Main;font-weight:700}.katex .boldsymbol{font-family:KaTeX_Math;font-style:italic;font-weight:700}.katex .amsrm,.katex .mathbb,.katex .textbb{font-family:KaTeX_AMS}.katex .mathcal{font-family:KaTeX_Caligraphic}.katex .mathfrak,.katex .textfrak{font-family:KaTeX_Fraktur}.katex .mathboldfrak,.katex .textboldfrak{font-family:KaTeX_Fraktur;font-weight:700}.katex .mathtt{font-family:KaTeX_Typewriter}.katex .mathscr,.katex .textscr{font-family:KaTeX_Script}.katex .mathsf,.katex .textsf{font-family:KaTeX_SansSerif}.katex .mathboldsf,.katex .textboldsf{font-family:KaTeX_SansSerif;font-weight:700}.katex .mathitsf,.katex .mathsfit,.katex .textitsf{font-family:KaTeX_SansSerif;font-style:italic}.katex .mainrm{font-family:KaTeX_Main;font-style:normal}.katex .vlist-t{border-collapse:collapse;table-layout:fixed;display:inline-table}.katex .vlist-r{display:table-row}.katex .vlist{vertical-align:bottom;display:table-cell;position:relative}.katex .vlist>span{height:0;display:block;position:relative}.katex .vlist>span>span{display:inline-block}.katex .vlist>span>.pstrut{width:0;overflow:hidden}.katex .vlist-t2{margin-right:-2px}.katex .vlist-s{vertical-align:bottom;width:2px;min-width:2px;font-size:1px;display:table-cell}.katex .vbox{flex-direction:column;align-items:baseline;display:inline-flex}.katex .hbox{width:100%}.katex .hbox,.katex .thinbox{flex-direction:row;display:inline-flex}.katex .thinbox{width:0;max-width:0}.katex .msupsub{text-align:left}.katex .mfrac>span>span{text-align:center}.katex .mfrac .frac-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline,.katex .hline,.katex .mfrac .frac-line,.katex .overline .overline-line,.katex .rule,.katex .underline .underline-line{min-height:1px}.katex .mspace{display:inline-block}.katex .smash{line-height:0;display:inline}.katex .clap,.katex .llap,.katex .rlap{width:0;position:relative}.katex .clap>.inner,.katex .llap>.inner,.katex .rlap>.inner{position:absolute}.katex .clap>.fix,.katex .llap>.fix,.katex .rlap>.fix{display:inline-block}.katex .llap>.inner{right:0}.katex .clap>.inner,.katex .rlap>.inner{left:0}.katex .clap>.inner>span{margin-left:-50%;margin-right:50%}.katex .rule{border:0 solid;display:inline-block;position:relative}.katex .hline,.katex .overline .overline-line,.katex .underline .underline-line{border-bottom-style:solid;width:100%;display:inline-block}.katex .hdashline{border-bottom-style:dashed;width:100%;display:inline-block}.katex .sqrt>.root{margin-left:.277778em;margin-right:-.555556em}.katex .fontsize-ensurer.reset-size1.size1,.katex .sizing.reset-size1.size1{font-size:1em}.katex .fontsize-ensurer.reset-size1.size2,.katex .sizing.reset-size1.size2{font-size:1.2em}.katex .fontsize-ensurer.reset-size1.size3,.katex .sizing.reset-size1.size3{font-size:1.4em}.katex .fontsize-ensurer.reset-size1.size4,.katex .sizing.reset-size1.size4{font-size:1.6em}.katex .fontsize-ensurer.reset-size1.size5,.katex .sizing.reset-size1.size5{font-size:1.8em}.katex .fontsize-ensurer.reset-size1.size6,.katex .sizing.reset-size1.size6{font-size:2em}.katex .fontsize-ensurer.reset-size1.size7,.katex .sizing.reset-size1.size7{font-size:2.4em}.katex .fontsize-ensurer.reset-size1.size8,.katex .sizing.reset-size1.size8{font-size:2.88em}.katex .fontsize-ensurer.reset-size1.size9,.katex .sizing.reset-size1.size9{font-size:3.456em}.katex .fontsize-ensurer.reset-size1.size10,.katex .sizing.reset-size1.size10{font-size:4.148em}.katex .fontsize-ensurer.reset-size1.size11,.katex .sizing.reset-size1.size11{font-size:4.976em}.katex .fontsize-ensurer.reset-size2.size1,.katex .sizing.reset-size2.size1{font-size:.833333em}.katex .fontsize-ensurer.reset-size2.size2,.katex .sizing.reset-size2.size2{font-size:1em}.katex .fontsize-ensurer.reset-size2.size3,.katex .sizing.reset-size2.size3{font-size:1.16667em}.katex .fontsize-ensurer.reset-size2.size4,.katex .sizing.reset-size2.size4{font-size:1.33333em}.katex .fontsize-ensurer.reset-size2.size5,.katex .sizing.reset-size2.size5{font-size:1.5em}.katex .fontsize-ensurer.reset-size2.size6,.katex .sizing.reset-size2.size6{font-size:1.66667em}.katex .fontsize-ensurer.reset-size2.size7,.katex .sizing.reset-size2.size7{font-size:2em}.katex .fontsize-ensurer.reset-size2.size8,.katex .sizing.reset-size2.size8{font-size:2.4em}.katex .fontsize-ensurer.reset-size2.size9,.katex .sizing.reset-size2.size9{font-size:2.88em}.katex .fontsize-ensurer.reset-size2.size10,.katex .sizing.reset-size2.size10{font-size:3.45667em}.katex .fontsize-ensurer.reset-size2.size11,.katex .sizing.reset-size2.size11{font-size:4.14667em}.katex .fontsize-ensurer.reset-size3.size1,.katex .sizing.reset-size3.size1{font-size:.714286em}.katex .fontsize-ensurer.reset-size3.size2,.katex .sizing.reset-size3.size2{font-size:.857143em}.katex .fontsize-ensurer.reset-size3.size3,.katex .sizing.reset-size3.size3{font-size:1em}.katex .fontsize-ensurer.reset-size3.size4,.katex .sizing.reset-size3.size4{font-size:1.14286em}.katex .fontsize-ensurer.reset-size3.size5,.katex .sizing.reset-size3.size5{font-size:1.28571em}.katex .fontsize-ensurer.reset-size3.size6,.katex .sizing.reset-size3.size6{font-size:1.42857em}.katex .fontsize-ensurer.reset-size3.size7,.katex .sizing.reset-size3.size7{font-size:1.71429em}.katex .fontsize-ensurer.reset-size3.size8,.katex .sizing.reset-size3.size8{font-size:2.05714em}.katex .fontsize-ensurer.reset-size3.size9,.katex .sizing.reset-size3.size9{font-size:2.46857em}.katex .fontsize-ensurer.reset-size3.size10,.katex .sizing.reset-size3.size10{font-size:2.96286em}.katex .fontsize-ensurer.reset-size3.size11,.katex .sizing.reset-size3.size11{font-size:3.55429em}.katex .fontsize-ensurer.reset-size4.size1,.katex .sizing.reset-size4.size1{font-size:.625em}.katex .fontsize-ensurer.reset-size4.size2,.katex .sizing.reset-size4.size2{font-size:.75em}.katex .fontsize-ensurer.reset-size4.size3,.katex .sizing.reset-size4.size3{font-size:.875em}.katex .fontsize-ensurer.reset-size4.size4,.katex .sizing.reset-size4.size4{font-size:1em}.katex .fontsize-ensurer.reset-size4.size5,.katex .sizing.reset-size4.size5{font-size:1.125em}.katex .fontsize-ensurer.reset-size4.size6,.katex .sizing.reset-size4.size6{font-size:1.25em}.katex .fontsize-ensurer.reset-size4.size7,.katex .sizing.reset-size4.size7{font-size:1.5em}.katex .fontsize-ensurer.reset-size4.size8,.katex .sizing.reset-size4.size8{font-size:1.8em}.katex .fontsize-ensurer.reset-size4.size9,.katex .sizing.reset-size4.size9{font-size:2.16em}.katex .fontsize-ensurer.reset-size4.size10,.katex .sizing.reset-size4.size10{font-size:2.5925em}.katex .fontsize-ensurer.reset-size4.size11,.katex .sizing.reset-size4.size11{font-size:3.11em}.katex .fontsize-ensurer.reset-size5.size1,.katex .sizing.reset-size5.size1{font-size:.555556em}.katex .fontsize-ensurer.reset-size5.size2,.katex .sizing.reset-size5.size2{font-size:.666667em}.katex .fontsize-ensurer.reset-size5.size3,.katex .sizing.reset-size5.size3{font-size:.777778em}.katex .fontsize-ensurer.reset-size5.size4,.katex .sizing.reset-size5.size4{font-size:.888889em}.katex .fontsize-ensurer.reset-size5.size5,.katex .sizing.reset-size5.size5{font-size:1em}.katex .fontsize-ensurer.reset-size5.size6,.katex .sizing.reset-size5.size6{font-size:1.11111em}.katex .fontsize-ensurer.reset-size5.size7,.katex .sizing.reset-size5.size7{font-size:1.33333em}.katex .fontsize-ensurer.reset-size5.size8,.katex .sizing.reset-size5.size8{font-size:1.6em}.katex .fontsize-ensurer.reset-size5.size9,.katex .sizing.reset-size5.size9{font-size:1.92em}.katex .fontsize-ensurer.reset-size5.size10,.katex .sizing.reset-size5.size10{font-size:2.30444em}.katex .fontsize-ensurer.reset-size5.size11,.katex .sizing.reset-size5.size11{font-size:2.76444em}.katex .fontsize-ensurer.reset-size6.size1,.katex .sizing.reset-size6.size1{font-size:.5em}.katex .fontsize-ensurer.reset-size6.size2,.katex .sizing.reset-size6.size2{font-size:.6em}.katex .fontsize-ensurer.reset-size6.size3,.katex .sizing.reset-size6.size3{font-size:.7em}.katex .fontsize-ensurer.reset-size6.size4,.katex .sizing.reset-size6.size4{font-size:.8em}.katex .fontsize-ensurer.reset-size6.size5,.katex .sizing.reset-size6.size5{font-size:.9em}.katex .fontsize-ensurer.reset-size6.size6,.katex .sizing.reset-size6.size6{font-size:1em}.katex .fontsize-ensurer.reset-size6.size7,.katex .sizing.reset-size6.size7{font-size:1.2em}.katex .fontsize-ensurer.reset-size6.size8,.katex .sizing.reset-size6.size8{font-size:1.44em}.katex .fontsize-ensurer.reset-size6.size9,.katex .sizing.reset-size6.size9{font-size:1.728em}.katex .fontsize-ensurer.reset-size6.size10,.katex .sizing.reset-size6.size10{font-size:2.074em}.katex .fontsize-ensurer.reset-size6.size11,.katex .sizing.reset-size6.size11{font-size:2.488em}.katex .fontsize-ensurer.reset-size7.size1,.katex .sizing.reset-size7.size1{font-size:.416667em}.katex .fontsize-ensurer.reset-size7.size2,.katex .sizing.reset-size7.size2{font-size:.5em}.katex .fontsize-ensurer.reset-size7.size3,.katex .sizing.reset-size7.size3{font-size:.583333em}.katex .fontsize-ensurer.reset-size7.size4,.katex .sizing.reset-size7.size4{font-size:.666667em}.katex .fontsize-ensurer.reset-size7.size5,.katex .sizing.reset-size7.size5{font-size:.75em}.katex .fontsize-ensurer.reset-size7.size6,.katex .sizing.reset-size7.size6{font-size:.833333em}.katex .fontsize-ensurer.reset-size7.size7,.katex .sizing.reset-size7.size7{font-size:1em}.katex .fontsize-ensurer.reset-size7.size8,.katex .sizing.reset-size7.size8{font-size:1.2em}.katex .fontsize-ensurer.reset-size7.size9,.katex .sizing.reset-size7.size9{font-size:1.44em}.katex .fontsize-ensurer.reset-size7.size10,.katex .sizing.reset-size7.size10{font-size:1.72833em}.katex .fontsize-ensurer.reset-size7.size11,.katex .sizing.reset-size7.size11{font-size:2.07333em}.katex .fontsize-ensurer.reset-size8.size1,.katex .sizing.reset-size8.size1{font-size:.347222em}.katex .fontsize-ensurer.reset-size8.size2,.katex .sizing.reset-size8.size2{font-size:.416667em}.katex .fontsize-ensurer.reset-size8.size3,.katex .sizing.reset-size8.size3{font-size:.486111em}.katex .fontsize-ensurer.reset-size8.size4,.katex .sizing.reset-size8.size4{font-size:.555556em}.katex .fontsize-ensurer.reset-size8.size5,.katex .sizing.reset-size8.size5{font-size:.625em}.katex .fontsize-ensurer.reset-size8.size6,.katex .sizing.reset-size8.size6{font-size:.694444em}.katex .fontsize-ensurer.reset-size8.size7,.katex .sizing.reset-size8.size7{font-size:.833333em}.katex .fontsize-ensurer.reset-size8.size8,.katex .sizing.reset-size8.size8{font-size:1em}.katex .fontsize-ensurer.reset-size8.size9,.katex .sizing.reset-size8.size9{font-size:1.2em}.katex .fontsize-ensurer.reset-size8.size10,.katex .sizing.reset-size8.size10{font-size:1.44028em}.katex .fontsize-ensurer.reset-size8.size11,.katex .sizing.reset-size8.size11{font-size:1.72778em}.katex .fontsize-ensurer.reset-size9.size1,.katex .sizing.reset-size9.size1{font-size:.289352em}.katex .fontsize-ensurer.reset-size9.size2,.katex .sizing.reset-size9.size2{font-size:.347222em}.katex .fontsize-ensurer.reset-size9.size3,.katex .sizing.reset-size9.size3{font-size:.405093em}.katex .fontsize-ensurer.reset-size9.size4,.katex .sizing.reset-size9.size4{font-size:.462963em}.katex .fontsize-ensurer.reset-size9.size5,.katex .sizing.reset-size9.size5{font-size:.520833em}.katex .fontsize-ensurer.reset-size9.size6,.katex .sizing.reset-size9.size6{font-size:.578704em}.katex .fontsize-ensurer.reset-size9.size7,.katex .sizing.reset-size9.size7{font-size:.694444em}.katex .fontsize-ensurer.reset-size9.size8,.katex .sizing.reset-size9.size8{font-size:.833333em}.katex .fontsize-ensurer.reset-size9.size9,.katex .sizing.reset-size9.size9{font-size:1em}.katex .fontsize-ensurer.reset-size9.size10,.katex .sizing.reset-size9.size10{font-size:1.20023em}.katex .fontsize-ensurer.reset-size9.size11,.katex .sizing.reset-size9.size11{font-size:1.43981em}.katex .fontsize-ensurer.reset-size10.size1,.katex .sizing.reset-size10.size1{font-size:.24108em}.katex .fontsize-ensurer.reset-size10.size2,.katex .sizing.reset-size10.size2{font-size:.289296em}.katex .fontsize-ensurer.reset-size10.size3,.katex .sizing.reset-size10.size3{font-size:.337512em}.katex .fontsize-ensurer.reset-size10.size4,.katex .sizing.reset-size10.size4{font-size:.385728em}.katex .fontsize-ensurer.reset-size10.size5,.katex .sizing.reset-size10.size5{font-size:.433944em}.katex .fontsize-ensurer.reset-size10.size6,.katex .sizing.reset-size10.size6{font-size:.48216em}.katex .fontsize-ensurer.reset-size10.size7,.katex .sizing.reset-size10.size7{font-size:.578592em}.katex .fontsize-ensurer.reset-size10.size8,.katex .sizing.reset-size10.size8{font-size:.694311em}.katex .fontsize-ensurer.reset-size10.size9,.katex .sizing.reset-size10.size9{font-size:.833173em}.katex .fontsize-ensurer.reset-size10.size10,.katex .sizing.reset-size10.size10{font-size:1em}.katex .fontsize-ensurer.reset-size10.size11,.katex .sizing.reset-size10.size11{font-size:1.19961em}.katex .fontsize-ensurer.reset-size11.size1,.katex .sizing.reset-size11.size1{font-size:.200965em}.katex .fontsize-ensurer.reset-size11.size2,.katex .sizing.reset-size11.size2{font-size:.241158em}.katex .fontsize-ensurer.reset-size11.size3,.katex .sizing.reset-size11.size3{font-size:.281351em}.katex .fontsize-ensurer.reset-size11.size4,.katex .sizing.reset-size11.size4{font-size:.321543em}.katex .fontsize-ensurer.reset-size11.size5,.katex .sizing.reset-size11.size5{font-size:.361736em}.katex .fontsize-ensurer.reset-size11.size6,.katex .sizing.reset-size11.size6{font-size:.401929em}.katex .fontsize-ensurer.reset-size11.size7,.katex .sizing.reset-size11.size7{font-size:.482315em}.katex .fontsize-ensurer.reset-size11.size8,.katex .sizing.reset-size11.size8{font-size:.578778em}.katex .fontsize-ensurer.reset-size11.size9,.katex .sizing.reset-size11.size9{font-size:.694534em}.katex .fontsize-ensurer.reset-size11.size10,.katex .sizing.reset-size11.size10{font-size:.833601em}.katex .fontsize-ensurer.reset-size11.size11,.katex .sizing.reset-size11.size11{font-size:1em}.katex .delimsizing.size1{font-family:KaTeX_Size1}.katex .delimsizing.size2{font-family:KaTeX_Size2}.katex .delimsizing.size3{font-family:KaTeX_Size3}.katex .delimsizing.size4{font-family:KaTeX_Size4}.katex .delimsizing.mult .delim-size1>span{font-family:KaTeX_Size1}.katex .delimsizing.mult .delim-size4>span{font-family:KaTeX_Size4}.katex .nulldelimiter{width:.12em;display:inline-block}.katex .delimcenter,.katex .op-symbol{position:relative}.katex .op-symbol.small-op{font-family:KaTeX_Size1}.katex .op-symbol.large-op{font-family:KaTeX_Size2}.katex .accent>.vlist-t,.katex .op-limits>.vlist-t{text-align:center}.katex .accent .accent-body{position:relative}.katex .accent .accent-body:not(.accent-full){width:0}.katex .overlay{display:block}.katex .mtable .vertical-separator{min-width:1px;display:inline-block}.katex .mtable .arraycolsep{display:inline-block}.katex .mtable .col-align-c>.vlist-t{text-align:center}.katex .mtable .col-align-l>.vlist-t{text-align:left}.katex .mtable .col-align-r>.vlist-t{text-align:right}.katex .svg-align{text-align:left}.katex svg{fill:currentColor;stroke:currentColor;height:inherit;width:100%;display:block;position:absolute}.katex svg path{stroke:none}.katex svg{fill-rule:nonzero;fill-opacity:1;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1}.katex img{border-style:none;min-width:0;max-width:none;min-height:0;max-height:none}.katex .stretchy{width:100%;display:block;position:relative;overflow:hidden}.katex .stretchy:after,.katex .stretchy:before{content:""}.katex .hide-tail{width:100%;position:relative;overflow:hidden}.katex .halfarrow-left{width:50.2%;position:absolute;left:0;overflow:hidden}.katex .halfarrow-right{width:50.2%;position:absolute;right:0;overflow:hidden}.katex .brace-left{width:25.1%;position:absolute;left:0;overflow:hidden}.katex .brace-center{width:50%;position:absolute;left:25%;overflow:hidden}.katex .brace-right{width:25.1%;position:absolute;right:0;overflow:hidden}.katex .x-arrow-pad{padding:0 .5em}.katex .cd-arrow-pad{padding:0 .55556em 0 .27778em}.katex .mover,.katex .munder,.katex .x-arrow{text-align:center}.katex .boxpad{padding:0 .3em}.katex .fbox,.katex .fcolorbox{box-sizing:border-box;border:.04em solid}.katex .cancel-pad{padding:0 .2em}.katex .cancel-lap{margin-left:-.2em;margin-right:-.2em}.katex .sout{border-bottom-style:solid;border-bottom-width:.08em}.katex .angl{box-sizing:border-box;border-top:.049em solid;border-right:.049em solid;margin-right:.03889em}.katex .anglpad{padding:0 .03889em}.katex .eqn-num:before{content:"(" counter(katexEqnNo) ")";counter-increment:katexEqnNo}.katex .mml-eqn-num:before{content:"(" counter(mmlEqnNo) ")";counter-increment:mmlEqnNo}.katex .mtr-glue{width:50%}.katex .cd-vert-arrow{display:inline-block;position:relative}.katex .cd-label-left{text-align:left;display:inline-block;position:absolute;right:calc(50% + .3em)}.katex .cd-label-right{text-align:right;display:inline-block;position:absolute;left:calc(50% + .3em)}.katex-display{text-align:center;margin:1em 0;display:block}.katex-display>.katex{text-align:center;white-space:nowrap;display:block}.katex-display>.katex>.katex-html{display:block;position:relative}.katex-display>.katex>.katex-html>.tag{position:absolute;right:0}.katex-display.leqno>.katex>.katex-html>.tag{left:0;right:auto}.katex-display.fleqn>.katex{text-align:left;padding-left:2em}body{counter-reset:katexEqnNo mmlEqnNo}:root{--diff-background-color:initial;--diff-text-color:initial;--diff-font-family:Consolas,Courier,monospace;--diff-selection-background-color:#b3d7ff;--diff-selection-text-color:var(--diff-text-color);--diff-gutter-insert-background-color:#d6fedb;--diff-gutter-insert-text-color:var(--diff-text-color);--diff-gutter-delete-background-color:#fadde0;--diff-gutter-delete-text-color:var(--diff-text-color);--diff-gutter-selected-background-color:#fffce0;--diff-gutter-selected-text-color:var(--diff-text-color);--diff-code-insert-background-color:#eaffee;--diff-code-insert-text-color:var(--diff-text-color);--diff-code-delete-background-color:#fdeff0;--diff-code-delete-text-color:var(--diff-text-color);--diff-code-insert-edit-background-color:#c0dc91;--diff-code-insert-edit-text-color:var(--diff-text-color);--diff-code-delete-edit-background-color:#f39ea2;--diff-code-delete-edit-text-color:var(--diff-text-color);--diff-code-selected-background-color:#fffce0;--diff-code-selected-text-color:var(--diff-text-color);--diff-omit-gutter-line-color:#cb2a1d}.diff{background-color:var(--diff-background-color);border-collapse:collapse;color:var(--diff-text-color);table-layout:fixed;width:100%}.diff::selection{background-color:#b3d7ff;background-color:var(--diff-selection-background-color);color:var(--diff-selection-text-color)}.diff td{vertical-align:top;padding-top:0;padding-bottom:0}.diff-line{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);line-height:1.5}.diff-gutter>a{color:inherit;display:block}.diff-gutter{cursor:pointer;text-align:right;-webkit-user-select:none;user-select:none;padding:0 1ch}.diff-gutter-insert{background-color:#d6fedb;background-color:var(--diff-gutter-insert-background-color);color:var(--diff-gutter-insert-text-color)}.diff-gutter-delete{background-color:#fadde0;background-color:var(--diff-gutter-delete-background-color);color:var(--diff-gutter-delete-text-color)}.diff-gutter-omit{cursor:default}.diff-gutter-selected{background-color:#fffce0;background-color:var(--diff-gutter-selected-background-color);color:var(--diff-gutter-selected-text-color)}.diff-code{word-wrap:break-word;white-space:pre-wrap;word-break:break-all;padding:0 0 0 .5em}.diff-code-edit{color:inherit}.diff-code-insert{background-color:#eaffee;background-color:var(--diff-code-insert-background-color);color:var(--diff-code-insert-text-color)}.diff-code-insert .diff-code-edit{background-color:#c0dc91;background-color:var(--diff-code-insert-edit-background-color);color:var(--diff-code-insert-edit-text-color)}.diff-code-delete{background-color:#fdeff0;background-color:var(--diff-code-delete-background-color);color:var(--diff-code-delete-text-color)}.diff-code-delete .diff-code-edit{background-color:#f39ea2;background-color:var(--diff-code-delete-edit-background-color);color:var(--diff-code-delete-edit-text-color)}.diff-code-selected{background-color:#fffce0;background-color:var(--diff-code-selected-background-color);color:var(--diff-code-selected-text-color)}.diff-widget-content{vertical-align:top}.diff-gutter-col{width:7ch}.diff-gutter-omit{height:0}.diff-gutter-omit:before{background-color:#cb2a1d;background-color:var(--diff-omit-gutter-line-color);content:" ";white-space:pre;width:2px;height:100%;margin-left:4.6ch;display:block;overflow:hidden}.diff-decoration{-webkit-user-select:none;user-select:none;line-height:1.5}.diff-decoration-content{font-family:Consolas,Courier,monospace;font-family:var(--diff-font-family);padding:0}}@layer components;@layer utilities{.\@container{container-type:inline-size}.pointer-events-auto{pointer-events:auto}.pointer-events-none{pointer-events:none}.collapse{visibility:collapse}.invisible{visibility:hidden}.visible{visibility:visible}.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.static{position:static}.sticky{position:sticky}.-inset-14{inset:calc(var(--spacing) * -14)}.-inset-\[7px\]{top:-7px;right:-7px;bottom:-7px;left:-7px}.inset-0{top:0;right:0;bottom:0;left:0}.inset-auto{inset:auto}.inset-x-0{inset-inline:0}.inset-x-4{inset-inline:calc(var(--spacing) * 4)}.inset-x-6{inset-inline:calc(var(--spacing) * 6)}.inset-y-0{inset-block:0}.start-0{inset-inline-start:calc(var(--spacing) * 0)}.start-2{inset-inline-start:calc(var(--spacing) * 2)}.start-3{inset-inline-start:calc(var(--spacing) * 3)}.-end-\[3px\]{inset-inline-end:-3px}.end-0{inset-inline-end:calc(var(--spacing) * 0)}.end-1\.5{inset-inline-end:calc(var(--spacing) * 1.5)}.end-3{inset-inline-end:calc(var(--spacing) * 3)}.end-3\.5{inset-inline-end:calc(var(--spacing) * 3.5)}.top-0{top:0}.top-1\.5{top:calc(var(--spacing) * 1.5)}.top-3{top:calc(var(--spacing) * 3)}.top-3\.5{top:calc(var(--spacing) * 3.5)}.top-5{top:calc(var(--spacing) * 5)}.top-7{top:calc(var(--spacing) * 7)}.top-16{top:calc(var(--spacing) * 16)}.top-\[calc\(100\%_\+_4px\)\]{top:calc(100% + 4px)}.top-\[calc\(100\%_\+_6px\)\]{top:calc(100% + 6px)}.right-5{right:calc(var(--spacing) * 5)}.bottom-0{bottom:0}.bottom-6{bottom:calc(var(--spacing) * 6)}.bottom-32{bottom:calc(var(--spacing) * 32)}.bottom-\[calc\(100\%_\+_4px\)\]{bottom:calc(100% + 4px)}.bottom-\[calc\(100\%_\+_6px\)\]{bottom:calc(100% + 6px)}.bottom-\[calc\(100\%_\+_8px\)\]{bottom:calc(100% + 8px)}.bottom-full{bottom:100%}.left-0{left:0}.left-1\/2{left:50%}.z-0{z-index:0}.z-1{z-index:1}.z-2{z-index:2}.z-4{z-index:4}.z-5{z-index:5}.z-6{z-index:6}.z-10{z-index:10}.z-20{z-index:20}.z-30{z-index:30}.z-50{z-index:50}.z-60{z-index:60}.z-70{z-index:70}.z-100{z-index:100}.z-200{z-index:200}.z-300{z-index:300}.col-span-2{grid-column:span 2/span 2}.col-start-1{grid-column-start:1}.col-start-2{grid-column-start:2}.row-start-1{grid-row-start:1}.container{width:100%}@media(min-width:40rem){.container{max-width:40rem}}@media(min-width:48rem){.container{max-width:48rem}}@media(min-width:64rem){.container{max-width:64rem}}@media(min-width:80rem){.container{max-width:80rem}}@media(min-width:96rem){.container{max-width:96rem}}.m-0{margin:0}.m-3{margin:calc(var(--spacing) * 3)}.m-5{margin:calc(var(--spacing) * 5)}.m-auto{margin:auto}.mx-0{margin-inline:0}.mx-1{margin-inline:var(--spacing)}.mx-auto{margin-inline:auto}.-my-0\.5{margin-block:calc(var(--spacing) * -.5)}.my-0{margin-block:0}.my-1{margin-block:var(--spacing)}.my-2{margin-block:calc(var(--spacing) * 2)}.my-2\.5{margin-block:calc(var(--spacing) * 2.5)}.my-3{margin-block:calc(var(--spacing) * 3)}.my-3\.5{margin-block:calc(var(--spacing) * 3.5)}.my-4{margin-block:calc(var(--spacing) * 4)}.my-6{margin-block:calc(var(--spacing) * 6)}.my-\[5px\]{margin-block:5px}.ms-0{margin-inline-start:0}.ms-1{margin-inline-start:var(--spacing)}.ms-2{margin-inline-start:calc(var(--spacing) * 2)}.ms-3\.5{margin-inline-start:calc(var(--spacing) * 3.5)}.ms-6{margin-inline-start:calc(var(--spacing) * 6)}.ms-auto{margin-inline-start:auto}.me-0{margin-inline-end:0}.me-0\.5{margin-inline-end:calc(var(--spacing) * .5)}.me-1{margin-inline-end:var(--spacing)}.me-2{margin-inline-end:calc(var(--spacing) * 2)}.me-3\.5{margin-inline-end:calc(var(--spacing) * 3.5)}.mt-0{margin-top:0}.mt-0\.5{margin-top:calc(var(--spacing) * .5)}.mt-1{margin-top:var(--spacing)}.mt-1\.5{margin-top:calc(var(--spacing) * 1.5)}.mt-2{margin-top:calc(var(--spacing) * 2)}.mt-2\.5{margin-top:calc(var(--spacing) * 2.5)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mt-3\.5{margin-top:calc(var(--spacing) * 3.5)}.mt-4{margin-top:calc(var(--spacing) * 4)}.mt-4\.5{margin-top:calc(var(--spacing) * 4.5)}.mt-5{margin-top:calc(var(--spacing) * 5)}.mt-5\.5{margin-top:calc(var(--spacing) * 5.5)}.mt-6{margin-top:calc(var(--spacing) * 6)}.mt-7{margin-top:calc(var(--spacing) * 7)}.mt-8{margin-top:calc(var(--spacing) * 8)}.mt-\[5px\]{margin-top:5px}.mt-\[13px\]{margin-top:13px}.mt-auto{margin-top:auto}.mb-0{margin-bottom:0}.mb-0\.5{margin-bottom:calc(var(--spacing) * .5)}.mb-1{margin-bottom:var(--spacing)}.mb-1\.5{margin-bottom:calc(var(--spacing) * 1.5)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-2\.5{margin-bottom:calc(var(--spacing) * 2.5)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.mb-3\.5{margin-bottom:calc(var(--spacing) * 3.5)}.mb-4{margin-bottom:calc(var(--spacing) * 4)}.mb-4\.5{margin-bottom:calc(var(--spacing) * 4.5)}.mb-5{margin-bottom:calc(var(--spacing) * 5)}.mb-5\.5{margin-bottom:calc(var(--spacing) * 5.5)}.mb-6{margin-bottom:calc(var(--spacing) * 6)}.mb-8{margin-bottom:calc(var(--spacing) * 8)}.mb-10{margin-bottom:calc(var(--spacing) * 10)}.ml-1{margin-left:var(--spacing)}.box-border{box-sizing:border-box}.line-clamp-2{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline{display:inline}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.inline-grid{display:inline-grid}.table{display:table}.field-sizing-content{field-sizing:content}.size-1\.5{width:calc(var(--spacing) * 1.5);height:calc(var(--spacing) * 1.5)}.size-2{width:calc(var(--spacing) * 2);height:calc(var(--spacing) * 2)}.size-3\.5{width:calc(var(--spacing) * 3.5);height:calc(var(--spacing) * 3.5)}.size-4{width:calc(var(--spacing) * 4);height:calc(var(--spacing) * 4)}.size-5{width:calc(var(--spacing) * 5);height:calc(var(--spacing) * 5)}.size-6{width:calc(var(--spacing) * 6);height:calc(var(--spacing) * 6)}.size-7{width:calc(var(--spacing) * 7);height:calc(var(--spacing) * 7)}.h-1{height:var(--spacing)}.h-2{height:calc(var(--spacing) * 2)}.h-3{height:calc(var(--spacing) * 3)}.h-3\.5{height:calc(var(--spacing) * 3.5)}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-5\.5{height:calc(var(--spacing) * 5.5)}.h-6{height:calc(var(--spacing) * 6)}.h-7{height:calc(var(--spacing) * 7)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-10{height:calc(var(--spacing) * 10)}.h-10\.5{height:calc(var(--spacing) * 10.5)}.h-11{height:calc(var(--spacing) * 11)}.h-12{height:calc(var(--spacing) * 12)}.h-14{height:calc(var(--spacing) * 14)}.h-16{height:calc(var(--spacing) * 16)}.h-40{height:calc(var(--spacing) * 40)}.h-80{height:calc(var(--spacing) * 80)}.h-96{height:calc(var(--spacing) * 96)}.h-\[7px\]{height:7px}.h-\[9px\]{height:9px}.h-\[13px\]{height:13px}.h-\[15px\]{height:15px}.h-\[min\(42rem\,calc\(100vh-2\.5rem\)\)\]{height:min(42rem,100vh - 2.5rem)}.h-\[min\(48rem\,calc\(100vh-2\.5rem\)\)\]{height:min(48rem,100vh - 2.5rem)}.h-auto{height:auto}.h-dvh{height:100dvh}.h-full{height:100%}.h-px{height:1px}.max-h-36{max-height:calc(var(--spacing) * 36)}.max-h-45{max-height:calc(var(--spacing) * 45)}.max-h-48{max-height:calc(var(--spacing) * 48)}.max-h-50{max-height:calc(var(--spacing) * 50)}.max-h-65{max-height:calc(var(--spacing) * 65)}.max-h-80{max-height:calc(var(--spacing) * 80)}.max-h-85{max-height:calc(var(--spacing) * 85)}.max-h-95{max-height:calc(var(--spacing) * 95)}.max-h-100{max-height:calc(var(--spacing) * 100)}.max-h-120{max-height:calc(var(--spacing) * 120)}.max-h-\[calc\(100vh_-_40px\)\]{max-height:calc(100vh - 40px)}.max-h-\[calc\(100vh_-_var\(--modal-top\)_-_1\.25rem\)\]{max-height:calc(100vh - var(--modal-top) - 1.25rem)}.max-h-\[calc\(100vh_-_var\(--modal-top\)_-_48px\)\]{max-height:calc(100vh - var(--modal-top) - 48px)}.max-h-\[calc\(100vh_-_var\(--new-project-modal-top\)_-_1\.25rem\)\]{max-height:calc(100vh - var(--new-project-modal-top) - 1.25rem)}.max-h-\[min\(18rem\,40vh\)\]{max-height:min(18rem,40vh)}.max-h-\[min\(70vh\,_720px\)\]{max-height:min(70vh,720px)}.max-h-full{max-height:100%}.max-h-none{max-height:none}.min-h-0{min-height:0}.min-h-6{min-height:calc(var(--spacing) * 6)}.min-h-7{min-height:calc(var(--spacing) * 7)}.min-h-8{min-height:calc(var(--spacing) * 8)}.min-h-9{min-height:calc(var(--spacing) * 9)}.min-h-16{min-height:calc(var(--spacing) * 16)}.min-h-19\.5{min-height:calc(var(--spacing) * 19.5)}.min-h-22{min-height:calc(var(--spacing) * 22)}.min-h-41{min-height:calc(var(--spacing) * 41)}.min-h-dvh{min-height:100dvh}.min-h-full{min-height:100%}.w-0{width:0}.w-1\.5{width:calc(var(--spacing) * 1.5)}.w-2{width:calc(var(--spacing) * 2)}.w-2\/5{width:40%}.w-4{width:calc(var(--spacing) * 4)}.w-4\/5{width:80%}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-6\.5{width:calc(var(--spacing) * 6.5)}.w-7{width:calc(var(--spacing) * 7)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-9\.5{width:calc(var(--spacing) * 9.5)}.w-10{width:calc(var(--spacing) * 10)}.w-10\.5{width:calc(var(--spacing) * 10.5)}.w-11\.5{width:calc(var(--spacing) * 11.5)}.w-36{width:calc(var(--spacing) * 36)}.w-37{width:calc(var(--spacing) * 37)}.w-40{width:calc(var(--spacing) * 40)}.w-52{width:calc(var(--spacing) * 52)}.w-52\.5{width:calc(var(--spacing) * 52.5)}.w-60{width:calc(var(--spacing) * 60)}.w-66{width:calc(var(--spacing) * 66)}.w-68{width:calc(var(--spacing) * 68)}.w-70{width:calc(var(--spacing) * 70)}.w-72{width:calc(var(--spacing) * 72)}.w-96{width:calc(var(--spacing) * 96)}.w-110{width:calc(var(--spacing) * 110)}.w-120{width:calc(var(--spacing) * 120)}.w-140{width:calc(var(--spacing) * 140)}.w-160{width:calc(var(--spacing) * 160)}.w-180{width:calc(var(--spacing) * 180)}.w-200{width:calc(var(--spacing) * 200)}.w-\[7px\]{width:7px}.w-\[9px\]{width:9px}.w-\[13px\]{width:13px}.w-\[15px\]{width:15px}.w-\[min\(440px\,_calc\(100vw_-_48px\)\)\]{width:min(440px,100vw - 48px)}.w-auto{width:auto}.w-fit{width:fit-content}.w-full{width:100%}.w-max{width:max-content}.w-px{width:1px}.max-w-2xl{max-width:var(--container-2xl)}.max-w-36{max-width:calc(var(--spacing) * 36)}.max-w-40{max-width:calc(var(--spacing) * 40)}.max-w-48{max-width:calc(var(--spacing) * 48)}.max-w-55{max-width:calc(var(--spacing) * 55)}.max-w-60{max-width:calc(var(--spacing) * 60)}.max-w-64{max-width:calc(var(--spacing) * 64)}.max-w-65{max-width:calc(var(--spacing) * 65)}.max-w-68{max-width:calc(var(--spacing) * 68)}.max-w-72{max-width:calc(var(--spacing) * 72)}.max-w-80{max-width:calc(var(--spacing) * 80)}.max-w-105{max-width:calc(var(--spacing) * 105)}.max-w-120{max-width:calc(var(--spacing) * 120)}.max-w-155{max-width:calc(var(--spacing) * 155)}.max-w-160{max-width:calc(var(--spacing) * 160)}.max-w-230{max-width:calc(var(--spacing) * 230)}.max-w-290{max-width:calc(var(--spacing) * 290)}.max-w-\[88\%\]{max-width:88%}.max-w-\[94vw\]{max-width:94vw}.max-w-\[calc\(100vw-1rem\)\]{max-width:calc(100vw - 1rem)}.max-w-\[calc\(100vw_-_40px\)\]{max-width:calc(100vw - 40px)}.max-w-full{max-width:100%}.max-w-none{max-width:none}.max-w-readable{max-width:var(--readable-col)}.max-w-xl{max-width:var(--container-xl)}.min-w-0{min-width:0}.min-w-16{min-width:calc(var(--spacing) * 16)}.min-w-20{min-width:calc(var(--spacing) * 20)}.min-w-40{min-width:calc(var(--spacing) * 40)}.min-w-44{min-width:calc(var(--spacing) * 44)}.min-w-47\.5{min-width:calc(var(--spacing) * 47.5)}.min-w-55{min-width:calc(var(--spacing) * 55)}.min-w-56{min-width:calc(var(--spacing) * 56)}.min-w-57\.5{min-width:calc(var(--spacing) * 57.5)}.min-w-60{min-width:calc(var(--spacing) * 60)}.min-w-80{min-width:calc(var(--spacing) * 80)}.min-w-full{min-width:100%}.flex-1{flex:1}.flex-none{flex:none}.shrink{flex-shrink:1}.shrink-0{flex-shrink:0}.grow{flex-grow:1}.basis-full{flex-basis:100%}.table-fixed{table-layout:fixed}.border-collapse{border-collapse:collapse}.-translate-x-1\/2{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.rotate-90{rotate:90deg}.rotate-180{rotate:180deg}.transform{transform:var(--tw-rotate-x,) var(--tw-rotate-y,) var(--tw-rotate-z,) var(--tw-skew-x,) var(--tw-skew-y,)}.animate-\[or-pulse_1\.2s_ease-in-out_infinite\]{animation:1.2s ease-in-out infinite or-pulse}.animate-\[spin_0\.8s_linear_infinite\]{animation:.8s linear infinite spin}.animate-\[spin_0\.9s_linear_infinite\]{animation:.9s linear infinite spin}.animate-\[title-char-in_240ms_ease-out_both\]{animation:.24s ease-out both title-char-in}.animate-pulse{animation:var(--animate-pulse)}.animate-spin{animation:var(--animate-spin)}.cursor-col-resize{cursor:col-resize}.cursor-default{cursor:default}.cursor-e-resize{cursor:e-resize}.cursor-help{cursor:help}.cursor-nesw-resize{cursor:nesw-resize}.cursor-ns-resize{cursor:ns-resize}.cursor-nwse-resize{cursor:nwse-resize}.cursor-pointer{cursor:pointer}.cursor-text{cursor:text}.cursor-zoom-in{cursor:zoom-in}.resize{resize:both}.resize-none{resize:none}.resize-y{resize:vertical}.\[scrollbar-width\:none\]{scrollbar-width:none}.\[scrollbar-gutter\:stable\]{scrollbar-gutter:stable}.\[scrollbar-gutter\:stable_both-edges\]{scrollbar-gutter:stable both-edges}.list-none{list-style-type:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-\[2rem_minmax\(0\,1fr\)_2rem\]{grid-template-columns:2rem minmax(0,1fr) 2rem}.grid-cols-\[8\.5rem_5rem\]{grid-template-columns:8.5rem 5rem}.grid-cols-\[9rem_minmax\(0\,1fr\)\]{grid-template-columns:9rem minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)\]{grid-template-columns:24px minmax(0,1fr)}.grid-cols-\[24px_minmax\(0\,_1fr\)_28px\]{grid-template-columns:24px minmax(0,1fr) 28px}.grid-cols-\[auto_1fr\]{grid-template-columns:auto 1fr}.grid-cols-\[auto_minmax\(0\,1fr\)_auto\]{grid-template-columns:auto minmax(0,1fr) auto}.grid-cols-\[minmax\(0\,1fr\)_9rem_9rem_minmax\(18rem\,max-content\)\]{grid-template-columns:minmax(0,1fr) 9rem 9rem minmax(18rem,max-content)}.grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.grid-cols-\[minmax\(12rem\,18rem\)_minmax\(12rem\,18rem\)\]{grid-template-columns:minmax(12rem,18rem) minmax(12rem,18rem)}.grid-cols-\[minmax\(180px\,_260px\)_minmax\(0\,_1fr\)\]{grid-template-columns:minmax(180px,260px) minmax(0,1fr)}.grid-cols-\[repeat\(2\,_minmax\(0\,_1fr\)\)\]{grid-template-columns:repeat(2,minmax(0,1fr))}.\!flex-col{flex-direction:column!important}.flex-col{flex-direction:column}.flex-row{flex-direction:row}.flex-wrap{flex-wrap:wrap}.\!items-stretch{align-items:stretch!important}.items-baseline{align-items:baseline}.items-center{align-items:center}.items-end{align-items:flex-end}.items-start{align-items:flex-start}.items-stretch{align-items:stretch}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.justify-end{justify-content:flex-end}.justify-start{justify-content:flex-start}.gap-0{gap:0}.gap-0\.5{gap:calc(var(--spacing) * .5)}.gap-1{gap:var(--spacing)}.gap-1\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}.gap-2\.5{gap:calc(var(--spacing) * 2.5)}.gap-3{gap:calc(var(--spacing) * 3)}.gap-3\.5{gap:calc(var(--spacing) * 3.5)}.gap-4{gap:calc(var(--spacing) * 4)}.gap-4\.5{gap:calc(var(--spacing) * 4.5)}.gap-5{gap:calc(var(--spacing) * 5)}.gap-6{gap:calc(var(--spacing) * 6)}.gap-\[0\.4em\]{gap:.4em}.gap-\[3px\]{gap:3px}.gap-\[5px\]{gap:5px}.gap-\[7px\]{gap:7px}.gap-\[9px\]{gap:9px}.gap-px{gap:1px}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(var(--spacing) * var(--tw-space-y-reverse));margin-block-end:calc(var(--spacing) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-1\.5>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1.5) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1.5) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-2>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 2) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 2) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-3>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 3) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 3) * calc(1 - var(--tw-space-y-reverse)))}:where(.space-y-4>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 4) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 4) * calc(1 - var(--tw-space-y-reverse)))}.gap-x-1\.5{column-gap:calc(var(--spacing) * 1.5)}.gap-x-2{column-gap:calc(var(--spacing) * 2)}.gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.gap-x-4\.5{column-gap:calc(var(--spacing) * 4.5)}.gap-x-5{column-gap:calc(var(--spacing) * 5)}.gap-x-8{column-gap:calc(var(--spacing) * 8)}.gap-x-12{column-gap:calc(var(--spacing) * 12)}.gap-y-1{row-gap:var(--spacing)}.gap-y-1\.5{row-gap:calc(var(--spacing) * 1.5)}.gap-y-2\.5{row-gap:calc(var(--spacing) * 2.5)}.gap-y-\[3px\]{row-gap:3px}.gap-y-\[7px\]{row-gap:7px}.gap-y-\[9px\]{row-gap:9px}:where(.divide-y>:not(:last-child)){--tw-divide-y-reverse:0;border-bottom-style:var(--tw-border-style);border-top-style:var(--tw-border-style);border-top-width:calc(1px * var(--tw-divide-y-reverse));border-bottom-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)))}:where(.divide-border-variant>:not(:last-child)){border-color:var(--border-variant)}.self-center{align-self:center}.self-end{align-self:flex-end}.self-start{align-self:flex-start}.self-stretch{align-self:stretch}.justify-self-end{justify-self:flex-end}.justify-self-start{justify-self:flex-start}.truncate{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-visible{overflow:visible}.overflow-x-auto{overflow-x:auto}.overflow-x-hidden{overflow-x:hidden}.overflow-y-auto{overflow-y:auto}.overscroll-contain{overscroll-behavior:contain}.rounded{border-radius:.25rem}.rounded-2xl{border-radius:var(--radius-2xl)}.rounded-\[3px\]{border-radius:3px}.rounded-\[16px\]{border-radius:16px}.rounded-\[inherit\]{border-radius:inherit}.rounded-\[var\(--radius-md\)_var\(--radius-md\)_0_0\]{border-radius:var(--radius-md) var(--radius-md) 0 0}.rounded-full{border-radius:999px}.rounded-lg{border-radius:10px}.rounded-md{border-radius:8px}.rounded-none{border-radius:0}.rounded-sm{border-radius:6px}.rounded-xl{border-radius:12px}.rounded-xs{border-radius:4px}.rounded-s-none{border-start-start-radius:0;border-end-start-radius:0}.rounded-e-none{border-start-end-radius:0;border-end-end-radius:0}.rounded-b-lg{border-bottom-right-radius:10px;border-bottom-left-radius:10px}.border{border-style:var(--tw-border-style);border-width:1px}.border-0{border-style:var(--tw-border-style);border-width:0}.border-2{border-style:var(--tw-border-style);border-width:2px}.border-\[1\.5px\]{border-style:var(--tw-border-style);border-width:1.5px}.border-x-0{border-inline-style:var(--tw-border-style);border-inline-width:0}.border-y{border-block-style:var(--tw-border-style);border-block-width:1px}.border-s{border-inline-start-style:var(--tw-border-style);border-inline-start-width:1px}.border-s-0{border-inline-start-style:var(--tw-border-style);border-inline-start-width:0}.border-s-2{border-inline-start-style:var(--tw-border-style);border-inline-start-width:2px}.border-s-\[3px\]{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.border-e{border-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.border-t-0{border-top-style:var(--tw-border-style);border-top-width:0}.border-b{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.border-b-0{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.border-dashed{--tw-border-style:dashed;border-style:dashed}.border-solid{--tw-border-style:solid;border-style:solid}.border-accent-amber,.border-accent-amber\/45{border-color:var(--accent-amber)}@supports (color:color-mix(in lab,red,red)){.border-accent-amber\/45{border-color:color-mix(in oklab,var(--accent-amber) 45%,transparent)}}.border-accent-blue,.border-accent-blue\/45{border-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.border-accent-blue\/45{border-color:color-mix(in oklab,var(--accent-blue) 45%,transparent)}}.border-accent-green,.border-accent-green\/45{border-color:var(--accent-green)}@supports (color:color-mix(in lab,red,red)){.border-accent-green\/45{border-color:color-mix(in oklab,var(--accent-green) 45%,transparent)}}.border-accent-red{border-color:var(--accent-red)}.border-border{border-color:var(--border)}.border-border-strong{border-color:var(--border-strong)}.border-border-variant{border-color:var(--border-variant)}.border-border\/50{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.border-border\/50{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.border-danger-notice-border{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.border-danger-notice-border{border-color:color-mix(in srgb,var(--accent-red) 35%,var(--border-variant))}}.border-primary,.border-primary\/45{border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.border-primary\/45{border-color:color-mix(in oklab,var(--primary) 45%,transparent)}}.border-transparent{border-color:#0000}.border-s-accent-blue{border-inline-start-color:var(--accent-blue)}.border-s-accent-red{border-inline-start-color:var(--accent-red)}.border-s-border{border-inline-start-color:var(--border)}.border-s-border-variant{border-inline-start-color:var(--border-variant)}.border-s-plan-caret{border-inline-start-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.border-s-plan-caret{border-inline-start-color:color-mix(in oklab,var(--base) 35%,var(--text))}}.border-e-border-variant{border-inline-end-color:var(--border-variant)}.border-t-accent-amber{border-top-color:var(--accent-amber)}.border-t-border{border-top-color:var(--border)}.border-t-border-variant{border-top-color:var(--border-variant)}.border-t-primary{border-top-color:var(--primary)}.border-b-accent-amber{border-bottom-color:var(--accent-amber)}.border-b-border{border-bottom-color:var(--border)}.border-b-border-variant{border-bottom-color:var(--border-variant)}.border-b-divider-subtle{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.border-b-divider-subtle{border-bottom-color:color-mix(in oklab,var(--text) 7%,transparent)}}.bg-accent{background-color:var(--accent)}.bg-accent-amber{background-color:var(--accent-amber)}.bg-accent-amber-subtle{background-color:var(--accent-amber-subtle)}.bg-accent-blue{background-color:var(--accent-blue)}.bg-accent-blue-subtle{background-color:var(--accent-blue-subtle)}.bg-accent-green{background-color:var(--accent-green)}.bg-accent-green-subtle{background-color:var(--accent-green-subtle)}.bg-accent-red{background-color:var(--accent-red)}.bg-accent-red-subtle{background-color:var(--accent-red-subtle)}.bg-accent-teal{background-color:var(--accent-teal)}.bg-background{background-color:var(--base)}.bg-border-variant{background-color:var(--border-variant)}.bg-canvas{background-color:var(--canvas)}.bg-current{background-color:currentColor}.bg-hover-faint{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-faint{background-color:color-mix(in oklab,var(--text) 3%,transparent)}}.bg-hover-muted{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-muted{background-color:color-mix(in oklab,var(--text) 8%,transparent)}}.bg-hover-subtle{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.bg-hover-subtle{background-color:color-mix(in oklab,var(--text) 10%,transparent)}}.bg-modal-backdrop{background-color:#1d1b1a6b}.bg-modal-backdrop-light{background-color:#1d1b1a66}.bg-muted{background-color:var(--muted)}.bg-panel{background-color:var(--panel)}.bg-primary{background-color:var(--primary)}.bg-primary-subtle{background-color:var(--primary-subtle)}.bg-skill-blue-subtle{background-color:var(--skill-blue-subtle)}.bg-surface{background-color:var(--surface)}.bg-surface-bright{background-color:var(--surface-bright)}.bg-terminal{background-color:var(--term-bg)}.bg-terminal-app{background-color:var(--term-app-bg)}.bg-text{background-color:var(--text)}.bg-transparent{background-color:#0000}.bg-white{background-color:#fff}.bg-gradient-to-b{--tw-gradient-position:to bottom in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-gradient-to-t{--tw-gradient-position:to top in oklab;background-image:linear-gradient(var(--tw-gradient-stops))}.bg-none{background-image:none}.from-background{--tw-gradient-from:var(--base);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.from-terminal{--tw-gradient-from:var(--term-bg);--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.to-transparent{--tw-gradient-to:transparent;--tw-gradient-stops:var(--tw-gradient-via-stops,var(--tw-gradient-position), var(--tw-gradient-from) var(--tw-gradient-from-position), var(--tw-gradient-to) var(--tw-gradient-to-position))}.object-contain{object-fit:contain}.p-0{padding:0}.p-0\.5{padding:calc(var(--spacing) * .5)}.p-1{padding:var(--spacing)}.p-1\.5{padding:calc(var(--spacing) * 1.5)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.p-4{padding:calc(var(--spacing) * 4)}.p-5{padding:calc(var(--spacing) * 5)}.p-6{padding:calc(var(--spacing) * 6)}.p-7{padding:calc(var(--spacing) * 7)}.p-8{padding:calc(var(--spacing) * 8)}.p-\[1\.5px\]{padding:1.5px}.p-\[3px\]{padding:3px}.p-\[5px\]{padding:5px}.p-px{padding:1px}.px-0{padding-inline:0}.px-0\.5{padding-inline:calc(var(--spacing) * .5)}.px-1{padding-inline:var(--spacing)}.px-1\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-2\.5{padding-inline:calc(var(--spacing) * 2.5)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-3\.5{padding-inline:calc(var(--spacing) * 3.5)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.px-5{padding-inline:calc(var(--spacing) * 5)}.px-6{padding-inline:calc(var(--spacing) * 6)}.px-7{padding-inline:calc(var(--spacing) * 7)}.px-8{padding-inline:calc(var(--spacing) * 8)}.px-\[9px\]{padding-inline:9px}.px-\[11px\]{padding-inline:11px}.px-\[13px\]{padding-inline:13px}.px-\[15px\]{padding-inline:15px}.py-0{padding-block:0}.py-0\.5{padding-block:calc(var(--spacing) * .5)}.py-1{padding-block:var(--spacing)}.py-1\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-2\.5{padding-block:calc(var(--spacing) * 2.5)}.py-3{padding-block:calc(var(--spacing) * 3)}.py-3\.5{padding-block:calc(var(--spacing) * 3.5)}.py-4{padding-block:calc(var(--spacing) * 4)}.py-4\.5{padding-block:calc(var(--spacing) * 4.5)}.py-6\.5{padding-block:calc(var(--spacing) * 6.5)}.py-8{padding-block:calc(var(--spacing) * 8)}.py-12{padding-block:calc(var(--spacing) * 12)}.py-\[3px\]{padding-block:3px}.py-\[5px\]{padding-block:5px}.py-\[7px\]{padding-block:7px}.py-\[9px\]{padding-block:9px}.py-\[11px\]{padding-block:11px}.py-px{padding-block:1px}.ps-1{padding-inline-start:var(--spacing)}.ps-1\.5{padding-inline-start:calc(var(--spacing) * 1.5)}.ps-2{padding-inline-start:calc(var(--spacing) * 2)}.ps-2\.5{padding-inline-start:calc(var(--spacing) * 2.5)}.ps-3{padding-inline-start:calc(var(--spacing) * 3)}.ps-3\.5{padding-inline-start:calc(var(--spacing) * 3.5)}.ps-4{padding-inline-start:calc(var(--spacing) * 4)}.ps-4\.5{padding-inline-start:calc(var(--spacing) * 4.5)}.ps-5{padding-inline-start:calc(var(--spacing) * 5)}.ps-\[2ch\]{padding-inline-start:2ch}.ps-\[31px\]{padding-inline-start:31px}.pe-0{padding-inline-end:0}.pe-0\.5{padding-inline-end:calc(var(--spacing) * .5)}.pe-1{padding-inline-end:var(--spacing)}.pe-1\.5{padding-inline-end:calc(var(--spacing) * 1.5)}.pe-2{padding-inline-end:calc(var(--spacing) * 2)}.pe-2\.5{padding-inline-end:calc(var(--spacing) * 2.5)}.pe-4{padding-inline-end:calc(var(--spacing) * 4)}.pe-8{padding-inline-end:calc(var(--spacing) * 8)}.pe-10{padding-inline-end:calc(var(--spacing) * 10)}.pe-14{padding-inline-end:calc(var(--spacing) * 14)}.pe-\[1ch\]{padding-inline-end:1ch}.pt-0{padding-top:0}.pt-0\.5{padding-top:calc(var(--spacing) * .5)}.pt-1{padding-top:var(--spacing)}.pt-1\.5{padding-top:calc(var(--spacing) * 1.5)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-2\.5{padding-top:calc(var(--spacing) * 2.5)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pt-3\.5{padding-top:calc(var(--spacing) * 3.5)}.pt-4{padding-top:calc(var(--spacing) * 4)}.pt-4\.5{padding-top:calc(var(--spacing) * 4.5)}.pt-5{padding-top:calc(var(--spacing) * 5)}.pt-6{padding-top:calc(var(--spacing) * 6)}.pt-6\.5{padding-top:calc(var(--spacing) * 6.5)}.pt-12{padding-top:calc(var(--spacing) * 12)}.pt-\[var\(--modal-top\)\]{padding-top:var(--modal-top)}.pt-\[var\(--new-project-modal-top\)\]{padding-top:var(--new-project-modal-top)}.pb-0{padding-bottom:0}.pb-1{padding-bottom:var(--spacing)}.pb-1\.5{padding-bottom:calc(var(--spacing) * 1.5)}.pb-2{padding-bottom:calc(var(--spacing) * 2)}.pb-3{padding-bottom:calc(var(--spacing) * 3)}.pb-3\.5{padding-bottom:calc(var(--spacing) * 3.5)}.pb-4{padding-bottom:calc(var(--spacing) * 4)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.pb-8{padding-bottom:calc(var(--spacing) * 8)}.pb-10{padding-bottom:calc(var(--spacing) * 10)}.pb-15{padding-bottom:calc(var(--spacing) * 15)}.pb-16{padding-bottom:calc(var(--spacing) * 16)}.pl-\[2ch\]{padding-left:2ch}.text-center{text-align:center}.text-end{text-align:end}.text-left{text-align:left}.text-right{text-align:right}.text-start{text-align:start}.align-baseline{vertical-align:baseline}.align-middle{vertical-align:middle}.font-\[\'Segoe_Fluent_Icons\'\,\'Segoe_MDL2_Assets\'\]{font-family:Segoe Fluent Icons,Segoe MDL2 Assets}.font-\[inherit\]{font-family:inherit}.font-mono{font-family:var(--mono)}.font-sans{font-family:var(--sans)}.text-2xl{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.text-3xl{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.text-4xl{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.text-6xl{font-size:var(--text-6xl);line-height:var(--tw-leading,var(--text-6xl--line-height))}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-menu{font-size:.8125rem;line-height:var(--tw-leading,1.25rem)}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xl{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-0{--tw-leading:0px;line-height:0}.leading-6{--tw-leading:calc(var(--spacing) * 6);line-height:calc(var(--spacing) * 6)}.leading-\[1\.3\]{--tw-leading:1.3;line-height:1.3}.leading-\[1\.4\]{--tw-leading:1.4;line-height:1.4}.leading-\[1\.6\]{--tw-leading:1.6;line-height:1.6}.leading-\[1\.08\]{--tw-leading:1.08;line-height:1.08}.leading-\[1\.45\]{--tw-leading:1.45;line-height:1.45}.leading-\[1\.55\]{--tw-leading:1.55;line-height:1.55}.leading-\[1\.62\]{--tw-leading:1.62;line-height:1.62}.leading-none{--tw-leading:1;line-height:1}.leading-normal{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.leading-relaxed{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.leading-snug{--tw-leading:var(--leading-snug);line-height:var(--leading-snug)}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\!font-medium{--tw-font-weight:var(--font-weight-medium)!important;font-weight:var(--font-weight-medium)!important}.\!font-normal{--tw-font-weight:var(--font-weight-normal)!important;font-weight:var(--font-weight-normal)!important}.font-\[375\]{--tw-font-weight:375;font-weight:375}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-normal{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-\[-0\.01em\]{--tw-tracking:-.01em;letter-spacing:-.01em}.tracking-\[-0\.02em\]{--tw-tracking:-.02em;letter-spacing:-.02em}.tracking-\[-0\.015em\]{--tw-tracking:-.015em;letter-spacing:-.015em}.tracking-\[-0\.035em\]{--tw-tracking:-.035em;letter-spacing:-.035em}.tracking-\[0\.05em\]{--tw-tracking:.05em;letter-spacing:.05em}.tracking-\[0\.06em\]{--tw-tracking:.06em;letter-spacing:.06em}.tracking-\[0\.08em\]{--tw-tracking:.08em;letter-spacing:.08em}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.text-balance{text-wrap:balance}.break-words{overflow-wrap:break-word}.wrap-anywhere{overflow-wrap:anywhere}.break-all{word-break:break-all}.text-ellipsis{text-overflow:ellipsis}.whitespace-normal{white-space:normal}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-wrap{white-space:pre-wrap}.\!text-accent-red{color:var(--accent-red)!important}.text-accent-amber{color:var(--accent-amber)}.text-accent-blue{color:var(--accent-blue)}.text-accent-green{color:var(--accent-green)}.text-accent-orange{color:var(--accent-orange)}.text-accent-purple{color:var(--accent-purple)}.text-accent-red{color:var(--accent-red)}.text-accent-teal{color:var(--accent-teal)}.text-background{color:var(--base)}.text-inherit{color:inherit}.text-muted{color:var(--muted)}.text-primary{color:var(--primary)}.text-skill-blue{color:var(--skill-blue)}.text-skill-blue-slash{color:var(--skill-blue-slash)}.text-subtext{color:var(--subtext)}.text-text,.text-text\/80{color:var(--text)}@supports (color:color-mix(in lab,red,red)){.text-text\/80{color:color-mix(in oklab,var(--text) 80%,transparent)}}.text-transparent{color:#0000}.text-white{color:#fff}.lowercase{text-transform:lowercase}.uppercase{text-transform:uppercase}.italic{font-style:italic}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.no-underline{text-decoration-line:none}.underline{text-decoration-line:underline}.decoration-border-strong{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.underline-offset-2{text-underline-offset:2px}.underline-offset-3{text-underline-offset:3px}.caret-text{caret-color:var(--text)}.opacity-0{opacity:0}.opacity-35{opacity:.35}.opacity-50{opacity:.5}.opacity-52{opacity:.52}.opacity-70{opacity:.7}.opacity-80{opacity:.8}.opacity-100{opacity:1}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-card{--tw-shadow:0 14px 36px var(--tw-shadow-color,color-mix(in oklab, var(--text) 6%, transparent))}}.shadow-card{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-control-subtle{--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-dropdown{--tw-shadow:0 10px 26px var(--tw-shadow-color,#00000029);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,var(--text)), 0 1px 4px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.shadow-elevated{--tw-shadow:0 6px 24px var(--tw-shadow-color,color-mix(in oklab, var(--text) 5%, transparent)), 0 1px 4px var(--tw-shadow-color,color-mix(in oklab, var(--text) 4%, transparent))}}.shadow-elevated{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-file-line{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--accent-blue));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-floating{--tw-shadow:0 8px 24px var(--tw-shadow-color,#00000024);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-hairline{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-logo{--tw-shadow:0 0 0 1px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-menu{--tw-shadow:0 12px 32px var(--tw-shadow-color,#0000002e);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-modal{--tw-shadow:0 24px 60px var(--tw-shadow-color,#00000038);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan{--tw-shadow:0 2px 10px var(--tw-shadow-color,#0000000f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-plan-menu{--tw-shadow:0 6px 20px var(--tw-shadow-color,#0000001f);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-popover{--tw-shadow:0 4px 16px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.shadow-tree{--tw-shadow:0 1px 2px var(--tw-shadow-color,#0000000a);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(1px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.ring-primary{--tw-ring-color:var(--primary)}.ring-offset-2{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.ring-offset-background{--tw-ring-offset-color:var(--base)}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.blur-3xl{--tw-blur:blur(var(--blur-3xl));filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\,color\]{transition-property:background,border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,border-color\]{transition-property:background,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background\,color\]{transition-property:background,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[background-color\,border-color\]{transition-property:background-color,border-color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,background\]{transition-property:border-color,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,box-shadow\]{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[border-color\,color\]{transition-property:border-color,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[box-shadow\]{transition-property:box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[transform\,color\]{transition-property:transform,color;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\[width\]{transition-property:width;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-80{--tw-duration:80ms;transition-duration:80ms}.duration-120{--tw-duration:.12s;transition-duration:.12s}.duration-150{--tw-duration:.15s;transition-duration:.15s}.duration-200{--tw-duration:.2s;transition-duration:.2s}.ease-standard{--tw-ease:ease;transition-timing-function:ease}.outline-none{--tw-outline-style:none;outline-style:none}.select-none{-webkit-user-select:none;user-select:none}.\[--new-project-modal-top\:clamp\(4rem\,20vh\,24rem\)\]{--new-project-modal-top:clamp(4rem, 20vh, 24rem)}.\[font\:inherit\]{font:inherit}.\[grid-area\:actions\]{grid-area:actions}.\[grid-area\:meta\]{grid-area:meta}.\[grid-area\:name\]{grid-area:name}.\[grid-template-areas\:\'name_meta\'_\'actions_actions\'\]{grid-template-areas:"name meta""actions actions"}.group-open\/limit\:rotate-90:is(:where(.group\/limit):is([open],:popover-open,:open) *){rotate:90deg}.group-focus-within\:pointer-events-auto:is(:where(.group):focus-within *){pointer-events:auto}.group-focus-within\:opacity-100:is(:where(.group):focus-within *),.group-focus-within\/turn\:opacity-100:is(:where(.group\/turn):focus-within *){opacity:1}@media(hover:hover){.group-hover\:pointer-events-auto:is(:where(.group):hover *){pointer-events:auto}.group-hover\:translate-x-0\.5:is(:where(.group):hover *){--tw-translate-x:calc(var(--spacing) * .5);translate:var(--tw-translate-x) var(--tw-translate-y)}.group-hover\:opacity-0:is(:where(.group):hover *){opacity:0}.group-hover\:opacity-100:is(:where(.group):hover *),.group-hover\/skill\:opacity-100:is(:where(.group\/skill):hover *),.group-hover\/turn\:opacity-100:is(:where(.group\/turn):hover *){opacity:1}}.group-focus-visible\:opacity-0:is(:where(.group):focus-visible *){opacity:0}.group-focus-visible\:opacity-100:is(:where(.group):focus-visible *){opacity:1}.placeholder\:text-muted::placeholder{color:var(--muted)}.backdrop\:bg-image-backdrop::backdrop{background-color:#1d1b1ad9}.backdrop\:bg-modal-backdrop-light::backdrop{background-color:#1d1b1a66}.before\:content-\[attr\(data-line\)\]:before{--tw-content:attr(data-line);content:var(--tw-content)}.after\:absolute:after{content:var(--tw-content);position:absolute}.after\:start-0:after{content:var(--tw-content);inset-inline-start:calc(var(--spacing) * 0)}.after\:end-0:after{content:var(--tw-content);inset-inline-end:calc(var(--spacing) * 0)}.after\:top-full:after{content:var(--tw-content);top:100%}.after\:h-2:after{content:var(--tw-content);height:calc(var(--spacing) * 2)}.after\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.first\:border-t-0:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.last\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.focus-within\:border-text:focus-within{border-color:var(--text)}.focus-within\:bg-surface-bright:focus-within{background-color:var(--surface-bright)}@media(hover:hover){.hover\:border-border-strong:hover{border-color:var(--border-strong)}.hover\:border-text:hover{border-color:var(--text)}.hover\:bg-accent-red:hover{background-color:var(--accent-red)}.hover\:bg-panel:hover{background-color:var(--panel)}.hover\:bg-surface:hover{background-color:var(--surface)}.hover\:bg-surface-bright:hover{background-color:var(--surface-bright)}.hover\:bg-transparent:hover{background-color:#0000}.hover\:text-accent-red:hover{color:var(--accent-red)}.hover\:text-primary-hover:hover{color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.hover\:text-primary-hover:hover{color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.hover\:text-text:hover{color:var(--text)}.hover\:text-white:hover{color:#fff}.hover\:underline:hover{text-decoration-line:underline}.hover\:decoration-primary:hover{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}}.focus\:pointer-events-auto:focus{pointer-events:auto}.focus\:not-sr-only:focus{clip-path:none;white-space:normal;width:auto;height:auto;margin:0;padding:0;position:static;overflow:visible}.focus\:border-text:focus{border-color:var(--text)}.focus\:opacity-100:focus,.focus-visible\:opacity-100:focus-visible{opacity:1}.focus-visible\:outline:focus-visible{outline-style:var(--tw-outline-style);outline-width:1px}.focus-visible\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.focus-visible\:-outline-offset-2:focus-visible{outline-offset:-2px}.focus-visible\:outline-offset-2:focus-visible{outline-offset:2px}.focus-visible\:outline-offset-\[-2px\]:focus-visible{outline-offset:-2px}.focus-visible\:outline-primary:focus-visible{outline-color:var(--primary)}.focus-visible\:outline-text:focus-visible{outline-color:var(--text)}.focus-visible\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.disabled\:cursor-default:disabled{cursor:default}.disabled\:opacity-45:disabled{opacity:.45}.disabled\:opacity-50:disabled{opacity:.5}@media(prefers-reduced-motion:reduce){.motion-reduce\:transition-none{transition-property:none}}@media(min-width:1120px){.min-\[1120px\]\:col-start-1{grid-column-start:1}.min-\[1120px\]\:col-start-2{grid-column-start:2}.min-\[1120px\]\:row-start-1{grid-row-start:1}.min-\[1120px\]\:row-start-2{grid-row-start:2}.min-\[1120px\]\:mt-0{margin-top:0}.min-\[1120px\]\:grid{display:grid}.min-\[1120px\]\:grid-cols-\[minmax\(0\,_1\.1fr\)_minmax\(28rem\,_1fr\)\]{grid-template-columns:minmax(0,1.1fr) minmax(28rem,1fr)}.min-\[1120px\]\:grid-rows-\[auto_auto\]{grid-template-rows:auto auto}.min-\[1120px\]\:content-center{align-content:center}.min-\[1120px\]\:gap-x-20{column-gap:calc(var(--spacing) * 20)}.min-\[1120px\]\:gap-y-10{row-gap:calc(var(--spacing) * 10)}.min-\[1120px\]\:self-end{align-self:flex-end}.min-\[1120px\]\:self-start{align-self:flex-start}}@media(min-width:40rem){.sm\:inset-x-12{inset-inline:calc(var(--spacing) * 12)}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:px-12{padding-inline:calc(var(--spacing) * 12)}}@media(min-width:64rem){.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}@container not (min-width:36rem){.\@max-xl\:hidden{display:none}}@container not (min-width:32rem){.\@max-lg\:hidden{display:none}}@container (min-width:24rem){.\@sm\:flex-row{flex-direction:row}.\@sm\:items-center{align-items:center}.\@sm\:justify-between{justify-content:space-between}.\@sm\:self-auto{align-self:auto}}@container (min-width:32rem){.\@lg\:flex-row{flex-direction:row}.\@lg\:items-center{align-items:center}.\@lg\:gap-2{gap:calc(var(--spacing) * 2)}}@media(prefers-color-scheme:dark){.dark\:invert{--tw-invert:invert(100%);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}}.mac-titlebar\:ms-16:where(.mac-titlebar *){margin-inline-start:calc(var(--spacing) * 16)}.mac-titlebar\:mt-8:where(.mac-titlebar *){margin-top:calc(var(--spacing) * 8)}.mac-titlebar\:grid-cols-\[6rem_minmax\(0\,1fr\)_6rem\]:where(.mac-titlebar *){grid-template-columns:6rem minmax(0,1fr) 6rem}.mac-titlebar\:ps-20:where(.mac-titlebar *){padding-inline-start:calc(var(--spacing) * 20)}.win-titlebar\:top-10:where(.win-titlebar *){top:calc(var(--spacing) * 10)}.win-titlebar\:mt-10:where(.win-titlebar *){margin-top:calc(var(--spacing) * 10)}.win-titlebar\:pe-36:where(.win-titlebar *){padding-inline-end:calc(var(--spacing) * 36)}.\[\&_\+_\.settings-stack-section\]\:mt-6+.settings-stack-section{margin-top:calc(var(--spacing) * 6)}.\[\&_\.actions\]\:mt-1\.5 .actions{margin-top:calc(var(--spacing) * 1.5)}.\[\&_\.actions\]\:flex .actions{display:flex}.\[\&_\.actions\]\:justify-end .actions{justify-content:flex-end}.\[\&_\.actions\]\:gap-2\.5 .actions{gap:calc(var(--spacing) * 2.5)}.\[\&_\.artifact-img\]\:mx-0 .artifact-img{margin-inline:0}.\[\&_\.artifact-img\]\:my-3 .artifact-img{margin-block:calc(var(--spacing) * 3)}.\[\&_\.artifact-img\]\:block .artifact-img{display:block}.\[\&_\.artifact-img_img\]\:h-auto .artifact-img img{height:auto}.\[\&_\.artifact-img_img\]\:max-w-full .artifact-img img{max-width:100%}.\[\&_\.artifact-img_img\]\:rounded-sm .artifact-img img{border-radius:6px}.\[\&_\.artifact-img_img\]\:border .artifact-img img{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.artifact-img_img\]\:border-border .artifact-img img{border-color:var(--border)}.\[\&_\.artifact-img-caption\]\:mt-1 .artifact-img-caption{margin-top:var(--spacing)}.\[\&_\.artifact-img-caption\]\:block .artifact-img-caption{display:block}.\[\&_\.artifact-img-caption\]\:text-center .artifact-img-caption{text-align:center}.\[\&_\.artifact-img-caption\]\:text-sm .artifact-img-caption{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.artifact-img-caption\]\:text-subtext .artifact-img-caption{color:var(--subtext)}.\[\&_\.backend-badge\]\:text-text .backend-badge{color:var(--text)}.\[\&_\.backend-detail\]\:text-muted .backend-detail{color:var(--muted)}.\[\&_\.backend-name\]\:font-medium .backend-name{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.badge\]\:ms-2 .badge{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.btn\]\:inline-flex .btn{display:inline-flex}.\[\&_\.btn\]\:items-center .btn{align-items:center}.\[\&_\.btn\]\:gap-\[5px\] .btn{gap:5px}.\[\&_\.busy-dot\]\:h-\[7px\] .busy-dot{height:7px}.\[\&_\.busy-dot\]\:w-\[7px\] .busy-dot{width:7px}.\[\&_\.busy-dot\]\:shrink-0 .busy-dot{flex-shrink:0}.\[\&_\.busy-dot\]\:animate-\[or-pulse_1\.2s_infinite\] .busy-dot{animation:1.2s infinite or-pulse}.\[\&_\.busy-dot\]\:rounded-full .busy-dot{border-radius:999px}.\[\&_\.busy-dot\]\:bg-primary .busy-dot{background-color:var(--primary)}.\[\&_\.busy-dot\.waiting\]\:animate-none .busy-dot.waiting{animation:none}.\[\&_\.chev\]\:w-3 .chev{width:calc(var(--spacing) * 3)}.\[\&_\.chev\]\:shrink-0 .chev{flex-shrink:0}.\[\&_\.chev\]\:text-xs .chev{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.chev\]\:text-muted .chev{color:var(--muted)}.\[\&_\.cmd-inline\]\:mx-2 .cmd-inline{margin-inline:calc(var(--spacing) * 2)}.\[\&_\.cmd-inline\]\:gap-2 .cmd-inline{gap:calc(var(--spacing) * 2)}.\[\&_\.count-badge\]\:inline-flex .count-badge{display:inline-flex}.\[\&_\.count-badge\]\:h-4\.5 .count-badge{height:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:min-w-4\.5 .count-badge{min-width:calc(var(--spacing) * 4.5)}.\[\&_\.count-badge\]\:items-center .count-badge{align-items:center}.\[\&_\.count-badge\]\:justify-center .count-badge{justify-content:center}.\[\&_\.count-badge\]\:rounded-md .count-badge{border-radius:8px}.\[\&_\.count-badge\]\:border .count-badge{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.count-badge\]\:border-border .count-badge{border-color:var(--border)}.\[\&_\.count-badge\]\:bg-canvas .count-badge{background-color:var(--canvas)}.\[\&_\.count-badge\]\:px-\[5px\] .count-badge{padding-inline:5px}.\[\&_\.count-badge\]\:py-0 .count-badge{padding-block:0}.\[\&_\.count-badge\]\:text-xs .count-badge{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.count-badge\]\:font-medium .count-badge{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.count-badge\]\:text-text .count-badge{color:var(--text)}.\[\&_\.elided-node-label\]\:flex .elided-node-label{display:flex}.\[\&_\.elided-node-label\]\:flex-col .elided-node-label{flex-direction:column}.\[\&_\.elided-node-label\]\:leading-\[1\.3\] .elided-node-label{--tw-leading:1.3;line-height:1.3}.\[\&_\.elided-node-sub\]\:text-muted .elided-node-sub{color:var(--muted)}.\[\&_\.error\]\:basis-full .error{flex-basis:100%}.\[\&_\.error\]\:text-base .error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.error\]\:text-sm .error{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.error\]\:whitespace-pre-wrap .error{white-space:pre-wrap}.\[\&_\.error\]\:text-accent-red .error{color:var(--accent-red)}.\[\&_\.file-chip\]\:mx-px .file-chip{margin-inline:1px}.\[\&_\.file-chip\]\:my-0 .file-chip{margin-block:0}.\[\&_\.file-chip\]\:inline-flex .file-chip{display:inline-flex}.\[\&_\.file-chip\]\:max-w-full .file-chip{max-width:100%}.\[\&_\.file-chip\]\:cursor-pointer .file-chip{cursor:pointer}.\[\&_\.file-chip\]\:items-center .file-chip{align-items:center}.\[\&_\.file-chip\]\:gap-1 .file-chip{gap:var(--spacing)}.\[\&_\.file-chip\]\:rounded-xs .file-chip{border-radius:4px}.\[\&_\.file-chip\]\:border .file-chip{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.file-chip\]\:border-border-variant .file-chip{border-color:var(--border-variant)}.\[\&_\.file-chip\]\:bg-panel .file-chip{background-color:var(--panel)}.\[\&_\.file-chip\]\:px-1\.5 .file-chip{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.file-chip\]\:py-0 .file-chip{padding-block:0}.\[\&_\.file-chip\]\:align-baseline .file-chip{vertical-align:baseline}.\[\&_\.file-chip\]\:font-mono .file-chip{font-family:var(--mono)}.\[\&_\.file-chip\]\:text-sm .file-chip{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.file-chip\]\:font-medium .file-chip{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.file-chip\]\:text-text .file-chip{color:var(--text)}.\[\&_\.file-chip_svg\]\:flex-none .file-chip svg{flex:none}.\[\&_\.file-chip_svg\]\:opacity-60 .file-chip svg{opacity:.6}.\[\&_\.file-chip-label\]\:max-w-65 .file-chip-label{max-width:calc(var(--spacing) * 65)}.\[\&_\.file-chip-label\]\:overflow-hidden .file-chip-label{overflow:hidden}.\[\&_\.file-chip-label\]\:text-ellipsis .file-chip-label{text-overflow:ellipsis}.\[\&_\.file-chip-label\]\:whitespace-nowrap .file-chip-label{white-space:nowrap}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:bg-surface .file-chip:hover:not(:disabled){background-color:var(--surface)}.\[\&_\.file-chip\:hover\:not\(\:disabled\)\]\:text-primary .file-chip:hover:not(:disabled){color:var(--primary)}.\[\&_\.files-pill\]\:rounded-sm .files-pill{border-radius:6px}.\[\&_\.files-pill\]\:px-2 .files-pill{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.files-pill\]\:py-\[5px\] .files-pill{padding-block:5px}.\[\&_\.files-pill_code\]\:text-xs .files-pill code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.folder-picker-chevron\]\:flex-none .folder-picker-chevron{flex:none}.\[\&_\.folder-picker-chevron\]\:text-muted .folder-picker-chevron{color:var(--muted)}.\[\&_\.folder-picker-control\]\:flex .folder-picker-control{display:flex}.\[\&_\.folder-picker-control\]\:w-full .folder-picker-control{width:100%}.\[\&_\.folder-picker-control\]\:min-w-0 .folder-picker-control{min-width:0}.\[\&_\.folder-picker-control\]\:cursor-pointer .folder-picker-control{cursor:pointer}.\[\&_\.folder-picker-control\]\:items-center .folder-picker-control{align-items:center}.\[\&_\.folder-picker-control\]\:gap-\[9px\] .folder-picker-control{gap:9px}.\[\&_\.folder-picker-control\]\:overflow-hidden .folder-picker-control{overflow:hidden}.\[\&_\.folder-picker-control\]\:rounded-md .folder-picker-control{border-radius:8px}.\[\&_\.folder-picker-control\]\:border .folder-picker-control{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.folder-picker-control\]\:border-border .folder-picker-control{border-color:var(--border)}.\[\&_\.folder-picker-control\]\:bg-background .folder-picker-control{background-color:var(--base)}.\[\&_\.folder-picker-control\]\:px-2\.5 .folder-picker-control{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.folder-picker-control\]\:py-2 .folder-picker-control{padding-block:calc(var(--spacing) * 2)}.\[\&_\.folder-picker-control\]\:text-start .folder-picker-control{text-align:start}.\[\&_\.folder-picker-control\]\:transition-\[border-color\,box-shadow\] .folder-picker-control{transition-property:border-color,box-shadow;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_\.folder-picker-control\]\:duration-120 .folder-picker-control{--tw-duration:.12s;transition-duration:.12s}.\[\&_\.folder-picker-control\]\:ease-standard .folder-picker-control{--tw-ease:ease;transition-timing-function:ease}.\[\&_\.folder-picker-control_\.placeholder\]\:text-muted .folder-picker-control .placeholder{color:var(--muted)}.\[\&_\.folder-picker-control_span\]\:min-w-0 .folder-picker-control span{min-width:0}.\[\&_\.folder-picker-control_span\]\:flex-1 .folder-picker-control span{flex:1}.\[\&_\.folder-picker-control_span\]\:overflow-hidden .folder-picker-control span{overflow:hidden}.\[\&_\.folder-picker-control_span\]\:text-ellipsis .folder-picker-control span{text-overflow:ellipsis}.\[\&_\.folder-picker-control_span\]\:whitespace-nowrap .folder-picker-control span{white-space:nowrap}.\[\&_\.folder-picker-control\:disabled\]\:cursor-default .folder-picker-control:disabled{cursor:default}.\[\&_\.folder-picker-control\:disabled\]\:opacity-65 .folder-picker-control:disabled{opacity:.65}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-2 .folder-picker-control:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-offset-2 .folder-picker-control:focus-visible{outline-offset:2px}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-text .folder-picker-control:focus-visible{outline-color:var(--text)}.\[\&_\.folder-picker-control\:focus-visible\]\:outline-solid .folder-picker-control:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:border-muted .folder-picker-control:hover:not(:disabled){border-color:var(--muted)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)\]\:shadow-control-subtle .folder-picker-control:hover:not(:disabled){--tw-shadow:0 2px 8px var(--tw-shadow-color,#0000000d);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_\.folder-picker-control\:hover\:not\(\:disabled\)_\.folder-picker-chevron\]\:text-subtext .folder-picker-control:hover:not(:disabled) .folder-picker-chevron{color:var(--subtext)}.\[\&_\.folder-picker-hint\]\:text-sm .folder-picker-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.folder-picker-hint\]\:leading-\[1\.4\] .folder-picker-hint{--tw-leading:1.4;line-height:1.4}.\[\&_\.folder-picker-hint\]\:font-normal .folder-picker-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.folder-picker-hint\]\:text-subtext .folder-picker-hint{color:var(--subtext)}.\[\&_\.folder-picker-icon\]\:flex-none .folder-picker-icon{flex:none}.\[\&_\.folder-picker-icon\]\:text-current .folder-picker-icon{color:currentColor}.\[\&_\.form-seg\]\:mb-0\.5 .form-seg{margin-bottom:calc(var(--spacing) * .5)}.\[\&_\.form-seg\]\:self-start .form-seg{align-self:flex-start}.\[\&_\.form-seg_button\]\:px-3 .form-seg button{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.form-seg_button\]\:py-\[5px\] .form-seg button{padding-block:5px}.\[\&_\.hc-actions\]\:mt-2\.5 .hc-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions\]\:flex .hc-actions{display:flex}.\[\&_\.hc-actions\]\:items-center .hc-actions{align-items:center}.\[\&_\.hc-actions\]\:gap-1\.5 .hc-actions{gap:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:inline-flex .hc-actions button{display:inline-flex}.\[\&_\.hc-actions_button\]\:min-w-21 .hc-actions button{min-width:calc(var(--spacing) * 21)}.\[\&_\.hc-actions_button\]\:items-center .hc-actions button{align-items:center}.\[\&_\.hc-actions_button\]\:justify-center .hc-actions button{justify-content:center}.\[\&_\.hc-actions_button\]\:gap-\[5px\] .hc-actions button{gap:5px}.\[\&_\.hc-actions_button\]\:rounded-md .hc-actions button{border-radius:8px}.\[\&_\.hc-actions_button\]\:border .hc-actions button{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.hc-actions_button\]\:border-border .hc-actions button{border-color:var(--border)}.\[\&_\.hc-actions_button\]\:bg-background .hc-actions button{background-color:var(--base)}.\[\&_\.hc-actions_button\]\:px-2\.5 .hc-actions button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.hc-actions_button\]\:py-1\.5 .hc-actions button{padding-block:calc(var(--spacing) * 1.5)}.\[\&_\.hc-actions_button\]\:text-sm .hc-actions button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-actions_button\]\:font-medium .hc-actions button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-actions_button\]\:text-text .hc-actions button{color:var(--text)}.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.hc-actions_button\:hover\]\:border-border-hover-strong .hc-actions button:hover{border-color:color-mix(in oklab,var(--border) 55%,var(--text))}}.\[\&_\.hc-actions_button\:hover\]\:bg-canvas .hc-actions button:hover{background-color:var(--canvas)}.\[\&_\.hc-body\]\:mt-2\.5 .hc-body{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:line-clamp-10 .hc-body{-webkit-line-clamp:10;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-body\]\:border-t .hc-body{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-body\]\:border-t-border-variant .hc-body{border-top-color:var(--border-variant)}.\[\&_\.hc-body\]\:pt-2\.5 .hc-body{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-body\]\:leading-\[1\.6\] .hc-body{--tw-leading:1.6;line-height:1.6}.\[\&_\.hc-body\]\:whitespace-pre-line .hc-body{white-space:pre-line}.\[\&_\.hc-body\.expanded\]\:line-clamp-none .hc-body.expanded{-webkit-line-clamp:unset;-webkit-box-orient:horizontal;display:block;overflow:visible}.\[\&_\.hc-body\.expanded\]\:block .hc-body.expanded{display:block}.\[\&_\.hc-body\.expanded\]\:max-h-\[45vh\] .hc-body.expanded{max-height:45vh}.\[\&_\.hc-body\.expanded\]\:overflow-x-hidden .hc-body.expanded{overflow-x:hidden}.\[\&_\.hc-body\.expanded\]\:overflow-y-auto .hc-body.expanded{overflow-y:auto}.\[\&_\.hc-body\.expanded\]\:pb-1 .hc-body.expanded{padding-bottom:var(--spacing)}.\[\&_\.hc-branch\]\:inline-flex .hc-branch{display:inline-flex}.\[\&_\.hc-branch\]\:min-w-0 .hc-branch{min-width:0}.\[\&_\.hc-branch\]\:items-center .hc-branch{align-items:center}.\[\&_\.hc-branch\]\:gap-1 .hc-branch{gap:var(--spacing)}.\[\&_\.hc-branch\]\:overflow-hidden .hc-branch{overflow:hidden}.\[\&_\.hc-branch\]\:text-ellipsis .hc-branch{text-overflow:ellipsis}.\[\&_\.hc-branch\]\:whitespace-nowrap .hc-branch{white-space:nowrap}.\[\&_\.hc-failure\]\:mt-2 .hc-failure{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-failure\]\:line-clamp-3 .hc-failure{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-failure\]\:text-accent-red .hc-failure{color:var(--accent-red)}.\[\&_\.hc-foot\]\:mt-2 .hc-foot{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-foot\]\:flex .hc-foot{display:flex}.\[\&_\.hc-foot\]\:items-center .hc-foot{align-items:center}.\[\&_\.hc-foot\]\:justify-between .hc-foot{justify-content:space-between}.\[\&_\.hc-foot\]\:gap-2\.5 .hc-foot{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-foot\]\:text-xs .hc-foot{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-foot\]\:text-muted .hc-foot{color:var(--muted)}.\[\&_\.hc-foot_\.hc-command\]\:min-w-0 .hc-foot .hc-command{min-width:0}.\[\&_\.hc-foot_\.hc-command\]\:overflow-hidden .hc-foot .hc-command{overflow:hidden}.\[\&_\.hc-foot_\.hc-command\]\:text-ellipsis .hc-foot .hc-command{text-overflow:ellipsis}.\[\&_\.hc-foot_\.hc-command\]\:whitespace-nowrap .hc-foot .hc-command{white-space:nowrap}.\[\&_\.hc-git\]\:mt-2\.5 .hc-git{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-git\]\:flex .hc-git{display:flex}.\[\&_\.hc-git\]\:flex-col .hc-git{flex-direction:column}.\[\&_\.hc-git\]\:gap-1 .hc-git{gap:var(--spacing)}.\[\&_\.hc-git\]\:border-t .hc-git{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-git\]\:border-t-border-variant .hc-git{border-top-color:var(--border-variant)}.\[\&_\.hc-git\]\:pt-2 .hc-git{padding-top:calc(var(--spacing) * 2)}.\[\&_\.hc-git\]\:text-xs .hc-git{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-git\]\:text-text .hc-git{color:var(--text)}.\[\&_\.hc-git-row\]\:flex .hc-git-row{display:flex}.\[\&_\.hc-git-row\]\:min-w-0 .hc-git-row{min-width:0}.\[\&_\.hc-git-row\]\:flex-wrap .hc-git-row{flex-wrap:wrap}.\[\&_\.hc-git-row\]\:items-center .hc-git-row{align-items:center}.\[\&_\.hc-git-row\]\:gap-2\.5 .hc-git-row{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-head\]\:flex .hc-head{display:flex}.\[\&_\.hc-head\]\:items-baseline .hc-head{align-items:baseline}.\[\&_\.hc-head\]\:justify-between .hc-head{justify-content:space-between}.\[\&_\.hc-head\]\:gap-2\.5 .hc-head{gap:calc(var(--spacing) * 2.5)}.\[\&_\.hc-monitoring\]\:mt-2 .hc-monitoring{margin-top:calc(var(--spacing) * 2)}.\[\&_\.hc-monitoring\]\:line-clamp-3 .hc-monitoring{-webkit-line-clamp:3;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.hc-monitoring\]\:text-accent-amber .hc-monitoring{color:var(--accent-amber)}.\[\&_\.hc-slug\]\:min-w-0 .hc-slug{min-width:0}.\[\&_\.hc-slug\]\:overflow-hidden .hc-slug{overflow:hidden}.\[\&_\.hc-slug\]\:text-sm .hc-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-slug\]\:font-semibold .hc-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.hc-slug\]\:text-ellipsis .hc-slug{text-overflow:ellipsis}.\[\&_\.hc-slug\]\:whitespace-nowrap .hc-slug{white-space:nowrap}.\[\&_\.hc-stats\]\:mt-2\.5 .hc-stats{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:flex .hc-stats{display:flex}.\[\&_\.hc-stats\]\:flex-wrap .hc-stats{flex-wrap:wrap}.\[\&_\.hc-stats\]\:items-center .hc-stats{align-items:center}.\[\&_\.hc-stats\]\:gap-3 .hc-stats{gap:calc(var(--spacing) * 3)}.\[\&_\.hc-stats\]\:border-t .hc-stats{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.hc-stats\]\:border-t-border-variant .hc-stats{border-top-color:var(--border-variant)}.\[\&_\.hc-stats\]\:pt-2\.5 .hc-stats{padding-top:calc(var(--spacing) * 2.5)}.\[\&_\.hc-stats\]\:text-xs .hc-stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.hc-stats\]\:text-text .hc-stats{color:var(--text)}.\[\&_\.hc-title\]\:mt-\[3px\] .hc-title{margin-top:3px}.\[\&_\.hc-title\]\:text-text .hc-title{color:var(--text)}.\[\&_\.hc-toggle\]\:mt-1 .hc-toggle{margin-top:var(--spacing)}.\[\&_\.hc-toggle\]\:text-sm .hc-toggle{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.hc-toggle\]\:font-medium .hc-toggle{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.hc-toggle\]\:text-muted .hc-toggle{color:var(--muted)}.\[\&_\.hc-toggle\:hover\]\:text-text .hc-toggle:hover{color:var(--text)}.\[\&_\.home-inner\]\:max-w-140 .home-inner{max-width:calc(var(--spacing) * 140)}.\[\&_\.home-inner\]\:max-w-300 .home-inner{max-width:calc(var(--spacing) * 300)}.\[\&_\.home-inner\]\:pt-0 .home-inner{padding-top:0}.\[\&_\.home-inner\]\:pt-24 .home-inner{padding-top:calc(var(--spacing) * 24)}.\[\&_\.home-inner\]\:pb-0 .home-inner{padding-bottom:0}.\[\&_\.icon-btn\]\:ms-2 .icon-btn{margin-inline-start:calc(var(--spacing) * 2)}.\[\&_\.icon-btn\]\:align-middle .icon-btn{vertical-align:middle}.\[\&_\.id\]\:text-xs .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.id\]\:text-muted .id{color:var(--muted)}.\[\&_\.k\]\:text-sm .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.k\]\:font-medium .k{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.k\]\:text-subtext .k{color:var(--subtext)}.\[\&_\.k\]\:text-text .k{color:var(--text)}.\[\&_\.katex\]\:text-prose-emphasis .katex{font-size:1.05em}.\[\&_\.katex-display\]\:mx-0 .katex-display{margin-inline:0}.\[\&_\.katex-display\]\:my-3 .katex-display{margin-block:calc(var(--spacing) * 3)}.\[\&_\.katex-display\]\:overflow-x-auto .katex-display{overflow-x:auto}.\[\&_\.katex-display\]\:overflow-y-hidden .katex-display{overflow-y:hidden}.\[\&_\.katex-display\]\:px-0 .katex-display{padding-inline:0}.\[\&_\.katex-display\]\:py-0\.5 .katex-display{padding-block:calc(var(--spacing) * .5)}.\[\&_\.kv\]\:grid-cols-\[132px_minmax\(0\,_1fr\)\] .kv{grid-template-columns:132px minmax(0,1fr)}.\[\&_\.kv\]\:items-center .kv{align-items:center}.\[\&_\.kv\]\:gap-x-4\.5 .kv{column-gap:calc(var(--spacing) * 4.5)}.\[\&_\.kv\]\:gap-y-1\.5 .kv{row-gap:calc(var(--spacing) * 1.5)}.\[\&_\.kv\]\:gap-y-\[9px\] .kv{row-gap:9px}.\[\&_\.kv_\.k\]\:text-sm .kv .k{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.kv_\.v\]\:flex .kv .v{display:flex}.\[\&_\.kv_\.v\]\:min-w-0 .kv .v{min-width:0}.\[\&_\.kv_\.v\]\:flex-wrap .kv .v{flex-wrap:wrap}.\[\&_\.kv_\.v\]\:items-center .kv .v{align-items:center}.\[\&_\.kv_\.v\]\:gap-\[7px\] .kv .v{gap:7px}.\[\&_\.kv_\.v\]\:font-sans .kv .v{font-family:var(--sans)}.\[\&_\.kv_\.v\]\:text-base .kv .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.kv_\.v\]\:break-normal .kv .v{overflow-wrap:normal;word-break:normal}.\[\&_\.md\]\:max-w-readable .md{max-width:var(--readable-col)}.\[\&_\.md\]\:text-base .md{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.md\]\:leading-\[1\.65\] .md{--tw-leading:1.65;line-height:1.65}.\[\&_\.md\]\:text-text .md{color:var(--text)}.\[\&_\.md_h1\]\:mx-0 .md h1{margin-inline:0}.\[\&_\.md_h1\]\:mt-4\.5 .md h1{margin-top:calc(var(--spacing) * 4.5)}.\[\&_\.md_h1\]\:mb-2 .md h1{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h1\]\:text-2xl .md h1{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_\.md_h2\]\:mx-0 .md h2{margin-inline:0}.\[\&_\.md_h2\]\:mt-4 .md h2{margin-top:calc(var(--spacing) * 4)}.\[\&_\.md_h2\]\:mb-2 .md h2{margin-bottom:calc(var(--spacing) * 2)}.\[\&_\.md_h2\]\:text-xl .md h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\.md_h3\]\:text-lg .md h3{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_\.model-id\]\:block .model-id{display:block}.\[\&_\.model-id\]\:text-xs .model-id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.model-id\]\:text-muted .model-id{color:var(--muted)}.\[\&_\.model-item\]\:ps-6 .model-item{padding-inline-start:calc(var(--spacing) * 6)}.\[\&_\.model-item\]\:whitespace-nowrap .model-item{white-space:nowrap}.\[\&_\.model-item\:disabled\]\:cursor-default .model-item:disabled{cursor:default}.\[\&_\.model-item\:disabled\]\:text-muted .model-item:disabled{color:var(--muted)}.\[\&_\.model-item\:disabled\:hover\]\:bg-transparent .model-item:disabled:hover{background-color:#0000}.\[\&_\.new-project-actions\]\:mt-2\.5 .new-project-actions{margin-top:calc(var(--spacing) * 2.5)}.\[\&_\.new-project-actions\]\:justify-start .new-project-actions{justify-content:flex-start}.\[\&_\.node-action\]\:inline-flex .node-action{display:inline-flex}.\[\&_\.node-action\]\:items-center .node-action{align-items:center}.\[\&_\.node-action\]\:gap-\[5px\] .node-action{gap:5px}.\[\&_\.node-action\]\:rounded-sm .node-action{border-radius:6px}.\[\&_\.node-action\]\:px-1\.5 .node-action{padding-inline:calc(var(--spacing) * 1.5)}.\[\&_\.node-action\]\:py-\[3px\] .node-action{padding-block:3px}.\[\&_\.node-action\]\:text-sm .node-action{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-action\]\:font-medium .node-action{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-action\]\:text-text .node-action{color:var(--text)}.\[\&_\.node-action\]\:no-underline .node-action{text-decoration-line:none}.\[\&_\.node-action-ext\]\:ms-auto .node-action-ext{margin-inline-start:auto}.\[\&_\.node-action-ext\]\:px-\[5px\] .node-action-ext{padding-inline:5px}.\[\&_\.node-action-ext\]\:py-\[3px\] .node-action-ext{padding-block:3px}.\[\&_\.node-action\:hover\]\:bg-surface .node-action:hover{background-color:var(--surface)}.\[\&_\.node-action\:hover\]\:text-text .node-action:hover{color:var(--text)}.\[\&_\.node-actions\]\:mt-2 .node-actions{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-actions\]\:flex .node-actions{display:flex}.\[\&_\.node-actions\]\:items-center .node-actions{align-items:center}.\[\&_\.node-actions\]\:gap-\[3px\] .node-actions{gap:3px}.\[\&_\.node-actions\]\:border-t .node-actions{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.node-actions\]\:border-t-border-variant .node-actions{border-top-color:var(--border-variant)}.\[\&_\.node-actions\]\:pt-1\.5 .node-actions{padding-top:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:mb-1\.5 .node-eyebrow{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\.node-eyebrow\]\:flex .node-eyebrow{display:flex}.\[\&_\.node-eyebrow\]\:items-center .node-eyebrow{align-items:center}.\[\&_\.node-eyebrow\]\:justify-between .node-eyebrow{justify-content:space-between}.\[\&_\.node-eyebrow\]\:gap-2 .node-eyebrow{gap:calc(var(--spacing) * 2)}.\[\&_\.node-eyebrow\]\:text-xs .node-eyebrow{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-eyebrow\]\:font-medium .node-eyebrow{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.node-eyebrow\]\:text-muted .node-eyebrow{color:var(--muted)}.\[\&_\.node-head\]\:flex .node-head{display:flex}.\[\&_\.node-head\]\:min-w-0 .node-head{min-width:0}.\[\&_\.node-head\]\:items-center .node-head{align-items:center}.\[\&_\.node-head\]\:gap-\[7px\] .node-head{gap:7px}.\[\&_\.node-meta\]\:mt-2 .node-meta{margin-top:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:flex .node-meta{display:flex}.\[\&_\.node-meta\]\:items-center .node-meta{align-items:center}.\[\&_\.node-meta\]\:gap-2 .node-meta{gap:calc(var(--spacing) * 2)}.\[\&_\.node-meta\]\:text-xs .node-meta{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.node-meta\]\:text-muted .node-meta{color:var(--muted)}.\[\&_\.node-overview-link\]\:block .node-overview-link{display:block}.\[\&_\.node-overview-link\]\:w-full .node-overview-link{width:100%}.\[\&_\.node-overview-link\]\:cursor-pointer .node-overview-link{cursor:pointer}.\[\&_\.node-overview-link\]\:border-0 .node-overview-link{border-style:var(--tw-border-style);border-width:0}.\[\&_\.node-overview-link\]\:bg-transparent .node-overview-link{background-color:#0000}.\[\&_\.node-overview-link\]\:p-0 .node-overview-link{padding:0}.\[\&_\.node-overview-link\]\:text-start .node-overview-link{text-align:start}.\[\&_\.node-overview-link\]\:text-inherit .node-overview-link{color:inherit}.\[\&_\.node-overview-link\]\:\[font\:inherit\] .node-overview-link{font:inherit}.\[\&_\.node-overview-link\:focus-visible\]\:rounded-xs .node-overview-link:focus-visible{border-radius:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-2 .node-overview-link:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-offset-4 .node-overview-link:focus-visible{outline-offset:4px}.\[\&_\.node-overview-link\:focus-visible\]\:outline-accent .node-overview-link:focus-visible{outline-color:var(--accent)}.\[\&_\.node-overview-link\:focus-visible\]\:outline-solid .node-overview-link:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline .node-overview-link:hover .node-slug{text-decoration-line:underline}.\[\&_\.node-overview-link\:hover_\.node-slug\]\:underline-offset-\[3px\] .node-overview-link:hover .node-slug{text-underline-offset:3px}.\[\&_\.node-slug\]\:min-w-0 .node-slug{min-width:0}.\[\&_\.node-slug\]\:flex-1 .node-slug{flex:1}.\[\&_\.node-slug\]\:overflow-hidden .node-slug{overflow:hidden}.\[\&_\.node-slug\]\:text-sm .node-slug{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-slug\]\:font-semibold .node-slug{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_\.node-slug\]\:text-ellipsis .node-slug{text-overflow:ellipsis}.\[\&_\.node-slug\]\:whitespace-nowrap .node-slug{white-space:nowrap}.\[\&_\.node-slug\]\:text-text .node-slug{color:var(--text)}.\[\&_\.node-status\]\:h-2 .node-status{height:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:w-2 .node-status{width:calc(var(--spacing) * 2)}.\[\&_\.node-status\]\:shrink-0 .node-status{flex-shrink:0}.\[\&_\.node-status\]\:rounded-full .node-status{border-radius:999px}.\[\&_\.node-title\]\:mt-1 .node-title{margin-top:var(--spacing)}.\[\&_\.node-title\]\:line-clamp-2 .node-title{-webkit-line-clamp:2;-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden}.\[\&_\.node-title\]\:text-sm .node-title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.node-title\]\:text-text .node-title{color:var(--text)}.\[\&_\.openresearch-diff-file\]\:w-full .openresearch-diff-file{width:100%}.\[\&_\.openresearch-diff-file\]\:\[--diff-background-color\:var\(--base\)\] .openresearch-diff-file{--diff-background-color:var(--base)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-background-color\:var\(--color-diff-delete-code\)\] .openresearch-diff-file{--diff-code-delete-background-color:var(--color-diff-delete-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-background-color\:var\(--color-diff-delete-edit\)\] .openresearch-diff-file{--diff-code-delete-edit-background-color:var(--color-diff-delete-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-delete-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-delete-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-background-color\:var\(--color-diff-insert-code\)\] .openresearch-diff-file{--diff-code-insert-background-color:var(--color-diff-insert-code)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-background-color\:var\(--color-diff-insert-edit\)\] .openresearch-diff-file{--diff-code-insert-edit-background-color:var(--color-diff-insert-edit)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-edit-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-edit-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-insert-text-color\:var\(--diff-text-color\)\] .openresearch-diff-file{--diff-code-insert-text-color:var(--diff-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-background-color\:var\(--diff-selection-background-color\)\] .openresearch-diff-file{--diff-code-selected-background-color:var(--diff-selection-background-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-code-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-code-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-font-family\:var\(--mono\)\] .openresearch-diff-file{--diff-font-family:var(--mono)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-background-color\:var\(--color-diff-delete-gutter\)\] .openresearch-diff-file{--diff-gutter-delete-background-color:var(--color-diff-delete-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-delete-text-color\:var\(--accent-red\)\] .openresearch-diff-file{--diff-gutter-delete-text-color:var(--accent-red)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-background-color\:var\(--color-diff-insert-gutter\)\] .openresearch-diff-file{--diff-gutter-insert-background-color:var(--color-diff-insert-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-insert-text-color\:var\(--accent-green\)\] .openresearch-diff-file{--diff-gutter-insert-text-color:var(--accent-green)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-background-color\:var\(--color-diff-gutter-selection\)\] .openresearch-diff-file{--diff-gutter-selected-background-color:var(--color-diff-gutter-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-gutter-selected-text-color\:var\(--diff-selection-text-color\)\] .openresearch-diff-file{--diff-gutter-selected-text-color:var(--diff-selection-text-color)}.\[\&_\.openresearch-diff-file\]\:\[--diff-omit-gutter-line-color\:var\(--color-diff-omit-gutter\)\] .openresearch-diff-file{--diff-omit-gutter-line-color:var(--color-diff-omit-gutter)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-background-color\:var\(--color-diff-selection\)\] .openresearch-diff-file{--diff-selection-background-color:var(--color-diff-selection)}.\[\&_\.openresearch-diff-file\]\:\[--diff-selection-text-color\:var\(--primary\)\] .openresearch-diff-file{--diff-selection-text-color:var(--primary)}.\[\&_\.openresearch-diff-file\]\:\[--diff-text-color\:var\(--text\)\] .openresearch-diff-file{--diff-text-color:var(--text)}.\[\&_\.openresearch-diff-file_\.diff-code\]\:py-0 .openresearch-diff-file .diff-code{padding-block:0}.\[\&_\.openresearch-diff-file_\.diff-code\]\:ps-\[2ch\] .openresearch-diff-file .diff-code{padding-inline-start:2ch}.\[\&_\.openresearch-diff-file_\.diff-code\]\:pe-4 .openresearch-diff-file .diff-code{padding-inline-end:calc(var(--spacing) * 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-top-style:var(--tw-border-style);border-top-width:1px}.\[\&_\.openresearch-diff-file_\.diff-hunk_\+_\.diff-hunk_\.diff-line\:first-child_\>_td\]\:border-t-border .openresearch-diff-file .diff-hunk+.diff-hunk .diff-line:first-child>td{border-top-color:var(--border)}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-delete\)\]\:bg-diff-delete-code .openresearch-diff-file .diff-line:has(.diff-code-delete){background-color:color-mix(in oklab,var(--base) 92%,var(--accent-red))}}.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:var(--base)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.openresearch-diff-file_\.diff-line\:has\(\.diff-code-insert\)\]\:bg-diff-insert-code .openresearch-diff-file .diff-line:has(.diff-code-insert){background-color:color-mix(in oklab,var(--base) 91%,var(--accent-green))}}.\[\&_\.openresearch-diff-file\.diff-unified\]\:table-fixed .openresearch-diff-file.diff-unified{table-layout:fixed}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:first-child\]\:p-0 .openresearch-diff-file.diff-unified .diff-line>td:first-child{padding:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:w-\[7ch\] .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){width:7ch}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:cursor-default .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){cursor:default}.\[\&_\.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-inline-end-style:var(--tw-border-style);border-inline-end-width:1px}.\[\&_\.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){border-inline-end-color:var(--border)}.\[\&_\.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){padding-inline-start:calc(var(--spacing) * 3.5)}.\[\&_\.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){padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pt-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-top:0}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:pb-0 .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){padding-bottom:0}.\[\&_\.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-align:end}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:whitespace-nowrap .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){white-space:nowrap}.\[\&_\.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){color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.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){color:color-mix(in oklab,var(--text) 45%,var(--base))}}.\[\&_\.openresearch-diff-file\.diff-unified_\.diff-line_\>_td\:nth-child\(2\)\]\:select-none .openresearch-diff-file.diff-unified .diff-line>td:nth-child(2){-webkit-user-select:none;user-select:none}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:collapse .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{visibility:collapse}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:first-child\]\:w-0 .openresearch-diff-file.diff-unified col.diff-gutter-col:first-child{width:0}.\[\&_\.openresearch-diff-file\.diff-unified_col\.diff-gutter-col\:nth-child\(2\)\]\:w-\[7ch\] .openresearch-diff-file.diff-unified col.diff-gutter-col:nth-child(2){width:7ch}.\[\&_\.option-menu\]\:w-max .option-menu{width:max-content}.\[\&_\.paper-destination\]\:flex .paper-destination{display:flex}.\[\&_\.paper-destination\]\:items-center .paper-destination{align-items:center}.\[\&_\.paper-destination\]\:gap-2\.5 .paper-destination{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-destination\]\:rounded-md .paper-destination{border-radius:8px}.\[\&_\.paper-destination\]\:border .paper-destination{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-destination\]\:border-border .paper-destination{border-color:var(--border)}.\[\&_\.paper-destination\]\:bg-background .paper-destination{background-color:var(--base)}.\[\&_\.paper-destination\]\:ps-3 .paper-destination{padding-inline-start:calc(var(--spacing) * 3)}.\[\&_\.paper-destination\]\:pe-2 .paper-destination{padding-inline-end:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pt-2 .paper-destination{padding-top:calc(var(--spacing) * 2)}.\[\&_\.paper-destination\]\:pb-2 .paper-destination{padding-bottom:calc(var(--spacing) * 2)}.\[\&_\.paper-destination_\.btn\]\:flex-none .paper-destination .btn{flex:none}.\[\&_\.paper-destination_code\]\:min-w-0 .paper-destination code{min-width:0}.\[\&_\.paper-destination_code\]\:flex-1 .paper-destination code{flex:1}.\[\&_\.paper-destination_code\]\:overflow-hidden .paper-destination code{overflow:hidden}.\[\&_\.paper-destination_code\]\:text-sm .paper-destination code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-destination_code\]\:font-normal .paper-destination code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.paper-destination_code\]\:text-ellipsis .paper-destination code{text-overflow:ellipsis}.\[\&_\.paper-destination_code\]\:whitespace-nowrap .paper-destination code{white-space:nowrap}.\[\&_\.paper-destination_code\]\:text-text .paper-destination code{color:var(--text)}.\[\&_\.paper-pick\]\:flex .paper-pick{display:flex}.\[\&_\.paper-pick\]\:items-center .paper-pick{align-items:center}.\[\&_\.paper-pick\]\:justify-between .paper-pick{justify-content:space-between}.\[\&_\.paper-pick\]\:gap-2\.5 .paper-pick{gap:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick\]\:rounded-md .paper-pick{border-radius:8px}.\[\&_\.paper-pick\]\:border .paper-pick{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-pick\]\:border-border .paper-pick{border-color:var(--border)}.\[\&_\.paper-pick\]\:bg-surface .paper-pick{background-color:var(--surface)}.\[\&_\.paper-pick\]\:px-3 .paper-pick{padding-inline:calc(var(--spacing) * 3)}.\[\&_\.paper-pick\]\:py-2\.5 .paper-pick{padding-block:calc(var(--spacing) * 2.5)}.\[\&_\.paper-pick_\.id\]\:text-xs .paper-pick .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-pick_\.id\]\:text-muted .paper-pick .id{color:var(--muted)}.\[\&_\.paper-pick_\.meta\]\:min-w-0 .paper-pick .meta{min-width:0}.\[\&_\.paper-pick_\.title\]\:text-sm .paper-pick .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-pick_\.title\]\:font-medium .paper-pick .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results\]\:flex .paper-results{display:flex}.\[\&_\.paper-results\]\:max-h-60 .paper-results{max-height:calc(var(--spacing) * 60)}.\[\&_\.paper-results\]\:flex-col .paper-results{flex-direction:column}.\[\&_\.paper-results\]\:overflow-y-auto .paper-results{overflow-y:auto}.\[\&_\.paper-results\]\:rounded-md .paper-results{border-radius:8px}.\[\&_\.paper-results\]\:border .paper-results{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.paper-results\]\:border-border .paper-results{border-color:var(--border)}.\[\&_\.paper-results_\.id\]\:text-xs .paper-results .id{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.paper-results_\.id\]\:text-muted .paper-results .id{color:var(--muted)}.\[\&_\.paper-results_\.title\]\:text-sm .paper-results .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.paper-results_\.title\]\:font-medium .paper-results .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.paper-results_button\]\:flex .paper-results button{display:flex}.\[\&_\.paper-results_button\]\:cursor-pointer .paper-results button{cursor:pointer}.\[\&_\.paper-results_button\]\:flex-col .paper-results button{flex-direction:column}.\[\&_\.paper-results_button\]\:items-start .paper-results button{align-items:flex-start}.\[\&_\.paper-results_button\]\:gap-0\.5 .paper-results button{gap:calc(var(--spacing) * .5)}.\[\&_\.paper-results_button\]\:border-0 .paper-results button{border-style:var(--tw-border-style);border-width:0}.\[\&_\.paper-results_button\]\:border-b .paper-results button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_\.paper-results_button\]\:border-b-border-variant .paper-results button{border-bottom-color:var(--border-variant)}.\[\&_\.paper-results_button\]\:bg-transparent .paper-results button{background-color:#0000}.\[\&_\.paper-results_button\]\:bg-none .paper-results button{background-image:none}.\[\&_\.paper-results_button\]\:px-2\.5 .paper-results button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_\.paper-results_button\]\:py-2 .paper-results button{padding-block:calc(var(--spacing) * 2)}.\[\&_\.paper-results_button\]\:text-start .paper-results button{text-align:start}.\[\&_\.paper-results_button\]\:text-text .paper-results button{color:var(--text)}.\[\&_\.paper-results_button\]\:\[font\:inherit\] .paper-results button{font:inherit}.\[\&_\.paper-results_button\:hover\]\:bg-surface .paper-results button:hover{background-color:var(--surface)}.\[\&_\.paper-results_button\:last-child\]\:border-b-0 .paper-results button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_\.path\]\:flex .path{display:flex}.\[\&_\.path\]\:min-w-0 .path{min-width:0}.\[\&_\.path\]\:flex-1 .path{flex:1}.\[\&_\.path\]\:items-center .path{align-items:center}.\[\&_\.path\]\:gap-2 .path{gap:calc(var(--spacing) * 2)}.\[\&_\.path_code\]\:min-w-0 .path code{min-width:0}.\[\&_\.path_code\]\:flex-1 .path code{flex:1}.\[\&_\.path_code\]\:overflow-hidden .path code{overflow:hidden}.\[\&_\.path_code\]\:font-mono .path code{font-family:var(--mono)}.\[\&_\.path_code\]\:text-xs .path code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.path_code\]\:font-medium .path code{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.path_code\]\:text-ellipsis .path code{text-overflow:ellipsis}.\[\&_\.path_code\]\:whitespace-nowrap .path code{white-space:nowrap}.\[\&_\.path_code\]\:text-text .path code{color:var(--text)}.\[\&_\.progress\]\:mx-0 .progress{margin-inline:0}.\[\&_\.progress\]\:mt-2 .progress{margin-top:calc(var(--spacing) * 2)}.\[\&_\.progress\]\:mb-0 .progress{margin-bottom:0}.\[\&_\.progress-track\]\:h-\[5px\] .progress-track{height:5px}.\[\&_\.progress-track\]\:border-0 .progress-track{border-style:var(--tw-border-style);border-width:0}.\[\&_\.progress-track\]\:bg-border .progress-track{background-color:var(--border)}.\[\&_\.project-default-title\]\:text-base .project-default-title,.\[\&_\.project-field-label\]\:text-base .project-field-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-field-label\]\:font-medium .project-field-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-field-label\]\:text-text .project-field-label{color:var(--text)}.\[\&_\.project-location-field\]\:flex .project-location-field{display:flex}.\[\&_\.project-location-field\]\:flex-col .project-location-field{flex-direction:column}.\[\&_\.project-location-field\]\:gap-2 .project-location-field{gap:calc(var(--spacing) * 2)}.\[\&_\.project-location-label\]\:text-base .project-location-label{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-location-label\]\:font-medium .project-location-label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.project-location-label\]\:text-text .project-location-label{color:var(--text)}.\[\&_\.project-path-notice\]\:rounded-sm .project-path-notice{border-radius:6px}.\[\&_\.project-path-notice\]\:border .project-path-notice{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.project-path-notice\]\:border-border-variant .project-path-notice{border-color:var(--border-variant)}.\[\&_\.project-path-notice\]\:bg-surface .project-path-notice{background-color:var(--surface)}.\[\&_\.project-path-notice\]\:px-\[11px\] .project-path-notice{padding-inline:11px}.\[\&_\.project-path-notice\]\:py-\[9px\] .project-path-notice{padding-block:9px}.\[\&_\.project-path-notice\]\:text-base .project-path-notice{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.project-path-notice\]\:text-sm .project-path-notice{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.project-path-notice\]\:leading-\[1\.4\] .project-path-notice{--tw-leading:1.4;line-height:1.4}.\[\&_\.project-path-notice\]\:leading-relaxed .project-path-notice{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\.project-path-notice\]\:text-subtext .project-path-notice{color:var(--subtext)}.\[\&_\.project-path-notice\]\:text-text .project-path-notice{color:var(--text)}.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.project-path-notice\.error\]\:border-danger-notice-border .project-path-notice.error{border-color:color-mix(in srgb,var(--accent-red) 35%,var(--border-variant))}}.\[\&_\.rail-body\]\:min-h-0 .rail-body{min-height:0}.\[\&_\.rail-body\]\:flex-1 .rail-body{flex:1}.\[\&_\.rail-body\]\:overflow-y-auto .rail-body{overflow-y:auto}.\[\&_\.rail-body\]\:px-2 .rail-body{padding-inline:calc(var(--spacing) * 2)}.\[\&_\.rail-body\]\:pt-0 .rail-body{padding-top:0}.\[\&_\.rail-body\]\:pb-1 .rail-body{padding-bottom:var(--spacing)}.\[\&_\.react-flow\\_\\_attribution\]\:hidden\! .react-flow__attribution{display:none!important}.\[\&_\.react-flow\\_\\_handle\]\:pointer-events-none .react-flow__handle{pointer-events:none}.\[\&_\.react-flow\\_\\_handle\]\:opacity-0 .react-flow__handle{opacity:0}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-archived\.selectable\]\:cursor-pointer .react-flow__node.react-flow__node-archived.selectable,.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-elided\.selectable\]\:cursor-pointer .react-flow__node.react-flow__node-elided.selectable{cursor:pointer}.\[\&_\.react-flow\\_\\_node\.react-flow\\_\\_node-exp\.selectable\]\:cursor-default .react-flow__node.react-flow__node-exp.selectable{cursor:default}.\[\&_\.repo-hint\]\:text-sm .repo-hint{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.repo-hint\]\:font-normal .repo-hint{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_\.repo-hint\]\:text-muted .repo-hint{color:var(--muted)}.\[\&_\.repo-hint\.ok\]\:text-accent-teal .repo-hint.ok{color:var(--accent-teal)}.\[\&_\.row2\]\:grid .row2{display:grid}.\[\&_\.row2\]\:grid-cols-2 .row2{grid-template-columns:repeat(2,minmax(0,1fr))}.\[\&_\.row2\]\:gap-2\.5 .row2{gap:calc(var(--spacing) * 2.5)}.\[\&_\.run-chip_svg\]\:text-primary .run-chip svg{color:var(--primary)}.\[\&_\.run-chip_svg\]\:opacity-100 .run-chip svg{opacity:1}.\[\&_\.sel\]\:font-medium .sel{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.sel\]\:text-text .sel{color:var(--text)}.\[\&_\.session-dot\]\:inline-flex .session-dot{display:inline-flex}.\[\&_\.session-dot\]\:w-4 .session-dot{width:calc(var(--spacing) * 4)}.\[\&_\.session-dot\]\:shrink-0 .session-dot{flex-shrink:0}.\[\&_\.session-dot\]\:items-center .session-dot{align-items:center}.\[\&_\.session-dot\]\:justify-center .session-dot{justify-content:center}.\[\&_\.session-dot\:empty\]\:hidden .session-dot:empty{display:none}.\[\&_\.session-menu-btn\]\:mx-0 .session-menu-btn{margin-inline:0}.\[\&_\.session-menu-btn\]\:-my-0\.5 .session-menu-btn{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-menu-btn\]\:hidden .session-menu-btn{display:none}.\[\&_\.session-menu-btn\]\:h-4 .session-menu-btn{height:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:w-4 .session-menu-btn{width:calc(var(--spacing) * 4)}.\[\&_\.session-menu-btn\]\:shrink-0 .session-menu-btn{flex-shrink:0}.\[\&_\.session-menu-btn\]\:items-center .session-menu-btn{align-items:center}.\[\&_\.session-menu-btn\]\:justify-center .session-menu-btn{justify-content:center}.\[\&_\.session-menu-btn\]\:rounded-sm .session-menu-btn{border-radius:6px}.\[\&_\.session-menu-btn\]\:text-muted .session-menu-btn{color:var(--muted)}.\[\&_\.session-menu-btn\:focus-visible\]\:inline-flex .session-menu-btn:focus-visible{display:inline-flex}.\[\&_\.session-menu-btn\:hover\]\:bg-panel .session-menu-btn:hover{background-color:var(--panel)}.\[\&_\.session-menu-btn\:hover\]\:text-text .session-menu-btn:hover{color:var(--text)}.\[\&_\.session-title\]\:min-w-0 .session-title{min-width:0}.\[\&_\.session-title\]\:flex-1 .session-title{flex:1}.\[\&_\.session-title\]\:overflow-hidden .session-title{overflow:hidden}.\[\&_\.session-title\]\:\[mask-image\:linear-gradient\(to_right\,black_calc\(100\%_-_16px\)\,transparent\)\] .session-title{-webkit-mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000);mask-image:linear-gradient(90deg,#000 calc(100% - 16px),#0000)}.\[\&_\.session-title\]\:whitespace-nowrap .session-title{white-space:nowrap}.\[\&_\.session-title-input\]\:mx-0 .session-title-input{margin-inline:0}.\[\&_\.session-title-input\]\:-my-0\.5 .session-title-input{margin-block:calc(var(--spacing) * -.5)}.\[\&_\.session-title-input\]\:min-w-0 .session-title-input{min-width:0}.\[\&_\.session-title-input\]\:flex-1 .session-title-input{flex:1}.\[\&_\.session-title-input\]\:rounded-sm .session-title-input{border-radius:6px}.\[\&_\.session-title-input\]\:border .session-title-input{border-style:var(--tw-border-style);border-width:1px}.\[\&_\.session-title-input\]\:border-primary .session-title-input{border-color:var(--primary)}.\[\&_\.session-title-input\]\:bg-background .session-title-input{background-color:var(--base)}.\[\&_\.session-title-input\]\:px-\[5px\] .session-title-input{padding-inline:5px}.\[\&_\.session-title-input\]\:py-px .session-title-input{padding-block:1px}.\[\&_\.session-title-input\]\:text-text .session-title-input{color:var(--text)}.\[\&_\.session-title-input\]\:outline-none .session-title-input{--tw-outline-style:none;outline-style:none}.\[\&_\.session-title-input\]\:\[font\:inherit\] .session-title-input{font:inherit}.\[\&_\.settings-card\]\:mb-0 .settings-card,.\[\&_\.settings-card-head\]\:mb-0 .settings-card-head{margin-bottom:0}.\[\&_\.settings-card-head\]\:justify-between .settings-card-head{justify-content:space-between}.\[\&_\.settings-card-head\]\:pb-3 .settings-card-head{padding-bottom:calc(var(--spacing) * 3)}.\[\&_\.settings-card-head_h3\]\:m-0 .settings-card-head h3{margin:0}.\[\&_\.settings-form\]\:mt-6 .settings-form{margin-top:calc(var(--spacing) * 6)}.\[\&_\.settings-form\]\:border-t-0 .settings-form{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\.settings-form\]\:pt-0 .settings-form{padding-top:0}.\[\&_\.settings-sub\]\:mb-3 .settings-sub{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\.skill-chip\]\:align-baseline .skill-chip{vertical-align:baseline}.\[\&_\.spinner\]\:h-5\.5 .spinner{height:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:w-5\.5 .spinner{width:calc(var(--spacing) * 5.5)}.\[\&_\.spinner\]\:border-\[3px\] .spinner{border-style:var(--tw-border-style);border-width:3px}.\[\&_\.stats\]\:flex .stats{display:flex}.\[\&_\.stats\]\:shrink-0 .stats{flex-shrink:0}.\[\&_\.stats\]\:items-center .stats{align-items:center}.\[\&_\.stats\]\:gap-2 .stats{gap:calc(var(--spacing) * 2)}.\[\&_\.stats\]\:font-mono .stats{font-family:var(--mono)}.\[\&_\.stats\]\:text-xs .stats{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\.stats\]\:font-medium .stats{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.stats\]\:tabular-nums .stats{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.\[\&_\.status-badge\]\:text-text .status-badge{color:var(--text)}.\[\&_\.tab-close\]\:inline-flex .tab-close{display:inline-flex}.\[\&_\.tab-close\]\:h-3\.5 .tab-close{height:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:w-3\.5 .tab-close{width:calc(var(--spacing) * 3.5)}.\[\&_\.tab-close\]\:shrink-0 .tab-close{flex-shrink:0}.\[\&_\.tab-close\]\:items-center .tab-close{align-items:center}.\[\&_\.tab-close\]\:justify-center .tab-close{justify-content:center}.\[\&_\.tab-close\]\:rounded-xs .tab-close{border-radius:4px}.\[\&_\.tab-close\]\:text-muted .tab-close{color:var(--muted)}.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_\.tab-close\:hover\]\:bg-hover-strong .tab-close:hover{background-color:color-mix(in oklab,var(--text) 15%,transparent)}}.\[\&_\.tab-close\:hover\]\:text-text .tab-close:hover{color:var(--text)}.\[\&_\.tab-label\]\:grid .tab-label{display:grid}.\[\&_\.tab-label\]\:min-w-0 .tab-label{min-width:0}.\[\&_\.tab-label\]\:grid-cols-\[minmax\(0\,_1fr\)\] .tab-label{grid-template-columns:minmax(0,1fr)}.\[\&_\.tab-label\]\:overflow-hidden .tab-label,.\[\&_\.tab-label_\>_span\]\:overflow-hidden .tab-label>span{overflow:hidden}.\[\&_\.tab-label_\>_span\]\:pe-1 .tab-label>span{padding-inline-end:var(--spacing)}.\[\&_\.tab-label_\>_span\]\:text-ellipsis .tab-label>span{text-overflow:ellipsis}.\[\&_\.tab-label_\>_span\]\:whitespace-nowrap .tab-label>span{white-space:nowrap}.\[\&_\.tab-label_\>_span\]\:\[grid-area\:1_\/_1\] .tab-label>span{grid-area:1/1}.\[\&_\.tab-label\:\:after\]\:invisible .tab-label:after{visibility:hidden}.\[\&_\.tab-label\:\:after\]\:overflow-hidden .tab-label:after{overflow:hidden}.\[\&_\.tab-label\:\:after\]\:pe-1 .tab-label:after{padding-inline-end:var(--spacing)}.\[\&_\.tab-label\:\:after\]\:font-medium .tab-label:after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.tab-label\:\:after\]\:text-ellipsis .tab-label:after{text-overflow:ellipsis}.\[\&_\.tab-label\:\:after\]\:whitespace-nowrap .tab-label:after{white-space:nowrap}.\[\&_\.tab-label\:\:after\]\:content-\[attr\(data-label\)\] .tab-label:after{--tw-content:attr(data-label);content:var(--tw-content)}.\[\&_\.tab-label\:\:after\]\:\[grid-area\:1_\/_1\] .tab-label:after{grid-area:1/1}.\[\&_\.title\]\:max-w-60 .title{max-width:calc(var(--spacing) * 60)}.\[\&_\.title\]\:overflow-hidden .title{overflow:hidden}.\[\&_\.title\]\:text-sm .title{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.title\]\:font-medium .title{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\.title\]\:text-ellipsis .title{text-overflow:ellipsis}.\[\&_\.title\]\:whitespace-nowrap .title{white-space:nowrap}.\[\&_\.unread-dot\]\:h-\[7px\] .unread-dot{height:7px}.\[\&_\.unread-dot\]\:w-\[7px\] .unread-dot{width:7px}.\[\&_\.unread-dot\]\:shrink-0 .unread-dot{flex-shrink:0}.\[\&_\.unread-dot\]\:rounded-full .unread-dot{border-radius:999px}.\[\&_\.unread-dot\]\:bg-primary .unread-dot{background-color:var(--primary)}.\[\&_\.v\]\:flex .v{display:flex}.\[\&_\.v\]\:min-w-0 .v{min-width:0}.\[\&_\.v\]\:flex-wrap .v{flex-wrap:wrap}.\[\&_\.v\]\:items-center .v{align-items:center}.\[\&_\.v\]\:gap-2 .v{gap:calc(var(--spacing) * 2)}.\[\&_\.v\]\:font-sans .v{font-family:var(--sans)}.\[\&_\.v\]\:text-base .v{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\.v\]\:text-sm .v{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\.v\]\:break-words .v{overflow-wrap:break-word}.\[\&_\.v\]\:break-all .v{word-break:break-all}.\[\&_\.v\]\:text-text .v{color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\]\:relative :where([data-tip]){position:relative}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:pointer-events-none :where([data-tip]):after{pointer-events:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:invisible :where([data-tip]):after{visibility:hidden}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:absolute :where([data-tip]):after{position:absolute}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:top-\[calc\(100\%_\+_6px\)\] :where([data-tip]):after{top:calc(100% + 6px)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:left-1\/2 :where([data-tip]):after{left:50%}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:z-\[9999\] :where([data-tip]):after{z-index:9999}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:w-max :where([data-tip]):after{width:max-content}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:max-w-none :where([data-tip]):after{max-width:none}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:-translate-x-1\/2 :where([data-tip]):after{--tw-translate-x: -50% ;translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:rounded-sm :where([data-tip]):after{border-radius:6px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:bg-text :where([data-tip]):after{background-color:var(--text)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:px-2 :where([data-tip]):after{padding-inline:calc(var(--spacing) * 2)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:py-\[5px\] :where([data-tip]):after{padding-block:5px}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-xs :where([data-tip]):after{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:leading-none :where([data-tip]):after{--tw-leading:1;line-height:1}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:font-medium :where([data-tip]):after{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:whitespace-nowrap :where([data-tip]):after{white-space:nowrap}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:text-background :where([data-tip]):after{color:var(--base)}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:opacity-0 :where([data-tip]):after{opacity:0}.\[\&_\:where\(\[data-tip\]\)\:\:after\]\:content-\[attr\(data-tip\)\] :where([data-tip]):after{--tw-content:attr(data-tip);content:var(--tw-content)}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:visible :where([data-tip]):is(:hover,:focus-visible):after{visibility:visible}.\[\&_\:where\(\[data-tip\]\)\:is\(\:hover\,\:focus-visible\)\:\:after\]\:opacity-100 :where([data-tip]):is(:hover,:focus-visible):after{opacity:1}.\[\&_\>_\*\:first-child\]\:mt-0>:first-child{margin-top:0}.\[\&_\>_\*\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_\.changes-note\]\:mx-4>.changes-note{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.changes-note\]\:my-3\.5>.changes-note{margin-block:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mx-4>.diff-explorer{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.diff-explorer\]\:mt-3\.5>.diff-explorer{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.diff-explorer\]\:mb-0>.diff-explorer{margin-bottom:0}.\[\&_\>_\.error\]\:mx-0>.error{margin-inline:0}.\[\&_\>_\.error\]\:mt-0>.error{margin-top:0}.\[\&_\>_\.error\]\:mt-3\.5>.error{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.error\]\:mb-3>.error{margin-bottom:calc(var(--spacing) * 3)}.\[\&_\>_\.error\]\:text-base>.error{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_\>_\.error\]\:whitespace-pre-wrap>.error{white-space:pre-wrap}.\[\&_\>_\.error\]\:text-accent-red>.error{color:var(--accent-red)}.\[\&_\>_\.openresearch-diff\]\:mx-4>.openresearch-diff{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.openresearch-diff\]\:mt-3\.5>.openresearch-diff{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.openresearch-diff\]\:mb-0>.openresearch-diff{margin-bottom:0}.\[\&_\>_\.project-default-row\:first-child\]\:border-t-0>.project-default-row:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&_\>_\.project-default-row\:first-child\]\:pt-0>.project-default-row:first-child{padding-top:0}.\[\&_\>_\.seg\]\:rounded-sm>.seg{border-radius:6px}.\[\&_\>_\.seg\]\:p-0\.5>.seg{padding:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:px-2>.seg button{padding-inline:calc(var(--spacing) * 2)}.\[\&_\>_\.seg_button\]\:py-0\.5>.seg button{padding-block:calc(var(--spacing) * .5)}.\[\&_\>_\.seg_button\]\:text-sm>.seg button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_\.seg_button\]\:font-medium>.seg button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_\>_\.truncated-notice\]\:mx-4>.truncated-notice{margin-inline:calc(var(--spacing) * 4)}.\[\&_\>_\.truncated-notice\]\:mt-3\.5>.truncated-notice{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\.truncated-notice\]\:mb-0>.truncated-notice{margin-bottom:0}.\[\&_\>_\:first-child\]\:mt-3\.5>:first-child{margin-top:calc(var(--spacing) * 3.5)}.\[\&_\>_\:last-child\]\:mb-0>:last-child{margin-bottom:0}.\[\&_\>_h2\]\:mx-0>h2{margin-inline:0}.\[\&_\>_h2\]\:mt-0>h2{margin-top:0}.\[\&_\>_h2\]\:mb-1\.5>h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_\>_h2\]\:text-xl>h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_\>_label\]\:gap-2>label{gap:calc(var(--spacing) * 2)}.\[\&_\>_p\]\:m-0>p{margin:0}.\[\&_\>_p\]\:text-sm>p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_\>_p\]\:leading-relaxed>p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_\>_p\]\:text-text>p{color:var(--text)}.\[\&_\>_span\]\:inline-flex>span{display:inline-flex}.\[\&_\>_span\]\:items-center>span{align-items:center}.\[\&_\>_span\]\:gap-\[5px\]>span{gap:5px}.\[\&_\>_svg\]\:shrink-0>svg{flex-shrink:0}.\[\&_\>_svg\]\:text-muted>svg{color:var(--muted)}.\[\&_\>_svg\]\:text-subtext>svg{color:var(--subtext)}.\[\&_\>_svg\.file-tree-chevron\]\:text-muted>svg.file-tree-chevron{color:var(--muted)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:start-auto [data-tip-align=end]:after{inset-inline-start:auto}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:end-0 [data-tip-align=end]:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'end\'\]\:\:after\]\:translate-none [data-tip-align=end]:after{translate:none}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:start-0 [data-tip-align=start]:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&_\[data-tip-align\=\'start\'\]\:\:after\]\:translate-none [data-tip-align=start]:after{translate:none}.\[\&_a\]\:text-sm a{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_a\]\:whitespace-nowrap a{white-space:nowrap}.\[\&_a\]\:text-primary a{color:var(--primary)}.\[\&_a\]\:text-subtext a{color:var(--subtext)}.\[\&_blockquote\]\:mx-0 blockquote{margin-inline:0}.\[\&_blockquote\]\:my-1\.5 blockquote{margin-block:calc(var(--spacing) * 1.5)}.\[\&_blockquote\]\:border-s-\[3px\] blockquote{border-inline-start-style:var(--tw-border-style);border-inline-start-width:3px}.\[\&_blockquote\]\:border-s-border blockquote{border-inline-start-color:var(--border)}.\[\&_blockquote\]\:ps-2\.5 blockquote{padding-inline-start:calc(var(--spacing) * 2.5)}.\[\&_blockquote\]\:pe-0 blockquote{padding-inline-end:0}.\[\&_blockquote\]\:pt-0\.5 blockquote{padding-top:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:pb-0\.5 blockquote{padding-bottom:calc(var(--spacing) * .5)}.\[\&_blockquote\]\:text-subtext blockquote{color:var(--subtext)}.\[\&_button\]\:absolute button{position:absolute}.\[\&_button\]\:-top-\[5px\] button{top:-5px}.\[\&_button\]\:-right-\[5px\] button{right:-5px}.\[\&_button\]\:flex button{display:flex}.\[\&_button\]\:grid button{display:grid}.\[\&_button\]\:inline-flex button{display:inline-flex}.\[\&_button\]\:h-4 button{height:calc(var(--spacing) * 4)}.\[\&_button\]\:w-4 button{width:calc(var(--spacing) * 4)}.\[\&_button\]\:w-full button{width:100%}.\[\&_button\]\:cursor-pointer button{cursor:pointer}.\[\&_button\]\:grid-cols-\[18px_minmax\(0\,_1fr\)_auto_auto\] button{grid-template-columns:18px minmax(0,1fr) auto auto}.\[\&_button\]\:grid-cols-\[minmax\(72px\,_0\.7fr\)_minmax\(100px\,_1fr\)_minmax\(70px\,_0\.7fr\)_60px_16px\] button{grid-template-columns:minmax(72px,.7fr) minmax(100px,1fr) minmax(70px,.7fr) 60px 16px}.\[\&_button\]\:flex-col button{flex-direction:column}.\[\&_button\]\:items-center button{align-items:center}.\[\&_button\]\:items-start button{align-items:flex-start}.\[\&_button\]\:justify-center button{justify-content:center}.\[\&_button\]\:gap-0\.5 button{gap:calc(var(--spacing) * .5)}.\[\&_button\]\:gap-3\.5 button{gap:calc(var(--spacing) * 3.5)}.\[\&_button\]\:gap-\[7px\] button{gap:7px}.\[\&_button\]\:rounded-full button{border-radius:999px}.\[\&_button\]\:rounded-sm button{border-radius:6px}.\[\&_button\]\:rounded-xs button{border-radius:4px}.\[\&_button\]\:border button{border-style:var(--tw-border-style);border-width:1px}.\[\&_button\]\:border-0 button{border-style:var(--tw-border-style);border-width:0}.\[\&_button\]\:border-b button{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_button\]\:border-border button{border-color:var(--border)}.\[\&_button\]\:border-b-border-variant button{border-bottom-color:var(--border-variant)}.\[\&_button\]\:bg-surface button{background-color:var(--surface)}.\[\&_button\]\:bg-transparent button{background-color:#0000}.\[\&_button\]\:bg-none button{background-image:none}.\[\&_button\]\:p-0 button{padding:0}.\[\&_button\]\:p-0\.5 button{padding:calc(var(--spacing) * .5)}.\[\&_button\]\:px-0 button{padding-inline:0}.\[\&_button\]\:px-0\.5 button{padding-inline:calc(var(--spacing) * .5)}.\[\&_button\]\:px-2 button{padding-inline:calc(var(--spacing) * 2)}.\[\&_button\]\:px-2\.5 button{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_button\]\:px-3 button{padding-inline:calc(var(--spacing) * 3)}.\[\&_button\]\:px-\[9px\] button{padding-inline:9px}.\[\&_button\]\:py-0\.5 button{padding-block:calc(var(--spacing) * .5)}.\[\&_button\]\:py-2 button{padding-block:calc(var(--spacing) * 2)}.\[\&_button\]\:py-\[3px\] button{padding-block:3px}.\[\&_button\]\:py-\[11px\] button{padding-block:11px}.\[\&_button\]\:text-start button{text-align:start}.\[\&_button\]\:text-sm button{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_button\]\:font-medium button{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_button\]\:text-muted button{color:var(--muted)}.\[\&_button\]\:text-text button{color:var(--text)}.\[\&_button\]\:\[font\:inherit\] button{font:inherit}.\[\&_button\.active\]\:bg-background button.active{background-color:var(--base)}.\[\&_button\.active\]\:bg-surface button.active{background-color:var(--surface)}.\[\&_button\.active\]\:shadow-diff-active button.active{--tw-shadow:inset 2px 0 0 var(--tw-shadow-color,var(--text));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&_button\.active\]\:shadow-segment button.active{--tw-shadow:0 1px 3px var(--tw-shadow-color,color-mix(in oklab, var(--text) 25%, transparent))}}.\[\&_button\.active\]\:shadow-segment button.active{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&_button\:disabled\]\:cursor-default button:disabled{cursor:default}.\[\&_button\:disabled\]\:text-muted button:disabled{color:var(--muted)}.\[\&_button\:hover\]\:bg-panel button:hover{background-color:var(--panel)}.\[\&_button\:hover\]\:bg-surface button:hover{background-color:var(--surface)}.\[\&_button\:hover\]\:bg-text button:hover{background-color:var(--text)}.\[\&_button\:hover\]\:text-background button:hover{color:var(--base)}.\[\&_button\:hover\]\:text-text button:hover{color:var(--text)}.\[\&_button\:hover\]\:underline button:hover{text-decoration-line:underline}.\[\&_button\:hover\]\:underline-offset-2 button:hover{text-underline-offset:2px}.\[\&_button\:last-child\]\:border-b-0 button:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_button\:not\(\:disabled\)\:hover\]\:text-text button:not(:disabled):hover{color:var(--text)}.\[\&_code\]\:min-w-0 code{min-width:0}.\[\&_code\]\:overflow-hidden code{overflow:hidden}.\[\&_code\]\:rounded-xs code{border-radius:4px}.\[\&_code\]\:border code{border-style:var(--tw-border-style);border-width:1px}.\[\&_code\]\:border-border-variant code{border-color:var(--border-variant)}.\[\&_code\]\:bg-panel code{background-color:var(--panel)}.\[\&_code\]\:px-\[5px\] code{padding-inline:5px}.\[\&_code\]\:py-px code{padding-block:1px}.\[\&_code\]\:font-mono code{font-family:var(--mono)}.\[\&_code\]\:text-sm code{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_code\]\:text-xs code{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.\[\&_code\]\:font-medium code{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_code\]\:text-ellipsis code{text-overflow:ellipsis}.\[\&_code\]\:whitespace-nowrap code{white-space:nowrap}.\[\&_code\]\:whitespace-pre-wrap code{white-space:pre-wrap}.\[\&_code\]\:text-primary code{color:var(--primary)}.\[\&_code\]\:text-text code{color:var(--text)}.\[\&_h1\]\:m-0 h1{margin:0}.\[\&_h1\]\:mx-0 h1{margin-inline:0}.\[\&_h1\]\:mt-0 h1{margin-top:0}.\[\&_h1\]\:mt-3 h1{margin-top:calc(var(--spacing) * 3)}.\[\&_h1\]\:mt-7 h1{margin-top:calc(var(--spacing) * 7)}.\[\&_h1\]\:mb-1\.5 h1{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h1\]\:mb-3\.5 h1{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h1\]\:text-3xl h1{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h1\]\:text-4xl h1{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h1\]\:text-xl h1{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h1\]\:text-prose-emphasis h1{font-size:1.05em}.\[\&_h1\]\:leading-\[1\.18\] h1{--tw-leading:1.18;line-height:1.18}.\[\&_h1\]\:leading-tight h1{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h1\]\:font-semibold h1{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h1\]\:text-text h1{color:var(--text)}.\[\&_h2\]\:m-0 h2{margin:0}.\[\&_h2\]\:mx-0 h2{margin-inline:0}.\[\&_h2\]\:mt-0 h2{margin-top:0}.\[\&_h2\]\:mt-3 h2{margin-top:calc(var(--spacing) * 3)}.\[\&_h2\]\:mt-7 h2{margin-top:calc(var(--spacing) * 7)}.\[\&_h2\]\:mb-1\.5 h2{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h2\]\:mb-2\.5 h2{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h2\]\:mb-3\.5 h2{margin-bottom:calc(var(--spacing) * 3.5)}.\[\&_h2\]\:flex h2{display:flex}.\[\&_h2\]\:items-center h2{align-items:center}.\[\&_h2\]\:gap-2 h2{gap:calc(var(--spacing) * 2)}.\[\&_h2\]\:text-3xl h2{font-size:var(--text-3xl);line-height:var(--tw-leading,var(--text-3xl--line-height))}.\[\&_h2\]\:text-4xl h2{font-size:var(--text-4xl);line-height:var(--tw-leading,var(--text-4xl--line-height))}.\[\&_h2\]\:text-5xl h2{font-size:var(--text-5xl);line-height:var(--tw-leading,var(--text-5xl--line-height))}.\[\&_h2\]\:text-lg h2{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h2\]\:text-sm h2{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h2\]\:text-xl h2{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h2\]\:text-prose-emphasis h2{font-size:1.05em}.\[\&_h2\]\:leading-tight h2{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.\[\&_h2\]\:font-medium h2{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_h2\]\:font-semibold h2{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h2\]\:tracking-\[-0\.02em\] h2{--tw-tracking:-.02em;letter-spacing:-.02em}.\[\&_h2\]\:tracking-\[-0\.015em\] h2{--tw-tracking:-.015em;letter-spacing:-.015em}.\[\&_h2\]\:text-text h2{color:var(--text)}.\[\&_h3\]\:mx-0 h3{margin-inline:0}.\[\&_h3\]\:mt-0 h3{margin-top:0}.\[\&_h3\]\:mt-3 h3{margin-top:calc(var(--spacing) * 3)}.\[\&_h3\]\:mt-5\.5 h3{margin-top:calc(var(--spacing) * 5.5)}.\[\&_h3\]\:mb-1\.5 h3{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h3\]\:mb-2 h3{margin-bottom:calc(var(--spacing) * 2)}.\[\&_h3\]\:mb-2\.5 h3{margin-bottom:calc(var(--spacing) * 2.5)}.\[\&_h3\]\:mb-3 h3{margin-bottom:calc(var(--spacing) * 3)}.\[\&_h3\]\:text-base h3{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_h3\]\:text-xl h3{font-size:var(--text-xl);line-height:var(--tw-leading,var(--text-xl--line-height))}.\[\&_h3\]\:text-prose-emphasis h3{font-size:1.05em}.\[\&_h3\]\:leading-\[1\.35\] h3{--tw-leading:1.35;line-height:1.35}.\[\&_h3\]\:font-semibold h3{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h3\]\:text-text h3{color:var(--text)}.\[\&_h4\]\:mx-0 h4{margin-inline:0}.\[\&_h4\]\:mt-0 h4{margin-top:0}.\[\&_h4\]\:mt-3 h4{margin-top:calc(var(--spacing) * 3)}.\[\&_h4\]\:mt-4\.5 h4{margin-top:calc(var(--spacing) * 4.5)}.\[\&_h4\]\:mb-1 h4{margin-bottom:var(--spacing)}.\[\&_h4\]\:mb-1\.5 h4{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_h4\]\:text-lg h4{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_h4\]\:text-sm h4{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_h4\]\:text-prose-emphasis h4{font-size:1.05em}.\[\&_h4\]\:leading-\[1\.4\] h4{--tw-leading:1.4;line-height:1.4}.\[\&_h4\]\:font-semibold h4{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_h4\]\:text-accent-amber h4{color:var(--accent-amber)}.\[\&_h4\]\:text-text h4{color:var(--text)}.\[\&_img\]\:mx-auto img{margin-inline:auto}.\[\&_img\]\:my-0 img{margin-block:0}.\[\&_img\]\:block img{display:block}.\[\&_img\]\:h-13 img{height:calc(var(--spacing) * 13)}.\[\&_img\]\:h-auto img{height:auto}.\[\&_img\]\:max-h-40 img{max-height:calc(var(--spacing) * 40)}.\[\&_img\]\:max-h-\[min\(480px\,60vh\)\] img{max-height:min(480px,60vh)}.\[\&_img\]\:w-13 img{width:calc(var(--spacing) * 13)}.\[\&_img\]\:w-auto img{width:auto}.\[\&_img\]\:max-w-55 img{max-width:calc(var(--spacing) * 55)}.\[\&_img\]\:max-w-full img{max-width:100%}.\[\&_img\]\:rounded-none img{border-radius:0}.\[\&_img\]\:rounded-sm img{border-radius:6px}.\[\&_img\]\:rounded-xs img{border-radius:4px}.\[\&_img\]\:border img{border-style:var(--tw-border-style);border-width:1px}.\[\&_img\]\:border-0 img{border-style:var(--tw-border-style);border-width:0}.\[\&_img\]\:border-border img{border-color:var(--border)}.\[\&_img\]\:border-border-variant img{border-color:var(--border-variant)}.\[\&_img\]\:object-contain img{object-fit:contain}.\[\&_img\]\:object-cover img{object-fit:cover}.\[\&_input\]\:m-0 input{margin:0}.\[\&_input\]\:w-full input{width:100%}.\[\&_input\]\:min-w-55 input{min-width:calc(var(--spacing) * 55)}.\[\&_input\]\:flex-1 input{flex:1}.\[\&_input\]\:rounded-none input{border-radius:0}.\[\&_input\]\:border-0 input{border-style:var(--tw-border-style);border-width:0}.\[\&_input\]\:border-b input{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_input\]\:border-b-border-variant input{border-bottom-color:var(--border-variant)}.\[\&_input\]\:bg-transparent input{background-color:#0000}.\[\&_input\]\:bg-none input{background-image:none}.\[\&_input\]\:px-2\.5 input{padding-inline:calc(var(--spacing) * 2.5)}.\[\&_input\]\:py-2 input{padding-block:calc(var(--spacing) * 2)}.\[\&_input\]\:font-sans input{font-family:var(--sans)}.\[\&_input\]\:text-sm input{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_input\]\:font-normal input{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_input\]\:text-text input{color:var(--text)}.\[\&_input\]\:outline-none input{--tw-outline-style:none;outline-style:none}.\[\&_input\:\:placeholder\]\:text-subtext input::placeholder{color:var(--subtext)}.\[\&_label\]\:flex label{display:flex}.\[\&_label\]\:flex-col label{flex-direction:column}.\[\&_label\]\:gap-1 label{gap:var(--spacing)}.\[\&_label\]\:text-sm label{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_label\]\:font-medium label{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_label\]\:text-text label{color:var(--text)}.\[\&_legend\]\:mb-1\.5 legend{margin-bottom:calc(var(--spacing) * 1.5)}.\[\&_legend\]\:text-base legend{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_legend\]\:font-medium legend{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_li\:\:marker\]\:text-primary li::marker{color:var(--primary)}.\[\&_ol\]\:mx-0 ol{margin-inline:0}.\[\&_ol\]\:my-1\.5 ol{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ol\]\:ps-5\.5 ol{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&_p\]\:m-0 p{margin:0}.\[\&_p\]\:mx-0 p{margin-inline:0}.\[\&_p\]\:my-2\.5 p{margin-block:calc(var(--spacing) * 2.5)}.\[\&_p\]\:mt-\[3px\] p{margin-top:3px}.\[\&_p\]\:mb-0 p{margin-bottom:0}.\[\&_p\]\:max-w-80 p{max-width:calc(var(--spacing) * 80)}.\[\&_p\]\:max-w-\[46ch\] p{max-width:46ch}.\[\&_p\]\:text-sm p{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_p\]\:leading-normal p{--tw-leading:var(--leading-normal);line-height:var(--leading-normal)}.\[\&_p\]\:leading-relaxed p{--tw-leading:var(--leading-relaxed);line-height:var(--leading-relaxed)}.\[\&_p\]\:text-balance p{text-wrap:balance}.\[\&_p\]\:text-subtext p{color:var(--subtext)}.\[\&_p\]\:text-text p{color:var(--text)}.\[\&_p_\+_p\]\:mt-3 p+p{margin-top:calc(var(--spacing) * 3)}.\[\&_p\.empty-state-hint\]\:text-lg p.empty-state-hint{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.\[\&_p\.empty-state-hint\]\:text-subtext p.empty-state-hint{color:var(--subtext)}.\[\&_p\.empty-state-title\]\:text-2xl p.empty-state-title{font-size:var(--text-2xl);line-height:var(--tw-leading,var(--text-2xl--line-height))}.\[\&_p\.empty-state-title\]\:font-normal p.empty-state-title{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_p\.empty-state-title\]\:text-text p.empty-state-title{color:var(--text)}.\[\&_pre\]\:m-0 pre{margin:0}.\[\&_pre\]\:overflow-x-auto pre{overflow-x:auto}.\[\&_pre\]\:rounded-md pre{border-radius:8px}.\[\&_pre\]\:border pre{border-style:var(--tw-border-style);border-width:1px}.\[\&_pre\]\:border-border-muted pre{border-color:var(--border)}@supports (color:color-mix(in lab,red,red)){.\[\&_pre\]\:border-border-muted pre{border-color:color-mix(in oklab,var(--border) 50%,transparent)}}.\[\&_pre\]\:bg-surface pre{background-color:var(--surface)}.\[\&_pre\]\:px-3 pre{padding-inline:calc(var(--spacing) * 3)}.\[\&_pre\]\:py-2 pre{padding-block:calc(var(--spacing) * 2)}.\[\&_pre\]\:text-sm pre{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_pre\]\:text-text pre{color:var(--text)}.\[\&_pre_code\]\:border-0 pre code{border-style:var(--tw-border-style);border-width:0}.\[\&_pre_code\]\:bg-transparent pre code{background-color:#0000}.\[\&_pre_code\]\:bg-none pre code{background-image:none}.\[\&_pre_code\]\:p-0 pre code{padding:0}.\[\&_pre_code\]\:font-normal pre code{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_pre_code\]\:text-inherit pre code{color:inherit}.\[\&_select\]\:font-sans select{font-family:var(--sans)}.\[\&_select\]\:text-sm select{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_select\]\:font-normal select{--tw-font-weight:var(--font-weight-normal);font-weight:var(--font-weight-normal)}.\[\&_select\]\:text-text select{color:var(--text)}.\[\&_span\]\:absolute span{position:absolute}.\[\&_span\]\:start-\[3px\] span{inset-inline-start:3px}.\[\&_span\]\:top-\[3px\] span{top:3px}.\[\&_span\]\:h-3\.5 span{height:calc(var(--spacing) * 3.5)}.\[\&_span\]\:w-3\.5 span{width:calc(var(--spacing) * 3.5)}.\[\&_span\]\:translate-x-4 span{--tw-translate-x:calc(var(--spacing) * 4);translate:var(--tw-translate-x) var(--tw-translate-y)}.\[\&_span\]\:overflow-hidden span{overflow:hidden}.\[\&_span\]\:rounded-full span{border-radius:999px}.\[\&_span\]\:bg-background span{background-color:var(--base)}.\[\&_span\]\:bg-muted span{background-color:var(--muted)}.\[\&_span\]\:text-ellipsis span{text-overflow:ellipsis}.\[\&_span\]\:whitespace-nowrap span{white-space:nowrap}.\[\&_span\]\:transition-\[translate\,background\] span{transition-property:translate,background;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_span\]\:duration-120 span{--tw-duration:.12s;transition-duration:.12s}.\[\&_span\]\:ease-standard span{--tw-ease:ease;transition-timing-function:ease}.\[\&_strong\]\:font-medium strong{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_strong\]\:font-semibold strong{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.\[\&_strong\]\:text-accent-amber strong{color:var(--accent-amber)}.\[\&_strong\]\:text-text strong{color:var(--text)}.\[\&_summary\]\:flex summary{display:flex}.\[\&_summary\]\:w-fit summary{width:fit-content}.\[\&_summary\]\:max-w-full summary{max-width:100%}.\[\&_summary\]\:cursor-pointer summary{cursor:pointer}.\[\&_summary\]\:list-none summary{list-style-type:none}.\[\&_summary\]\:items-center summary{align-items:center}.\[\&_summary\]\:gap-2 summary{gap:calc(var(--spacing) * 2)}.\[\&_summary\]\:rounded-sm summary{border-radius:6px}.\[\&_summary\]\:px-1 summary{padding-inline:var(--spacing)}.\[\&_summary\]\:py-\[3px\] summary{padding-block:3px}.\[\&_summary\]\:select-none summary{-webkit-user-select:none;user-select:none}.\[\&_summary_\.plan-chevron\]\:transition-transform summary .plan-chevron{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary_\.plan-chevron\]\:duration-120 summary .plan-chevron{--tw-duration:.12s;transition-duration:.12s}.\[\&_summary_\.plan-chevron\]\:ease-standard summary .plan-chevron{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:-webkit-details-marker\]\:hidden summary::-webkit-details-marker{display:none}.\[\&_summary\:\:after\]\:text-muted summary:after{color:var(--muted)}.\[\&_summary\:\:after\]\:transition-transform summary:after{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.\[\&_summary\:\:after\]\:duration-80 summary:after{--tw-duration:80ms;transition-duration:80ms}.\[\&_summary\:\:after\]\:ease-standard summary:after{--tw-ease:ease;transition-timing-function:ease}.\[\&_summary\:\:after\]\:content-\[\'›\'\] summary:after{--tw-content:"›";content:var(--tw-content)}.\[\&_summary\:hover\]\:bg-surface summary:hover{background-color:var(--surface)}.\[\&_svg\]\:block svg{display:block}.\[\&_svg\]\:h-\[1em\] svg{height:1em}.\[\&_svg\]\:h-full svg{height:100%}.\[\&_svg\]\:w-\[1em\] svg{width:1em}.\[\&_svg\]\:w-full svg{width:100%}.\[\&_svg\]\:flex-none svg{flex:none}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_svg\]\:text-muted svg{color:var(--muted)}.\[\&_table\]\:mx-0 table{margin-inline:0}.\[\&_table\]\:my-2\.5 table{margin-block:calc(var(--spacing) * 2.5)}.\[\&_table\]\:block table{display:block}.\[\&_table\]\:w-max table{width:max-content}.\[\&_table\]\:max-w-full table{max-width:100%}.\[\&_table\]\:border-collapse table{border-collapse:collapse}.\[\&_table\]\:overflow-x-auto table{overflow-x:auto}.\[\&_table\]\:rounded-md table{border-radius:8px}.\[\&_table\]\:border table{border-style:var(--tw-border-style);border-width:1px}.\[\&_table\]\:border-border table{border-color:var(--border)}.\[\&_table\]\:text-sm table{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_tbody_tr\:hover_td\]\:bg-surface-bright tbody tr:hover td{background-color:var(--surface-bright)}.\[\&_td\]\:h-12 td{height:calc(var(--spacing) * 12)}.\[\&_td\]\:border-b td{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_td\]\:border-b-border-variant td{border-bottom-color:var(--border-variant)}.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&_td\]\:border-b-divider-faint td{border-bottom-color:color-mix(in oklab,var(--text) 6%,transparent)}}.\[\&_td\]\:px-3 td{padding-inline:calc(var(--spacing) * 3)}.\[\&_td\]\:px-3\.5 td{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_td\]\:py-2 td{padding-block:calc(var(--spacing) * 2)}.\[\&_td\]\:ps-0 td{padding-inline-start:0}.\[\&_td\]\:pe-2\.5 td{padding-inline-end:calc(var(--spacing) * 2.5)}.\[\&_td\]\:pt-0 td{padding-top:0}.\[\&_td\]\:pb-0 td{padding-bottom:0}.\[\&_td\]\:text-start td{text-align:start}.\[\&_td\]\:align-middle td{vertical-align:middle}.\[\&_td\]\:break-normal td{overflow-wrap:normal;word-break:normal}.\[\&_td\]\:break-words td{overflow-wrap:break-word}.\[\&_td\]\:whitespace-nowrap td{white-space:nowrap}.\[\&_td\]\:text-text td{color:var(--text)}.\[\&_td\:first-child\]\:w-\[32\%\] td:first-child{width:32%}.\[\&_td\:first-child\]\:wrap-anywhere td:first-child{overflow-wrap:anywhere}.\[\&_td\:last-child\]\:w-29 td:last-child{width:calc(var(--spacing) * 29)}.\[\&_td\:last-child\]\:text-end td:last-child{text-align:end}.\[\&_td\:last-child\]\:whitespace-nowrap td:last-child{white-space:nowrap}.\[\&_td\[colspan\]\]\:text-start td[colspan]{text-align:start}.\[\&_td\[colspan\]\]\:whitespace-normal td[colspan]{white-space:normal}.\[\&_textarea\]\:field-sizing-content textarea{field-sizing:content}.\[\&_textarea\]\:max-h-45 textarea{max-height:calc(var(--spacing) * 45)}.\[\&_textarea\]\:min-h-18 textarea{min-height:calc(var(--spacing) * 18)}.\[\&_textarea\]\:flex-1 textarea{flex:1}.\[\&_textarea\]\:resize-none textarea{resize:none}.\[\&_textarea\]\:border-0 textarea{border-style:var(--tw-border-style);border-width:0}.\[\&_textarea\]\:bg-transparent textarea{background-color:#0000}.\[\&_textarea\]\:bg-none textarea{background-image:none}.\[\&_textarea\]\:px-3 textarea{padding-inline:calc(var(--spacing) * 3)}.\[\&_textarea\]\:pt-2\.5 textarea{padding-top:calc(var(--spacing) * 2.5)}.\[\&_textarea\]\:pb-1 textarea{padding-bottom:var(--spacing)}.\[\&_textarea\]\:font-mono textarea{font-family:var(--mono)}.\[\&_textarea\]\:text-base textarea{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.\[\&_textarea\]\:text-sm textarea{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:sticky th{position:sticky}.\[\&_th\]\:top-0 th{top:0}.\[\&_th\]\:z-1 th{z-index:1}.\[\&_th\]\:border-b th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_th\]\:border-b-border th{border-bottom-color:var(--border)}.\[\&_th\]\:border-b-border-variant th{border-bottom-color:var(--border-variant)}.\[\&_th\]\:bg-background th{background-color:var(--base)}.\[\&_th\]\:px-3 th{padding-inline:calc(var(--spacing) * 3)}.\[\&_th\]\:px-3\.5 th{padding-inline:calc(var(--spacing) * 3.5)}.\[\&_th\]\:py-2 th{padding-block:calc(var(--spacing) * 2)}.\[\&_th\]\:text-start th{text-align:start}.\[\&_th\]\:text-sm th{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.\[\&_th\]\:font-medium th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_th\]\:break-normal th{overflow-wrap:normal;word-break:normal}.\[\&_th\]\:break-words th{overflow-wrap:break-word}.\[\&_th\]\:text-text th{color:var(--text)}.\[\&_thead_th\]\:border-b thead th{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&_thead_th\]\:border-b-border thead th{border-bottom-color:var(--border)}.\[\&_thead_th\]\:bg-surface thead th{background-color:var(--surface)}.\[\&_thead_th\]\:font-medium thead th{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&_thead_th\]\:text-text thead th{color:var(--text)}.\[\&_tr\.clickable\]\:cursor-pointer tr.clickable{cursor:pointer}.\[\&_tr\.clickable\:hover_td\]\:bg-canvas tr.clickable:hover td{background-color:var(--canvas)}.\[\&_tr\:last-child_td\]\:border-b-0 tr:last-child td{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&_ul\]\:mx-0 ul{margin-inline:0}.\[\&_ul\]\:my-1\.5 ul{margin-block:calc(var(--spacing) * 1.5)}.\[\&_ul\]\:ps-5\.5 ul{padding-inline-start:calc(var(--spacing) * 5.5)}.\[\&\+\&\]\:border-t+.\[\&\+\&\]\:border-t{border-top-style:var(--tw-border-style);border-top-width:1px}.\[\&\+\&\]\:border-border-variant+.\[\&\+\&\]\:border-border-variant{border-color:var(--border-variant)}.\[\&\.active\]\:border-border.active{border-color:var(--border)}.\[\&\.active\]\:bg-background.active{background-color:var(--base)}.\[\&\.active\]\:bg-hover-muted.active{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\.active\]\:bg-hover-muted.active{background-color:color-mix(in oklab,var(--text) 8%,transparent)}}.\[\&\.active\]\:bg-panel.active{background-color:var(--panel)}.\[\&\.active\]\:bg-surface.active{background-color:var(--surface)}.\[\&\.active\]\:font-medium.active{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.\[\&\.active\]\:text-muted.active{color:var(--muted)}.\[\&\.active\]\:text-primary.active{color:var(--primary)}.\[\&\.active\]\:text-text.active{color:var(--text)}.\[\&\.active\:\:after\]\:absolute.active:after{position:absolute}.\[\&\.active\:\:after\]\:start-0.active:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:end-0.active:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.active\:\:after\]\:-bottom-px.active:after{bottom:-1px}.\[\&\.active\:\:after\]\:h-px.active:after{height:1px}.\[\&\.active\:\:after\]\:bg-background.active:after{background-color:var(--base)}.\[\&\.active\:\:after\]\:content-\[\'\'\].active:after{--tw-content:"";content:var(--tw-content)}.\[\&\.align-right\]\:start-auto.align-right{inset-inline-start:auto}.\[\&\.align-right\]\:end-0.align-right{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\.approved\]\:text-accent-green.approved{color:var(--accent-green)}.\[\&\.approved\:\:before\]\:content-\[\'✓_\'\].approved:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.archive\]\:text-accent-amber.archive{color:var(--accent-amber)}.\[\&\.chosen\]\:text-accent-green.chosen{color:var(--accent-green)}.\[\&\.chosen\:\:before\]\:content-\[\'✓_\'\].chosen:before{--tw-content:"✓ ";content:var(--tw-content)}.\[\&\.clamped\]\:relative.clamped{position:relative}.\[\&\.clamped\]\:max-h-\[9\.5em\].clamped{max-height:9.5em}.\[\&\.clamped\]\:overflow-hidden.clamped{overflow:hidden}.\[\&\.clamped\:\:after\]\:pointer-events-none.clamped:after{pointer-events:none}.\[\&\.clamped\:\:after\]\:absolute.clamped:after{position:absolute}.\[\&\.clamped\:\:after\]\:inset-x-0.clamped:after{inset-inline:0}.\[\&\.clamped\:\:after\]\:top-auto.clamped:after{top:auto}.\[\&\.clamped\:\:after\]\:bottom-0.clamped:after{bottom:0}.\[\&\.clamped\:\:after\]\:h-8\.5.clamped:after{height:calc(var(--spacing) * 8.5)}.\[\&\.clamped\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_transparent\,_var\(--surface\)\)\].clamped:after{background-image:linear-gradient(to bottom,transparent,var(--surface))}.\[\&\.clamped\:\:after\]\:content-\[\'\'\].clamped:after{--tw-content:"";content:var(--tw-content)}.\[\&\.closable\]\:max-w-60.closable{max-width:calc(var(--spacing) * 60)}.\[\&\.closable\]\:pe-0\.5.closable{padding-inline-end:calc(var(--spacing) * .5)}.\[\&\.code\]\:text-accent-orange.code{color:var(--accent-orange)}.\[\&\.doc\]\:px-7.doc{padding-inline:calc(var(--spacing) * 7)}.\[\&\.doc\]\:pt-4\.5.doc{padding-top:calc(var(--spacing) * 4.5)}.\[\&\.doc\]\:pb-12.doc{padding-bottom:calc(var(--spacing) * 12)}.\[\&\.doc_\.artifact-md\]\:mx-auto.doc .artifact-md{margin-inline:auto}.\[\&\.doc_\.artifact-md\]\:my-0.doc .artifact-md{margin-block:0}.\[\&\.doc_\.artifact-md\]\:max-w-readable.doc .artifact-md{max-width:var(--readable-col)}.\[\&\.document\]\:text-subtext.document{color:var(--subtext)}.\[\&\.drop-down\]\:top-\[calc\(100\%_\+_4px\)\].drop-down{top:calc(100% + 4px)}.\[\&\.drop-down\]\:bottom-auto.drop-down{bottom:auto}.\[\&\.editing\]\:cursor-default.editing{cursor:default}.\[\&\.editing\]\:bg-surface.editing{background-color:var(--surface)}.\[\&\.editing_\.session-dot\]\:hidden.editing .session-dot,.\[\&\.editing_\.session-menu-btn\]\:hidden.editing .session-menu-btn{display:none}.\[\&\.err\]\:bg-accent-red.err{background-color:var(--accent-red)}.\[\&\.expanded_\.diff-file-header\]\:border-b.expanded .diff-file-header{border-bottom-style:var(--tw-border-style);border-bottom-width:1px}.\[\&\.expanded_\.diff-file-header\]\:border-b-border.expanded .diff-file-header{border-bottom-color:var(--border)}.\[\&\.fail\]\:border-\[1\.5px\].fail{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.fail\]\:border-danger-outline.fail{border-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\.fail\]\:border-danger-outline.fail{border-color:color-mix(in oklab,var(--accent-red) 55%,transparent)}}.\[\&\.failed\]\:text-accent-red.failed{color:var(--accent-red)}.\[\&\.image\]\:text-accent-purple.image{color:var(--accent-purple)}.\[\&\.live\]\:animate-\[or-pulse_1\.2s_ease-in-out_infinite\].live{animation:1.2s ease-in-out infinite or-pulse}.\[\&\.live\]\:border-accent-teal.live{border-color:var(--accent-teal)}.\[\&\.live\]\:bg-accent-teal.live{background-color:var(--accent-teal)}.\[\&\.live\]\:shadow-tree-live.live{--tw-shadow:0 2px 12px var(--tw-shadow-color,#209a8433);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.markdown\]\:text-accent-blue.markdown{color:var(--accent-blue)}.\[\&\.max\]\:fixed.max{position:fixed}.\[\&\.max\]\:inset-2\.5.max{inset:calc(var(--spacing) * 2.5)}.\[\&\.max\]\:z-60.max{z-index:60}.\[\&\.max\]\:m-0.max{margin:0}.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,var(--text))}@supports (color:color-mix(in lab,red,red)){.\[\&\.max\]\:shadow-panel-max.max{--tw-shadow:0 12px 40px var(--tw-shadow-color,color-mix(in oklab, var(--text) 22%, transparent))}}.\[\&\.max\]\:shadow-panel-max.max{box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.mac-titlebar\:\[\&\.max\]\:top-8:where(.mac-titlebar *).max{top:calc(var(--spacing) * 8)}.win-titlebar\:\[\&\.max\]\:top-10:where(.win-titlebar *).max{top:calc(var(--spacing) * 10)}.\[\&\.menu-open_\.session-dot\]\:hidden.menu-open .session-dot{display:none}.\[\&\.menu-open_\.session-menu-btn\]\:inline-flex.menu-open .session-menu-btn{display:inline-flex}.\[\&\.muted\]\:text-muted.muted{color:var(--muted)}.\[\&\.ok\]\:bg-accent-green.ok{background-color:var(--accent-green)}.\[\&\.on\]\:bg-primary.on{background-color:var(--primary)}.\[\&\.on\]\:text-background.on{color:var(--base)}.\[\&\.open\]\:rotate-90.open{rotate:90deg}.\[\&\.other\]\:border-\[1\.5px\].other{border-style:var(--tw-border-style);border-width:1.5px}.\[\&\.other\]\:border-border.other{border-color:var(--border)}.\[\&\.pass\]\:bg-accent-green.pass{background-color:var(--accent-green)}.\[\&\.pdf\]\:text-accent-red.pdf{color:var(--accent-red)}.\[\&\.permission\]\:border-s-accent-amber.permission{border-inline-start-color:var(--accent-amber)}.\[\&\.plan\]\:border-s-accent-blue.plan{border-inline-start-color:var(--accent-blue)}.\[\&\.question\]\:border-s-accent-purple.question{border-inline-start-color:var(--accent-purple)}.\[\&\.readonly\]\:opacity-60.readonly{opacity:.6}.\[\&\.rejected\]\:text-accent-amber.rejected,.\[\&\.revised\]\:text-accent-amber.revised{color:var(--accent-amber)}.\[\&\.sel\]\:border-primary.sel{border-color:var(--primary)}.\[\&\.sel\]\:bg-primary-subtle.sel{background-color:var(--primary-subtle)}.\[\&\.selected\]\:border-accent.selected{border-color:var(--accent)}.\[\&\.selected\]\:bg-panel.selected{background-color:var(--panel)}.\[\&\.selected\]\:shadow-selected.selected{--tw-shadow:0 0 0 1px var(--tw-shadow-color,var(--accent));box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\.selected\:hover\]\:bg-panel.selected:hover{background-color:var(--panel)}.\[\&\.session-menu\]\:start-auto.session-menu{inset-inline-start:auto}.\[\&\.session-menu\]\:end-1\.5.session-menu{inset-inline-end:calc(var(--spacing) * 1.5)}.\[\&\.session-menu\]\:top-\[calc\(100\%_-_2px\)\].session-menu{top:calc(100% - 2px)}.\[\&\.session-menu\]\:min-w-35.session-menu{min-width:calc(var(--spacing) * 35)}.\[\&\.spreadsheet\]\:text-accent-green.spreadsheet,.\[\&\.status-add\]\:text-accent-green.status-add{color:var(--accent-green)}.\[\&\.status-copy\]\:text-accent-blue.status-copy{color:var(--accent-blue)}.\[\&\.status-delete\]\:text-accent-red.status-delete{color:var(--accent-red)}.\[\&\.status-rename\]\:text-accent-blue.status-rename{color:var(--accent-blue)}.\[\&\.warn\]\:bg-accent-amber.warn{background-color:var(--accent-amber)}.\[\&\:\:-webkit-details-marker\]\:hidden::-webkit-details-marker{display:none}.\[\&\:\:-webkit-scrollbar\]\:hidden::-webkit-scrollbar{display:none}.\[\&\:\:-webkit-search-cancel-button\]\:hidden::-webkit-search-cancel-button{display:none}.\[\&\:\:after\]\:pointer-events-none:after{pointer-events:none}.\[\&\:\:after\]\:absolute:after{position:absolute}.\[\&\:\:after\]\:start-0:after{inset-inline-start:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:end-0:after{inset-inline-end:calc(var(--spacing) * 0)}.\[\&\:\:after\]\:top-full:after{top:100%}.\[\&\:\:after\]\:h-6:after{height:calc(var(--spacing) * 6)}.\[\&\:\:after\]\:bg-\[linear-gradient\(to_bottom\,_var\(--base\)\,_transparent\)\]:after{background-image:linear-gradient(to bottom,var(--base),transparent)}.\[\&\:\:after\]\:content-\[\'\'\]:after{--tw-content:"";content:var(--tw-content)}.\[\&\:active\]\:bg-resizer-hover:active{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\]\:bg-resizer-hover:active{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:border-primary-active:active:not(:disabled){border-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-danger-active:active:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 14%,transparent)}}.\[\&\:active\:not\(\:disabled\)\]\:bg-highlight:active:not(:disabled){background-color:var(--highlight)}.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:active\:not\(\:disabled\)\]\:bg-primary-active:active:not(:disabled){background-color:color-mix(in oklab,var(--primary) 80%,var(--text))}}.\[\&\:disabled\]\:cursor-default:disabled{cursor:default}.\[\&\:focus\]\:border-accent-blue:focus{border-color:var(--accent-blue)}.\[\&\:focus-visible\]\:outline-2:focus-visible{outline-style:var(--tw-outline-style);outline-width:2px}.\[\&\:focus-visible\]\:outline-offset-2:focus-visible{outline-offset:2px}.\[\&\:focus-visible\]\:outline-text:focus-visible{outline-color:var(--text)}.\[\&\:focus-visible\]\:outline-solid:focus-visible{--tw-outline-style:solid;outline-style:solid}.\[\&\:focus-visible_\.session-dot\]\:hidden:focus-visible .session-dot{display:none}.\[\&\:focus-visible_\.session-menu-btn\]\:inline-flex:focus-visible .session-menu-btn{display:inline-flex}.\[\&\:has\(\.session-menu-btn\:focus-visible\)_\.session-dot\]\:hidden:has(.session-menu-btn:focus-visible) .session-dot{display:none}.\[\&\:has\(input\:checked\)\]\:border-accent:has(input:checked){border-color:var(--accent)}.\[\&\:has\(input\:checked\)\]\:bg-primary-subtle:has(input:checked){background-color:var(--primary-subtle)}.\[\&\:hover\]\:border-primary:hover{border-color:var(--primary)}.\[\&\:hover\]\:border-text:hover{border-color:var(--text)}.\[\&\:hover\]\:bg-canvas:hover{background-color:var(--canvas)}.\[\&\:hover\]\:bg-highlight:hover{background-color:var(--highlight)}.\[\&\:hover\]\:bg-panel:hover{background-color:var(--panel)}.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:var(--text)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\]\:bg-resizer-hover:hover{background-color:color-mix(in oklab,var(--text) 12%,transparent)}}.\[\&\:hover\]\:bg-surface:hover{background-color:var(--surface)}.\[\&\:hover\]\:bg-text:hover{background-color:var(--text)}.\[\&\:hover\]\:text-background:hover{color:var(--base)}.\[\&\:hover\]\:text-text:hover{color:var(--text)}.\[\&\:hover\]\:underline:hover{text-decoration-line:underline}.\[\&\:hover\]\:shadow-tree-hover:hover{--tw-shadow:0 2px 8px var(--tw-shadow-color,#00000014);box-shadow:var(--tw-inset-shadow),var(--tw-inset-ring-shadow),var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow)}.\[\&\:hover_\.ft-row-delete\]\:opacity-100:hover .ft-row-delete,.\[\&\:hover_\.md-code-copy\]\:opacity-100:hover .md-code-copy{opacity:1}.\[\&\:hover_\.session-dot\]\:hidden:hover .session-dot{display:none}.\[\&\:hover_\.session-menu-btn\]\:inline-flex:hover .session-menu-btn{display:inline-flex}.\[\&\:hover\:not\(\.active\)\]\:bg-surface:hover:not(.active){background-color:var(--surface)}.\[\&\:hover\:not\(\.on\)\]\:bg-highlight:hover:not(.on){background-color:var(--highlight)}.\[\&\:hover\:not\(\.on\)\]\:text-text:hover:not(.on){color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:border-accent-blue:hover:not(:disabled){border-color:var(--accent-blue)}.\[\&\:hover\:not\(\:disabled\)\]\:border-border-strong:hover:not(:disabled){border-color:var(--border-strong)}.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:border-primary-hover:hover:not(:disabled){border-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:border-text:hover:not(:disabled){border-color:var(--text)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-amber-subtle:hover:not(:disabled){background-color:var(--accent-amber-subtle)}.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:var(--accent-blue)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-accent-blue\/90:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-blue) 90%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:var(--accent-red)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-danger-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--accent-red) 8%,transparent)}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:var(--primary)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-primary-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--primary) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:var(--surface)}@supports (color:color-mix(in lab,red,red)){.\[\&\:hover\:not\(\:disabled\)\]\:bg-stop-hover:hover:not(:disabled){background-color:color-mix(in oklab,var(--surface) 88%,var(--text))}}.\[\&\:hover\:not\(\:disabled\)\]\:bg-surface:hover:not(:disabled){background-color:var(--surface)}.\[\&\:hover\:not\(\:disabled\)\]\:text-accent-red:hover:not(:disabled){color:var(--accent-red)}.\[\&\:hover\:not\(\:disabled\)\]\:text-text:hover:not(:disabled){color:var(--text)}.\[\&\:last-child\]\:border-b-0:last-child{border-bottom-style:var(--tw-border-style);border-bottom-width:0}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:absolute:not(.active)+.tab:not(.active):before{position:absolute}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:-start-px:not(.active)+.tab:not(.active):before{inset-inline-start:-1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:top-2\.5:not(.active)+.tab:not(.active):before{top:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bottom-2\.5:not(.active)+.tab:not(.active):before{bottom:calc(var(--spacing) * 2.5)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:w-px:not(.active)+.tab:not(.active):before{width:1px}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:bg-border:not(.active)+.tab:not(.active):before{background-color:var(--border)}.\[\&\:not\(\.active\)_\+_\.tab\:not\(\.active\)\:\:before\]\:content-\[\'\'\]:not(.active)+.tab:not(.active):before{--tw-content:"";content:var(--tw-content)}.\[\&\>\.settings-form\:first-child\]\:mt-0>.settings-form:first-child{margin-top:0}.\[\&\>div\:first-child\]\:border-t-0>div:first-child{border-top-style:var(--tw-border-style);border-top-width:0}.\[\&\[data-tip\]\:\:after\]\:top-auto[data-tip]:after{top:auto}.\[\&\[data-tip\]\:\:after\]\:bottom-\[calc\(100\%_\+_6px\)\][data-tip]:after{bottom:calc(100% + 6px)}.\[\&\[open\]_summary_\.plan-chevron\]\:rotate-90[open] summary .plan-chevron,.\[\&\[open\]_summary\:\:after\]\:rotate-90[open] summary:after{rotate:90deg}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.atrule\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.atrule{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-name\]\:text-syntax-green,.openresearch-diff,.file-view) .token.attr-name{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.attr-value\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.attr-value,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.boolean\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.boolean{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.builtin\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.builtin{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.cdata{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.cdata\]\:italic,.openresearch-diff,.file-view) .token.cdata{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.char\]\:text-syntax-green,.openresearch-diff,.file-view) .token.char{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.class-name\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.class-name{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.comment{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.comment\]\:italic,.openresearch-diff,.file-view) .token.comment{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.constant\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.constant{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.decorator\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.decorator,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.def\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.def{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.deleted\]\:text-syntax-red,.openresearch-diff,.file-view) .token.deleted{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.entity\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.entity{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.function\]\:text-syntax-blue,.openresearch-diff,.file-view) .token.function{color:var(--syntax-blue)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.important\]\:text-syntax-red,.openresearch-diff,.file-view) .token.important{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.inserted\]\:text-syntax-green,.openresearch-diff,.file-view) .token.inserted{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.keyword\]\:text-syntax-purple,.openresearch-diff,.file-view) .token.keyword{color:var(--syntax-purple)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.namespace\]\:text-syntax-yellow,.openresearch-diff,.file-view) .token.namespace{color:var(--syntax-yellow)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.number\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.number{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.operator\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.operator{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.parameter\]\:text-syntax-text,.openresearch-diff,.file-view) .token.parameter{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:text-syntax-comment,.openresearch-diff,.file-view) .token.prolog{color:var(--syntax-comment)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.prolog\]\:italic,.openresearch-diff,.file-view) .token.prolog{font-style:italic}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.property\]\:text-syntax-red,.openresearch-diff,.file-view) .token.property{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.punctuation\]\:text-syntax-text,.openresearch-diff,.file-view) .token.punctuation{color:var(--syntax-text)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.regex\]\:text-syntax-green,.openresearch-diff,.file-view) .token.regex,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.selector\]\:text-syntax-green,.openresearch-diff,.file-view) .token.selector,:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.string\]\:text-syntax-green,.openresearch-diff,.file-view) .token.string{color:var(--syntax-green)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.symbol\]\:text-syntax-orange,.openresearch-diff,.file-view) .token.symbol{color:var(--syntax-orange)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.tag\]\:text-syntax-red,.openresearch-diff,.file-view) .token.tag{color:var(--syntax-red)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.url\]\:text-syntax-cyan,.openresearch-diff,.file-view) .token.url{color:var(--syntax-cyan)}:is(.\[\:is\(\&\,_\.openresearch-diff\,_\.file-view\)_\.token\.variable\]\:text-syntax-red,.openresearch-diff,.file-view) .token.variable{color:var(--syntax-red)}@container (max-width:400px){.\[\@container\(\(max-width\:_400px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)\]{grid-template-columns:minmax(0,1fr)}.\[\@container\(\(max-width\:_400px\)\)\]\:\!flex-row{flex-direction:row!important}.\[\@container\(\(max-width\:_400px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@container\(\(max-width\:_400px\)\)\]\:\!items-center{align-items:center!important}.\[\@container\(\(max-width\:_400px\)\)\]\:justify-start{justify-content:flex-start}.\[\@container\(\(max-width\:_400px\)\)\]\:gap-3{gap:calc(var(--spacing) * 3)}.\[\@container\(\(max-width\:_400px\)\)\]\:\[grid-template-areas\:\'name\'_\'meta\'_\'actions\'\]{grid-template-areas:"name""meta""actions"}}@container (max-width:560px){.\[\@container\(\(max-width\:_560px\)\)\]\:grid-cols-\[minmax\(0\,_1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto}.\[\@container\(\(max-width\:_560px\)\)\]\:flex-col{flex-direction:column}.\[\@container\(\(max-width\:_560px\)\)\]\:items-end{align-items:flex-end}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-1\.5{gap:calc(var(--spacing) * 1.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-x-3\.5{column-gap:calc(var(--spacing) * 3.5)}.\[\@container\(\(max-width\:_560px\)\)\]\:gap-y-\[9px\]{row-gap:9px}}@container (max-width:720px){.\[\@container\(\(max-width\:_720px\)\)\]\:hidden{display:none}.\[\@container\(\(max-width\:_720px\)\)\]\:\!w-full{width:100%!important}}@container (max-width:960px){.\[\@container\(\(max-width\:_960px\)\)\]\:static{position:static}.\[\@container\(\(max-width\:_960px\)\)\]\:max-h-55{max-height:calc(var(--spacing) * 55)}.\[\@container\(\(max-width\:_960px\)\)\]\:grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}}@media(max-width:520px){.\[\@media\(\(max-width\:_520px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_520px\)\)\]\:items-start{align-items:flex-start}}@media(max-width:600px){.\[\@media\(\(max-width\:_600px\)\)\]\:col-span-2{grid-column:span 2/span 2}.\[\@media\(\(max-width\:_600px\)\)\]\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}}@media(max-width:640px){.\[\@media\(\(max-width\:_640px\)\)\]\:flex-col{flex-direction:column}.\[\@media\(\(max-width\:_640px\)\)\]\:items-stretch{align-items:stretch}.\[\@media\(\(max-width\:_640px\)\)\]\:justify-start{justify-content:flex-start}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:grid-cols-1 .kv{grid-template-columns:repeat(1,minmax(0,1fr))}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv\]\:gap-\[3px\] .kv{gap:3px}.\[\@media\(\(max-width\:_640px\)\)\]\:\[\&_\.kv_\.v_\+_\.k\]\:mt-\[7px\] .kv .v+.k{margin-top:7px}}@media(max-width:720px){.\[\@media\(\(max-width\:_720px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_720px\)\)\]\:px-4\.5{padding-inline:calc(var(--spacing) * 4.5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pt-5{padding-top:calc(var(--spacing) * 5)}.\[\@media\(\(max-width\:_720px\)\)\]\:pb-8{padding-bottom:calc(var(--spacing) * 8)}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button\]\:grid-cols-\[65px_1fr_60px_16px\] button{grid-template-columns:65px 1fr 60px 16px}.\[\@media\(\(max-width\:_720px\)\)\]\:\[\&_button_\>_\:nth-child\(3\)\]\:hidden button>:nth-child(3){display:none}}@media(max-width:960px){.\[\@media\(\(max-width\:_960px\)\)\]\:col-span-3{grid-column:span 3/span 3}.\[\@media\(\(max-width\:_960px\)\)\]\:mb-1{margin-bottom:var(--spacing)}.\[\@media\(\(max-width\:_960px\)\)\]\:block{display:block}.\[\@media\(\(max-width\:_960px\)\)\]\:hidden{display:none}.\[\@media\(\(max-width\:_960px\)\)\]\:grid-cols-\[minmax\(0\,0\.8fr\)_minmax\(0\,0\.8fr\)_minmax\(0\,1\.4fr\)\]{grid-template-columns:minmax(0,.8fr) minmax(0,.8fr) minmax(0,1.4fr)}.\[\@media\(\(max-width\:_960px\)\)\]\:flex-wrap{flex-wrap:wrap}.\[\@media\(\(max-width\:_960px\)\)\]\:items-start{align-items:flex-start}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-x-4{column-gap:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:gap-y-3{row-gap:calc(var(--spacing) * 3)}.\[\@media\(\(max-width\:_960px\)\)\]\:px-4{padding-inline:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:py-4{padding-block:calc(var(--spacing) * 4)}.\[\@media\(\(max-width\:_960px\)\)\]\:pt-6{padding-top:calc(var(--spacing) * 6)}.\[\@media\(\(max-width\:_960px\)\)\]\:break-all{word-break:break-all}.\[\@media\(\(max-width\:_960px\)\)\]\:whitespace-normal{white-space:normal}.win-titlebar\:\[\@media\(\(max-width\:_960px\)\)\]\:pt-10:where(.win-titlebar *){padding-top:calc(var(--spacing) * 10)}}@media(prefers-reduced-motion:reduce){.\[\@media\(\(prefers-reduced-motion\:_reduce\)\)\]\:animate-none{animation:none}}a.\[a\&\:hover\]\:border-muted:hover{border-color:var(--muted)}button.\[button\&\]\:inline-flex{display:inline-flex}button.\[button\&\]\:h-\[13px\]{height:13px}button.\[button\&\]\:w-\[13px\]{width:13px}button.\[button\&\]\:cursor-pointer{cursor:pointer}button.\[button\&\]\:items-center{align-items:center}button.\[button\&\]\:justify-center{justify-content:center}button.\[button\&\]\:border-0{border-style:var(--tw-border-style);border-width:0}button.\[button\&\]\:bg-transparent{background-color:#0000}button.\[button\&\]\:p-0{padding:0}button.\[button\&_\>_svg\]\:transition-transform>svg{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}button.\[button\&_\>_svg\]\:duration-120>svg{--tw-duration:.12s;transition-duration:.12s}button.\[button\&_\>_svg\]\:ease-standard>svg{--tw-ease:ease;transition-timing-function:ease}button.\[button\&_\>_svg\.open\]\:rotate-90>svg.open{rotate:90deg}button.\[button\&\:hover\]\:border-muted:hover{border-color:var(--muted)}}:root{--base:#fff;--canvas:#faf8f4;--panel:#f3f0ea;--surface:#faf7f2;--surface-bright:#fdfbfb;--highlight:#fdf3f1;--chat-annotation-highlight:#b8d4ff;--text:#1d1b1a;--subtext:#737373;--muted:#a1a1a1;--primary:#9a2036;--primary-subtle:#f7e9ec;--border:#d4d4d4;--border-variant:#e5e5e5;--accent-orange:#da642c;--accent-red:#d94654;--accent-teal:#209a84;--accent-blue:#3a8dff;--accent-amber:#da9100;--accent-green:#5eb64c;--accent-purple:#9c5cff;--accent-green-subtle:#e7f4e5;--accent-amber-subtle:#fff3e1;--accent-teal-subtle:#e1f3f0;--accent-red-subtle:#fbe9ea;--accent-blue-subtle:#e5f0ff;--skill-blue:#184f91;--skill-blue-subtle:#d9e9fb;--skill-blue-slash:#7fa6d2;--accent-purple-subtle:#f1e8ff;--dots-muted:#e3ded5;--dots-strong:#bdb6a8;--mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;--sans:-apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, sans-serif;--modal-top:min(30vh, 260px);--term-bg:#1a1a1a;--term-foreground:#e6e1e0;--term-selection:#2c3441;--term-app-bg:#fdfbfb;--term-app-foreground:#1d1b1a;--term-app-selection:#e9e2d8;--term-app-ansi-black:#1d1b1a;--term-app-ansi-red:#c0392b;--term-app-ansi-green:#3d8b37;--term-app-ansi-yellow:#b26a00;--term-app-ansi-blue:#2a6fcb;--term-app-ansi-magenta:#8e44ad;--term-app-ansi-cyan:#1a8a7a;--term-app-ansi-white:#8f8a85;--term-app-ansi-bright-black:#6b6663;--term-app-ansi-bright-red:#d94654;--term-app-ansi-bright-green:#5eb64c;--term-app-ansi-bright-yellow:#da9100;--term-app-ansi-bright-blue:#3a8dff;--term-app-ansi-bright-magenta:#9c5cff;--term-app-ansi-bright-cyan:#209a84;--term-app-ansi-bright-white:#1d1b1a;--tool-shimmer:var(--text)}@supports (color:color-mix(in lab,red,red)){:root{--tool-shimmer:color-mix(in srgb, var(--text) 58%, var(--subtext))}}:root{--editor-selection:var(--primary)}@supports (color:color-mix(in lab,red,red)){:root{--editor-selection:color-mix(in oklab, var(--primary) 22%, transparent)}}:root{--readable-col:840px;--border-strong:var(--border);--accent:var(--primary);--teal:var(--accent-teal);--green:var(--accent-green);--red:var(--accent-red);--amber:var(--accent-amber);--syntax-comment:#a0a1a7;--syntax-text:#383a42;--syntax-red:#e45649;--syntax-orange:#986801;--syntax-green:#50a14f;--syntax-yellow:#c18401;--syntax-cyan:#56b6c2;--syntax-purple:#a626a4;--syntax-blue:#4078f2}:root[data-theme=light]{color-scheme:light}:root[data-theme=dark]{--base:#0e0c0c;--canvas:#141110;--panel:#221f1e;--surface:#1d1b1a;--surface-bright:#130f0f;--highlight:#393433;--chat-annotation-highlight:#244e7a;--text:#e6e1e0;--subtext:#a68e8b;--muted:#737373;--primary:#ffb3ad;--primary-subtle:#33191b;--border:#525252;--border-variant:#404040;--accent-amber:#e67e22;--accent-green-subtle:#1c2b18;--accent-amber-subtle:#33260f;--accent-teal-subtle:#12332d;--accent-red-subtle:#331418;--accent-blue-subtle:#10233a;--skill-blue:#79adf0;--skill-blue-subtle:#183452;--skill-blue-slash:#527ca8;--accent-purple-subtle:#251933;--dots-muted:#2a2523;--dots-strong:#555;--term-app-bg:#141110;--term-app-foreground:#e6e1e0;--term-app-selection:#2c3441;--syntax-comment:#7f848e;--syntax-text:#abb2bf;--syntax-red:#e06c75;--syntax-orange:#d19a66;--syntax-green:#98c379;--syntax-yellow:#e5c07b;--syntax-purple:#c678dd;--syntax-blue:#61afef;color-scheme:dark}.tinker-logo{clip-path:inset(34% 9%)}:root[data-theme=dark] .tinker-logo{filter:invert();mix-blend-mode:screen}:root:is([lang=fa],[lang=ar]) #root :where(p,h1,h2,h3,h4,h5,h6,button,label,li,th,td,dt,dd,[role=status],[role=alert]),.md :where(p,h1,h2,h3,h4,li,th,td,blockquote),:root:is([lang=fa],[lang=ar]) #root .file-view-note{unicode-bidi:plaintext}:where(pre,code,.font-mono,.code-source-text,.xterm,.openresearch-diff){direction:ltr;unicode-bidi:isolate}.xterm{color-scheme:dark}@keyframes or-pulse{50%{opacity:.35}}@keyframes tool-target-reveal{0%{opacity:0;filter:blur(1.5px)}to{opacity:1;filter:blur()}}@keyframes tool-running-shimmer{0%{background-position:200% 0}to{background-position:-100% 0}}@keyframes tool-running-shimmer-icon{0%,to{color:var(--muted);opacity:.35}50%{color:var(--tool-shimmer);opacity:1}}.tool-running-shimmer{color:#0000;background:linear-gradient(100deg,var(--muted) 12%,var(--subtext) 34%,var(--tool-shimmer) 50%,var(--subtext) 66%,var(--muted) 88%);-webkit-text-fill-color:transparent;background-size:300% 100%;-webkit-background-clip:text;background-clip:text;animation:1.75s linear infinite tool-running-shimmer}.tool-running-shimmer::selection{color:var(--text);-webkit-text-fill-color:var(--text)}.tool-running-shimmer-icon{color:var(--muted);animation:1.75s ease-in-out infinite tool-running-shimmer-icon}.tool-group-summary .tool-group-label{transition:color .12s}.tool-group-summary:hover .tool-group-label,.tool-group-summary:hover .tool-chevron{color:var(--text)}.tool-group-disclosure{grid-template-rows:0fr;transition:grid-template-rows .22s cubic-bezier(.2,.75,.25,1);display:grid}.tool-group-disclosure.open{grid-template-rows:1fr}.tool-group-disclosure-inner{min-height:0;position:relative;overflow:hidden}.tool-target-reveal{animation:.18s cubic-bezier(.2,.75,.25,1) tool-target-reveal}.tool-target,.tool-target-more{color:inherit;cursor:pointer;font-weight:inherit;text-align:inherit;text-underline-offset:3px;-webkit-text-decoration-skip-ink:auto;text-decoration-skip-ink:auto;text-decoration-line:underline;text-decoration-thickness:.6px;transition:color .14s,text-decoration-color .14s;display:inline}.tool-line,.tool-group-summary{font-weight:375}.tool-group-rows .tool-line{font-size:var(--text-sm)}.msg-assistant .md table{margin-block:14px;margin-inline:auto}.msg-assistant .md th,.msg-assistant .md td{padding-block:10px}.msg-assistant .md figure{width:fit-content;max-width:100%;margin-inline:auto}.md .file-chip{padding-block:.5px;line-height:1.3}.md .file-chip .file-chip-open{color:currentColor;opacity:.6}.md .file-chip .file-chip-label{text-decoration-line:underline;-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);text-underline-offset:2px;text-decoration-thickness:.6px}.md .file-chip:hover:not(:disabled) .file-chip-label,.md .file-chip:focus-visible .file-chip-label{-webkit-text-decoration-color:var(--primary);text-decoration-color:var(--primary)}.md .file-chip:disabled .file-chip-label{text-decoration-line:none}.md .file-chip:disabled .file-chip-open{display:none}.msg-assistant .md img{max-width:100%;height:auto;margin-inline:auto;display:block}.md[data-streaming=true] .katex-error{visibility:hidden}.tool-target{-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target-more{text-decoration-color:#0000}.project-row:hover .project-row-title{text-underline-offset:2px;text-decoration-line:underline}.project-row:has(.project-row-secondary:hover) .project-row-title{text-decoration-line:none}@media(hover:none){.project-row-delete{opacity:1;pointer-events:auto}}.tool-target:hover,.tool-target-more:hover{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong)}.tool-target:focus-visible,.tool-target-more:focus-visible{color:var(--primary);-webkit-text-decoration-color:var(--border-strong);text-decoration-color:var(--border-strong);outline:1px solid var(--border-strong);outline-offset:2px}@media(prefers-reduced-motion:reduce){.activity-pulse{animation:none}.tool-group-disclosure{transition:none}.tool-target-reveal{animation:none}.tool-running-shimmer{color:var(--subtext);-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer-icon{animation:none}}@media(forced-colors:active){.tool-running-shimmer{color:canvastext;-webkit-text-fill-color:currentColor;background:0 0;animation:none}.tool-running-shimmer::selection{color:highlighttext;-webkit-text-fill-color:HighlightText}.tool-running-shimmer-icon{color:canvastext;animation:none}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes title-char-in{0%{opacity:0;filter:blur(4px);transform:translateY(.15em)}}.workspace-body>.chat-pane .chat-header{padding-inline-end:11.25rem}.workspace-card-visible>.chat-pane{padding-inline-end:16rem}.workspace-card-visible>.chat-pane .chat-header{padding-inline-end:1rem}.workspace-card-visible .workspace-tools{top:1.25rem}.win-titlebar .workspace-card-visible .workspace-tools{top:2.5rem}.code-source-text,.openresearch-diff .diff-line{font-family:var(--mono);font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height));--tw-leading:1.55;-moz-tab-size:4;tab-size:4;line-height:1.55}.code-source-wrap,.openresearch-diff .diff-code{overflow-wrap:normal;word-break:normal;overflow-wrap:break-word;white-space:pre-wrap}@property --tw-leading{syntax:"*";inherits:false}@property --tw-translate-x{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-y{syntax:"*";inherits:false;initial-value:0}@property --tw-translate-z{syntax:"*";inherits:false;initial-value:0}@property --tw-rotate-x{syntax:"*";inherits:false}@property --tw-rotate-y{syntax:"*";inherits:false}@property --tw-rotate-z{syntax:"*";inherits:false}@property --tw-skew-x{syntax:"*";inherits:false}@property --tw-skew-y{syntax:"*";inherits:false}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-divide-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-gradient-position{syntax:"*";inherits:false}@property --tw-gradient-from{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-via{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-to{syntax:"";inherits:false;initial-value:#0000}@property --tw-gradient-stops{syntax:"*";inherits:false}@property --tw-gradient-via-stops{syntax:"*";inherits:false}@property --tw-gradient-from-position{syntax:"";inherits:false;initial-value:0%}@property --tw-gradient-via-position{syntax:"";inherits:false;initial-value:50%}@property --tw-gradient-to-position{syntax:"";inherits:false;initial-value:100%}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-content{syntax:"*";inherits:false;initial-value:""}@keyframes pulse{50%{opacity:.5}} diff --git a/ui/dist/index.html b/ui/dist/index.html index 3332f8982..8423b5660 100644 --- a/ui/dist/index.html +++ b/ui/dist/index.html @@ -49,8 +49,8 @@ html { background: #ffffff; } html[data-theme="dark"] { background: #0e0c0c; } - - + +
({ + projectId: projectId ?? "", + remote: runtime.kind === "ssh", + resolve: (path: string, scope: FileActionScopeValue | null, exp?: string) => { + const input = scope?.source === "artifacts" ? `artifacts/${path}` : path; + const tab = resolveFileTab(input, scope ? scope.sessionId : activeSessionId ?? undefined, scope?.ref, undefined, exp); + return tab ? { path: tab.path, source: tab.source ?? "repo", sessionId: tab.sessionId, ref: tab.ref } : null; + }, + }), [projectId, runtime.kind, resolveFileTab, activeSessionId]); + const openFromRightTab = useCallback( (host: RightTab, open: () => void) => { promoteRightTab(host); @@ -1717,6 +1728,7 @@ export default function App({ runtime, projectId, pane }: { runtime: RuntimeInfo ); return ( +
{runtime.kind === "local" && } {runtime.kind === "local" && } @@ -1873,6 +1885,7 @@ export default function App({ runtime, projectId, pane }: { runtime: RuntimeInfo key={activeProject.id} project={activeProject} artifacts={artifacts} + remote={runtime.kind === "ssh"} onOpenFile={openArtifactFileTab} canRenameFile={(path) => !fileBuffersRef.current.get( fileScrollKey(activeProject.id, activeSessionId, { path, source: "artifacts" }), @@ -2122,7 +2135,7 @@ export default function App({ runtime, projectId, pane }: { runtime: RuntimeInfo {/* The plan markdown is already client-side — render directly, file links resolve against the plan's session worktree. */} -
+
tab.promptId === planTab.promptId)?.plan || m.artifacts_tab_loading()} onOpenFile={(path, line, exp, ref, intent) => @@ -2139,7 +2152,7 @@ export default function App({ runtime, projectId, pane }: { runtime: RuntimeInfo ) } /> -
+
) : sideTab && projectId ? ( @@ -2311,5 +2324,6 @@ export default function App({ runtime, projectId, pane }: { runtime: RuntimeInfo /> )}
+
); } diff --git a/ui/src/api.ts b/ui/src/api.ts index ab00dee66..196090dcc 100644 --- a/ui/src/api.ts +++ b/ui/src/api.ts @@ -545,13 +545,32 @@ export const openFileInEditor = ( export const revealFileInManager = ( projectId: string, path: string, - opts: { sessionId?: string } = {}, + opts: { sessionId?: string; source?: "repo" | "artifacts" | "abs"; ref?: string } = {}, ) => post<{ ok: boolean }>(`/api/projects/${projectId}/file/reveal`, { path, - sessionId: opts.sessionId, + ...opts, }); +export interface FileLocationRequest extends CheckoutRef { + path: string; + source: "repo" | "artifacts" | "abs"; +} +export interface FileLocation { + absolutePath: string | null; + isDir: boolean; +} +export const getFileLocation = (projectId: string, request: FileLocationRequest, signal?: AbortSignal) => + get(`/api/projects/${projectId}/file/location?${checkoutQuery(request, new URLSearchParams({ path: request.path, source: request.source }))}`, signal); + +export interface ArtifactSearch { + entries: ArtifactEntry[]; + nextCursor: string | null; + incomplete: boolean; +} +export const searchArtifacts = (projectId: string, q: string, after?: string, signal?: AbortSignal) => + get(`/api/projects/${projectId}/files/search?${new URLSearchParams({ q, ...(after ? { after } : {}) })}`, signal); + export interface LatexEngine { /** The engine that will run, or null when the machine has none. */ engine: string | null; diff --git a/ui/src/components/ArtifactsTab.tsx b/ui/src/components/ArtifactsTab.tsx index 3d6107182..b24a700e5 100644 --- a/ui/src/components/ArtifactsTab.tsx +++ b/ui/src/components/ArtifactsTab.tsx @@ -1,7 +1,7 @@ import { WorkspaceEmptyState } from "./WorkspaceEmptyState"; -import { useQuery } from "@tanstack/react-query"; -import { queryClient } from "../queries/client"; -import { getArtifactFileTextQuery } from "../queries/files"; +import { useQuery, useInfiniteQuery } from "@tanstack/react-query"; +import { isCurrentScope, queryClient, workspaceScope } from "../queries/client"; +import { getArtifactFileTextQuery, getFileLocationQuery, searchArtifactsQuery } from "../queries/files"; import { m } from "../paraglide/messages.js"; import { ltr } from "../i18n"; import { getLocale } from "../paraglide/runtime.js"; @@ -13,7 +13,7 @@ import { Package, Trash2, } from "lucide-react"; -import { useEffect, useRef, useState, type ReactNode } from "react"; +import { useEffect, useMemo, useRef, useState, type ReactNode } from "react"; import ReactMarkdown from "react-markdown"; import rehypeKatex from "rehype-katex"; import remarkGfm from "remark-gfm"; @@ -24,6 +24,7 @@ import { FILE_PREVIEW_BYTES, fmtBytes, manageArtifactFile, + revealFileInManager, type ArtifactEntry, type Project, type ProjectArtifacts, @@ -38,12 +39,15 @@ import { mdCodeComponents, remarkMathOptions } from "./Md"; import { FileContextMenu, FileRenameInput, - copyFilePath, + copyAbsoluteFilePath, fileContextMenuTarget, type FileContextMenuEvent, type FileContextMenuTarget, } from "./FileTreeActions"; import { IconButton, IconButtonLink, LoadingRow, showAlert, Spinner } from "./ui"; +import { Input, Button } from "./ui"; +import { FilePathDetails } from "./FilePathDetails"; +import { withArtifactEntries } from "../fileLocation"; /** Any href with a URI scheme (https:, mailto:, data:, …) or a * protocol-relative // — i.e. not an artifact-relative path to resolve. */ @@ -239,11 +243,13 @@ function PreviewPane({ entry, onDelete, artifactEntries, + remote, }: { projectId: string; entry: ArtifactEntry; onDelete: (path: string) => void; artifactEntries: ArtifactEntry[]; + remote: boolean; }) { const kind = previewKind(entry); const version = useFileVersion(artifactUrl(projectId, entry.path)); @@ -346,6 +352,7 @@ function PreviewPane({
+
{body} {truncated && ( @@ -393,7 +400,7 @@ function TreeRows({ const open = !collapsed.has(e.path); return (
-
onToggle(e.path)}> +
onToggle(e.path)} onContextMenu={event => { event.preventDefault(); onContextMenu(event, e.path); }}> @@ -460,6 +472,7 @@ function TreeRows({ )} + {search.hasNextPage && } + {search.data?.pages.some(page => page.incomplete) &&

{m.artifacts_search_incomplete()}

} + } + : entries.length ? tree(entries) : } + {!searchActive && artifacts.truncated && (

{m.artifacts_tab_listing_truncated_the_folder_has_more_artifacts()}

)}
@@ -669,7 +724,8 @@ export function ArtifactsTab({ projectId={project.id} entry={selectedEntry} onDelete={remove} - artifactEntries={artifacts.entries} + artifactEntries={entries} + remote={remote} /> ) : (
@@ -680,7 +736,8 @@ export function ArtifactsTab({ {contextMenu && ( onOpenFile(contextMenu.path)} + onOpen={findArtifactEntry(entries, contextMenu.path)?.isDir ? undefined : () => onOpenFile(contextMenu.path)} + onReveal={remote ? undefined : () => { void revealFileInManager(project.id, contextMenu.path, { source: "artifacts" }).catch(e => showAlert(e instanceof Error ? e.message : String(e), "error")); }} onRename={canRenameFile(contextMenu.path) ? () => setRenamingPath(contextMenu.path) : undefined} onDuplicate={() => void manage(contextMenu.path, { action: "duplicate" })} onCopyPath={() => copyPath(contextMenu.path)} diff --git a/ui/src/components/FileLinkActions.tsx b/ui/src/components/FileLinkActions.tsx new file mode 100644 index 000000000..78898773a --- /dev/null +++ b/ui/src/components/FileLinkActions.tsx @@ -0,0 +1,85 @@ +import { createContext, useContext, useState, type ContextType, type KeyboardEvent } from "react"; +import { useQuery } from "@tanstack/react-query"; +import type { FileLocationRequest } from "../api"; +import { revealFileInManager } from "../api"; +import { loadedFileLocation } from "../fileLocation"; +import { getFileLocationQuery, resolvedFileQuery } from "../queries/files"; +import { isCurrentScope, workspaceScope } from "../queries/client"; +import { m } from "../paraglide/messages.js"; +import { ltr } from "../i18n"; +import { showAlert } from "./ui"; +import { FileContextMenu, copyAbsoluteFilePath, fileContextMenuTarget, type FileContextMenuEvent, type FileContextMenuTarget } from "./FileTreeActions"; + +export interface FileActionScopeValue { + sessionId?: string; + ref?: string; + source?: "repo" | "artifacts" | "abs"; +} +export const FileActionScope = createContext(null); +export const FileActionsContext = createContext<{ + projectId: string; + remote: boolean; + resolve: (path: string, scope: FileActionScopeValue | null, exp?: string) => FileLocationRequest | null; +} | null>(null); + +export function useFileLinkMenu(path: string, exp?: string) { + const context = useContext(FileActionsContext); + const scope = useContext(FileActionScope); + const [target, setTarget] = useState(null); + const open = (event: FileContextMenuEvent) => { + if (!context) return; + event.preventDefault(); + event.stopPropagation(); + setTarget(fileContextMenuTarget(event, path)); + }; + return { + handlers: context ? { + onContextMenu: open, + onKeyDown: (event: KeyboardEvent) => { + if (event.key === "ContextMenu" || (event.shiftKey && event.key === "F10")) open(event); + }, + } : {}, + menu: target && context ? { target, context, request: context.resolve(path, scope, exp), onClose: () => setTarget(null) } : null, + }; +} + +export function FileLinkMenu({ target, context, request, onClose, onOpen }: { + target: FileContextMenuTarget; + context: NonNullable>; + request: FileLocationRequest | null; + onClose: () => void; + onOpen: () => void; +}) { + const scope = workspaceScope(); + const file = useQuery({ + ...resolvedFileQuery(context.projectId, request?.path ?? "", request?.source ?? "repo", request?.sessionId, request?.ref), + enabled: request !== null, + }); + const loaded = file.data; + const resolved = loaded ? loadedFileLocation(loaded, request?.sessionId, request?.ref) : request; + const location = useQuery({ + ...getFileLocationQuery(context.projectId, resolved ?? { path: "", source: "repo" }), + enabled: !!loaded && !loaded.file.notFound && !file.isFetching, + }); + const path = !file.isFetching && !location.isFetching && !file.isError && !location.isError && !loaded?.file.notFound + ? location.data?.absolutePath : null; + const status = !request || loaded?.file.notFound ? m.file_viewer_not_found() + : file.error?.message ?? location.error?.message + ?? (path ? (context.remote ? m.file_actions_remote_path({ path: ltr(path) }) : ltr(path)) + : request.ref ? m.file_viewer_os_action_committed_version({ branch: ltr(request.ref) }) + : m.file_actions_resolving()); + return { if (isCurrentScope(scope)) copyAbsoluteFilePath(path); } : undefined} + onReveal={path && !context.remote && resolved ? () => { + if (!isCurrentScope(scope)) return; + void revealFileInManager(context.projectId, resolved.path, resolved) + .catch(e => showAlert(e instanceof Error ? e.message : String(e), "error")); + } : undefined} + onClose={onClose} + />; +} diff --git a/ui/src/components/FilePathDetails.tsx b/ui/src/components/FilePathDetails.tsx new file mode 100644 index 000000000..db3751d9f --- /dev/null +++ b/ui/src/components/FilePathDetails.tsx @@ -0,0 +1,35 @@ +import { useQuery } from "@tanstack/react-query"; +import { Copy, FolderOpen } from "lucide-react"; +import type { FileLocationRequest } from "../api"; +import { revealFileInManager } from "../api"; +import { getFileLocationQuery } from "../queries/files"; +import { isCurrentScope, workspaceScope } from "../queries/client"; +import { m } from "../paraglide/messages.js"; +import { ltr } from "../i18n"; +import { copyAbsoluteFilePath } from "./FileTreeActions"; +import { IconButton, showAlert, Spinner } from "./ui"; + +export function FilePathDetails({ projectId, request, remote }: { + projectId: string; + request: FileLocationRequest; + remote: boolean; +}) { + const location = useQuery(getFileLocationQuery(projectId, request)); + const scope = workspaceScope(); + const path = !location.isError && !location.isFetching ? location.data?.absolutePath : null; + return
+ + {location.error?.message ?? (path + ? remote ? m.file_actions_remote_path({ path: ltr(path) }) : ltr(path) + : request.ref ? m.file_viewer_os_action_committed_version({ branch: ltr(request.ref) }) : m.file_actions_resolving())} + + {location.isPending && } + {path && <> + { if (isCurrentScope(scope)) copyAbsoluteFilePath(path); }}> + {!remote && { + if (!isCurrentScope(scope)) return; + void revealFileInManager(projectId, request.path, request).catch(e => showAlert(e instanceof Error ? e.message : String(e), "error")); + }}>} + } +
; +} diff --git a/ui/src/components/FileTreeActions.tsx b/ui/src/components/FileTreeActions.tsx index 9a9d70c13..b6c2ef4d6 100644 --- a/ui/src/components/FileTreeActions.tsx +++ b/ui/src/components/FileTreeActions.tsx @@ -12,13 +12,23 @@ import { ltr } from "../i18n"; import { Input, MenuItem, showAlert } from "./ui"; export function copyFilePath(root: string, path: string) { + copyAbsoluteFilePath(path ? `${root.replace(/[\\/]+$/, "")}/${path}` : root); +} + +export function copyAbsoluteFilePath(path: string | Promise) { const clipboard = navigator.clipboard; if (!clipboard) { + if (typeof path !== "string") void path.catch(() => {}); showAlert(m.file_tree_clipboard_unavailable(), "error"); return; } - void clipboard - .writeText(`${root.replace(/[\\/]+$/, "")}/${path}`) + // WebKit requires the write to begin inside the user gesture, even when + // canonicalizing a tree entry needs an asynchronous server round trip. + const write = typeof path === "string" ? clipboard.writeText(path) + : typeof ClipboardItem !== "undefined" && clipboard.write + ? clipboard.write([new ClipboardItem({ "text/plain": path.then(value => new Blob([value], { type: "text/plain" })) })]) + : path.then(value => clipboard.writeText(value)); + void write .then(() => showAlert(m.common_copied(), "success")) .catch((error) => showAlert(error instanceof Error ? error.message : String(error), "error")); } @@ -80,8 +90,8 @@ export interface FileContextMenuTarget { } export type FileContextMenuEvent = - | ReactMouseEvent - | ReactKeyboardEvent; + | ReactMouseEvent + | ReactKeyboardEvent; export function fileContextMenuTarget( event: FileContextMenuEvent, @@ -104,14 +114,22 @@ export function FileContextMenu({ onDuplicate, onCopyPath, onDelete, + onReveal, + pathStatus, + copyLabel, + openLabel, onClose, }: { target: FileContextMenuTarget; - onOpen: () => void; + onOpen?: () => void; onRename?: () => void; onDuplicate?: () => void; - onCopyPath: () => void; + onCopyPath?: () => void; onDelete?: () => void; + onReveal?: () => void; + pathStatus?: string; + copyLabel?: string; + openLabel?: string; onClose: () => void; }) { const menuRef = useRef(null); @@ -125,12 +143,17 @@ export function FileContextMenu({ const previousFocus = document.activeElement instanceof HTMLElement ? document.activeElement : null; - setPosition({ + const reposition = () => setPosition({ x: Math.max(8, Math.min(target.x, window.innerWidth - menu.offsetWidth - 8)), y: Math.max(8, Math.min(target.y, window.innerHeight - menu.offsetHeight - 8)), }); + reposition(); + // Resolving a chat link adds its path and OS actions after the menu opens. + const observer = new ResizeObserver(reposition); + observer.observe(menu); menu.querySelector("button")?.focus(); return () => { + observer.disconnect(); if (menu.contains(document.activeElement)) previousFocus?.focus(); }; }, [target]); @@ -192,10 +215,12 @@ export function FileContextMenu({ items[(current + step + items.length) % items.length]?.focus(); }} > - {item(m.file_tree_open(), onOpen)} + {pathStatus &&

{pathStatus}

} + {onOpen && item(openLabel ?? m.file_tree_open(), onOpen)} {onRename && item(m.chat_panel_rename(), onRename)} {onDuplicate && item(m.file_tree_duplicate(), onDuplicate)} - {item(m.artifacts_copy_path(), onCopyPath)} + {onCopyPath && item(copyLabel ?? m.artifacts_copy_path(), onCopyPath)} + {onReveal && item(m.file_viewer_reveal_in_file_manager(), onReveal)} {onDelete && item(m.chat_panel_delete(), onDelete, true)}
, document.body, diff --git a/ui/src/components/FileViewer.tsx b/ui/src/components/FileViewer.tsx index 434256cae..8c94311f1 100644 --- a/ui/src/components/FileViewer.tsx +++ b/ui/src/components/FileViewer.tsx @@ -22,7 +22,6 @@ import { ExternalLink, FileOutput, FileText, - FolderOpen, GitBranch, X, } from "lucide-react"; @@ -33,7 +32,6 @@ import { FileChangedError, openFileInEditor, projectFileUrl, - revealFileInManager, saveProjectFile, type ArtifactEntry, } from "../api"; @@ -65,6 +63,9 @@ import { OverleafButton } from "./OverleafPanel"; import { MediaPreview, mediaPreviewKind } from "./MediaPreview"; import { MediaToolbarSlot } from "./mediaToolbar"; import { Md } from "./Md"; +import { FilePathDetails } from "./FilePathDetails"; +import { loadedFileLocation } from "../fileLocation"; +import { FileActionScope } from "./FileLinkActions"; import { Button, IconButton, IconButtonLink, Spinner, showAlert } from "./ui"; export interface FileScrollPosition { @@ -473,9 +474,6 @@ export function FileViewer({ const openEditor = useOsFileAction(() => openFileInEditor(projectId, filePath, { sessionId }), ); - const revealManager = useOsFileAction(() => - revealFileInManager(projectId, filePath, { sessionId }), - ); const osActionBlocker = remote ? m.file_viewer_os_action_local_only() : data?.notFound @@ -574,6 +572,7 @@ export function FileViewer({ }; return ( +
@@ -690,22 +689,12 @@ export function FileViewer({ > {openEditor.busy ? : } - void revealManager.trigger()} - > - {revealManager.busy ? : } - )}
{/* Outside the scroll body, unlike its siblings: this state can be editable, and the editor's `h-full` would push it out of view. */} + {loaded && !loaded.file.notFound && } {!error && viaCheckout && loaded?.source === "checkout" && (
{m.file_viewer_not_in_artifacts_showing_root({ root: loaded.file.root === "worktree" ? m.file_viewer_session_worktree() : m.file_viewer_project_clone() })} @@ -932,5 +921,6 @@ export function FileViewer({ )}
+
); } diff --git a/ui/src/components/Md.tsx b/ui/src/components/Md.tsx index a97a77a4e..95eb18a78 100644 --- a/ui/src/components/Md.tsx +++ b/ui/src/components/Md.tsx @@ -25,6 +25,7 @@ import { tabOpenGestureHandlers, type TabOpenIntent } from "../tabPreview"; import { Button, IconButton, IconButtonLink } from "./ui"; import { absoluteFileUrl, artifactUrl, projectFileUrl } from "../api"; import { chatImageTarget, firstCitedLine, rehypeSafeUrls, splitLineSuffix } from "../markdownTarget"; +import { FileActionScope, FileLinkMenu, useFileLinkMenu } from "./FileLinkActions"; const ImageResolverContext = createContext<((src: string, fallback?: boolean) => string | null) | undefined>(undefined); @@ -42,7 +43,8 @@ export function ChatImageScope({ projectId, sessionId, children }: { : projectFileUrl(projectId, target.source === "artifact" ? `artifacts/${target.path}` : target.path, { sessionId: sessionId ?? undefined }); return url + target.hash; }, [projectId, sessionId]); - return {children}; + const fileScope = useMemo(() => ({ sessionId: sessionId ?? undefined }), [sessionId]); + return {children}; } function ImageModal({ src, alt, name, onClose }: { src: string; alt: string; name?: string; onClose: () => void }) { @@ -286,19 +288,27 @@ function FileChip({ }) { const name = path.split("/").pop() || path; const label = line != null ? `${name}:${line}` : name; + const actions = useFileLinkMenu(path, exp); + const gestures = tabOpenGestureHandlers((intent) => onOpenFile?.(path, line, exp, undefined, intent)); return ( + <> + {actions.menu && onOpenFile?.(path, line, exp, undefined, "keepOpen")} />} + ); } diff --git a/ui/src/fileLocation.ts b/ui/src/fileLocation.ts new file mode 100644 index 000000000..cd98d2fa6 --- /dev/null +++ b/ui/src/fileLocation.ts @@ -0,0 +1,43 @@ +import type { FileLocationRequest } from "./api"; +import type { LoadedFile } from "./queries/files"; + +/** Bind OS actions to the source/path that actually answered the preview. + * In particular artifacts can fall back to artifacts/x in the worktree, and + * a pruned session can read from the clone. Never recompute those fallbacks. */ +export function loadedFileLocation(loaded: LoadedFile, sessionId?: string, ref?: string): FileLocationRequest { + if (loaded.source === "checkout") return { + path: loaded.file.path, + source: "repo", + sessionId: loaded.file.root === "worktree" ? sessionId : undefined, + ref: loaded.file.root === "branch" ? ref : undefined, + }; + return { path: loaded.file.path, source: loaded.source === "artifact" ? "artifacts" : "abs" }; +} + +/** Merge search hits into a capped tree without discarding its original entries. + * Ancestor placeholders allow a hit outside the initial cap to be located. */ +export function withArtifactEntries(entries: T[], additions: T[]): T[] { + const result = entries.map(e => ({ ...e, children: e.children ? withArtifactEntries(e.children, []) : undefined })) as T[]; + for (const entry of additions) { + const segments = entry.path.split("/"); + let branch = result; + for (let i = 0; i < segments.length; i++) { + const path = segments.slice(0, i + 1).join("/"); + const existing = branch.find(e => e.path === path); + if (i === segments.length - 1) { + if (!existing) branch.push({ ...entry } as T); + } else { + const parent = existing ?? { path, name: segments[i], isDir: true, size: 0, modifiedAt: 0, children: [] } as unknown as T; + if (!existing) branch.push(parent); + parent.children ??= []; + branch = parent.children; + } + } + } + const sort = (rows: T[]) => { + rows.sort((a,b) => Number(b.isDir) - Number(a.isDir) || a.name.localeCompare(b.name)); + rows.forEach(e => { if (e.children) sort(e.children); }); + }; + sort(result); + return result; +} diff --git a/ui/src/queries/files.ts b/ui/src/queries/files.ts index c89998fe3..02c6b43bc 100644 --- a/ui/src/queries/files.ts +++ b/ui/src/queries/files.ts @@ -1,5 +1,5 @@ import { isCommit } from "./invalidation"; -import { queryOptions, type FetchQueryOptions } from "@tanstack/react-query"; +import { queryOptions, infiniteQueryOptions, type FetchQueryOptions } from "@tanstack/react-query"; import * as api from "../api"; import { workspaceKey, queryClient } from "./client"; @@ -49,6 +49,20 @@ export const getArtifactsQuery = (projectId: string) => queryOptions({ staleTime: 30_000, }); +export const getFileLocationQuery = (projectId: string, request: api.FileLocationRequest) => queryOptions({ + queryKey: workspaceKey("getFileLocation", projectId, request), + queryFn: ({ signal }) => api.getFileLocation(projectId, request, signal), + staleTime: 0, +}); + +export const searchArtifactsQuery = (projectId: string, q: string) => infiniteQueryOptions({ + queryKey: workspaceKey("searchArtifacts", projectId, q), + queryFn: ({ signal, pageParam }) => api.searchArtifacts(projectId, q, pageParam, signal), + initialPageParam: undefined as string | undefined, + getNextPageParam: page => page.nextCursor ?? undefined, + staleTime: 5_000, +}); + export const getArtifactFileTextQuery = (projectId: string, path: string) => queryOptions({ queryKey: workspaceKey("getArtifactFileText", projectId, path), queryFn: ({ signal }) => api.getArtifactFileText(projectId, path, signal), diff --git a/ui/src/queries/invalidation.ts b/ui/src/queries/invalidation.ts index dbb39f54f..1373174f1 100644 --- a/ui/src/queries/invalidation.ts +++ b/ui/src/queries/invalidation.ts @@ -26,7 +26,7 @@ export function invalidateFamilies(families: readonly string[], scope = workspac } const fileBodies = ["resolvedFile", "getProjectFile", "getArtifactFileText", "getArtifactFileMetadata"]; -export const artifactFamilies = ["getArtifacts", "getArtifactFileText", "getArtifactFileMetadata"]; +export const artifactFamilies = ["getArtifacts", "getArtifactFileText", "getArtifactFileMetadata", "searchArtifacts", "getFileLocation"]; export const liveFamilies = ["listProjects", "listProjectActivity", "listExperiments", "listRuns", "listChatSessions", "getChatMessages", "getHarnesses", "getUpdateStatus", ...artifactFamilies, ...fileBodies, "getAbsoluteFile", "fileVersion", "getCodeTree", "getSessionWorktree", "getRunDiff", "getExperimentDiff"]; export function invalidateProjectFiles(projectId: string, scope = workspaceScope(), cancelReads = false) { diff --git a/ui/tests/copyFilePath.test.mjs b/ui/tests/copyFilePath.test.mjs new file mode 100644 index 000000000..c29d40584 --- /dev/null +++ b/ui/tests/copyFilePath.test.mjs @@ -0,0 +1,33 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { readFileSync } from "node:fs"; +import { createRequire } from "node:module"; +import ts from "typescript"; + +const require = createRequire(import.meta.url); +function copier(clipboard, ClipboardItem) { + const source = readFileSync(new URL("../src/components/FileTreeActions.tsx", import.meta.url), "utf8"); + const code = ts.transpileModule(source, { + compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2022, jsx: ts.JsxEmit.ReactJSX }, + }).outputText; + const exports = {}; + new Function("require", "exports", "navigator", "ClipboardItem", code)(id => { + if (id === "./ui") return { showAlert: () => {} }; + if (id === "../i18n") return {}; + if (id === "../paraglide/messages.js") return { m: new Proxy({}, { get: (_, name) => () => String(name) }) }; + return require(id); + }, exports, { clipboard }, ClipboardItem); + return exports.copyAbsoluteFilePath; +} + +test("an asynchronous path starts its clipboard write during the click, before resolution", async () => { + let resolvePath, item; + const path = new Promise(resolve => { resolvePath = resolve; }); + const copy = copier({ write: async items => { item = items[0]; } }, class { + constructor(data) { this.data = data; } + }); + copy(path); + assert.ok(item, "write must start before the server answers"); + resolvePath("/actual/canonical/a b/report.md"); + assert.equal(await (await item.data["text/plain"]).text(), "/actual/canonical/a b/report.md"); +}); diff --git a/ui/tests/fileLinkActions.test.mjs b/ui/tests/fileLinkActions.test.mjs new file mode 100644 index 000000000..a16f1f243 --- /dev/null +++ b/ui/tests/fileLinkActions.test.mjs @@ -0,0 +1,64 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { readFileSync } from "node:fs"; +import { createRequire } from "node:module"; +import ts from "typescript"; +import { loadedFileLocation } from "../src/fileLocation.ts"; + +const require = createRequire(import.meta.url); + +function renderMenu({ loaded, request, remote = false, currentScope = () => 1 }) { + const calls = []; + const source = readFileSync(new URL("../src/components/FileLinkActions.tsx", import.meta.url), "utf8"); + const code = ts.transpileModule(source, { + compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2022, jsx: ts.JsxEmit.ReactJSX }, + }).outputText; + const mocks = { + "@tanstack/react-query": { useQuery: options => options.kind === "file" + ? { data: loaded, isFetching: false, isError: false } + : { data: { absolutePath: "/exact/resolved/path" }, isFetching: false, isError: false } }, + "../api": { revealFileInManager: async (...args) => { calls.push(["reveal", ...args]); } }, + "../fileLocation": { loadedFileLocation }, + "../queries/files": { + resolvedFileQuery: (...args) => { calls.push(["read", ...args]); return { kind: "file" }; }, + getFileLocationQuery: (...args) => { calls.push(["location", ...args]); return { kind: "location" }; }, + }, + "../queries/client": { workspaceScope: currentScope, isCurrentScope: scope => scope === currentScope() }, + "../paraglide/messages.js": { m: new Proxy({}, { get: (_, key) => () => String(key) }) }, + "../i18n": { ltr: text => text }, + "./ui": { showAlert: (...args) => calls.push(["alert", ...args]) }, + "./FileTreeActions": { FileContextMenu: "menu", copyAbsoluteFilePath: path => calls.push(["copy", path]) }, + }; + const exports = {}; + new Function("require", "exports", code)(id => mocks[id] ?? require(id), exports); + const tree = exports.FileLinkMenu({ target: { path: request.path, x: 10, y: 10 }, context: { projectId: "project", remote }, request, onClose: () => {}, onOpen: () => {} }); + return { props: tree.props, calls }; +} + +const checkout = (root, path = "report.md") => ({ source: "checkout", file: { root, path, notFound: false } }); + +test("menu OS actions use the actual fallback checkout path and session, not the chip path", () => { + const { props, calls } = renderMenu({ loaded: checkout("worktree", "artifacts/report.md"), request: { source: "artifacts", path: "report.md", sessionId: "chat" } }); + props.onCopyPath(); + props.onReveal(); + assert.deepEqual(calls.find(c => c[0] === "copy"), ["copy", "/exact/resolved/path"]); + assert.deepEqual(calls.find(c => c[0] === "location"), ["location", "project", { source: "repo", path: "artifacts/report.md", sessionId: "chat", ref: undefined }]); + assert.deepEqual(calls.find(c => c[0] === "reveal"), ["reveal", "project", "artifacts/report.md", { source: "repo", path: "artifacts/report.md", sessionId: "chat", ref: undefined }]); +}); + +test("remote links retain copy and panel open but never expose a local reveal action", () => { + const { props, calls } = renderMenu({ loaded: checkout("clone"), request: { source: "repo", path: "report.md" }, remote: true }); + props.onCopyPath(); + assert.deepEqual(calls.find(c => c[0] === "copy"), ["copy", "/exact/resolved/path"]); + assert.equal(typeof props.onOpen, "function"); + assert.equal(props.onReveal, undefined); +}); + +test("switching workspaces makes captured actions inert", () => { + let scope = 1; + const { props, calls } = renderMenu({ loaded: checkout("clone"), request: { source: "repo", path: "report.md" }, currentScope: () => scope }); + scope = 2; + props.onCopyPath(); + props.onReveal(); + assert.equal(calls.some(c => c[0] === "copy" || c[0] === "reveal"), false); +}); diff --git a/ui/tests/fileLocation.test.mjs b/ui/tests/fileLocation.test.mjs new file mode 100644 index 000000000..ef9142e12 --- /dev/null +++ b/ui/tests/fileLocation.test.mjs @@ -0,0 +1,31 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { loadedFileLocation, withArtifactEntries } from "../src/fileLocation.ts"; + +test("filesystem-action requests preserve the preview source and discard unrelated session/ref", () => { + const cases = [ + [{ source: "checkout", file: { path: "result.md", root: "clone" } }, { source: "repo", path: "result.md", sessionId: undefined, ref: undefined }], + [{ source: "checkout", file: { path: "result.md", root: "branch" } }, { source: "repo", path: "result.md", sessionId: undefined, ref: "experiment/main" }], + [{ source: "artifact", file: { path: "result.md" } }, { source: "artifacts", path: "result.md" }], + [{ source: "absolute", file: { path: "/tmp/report.md" } }, { source: "abs", path: "/tmp/report.md" }], + ]; + for (const [loaded, expected] of cases) { + assert.deepEqual(loadedFileLocation(loaded, "chat", "experiment/main"), expected, `${loaded.source}/${loaded.file.root ?? ""}`); + } +}); + +const entry = path => ({ path, name: path.split("/").at(-1), isDir: false, size: 12, modifiedAt: 10 }); +const directory = (path, children) => ({ ...entry(path), isDir: true, children }); +test("search hits gain missing ancestors and merge into the tree without duplicates or mutation", () => { + const initial = [directory("reports", [entry("reports/old.md")]), entry("first.md")]; + const before = structuredClone(initial); + const result = withArtifactEntries(initial, [entry("extra/deep/final.md"), entry("reports/new.md"), entry("reports/old.md")]); + assert.deepEqual(result, [ + { path: "extra", name: "extra", isDir: true, size: 0, modifiedAt: 0, children: [ + { path: "extra/deep", name: "deep", isDir: true, size: 0, modifiedAt: 0, children: [entry("extra/deep/final.md")] }, + ] }, + directory("reports", [entry("reports/new.md"), { ...entry("reports/old.md"), children: undefined }]), + { ...entry("first.md"), children: undefined }, + ]); + assert.deepEqual(initial, before); +}); From 967820d4f6a22e3f5cde1e29fbb6be3d5fca2823 Mon Sep 17 00:00:00 2001 From: Aleksandr Rodionov Date: Sun, 4 Oct 2026 22:22:35 +0300 Subject: [PATCH 2/4] Fix artifact search lifecycle and add resumable time budgets --- src/commands/up.rs | 40 +- src/commands/up/artifact_search.rs | 246 ++++++++++ src/local/files.rs | 268 +++++++---- ...iew--NppkCR0.js => PdfPreview-D66I2Zos.js} | 2 +- .../{index-CdYShGTw.js => index-BcXCpPh-.js} | 440 +++++++++--------- ui/dist/index.html | 2 +- ui/messages/ar.json | 8 +- ui/messages/en.json | 8 +- ui/messages/es.json | 8 +- ui/messages/fa.json | 8 +- ui/messages/hi.json | 8 +- ui/messages/zh-CN.json | 8 +- ui/src/api.ts | 18 +- ui/src/artifactSearch.ts | 77 +++ ui/src/components/ArtifactsTab.tsx | 46 +- ui/src/queries/files.ts | 10 +- ui/src/useArtifactSearch.ts | 49 ++ ui/tests/artifactSearch.test.mjs | 64 +++ 18 files changed, 937 insertions(+), 373 deletions(-) create mode 100644 src/commands/up/artifact_search.rs rename ui/dist/assets/{PdfPreview--NppkCR0.js => PdfPreview-D66I2Zos.js} (99%) rename ui/dist/assets/{index-CdYShGTw.js => index-BcXCpPh-.js} (60%) create mode 100644 ui/src/artifactSearch.ts create mode 100644 ui/src/useArtifactSearch.ts create mode 100644 ui/tests/artifactSearch.test.mjs diff --git a/src/commands/up.rs b/src/commands/up.rs index 7f0d35c49..ea58db6f0 100644 --- a/src/commands/up.rs +++ b/src/commands/up.rs @@ -47,6 +47,7 @@ use crate::updates; use crate::workspace_state::{GlobalWorkspaceState, WorkspaceState}; use crate::{browser, UpArgs}; +mod artifact_search; pub(crate) mod compute_settings; mod harness_setup; use compute_settings::*; @@ -132,6 +133,7 @@ pub async fn run(args: UpArgs) -> Result<()> { stopping: stopping.clone(), dashboard_lock: Arc::new(std::sync::Mutex::new(Some(dashboard_lock))), restart: Arc::new(tokio::sync::Notify::new()), + artifact_searches: artifact_search::Searches::default(), }; // Plan-mode turns hand this port to the `orx mcp-gate` permission bridge. state.chat.set_up_port(actual_port); @@ -360,6 +362,7 @@ async fn persistent_shutdown_signal() { #[derive(Clone)] struct AppState { + artifact_searches: artifact_search::Searches, agent: Arc, chat: Arc, claude: Arc, @@ -558,7 +561,18 @@ fn router(state: AppState, remote_auth: Option) -> Router { "/api/projects/{id}/file/location", get(project_file_location), ) - .route("/api/projects/{id}/files/search", get(search_artifacts)) + .route( + "/api/projects/{id}/files/search", + post(artifact_search::start), + ) + .route( + "/api/projects/{id}/files/search/{search}", + get(artifact_search::status).delete(artifact_search::cancel), + ) + .route( + "/api/projects/{id}/files/search/{search}/continue", + post(artifact_search::resume), + ) .route("/api/projects/{id}/file/latex", post(compile_project_latex)) .route("/api/latex/engine", get(latex_engine)) .route( @@ -4299,30 +4313,6 @@ async fn list_artifacts(Path(id): Path) -> ApiResult { .await } -#[derive(Deserialize)] -struct ArtifactSearchQuery { - q: String, - after: Option, -} - -async fn search_artifacts( - Path(id): Path, - Query(q): Query, -) -> ApiResult { - if q.q.len() > 1024 || q.after.as_ref().is_some_and(|s| s.len() > 4096) { - return Err(bad_request("search query is too long")); - } - blocking_api(move || { - let store = Store::open()?; - let project = store - .get_local_project(&id)? - .ok_or_else(|| not_found("project"))?; - let result = local::files::search(&project, &q.q, q.after.as_deref())?; - Ok(Json(json!(result))) - }) - .await -} - async fn manage_artifact_file( State(state): State, Path(id): Path, diff --git a/src/commands/up/artifact_search.rs b/src/commands/up/artifact_search.rs new file mode 100644 index 000000000..24f2b6db4 --- /dev/null +++ b/src/commands/up/artifact_search.rs @@ -0,0 +1,246 @@ +//! Resumable, leased artifact searches. Limit physical workers even if the OS +//! leaves a cancelled search blocked in a network filesystem syscall. +use super::*; +use crate::local::files::{ArtifactSearch, ArtifactSearchWalk}; +use std::sync::Mutex; +use std::time::Instant; + +// Background browser tabs may throttle heartbeats to once a minute. +const LEASE: Duration = Duration::from_secs(5 * 60); +const BUDGETS: [Option; 3] = [ + Some(Duration::from_secs(1)), + Some(Duration::from_secs(15 * 60)), + None, +]; + +#[derive(Clone)] +pub(super) struct Searches { + jobs: Arc>>>, + workers: Arc, +} +impl Default for Searches { + fn default() -> Self { + Self { + jobs: Default::default(), + workers: Arc::new(tokio::sync::Semaphore::new(2)), + } + } +} + +struct Job { + project: String, + state: Mutex, +} +struct Progress { + status: &'static str, + stage: usize, + deadline: Option, + touched: Instant, + result: Option, + error: Option, +} +impl Progress { + fn new() -> Self { + let now = Instant::now(); + Self { + status: "running", + stage: 0, + deadline: Some(now + BUDGETS[0].unwrap()), + touched: now, + result: None, + error: None, + } + } + fn tick(&mut self, now: Instant) { + if now.duration_since(self.touched) >= LEASE { + self.status = "cancelled"; + } else if self.status == "running" && self.deadline.is_some_and(|d| now >= d) { + self.status = "paused"; + } + } + fn resume(&mut self) -> bool { + if self.status != "paused" || self.stage == 2 { + return false; + } + self.stage += 1; + self.deadline = BUDGETS[self.stage].map(|budget| Instant::now() + budget); + self.status = "running"; + true + } +} +impl Job { + fn running(&self) -> bool { + let mut state = self.state.lock().unwrap(); + state.tick(Instant::now()); + state.status == "running" + } + fn snapshot(&self, id: &str) -> Value { + let mut state = self.state.lock().unwrap(); + state.tick(Instant::now()); + state.touched = Instant::now(); + json!({ "id": id, "status": state.status, "stage": state.stage, + "result": state.result, "error": state.error }) + } +} + +#[derive(Deserialize)] +pub(super) struct SearchRequest { + q: String, + after: Option, +} + +pub(super) async fn start( + State(app): State, + Path(project): Path, + Json(req): Json, +) -> ApiResult { + reject_if_moving(&app)?; + if req.q.len() > 1024 || req.after.as_ref().is_some_and(|s| s.len() > 4096) { + return Err(bad_request("search query is too long")); + } + let id = uuid::Uuid::new_v4().to_string(); + let job = Arc::new(Job { + project: project.clone(), + state: Mutex::new(Progress::new()), + }); + { + let mut jobs = app.artifact_searches.jobs.lock().unwrap(); + jobs.retain(|_, job| job.state.lock().unwrap().touched.elapsed() < LEASE); + if jobs.len() >= 64 { + return Err(bad_request( + "too many artifact searches; cancel an earlier search", + )); + } + jobs.insert(id.clone(), job.clone()); + } + let response = job.snapshot(&id); + tokio::spawn(run(job, app.artifact_searches.workers, req)); + Ok(Json(response)) +} + +async fn run(job: Arc, workers: Arc, req: SearchRequest) { + let mut walk = None; + loop { + if !job.running() { + if job.state.lock().unwrap().status == "cancelled" { + return; + } + tokio::time::sleep(Duration::from_millis(100)).await; + continue; + } + // Waiting for a worker must remain cancellable and respect the timer. + let Ok(Ok(permit)) = + tokio::time::timeout(Duration::from_millis(100), workers.clone().acquire_owned()).await + else { + continue; + }; + let worker_job = job.clone(); + let query = req.q.clone(); + let after = req.after.clone(); + let step = tokio::task::spawn_blocking(move || -> Result<(ArtifactSearchWalk, bool)> { + let _permit = permit; + let mut walk = match walk { + Some(walk) => walk, + None => { + let store = Store::open()?; + let project = store + .get_local_project(&worker_job.project)? + .ok_or_else(|| anyhow!("project not found"))?; + let base = crate::paths::canonicalize(&local::files::ensure_dir(&project)?)?; + ArtifactSearchWalk::new(base, query, after) + } + }; + let complete = walk.advance(|| worker_job.running()); + Ok((walk, complete)) + }) + .await; + let mut state = job.state.lock().unwrap(); + if state.status == "cancelled" { + return; + } + match step { + Ok(Ok((remaining, false))) => walk = Some(remaining), + Ok(Ok((remaining, true))) => { + state.result = Some(remaining.finish()); + state.status = "complete"; + return; + } + error => { + state.error = Some(match error { + Ok(Err(e)) => e.to_string(), + Err(e) => e.to_string(), + _ => unreachable!(), + }); + state.status = "failed"; + return; + } + } + } +} + +fn find(app: &AppState, project: &str, id: &str) -> std::result::Result, ApiError> { + app.artifact_searches + .jobs + .lock() + .unwrap() + .get(id) + .filter(|job| job.project == project) + .cloned() + .ok_or_else(|| not_found("search")) +} +pub(super) async fn status( + State(app): State, + Path((project, id)): Path<(String, String)>, +) -> ApiResult { + Ok(Json(find(&app, &project, &id)?.snapshot(&id))) +} +pub(super) async fn resume( + State(app): State, + Path((project, id)): Path<(String, String)>, +) -> ApiResult { + let job = find(&app, &project, &id)?; + { + let mut state = job.state.lock().unwrap(); + state.tick(Instant::now()); + if state.status != "complete" && !state.resume() { + return Err(bad_request("search is not paused")); + } + state.touched = Instant::now(); + } + Ok(Json(job.snapshot(&id))) +} +pub(super) async fn cancel( + State(app): State, + Path((project, id)): Path<(String, String)>, +) -> ApiResult { + let job = find(&app, &project, &id)?; + job.state.lock().unwrap().status = "cancelled"; + app.artifact_searches.jobs.lock().unwrap().remove(&id); + Ok(Json(json!({ "ok": true }))) +} + +#[cfg(test)] +mod tests { + use super::*; + #[test] + fn budgets_pause_resume_and_expire_instead_of_restarting() { + let mut progress = Progress::new(); + assert!(!progress.resume()); + progress.tick(progress.deadline.unwrap()); + assert_eq!(progress.status, "paused"); + assert!(progress.resume()); + assert_eq!(progress.stage, 1); + assert!( + progress.deadline.unwrap().duration_since(Instant::now()) > Duration::from_secs(899) + ); + progress.touched = progress.deadline.unwrap(); // a polling client keeps the lease alive + progress.tick(progress.deadline.unwrap()); + assert!(progress.resume()); + assert_eq!(progress.stage, 2); + assert!(progress.deadline.is_none()); + assert!(!progress.resume()); + progress.tick(progress.touched + LEASE); + assert_eq!(progress.status, "cancelled"); + assert!(!progress.resume()); + } +} diff --git a/src/local/files.rs b/src/local/files.rs index 3ab07a9e4..4e7798aef 100644 --- a/src/local/files.rs +++ b/src/local/files.rs @@ -93,14 +93,22 @@ fn followed_metadata( canonical_base: &Path, entry: &std::fs::DirEntry, ) -> Option { - let ft = entry.file_type().ok()?; + search_metadata(canonical_base, entry).ok().flatten() +} + +// An excluded link is not an I/O failure. Keep that distinction for searches. +fn search_metadata( + canonical_base: &Path, + entry: &std::fs::DirEntry, +) -> std::io::Result> { + let ft = entry.file_type()?; if ft.is_symlink() { - if !resolves_inside(canonical_base, &entry.path()) { - return None; + if !crate::paths::canonicalize(entry.path())?.starts_with(canonical_base) { + return Ok(None); } - std::fs::metadata(entry.path()).ok() + std::fs::metadata(entry.path()).map(Some) } else { - entry.metadata().ok() + entry.metadata().map(Some) } } @@ -315,7 +323,7 @@ pub struct ArtifactsListing { pub truncated: bool, } -#[derive(Debug, Serialize)] +#[derive(Debug, Clone, Serialize)] #[serde(rename_all = "camelCase")] pub struct ArtifactSearch { pub entries: Vec, @@ -329,109 +337,147 @@ const SEARCH_PAGE_SIZE: usize = 200; /// An on-demand filesystem search, independent of the cheap live-listing cap. /// Keep at most one page + a sentinel in memory; cursors are relative paths, /// not offsets into a truncated tree. No file contents are read. -fn search_dir(base: &Path, query: &str, after: Option<&str>) -> ArtifactSearch { - struct Walk<'a> { - base: &'a Path, - query: &'a str, - after: Option<&'a str>, - hits: std::collections::BTreeMap, - ancestors: std::collections::HashSet, - incomplete: bool, +pub(crate) struct ArtifactSearchWalk { + base: PathBuf, + query: String, + after: Option, + hits: std::collections::BTreeMap, + ancestors: std::collections::HashSet, + stack: Vec<(std::fs::ReadDir, String, PathBuf)>, + started: bool, + incomplete: bool, +} + +impl ArtifactSearchWalk { + pub(crate) fn new(base: PathBuf, query: String, after: Option) -> Self { + Self { + base, + query: query.trim().to_lowercase(), + after, + hits: Default::default(), + ancestors: Default::default(), + stack: Vec::new(), + started: false, + incomplete: false, + } } - impl Walk<'_> { - fn visit(&mut self, dir: &Path, prefix: &str) { - let canonical = match crate::paths::canonicalize(dir) { - Ok(p) if p.starts_with(self.base) => p, - _ => { + + fn enter(&mut self, dir: &Path, prefix: String) { + let canonical = match crate::paths::canonicalize(dir) { + Ok(p) if p.starts_with(&self.base) => p, + _ => { + self.incomplete = true; + return; + } + }; + // Only ancestors: valid aliases remain searchable, cycles do not. + if self.ancestors.contains(&canonical) { + return; + } + match std::fs::read_dir(dir) { + Ok(entries) => { + self.ancestors.insert(canonical.clone()); + self.stack.push((entries, prefix, canonical)); + } + Err(_) => self.incomplete = true, + } + } + + /// Stop between entries, retaining iterators and hits for a real resume. + /// A syscall already blocked inside the filesystem cannot be interrupted. + pub(crate) fn advance(&mut self, keep_running: impl Fn() -> bool) -> bool { + if self.query.is_empty() { + return true; + } + if !keep_running() { + return false; + } + if !self.started { + self.started = true; + self.enter(&self.base.clone(), String::new()); + } + while !self.stack.is_empty() { + if !keep_running() { + return false; + } + let (entries, prefix, _) = self.stack.last_mut().unwrap(); + let Some(entry) = entries.next() else { + let (_, _, canonical) = self.stack.pop().unwrap(); + self.ancestors.remove(&canonical); + continue; + }; + let entry = match entry { + Ok(entry) => entry, + Err(_) => { self.incomplete = true; - return; + continue; } }; - // Track ancestors, not every visited directory: aliases may be valid - // paths in their own right, but a link back up must not recurse forever. - if !self.ancestors.insert(canonical.clone()) { - return; + let name = entry.file_name().to_string_lossy().into_owned(); + if is_ignored(&name) { + continue; } - match std::fs::read_dir(dir) { - Err(_) => self.incomplete = true, - Ok(entries) => { - for result in entries { - let entry = match result { - Ok(e) => e, - Err(_) => { - self.incomplete = true; - continue; - } - }; - let name = entry.file_name().to_string_lossy().into_owned(); - if is_ignored(&name) { - continue; - } - let Some(md) = followed_metadata(self.base, &entry) else { - continue; - }; - let path = if prefix.is_empty() { - name.clone() - } else { - format!("{prefix}/{name}") - }; - if md.is_dir() { - self.visit(&entry.path(), &path); - } else if md.is_file() - && path.to_lowercase().contains(self.query) - && self.after.is_none_or(|after| path.as_str() > after) - { - self.hits.insert( - path.clone(), - ArtifactEntry { - name, - path: path.clone(), - is_dir: false, - size: md.len(), - modified_at: mtime_ms(&md), - presentation: Some(presentation_for_path(&path)), - children: Vec::new(), - }, - ); - if self.hits.len() > SEARCH_PAGE_SIZE + 1 { - self.hits.pop_last(); - } - } - } + let path = if prefix.is_empty() { + name.clone() + } else { + format!("{prefix}/{name}") + }; + let md = match search_metadata(&self.base, &entry) { + Ok(Some(md)) => md, + Ok(None) => continue, + Err(_) => { + self.incomplete = true; + continue; + } + }; + if md.is_dir() { + self.enter(&entry.path(), path); + } else if md.is_file() + && path.to_lowercase().contains(&self.query) + && self.after.as_ref().is_none_or(|after| &path > after) + { + self.hits.insert( + path.clone(), + ArtifactEntry { + name, + path: path.clone(), + is_dir: false, + size: md.len(), + modified_at: mtime_ms(&md), + presentation: Some(presentation_for_path(&path)), + children: Vec::new(), + }, + ); + if self.hits.len() > SEARCH_PAGE_SIZE + 1 { + self.hits.pop_last(); } } - self.ancestors.remove(&canonical); } + true } - let query = query.trim().to_lowercase(); - let mut walk = Walk { - base, - query: &query, - after, - hits: Default::default(), - ancestors: Default::default(), - incomplete: false, - }; - if !query.is_empty() { - walk.visit(base, ""); - } - let has_more = walk.hits.len() > SEARCH_PAGE_SIZE; - let entries: Vec<_> = walk.hits.into_values().take(SEARCH_PAGE_SIZE).collect(); - let next_cursor = if has_more { - entries.last().map(|e| e.path.clone()) - } else { - None - }; - ArtifactSearch { - entries, - next_cursor, - incomplete: walk.incomplete, + + pub(crate) fn finish(self) -> ArtifactSearch { + let has_more = self.hits.len() > SEARCH_PAGE_SIZE; + let entries: Vec<_> = self.hits.into_values().take(SEARCH_PAGE_SIZE).collect(); + let next_cursor = if has_more { + entries.last().map(|e| e.path.clone()) + } else { + None + }; + ArtifactSearch { + entries, + next_cursor, + incomplete: self.incomplete, + } } } -pub fn search(project: &LocalProject, query: &str, after: Option<&str>) -> Result { - let base = crate::paths::canonicalize(&ensure_dir(project)?)?; - Ok(search_dir(&base, query, after)) +#[cfg(test)] +fn search_dir(base: &Path, query: &str, after: Option<&str>) -> ArtifactSearch { + let mut walk = + ArtifactSearchWalk::new(base.to_owned(), query.to_owned(), after.map(str::to_owned)); + assert!(walk.advance(|| true)); + walk.finish() } fn mtime_ms(md: &std::fs::Metadata) -> i64 { @@ -639,6 +685,32 @@ mod tests { let _ = std::fs::remove_dir_all(root); } + #[test] + fn search_resumes_saved_iterators_and_reports_disappearing_metadata() { + let (root, base, _) = scratch(); + for name in ["a.txt", "b.txt", "c.txt"] { + std::fs::write(base.join(name), "x").unwrap(); + } + let canonical = crate::paths::canonicalize(&base).unwrap(); + let mut walk = ArtifactSearchWalk::new(canonical.clone(), ".txt".into(), None); + let steps = std::cell::Cell::new(0); + assert!(!walk.advance(|| { + steps.set(steps.get() + 1); + steps.get() <= 2 + })); + assert_eq!(walk.hits.len(), 1); + // Removing an already visited file demonstrates this is not a rescan. + let visited = walk.hits.keys().next().unwrap().clone(); + std::fs::remove_file(base.join(&visited)).unwrap(); + assert!(!walk.advance(|| false)); + assert!(walk.advance(|| true)); + assert_eq!(walk.finish().entries.len(), 3); + let entry = std::fs::read_dir(&base).unwrap().next().unwrap().unwrap(); + std::fs::remove_file(entry.path()).unwrap(); + assert!(search_metadata(&canonical, &entry).is_err()); + let _ = std::fs::remove_dir_all(root); + } + #[test] fn search_paginates_without_duplicate_or_missing_matches() { let (root, base, _) = scratch(); @@ -684,6 +756,8 @@ mod tests { ["alias/result.md", "reports/result.md"] ); assert!(!result.incomplete); + symlink(base.join("missing"), base.join("broken")).unwrap(); + assert!(search_dir(&canonical, "result", None).incomplete); let _ = std::fs::remove_dir_all(root); } diff --git a/ui/dist/assets/PdfPreview--NppkCR0.js b/ui/dist/assets/PdfPreview-D66I2Zos.js similarity index 99% rename from ui/dist/assets/PdfPreview--NppkCR0.js rename to ui/dist/assets/PdfPreview-D66I2Zos.js index 6c78a2246..8efa3960e 100644 --- a/ui/dist/assets/PdfPreview--NppkCR0.js +++ b/ui/dist/assets/PdfPreview-D66I2Zos.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-CdYShGTw.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-BcXCpPh-.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-CdYShGTw.js b/ui/dist/assets/index-BcXCpPh-.js similarity index 60% rename from ui/dist/assets/index-CdYShGTw.js rename to ui/dist/assets/index-BcXCpPh-.js index 6c6f8af83..72af46f3f 100644 --- a/ui/dist/assets/index-CdYShGTw.js +++ b/ui/dist/assets/index-BcXCpPh-.js @@ -1,5 +1,5 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview--NppkCR0.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); -var hV=Object.defineProperty;var gE=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 Qs=(e,n,t)=>pV(e,typeof n!="symbol"?n+"":n,t),V2=(e,n,t)=>n.has(e)||gE("Cannot "+t);var le=(e,n,t)=>(V2(e,n,"read from private field"),t?t.call(e):n.get(e)),lt=(e,n,t)=>n.has(e)?gE("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ge=(e,n,t,r)=>(V2(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Gt=(e,n,t)=>(V2(e,n,"access private method"),t);var Hp=(e,n,t,r)=>({set _(s){Ge(e,n,s,t)},get _(){return le(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 Em(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var W2={exports:{}},qp={};/** +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/PdfPreview-D66I2Zos.js","assets/PdfPreview-DNMWzGmA.css"])))=>i.map(i=>d[i]); +var pK=Object.defineProperty;var gE=e=>{throw TypeError(e)};var mK=(e,n,t)=>n in e?pK(e,n,{enumerable:!0,configurable:!0,writable:!0,value:t}):e[n]=t;var fs=(e,n,t)=>mK(e,typeof n!="symbol"?n+"":n,t),V2=(e,n,t)=>n.has(e)||gE("Cannot "+t);var le=(e,n,t)=>(V2(e,n,"read from private field"),t?t.call(e):n.get(e)),lt=(e,n,t)=>n.has(e)?gE("Cannot add the same private member more than once"):n instanceof WeakSet?n.add(e):n.set(e,t),Ge=(e,n,t,r)=>(V2(e,n,"write to private field"),r?r.call(e,t):n.set(e,t),t),Gt=(e,n,t)=>(V2(e,n,"access private method"),t);var Hp=(e,n,t,r)=>({set _(s){Ge(e,n,s,t)},get _(){return le(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 Em(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var K2={exports:{}},qp={};/** * @license React * react-jsx-runtime.production.js * @@ -7,7 +7,7 @@ var hV=Object.defineProperty;var gE=e=>{throw TypeError(e)};var pV=(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 vE;function mV(){if(vE)return qp;vE=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 qp.Fragment=n,qp.jsx=t,qp.jsxs=t,qp}var bE;function gV(){return bE||(bE=1,W2.exports=mV()),W2.exports}var _=gV(),Q2={exports:{}},sn={};/** + */var vE;function gK(){if(vE)return qp;vE=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 qp.Fragment=n,qp.jsx=t,qp.jsxs=t,qp}var bE;function vK(){return bE||(bE=1,K2.exports=gK()),K2.exports}var _=vK(),W2={exports:{}},sn={};/** * @license React * react.production.js * @@ -15,7 +15,7 @@ var hV=Object.defineProperty;var gE=e=>{throw TypeError(e)};var pV=(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 yE;function vV(){if(yE)return sn;yE=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"),h=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),p=Symbol.iterator;function m(q){return q===null||typeof q!="object"?null:(q=p&&q[p]||q["@@iterator"],typeof q=="function"?q:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,v={};function b(q,P,F){this.props=q,this.context=P,this.refs=v,this.updater=F||w}b.prototype.isReactComponent={},b.prototype.setState=function(q,P){if(typeof q!="object"&&typeof q!="function"&&q!=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,q,P,"setState")},b.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function y(){}y.prototype=b.prototype;function x(q,P,F){this.props=q,this.context=P,this.refs=v,this.updater=F||w}var C=x.prototype=new y;C.constructor=x,k(C,b.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function j(){}var A={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function M(q,P,F){var re=F.ref;return{$$typeof:e,type:q,key:P,ref:re!==void 0?re:null,props:F}}function D(q,P){return M(q.type,P,q.props)}function I(q){return typeof q=="object"&&q!==null&&q.$$typeof===e}function B(q){var P={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(F){return P[F]})}var G=/\/+/g;function U(q,P){return typeof q=="object"&&q!==null&&q.key!=null?B(""+q.key):P.toString(36)}function Q(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(j,j):(q.status="pending",q.then(function(P){q.status==="pending"&&(q.status="fulfilled",q.value=P)},function(P){q.status==="pending"&&(q.status="rejected",q.reason=P)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function V(q,P,F,re,ie){var ue=typeof q;(ue==="undefined"||ue==="boolean")&&(q=null);var se=!1;if(q===null)se=!0;else switch(ue){case"bigint":case"string":case"number":se=!0;break;case"object":switch(q.$$typeof){case e:case n:se=!0;break;case h:return se=q._init,V(se(q._payload),P,F,re,ie)}}if(se)return ie=ie(q),se=re===""?"."+U(q,0):re,N(ie)?(F="",se!=null&&(F=se.replace(G,"$&/")+"/"),V(ie,P,F,"",function(ce){return ce})):ie!=null&&(I(ie)&&(ie=D(ie,F+(ie.key==null||q&&q.key===ie.key?"":(""+ie.key).replace(G,"$&/")+"/")+se)),P.push(ie)),1;se=0;var K=re===""?".":re+":";if(N(q))for(var oe=0;oe{const n=T.useContext(XO);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},bV=({client:e,children:n})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),_.jsx(XO.Provider,{value:e,children:n})),yV={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var xu,Wk,$O,xV=($O=class{constructor(){lt(this,xu,yV);lt(this,Wk,!1)}setTimeoutProvider(e){Ge(this,xu,e)}setTimeout(e,n){return le(this,xu).setTimeout(e,n)}clearTimeout(e){le(this,xu).clearTimeout(e)}setInterval(e,n){return le(this,xu).setInterval(e,n)}clearInterval(e){le(this,xu).clearInterval(e)}},xu=new WeakMap,Wk=new WeakMap,$O);const $_=new xV;function wV(e){setTimeout(e,0)}const kV=typeof window>"u"||"Deno"in globalThis;function ei(){}function SV(e,n){return typeof e=="function"?e(n):e}function YO(e){return typeof e=="number"&&e>=0&&e!==1/0}function ZO(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Kr(e,n){return typeof e=="function"?e(n):e}function wE(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==Qk(a,n.options))return!1}else if(!Sh(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 kE(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(lf(n.options.mutationKey)!==lf(i))return!1}else if(!Sh(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function Qk(e,n){return((n==null?void 0:n.queryKeyHashFn)||lf)(e)}function lf(e){return JSON.stringify(e,(n,t)=>J4(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function Sh(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=SE(e)&&SE(n);if(!r&&!(J4(e)&&J4(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{$_.setTimeout(n,e)})}function e3(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?Xk(e,n):n}function NV(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function zV(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const Yk=Symbol();function JO(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===Yk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Zk(e,n){return typeof e=="function"?e(...n):!!e}function jV(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 AV=()=>kV;const Jk=()=>AV();var zf=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(){}},H_,wu,ah,BO,TV=(BO=class extends zf{constructor(){super();lt(this,H_);lt(this,wu);lt(this,ah);Ge(this,ah,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){le(this,wu)||this.setEventListener(le(this,ah))}onUnsubscribe(){var n;this.hasListeners()||((n=le(this,wu))==null||n.call(this),Ge(this,wu,void 0))}setEventListener(n){var t;Ge(this,ah,n),(t=le(this,wu))==null||t.call(this),Ge(this,wu,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){le(this,H_)!==n&&(Ge(this,H_,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof le(this,H_)=="boolean"?le(this,H_):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},H_=new WeakMap,wu=new WeakMap,ah=new WeakMap,BO);const eS=new TV,RV=wV;function MV(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=RV;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 Ir=MV();var oh,ku,ch,PO,OV=(PO=class extends zf{constructor(){super();lt(this,oh,!0);lt(this,ku);lt(this,ch);Ge(this,ch,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(){le(this,ku)||this.setEventListener(le(this,ch))}onUnsubscribe(){var n;this.hasListeners()||((n=le(this,ku))==null||n.call(this),Ge(this,ku,void 0))}setEventListener(n){var t;Ge(this,ch,n),(t=le(this,ku))==null||t.call(this),Ge(this,ku,n(this.setOnline.bind(this)))}setOnline(n){le(this,oh)!==n&&(Ge(this,oh,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return le(this,oh)}},oh=new WeakMap,ku=new WeakMap,ch=new WeakMap,PO);const wv=new OV;function DV(e){return Math.min(1e3*2**e,3e4)}function eD(e){return(e??"online")==="online"?wv.isOnline():!0}var kv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function LV(e){return e instanceof kv}function tD(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((y,x)=>{i=y,a=x});o.catch(ei);const c=()=>s!=="pending",u=y=>{var x;if(!c()){const C=new kv(y);k(C),(x=e.onCancel)==null||x.call(e,C)}},h=()=>{n=!0},f=()=>{n=!1},p=()=>eS.isFocused()&&(e.networkMode==="always"||wv.isOnline())&&e.canRun(),m=()=>eD(e.networkMode)&&e.canRun(),w=y=>{c()||(r==null||r(),s="resolved",i(y))},k=y=>{c()||(r==null||r(),s="rejected",a(y))},v=()=>new Promise(y=>{var x;r=C=>{(c()||p())&&y(C)},(x=e.onPause)==null||x.call(e)}).then(()=>{var y;r=void 0,c()||(y=e.onContinue)==null||y.call(e)}),b=()=>{if(c())return;let y;const x=t===0?e.initialPromise:void 0;try{y=x??e.fn()}catch(C){y=Promise.reject(C)}Promise.resolve(y).then(w).catch(C=>{var M;if(c())return;const N=e.retry??(Jk()?0:3),j=e.retryDelay??DV,A=typeof j=="function"?j(t,C):j,z=N===!0||typeof N=="number"&&tp()?void 0:v()).then(()=>{n?k(C):b()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:h,continueRetry:f,canStart:m,start:()=>(m()?b():v().then(b),o)}}var q_,FO,nD=(FO=class{constructor(){lt(this,q_)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),YO(this.gcTime)&&Ge(this,q_,$_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Jk()?1/0:3e5))}clearGcTimeout(){le(this,q_)!==void 0&&($_.clearTimeout(le(this,q_)),Ge(this,q_,void 0))}},q_=new WeakMap,FO);function IV(e){return{onFetch:(n,t)=>{var h,f,p,m,w;const r=n.options,s=(p=(f=(h=n.fetchOptions)==null?void 0:h.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=x=>{jV(x,()=>n.signal,()=>k=!0)},b=JO(n.options,n.fetchOptions),y=async(x,C,N)=>{if(k)return Promise.reject(n.signal.reason);if(C==null&&x.pages.length)return Promise.resolve(x);const A=(()=>{const I={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return v(I),I})(),z=await b(A),{maxPages:M}=n.options,D=N?zV:NV;return{pages:D(x.pages,z,M),pageParams:D(x.pageParams,C,M)}};if(s&&i.length){const x=s==="backward",C=x?rD:t3,N={pages:i,pageParams:a};o=await y(N,C(r,N),x)}else{const x=e??i.length;do{const C=c===0?a[0]??r.initialPageParam:t3(r,o);if(c>0&&C==null)break;o=await y(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 t3(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 rD(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 $V(e,n){return n?t3(e,n)!=null:!1}function BV(e,n){return!n||!e.getPreviousPageParam?!1:rD(e,n)!=null}var lh,U_,uh,Fa,G_,Cs,fm,K_,so,tl,HO,PV=(HO=class extends nD{constructor(n){super();lt(this,so);lt(this,lh);lt(this,U_);lt(this,uh);lt(this,Fa);lt(this,G_);lt(this,Cs);lt(this,fm);lt(this,K_);Ge(this,K_,!1),Ge(this,fm,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ge(this,G_,n.client),Ge(this,Fa,le(this,G_).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ge(this,U_,NE(this.options)),this.state=n.state??le(this,U_),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return le(this,lh)}get promise(){var n;return(n=le(this,Cs))==null?void 0:n.promise}setOptions(n){if(this.options={...le(this,fm),...n},n!=null&&n._type&&Ge(this,lh,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=NE(this.options);t.data!==void 0&&(this.setState(EE(t.data,t.dataUpdatedAt)),Ge(this,U_,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&le(this,Fa).remove(this)}setData(n,t){const r=e3(this.state.data,n,this.options);return Gt(this,so,tl).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){Gt(this,so,tl).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=le(this,Cs))==null?void 0:r.promise;return(s=le(this,Cs))==null||s.cancel(n),t?t.then(ei).catch(ei):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return le(this,U_)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Kr(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yk||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Kr(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:!ZO(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=le(this,Cs))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=le(this,Cs))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),le(this,Fa).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||(le(this,Cs)&&(le(this,K_)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?le(this,Cs).cancel({revert:!0}):le(this,Cs).cancelRetry()),this.scheduleGc()),le(this,Fa).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Gt(this,so,tl).call(this,{type:"invalidate"})}async fetch(n,t){var u,h,f,p,m,w,k,v,b,y,x,C;if(this.state.fetchStatus!=="idle"&&((u=le(this,Cs))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(le(this,Cs))return le(this,Cs).continueRetry(),le(this,Cs).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(j=>j.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ge(this,K_,!0),r.signal)})},i=()=>{const N=JO(this.options,t),A=(()=>{const z={client:le(this,G_),queryKey:this.queryKey,meta:this.meta};return s(z),z})();return Ge(this,K_,!1),this.options.persister?this.options.persister(N,A,this):N(A)},o=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:le(this,G_),state:this.state,fetchFn:i};return s(N),N})();(h=le(this,lh)==="infinite"?IV(this.options.pages):this.options.behavior)==null||h.onFetch(o,this),Ge(this,uh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Gt(this,so,tl).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const c=Ge(this,Cs,tD({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:N=>{N instanceof kv&&N.revert&&this.setState({...le(this,uh),fetchStatus:"idle"}),r.abort()},onFail:(N,j)=>{Gt(this,so,tl).call(this,{type:"failed",failureCount:N,error:j})},onPause:()=>{Gt(this,so,tl).call(this,{type:"pause"})},onContinue:()=>{Gt(this,so,tl).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=le(this,Fa).config).onSuccess)==null||w.call(m,N,this),(v=(k=le(this,Fa).config).onSettled)==null||v.call(k,N,this.state.error,this),N}catch(N){if(N instanceof kv){if(N.silent)return le(this,Cs).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Gt(this,so,tl).call(this,{type:"error",error:N}),(y=(b=le(this,Fa).config).onError)==null||y.call(b,N,this),(C=(x=le(this,Fa).config).onSettled)==null||C.call(x,this.state.data,N,this),N}finally{le(this,Cs)===c&&Ge(this,Cs,void 0),this.scheduleGc()}}},lh=new WeakMap,U_=new WeakMap,uh=new WeakMap,Fa=new WeakMap,G_=new WeakMap,Cs=new WeakMap,fm=new WeakMap,K_=new WeakMap,so=new WeakSet,tl=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,...sD(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...EE(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,uh,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),Ir.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),le(this,Fa).notify({query:this,type:"updated",action:n})})},HO);function sD(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:eD(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function EE(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function NE(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 di,Ln,dm,hi,V_,_h,il,hm,fh,dh,W_,Q_,Su,hh,sr,l0,n3,r3,s3,i3,a3,o3,c3,l3,qO,Rb=(qO=class extends zf{constructor(n,t){super();lt(this,sr);lt(this,di);lt(this,Ln);lt(this,dm);lt(this,hi);lt(this,V_);lt(this,_h);lt(this,il);lt(this,hm);lt(this,fh);lt(this,dh);lt(this,W_);lt(this,Q_);lt(this,Su);lt(this,hh,new Set);this.options=t,Ge(this,di,n),Ge(this,il,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(le(this,Ln).addObserver(this),zE(le(this,Ln),this.options)?Gt(this,sr,l0).call(this):this.updateResult(),Gt(this,sr,a3).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return u3(le(this,Ln),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return u3(le(this,Ln),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Gt(this,sr,o3).call(this),Gt(this,sr,c3).call(this),le(this,Ln).removeObserver(this)}setOptions(n){const t=this.options,r=le(this,Ln);if(this.options=le(this,di).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Kr(this.options.enabled,le(this,Ln))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Gt(this,sr,l3).call(this),le(this,Ln).setOptions(this.options),t._defaulted&&!p0(this.options,t)&&le(this,di).getQueryCache().notify({type:"observerOptionsUpdated",query:le(this,Ln),observer:this});const s=this.hasListeners();s&&jE(le(this,Ln),r,this.options,t)&&Gt(this,sr,l0).call(this),this.updateResult(),s&&(le(this,Ln)!==r||Kr(this.options.enabled,le(this,Ln))!==Kr(t.enabled,le(this,Ln))||Kr(this.options.staleTime,le(this,Ln))!==Kr(t.staleTime,le(this,Ln)))&&Gt(this,sr,r3).call(this);const i=Gt(this,sr,s3).call(this);s&&(le(this,Ln)!==r||Kr(this.options.enabled,le(this,Ln))!==Kr(t.enabled,le(this,Ln))||i!==le(this,Su))&&Gt(this,sr,i3).call(this,i)}getOptimisticResult(n){const t=le(this,di).getQueryCache().build(le(this,di),n),r=this.createResult(t,n);return p0(this.getCurrentResult(),r)||(Ge(this,hi,r),Ge(this,_h,this.options),Ge(this,V_,le(this,Ln).state)),r}getCurrentResult(){return le(this,hi)}trackResult(n,t){return new Proxy(n,{get:(r,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(r,s))})}trackProp(n){le(this,hh).add(n)}getCurrentQuery(){return le(this,Ln)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=le(this,di).defaultQueryOptions(n),r=le(this,di).getQueryCache().build(le(this,di),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=le(this,di).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 Gt(this,sr,l0).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),le(this,hi)))}createResult(n,t){var j;const r=le(this,Ln),s=this.options,i=le(this,hi),a=le(this,V_),o=le(this,_h),c=n!==r?n.state:le(this,dm),{state:u}=n;let h={...u},f=!1,p;if(t._optimisticResults){const A=this.hasListeners(),z=!A&&zE(n,t),M=A&&jE(n,r,t,s);(z||M)&&(h={...h,...sD(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:w,status:k}=h;p=h.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((j=le(this,dh))==null?void 0:j.state.data,le(this,dh)):t.placeholderData,A!==void 0&&(k="success",p=e3(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===le(this,hm))p=le(this,fh);else try{Ge(this,hm,t.select),p=t.select(p),p=e3(i==null?void 0:i.data,p,t),Ge(this,fh,p),Ge(this,il,null)}catch(A){Ge(this,il,A)}else p===void 0&&Ge(this,il,null);le(this,il)&&(m=le(this,il),p=le(this,fh),w=Date.now(),k="error",f=!1);const b=h.fetchStatus==="fetching",y=k==="pending",x=k==="error",C=y&&b,N=p!==void 0;return{status:k,fetchStatus:h.fetchStatus,isPending:y,isSuccess:k==="success",isError:x,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:x&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&N,isStale:tS(n,t),refetch:this.refetch,isEnabled:Kr(t.enabled,n)!==!1}}updateResult(){const n=le(this,hi),t=this.createResult(le(this,Ln),this.options);if(Ge(this,V_,le(this,Ln).state),Ge(this,_h,this.options),le(this,V_).data!==void 0&&Ge(this,dh,le(this,Ln)),p0(t,n))return;Ge(this,hi,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!le(this,hh).size)return!0;const o=new Set(a??le(this,hh));return this.options.throwOnError&&o.add("error"),Object.keys(le(this,hi)).some(c=>{const u=c;return le(this,hi)[u]!==n[u]&&o.has(u)})})();Ir.batch(()=>{s&&this.listeners.forEach(i=>{i(le(this,hi))}),le(this,di).getQueryCache().notify({query:le(this,Ln),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Gt(this,sr,a3).call(this)}},di=new WeakMap,Ln=new WeakMap,dm=new WeakMap,hi=new WeakMap,V_=new WeakMap,_h=new WeakMap,il=new WeakMap,hm=new WeakMap,fh=new WeakMap,dh=new WeakMap,W_=new WeakMap,Q_=new WeakMap,Su=new WeakMap,hh=new WeakMap,sr=new WeakSet,l0=function(n){Gt(this,sr,l3).call(this);let t=le(this,Ln).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(ei)),t},n3=function(n){return!Jk()&&Kr(this.options.enabled,le(this,Ln))!==!1&&YO(n)},r3=function(){Gt(this,sr,o3).call(this);const n=Kr(this.options.staleTime,le(this,Ln));if(le(this,hi).isStale||!Gt(this,sr,n3).call(this,n))return;const t=ZO(le(this,hi).dataUpdatedAt,n)+1;Ge(this,W_,$_.setTimeout(()=>{le(this,hi).isStale||this.updateResult()},t))},s3=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(le(this,Ln)):this.options.refetchInterval)??!1},i3=function(n){Gt(this,sr,c3).call(this),Ge(this,Su,n),!(le(this,Su)===0||!Gt(this,sr,n3).call(this,le(this,Su)))&&Ge(this,Q_,$_.setInterval(()=>{(this.options.refetchIntervalInBackground||eS.isFocused())&&Gt(this,sr,l0).call(this)},le(this,Su)))},a3=function(){Gt(this,sr,r3).call(this),Gt(this,sr,i3).call(this,Gt(this,sr,s3).call(this))},o3=function(){le(this,W_)!==void 0&&($_.clearTimeout(le(this,W_)),Ge(this,W_,void 0))},c3=function(){le(this,Q_)!==void 0&&($_.clearInterval(le(this,Q_)),Ge(this,Q_,void 0))},l3=function(){const n=le(this,di).getQueryCache().build(le(this,di),this.options);if(n===le(this,Ln))return;const t=le(this,Ln);Ge(this,Ln,n),Ge(this,dm,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},qO);function FV(e,n){return Kr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Kr(n.retryOnMount,e)===!1)}function zE(e,n){return FV(e,n)||e.state.data!==void 0&&u3(e,n,n.refetchOnMount)}function u3(e,n,t){if(Kr(n.enabled,e)!==!1&&Kr(n.staleTime,e)!=="static"){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&tS(e,n)}return!1}function jE(e,n,t,r){return(e!==n||Kr(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&tS(e,t)}function tS(e,n){return Kr(n.enabled,e)!==!1&&e.isStaleByTime(Kr(n.staleTime,e))}var HV=class extends Rb{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",h=s&&c==="forward",f=a&&c==="backward",p=s&&c==="backward";return{...r,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:$V(n,t.data),hasPreviousPage:BV(n,t.data),isFetchNextPageError:u,isFetchingNextPage:h,isFetchPreviousPageError:f,isFetchingPreviousPage:p,isRefetchError:o&&!u&&!f,isRefetching:i&&!h&&!p}}},pm,Yo,Ys,X_,Zo,mu,UO,qV=(UO=class extends nD{constructor(n){super();lt(this,Zo);lt(this,pm);lt(this,Yo);lt(this,Ys);lt(this,X_);Ge(this,pm,n.client),this.mutationId=n.mutationId,Ge(this,Ys,n.mutationCache),Ge(this,Yo,[]),this.state=n.state||iD(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){le(this,Yo).includes(n)||(le(this,Yo).push(n),this.clearGcTimeout(),le(this,Ys).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ge(this,Yo,le(this,Yo).filter(t=>t!==n)),this.scheduleGc(),le(this,Ys).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){le(this,Yo).length||(this.state.status==="pending"?this.scheduleGc():le(this,Ys).remove(this))}continue(){var n;return((n=le(this,X_))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,c,u,h,f,p,m,w,k,v,b,y,x,C,N,j,A,z;const t=()=>{Gt(this,Zo,mu).call(this,{type:"continue"})},r={client:le(this,pm),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,X_,tD({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,D)=>{Gt(this,Zo,mu).call(this,{type:"failed",failureCount:M,error:D})},onPause:()=>{Gt(this,Zo,mu).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>le(this,Ys).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{Gt(this,Zo,mu).call(this,{type:"pending",variables:n,isPaused:a}),le(this,Ys).config.onMutate&&await le(this,Ys).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&&Gt(this,Zo,mu).call(this,{type:"pending",context:D,variables:n,isPaused:a})}const M=await s.start();return await((h=(u=le(this,Ys).config).onSuccess)==null?void 0:h.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=le(this,Ys).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)),Gt(this,Zo,mu).call(this,{type:"success",data:M}),M}catch(M){try{await((y=(b=le(this,Ys).config).onError)==null?void 0:y.call(b,M,n,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(x=this.options).onError)==null?void 0:C.call(x,M,n,this.state.context,r))}catch(D){Promise.reject(D)}try{await((j=(N=le(this,Ys).config).onSettled)==null?void 0:j.call(N,void 0,M,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((z=(A=this.options).onSettled)==null?void 0:z.call(A,void 0,M,n,this.state.context,r))}catch(D){Promise.reject(D)}throw Gt(this,Zo,mu).call(this,{type:"error",error:M}),M}finally{le(this,X_)===s&&Ge(this,X_,void 0),le(this,Ys).runNext(this)}}},pm=new WeakMap,Yo=new WeakMap,Ys=new WeakMap,X_=new WeakMap,Zo=new WeakSet,mu=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),Ir.batch(()=>{le(this,Yo).forEach(r=>{r.onMutationUpdate(n)}),le(this,Ys).notify({mutation:this,type:"updated",action:n})})},UO);function iD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var al,io,mm,GO,UV=(GO=class extends zf{constructor(n={}){super();lt(this,al);lt(this,io);lt(this,mm);this.config=n,Ge(this,al,new Set),Ge(this,io,new Map),Ge(this,mm,0)}build(n,t,r){const s=new qV({client:n,mutationCache:this,mutationId:++Hp(this,mm)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){le(this,al).add(n);const t=Zg(n);if(typeof t=="string"){const r=le(this,io).get(t);r?r.push(n):le(this,io).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(le(this,al).delete(n)){const t=Zg(n);if(typeof t=="string"){const r=le(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&&le(this,io).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=Zg(n);if(typeof t=="string"){const s=(r=le(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=Zg(n);return typeof t=="string"?((s=(r=le(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(){Ir.batch(()=>{le(this,al).forEach(n=>{this.notify({type:"removed",mutation:n})}),le(this,al).clear(),le(this,io).clear()})}getAll(){return Array.from(le(this,al))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>kE(t,r))}findAll(n={}){return this.getAll().filter(t=>kE(n,t))}notify(n){Ir.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Ir.batch(()=>Promise.all(n.map(t=>t.continue().catch(ei))))}},al=new WeakMap,io=new WeakMap,mm=new WeakMap,GO);function Zg(e){var n;return(n=e.options.scope)==null?void 0:n.id}var ol,Cu,Zs,cl,sc,u0,_3,KO,GV=(KO=class extends zf{constructor(t,r){super();lt(this,sc);lt(this,ol);lt(this,Cu);lt(this,Zs);lt(this,cl);Ge(this,ol,t),this.setOptions(r),this.bindMethods(),Gt(this,sc,u0).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=le(this,ol).defaultMutationOptions(t),p0(this.options,r)||le(this,ol).getMutationCache().notify({type:"observerOptionsUpdated",mutation:le(this,Zs),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&lf(r.mutationKey)!==lf(this.options.mutationKey)?this.reset():((s=le(this,Zs))==null?void 0:s.state.status)==="pending"&&le(this,Zs).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&le(this,Zs)&&(le(this,Zs).addObserver(this),Gt(this,sc,u0).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=le(this,Zs))==null||t.removeObserver(this)}onMutationUpdate(t){Gt(this,sc,u0).call(this),Gt(this,sc,_3).call(this,t)}getCurrentResult(){return le(this,Cu)}reset(){var t;(t=le(this,Zs))==null||t.removeObserver(this),Ge(this,Zs,void 0),Gt(this,sc,u0).call(this),Gt(this,sc,_3).call(this)}mutate(t,r){var s;return Ge(this,cl,r),(s=le(this,Zs))==null||s.removeObserver(this),Ge(this,Zs,le(this,ol).getMutationCache().build(le(this,ol),this.options)),le(this,Zs).addObserver(this),le(this,Zs).execute(t)}},ol=new WeakMap,Cu=new WeakMap,Zs=new WeakMap,cl=new WeakMap,sc=new WeakSet,u0=function(){var r;const t=((r=le(this,Zs))==null?void 0:r.state)??iD();Ge(this,Cu,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},_3=function(t){Ir.batch(()=>{var r,s,i,a,o,c,u,h;if(le(this,cl)&&this.hasListeners()){const f=le(this,Cu).variables,p=le(this,Cu).context,m={client:le(this,ol),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=le(this,cl)).onSuccess)==null||s.call(r,t.data,f,p,m)}catch(w){Promise.reject(w)}try{(a=(i=le(this,cl)).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=le(this,cl)).onError)==null||c.call(o,t.error,f,p,m)}catch(w){Promise.reject(w)}try{(h=(u=le(this,cl)).onSettled)==null||h.call(u,void 0,t.error,f,p,m)}catch(w){Promise.reject(w)}}}this.listeners.forEach(f=>{f(le(this,Cu))})})},KO);function AE(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var ph,pi,mh,Y_,ua,Z_,gm,vm,bm,ym,js,f3,d3,aD,h3,p3,m3,VO,KV=(VO=class extends zf{constructor(n,t,r){super();lt(this,js);lt(this,ph);lt(this,pi);lt(this,mh);lt(this,Y_);lt(this,ua);lt(this,Z_);lt(this,gm);lt(this,vm);lt(this,bm);lt(this,ym,[]);Ge(this,ph,n),Ge(this,Y_,r),Ge(this,mh,[]),Ge(this,ua,[]),Ge(this,pi,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&le(this,ua).forEach(n=>{n.subscribe(t=>{Gt(this,js,p3).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,le(this,ua).forEach(n=>{n.destroy()})}setQueries(n,t){Ge(this,mh,n),Ge(this,Y_,t),Ir.batch(()=>{const r=le(this,ua),s=Gt(this,js,h3).call(this,le(this,mh));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,h=u?!0:a.some((f,p)=>{const m=le(this,pi)[p];return!m||!p0(f,m)});!u&&!h||(u&&(Ge(this,ym,s),Ge(this,ua,i)),Ge(this,pi,a),this.hasListeners()&&(u&&(AE(r,i).forEach(f=>{f.destroy()}),AE(i,r).forEach(f=>{f.subscribe(p=>{Gt(this,js,p3).call(this,f,p)})})),Gt(this,js,m3).call(this)))})}getCurrentResult(){return le(this,pi)}getQueries(){return le(this,ua).map(n=>n.getCurrentQuery())}getObservers(){return le(this,ua)}getOptimisticResult(n,t){const r=Gt(this,js,h3).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Gt(this,js,d3).call(this,a??s,t,i),()=>Gt(this,js,f3).call(this,s,r)]}},ph=new WeakMap,pi=new WeakMap,mh=new WeakMap,Y_=new WeakMap,ua=new WeakMap,Z_=new WeakMap,gm=new WeakMap,vm=new WeakMap,bm=new WeakMap,ym=new WeakMap,js=new WeakSet,f3=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)}))})})},d3=function(n,t,r){if(t){const s=le(this,bm),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(le(this,pi)!==le(this,vm)||i||t!==le(this,gm))&&(Ge(this,gm,t),Ge(this,vm,le(this,pi)),r!==void 0&&Ge(this,bm,r),Ge(this,Z_,Xk(le(this,Z_),t(n)))),le(this,Z_)}return n},aD=function(){var n;return!((n=le(this,Y_))!=null&&n.combine)||le(this,ua).some((t,r)=>{var s;return t.options.suspense&&((s=le(this,pi)[r])==null?void 0:s.data)===void 0})},h3=function(n){const t=new Map;le(this,ua).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=le(this,ph).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new Rb(le(this,ph),i);r.push({defaultedQueryOptions:i,observer:a})}),r},p3=function(n,t){const r=le(this,ua).indexOf(n);r!==-1&&(Ge(this,pi,le(this,pi).slice()),le(this,pi)[r]=t,Gt(this,js,m3).call(this))},m3=function(){var n;if(this.hasListeners()){const t=Gt(this,js,aD).call(this),r=le(this,Z_),s=t?r:Gt(this,js,d3).call(this,Gt(this,js,f3).call(this,le(this,pi),le(this,ym)),(n=le(this,Y_))==null?void 0:n.combine);(t||r!==s)&&Ir.batch(()=>{this.listeners.forEach(i=>{i(le(this,pi))})})}},VO),Jo,WO,VV=(WO=class extends zf{constructor(n={}){super();lt(this,Jo);this.config=n,Ge(this,Jo,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??Qk(s,t);let a=this.get(i);return a||(a=new PV({client:n,queryKey:s,queryHash:i,options:n.defaultQueryOptions(t),state:r,defaultOptions:n.getQueryDefaults(s)}),this.add(a)),a}add(n){le(this,Jo).has(n.queryHash)||(le(this,Jo).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=le(this,Jo).get(n.queryHash);t&&(n.destroy(),t===n&&le(this,Jo).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Ir.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return le(this,Jo).get(n)}getAll(){return[...le(this,Jo).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>wE(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>wE(n,r)):t}notify(n){Ir.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Ir.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Ir.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Jo=new WeakMap,WO),Dr,Eu,Nu,gh,vh,zu,bh,yh,QO,WV=(QO=class{constructor(e={}){lt(this,Dr);lt(this,Eu);lt(this,Nu);lt(this,gh);lt(this,vh);lt(this,zu);lt(this,bh);lt(this,yh);Ge(this,Dr,e.queryCache||new VV),Ge(this,Eu,e.mutationCache||new UV),Ge(this,Nu,e.defaultOptions||{}),Ge(this,gh,new Map),Ge(this,vh,new Map),Ge(this,zu,0)}mount(){Hp(this,zu)._++,le(this,zu)===1&&(Ge(this,bh,eS.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Dr).onFocus())})),Ge(this,yh,wv.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Dr).onOnline())})))}unmount(){var e,n;Hp(this,zu)._--,le(this,zu)===0&&((e=le(this,bh))==null||e.call(this),Ge(this,bh,void 0),(n=le(this,yh))==null||n.call(this),Ge(this,yh,void 0))}isFetching(e){return le(this,Dr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return le(this,Eu).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=le(this,Dr).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=le(this,Dr).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Kr(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return le(this,Dr).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var a;const r=this.defaultQueryOptions({queryKey:e}),s=(a=le(this,Dr).get(r.queryHash))==null?void 0:a.state.data,i=SV(n,s);if(i!==void 0)return le(this,Dr).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return Ir.batch(()=>le(this,Dr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=le(this,Dr).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=le(this,Dr);Ir.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=le(this,Dr);return Ir.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=Ir.batch(()=>le(this,Dr).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(ei).catch(ei)}invalidateQueries(e,n={}){return Ir.batch(()=>(le(this,Dr).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=Ir.batch(()=>le(this,Dr).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(ei)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(ei)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=le(this,Dr).build(this,n),r=t.isStaleByTime(Kr(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=le(this,Dr).build(this,n);return t.isStaleByTime(Kr(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ei).catch(ei)}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(ei).catch(ei)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return wv.isOnline()?le(this,Eu).resumePausedMutations():Promise.resolve()}getQueryCache(){return le(this,Dr)}getMutationCache(){return le(this,Eu)}getDefaultOptions(){return le(this,Nu)}setDefaultOptions(e){Ge(this,Nu,e)}setQueryDefaults(e,n){le(this,gh).set(lf(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...le(this,gh).values()],t={};return n.forEach(r=>{Sh(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){le(this,vh).set(lf(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...le(this,vh).values()],t={};return n.forEach(r=>{Sh(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...le(this,Nu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Qk(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===Yk&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...le(this,Nu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){le(this,Dr).clear(),le(this,Eu).clear()}},Dr=new WeakMap,Eu=new WeakMap,Nu=new WeakMap,gh=new WeakMap,vh=new WeakMap,zu=new WeakMap,bh=new WeakMap,yh=new WeakMap,QO);const oD=T.createContext(!1),cD=()=>T.useContext(oD);oD.Provider;function QV(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const XV=T.createContext(QV()),lD=()=>T.useContext(XV),uD=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?Zk(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},_D=e=>{T.useEffect(()=>{e.clearReset()},[e])},fD=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Zk(t,[e.error,r])),dD=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))}},g3=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,hD=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function YV({queries:e,...n},t){const r=zm(),s=cD(),i=lD(),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=>{dD(k);const v=r.getQueryCache().get(k.queryHash);uD(k,i,v)}),_D(i);const[c]=T.useState(()=>new KV(r,o,n)),[u,h,f]=c.getOptimisticResult(o,n.combine),p=!s&&a;T.useSyncExternalStore(T.useCallback(k=>p?c.subscribe(Ir.batchCalls(k)):ei,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setQueries(o,n)},[o,n,c]);const m=u.some((k,v)=>g3(o[v],k))?u.flatMap((k,v)=>{const b=o[v];if(b&&g3(b,k)){const y=new Rb(r,b);return hD(b,y,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const w=u.find((k,v)=>{const b=o[v];return b&&fD({result:k,errorResetBoundary:i,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(w)throw w.error;return h(f())}function pD(e,n,t){const r=cD(),s=lD(),i=zm(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,dD(a),uD(a,s,o),_D(s);const[u]=T.useState(()=>new n(i,a)),h=u.getOptimisticResult(a),f=!r&&c;if(T.useSyncExternalStore(T.useCallback(p=>{const m=f?u.subscribe(Ir.batchCalls(p)):ei;return u.updateResult(),m},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),T.useEffect(()=>{u.setOptions(a)},[a,u]),g3(a,h))throw hD(a,u,s);if(fD({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return a.notifyOnChangeProps?h:u.trackResult(h)}function ut(e,n){return pD(e,Rb)}function ZV(e,n){const t=zm(),r=t.getQueryCache();return T.useSyncExternalStore(T.useCallback(s=>r.subscribe(Ir.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function pn(e,n){const t=zm(),[r]=T.useState(()=>new GV(t,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const s=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Ir.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=T.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(ei)},[r]);if(s.error&&Zk(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}function JV(e,n){return pD(e,HV)}const tt=new WV({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),bl=new Set;let TE=null,Mb=0;const v3=new Set,eW=()=>Mb,RE=e=>(v3.add(e),()=>{v3.delete(e)}),yi=()=>["workspace",Mb],kt=(e,...n)=>[...yi(),e,...n];function tW(e,n=!1){if(TE===e&&!n)return!1;const t=yi();return TE=e,Mb++,bl.clear(),nS({queryKey:t}),v3.forEach(r=>r()),!0}const zn=e=>e[1]===Mb;async function nS(e){await tt.cancelQueries(e,{revert:!1}),tt.removeQueries(e)}function Vr(e,n){if(zn(e))return tt.setQueryData(e,n)}var X2={exports:{}},Up={},Y2={exports:{}},Z2={};/** + */var yE;function bK(){if(yE)return sn;yE=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"),h=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 b(F,U,H){this.props=F,this.context=U,this.refs=v,this.updater=H||w}b.prototype.isReactComponent={},b.prototype.setState=function(F,U){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,U,"setState")},b.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function y(){}y.prototype=b.prototype;function x(F,U,H){this.props=F,this.context=U,this.refs=v,this.updater=H||w}var C=x.prototype=new y;C.constructor=x,k(C,b.prototype),C.isPureReactComponent=!0;var N=Array.isArray;function j(){}var A={H:null,A:null,T:null,S:null},z=Object.prototype.hasOwnProperty;function M(F,U,H){var oe=H.ref;return{$$typeof:e,type:F,key:U,ref:oe!==void 0?oe:null,props:H}}function D(F,U){return M(F.type,U,F.props)}function I(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function B(F){var U={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(H){return U[H]})}var G=/\/+/g;function q(F,U){return typeof F=="object"&&F!==null&&F.key!=null?B(""+F.key):U.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(j,j):(F.status="pending",F.then(function(U){F.status==="pending"&&(F.status="fulfilled",F.value=U)},function(U){F.status==="pending"&&(F.status="rejected",F.reason=U)})),F.status){case"fulfilled":return F.value;case"rejected":throw F.reason}}throw F}function K(F,U,H,oe,ae){var ue=typeof F;(ue==="undefined"||ue==="boolean")&&(F=null);var se=!1;if(F===null)se=!0;else switch(ue){case"bigint":case"string":case"number":se=!0;break;case"object":switch(F.$$typeof){case e:case n:se=!0;break;case h:return se=F._init,K(se(F._payload),U,H,oe,ae)}}if(se)return ae=ae(F),se=oe===""?"."+q(F,0):oe,N(ae)?(H="",se!=null&&(H=se.replace(G,"$&/")+"/"),K(ae,U,H,"",function(ce){return ce})):ae!=null&&(I(ae)&&(ae=D(ae,H+(ae.key==null||F&&F.key===ae.key?"":(""+ae.key).replace(G,"$&/")+"/")+se)),U.push(ae)),1;se=0;var V=oe===""?".":oe+":";if(N(F))for(var ne=0;ne{const n=T.useContext(YO);if(!n)throw new Error("No QueryClient set, use QueryClientProvider to set one");return n},yK=({client:e,children:n})=>(T.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),_.jsx(YO.Provider,{value:e,children:n})),xK={setTimeout:(e,n)=>setTimeout(e,n),clearTimeout:e=>clearTimeout(e),setInterval:(e,n)=>setInterval(e,n),clearInterval:e=>clearInterval(e)};var xu,Kk,BO,wK=(BO=class{constructor(){lt(this,xu,xK);lt(this,Kk,!1)}setTimeoutProvider(e){Ge(this,xu,e)}setTimeout(e,n){return le(this,xu).setTimeout(e,n)}clearTimeout(e){le(this,xu).clearTimeout(e)}setInterval(e,n){return le(this,xu).setInterval(e,n)}clearInterval(e){le(this,xu).clearInterval(e)}},xu=new WeakMap,Kk=new WeakMap,BO);const B_=new wK;function kK(e){setTimeout(e,0)}const SK=typeof window>"u"||"Deno"in globalThis;function ti(){}function CK(e,n){return typeof e=="function"?e(n):e}function ZO(e){return typeof e=="number"&&e>=0&&e!==1/0}function JO(e,n){return Math.max(e+(n||0)-Date.now(),0)}function Vr(e,n){return typeof e=="function"?e(n):e}function wE(e,n){const{type:t="all",exact:r,fetchStatus:s,predicate:i,queryKey:a,stale:o}=e;if(a){if(r){if(n.queryHash!==Wk(a,n.options))return!1}else if(!Sh(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 kE(e,n){const{exact:t,status:r,predicate:s,mutationKey:i}=e;if(i){if(!n.options.mutationKey)return!1;if(t){if(uf(n.options.mutationKey)!==uf(i))return!1}else if(!Sh(n.options.mutationKey,i))return!1}return!(r&&n.state.status!==r||s&&!s(n))}function Wk(e,n){return((n==null?void 0:n.queryKeyHashFn)||uf)(e)}function uf(e){return JSON.stringify(e,(n,t)=>Z4(t)?Object.keys(t).sort().reduce((r,s)=>(r[s]=t[s],r),{}):t)}function Sh(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=SE(e)&&SE(n);if(!r&&!(Z4(e)&&Z4(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{B_.setTimeout(n,e)})}function J4(e,n,t){return typeof t.structuralSharing=="function"?t.structuralSharing(e,n):t.structuralSharing!==!1?Qk(e,n):n}function zK(e,n,t=0){const r=[...e,n];return t&&r.length>t?r.slice(1):r}function jK(e,n,t=0){const r=[n,...e];return t&&r.length>t?r.slice(0,-1):r}const Xk=Symbol();function eD(e,n){return!e.queryFn&&(n!=null&&n.initialPromise)?()=>n.initialPromise:!e.queryFn||e.queryFn===Xk?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Yk(e,n){return typeof e=="function"?e(...n):!!e}function AK(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 TK=()=>SK;const Zk=()=>TK();var zf=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(){}},q_,wu,ah,PO,RK=(PO=class extends zf{constructor(){super();lt(this,q_);lt(this,wu);lt(this,ah);Ge(this,ah,n=>{if(typeof window<"u"&&window.addEventListener){const t=()=>n();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}})}onSubscribe(){le(this,wu)||this.setEventListener(le(this,ah))}onUnsubscribe(){var n;this.hasListeners()||((n=le(this,wu))==null||n.call(this),Ge(this,wu,void 0))}setEventListener(n){var t;Ge(this,ah,n),(t=le(this,wu))==null||t.call(this),Ge(this,wu,n(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(n){le(this,q_)!==n&&(Ge(this,q_,n),this.onFocus())}onFocus(){const n=this.isFocused();this.listeners.forEach(t=>{t(n)})}isFocused(){var n;return typeof le(this,q_)=="boolean"?le(this,q_):((n=globalThis.document)==null?void 0:n.visibilityState)!=="hidden"}},q_=new WeakMap,wu=new WeakMap,ah=new WeakMap,PO);const Jk=new RK,MK=kK;function OK(){let e=[],n=0,t=o=>{o()},r=o=>{o()},s=MK;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 Ir=OK();var oh,ku,ch,FO,DK=(FO=class extends zf{constructor(){super();lt(this,oh,!0);lt(this,ku);lt(this,ch);Ge(this,ch,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(){le(this,ku)||this.setEventListener(le(this,ch))}onUnsubscribe(){var n;this.hasListeners()||((n=le(this,ku))==null||n.call(this),Ge(this,ku,void 0))}setEventListener(n){var t;Ge(this,ch,n),(t=le(this,ku))==null||t.call(this),Ge(this,ku,n(this.setOnline.bind(this)))}setOnline(n){le(this,oh)!==n&&(Ge(this,oh,n),this.listeners.forEach(t=>{t(n)}))}isOnline(){return le(this,oh)}},oh=new WeakMap,ku=new WeakMap,ch=new WeakMap,FO);const wv=new DK;function LK(e){return Math.min(1e3*2**e,3e4)}function tD(e){return(e??"online")==="online"?wv.isOnline():!0}var kv=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function IK(e){return e instanceof kv}function nD(e){let n=!1,t=0,r,s="pending",i,a;const o=new Promise((y,x)=>{i=y,a=x});o.catch(ti);const c=()=>s!=="pending",u=y=>{var x;if(!c()){const C=new kv(y);k(C),(x=e.onCancel)==null||x.call(e,C)}},h=()=>{n=!0},f=()=>{n=!1},p=()=>Jk.isFocused()&&(e.networkMode==="always"||wv.isOnline())&&e.canRun(),m=()=>tD(e.networkMode)&&e.canRun(),w=y=>{c()||(r==null||r(),s="resolved",i(y))},k=y=>{c()||(r==null||r(),s="rejected",a(y))},v=()=>new Promise(y=>{var x;r=C=>{(c()||p())&&y(C)},(x=e.onPause)==null||x.call(e)}).then(()=>{var y;r=void 0,c()||(y=e.onContinue)==null||y.call(e)}),b=()=>{if(c())return;let y;const x=t===0?e.initialPromise:void 0;try{y=x??e.fn()}catch(C){y=Promise.reject(C)}Promise.resolve(y).then(w).catch(C=>{var M;if(c())return;const N=e.retry??(Zk()?0:3),j=e.retryDelay??LK,A=typeof j=="function"?j(t,C):j,z=N===!0||typeof N=="number"&&tp()?void 0:v()).then(()=>{n?k(C):b()})})};return{promise:o,status:()=>s,cancel:u,continue:()=>(r==null||r(),o),cancelRetry:h,continueRetry:f,canStart:m,start:()=>(m()?b():v().then(b),o)}}var U_,HO,rD=(HO=class{constructor(){lt(this,U_)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ZO(this.gcTime)&&Ge(this,U_,B_.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Zk()?1/0:3e5))}clearGcTimeout(){le(this,U_)!==void 0&&(B_.clearTimeout(le(this,U_)),Ge(this,U_,void 0))}},U_=new WeakMap,HO);function $K(e){return{onFetch:(n,t)=>{var h,f,p,m,w;const r=n.options,s=(p=(f=(h=n.fetchOptions)==null?void 0:h.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=x=>{AK(x,()=>n.signal,()=>k=!0)},b=eD(n.options,n.fetchOptions),y=async(x,C,N)=>{if(k)return Promise.reject(n.signal.reason);if(C==null&&x.pages.length)return Promise.resolve(x);const A=(()=>{const I={client:n.client,queryKey:n.queryKey,pageParam:C,direction:N?"backward":"forward",meta:n.options.meta};return v(I),I})(),z=await b(A),{maxPages:M}=n.options,D=N?jK:zK;return{pages:D(x.pages,z,M),pageParams:D(x.pageParams,C,M)}};if(s&&i.length){const x=s==="backward",C=x?BK:EE,N={pages:i,pageParams:a};o=await y(N,C(r,N),x)}else{const x=e??i.length;do{const C=c===0?a[0]??r.initialPageParam:EE(r,o);if(c>0&&C==null)break;o=await y(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 EE(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 BK(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}var lh,G_,uh,Fa,V_,Es,fm,K_,so,tl,qO,PK=(qO=class extends rD{constructor(n){super();lt(this,so);lt(this,lh);lt(this,G_);lt(this,uh);lt(this,Fa);lt(this,V_);lt(this,Es);lt(this,fm);lt(this,K_);Ge(this,K_,!1),Ge(this,fm,n.defaultOptions),this.setOptions(n.options),this.observers=[],Ge(this,V_,n.client),Ge(this,Fa,le(this,V_).getQueryCache()),this.queryKey=n.queryKey,this.queryHash=n.queryHash,Ge(this,G_,zE(this.options)),this.state=n.state??le(this,G_),this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return le(this,lh)}get promise(){var n;return(n=le(this,Es))==null?void 0:n.promise}setOptions(n){if(this.options={...le(this,fm),...n},n!=null&&n._type&&Ge(this,lh,n._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const t=zE(this.options);t.data!==void 0&&(this.setState(NE(t.data,t.dataUpdatedAt)),Ge(this,G_,t))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&le(this,Fa).remove(this)}setData(n,t){const r=J4(this.state.data,n,this.options);return Gt(this,so,tl).call(this,{data:r,type:"success",dataUpdatedAt:t==null?void 0:t.updatedAt,manual:t==null?void 0:t.manual}),r}setState(n){Gt(this,so,tl).call(this,{type:"setState",state:n})}cancel(n){var r,s;const t=(r=le(this,Es))==null?void 0:r.promise;return(s=le(this,Es))==null||s.cancel(n),t?t.then(ti).catch(ti):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return le(this,G_)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(n=>Vr(n.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Xk||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(n=>Vr(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:!JO(this.state.dataUpdatedAt,n)}onFocus(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnWindowFocus()))==null||n.refetch({cancelRefetch:!1}),(t=le(this,Es))==null||t.continue()}onOnline(){var n,t;(n=this.observers.find(r=>r.shouldFetchOnReconnect()))==null||n.refetch({cancelRefetch:!1}),(t=le(this,Es))==null||t.continue()}addObserver(n){this.observers.includes(n)||(this.observers.push(n),this.clearGcTimeout(),le(this,Fa).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||(le(this,Es)&&(le(this,K_)||this.state.fetchStatus==="paused"&&this.state.status==="pending"?le(this,Es).cancel({revert:!0}):le(this,Es).cancelRetry()),this.scheduleGc()),le(this,Fa).notify({type:"observerRemoved",query:this,observer:n}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Gt(this,so,tl).call(this,{type:"invalidate"})}async fetch(n,t){var u,h,f,p,m,w,k,v,b,y,x,C;if(this.state.fetchStatus!=="idle"&&((u=le(this,Es))==null?void 0:u.status())!=="rejected"){if(this.state.data!==void 0&&(t!=null&&t.cancelRefetch))this.cancel({silent:!0});else if(le(this,Es))return le(this,Es).continueRetry(),le(this,Es).promise}if(n&&this.setOptions(n),!this.options.queryFn){const N=this.observers.find(j=>j.options.queryFn);N&&this.setOptions(N.options)}const r=new AbortController,s=N=>{Object.defineProperty(N,"signal",{enumerable:!0,get:()=>(Ge(this,K_,!0),r.signal)})},i=()=>{const N=eD(this.options,t),A=(()=>{const z={client:le(this,V_),queryKey:this.queryKey,meta:this.meta};return s(z),z})();return Ge(this,K_,!1),this.options.persister?this.options.persister(N,A,this):N(A)},o=(()=>{const N={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:le(this,V_),state:this.state,fetchFn:i};return s(N),N})();(h=le(this,lh)==="infinite"?$K(this.options.pages):this.options.behavior)==null||h.onFetch(o,this),Ge(this,uh,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=o.fetchOptions)==null?void 0:f.meta))&&Gt(this,so,tl).call(this,{type:"fetch",meta:(p=o.fetchOptions)==null?void 0:p.meta});const c=Ge(this,Es,nD({initialPromise:t==null?void 0:t.initialPromise,fn:o.fetchFn,onCancel:N=>{N instanceof kv&&N.revert&&this.setState({...le(this,uh),fetchStatus:"idle"}),r.abort()},onFail:(N,j)=>{Gt(this,so,tl).call(this,{type:"failed",failureCount:N,error:j})},onPause:()=>{Gt(this,so,tl).call(this,{type:"pause"})},onContinue:()=>{Gt(this,so,tl).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=le(this,Fa).config).onSuccess)==null||w.call(m,N,this),(v=(k=le(this,Fa).config).onSettled)==null||v.call(k,N,this.state.error,this),N}catch(N){if(N instanceof kv){if(N.silent)return le(this,Es).promise;if(N.revert){if(this.state.data===void 0)throw N;return this.state.data}}throw Gt(this,so,tl).call(this,{type:"error",error:N}),(y=(b=le(this,Fa).config).onError)==null||y.call(b,N,this),(C=(x=le(this,Fa).config).onSettled)==null||C.call(x,this.state.data,N,this),N}finally{le(this,Es)===c&&Ge(this,Es,void 0),this.scheduleGc()}}},lh=new WeakMap,G_=new WeakMap,uh=new WeakMap,Fa=new WeakMap,V_=new WeakMap,Es=new WeakMap,fm=new WeakMap,K_=new WeakMap,so=new WeakSet,tl=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,...sD(r.data,this.options),fetchMeta:n.meta??null};case"success":const s={...r,...NE(n.data,n.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!n.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return Ge(this,uh,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),Ir.batch(()=>{this.observers.slice().forEach(r=>{r.onQueryUpdate()}),le(this,Fa).notify({query:this,type:"updated",action:n})})},qO);function sD(e,n){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:tD(n.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function NE(e,n){return{data:e,dataUpdatedAt:n??Date.now(),error:null,isInvalidated:!1,status:"success"}}function zE(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 hi,Ln,dm,pi,W_,_h,il,hm,fh,dh,Q_,X_,Su,hh,sr,l0,e3,t3,n3,r3,s3,i3,a3,o3,UO,eS=(UO=class extends zf{constructor(n,t){super();lt(this,sr);lt(this,hi);lt(this,Ln);lt(this,dm);lt(this,pi);lt(this,W_);lt(this,_h);lt(this,il);lt(this,hm);lt(this,fh);lt(this,dh);lt(this,Q_);lt(this,X_);lt(this,Su);lt(this,hh,new Set);this.options=t,Ge(this,hi,n),Ge(this,il,null),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(le(this,Ln).addObserver(this),jE(le(this,Ln),this.options)?Gt(this,sr,l0).call(this):this.updateResult(),Gt(this,sr,s3).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return c3(le(this,Ln),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return c3(le(this,Ln),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Gt(this,sr,i3).call(this),Gt(this,sr,a3).call(this),le(this,Ln).removeObserver(this)}setOptions(n){const t=this.options,r=le(this,Ln);if(this.options=le(this,hi).defaultQueryOptions(n),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Vr(this.options.enabled,le(this,Ln))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Gt(this,sr,o3).call(this),le(this,Ln).setOptions(this.options),t._defaulted&&!p0(this.options,t)&&le(this,hi).getQueryCache().notify({type:"observerOptionsUpdated",query:le(this,Ln),observer:this});const s=this.hasListeners();s&&AE(le(this,Ln),r,this.options,t)&&Gt(this,sr,l0).call(this),this.updateResult(),s&&(le(this,Ln)!==r||Vr(this.options.enabled,le(this,Ln))!==Vr(t.enabled,le(this,Ln))||Vr(this.options.staleTime,le(this,Ln))!==Vr(t.staleTime,le(this,Ln)))&&Gt(this,sr,t3).call(this);const i=Gt(this,sr,n3).call(this);s&&(le(this,Ln)!==r||Vr(this.options.enabled,le(this,Ln))!==Vr(t.enabled,le(this,Ln))||i!==le(this,Su))&&Gt(this,sr,r3).call(this,i)}getOptimisticResult(n){const t=le(this,hi).getQueryCache().build(le(this,hi),n),r=this.createResult(t,n);return p0(this.getCurrentResult(),r)||(Ge(this,pi,r),Ge(this,_h,this.options),Ge(this,W_,le(this,Ln).state)),r}getCurrentResult(){return le(this,pi)}trackResult(n,t){return new Proxy(n,{get:(r,s)=>(this.trackProp(s),t==null||t(s),Reflect.get(r,s))})}trackProp(n){le(this,hh).add(n)}getCurrentQuery(){return le(this,Ln)}refetch({...n}={}){return this.fetch({...n})}fetchOptimistic(n){const t=le(this,hi).defaultQueryOptions(n),r=le(this,hi).getQueryCache().build(le(this,hi),t);let s=()=>{},i;const a=new Promise(o=>{i=o,s=le(this,hi).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 Gt(this,sr,l0).call(this,{...n,cancelRefetch:n.cancelRefetch??!0}).then(()=>(this.updateResult(),le(this,pi)))}createResult(n,t){var j;const r=le(this,Ln),s=this.options,i=le(this,pi),a=le(this,W_),o=le(this,_h),c=n!==r?n.state:le(this,dm),{state:u}=n;let h={...u},f=!1,p;if(t._optimisticResults){const A=this.hasListeners(),z=!A&&jE(n,t),M=A&&AE(n,r,t,s);(z||M)&&(h={...h,...sD(u.data,n.options)}),t._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:m,errorUpdatedAt:w,status:k}=h;p=h.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((j=le(this,dh))==null?void 0:j.state.data,le(this,dh)):t.placeholderData,A!==void 0&&(k="success",p=J4(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===le(this,hm))p=le(this,fh);else try{Ge(this,hm,t.select),p=t.select(p),p=J4(i==null?void 0:i.data,p,t),Ge(this,fh,p),Ge(this,il,null)}catch(A){Ge(this,il,A)}else p===void 0&&Ge(this,il,null);le(this,il)&&(m=le(this,il),p=le(this,fh),w=Date.now(),k="error",f=!1);const b=h.fetchStatus==="fetching",y=k==="pending",x=k==="error",C=y&&b,N=p!==void 0;return{status:k,fetchStatus:h.fetchStatus,isPending:y,isSuccess:k==="success",isError:x,isInitialLoading:C,isLoading:C,data:p,dataUpdatedAt:h.dataUpdatedAt,error:m,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:n.isFetched(),isFetchedAfterMount:h.dataUpdateCount>c.dataUpdateCount||h.errorUpdateCount>c.errorUpdateCount,isFetching:b,isRefetching:b&&!y,isLoadingError:x&&!N,isPaused:h.fetchStatus==="paused",isPlaceholderData:f,isRefetchError:x&&N,isStale:tS(n,t),refetch:this.refetch,isEnabled:Vr(t.enabled,n)!==!1}}updateResult(){const n=le(this,pi),t=this.createResult(le(this,Ln),this.options);if(Ge(this,W_,le(this,Ln).state),Ge(this,_h,this.options),le(this,W_).data!==void 0&&Ge(this,dh,le(this,Ln)),p0(t,n))return;Ge(this,pi,t);const s=(()=>{if(!n)return!0;const{notifyOnChangeProps:i}=this.options,a=typeof i=="function"?i():i;if(a==="all"||!a&&!le(this,hh).size)return!0;const o=new Set(a??le(this,hh));return this.options.throwOnError&&o.add("error"),Object.keys(le(this,pi)).some(c=>{const u=c;return le(this,pi)[u]!==n[u]&&o.has(u)})})();Ir.batch(()=>{s&&this.listeners.forEach(i=>{i(le(this,pi))}),le(this,hi).getQueryCache().notify({query:le(this,Ln),type:"observerResultsUpdated"})})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Gt(this,sr,s3).call(this)}},hi=new WeakMap,Ln=new WeakMap,dm=new WeakMap,pi=new WeakMap,W_=new WeakMap,_h=new WeakMap,il=new WeakMap,hm=new WeakMap,fh=new WeakMap,dh=new WeakMap,Q_=new WeakMap,X_=new WeakMap,Su=new WeakMap,hh=new WeakMap,sr=new WeakSet,l0=function(n){Gt(this,sr,o3).call(this);let t=le(this,Ln).fetch(this.options,n);return n!=null&&n.throwOnError||(t=t.catch(ti)),t},e3=function(n){return!Zk()&&Vr(this.options.enabled,le(this,Ln))!==!1&&ZO(n)},t3=function(){Gt(this,sr,i3).call(this);const n=Vr(this.options.staleTime,le(this,Ln));if(le(this,pi).isStale||!Gt(this,sr,e3).call(this,n))return;const t=JO(le(this,pi).dataUpdatedAt,n)+1;Ge(this,Q_,B_.setTimeout(()=>{le(this,pi).isStale||this.updateResult()},t))},n3=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(le(this,Ln)):this.options.refetchInterval)??!1},r3=function(n){Gt(this,sr,a3).call(this),Ge(this,Su,n),!(le(this,Su)===0||!Gt(this,sr,e3).call(this,le(this,Su)))&&Ge(this,X_,B_.setInterval(()=>{(this.options.refetchIntervalInBackground||Jk.isFocused())&&Gt(this,sr,l0).call(this)},le(this,Su)))},s3=function(){Gt(this,sr,t3).call(this),Gt(this,sr,r3).call(this,Gt(this,sr,n3).call(this))},i3=function(){le(this,Q_)!==void 0&&(B_.clearTimeout(le(this,Q_)),Ge(this,Q_,void 0))},a3=function(){le(this,X_)!==void 0&&(B_.clearInterval(le(this,X_)),Ge(this,X_,void 0))},o3=function(){const n=le(this,hi).getQueryCache().build(le(this,hi),this.options);if(n===le(this,Ln))return;const t=le(this,Ln);Ge(this,Ln,n),Ge(this,dm,n.state),this.hasListeners()&&(t==null||t.removeObserver(this),n.addObserver(this))},UO);function FK(e,n){return Vr(n.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&Vr(n.retryOnMount,e)===!1)}function jE(e,n){return FK(e,n)||e.state.data!==void 0&&c3(e,n,n.refetchOnMount)}function c3(e,n,t){if(Vr(n.enabled,e)!==!1&&Vr(n.staleTime,e)!=="static"){const r=typeof t=="function"?t(e):t;return r==="always"||r!==!1&&tS(e,n)}return!1}function AE(e,n,t,r){return(e!==n||Vr(r.enabled,e)===!1)&&(!t.suspense||e.state.status!=="error")&&tS(e,t)}function tS(e,n){return Vr(n.enabled,e)!==!1&&e.isStaleByTime(Vr(n.staleTime,e))}var pm,Yo,Zs,Y_,Zo,mu,GO,HK=(GO=class extends rD{constructor(n){super();lt(this,Zo);lt(this,pm);lt(this,Yo);lt(this,Zs);lt(this,Y_);Ge(this,pm,n.client),this.mutationId=n.mutationId,Ge(this,Zs,n.mutationCache),Ge(this,Yo,[]),this.state=n.state||iD(),this.setOptions(n.options),this.scheduleGc()}setOptions(n){this.options=n,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(n){le(this,Yo).includes(n)||(le(this,Yo).push(n),this.clearGcTimeout(),le(this,Zs).notify({type:"observerAdded",mutation:this,observer:n}))}removeObserver(n){Ge(this,Yo,le(this,Yo).filter(t=>t!==n)),this.scheduleGc(),le(this,Zs).notify({type:"observerRemoved",mutation:this,observer:n})}optionalRemove(){le(this,Yo).length||(this.state.status==="pending"?this.scheduleGc():le(this,Zs).remove(this))}continue(){var n;return((n=le(this,Y_))==null?void 0:n.continue())??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(n){var o,c,u,h,f,p,m,w,k,v,b,y,x,C,N,j,A,z;const t=()=>{Gt(this,Zo,mu).call(this,{type:"continue"})},r={client:le(this,pm),meta:this.options.meta,mutationKey:this.options.mutationKey},s=Ge(this,Y_,nD({fn:()=>this.options.mutationFn?this.options.mutationFn(n,r):Promise.reject(new Error("No mutationFn found")),onFail:(M,D)=>{Gt(this,Zo,mu).call(this,{type:"failed",failureCount:M,error:D})},onPause:()=>{Gt(this,Zo,mu).call(this,{type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>le(this,Zs).canRun(this)})),i=this.state.status==="pending",a=!s.canStart();try{if(i)t();else{Gt(this,Zo,mu).call(this,{type:"pending",variables:n,isPaused:a}),le(this,Zs).config.onMutate&&await le(this,Zs).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&&Gt(this,Zo,mu).call(this,{type:"pending",context:D,variables:n,isPaused:a})}const M=await s.start();return await((h=(u=le(this,Zs).config).onSuccess)==null?void 0:h.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=le(this,Zs).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)),Gt(this,Zo,mu).call(this,{type:"success",data:M}),M}catch(M){try{await((y=(b=le(this,Zs).config).onError)==null?void 0:y.call(b,M,n,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((C=(x=this.options).onError)==null?void 0:C.call(x,M,n,this.state.context,r))}catch(D){Promise.reject(D)}try{await((j=(N=le(this,Zs).config).onSettled)==null?void 0:j.call(N,void 0,M,this.state.variables,this.state.context,this,r))}catch(D){Promise.reject(D)}try{await((z=(A=this.options).onSettled)==null?void 0:z.call(A,void 0,M,n,this.state.context,r))}catch(D){Promise.reject(D)}throw Gt(this,Zo,mu).call(this,{type:"error",error:M}),M}finally{le(this,Y_)===s&&Ge(this,Y_,void 0),le(this,Zs).runNext(this)}}},pm=new WeakMap,Yo=new WeakMap,Zs=new WeakMap,Y_=new WeakMap,Zo=new WeakSet,mu=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),Ir.batch(()=>{le(this,Yo).forEach(r=>{r.onMutationUpdate(n)}),le(this,Zs).notify({mutation:this,type:"updated",action:n})})},GO);function iD(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var al,io,mm,VO,qK=(VO=class extends zf{constructor(n={}){super();lt(this,al);lt(this,io);lt(this,mm);this.config=n,Ge(this,al,new Set),Ge(this,io,new Map),Ge(this,mm,0)}build(n,t,r){const s=new HK({client:n,mutationCache:this,mutationId:++Hp(this,mm)._,options:n.defaultMutationOptions(t),state:r});return this.add(s),s}add(n){le(this,al).add(n);const t=Zg(n);if(typeof t=="string"){const r=le(this,io).get(t);r?r.push(n):le(this,io).set(t,[n])}this.notify({type:"added",mutation:n})}remove(n){if(le(this,al).delete(n)){const t=Zg(n);if(typeof t=="string"){const r=le(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&&le(this,io).delete(t)}}this.notify({type:"removed",mutation:n})}canRun(n){var r;const t=Zg(n);if(typeof t=="string"){const s=(r=le(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=Zg(n);return typeof t=="string"?((s=(r=le(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(){Ir.batch(()=>{le(this,al).forEach(n=>{this.notify({type:"removed",mutation:n})}),le(this,al).clear(),le(this,io).clear()})}getAll(){return Array.from(le(this,al))}find(n){const t={exact:!0,...n};return this.getAll().find(r=>kE(t,r))}findAll(n={}){return this.getAll().filter(t=>kE(n,t))}notify(n){Ir.batch(()=>{this.listeners.forEach(t=>{t(n)})})}resumePausedMutations(){const n=this.getAll().filter(t=>t.state.isPaused);return Ir.batch(()=>Promise.all(n.map(t=>t.continue().catch(ti))))}},al=new WeakMap,io=new WeakMap,mm=new WeakMap,VO);function Zg(e){var n;return(n=e.options.scope)==null?void 0:n.id}var ol,Cu,Js,cl,sc,u0,l3,KO,UK=(KO=class extends zf{constructor(t,r){super();lt(this,sc);lt(this,ol);lt(this,Cu);lt(this,Js);lt(this,cl);Ge(this,ol,t),this.setOptions(r),this.bindMethods(),Gt(this,sc,u0).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=le(this,ol).defaultMutationOptions(t),p0(this.options,r)||le(this,ol).getMutationCache().notify({type:"observerOptionsUpdated",mutation:le(this,Js),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&uf(r.mutationKey)!==uf(this.options.mutationKey)?this.reset():((s=le(this,Js))==null?void 0:s.state.status)==="pending"&&le(this,Js).setOptions(this.options)}onSubscribe(){this.listeners.size===1&&le(this,Js)&&(le(this,Js).addObserver(this),Gt(this,sc,u0).call(this))}onUnsubscribe(){var t;this.hasListeners()||(t=le(this,Js))==null||t.removeObserver(this)}onMutationUpdate(t){Gt(this,sc,u0).call(this),Gt(this,sc,l3).call(this,t)}getCurrentResult(){return le(this,Cu)}reset(){var t;(t=le(this,Js))==null||t.removeObserver(this),Ge(this,Js,void 0),Gt(this,sc,u0).call(this),Gt(this,sc,l3).call(this)}mutate(t,r){var s;return Ge(this,cl,r),(s=le(this,Js))==null||s.removeObserver(this),Ge(this,Js,le(this,ol).getMutationCache().build(le(this,ol),this.options)),le(this,Js).addObserver(this),le(this,Js).execute(t)}},ol=new WeakMap,Cu=new WeakMap,Js=new WeakMap,cl=new WeakMap,sc=new WeakSet,u0=function(){var r;const t=((r=le(this,Js))==null?void 0:r.state)??iD();Ge(this,Cu,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},l3=function(t){Ir.batch(()=>{var r,s,i,a,o,c,u,h;if(le(this,cl)&&this.hasListeners()){const f=le(this,Cu).variables,p=le(this,Cu).context,m={client:le(this,ol),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(s=(r=le(this,cl)).onSuccess)==null||s.call(r,t.data,f,p,m)}catch(w){Promise.reject(w)}try{(a=(i=le(this,cl)).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=le(this,cl)).onError)==null||c.call(o,t.error,f,p,m)}catch(w){Promise.reject(w)}try{(h=(u=le(this,cl)).onSettled)==null||h.call(u,void 0,t.error,f,p,m)}catch(w){Promise.reject(w)}}}this.listeners.forEach(f=>{f(le(this,Cu))})})},KO);function TE(e,n){const t=new Set(n);return e.filter(r=>!t.has(r))}var ph,mi,mh,Z_,ua,J_,gm,vm,bm,ym,As,u3,_3,aD,f3,d3,h3,WO,GK=(WO=class extends zf{constructor(n,t,r){super();lt(this,As);lt(this,ph);lt(this,mi);lt(this,mh);lt(this,Z_);lt(this,ua);lt(this,J_);lt(this,gm);lt(this,vm);lt(this,bm);lt(this,ym,[]);Ge(this,ph,n),Ge(this,Z_,r),Ge(this,mh,[]),Ge(this,ua,[]),Ge(this,mi,[]),this.setQueries(t)}onSubscribe(){this.listeners.size===1&&le(this,ua).forEach(n=>{n.subscribe(t=>{Gt(this,As,d3).call(this,n,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,le(this,ua).forEach(n=>{n.destroy()})}setQueries(n,t){Ge(this,mh,n),Ge(this,Z_,t),Ir.batch(()=>{const r=le(this,ua),s=Gt(this,As,f3).call(this,le(this,mh));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,h=u?!0:a.some((f,p)=>{const m=le(this,mi)[p];return!m||!p0(f,m)});!u&&!h||(u&&(Ge(this,ym,s),Ge(this,ua,i)),Ge(this,mi,a),this.hasListeners()&&(u&&(TE(r,i).forEach(f=>{f.destroy()}),TE(i,r).forEach(f=>{f.subscribe(p=>{Gt(this,As,d3).call(this,f,p)})})),Gt(this,As,h3).call(this)))})}getCurrentResult(){return le(this,mi)}getQueries(){return le(this,ua).map(n=>n.getCurrentQuery())}getObservers(){return le(this,ua)}getOptimisticResult(n,t){const r=Gt(this,As,f3).call(this,n),s=r.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),i=r.map(a=>a.defaultedQueryOptions.queryHash);return[s,a=>Gt(this,As,_3).call(this,a??s,t,i),()=>Gt(this,As,u3).call(this,s,r)]}},ph=new WeakMap,mi=new WeakMap,mh=new WeakMap,Z_=new WeakMap,ua=new WeakMap,J_=new WeakMap,gm=new WeakMap,vm=new WeakMap,bm=new WeakMap,ym=new WeakMap,As=new WeakSet,u3=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)}))})})},_3=function(n,t,r){if(t){const s=le(this,bm),i=r!==void 0&&s!==void 0&&(s.length!==r.length||r.some((a,o)=>a!==s[o]));return(le(this,mi)!==le(this,vm)||i||t!==le(this,gm))&&(Ge(this,gm,t),Ge(this,vm,le(this,mi)),r!==void 0&&Ge(this,bm,r),Ge(this,J_,Qk(le(this,J_),t(n)))),le(this,J_)}return n},aD=function(){var n;return!((n=le(this,Z_))!=null&&n.combine)||le(this,ua).some((t,r)=>{var s;return t.options.suspense&&((s=le(this,mi)[r])==null?void 0:s.data)===void 0})},f3=function(n){const t=new Map;le(this,ua).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=le(this,ph).defaultQueryOptions(s),a=((o=t.get(i.queryHash))==null?void 0:o.shift())??new eS(le(this,ph),i);r.push({defaultedQueryOptions:i,observer:a})}),r},d3=function(n,t){const r=le(this,ua).indexOf(n);r!==-1&&(Ge(this,mi,le(this,mi).slice()),le(this,mi)[r]=t,Gt(this,As,h3).call(this))},h3=function(){var n;if(this.hasListeners()){const t=Gt(this,As,aD).call(this),r=le(this,J_),s=t?r:Gt(this,As,_3).call(this,Gt(this,As,u3).call(this,le(this,mi),le(this,ym)),(n=le(this,Z_))==null?void 0:n.combine);(t||r!==s)&&Ir.batch(()=>{this.listeners.forEach(i=>{i(le(this,mi))})})}},WO),Jo,QO,VK=(QO=class extends zf{constructor(n={}){super();lt(this,Jo);this.config=n,Ge(this,Jo,new Map)}build(n,t,r){const s=t.queryKey,i=t.queryHash??Wk(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){le(this,Jo).has(n.queryHash)||(le(this,Jo).set(n.queryHash,n),this.notify({type:"added",query:n}))}remove(n){const t=le(this,Jo).get(n.queryHash);t&&(n.destroy(),t===n&&le(this,Jo).delete(n.queryHash),this.notify({type:"removed",query:n}))}clear(){Ir.batch(()=>{this.getAll().forEach(n=>{this.remove(n)})})}get(n){return le(this,Jo).get(n)}getAll(){return[...le(this,Jo).values()]}find(n){const t={exact:!0,...n};return this.getAll().find(r=>wE(t,r))}findAll(n={}){const t=this.getAll();return Object.keys(n).length>0?t.filter(r=>wE(n,r)):t}notify(n){Ir.batch(()=>{this.listeners.forEach(t=>{t(n)})})}onFocus(){Ir.batch(()=>{this.getAll().forEach(n=>{n.onFocus()})})}onOnline(){Ir.batch(()=>{this.getAll().forEach(n=>{n.onOnline()})})}},Jo=new WeakMap,QO),Dr,Eu,Nu,gh,vh,zu,bh,yh,XO,KK=(XO=class{constructor(e={}){lt(this,Dr);lt(this,Eu);lt(this,Nu);lt(this,gh);lt(this,vh);lt(this,zu);lt(this,bh);lt(this,yh);Ge(this,Dr,e.queryCache||new VK),Ge(this,Eu,e.mutationCache||new qK),Ge(this,Nu,e.defaultOptions||{}),Ge(this,gh,new Map),Ge(this,vh,new Map),Ge(this,zu,0)}mount(){Hp(this,zu)._++,le(this,zu)===1&&(Ge(this,bh,Jk.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Dr).onFocus())})),Ge(this,yh,wv.subscribe(async e=>{e&&(await this.resumePausedMutations(),le(this,Dr).onOnline())})))}unmount(){var e,n;Hp(this,zu)._--,le(this,zu)===0&&((e=le(this,bh))==null||e.call(this),Ge(this,bh,void 0),(n=le(this,yh))==null||n.call(this),Ge(this,yh,void 0))}isFetching(e){return le(this,Dr).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return le(this,Eu).findAll({...e,status:"pending"}).length}getQueryData(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=le(this,Dr).get(n.queryHash))==null?void 0:t.state.data}ensureQueryData(e){const n=this.defaultQueryOptions(e),t=le(this,Dr).build(this,n),r=t.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&t.isStaleByTime(Vr(n.staleTime,t))&&this.prefetchQuery(n),Promise.resolve(r))}getQueriesData(e){return le(this,Dr).findAll(e).map(({queryKey:n,state:t})=>[n,t.data])}setQueryData(e,n,t){var a;const r=this.defaultQueryOptions({queryKey:e}),s=(a=le(this,Dr).get(r.queryHash))==null?void 0:a.state.data,i=CK(n,s);if(i!==void 0)return le(this,Dr).build(this,r).setData(i,{...t,manual:!0})}setQueriesData(e,n,t){return Ir.batch(()=>le(this,Dr).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,n,t)]))}getQueryState(e){var t;const n=this.defaultQueryOptions({queryKey:e});return(t=le(this,Dr).get(n.queryHash))==null?void 0:t.state}removeQueries(e){const n=le(this,Dr);Ir.batch(()=>{n.findAll(e).forEach(t=>{n.remove(t)})})}resetQueries(e,n){const t=le(this,Dr);return Ir.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=Ir.batch(()=>le(this,Dr).findAll(e).map(s=>s.cancel(t)));return Promise.all(r).then(ti).catch(ti)}invalidateQueries(e,n={}){return Ir.batch(()=>(le(this,Dr).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=Ir.batch(()=>le(this,Dr).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let i=s.fetch(void 0,t);return t.throwOnError||(i=i.catch(ti)),s.state.fetchStatus==="paused"?Promise.resolve():i}));return Promise.all(r).then(ti)}async query(e){const n=this.defaultQueryOptions(e);n.retry===void 0&&(n.retry=!1);const t=le(this,Dr).build(this,n),r=t.isStaleByTime(Vr(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=le(this,Dr).build(this,n);return t.isStaleByTime(Vr(n.staleTime,t))?t.fetch(n):Promise.resolve(t.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ti).catch(ti)}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(ti).catch(ti)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return wv.isOnline()?le(this,Eu).resumePausedMutations():Promise.resolve()}getQueryCache(){return le(this,Dr)}getMutationCache(){return le(this,Eu)}getDefaultOptions(){return le(this,Nu)}setDefaultOptions(e){Ge(this,Nu,e)}setQueryDefaults(e,n){le(this,gh).set(uf(e),{queryKey:e,defaultOptions:n})}getQueryDefaults(e){const n=[...le(this,gh).values()],t={};return n.forEach(r=>{Sh(e,r.queryKey)&&Object.assign(t,r.defaultOptions)}),t}setMutationDefaults(e,n){le(this,vh).set(uf(e),{mutationKey:e,defaultOptions:n})}getMutationDefaults(e){const n=[...le(this,vh).values()],t={};return n.forEach(r=>{Sh(e,r.mutationKey)&&Object.assign(t,r.defaultOptions)}),t}defaultQueryOptions(e){if(e._defaulted)return e;const n={...le(this,Nu).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return n.queryHash||(n.queryHash=Wk(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===Xk&&(n.enabled=!1),n}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...le(this,Nu).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){le(this,Dr).clear(),le(this,Eu).clear()}},Dr=new WeakMap,Eu=new WeakMap,Nu=new WeakMap,gh=new WeakMap,vh=new WeakMap,zu=new WeakMap,bh=new WeakMap,yh=new WeakMap,XO);const oD=T.createContext(!1),cD=()=>T.useContext(oD);oD.Provider;function WK(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}const QK=T.createContext(WK()),lD=()=>T.useContext(QK),uD=(e,n,t)=>{const r=t!=null&&t.state.error&&typeof e.throwOnError=="function"?Yk(e.throwOnError,[t.state.error,t]):e.throwOnError;(e.suspense||r)&&(n.isReset()||(e.retryOnMount=!1))},_D=e=>{T.useEffect(()=>{e.clearReset()},[e])},fD=({result:e,errorResetBoundary:n,throwOnError:t,query:r,suspense:s})=>e.isError&&!n.isReset()&&!e.isFetching&&r&&(s&&e.data===void 0||Yk(t,[e.error,r])),dD=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))}},p3=(e,n)=>(e==null?void 0:e.suspense)&&n.isPending,hD=(e,n,t)=>n.fetchOptimistic(e).catch(()=>{t.clearReset()});function XK({queries:e,...n},t){const r=zm(),s=cD(),i=lD(),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=>{dD(k);const v=r.getQueryCache().get(k.queryHash);uD(k,i,v)}),_D(i);const[c]=T.useState(()=>new GK(r,o,n)),[u,h,f]=c.getOptimisticResult(o,n.combine),p=!s&&a;T.useSyncExternalStore(T.useCallback(k=>p?c.subscribe(Ir.batchCalls(k)):ti,[c,p]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),T.useEffect(()=>{c.setQueries(o,n)},[o,n,c]);const m=u.some((k,v)=>p3(o[v],k))?u.flatMap((k,v)=>{const b=o[v];if(b&&p3(b,k)){const y=new eS(r,b);return hD(b,y,i)}return[]}):[];if(m.length>0)throw Promise.all(m);const w=u.find((k,v)=>{const b=o[v];return b&&fD({result:k,errorResetBoundary:i,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(w)throw w.error;return h(f())}function YK(e,n,t){const r=cD(),s=lD(),i=zm(),a=i.defaultQueryOptions(e),o=i.getQueryCache().get(a.queryHash),c=e.subscribed!==!1;a._optimisticResults=r?"isRestoring":c?"optimistic":void 0,dD(a),uD(a,s,o),_D(s);const[u]=T.useState(()=>new n(i,a)),h=u.getOptimisticResult(a),f=!r&&c;if(T.useSyncExternalStore(T.useCallback(p=>{const m=f?u.subscribe(Ir.batchCalls(p)):ti;return u.updateResult(),m},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),T.useEffect(()=>{u.setOptions(a)},[a,u]),p3(a,h))throw hD(a,u,s);if(fD({result:h,errorResetBoundary:s,throwOnError:a.throwOnError,query:o,suspense:a.suspense}))throw h.error;return a.notifyOnChangeProps?h:u.trackResult(h)}function ut(e,n){return YK(e,eS)}function ZK(e,n){const t=zm(),r=t.getQueryCache();return T.useSyncExternalStore(T.useCallback(s=>r.subscribe(Ir.batchCalls(s)),[r]),()=>t.isFetching(e),()=>t.isFetching(e))}function pn(e,n){const t=zm(),[r]=T.useState(()=>new UK(t,e));T.useEffect(()=>{r.setOptions(e)},[r,e]);const s=T.useSyncExternalStore(T.useCallback(a=>r.subscribe(Ir.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),i=T.useCallback((...a)=>{r.mutate(a[0],a[1]).catch(ti)},[r]);if(s.error&&Yk(r.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:i,mutateAsync:s.mutate}}const tt=new KK({defaultOptions:{queries:{staleTime:3e4,gcTime:6e5,retry:!1,networkMode:"always",refetchOnReconnect:!0},mutations:{retry:!1,networkMode:"always"}}}),bl=new Set;let RE=null,Rb=0;const m3=new Set,pD=()=>Rb,g3=e=>(m3.add(e),()=>{m3.delete(e)}),xi=()=>["workspace",Rb],St=(e,...n)=>[...xi(),e,...n];function JK(e,n=!1){if(RE===e&&!n)return!1;const t=xi();return RE=e,Rb++,bl.clear(),nS({queryKey:t}),m3.forEach(r=>r()),!0}const zn=e=>e[1]===Rb;async function nS(e){await tt.cancelQueries(e,{revert:!1}),tt.removeQueries(e)}function Kr(e,n){if(zn(e))return tt.setQueryData(e,n)}var Q2={exports:{}},Up={},X2={exports:{}},Y2={};/** * @license React * scheduler.production.js * @@ -23,7 +23,7 @@ var hV=Object.defineProperty;var gE=e=>{throw TypeError(e)};var pV=(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 ME;function nW(){return ME||(ME=1,(function(e){function n(V,Z){var J=V.length;V.push(Z);e:for(;0>>1,L=V[$];if(0>>1;$s(F,J))res(ie,F)?(V[$]=ie,V[re]=J,$=re):(V[$]=F,V[P]=J,$=P);else if(res(ie,J))V[$]=ie,V[re]=J,$=re;else break e}}return Z}function s(V,Z){var J=V.sortIndex-Z.sortIndex;return J!==0?J:V.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=[],h=1,f=null,p=3,m=!1,w=!1,k=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=typeof setImmediate<"u"?setImmediate:null;function C(V){for(var Z=t(u);Z!==null;){if(Z.callback===null)r(u);else if(Z.startTime<=V)r(u),Z.sortIndex=Z.expirationTime,n(c,Z);else break;Z=t(u)}}function N(V){if(k=!1,C(V),!w)if(t(c)!==null)w=!0,j||(j=!0,B());else{var Z=t(u);Z!==null&&Q(N,Z.startTime-V)}}var j=!1,A=-1,z=5,M=-1;function D(){return v?!0:!(e.unstable_now()-MV&&D());){var $=f.callback;if(typeof $=="function"){f.callback=null,p=f.priorityLevel;var L=$(f.expirationTime<=V);if(V=e.unstable_now(),typeof L=="function"){f.callback=L,C(V),Z=!0;break t}f===t(c)&&r(c),C(V)}else r(c);f=t(c)}if(f!==null)Z=!0;else{var q=t(u);q!==null&&Q(N,q.startTime-V),Z=!1}}break e}finally{f=null,p=J,m=!1}Z=void 0}}finally{Z?B():j=!1}}}var B;if(typeof x=="function")B=function(){x(I)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,U=G.port2;G.port1.onmessage=I,B=function(){U.postMessage(null)}}else B=function(){b(I,0)};function Q(V,Z){A=b(function(){V(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(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125$?(V.sortIndex=J,n(u,V),t(c)===null&&V===t(u)&&(k?(y(A),A=-1):k=!0,Q(N,J-$))):(V.sortIndex=L,n(c,V),w||m||(w=!0,j||(j=!0,B()))),V},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(V){var Z=p;return function(){var J=p;p=Z;try{return V.apply(this,arguments)}finally{p=J}}}})(Z2)),Z2}var OE;function rW(){return OE||(OE=1,Y2.exports=nW()),Y2.exports}var J2={exports:{}},Xs={};/** + */var ME;function eW(){return ME||(ME=1,(function(e){function n(K,Z){var J=K.length;K.push(Z);e:for(;0>>1,L=K[$];if(0>>1;$s(H,J))oes(ae,H)?(K[$]=ae,K[oe]=J,$=oe):(K[$]=H,K[U]=J,$=U);else if(oes(ae,J))K[$]=ae,K[oe]=J,$=oe;else break e}}return Z}function s(K,Z){var J=K.sortIndex-Z.sortIndex;return J!==0?J: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=[],h=1,f=null,p=3,m=!1,w=!1,k=!1,v=!1,b=typeof setTimeout=="function"?setTimeout:null,y=typeof clearTimeout=="function"?clearTimeout:null,x=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,j||(j=!0,B());else{var Z=t(u);Z!==null&&Q(N,Z.startTime-K)}}var j=!1,A=-1,z=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 L=$(f.expirationTime<=K);if(K=e.unstable_now(),typeof L=="function"){f.callback=L,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=J,m=!1}Z=void 0}}finally{Z?B():j=!1}}}var B;if(typeof x=="function")B=function(){x(I)};else if(typeof MessageChannel<"u"){var G=new MessageChannel,q=G.port2;G.port1.onmessage=I,B=function(){q.postMessage(null)}}else B=function(){b(I,0)};function Q(K,Z){A=b(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=J,n(u,K),t(c)===null&&K===t(u)&&(k?(y(A),A=-1):k=!0,Q(N,J-$))):(K.sortIndex=L,n(c,K),w||m||(w=!0,j||(j=!0,B()))),K},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(K){var Z=p;return function(){var J=p;p=Z;try{return K.apply(this,arguments)}finally{p=J}}}})(Y2)),Y2}var OE;function tW(){return OE||(OE=1,X2.exports=eW()),X2.exports}var Z2={exports:{}},Ys={};/** * @license React * react-dom.production.js * @@ -31,7 +31,7 @@ var hV=Object.defineProperty;var gE=e=>{throw TypeError(e)};var pV=(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 DE;function sW(){if(DE)return Xs;DE=1;var e=Nm();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(),J2.exports=sW(),J2.exports}/** + */var DE;function nW(){if(DE)return Ys;DE=1;var e=Nm();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(),Z2.exports=nW(),Z2.exports}/** * @license React * react-dom-client.production.js * @@ -39,15 +39,15 @@ var hV=Object.defineProperty;var gE=e=>{throw TypeError(e)};var pV=(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 IE;function iW(){if(IE)return Up;IE=1;var e=rW(),n=Nm(),t=mD();function r(l){var d="https://react.dev/errors/"+l;if(1L||(l.current=$[L],$[L]=null,L--)}function F(l,d){L++,$[L]=l.current,l.current=d}var re=q(null),ie=q(null),ue=q(null),se=q(null);function K(l,d){switch(F(ue,d),F(ie,l),F(re,null),d.nodeType){case 9:case 11:l=(l=d.documentElement)&&(l=l.namespaceURI)?P9(l):0;break;default:if(l=d.tagName,d=d.namespaceURI)d=P9(d),l=F9(d,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}P(re),F(re,l)}function oe(){P(re),P(ie),P(ue)}function ce(l){l.memoizedState!==null&&F(se,l);var d=re.current,g=F9(d,l.type);d!==g&&(F(ie,l),F(re,g))}function pe(l){ie.current===l&&(P(re),P(ie)),se.current===l&&(P(se),$p._currentValue=J)}var ve,Me;function Fe(l){if(ve===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);ve=d&&d[1]||"",Me=-1L||(l.current=$[L],$[L]=null,L--)}function H(l,d){L++,$[L]=l.current,l.current=d}var oe=F(null),ae=F(null),ue=F(null),se=F(null);function V(l,d){switch(H(ue,d),H(ae,l),H(oe,null),d.nodeType){case 9:case 11:l=(l=d.documentElement)&&(l=l.namespaceURI)?P9(l):0;break;default:if(l=d.tagName,d=d.namespaceURI)d=P9(d),l=F9(d,l);else switch(l){case"svg":l=1;break;case"math":l=2;break;default:l=0}}U(oe),H(oe,l)}function ne(){U(oe),U(ae),U(ue)}function ce(l){l.memoizedState!==null&&H(se,l);var d=oe.current,g=F9(d,l.type);d!==g&&(H(ae,l),H(oe,g))}function he(l){ae.current===l&&(U(oe),U(ae)),se.current===l&&(U(se),$p._currentValue=J)}var me,Ae;function Pe(l){if(me===void 0)try{throw Error()}catch(g){var d=g.stack.trim().match(/\n( *(at )?)/);me=d&&d[1]||"",Ae=-1)":-1R||he[S]!==Ne[R]){var Be=` -`+he[S].replace(" at new "," at ");return l.displayName&&Be.includes("")&&(Be=Be.replace("",l.displayName)),Be}while(1<=S&&0<=R);break}}}finally{Ye=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?Fe(g):""}function $e(l,d){switch(l.tag){case 26:case 27:case 5:return Fe(l.type);case 16:return Fe("Lazy");case 13:return l.child!==d&&d!==null?Fe("Suspense Fallback"):Fe("Suspense");case 19:return Fe("SuspenseList");case 0:case 15:return Te(l.type,!1);case 11:return Te(l.type.render,!1);case 1:return Te(l.type,!0);case 31:return Fe("Activity");default:return""}}function yt(l){try{var d="",g=null;do d+=$e(l,g),g=l,l=l.return;while(l);return d}catch(S){return` +`+me+l+Ae}var Ye=!1;function Re(l,d){if(!l||Ye)return"";Ye=!0;var g=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var S={DetermineComponentFrameRoot:function(){try{if(d){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(Le){var Te=Le}Reflect.construct(l,[],Ue)}else{try{Ue.call()}catch(Le){Te=Le}l.call(Ue.prototype)}}else{try{throw Error()}catch(Le){Te=Le}(Ue=l())&&typeof Ue.catch=="function"&&Ue.catch(function(){})}}catch(Le){if(Le&&Te&&typeof Le.stack=="string")return[Le.stack,Te.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(` +`),Ne=re.split(` +`);for(R=S=0;SR||pe[S]!==Ne[R]){var Be=` +`+pe[S].replace(" at new "," at ");return l.displayName&&Be.includes("")&&(Be=Be.replace("",l.displayName)),Be}while(1<=S&&0<=R);break}}}finally{Ye=!1,Error.prepareStackTrace=g}return(g=l?l.displayName||l.name:"")?Pe(g):""}function $e(l,d){switch(l.tag){case 26:case 27:case 5:return Pe(l.type);case 16:return Pe("Lazy");case 13:return l.child!==d&&d!==null?Pe("Suspense Fallback"):Pe("Suspense");case 19:return Pe("SuspenseList");case 0:case 15:return Re(l.type,!1);case 11:return Re(l.type.render,!1);case 1:return Re(l.type,!0);case 31:return Pe("Activity");default:return""}}function yt(l){try{var d="",g=null;do d+=$e(l,g),g=l,l=l.return;while(l);return d}catch(S){return` Error generating stack: `+S.message+` -`+S.stack}}var ot=Object.prototype.hasOwnProperty,Mt=e.unstable_scheduleCallback,jt=e.unstable_cancelCallback,Pt=e.unstable_shouldYield,Le=e.unstable_requestPaint,nt=e.unstable_now,ke=e.unstable_getCurrentPriorityLevel,me=e.unstable_ImmediatePriority,je=e.unstable_UserBlockingPriority,qe=e.unstable_NormalPriority,rt=e.unstable_LowPriority,dt=e.unstable_IdlePriority,st=e.log,Ut=e.unstable_setDisableYieldValue,Xt=null,en=null;function an(l){if(typeof st=="function"&&Ut(l),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(Xt,l)}catch{}}var At=Math.clz32?Math.clz32:Ot,gn=Math.log,on=Math.LN2;function Ot(l){return l>>>=0,l===0?32:31-(gn(l)/on|0)|0}var dn=256,cn=262144,kn=4194304;function Wn(l){var d=l&42;if(d!==0)return d;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 gs(l,d,g){var S=l.pendingLanes;if(S===0)return 0;var R=0,O=l.suspendedLanes,X=l.pingedLanes;l=l.warmLanes;var ne=S&134217727;return ne!==0?(S=ne&~O,S!==0?R=Wn(S):(X&=ne,X!==0?R=Wn(X):g||(g=ne&~l,g!==0&&(R=Wn(g))))):(ne=S&~O,ne!==0?R=Wn(ne):X!==0?R=Wn(X):g||(g=S&~l,g!==0&&(R=Wn(g)))),R===0?0:d!==0&&d!==R&&(d&O)===0&&(O=R&-R,g=d&-d,O>=g||O===32&&(g&4194048)!==0)?d:R}function ns(l,d){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&d)===0}function gt(l,d){switch(l){case 1:case 2:case 4:case 8:case 64:return d+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 d+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 ln(){var l=kn;return kn<<=1,(kn&62914560)===0&&(kn=4194304),l}function bn(l){for(var d=[],g=0;31>g;g++)d.push(l);return d}function un(l,d){l.pendingLanes|=d,d!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function _r(l,d,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 ne=l.entanglements,he=l.expirationTimes,Ne=l.hiddenUpdates;for(g=X&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var _t=/[\n"\\]/g;function Bt(l){return l.replace(_t,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function oi(l,d,g,S,R,O,X,ne){l.name="",X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"?l.type=X:l.removeAttribute("type"),d!=null?X==="number"?(d===0&&l.value===""||l.value!=d)&&(l.value=""+cr(d)):l.value!==""+cr(d)&&(l.value=""+cr(d)):X!=="submit"&&X!=="reset"||l.removeAttribute("value"),d!=null?Ei(l,X,cr(d)):g!=null?Ei(l,X,cr(g)):S!=null&&l.removeAttribute("value"),R==null&&O!=null&&(l.defaultChecked=!!O),R!=null&&(l.checked=R&&typeof R!="function"&&typeof R!="symbol"),ne!=null&&typeof ne!="function"&&typeof ne!="symbol"&&typeof ne!="boolean"?l.name=""+cr(ne):l.removeAttribute("name")}function Ci(l,d,g,S,R,O,X,ne){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),d!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||d!=null)){za(l);return}g=g!=null?""+cr(g):"",d=d!=null?""+cr(d):g,ne||d===l.value||(l.value=d),l.defaultValue=d}S=S??R,S=typeof S!="function"&&typeof S!="symbol"&&!!S,l.checked=ne?l.checked:!!S,l.defaultChecked=!!S,X!=null&&typeof X!="function"&&typeof X!="symbol"&&typeof X!="boolean"&&(l.name=X),za(l)}function Ei(l,d,g){d==="number"&&Ks(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function Or(l,d,g,S){if(l=l.options,d){d={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),n_=!1;if(as)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){n_=!0}}),window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{n_=!1}var Zi=null,Cc=null,Ts=null;function ja(){if(Ts)return Ts;var l,d=Cc,g=d.length,S,R="value"in Zi?Zi.value:Zi.textContent,O=R.length;for(l=0;l=To),Sr=" ",Wf=!1;function o_(l,d){switch(l){case"keyup":return eo.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tc(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Ro=!1;function Il(l,d){switch(l){case"compositionend":return Tc(d);case"keypress":return d.which!==32?null:(Wf=!0,Sr);case"textInput":return l=d.data,l===Sr&&Wf?null:l;default:return null}}function Qf(l,d){if(Ro)return l==="compositionend"||!Ao&&o_(l,d)?(l=ja(),Ts=Cc=Zi=null,Ro=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:g,offset:d-l};l=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=to(g)}}function Mc(l,d){return l&&d?l===d?!0:l&&l.nodeType===3?!1:d&&d.nodeType===3?Mc(l,d.parentNode):"contains"in l?l.contains(d):l.compareDocumentPosition?!!(l.compareDocumentPosition(d)&16):!1:!1}function Io(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var d=Ks(l.document);d instanceof l.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)l=d.contentWindow;else break;d=Ks(l.document)}return d}function ys(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d&&(d==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||d==="textarea"||l.contentEditable==="true")}var xs=as&&"documentMode"in document&&11>=document.documentMode,te=null,ge=null,Se=null,Oe=!1;function Pe(l,d,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Oe||te==null||te!==Ks(S)||(S=te,"selectionStart"in S&&ys(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}),Se&&ui(Se,S)||(Se=S,S=Ig(ge,"onSelect"),0>=X,R-=X,$o=1<<32-At(d)+R|g<hn?(Rn=Nt,Nt=null):Rn=Nt.sibling;var Vn=Ae(we,Nt,Ee[hn],He);if(Vn===null){Nt===null&&(Nt=Rn);break}l&&Nt&&Vn.alternate===null&&d(we,Nt),be=O(Vn,be,hn),Kn===null?Ft=Vn:Kn.sibling=Vn,Kn=Vn,Nt=Rn}if(hn===Ee.length)return g(we,Nt),Dn&&Lc(we,hn),Ft;if(Nt===null){for(;hnhn?(Rn=Nt,Nt=null):Rn=Nt.sibling;var lu=Ae(we,Nt,Vn.value,He);if(lu===null){Nt===null&&(Nt=Rn);break}l&&Nt&&lu.alternate===null&&d(we,Nt),be=O(lu,be,hn),Kn===null?Ft=lu:Kn.sibling=lu,Kn=lu,Nt=Rn}if(Vn.done)return g(we,Nt),Dn&&Lc(we,hn),Ft;if(Nt===null){for(;!Vn.done;hn++,Vn=Ee.next())Vn=Ue(we,Vn.value,He),Vn!==null&&(be=O(Vn,be,hn),Kn===null?Ft=Vn:Kn.sibling=Vn,Kn=Vn);return Dn&&Lc(we,hn),Ft}for(Nt=S(Nt);!Vn.done;hn++,Vn=Ee.next())Vn=De(Nt,we,hn,Vn.value,He),Vn!==null&&(l&&Vn.alternate!==null&&Nt.delete(Vn.key===null?hn:Vn.key),be=O(Vn,be,hn),Kn===null?Ft=Vn:Kn.sibling=Vn,Kn=Vn);return l&&Nt.forEach(function(dV){return d(we,dV)}),Dn&&Lc(we,hn),Ft}function gr(we,be,Ee,He){if(typeof Ee=="object"&&Ee!==null&&Ee.type===k&&Ee.key===null&&(Ee=Ee.props.children),typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case m:e:{for(var Ft=Ee.key;be!==null;){if(be.key===Ft){if(Ft=Ee.type,Ft===k){if(be.tag===7){g(we,be.sibling),He=R(be,Ee.props.children),He.return=we,we=He;break e}}else if(be.elementType===Ft||typeof Ft=="object"&&Ft!==null&&Ft.$$typeof===z&&b_(Ft)===be.type){g(we,be.sibling),He=R(be,Ee.props),pp(He,Ee),He.return=we,we=He;break e}g(we,be);break}else d(we,be);be=be.sibling}Ee.type===k?(He=h_(Ee.props.children,we.mode,He,Ee.key),He.return=we,we=He):(He=eg(Ee.type,Ee.key,Ee.props,null,we.mode,He),pp(He,Ee),He.return=we,we=He)}return X(we);case w:e:{for(Ft=Ee.key;be!==null;){if(be.key===Ft)if(be.tag===4&&be.stateNode.containerInfo===Ee.containerInfo&&be.stateNode.implementation===Ee.implementation){g(we,be.sibling),He=R(be,Ee.children||[]),He.return=we,we=He;break e}else{g(we,be);break}else d(we,be);be=be.sibling}He=_x(Ee,we.mode,He),He.return=we,we=He}return X(we);case z:return Ee=b_(Ee),gr(we,be,Ee,He)}if(Q(Ee))return xt(we,be,Ee,He);if(B(Ee)){if(Ft=B(Ee),typeof Ft!="function")throw Error(r(150));return Ee=Ft.call(Ee),Vt(we,be,Ee,He)}if(typeof Ee.then=="function")return gr(we,be,og(Ee),He);if(Ee.$$typeof===x)return gr(we,be,rg(we,Ee),He);cg(we,Ee)}return typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint"?(Ee=""+Ee,be!==null&&be.tag===6?(g(we,be.sibling),He=R(be,Ee),He.return=we,we=He):(g(we,be),He=ux(Ee,we.mode,He),He.return=we,we=He),X(we)):g(we,be)}return function(we,be,Ee,He){try{hp=0;var Ft=gr(we,be,Ee,He);return ad=null,Ft}catch(Nt){if(Nt===id||Nt===ig)throw Nt;var Kn=On(29,Nt,null,we.mode);return Kn.lanes=He,Kn.return=we,Kn}finally{}}}var x_=T7(!0),R7=T7(!1),Kl=!1;function kx(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Sx(l,d){l=l.updateQueue,d.updateQueue===l&&(d.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Vl(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Wl(l,d,g){var S=l.updateQueue;if(S===null)return null;if(S=S.shared,(tr&2)!==0){var R=S.pending;return R===null?d.next=d:(d.next=R.next,R.next=d),S.pending=d,d=Cn(l),ta(l,null,g),d}return ws(l,S,d,g),Cn(l)}function mp(l,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,Qn(l,g)}}function Cx(l,d){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=d:O=O.next=d}else R=O=d;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=d:l.next=d,g.lastBaseUpdate=d}var Ex=!1;function gp(){if(Ex){var l=sd;if(l!==null)throw l}}function vp(l,d,g,S){Ex=!1;var R=l.updateQueue;Kl=!1;var O=R.firstBaseUpdate,X=R.lastBaseUpdate,ne=R.shared.pending;if(ne!==null){R.shared.pending=null;var he=ne,Ne=he.next;he.next=null,X===null?O=Ne:X.next=Ne,X=he;var Be=l.alternate;Be!==null&&(Be=Be.updateQueue,ne=Be.lastBaseUpdate,ne!==X&&(ne===null?Be.firstBaseUpdate=Ne:ne.next=Ne,Be.lastBaseUpdate=he))}if(O!==null){var Ue=R.baseState;X=0,Be=Ne=he=null,ne=O;do{var Ae=ne.lane&-536870913,De=Ae!==ne.lane;if(De?(Tn&Ae)===Ae:(S&Ae)===Ae){Ae!==0&&Ae===rd&&(Ex=!0),Be!==null&&(Be=Be.next={lane:0,tag:ne.tag,payload:ne.payload,callback:null,next:null});e:{var xt=l,Vt=ne;Ae=d;var gr=g;switch(Vt.tag){case 1:if(xt=Vt.payload,typeof xt=="function"){Ue=xt.call(gr,Ue,Ae);break e}Ue=xt;break e;case 3:xt.flags=xt.flags&-65537|128;case 0:if(xt=Vt.payload,Ae=typeof xt=="function"?xt.call(gr,Ue,Ae):xt,Ae==null)break e;Ue=f({},Ue,Ae);break e;case 2:Kl=!0}}Ae=ne.callback,Ae!==null&&(l.flags|=64,De&&(l.flags|=8192),De=R.callbacks,De===null?R.callbacks=[Ae]:De.push(Ae))}else De={lane:Ae,tag:ne.tag,payload:ne.payload,callback:ne.callback,next:null},Be===null?(Ne=Be=De,he=Ue):Be=Be.next=De,X|=Ae;if(ne=ne.next,ne===null){if(ne=R.shared.pending,ne===null)break;De=ne,ne=De.next,De.next=null,R.lastBaseUpdate=De,R.shared.pending=null}}while(!0);Be===null&&(he=Ue),R.baseState=he,R.firstBaseUpdate=Ne,R.lastBaseUpdate=Be,O===null&&(R.shared.lanes=0),Jl|=X,l.lanes=X,l.memoizedState=Ue}}function M7(l,d){if(typeof l!="function")throw Error(r(191,l));l.call(d)}function O7(l,d){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var X=V.T,ne={};V.T=ne,Gx(l,!1,d,g);try{var he=R(),Ne=V.S;if(Ne!==null&&Ne(ne,he),he!==null&&typeof he=="object"&&typeof he.then=="function"){var Be=nK(he,S);xp(l,d,Be,oa(l))}else xp(l,d,S,oa(l))}catch(Ue){xp(l,d,{then:function(){},status:"rejected",reason:Ue},oa())}finally{Z.p=O,X!==null&&ne.types!==null&&(X.types=ne.types),V.T=X}}function cK(){}function qx(l,d,g,S){if(l.tag!==5)throw Error(r(476));var R=f8(l).queue;_8(l,R,d,J,g===null?cK:function(){return d8(l),g(S)})}function f8(l){var d=l.memoizedState;if(d!==null)return d;d={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pc,lastRenderedState:J},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pc,lastRenderedState:g},next:null},l.memoizedState=d,l=l.alternate,l!==null&&(l.memoizedState=d),d}function d8(l){var d=f8(l);d.next===null&&(d=l.alternate.memoizedState),xp(l,d.next.queue,{},oa())}function Ux(){return Bs($p)}function h8(){return ts().memoizedState}function p8(){return ts().memoizedState}function lK(l){for(var d=l.return;d!==null;){switch(d.tag){case 24:case 3:var g=oa();l=Vl(g);var S=Wl(d,l,g);S!==null&&(Ii(S,d,g),mp(S,d,g)),d={cache:bx()},l.payload=d;return}d=d.return}}function uK(l,d,g){var S=oa();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},vg(l)?g8(d,g):(g=Rs(l,d,g,S),g!==null&&(Ii(g,l,S),v8(g,d,S)))}function m8(l,d,g){var S=oa();xp(l,d,g,S)}function xp(l,d,g,S){var R={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(vg(l))g8(d,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=d.lastRenderedReducer,O!==null))try{var X=d.lastRenderedState,ne=O(X,g);if(R.hasEagerState=!0,R.eagerState=ne,qn(ne,X))return ws(l,d,R,0),br===null&&Un(),!1}catch{}finally{}if(g=Rs(l,d,R,S),g!==null)return Ii(g,l,S),v8(g,d,S),!0}return!1}function Gx(l,d,g,S){if(S={lane:2,revertLane:k2(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},vg(l)){if(d)throw Error(r(479))}else d=Rs(l,g,S,2),d!==null&&Ii(d,l,2)}function vg(l){var d=l.alternate;return l===fn||d!==null&&d===fn}function g8(l,d){cd=_g=!0;var g=l.pending;g===null?d.next=d:(d.next=g.next,g.next=d),l.pending=d}function v8(l,d,g){if((g&4194048)!==0){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,Qn(l,g)}}var wp={readContext:Bs,use:hg,useCallback:qr,useContext:qr,useEffect:qr,useImperativeHandle:qr,useLayoutEffect:qr,useInsertionEffect:qr,useMemo:qr,useReducer:qr,useRef:qr,useState:qr,useDebugValue:qr,useDeferredValue:qr,useTransition:qr,useSyncExternalStore:qr,useId:qr,useHostTransitionStatus:qr,useFormState:qr,useActionState:qr,useOptimistic:qr,useMemoCache:qr,useCacheRefresh:qr};wp.useEffectEvent=qr;var b8={readContext:Bs,use:hg,useCallback:function(l,d){return _i().memoizedState=[l,d===void 0?null:d],l},useContext:Bs,useEffect:n8,useImperativeHandle:function(l,d,g){g=g!=null?g.concat([l]):null,mg(4194308,4,a8.bind(null,d,l),g)},useLayoutEffect:function(l,d){return mg(4194308,4,l,d)},useInsertionEffect:function(l,d){mg(4,2,l,d)},useMemo:function(l,d){var g=_i();d=d===void 0?null:d;var S=l();if(w_){an(!0);try{l()}finally{an(!1)}}return g.memoizedState=[S,d],S},useReducer:function(l,d,g){var S=_i();if(g!==void 0){var R=g(d);if(w_){an(!0);try{g(d)}finally{an(!1)}}}else R=d;return S.memoizedState=S.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},S.queue=l,l=l.dispatch=uK.bind(null,fn,l),[S.memoizedState,l]},useRef:function(l){var d=_i();return l={current:l},d.memoizedState=l},useState:function(l){l=$x(l);var d=l.queue,g=m8.bind(null,fn,d);return d.dispatch=g,[l.memoizedState,g]},useDebugValue:Fx,useDeferredValue:function(l,d){var g=_i();return Hx(g,l,d)},useTransition:function(){var l=$x(!1);return l=_8.bind(null,fn,l.queue,!0,!1),_i().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,d,g){var S=fn,R=_i();if(Dn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),br===null)throw Error(r(349));(Tn&127)!==0||P7(S,d,g)}R.memoizedState=g;var O={value:g,getSnapshot:d};return R.queue=O,n8(H7.bind(null,S,O,l),[l]),S.flags|=2048,ud(9,{destroy:void 0},F7.bind(null,S,O,g,d),null),g},useId:function(){var l=_i(),d=br.identifierPrefix;if(Dn){var g=Bo,S=$o;g=(S&~(1<<32-At(S)-1)).toString(32)+g,d="_"+d+"R_"+g,g=fg++,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[Xn]=d,O[Yn]=S;e:for(X=d.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===d)break e;for(;X.sibling===null;){if(X.return===null||X.return===d)break e;X=X.return}X.sibling.return=X.return,X=X.sibling}d.stateNode=O;e:switch(Fs(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&&Hc(d)}}return Er(d),i2(d,d.type,l===null?null:l.memoizedProps,d.pendingProps,g),null;case 6:if(l&&d.stateNode!=null)l.memoizedProps!==S&&Hc(d);else{if(typeof S!="string"&&d.stateNode===null)throw Error(r(166));if(l=ue.current,td(d)){if(l=d.stateNode,g=d.memoizedProps,S=null,R=$s,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}l[Xn]=d,l=!!(l.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||$9(l.nodeValue,g)),l||Ul(d,!0)}else l=$g(l).createTextNode(S),l[Xn]=d,d.stateNode=l}return Er(d),null;case 31:if(g=d.memoizedState,l===null||l.memoizedState!==null){if(S=td(d),g!==null){if(l===null){if(!S)throw Error(r(318));if(l=d.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[Xn]=d}else p_(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Er(d),l=!1}else g=px(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return d.flags&256?(sa(d),d):(sa(d),null);if((d.flags&128)!==0)throw Error(r(558))}return Er(d),null;case 13:if(S=d.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=td(d),S!==null&&S.dehydrated!==null){if(l===null){if(!R)throw Error(r(318));if(R=d.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[Xn]=d}else p_(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Er(d),R=!1}else R=px(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return d.flags&256?(sa(d),d):(sa(d),null)}return sa(d),(d.flags&128)!==0?(d.lanes=g,d):(g=S!==null,l=l!==null&&l.memoizedState!==null,g&&(S=d.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&&(d.child.flags|=8192),kg(d,d.updateQueue),Er(d),null);case 4:return oe(),l===null&&N2(d.stateNode.containerInfo),Er(d),null;case 10:return $c(d.type),Er(d),null;case 19:if(P(es),S=d.memoizedState,S===null)return Er(d),null;if(R=(d.flags&128)!==0,O=S.rendering,O===null)if(R)Sp(S,!1);else{if(Ur!==0||l!==null&&(l.flags&128)!==0)for(l=d.child;l!==null;){if(O=ug(l),O!==null){for(d.flags|=128,Sp(S,!1),l=O.updateQueue,d.updateQueue=l,kg(d,l),d.subtreeFlags=0,l=g,g=d.child;g!==null;)lp(g,l),g=g.sibling;return F(es,es.current&1|2),Dn&&Lc(d,S.treeForkCount),d.child}l=l.sibling}S.tail!==null&&nt()>zg&&(d.flags|=128,R=!0,Sp(S,!1),d.lanes=4194304)}else{if(!R)if(l=ug(O),l!==null){if(d.flags|=128,R=!0,l=l.updateQueue,d.updateQueue=l,kg(d,l),Sp(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!Dn)return Er(d),null}else 2*nt()-S.renderingStartTime>zg&&g!==536870912&&(d.flags|=128,R=!0,Sp(S,!1),d.lanes=4194304);S.isBackwards?(O.sibling=d.child,d.child=O):(l=S.last,l!==null?l.sibling=O:d.child=O,S.last=O)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=nt(),l.sibling=null,g=es.current,F(es,R?g&1|2:g&1),Dn&&Lc(d,S.treeForkCount),l):(Er(d),null);case 22:case 23:return sa(d),zx(),S=d.memoizedState!==null,l!==null?l.memoizedState!==null!==S&&(d.flags|=8192):S&&(d.flags|=8192),S?(g&536870912)!==0&&(d.flags&128)===0&&(Er(d),d.subtreeFlags&6&&(d.flags|=8192)):Er(d),g=d.updateQueue,g!==null&&kg(d,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==g&&(d.flags|=2048),l!==null&&P(v_),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),$c(cs),Er(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function pK(l,d){switch(dx(d),d.tag){case 1:return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 3:return $c(cs),oe(),l=d.flags,(l&65536)!==0&&(l&128)===0?(d.flags=l&-65537|128,d):null;case 26:case 27:case 5:return pe(d),null;case 31:if(d.memoizedState!==null){if(sa(d),d.alternate===null)throw Error(r(340));p_()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 13:if(sa(d),l=d.memoizedState,l!==null&&l.dehydrated!==null){if(d.alternate===null)throw Error(r(340));p_()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 19:return P(es),null;case 4:return oe(),null;case 10:return $c(d.type),null;case 22:case 23:return sa(d),zx(),l!==null&&P(v_),l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 24:return $c(cs),null;case 25:return null;default:return null}}function q8(l,d){switch(dx(d),d.tag){case 3:$c(cs),oe();break;case 26:case 27:case 5:pe(d);break;case 4:oe();break;case 31:d.memoizedState!==null&&sa(d);break;case 13:sa(d);break;case 19:P(es);break;case 10:$c(d.type);break;case 22:case 23:sa(d),zx(),l!==null&&P(v_);break;case 24:$c(cs)}}function Cp(l,d){try{var g=d.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(ne){ur(d,d.return,ne)}}function Yl(l,d,g){try{var S=d.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,ne=X.destroy;if(ne!==void 0){X.destroy=void 0,R=d;var he=g,Ne=ne;try{Ne()}catch(Be){ur(R,he,Be)}}}S=S.next}while(S!==O)}}catch(Be){ur(d,d.return,Be)}}function U8(l){var d=l.updateQueue;if(d!==null){var g=l.stateNode;try{O7(d,g)}catch(S){ur(l,l.return,S)}}}function G8(l,d,g){g.props=k_(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(S){ur(l,d,S)}}function Ep(l,d){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,d,R)}}function Po(l,d){var g=l.ref,S=l.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(R){ur(l,d,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,d,R)}else g.current=null}function K8(l){var d=l.type,g=l.memoizedProps,S=l.stateNode;try{e:switch(d){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 a2(l,d,g){try{var S=l.stateNode;IK(S,l.type,g,d),S[Yn]=d}catch(R){ur(l,l.return,R)}}function V8(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&su(l.type)||l.tag===4}function o2(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||V8(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&&su(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 c2(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(l),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=dr));else if(S!==4&&(S===27&&su(l.type)&&(g=l.stateNode,d=null),l=l.child,l!==null))for(c2(l,d,g),l=l.sibling;l!==null;)c2(l,d,g),l=l.sibling}function Sg(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?g.insertBefore(l,d):g.appendChild(l);else if(S!==4&&(S===27&&su(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(Sg(l,d,g),l=l.sibling;l!==null;)Sg(l,d,g),l=l.sibling}function W8(l){var d=l.stateNode,g=l.memoizedProps;try{for(var S=l.type,R=d.attributes;R.length;)d.removeAttributeNode(R[0]);Fs(d,S,g),d[Xn]=l,d[Yn]=g}catch(O){ur(l,l.return,O)}}var qc=!1,_s=!1,l2=!1,Q8=typeof WeakSet=="function"?WeakSet:Set,Ms=null;function mK(l,d){if(l=l.containerInfo,A2=Gg,l=Io(l),ys(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,ne=-1,he=-1,Ne=0,Be=0,Ue=l,Ae=null;t:for(;;){for(var De;Ue!==g||R!==0&&Ue.nodeType!==3||(ne=X+R),Ue!==O||S!==0&&Ue.nodeType!==3||(he=X+S),Ue.nodeType===3&&(X+=Ue.nodeValue.length),(De=Ue.firstChild)!==null;)Ae=Ue,Ue=De;for(;;){if(Ue===l)break t;if(Ae===g&&++Ne===R&&(ne=X),Ae===O&&++Be===S&&(he=X),(De=Ue.nextSibling)!==null)break;Ue=Ae,Ae=Ue.parentNode}Ue=De}g=ne===-1||he===-1?null:{start:ne,end:he}}else g=null}g=g||{start:0,end:0}}else g=null;for(T2={focusedElem:l,selectionRange:g},Gg=!1,Ms=d;Ms!==null;)if(d=Ms,l=d.child,(d.subtreeFlags&1028)!==0&&l!==null)l.return=d,Ms=l;else for(;Ms!==null;){switch(d=Ms,O=d.alternate,l=d.flags,d.tag){case 0:if((l&4)!==0&&(l=d.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),Fs(O,S,g),O[Xn]=l,An(O),S=O;break e;case"link":var X=tE("link","href",R).get(S+(g.href||""));if(X){for(var ne=0;negr&&(X=gr,gr=Vt,Vt=X);var we=Pl(ne,Vt),be=Pl(ne,gr);if(we&&be&&(De.rangeCount!==1||De.anchorNode!==we.node||De.anchorOffset!==we.offset||De.focusNode!==be.node||De.focusOffset!==be.offset)){var Ee=Ue.createRange();Ee.setStart(we.node,we.offset),De.removeAllRanges(),Vt>gr?(De.addRange(Ee),De.extend(be.node,be.offset)):(Ee.setEnd(be.node,be.offset),De.addRange(Ee))}}}}for(Ue=[],De=ne;De=De.parentNode;)De.nodeType===1&&Ue.push({element:De,left:De.scrollLeft,top:De.scrollTop});for(typeof ne.focus=="function"&&ne.focus(),ne=0;neg?32:g,V.T=null,g=m2,m2=null;var O=tu,X=Wc;if(ks=0,pd=tu=null,Wc=0,(tr&6)!==0)throw Error(r(331));var ne=tr;if(tr|=4,a9(O.current),r9(O,O.current,X,g),tr=ne,Rp(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(Xt,O)}catch{}return!0}finally{Z.p=R,V.T=S,S9(l,d)}}function E9(l,d,g){d=Ra(g,d),d=Qx(l.stateNode,d,2),l=Wl(l,d,2),l!==null&&(un(l,2),Fo(l))}function ur(l,d,g){if(l.tag===3)E9(l,l,g);else for(;d!==null;){if(d.tag===3){E9(d,l,g);break}else if(d.tag===1){var S=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(eu===null||!eu.has(S))){l=Ra(g,l),g=N8(2),S=Wl(d,g,2),S!==null&&(z8(g,S,d,l),un(S,2),Fo(S));break}}d=d.return}}function y2(l,d,g){var S=l.pingCache;if(S===null){S=l.pingCache=new bK;var R=new Set;S.set(d,R)}else R=S.get(d),R===void 0&&(R=new Set,S.set(d,R));R.has(g)||(f2=!0,R.add(g),l=SK.bind(null,l,d,g),d.then(l,l))}function SK(l,d,g){var S=l.pingCache;S!==null&&S.delete(d),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,br===l&&(Tn&g)===g&&(Ur===4||Ur===3&&(Tn&62914560)===Tn&&300>nt()-Ng?(tr&2)===0&&md(l,0):d2|=g,hd===Tn&&(hd=0)),Fo(l)}function N9(l,d){d===0&&(d=ln()),l=Jr(l,d),l!==null&&(un(l,d),Fo(l))}function CK(l){var d=l.memoizedState,g=0;d!==null&&(g=d.retryLane),N9(l,g)}function EK(l,d){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(d),N9(l,g)}function NK(l,d){return Mt(l,d)}var Og=null,vd=null,x2=!1,Dg=!1,w2=!1,ru=0;function Fo(l){l!==vd&&l.next===null&&(vd===null?Og=vd=l:vd=vd.next=l),Dg=!0,x2||(x2=!0,jK())}function Rp(l,d){if(!w2&&Dg){w2=!0;do for(var g=!1,S=Og;S!==null;){if(l!==0){var R=S.pendingLanes;if(R===0)var O=0;else{var X=S.suspendedLanes,ne=S.pingedLanes;O=(1<<31-At(42|l)+1)-1,O&=R&~(X&~ne),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,T9(S,O))}else O=Tn,O=gs(S,S===br?O:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(O&3)===0||ns(S,O)||(g=!0,T9(S,O));S=S.next}while(g);w2=!1}}function zK(){z9()}function z9(){Dg=x2=!1;var l=0;ru!==0&&BK()&&(l=ru);for(var d=nt(),g=null,S=Og;S!==null;){var R=S.next,O=j9(S,d);O===0?(S.next=null,g===null?Og=R:g.next=R,R===null&&(vd=g)):(g=S,(l!==0||(O&3)!==0)&&(Dg=!0)),S=R}ks!==0&&ks!==5||Rp(l),ru!==0&&(ru=0)}function j9(l,d){for(var g=l.suspendedLanes,S=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0ne)break;var Be=he.transferSize,Ue=he.initiatorType;Be&&B9(Ue)&&(he=he.responseEnd,X+=Be*(he"u"?null:document;function Y9(l,d,g){var S=bd;if(S&&typeof d=="string"&&d){var R=Bt(d);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),X9.has(R)||(X9.add(R),l={rel:l,crossOrigin:g,href:d},S.querySelector(R)===null&&(d=S.createElement("link"),Fs(d,"link",l),An(d),S.head.appendChild(d)))}}function WK(l){Qc.D(l),Y9("dns-prefetch",l,null)}function QK(l,d){Qc.C(l,d),Y9("preconnect",l,d)}function XK(l,d,g){Qc.L(l,d,g);var S=bd;if(S&&l&&d){var R='link[rel="preload"][as="'+Bt(d)+'"]';d==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+Bt(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+Bt(g.imageSizes)+'"]')):R+='[href="'+Bt(l)+'"]';var O=R;switch(d){case"style":O=yd(l);break;case"script":O=xd(l)}$a.has(O)||(l=f({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:l,as:d},g),$a.set(O,l),S.querySelector(R)!==null||d==="style"&&S.querySelector(Lp(O))||d==="script"&&S.querySelector(Ip(O))||(d=S.createElement("link"),Fs(d,"link",l),An(d),S.head.appendChild(d)))}}function YK(l,d){Qc.m(l,d);var g=bd;if(g&&l){var S=d&&typeof d.as=="string"?d.as:"script",R='link[rel="modulepreload"][as="'+Bt(S)+'"][href="'+Bt(l)+'"]',O=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=xd(l)}if(!$a.has(O)&&(l=f({rel:"modulepreload",href:l},d),$a.set(O,l),g.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(Ip(O)))return}S=g.createElement("link"),Fs(S,"link",l),An(S),g.head.appendChild(S)}}}function ZK(l,d,g){Qc.S(l,d,g);var S=bd;if(S&&l){var R=Yr(S).hoistableStyles,O=yd(l);d=d||"default";var X=R.get(O);if(!X){var ne={loading:0,preload:null};if(X=S.querySelector(Lp(O)))ne.loading=5;else{l=f({rel:"stylesheet",href:l,"data-precedence":d},g),(g=$a.get(O))&&$2(l,g);var he=X=S.createElement("link");An(he),Fs(he,"link",l),he._p=new Promise(function(Ne,Be){he.onload=Ne,he.onerror=Be}),he.addEventListener("load",function(){ne.loading|=1}),he.addEventListener("error",function(){ne.loading|=2}),ne.loading|=4,Pg(X,d,S)}X={type:"stylesheet",instance:X,count:1,state:ne},R.set(O,X)}}}function JK(l,d){Qc.X(l,d);var g=bd;if(g&&l){var S=Yr(g).hoistableScripts,R=xd(l),O=S.get(R);O||(O=g.querySelector(Ip(R)),O||(l=f({src:l,async:!0},d),(d=$a.get(R))&&B2(l,d),O=g.createElement("script"),An(O),Fs(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function eV(l,d){Qc.M(l,d);var g=bd;if(g&&l){var S=Yr(g).hoistableScripts,R=xd(l),O=S.get(R);O||(O=g.querySelector(Ip(R)),O||(l=f({src:l,async:!0,type:"module"},d),(d=$a.get(R))&&B2(l,d),O=g.createElement("script"),An(O),Fs(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function Z9(l,d,g,S){var R=(R=ue.current)?Bg(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"?(d=yd(g.href),g=Yr(R).hoistableStyles,S=g.get(d),S||(S={type:"style",instance:null,count:0,state:null},g.set(d,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=yd(g.href);var O=Yr(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(Lp(l)))&&!O._p&&(X.instance=O,X.state.loading=5),$a.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},$a.set(l,g),O||tV(R,l,g,X.state))),d&&S===null)throw Error(r(528,""));return X}if(d&&S!==null)throw Error(r(529,""));return null;case"script":return d=g.async,g=g.src,typeof g=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=xd(g),g=Yr(R).hoistableScripts,S=g.get(d),S||(S={type:"script",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function yd(l){return'href="'+Bt(l)+'"'}function Lp(l){return'link[rel="stylesheet"]['+l+"]"}function J9(l){return f({},l,{"data-precedence":l.precedence,precedence:null})}function tV(l,d,g,S){l.querySelector('link[rel="preload"][as="style"]['+d+"]")?S.loading=1:(d=l.createElement("link"),S.preload=d,d.addEventListener("load",function(){return S.loading|=1}),d.addEventListener("error",function(){return S.loading|=2}),Fs(d,"link",g),An(d),l.head.appendChild(d))}function xd(l){return'[src="'+Bt(l)+'"]'}function Ip(l){return"script[async]"+l}function eE(l,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var S=l.querySelector('style[data-href~="'+Bt(g.href)+'"]');if(S)return d.instance=S,An(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"),An(S),Fs(S,"style",R),Pg(S,g.precedence,l),d.instance=S;case"stylesheet":R=yd(g.href);var O=l.querySelector(Lp(R));if(O)return d.state.loading|=4,d.instance=O,An(O),O;S=J9(g),(R=$a.get(R))&&$2(S,R),O=(l.ownerDocument||l).createElement("link"),An(O);var X=O;return X._p=new Promise(function(ne,he){X.onload=ne,X.onerror=he}),Fs(O,"link",S),d.state.loading|=4,Pg(O,g.precedence,l),d.instance=O;case"script":return O=xd(g.src),(R=l.querySelector(Ip(O)))?(d.instance=R,An(R),R):(S=g,(R=$a.get(O))&&(S=f({},g),B2(S,R)),l=l.ownerDocument||l,R=l.createElement("script"),An(R),Fs(R,"link",S),l.head.appendChild(R),d.instance=R);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(S=d.instance,d.state.loading|=4,Pg(S,g.precedence,l));return d.instance}function Pg(l,d,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 nV(l,d,g){if(g===1||d.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;switch(d.rel){case"stylesheet":return l=d.disabled,typeof d.precedence=="string"&&l==null;default:return!0}case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function rE(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function rV(l,d,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=yd(S.href),O=d.querySelector(Lp(R));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(l.count++,l=Hg.bind(l),d.then(l,l)),g.state.loading|=4,g.instance=O,An(O);return}O=d.ownerDocument||d,S=J9(S),(R=$a.get(R))&&$2(S,R),O=O.createElement("link"),An(O);var X=O;X._p=new Promise(function(ne,he){X.onload=ne,X.onerror=he}),Fs(O,"link",S),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=Hg.bind(l),d.addEventListener("load",g),d.addEventListener("error",g))}}var P2=0;function sV(l,d){return l.stylesheets&&l.count===0&&Ug(l,l.stylesheets),0P2?50:800)+d);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function Hg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ug(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var qg=null;function Ug(l,d){l.stylesheets=null,l.unsuspend!==null&&(l.count++,qg=new Map,d.forEach(iV,l),qg=null,Hg.call(l))}function iV(l,d){if(!(d.state.loading&4)){var g=qg.get(l);if(g)var S=g.get(null);else{g=new Map,qg.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(),X2.exports=iW(),X2.exports}var oW=aW();const cW=!1;var gD=T.useLayoutEffect;function lW(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 uW(e){const n=T.useRef(null);return T.useImperativeHandle(e,()=>n.current,[]),n}function A0(e){return e[e.length-1]}function Ch(e,n){return typeof e=="function"?e(n):e}const vD=Object.prototype.hasOwnProperty,_W=Object.prototype.propertyIsEnumerable;function bD(e){for(const n in e)if(vD.call(e,n))return!0;return!1}const fW=()=>Object.create(null),E_=(e,n)=>B_(e,n,fW);function B_(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=FE(e)&&FE(s);if(!i&&!(Sv(e)&&Sv(s)))return s;const a=i?e:BE(e);if(!a)return s;const o=i?s:BE(s);if(!o)return s;const c=a.length,u=o.length,h=i?new Array(u):t();let f=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!PE(t)||!t.hasOwnProperty("isPrototypeOf"))}function PE(e){return Object.prototype.toString.call(e)==="[object Object]"}function FE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ou(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||!Ou(e[a],n[a],t)))return!1;return s===i}return!1}const dW=/[\x00-\x1f\x7f"<>`{}]/g;function hW(e){return e.replace(dW,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function HE(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 hW(n)}const pW=["http:","https:","mailto:","tel:"];function Cv(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function Gp(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+=HE(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+HE(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function mW(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function gW(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 Au=4,yD=5;function xD(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!I.parse&&I.caseSensitive===z&&I.prefix===j&&I.suffix===A));if(D)y=D;else{const I=vW(N,f,z,j,A);y=I,I.parent=s,I.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(I),B.length===2&&(a==null||a.push(B))}break}}s=y}if(k&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=Kd(f);b.kind=yD,b.parent=s,i++,b.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&f.endsWith("/")){const b=Kd(f);b.kind=Au,b.parent=s,i++,b.depth=i,s.index=b,s=b}s.parse=k??null,s.priority=((h=p==null?void 0:p.params)==null?void 0:h.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=f)}if(t.children)for(const f of t.children)Ob(e,n,f,c,s,i,a,o)}function wD(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 Kd(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 vW(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 bW(e,n){const t=Kd("/"),r=new Uint16Array(6),s=[];for(const i of e)Ob(!1,r,i,1,t,0,s);for(const i of s)i.sort(wD);n.masksTree=t,n.flatCache=Ev(1e3)}function yW(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=sS(e,n.masksTree);return n.flatCache.set(e,r),r}function xW(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=Kd("/"),Ob(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),sS(r,a,t)}function wW(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=sS(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=SD(i.route)),n.matchCache.set(r,i),i}function kW(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function SW(e,n=!1,t){const r=Kd(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let c=0;Ob(n,s,e,1,r,0,i,u=>{if(t==null||t(u,c),u.id in a&&rS(),a[u.id]=u,c!==0&&u.path){const h=kW(u.fullPath);(!o[h]||u.fullPath.endsWith("/"))&&(o[h]=u)}c++});for(const u of i)u.sort(wD);return{processedTree:{segmentTree:r,singleCache:Ev(1e3),matchCache:Ev(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function sS(e,n,t=!1){const r=e.split("/"),s=EW(e,r,n,t);if(!s)return null;const[i]=kD(e,r,s);return{route:s.node.route,rawParams:i}}function kD(e,n,t){var h,f,p,m;const r=CW(t.node);let s=null;const i=Object.create(null);let a=((h=t.extract)==null?void 0:h.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;j--){const A=f.wildcard[j],{prefix:z,suffix:M}=A;if(!(z&&(x||!(A.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(z)))){if(M){if(x)continue;const D=n.slice(p).join("/"),I=D.slice(-M.length);if((A.caseSensitive?I:I.toLowerCase())!==M||D.length-M.length=0;A--){const z=f.optional[A];o.push({node:z,index:p,skipped:j,statics:w,dynamics:k,optionals:v,extract:b,rawParams:y})}if(!x)for(let A=f.optional.length-1;A>=0;A--){const z=f.optional[A],{prefix:M,suffix:D}=z;if(M||D){const I=z.caseSensitive?C:N??(N=C.toLowerCase());if(M&&!I.startsWith(M)||D&&I.indexOf(D,I.length-D.length)=0;j--){const A=f.dynamic[j],{prefix:z,suffix:M}=A;if(z||M){const D=A.caseSensitive?C:N??(N=C.toLowerCase());if(z&&!D.startsWith(z)||M&&D.indexOf(M,D.length-M.length)=0;j--){const A=f.pathless[j];o.push({node:A,index:p,skipped:m,statics:w,dynamics:k,optionals:v,extract:b,rawParams:y})}}if(u)return u;if(r&&c){let h=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===Au)>(e.node.kind===Au)||n.node.kind===Au==(e.node.kind===Au)&&n.node.depth>e.node.depth))):!0}function X1(e){return Y1(e.filter(n=>n!==void 0).join("/"))}function Y1(e){return e.replace(/\/{2,}/g,"/")}function CD(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ll(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function ED(e){return ll(CD(e))}function Nv(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function zW(e,n,t){return Nv(e,t)===Nv(n,t)}function jW({base:e,to:n,trailingSlash:t="never",cache:r}){if(n.includes("//")&&(n=Y1(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=Y1(e)),a=e.split("/");a.length>1&&A0(a)==="";)a.pop();const u=n.split("/");for(let h=0,f=u.length;h1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(A0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),c=(s?Y1(o):o)||"/";return i&&r&&r.set(i,c),c}function AW(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 ew(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=>GE(s,t)).join("/"):GE(r,t)}function UE({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 IW(e){const n=e.getAttribute(KE);if(n)return`[${KE}="${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 t1=!1;const Z1="window";function b3(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function VE(e){const n=new Set;for(const t of e){if(t===Z1)continue;const r=b3(t);r&&n.add(r)}return n}function $W(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||LW,i=new Set,a=o=>{const c=gu[o]||(gu[o]={});for(const u of i)u===document?c[Z1]={scrollX,scrollY}:u.isConnected&&(c[IW(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,t1=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{t1||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())),DW()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var k;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,h=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=gu[w];if(v){let b=gu[m];for(const y in v){if(y===Z1){if(h)continue}else{const x=b3(y);if(!x||h&&u&&(p??(p=VE(u)),p.has(x)))continue}b||(b=gu[m]={}),b[y]??(b[y]=v[y])}}}t1=!0;try{const v=o.toLocation.hash,b=o.toLocation.state.__hashScrollIntoViewOptions??!0;let y=!1;if(h){!v&&u&&(p??(p=VE(u)));const x=v&&b&&f,C=r.restoring?gu[m]:void 0;if(C)for(const N in C){const{scrollX:j,scrollY:A}=C[N];if(N===Z1){if(x)continue;scrollTo({top:A,left:j,behavior:c}),y=!0}else{const z=b3(N);z&&(z.scrollLeft=j,z.scrollTop=A,p==null||p.delete(z))}}if(!v){const N={top:0,left:0,behavior:c};if(y||scrollTo(N),p)for(const j of p)j.scrollTo(N)}}!y&&v&&b&&((k=document.getElementById(v))==null||k.scrollIntoView(b))}finally{t1=!1}}))}function BW(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 tw(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function PW(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]=tw(s):Array.isArray(i)?i.push(tw(s)):t[r]=[i,tw(s)]}return t}const FW=/^(?:\s|["[{\d-]|fa|nu|tr)/,HW=UW(JSON.parse),qW=GW(JSON.stringify,JSON.parse);function UW(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=PW(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function GW(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&&!FW.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=BW(s,r);return i?`?${i}`:""}}const Wd="__root__";function KW(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 ND(e){return e instanceof Response&&!!e.options}function VW(e){return{input:({url:n})=>{for(const t of e)n=y3(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=zD(e[t],n);return n}}}function WW(e){const n=ED(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=X1(["/",n,i.pathname]),i)}}function y3(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 zD(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 QW(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([]),h=r(()=>u.get().map(k=>i.get(k).get())),f=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:h.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:h,byRoute:i,__store:f,getMatchStore:p,setMatches:w};function w(k){const v=u.get(),b=k.map(y=>y.routeId);s(()=>{gW(v,b)||u.set(b);for(const y of v)b.includes(y)||i.get(y).set(()=>{});for(const y of k){const x=p(y.routeId);x.get()!==y&&x.set(y)}})}return m}var Du="__TSR_index",WE="popstate",QE="beforeunload";function XW(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))??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&h)for(const m of u){const w=zv(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[Du];o=XE(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[Du];o=XE(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[Du]!==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 h,f;const u=((h=e.getBlockers)==null?void 0:h.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 XE(e,n){n||(n={});const t=iS();return{...n,key:t,__TSR_key:t,[Du]:e}}function YW(e){var A,z;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=(()=>zv(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((A=n.history.state)!=null&&A.__TSR_key)&&!((z=n.history.state)!=null&&z.key)){const M=iS();n.history.replaceState({[Du]:0,key:M,__TSR_key:M},"")}let u=c(),h,f=!1,p=!1,m=!1,w=!1;const k=()=>u;let v;const b=()=>{v&&(j._ignoreSubscribers=!0,(v[2]?n.history.pushState:n.history.replaceState)(v[1],"",v[0]),j._ignoreSubscribers=!1,v=void 0,h=void 0)},y=(M,D,I)=>{const B=o(D),G=!!v;G||(h=u),u=zv(D,I),v=[B,I,(v==null?void 0:v[2])||M],G||queueMicrotask(()=>b())},x=M=>{u=c(),j.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=c(),D=M.state[Du]-u.state[Du],I=D===1,B=D===-1,G=!I&&!B||f;f=!1;const U=G?"GO":B?"BACK":"FORWARD",Q=G?{type:"GO",index:D}:{type:B?"BACK":"FORWARD"};if(m)m=!1;else{const V=i();if(typeof document<"u"&&V.length){for(const Z of V)if(await Z.blockerFn({currentLocation:u,nextLocation:M,action:U})){p=!0,n.history.go(1),j.notify(Q);return}}}u=c(),j.notify(Q)},N=M=>{if(w){w=!1;return}let D=!1;const I=i();if(typeof document<"u"&&I.length)for(const B of I){const G=B.enableBeforeUnload??!0;if(G===!0){D=!0;break}if(typeof G=="function"&&G()===!0){D=!0;break}}if(D)return M.preventDefault(),M.returnValue=""},j=XW({getLocation:k,getLength:()=>n.history.length,pushState:(M,D)=>y(!0,M,D),replaceState:(M,D)=>y(!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:b,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(QE,N,{capture:!0}),n.removeEventListener(WE,C)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(QE,N,{capture:!0}),n.addEventListener(WE,C),n.history.pushState=function(...M){const D=t.apply(n.history,M);return j._ignoreSubscribers||x("PUSH"),D},n.history.replaceState=function(...M){const D=r.apply(n.history,M);return j._ignoreSubscribers||x("REPLACE"),D},j}function ZW(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function zv(e,n){const t=ZW(e),r=t.indexOf("#"),s=t.indexOf("?"),i=iS();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||{[Du]:0,key:i,__TSR_key:i}}}function iS(){return(Math.random()+1).toString(36).substring(7)}function YE(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 Db(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 ZE({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function JW(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 eQ=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??cW??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=AW(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=YW()),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=Ev(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=QW(this.latestLocation,u),$W(this)}const o=this.options.basepath??"/",c=this.options.rewrite;if(i||s!==o||a!==c){this.basepath=o;const u=[],h=ED(o);h&&h!=="/"&&u.push(WW({basepath:o})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:VW(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=SW(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&bW(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:h,href:f,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const b=this.options.parseSearch(u),y=this.options.stringifySearch(b);return{href:c+y+h,publicHref:c+y+h,pathname:Gp(c).path,external:!1,searchStr:y,search:E_(r==null?void 0:r.search,b),hash:Gp(h.slice(1)).path,state:B_(r==null?void 0:r.state,p)}}const m=new URL(f,this.origin),w=y3(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:Gp(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:v,search:E_(r==null?void 0:r.search,k),hash:Gp(w.hash.slice(1)).path,state:B_(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)=>jW({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=wW(ll(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 I=zv(i.href,{});i={...i,to:y3(this.rewrite,new URL(I.pathname,this.origin)).pathname,search:this.options.parseSearch(I.search),hash:I.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],h=o[3],f=this.resolvePathWithBase(c,i.to?`${i.to}`:".");let p=JE(i.params,h);const m=this.routesByPath[ll(f)];let w;if(m)w=this.getRouteBranch(m);else if(f.includes("$"))w=[];else{const[I,B,G]=this.getMatchedRoutes(f);w=I,this.options.notFoundRoute&&(!G||G.path!=="/"&&B["**"])&&(w=[...w,this.options.notFoundRoute])}if(w.length&&bD(p))for(const I of w){const B=((M=I.options.params)==null?void 0:M.stringify)??I.options.stringifyParams;if(B){p===h&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,B(p))}catch{}}}const k=t.leaveParams?f:Gp(UE({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 I={};w.forEach(B=>{if(B.options.validateSearch)try{Object.assign(I,J1(B.options.validateSearch,{...I,...v}))}catch{}}),v=I}v=nQ(v,i,w,t._includeValidateSearch),v=E_(u,v);const b=this.options.stringifySearch(v),y=i.hash===!0?a.hash:i.hash?Ch(i.hash,a.hash):void 0,x=y?`#${y}`:"";let C=i.state===!0?a.state:i.state?Ch(i.state,a.state):{};i.state&&(C=B_(a.state,C));const N=`${k}${b}${x}`;let j,A,z=!1;if(this.rewrite){const I=new URL(N,this.origin),B=zD(this.rewrite,I);j=I.href.replace(I.origin,""),B.origin!==this.origin?(A=B.href,z=!0):A=B.pathname+B.search+B.hash}else j=mW(N),A=j;return{publicHref:A,href:j,pathname:k,search:v,searchStr:b,state:C,hash:y??"",external:z,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=yW(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:c,...u}=i.route,h=JE(c,a);s.maskedLocation=r({from:t.from,...u,params:h})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=ll(this.latestLocation.href)===ll(s.href)&&Ou(ZE(s.state),ZE(this.latestLocation.state)),o=this._commitPromise;let c;const u=new Promise(h=>{c=h});if(u.resolve=()=>{c(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:h,hashScrollIntoView:f,...p}=s;h&&(p={...h,state:{...h.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 h=!o&&i?i:s;if(Cv(h,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(h):window.location.href=h;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 _Q(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(Db(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,h;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")&&YE(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)(h=this._flights)==null||h.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&&Cv(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[h,f]of r)(!i||i(f))&&(o.push(h),a.push(f));const c=[];for(const[h,f]of s??[])(!i||f.some(i))&&(c.push(h),a.push(...f));for(const h of o)r.delete(h);for(const h of c)s.delete(h);for(const h of a){const f=h._flight;h._flight=void 0,f&&!--f[2]&&(((u=this._flights)==null?void 0:u.get(h.id))===f&&this._flights.delete(h.id),c.push(f[1]))}for(const h of c)h.abort()},this.loadRouteChunk=Qd,this.preloadRoute=t=>fQ(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=xW(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!c||t.params&&!Ou(c.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Ou(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??qW,parseSearch:e.parseSearch??HW,protocolAllowlist:e.protocolAllowlist??pW}),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=SD(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["**"]:ll(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?rQ(this.options.notFoundMode,i):void 0,c=new Array(i.length),u=this._committed,h=(w,k)=>{const v=u[k];return(v==null?void 0:v.routeId)===w.id?v:w===this.options.notFoundRoute?u.find(b=>b.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(h)}const u=c.validateSearch;if(r&&u){const h=({search:f,next:p,meta:m})=>{const w=p(f);try{const k=J1(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(h)}}const i=(o,c,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return c;const f=Ch(n.search,c);return u&&(u.explicit=f),f}const h=(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:h,meta:u})};return i(0,e)}function rQ(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 Wd}function JE(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,Ch(e,t))}function eN(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 x3(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function sQ(e,n){const t=x3(e,"component");let r=x3(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function Qd(e,n,t){const r=()=>n===!1?void 0:n?x3(e,n):sQ(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 aS(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 Af(e,n){return e.routesById[n.routeId]}function R0(e,n,t){return ND(e)?[da,e]:Eh(e)?(e.routeId||(e.routeId=t),[Lb,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[pl,e]):[ic,e]}function oS(e,n){var r,s;let t=R0(n,!0,e.id);if(t[0]!==pl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=R0(i,!0,e.id)}return t}function m0(e,n,t,r,s){return s[0].signal.aborted?$u:uS(e,n,t,oS(t,r),s)}async function iQ(e,n,t,r,s,i){var h,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 ul(e,m),[p,m0(e,n,w,C,t)]}if(c.aborted)return[p,$u];const b=m.paramsError??m.searchError;if(b!==void 0)return ul(e,m),[p,m0(e,n,w,b,t)];const y=w.options.beforeLoad;if(!y)continue;const x=m.status;p>=i&&(m.status="pending",(f=t[7])==null||f.call(t));try{M0(e,m,"beforeLoad",t[0]);const C=await jf(y({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,$u];const N=uS(e,n,w,R0(C,!1,w.id),t);if(N[0]!==ic)return ul(e,m),[p,N];m.context={...m.context,...C}}catch(C){return ul(e,m),[p,m0(e,n,w,C,t)]}finally{m.status=x,M0(e,m,!1,t[0])}}s()}function cS(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 ul(e,n){var r;const t=n._flight;n._flight=void 0,(r=cS(e,n,t))==null||r.abort()}function qi(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=cS(e,a,o);c&&s.push(c)}}for(const a of s)a.abort()}function lS(e){for(const n of e){const t=n._flight;t&&t[2]++}}function M0(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 jD(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 tN(e,n,t,r,s,i,a){const o=a[0],c=o.signal;if(c.aborted)return $u;if(!s)return[ic,void 0];let u=t._flight;M0(e,t,"loader",o);try{if(!u){const h=new AbortController;u=[Promise.resolve().then(()=>s(jD(e,n,t,r,h,i,!!a[3]))).then(f=>R0(f,!1,r.id),f=>R0(f,!0,r.id)).then(f=>{var p;return f[0]!==ic&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||h.abort()),f[0]===pl&&u[2]?oS(r,f[1]):f}),h,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],uS(e,n,r,await jf(u[0],c),a)}catch(h){if(h!==c||!c.aborted)throw h;return ul(e,t),$u}finally{M0(e,t,!1,o)}}function nN(e,n,t){n[0]!==da&&(e.status="success",e.error=void 0,n[0]===ic?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function aQ(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&&ul(e,r)}function rN(e,n){return n[0]===pl||n[0]===Lb?{...e,status:n[0]===pl?"error":"notFound",error:n[1],_flight:void 0}:e}function oQ(e,n,t,r,s,i,a){var B,G;const o=n[1][t],c=Af(e,o),u=!!i[3],h=e._cache.get(o.id);let f,p=!1,m;try{if(o.status==="success"&&(f=c.options.shouldReload,typeof f=="function"&&(f=f(jD(e,n,o,c,i[0],s,u))),i[0].signal.aborted&&(m=$u)),!m)if(o.status!=="success")p=!0;else{const U=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>=U&&(i[5]||o.cause==="enter"||i[2].some(Q=>Q.routeId===o.routeId&&Q.id!==o.id)))}}catch(U){o.invalid=!0,ul(e,o),m=m0(e,n,c,U,i)}const w=c.options.loader,k=typeof w=="function",v=k?w:w==null?void 0:w.handler,b=!u||c.options.preload!==!1;let y=b&&w?(B=e._flights)==null?void 0:B.get(o.id):void 0;y===o._flight||m?y=void 0:y&&!p&&!u&&f===void 0?p=!0:p||(y=void 0);const x=!!(w&&p&&o.status==="success"&&!u&&!i[4]&&((k?void 0:w.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&b,N=C&&!x&&(o.status!=="success"||!!w),j=t>=a?i[7]:void 0,A=c.lazyFn&&c._lazy!==!0?j:void 0;if(C&&!w&&(o.invalid=!1,o.updatedAt=Date.now()),y&&y[2]++,N){const U=o._flight;o._flight=y,(G=cS(e,o,U))==null||G.abort(),t>=a&&(o.status="pending"),j==null||j()}C||(o.isFetching=!1);const z=(m?Promise.resolve(m):N?tN(e,n,o,c,v,s,i):Promise.resolve([ic,o.loaderData])).then(U=>(N&&(nN(o,U,u),U[0]===ic&&(w&&!i[0].signal.aborted&&aQ(e,o,h),t>=a&&(o.status="pending"))),U)),M=jf(Promise.resolve().then(()=>Qd(c,void 0,A)),i[0].signal).then(()=>{},U=>n[1].some((Q,V)=>V<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,m0(e,n,c,U,i)]).then(U=>z.then(Q=>(N&&!U&&Q[0]===ic&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",j==null||j()),U)));if(r.push([t,z,M]),!x)return z.then(U=>rN(o,U));const D={...o,status:"pending",preload:!1,_flight:y};o.invalid=!1,o.isFetching="loader";const I=tN(e,n,D,c,v,s,i).then(U=>(o.isFetching=!1,nN(D,U,!1),U));return(n[2]??(n[2]=[])).push([t,I,M,D]),I.then(U=>rN(D,U))}async function w3(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=Af(e,n[o]);try{const u=Qd(c,!1);u&&await jf(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 nf(e,n){n[2]&&(qi(e,n[2].map(t=>t[3])),n[2]=void 0)}async function sN(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]>=da)throw[o,a];!s&&a[0]!==ic&&(s=[o,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=o))return c[1].then(u=>{if(u[0]===da)throw[c[0],u]})})))}})))}catch(i){return i}return n??s}function uS(e,n,t,r,s,i){for(;r[0]===da;){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):[da,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(c){r=i?[pl,c]:oS(t,c),i=!0}}return r}async function AD(e,n,t,r,s,i){const a=n[1];let o=await s,c=!1;const u=a.findIndex(m=>m._notFound),h=m=>m[1][0]===Lb?w3(e,a,m,r.signal):m[0];let f=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=da)f=0;else if(o){f=o[2]??(o[2]=await h(o));for(const m of t){if(m[0]>=f)break;const w=await m[1];if(w[0]!==ic&&w[0]=f)break;const w=await m[2];if(w){o=w;break}}if(((o==null?void 0:o[1][0])??0)>=da){const m=o[1];if(m[0]!==da||m[1].options.reloadDocument||m[2])return nf(e,n),m;c=!0,o=[0,[pl,new Error("Too many redirects")]]}const p=o?o[2]??await h(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],b=()=>{m&&(k._notFound=void 0,w===pl?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)};b(),m||i==null||i();const y=Af(e,k);try{await jf(m?Promise.resolve().then(()=>Qd(y,w===pl?"errorComponent":"notFoundComponent")):Promise.all([Qd(y),Qd(y,"notFoundComponent")]),r.signal)}catch(x){if(x===r.signal&&r.signal.aborted)return nf(e,n),$u}m?c&&(r.abort(),await Promise.all([...t.map(x=>x[1]),...t.map(x=>x[2]),...(n[2]??[]).map(x=>x[1])]),nf(e,n),qi(e,a),b()):k.status="success"}return n}async function TD(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let c=r;cy._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const y=await w3(e,t,void 0,i,u);t[u]._notFound=void 0,t[y]._notFound=!0,u=y}let h=u<0?t.length:u+1,f=0;for(;f{for(let y=m;y=da&&(h=0);k()}if(!i.aborted&&!r[3]){const y=[];for(const[x,C]of e._flights??[])C[2]||(e._flights.delete(x),y.push(C[1]));for(const x of y)x.abort()}const b=AD(e,s,p,r[0],sN(p,v,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=sN(s[2],void 0,void 0,b.then(y=>T0(y)?0:aS(t).length,()=>0))),a=await b}catch(c){if(nf(e,s),c===i&&i.aborted)return $u;throw c}return T0(a)?a:TD(e,a,i,r[6]===t.length?r[6]:0)}function k3(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(()=>k3(e,n),y);return}s[2]=0}const v=t.map(y=>({...y,_flight:void 0}));v[o].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(y=>(y&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+w),y));return}}function Kp(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 iN(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!aS(n[3]).some(i=>i.id===t[1]))return;let s;try{await jf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function MD(e,n){e._committed=n,e.stores.setMatches(n)}function cQ(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=aS(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?h.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:h.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,MD(e,t),qi(e,[...i.values(),...s],[...t,...o.values()]),JW(e,s,t,n)}async function n1(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function OD(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 lQ(e,n,t,r,s){const i=t.map(c=>({...c}));lS(i);for(const c of r)ul(e,i[c[0]]),i[c[0]]=c[3];const a=[n[2],i];let o;try{o=await AD(e,a,r,n[0],s)}catch(c){throw qi(e,i),c}if(T0(o)){qi(e,i),o[0]===da&&e._tx===n&&e._committed===t&&await OD(e,n,o);return}if(await TD(e,o,n[0].signal),e._tx!==n||e._committed!==t){qi(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),ul(e,u))}MD(e,i),qi(e,t,i)}async function uQ(e,n,t,r,s,i){const a=await RD(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(T0(a)){const f=a[0]===da&&e._tx===n;if((!f||a[1].options.reloadDocument)&&Kp(e,n),qi(e,n[3]),n[3]=[],!f)return;if(e._tx!==n){Kp(e,n);return}await OD(e,n,a);return}const o=a[1];if(e._tx===n&&await iN(e,n),e._tx!==n){Kp(e,n),qi(e,o),nf(e,a);return}const c=n[2],u=Db(c,e.stores.resolvedLocation.get()),h=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await iN(e,n),e._tx!==n){Kp(e,n),qi(e,o),nf(e,a);return}const f=()=>{Kp(e,n),cQ(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){nf(e,a);return}h!=null&&h.length&&lQ(e,n,o,h,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 _Q(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](),h=new AbortController,f=e._preflight;if(e._preflight=h,u||c==null||c[1](),f==null||f.abort(),!h.signal.aborted){const N=Db(i,r);e.emit({type:"onBeforeNavigate",...N}),h.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(h.signal.aborted){await n1(e,t);return}const p=s.href===i.href;let m=h;const w=e.matchRoutes(i,{_controller:h});lS(w);const k=u?c[1](w):void 0;if(k?m=u:u==null||u.abort(),h.signal.aborted){qi(e,w),await n1(e,t);return}e._preflight=void 0;let v;const b=()=>uQ(e,x,p,()=>k3(e,x),n==null?void 0:n.sync,k),y=n!=null&&n.sync?new Promise(N=>v=N):Promise.resolve().then(b).then(),x=[m,o,i,w,Date.now(),y];if(e._tx=x,t){for(const N of e.stores.matches.get()){if(e._tx!==x)break;N.isFetching&&M0(e,N,!1)}t[0].abort(),qi(e,t[3],x[3],!0)}if(e._tx!==x){qi(e,x[3]),x[3]=[],v==null||v(),await n1(e,x);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))&&k3(e,x),v==null||v(b()),await y,await n1(e,x)}async function fQ(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}),lS(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),c=await RD(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),qi(e,a)),i.abort()}if(!T0(c))return c[1];if(!o||c.length<3)return;t=c[2]}catch(u){Eh(u)||console.error(u);return}}}const dQ="Error preloading route! ☝️";var DD=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=Wd:this.parentRoute||rS();let s=r?Wd:t==null?void 0:t.path;s&&s!=="/"&&(s=CD(s));const i=(t==null?void 0:t.id)||s;let a=r?Wd:X1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=X1(["/",a]));const o=a==="__root__"?"/":X1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=ll(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=>KW({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.")}},hQ=class extends DD{constructor(e){super(e)}},_S=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??pQ,{error:e,reset:this.reset}):this.props.children}};function pQ({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 mQ({children:e,fallback:n=null}){return _.jsx(it.Fragment,{children:LD()?e:n})}function LD(){return it.useSyncExternalStore(gQ,()=>!0,()=>!1)}function gQ(){return()=>{}}var ID=T.createContext(null);function xi(e){return T.useContext(ID)}var Ib=T.createContext(void 0),vQ=T.createContext(void 0),jr=(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))(jr||{});function bQ({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,h,f){const p=h.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:h.deps;if(m!==void 0&&m.dep===u){m.version=f,h.depsTail=m;return}const w=u.subsTail;if(w!==void 0&&w.version===f&&w.sub===h)return;const k=h.depsTail=u.subsTail={version:f,dep:u,sub:h,prevDep:p,nextDep:m,prevSub:w,nextSub:void 0};m!==void 0&&(m.prevDep=k),p!==void 0?p.nextDep=k:h.deps=k,w!==void 0?w.nextSub=k:u.subs=k}function s(u,h=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:h.depsTail=p,p!==void 0?p.nextDep=m:h.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 h=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:h,prev:f},h=k);continue}}if((u=h)!==void 0){h=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){h=u.nextSub;continue e}break}while(!0)}function a(u,h){let f,p=0,m=!1;e:do{const w=u.dep,k=w.flags;if(h.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,h=w,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=h.subs,b=v.nextSub!==void 0;if(b?(u=f.value,f=f.prev):u=v,m){if(e(h)){b&&o(v),h=u.sub;continue}m=!1}else h.flags&=-33;h=u.sub;const y=u.nextDep;if(y!==void 0){u=y;continue e}}return m}while(!0)}function o(u){do{const h=u.sub,f=h.flags;(f&48)===32&&(h.flags=f|16,(f&6)===2&&n(h))}while((u=u.nextSub)!==void 0)}function c(u,h){let f=h.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}function yQ(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 S3=[];let ev=0;const{link:aN,unlink:xQ,propagate:wQ,checkDirty:$D,shallowPropagate:oN}=bQ({update(e){return e._update()},notify(e){S3[C3++]=e,e.flags&=~jr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=jr.Mutable|jr.Dirty,Av(e))}});let r1=0,C3=0,Xo,E3=0;function kQ(e){try{++E3,e()}finally{--E3||BD()}}function Av(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=xQ(t,e)}function BD(){if(!(E3>0)){for(;r1{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=Xo,o=(n==null?void 0:n.compare)??Object.is;if(t)Xo=s,++ev,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=jr.Mutable|jr.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{Xo=a,t&&(s.flags&=~jr.RecursedCheck),Av(s)}}};return t?(s.flags=jr.Mutable|jr.Dirty,s.get=function(){const i=s.flags;if(i&jr.Dirty||i&jr.Pending&&$D(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&oN(a)}}else i&jr.Pending&&(s.flags=i&~jr.Pending);return Xo!==void 0&&aN(s,Xo,ev),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(wQ(a),oN(a),BD())}},s}function SQ(e){const n=()=>{const r=Xo;Xo=t,++ev,t.depsTail=void 0,t.flags=jr.Watching|jr.RecursedCheck;try{return e()}finally{Xo=r,t.flags&=~jr.RecursedCheck,Av(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:jr.Watching|jr.RecursedCheck,notify(){const r=this.flags;r&jr.Dirty||r&jr.Pending&&$D(this.deps,this)?n():this.flags=jr.Watching},stop(){this.flags=jr.None,this.depsTail=void 0,Av(this)}};return n(),t}var nw={exports:{}},rw={},sw={exports:{}},iw={};/** +`+S.stack}}var ot=Object.prototype.hasOwnProperty,Mt=e.unstable_scheduleCallback,jt=e.unstable_cancelCallback,Pt=e.unstable_shouldYield,Ie=e.unstable_requestPaint,nt=e.unstable_now,ke=e.unstable_getCurrentPriorityLevel,ge=e.unstable_ImmediatePriority,je=e.unstable_UserBlockingPriority,qe=e.unstable_NormalPriority,rt=e.unstable_LowPriority,dt=e.unstable_IdlePriority,st=e.log,Ut=e.unstable_setDisableYieldValue,Xt=null,en=null;function an(l){if(typeof st=="function"&&Ut(l),en&&typeof en.setStrictMode=="function")try{en.setStrictMode(Xt,l)}catch{}}var At=Math.clz32?Math.clz32:Ot,gn=Math.log,on=Math.LN2;function Ot(l){return l>>>=0,l===0?32:31-(gn(l)/on|0)|0}var dn=256,cn=262144,kn=4194304;function Wn(l){var d=l&42;if(d!==0)return d;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 vs(l,d,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=Wn(S):(X&=re,X!==0?R=Wn(X):g||(g=re&~l,g!==0&&(R=Wn(g))))):(re=S&~O,re!==0?R=Wn(re):X!==0?R=Wn(X):g||(g=S&~l,g!==0&&(R=Wn(g)))),R===0?0:d!==0&&d!==R&&(d&O)===0&&(O=R&-R,g=d&-d,O>=g||O===32&&(g&4194048)!==0)?d:R}function ns(l,d){return(l.pendingLanes&~(l.suspendedLanes&~l.pingedLanes)&d)===0}function gt(l,d){switch(l){case 1:case 2:case 4:case 8:case 64:return d+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 d+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 ln(){var l=kn;return kn<<=1,(kn&62914560)===0&&(kn=4194304),l}function bn(l){for(var d=[],g=0;31>g;g++)d.push(l);return d}function un(l,d){l.pendingLanes|=d,d!==268435456&&(l.suspendedLanes=0,l.pingedLanes=0,l.warmLanes=0)}function _r(l,d,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,Ne=l.hiddenUpdates;for(g=X&~g;0"u")return null;try{return l.activeElement||l.body}catch{return l.body}}var _t=/[\n"\\]/g;function Bt(l){return l.replace(_t,function(d){return"\\"+d.charCodeAt(0).toString(16)+" "})}function ci(l,d,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"),d!=null?X==="number"?(d===0&&l.value===""||l.value!=d)&&(l.value=""+cr(d)):l.value!==""+cr(d)&&(l.value=""+cr(d)):X!=="submit"&&X!=="reset"||l.removeAttribute("value"),d!=null?Ei(l,X,cr(d)):g!=null?Ei(l,X,cr(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=""+cr(re):l.removeAttribute("name")}function Ci(l,d,g,S,R,O,X,re){if(O!=null&&typeof O!="function"&&typeof O!="symbol"&&typeof O!="boolean"&&(l.type=O),d!=null||g!=null){if(!(O!=="submit"&&O!=="reset"||d!=null)){za(l);return}g=g!=null?""+cr(g):"",d=d!=null?""+cr(d):g,re||d===l.value||(l.value=d),l.defaultValue=d}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),za(l)}function Ei(l,d,g){d==="number"&&Ws(l.ownerDocument)===l||l.defaultValue===""+g||(l.defaultValue=""+g)}function Or(l,d,g,S){if(l=l.options,d){d={};for(var R=0;R"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),r_=!1;if(as)try{var Yi={};Object.defineProperty(Yi,"passive",{get:function(){r_=!0}}),window.addEventListener("test",Yi,Yi),window.removeEventListener("test",Yi,Yi)}catch{r_=!1}var Zi=null,Cc=null,Rs=null;function ja(){if(Rs)return Rs;var l,d=Cc,g=d.length,S,R="value"in Zi?Zi.value:Zi.textContent,O=R.length;for(l=0;l=To),Sr=" ",Wf=!1;function c_(l,d){switch(l){case"keyup":return eo.indexOf(d.keyCode)!==-1;case"keydown":return d.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Tc(l){return l=l.detail,typeof l=="object"&&"data"in l?l.data:null}var Ro=!1;function Il(l,d){switch(l){case"compositionend":return Tc(d);case"keypress":return d.which!==32?null:(Wf=!0,Sr);case"textInput":return l=d.data,l===Sr&&Wf?null:l;default:return null}}function Qf(l,d){if(Ro)return l==="compositionend"||!Ao&&c_(l,d)?(l=ja(),Rs=Cc=Zi=null,Ro=!1,l):null;switch(l){case"paste":return null;case"keypress":if(!(d.ctrlKey||d.altKey||d.metaKey)||d.ctrlKey&&d.altKey){if(d.char&&1=d)return{node:g,offset:d-l};l=S}e:{for(;g;){if(g.nextSibling){g=g.nextSibling;break e}g=g.parentNode}g=void 0}g=to(g)}}function Mc(l,d){return l&&d?l===d?!0:l&&l.nodeType===3?!1:d&&d.nodeType===3?Mc(l,d.parentNode):"contains"in l?l.contains(d):l.compareDocumentPosition?!!(l.compareDocumentPosition(d)&16):!1:!1}function Io(l){l=l!=null&&l.ownerDocument!=null&&l.ownerDocument.defaultView!=null?l.ownerDocument.defaultView:window;for(var d=Ws(l.document);d instanceof l.HTMLIFrameElement;){try{var g=typeof d.contentWindow.location.href=="string"}catch{g=!1}if(g)l=d.contentWindow;else break;d=Ws(l.document)}return d}function xs(l){var d=l&&l.nodeName&&l.nodeName.toLowerCase();return d&&(d==="input"&&(l.type==="text"||l.type==="search"||l.type==="tel"||l.type==="url"||l.type==="password")||d==="textarea"||l.contentEditable==="true")}var ws=as&&"documentMode"in document&&11>=document.documentMode,te=null,ve=null,Se=null,Oe=!1;function Fe(l,d,g){var S=g.window===g?g.document:g.nodeType===9?g:g.ownerDocument;Oe||te==null||te!==Ws(S)||(S=te,"selectionStart"in S&&xs(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}),Se&&_i(Se,S)||(Se=S,S=Ig(ve,"onSelect"),0>=X,R-=X,$o=1<<32-At(d)+R|g<hn?(Rn=Nt,Nt=null):Rn=Nt.sibling;var Kn=Te(we,Nt,Ee[hn],He);if(Kn===null){Nt===null&&(Nt=Rn);break}l&&Nt&&Kn.alternate===null&&d(we,Nt),be=O(Kn,be,hn),Vn===null?Ft=Kn:Vn.sibling=Kn,Vn=Kn,Nt=Rn}if(hn===Ee.length)return g(we,Nt),Dn&&Lc(we,hn),Ft;if(Nt===null){for(;hnhn?(Rn=Nt,Nt=null):Rn=Nt.sibling;var lu=Te(we,Nt,Kn.value,He);if(lu===null){Nt===null&&(Nt=Rn);break}l&&Nt&&lu.alternate===null&&d(we,Nt),be=O(lu,be,hn),Vn===null?Ft=lu:Vn.sibling=lu,Vn=lu,Nt=Rn}if(Kn.done)return g(we,Nt),Dn&&Lc(we,hn),Ft;if(Nt===null){for(;!Kn.done;hn++,Kn=Ee.next())Kn=Ue(we,Kn.value,He),Kn!==null&&(be=O(Kn,be,hn),Vn===null?Ft=Kn:Vn.sibling=Kn,Vn=Kn);return Dn&&Lc(we,hn),Ft}for(Nt=S(Nt);!Kn.done;hn++,Kn=Ee.next())Kn=Le(Nt,we,hn,Kn.value,He),Kn!==null&&(l&&Kn.alternate!==null&&Nt.delete(Kn.key===null?hn:Kn.key),be=O(Kn,be,hn),Vn===null?Ft=Kn:Vn.sibling=Kn,Vn=Kn);return l&&Nt.forEach(function(hK){return d(we,hK)}),Dn&&Lc(we,hn),Ft}function gr(we,be,Ee,He){if(typeof Ee=="object"&&Ee!==null&&Ee.type===k&&Ee.key===null&&(Ee=Ee.props.children),typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case m:e:{for(var Ft=Ee.key;be!==null;){if(be.key===Ft){if(Ft=Ee.type,Ft===k){if(be.tag===7){g(we,be.sibling),He=R(be,Ee.props.children),He.return=we,we=He;break e}}else if(be.elementType===Ft||typeof Ft=="object"&&Ft!==null&&Ft.$$typeof===z&&y_(Ft)===be.type){g(we,be.sibling),He=R(be,Ee.props),pp(He,Ee),He.return=we,we=He;break e}g(we,be);break}else d(we,be);be=be.sibling}Ee.type===k?(He=p_(Ee.props.children,we.mode,He,Ee.key),He.return=we,we=He):(He=eg(Ee.type,Ee.key,Ee.props,null,we.mode,He),pp(He,Ee),He.return=we,we=He)}return X(we);case w:e:{for(Ft=Ee.key;be!==null;){if(be.key===Ft)if(be.tag===4&&be.stateNode.containerInfo===Ee.containerInfo&&be.stateNode.implementation===Ee.implementation){g(we,be.sibling),He=R(be,Ee.children||[]),He.return=we,we=He;break e}else{g(we,be);break}else d(we,be);be=be.sibling}He=ux(Ee,we.mode,He),He.return=we,we=He}return X(we);case z:return Ee=y_(Ee),gr(we,be,Ee,He)}if(Q(Ee))return xt(we,be,Ee,He);if(B(Ee)){if(Ft=B(Ee),typeof Ft!="function")throw Error(r(150));return Ee=Ft.call(Ee),Kt(we,be,Ee,He)}if(typeof Ee.then=="function")return gr(we,be,og(Ee),He);if(Ee.$$typeof===x)return gr(we,be,rg(we,Ee),He);cg(we,Ee)}return typeof Ee=="string"&&Ee!==""||typeof Ee=="number"||typeof Ee=="bigint"?(Ee=""+Ee,be!==null&&be.tag===6?(g(we,be.sibling),He=R(be,Ee),He.return=we,we=He):(g(we,be),He=lx(Ee,we.mode,He),He.return=we,we=He),X(we)):g(we,be)}return function(we,be,Ee,He){try{hp=0;var Ft=gr(we,be,Ee,He);return ad=null,Ft}catch(Nt){if(Nt===id||Nt===ig)throw Nt;var Vn=On(29,Nt,null,we.mode);return Vn.lanes=He,Vn.return=we,Vn}finally{}}}var w_=T7(!0),R7=T7(!1),Vl=!1;function wx(l){l.updateQueue={baseState:l.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function kx(l,d){l=l.updateQueue,d.updateQueue===l&&(d.updateQueue={baseState:l.baseState,firstBaseUpdate:l.firstBaseUpdate,lastBaseUpdate:l.lastBaseUpdate,shared:l.shared,callbacks:null})}function Kl(l){return{lane:l,tag:0,payload:null,callback:null,next:null}}function Wl(l,d,g){var S=l.updateQueue;if(S===null)return null;if(S=S.shared,(tr&2)!==0){var R=S.pending;return R===null?d.next=d:(d.next=R.next,R.next=d),S.pending=d,d=Cn(l),ta(l,null,g),d}return ks(l,S,d,g),Cn(l)}function mp(l,d,g){if(d=d.updateQueue,d!==null&&(d=d.shared,(g&4194048)!==0)){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,Qn(l,g)}}function Sx(l,d){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=d:O=O.next=d}else R=O=d;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=d:l.next=d,g.lastBaseUpdate=d}var Cx=!1;function gp(){if(Cx){var l=sd;if(l!==null)throw l}}function vp(l,d,g,S){Cx=!1;var R=l.updateQueue;Vl=!1;var O=R.firstBaseUpdate,X=R.lastBaseUpdate,re=R.shared.pending;if(re!==null){R.shared.pending=null;var pe=re,Ne=pe.next;pe.next=null,X===null?O=Ne:X.next=Ne,X=pe;var Be=l.alternate;Be!==null&&(Be=Be.updateQueue,re=Be.lastBaseUpdate,re!==X&&(re===null?Be.firstBaseUpdate=Ne:re.next=Ne,Be.lastBaseUpdate=pe))}if(O!==null){var Ue=R.baseState;X=0,Be=Ne=pe=null,re=O;do{var Te=re.lane&-536870913,Le=Te!==re.lane;if(Le?(Tn&Te)===Te:(S&Te)===Te){Te!==0&&Te===rd&&(Cx=!0),Be!==null&&(Be=Be.next={lane:0,tag:re.tag,payload:re.payload,callback:null,next:null});e:{var xt=l,Kt=re;Te=d;var gr=g;switch(Kt.tag){case 1:if(xt=Kt.payload,typeof xt=="function"){Ue=xt.call(gr,Ue,Te);break e}Ue=xt;break e;case 3:xt.flags=xt.flags&-65537|128;case 0:if(xt=Kt.payload,Te=typeof xt=="function"?xt.call(gr,Ue,Te):xt,Te==null)break e;Ue=f({},Ue,Te);break e;case 2:Vl=!0}}Te=re.callback,Te!==null&&(l.flags|=64,Le&&(l.flags|=8192),Le=R.callbacks,Le===null?R.callbacks=[Te]:Le.push(Te))}else Le={lane:Te,tag:re.tag,payload:re.payload,callback:re.callback,next:null},Be===null?(Ne=Be=Le,pe=Ue):Be=Be.next=Le,X|=Te;if(re=re.next,re===null){if(re=R.shared.pending,re===null)break;Le=re,re=Le.next,Le.next=null,R.lastBaseUpdate=Le,R.shared.pending=null}}while(!0);Be===null&&(pe=Ue),R.baseState=pe,R.firstBaseUpdate=Ne,R.lastBaseUpdate=Be,O===null&&(R.shared.lanes=0),Jl|=X,l.lanes=X,l.memoizedState=Ue}}function M7(l,d){if(typeof l!="function")throw Error(r(191,l));l.call(d)}function O7(l,d){var g=l.callbacks;if(g!==null)for(l.callbacks=null,l=0;lO?O:8;var X=K.T,re={};K.T=re,Ux(l,!1,d,g);try{var pe=R(),Ne=K.S;if(Ne!==null&&Ne(re,pe),pe!==null&&typeof pe=="object"&&typeof pe.then=="function"){var Be=rV(pe,S);xp(l,d,Be,oa(l))}else xp(l,d,S,oa(l))}catch(Ue){xp(l,d,{then:function(){},status:"rejected",reason:Ue},oa())}finally{Z.p=O,X!==null&&re.types!==null&&(X.types=re.types),K.T=X}}function lV(){}function Hx(l,d,g,S){if(l.tag!==5)throw Error(r(476));var R=f8(l).queue;_8(l,R,d,J,g===null?lV:function(){return d8(l),g(S)})}function f8(l){var d=l.memoizedState;if(d!==null)return d;d={memoizedState:J,baseState:J,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pc,lastRenderedState:J},next:null};var g={};return d.next={memoizedState:g,baseState:g,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Pc,lastRenderedState:g},next:null},l.memoizedState=d,l=l.alternate,l!==null&&(l.memoizedState=d),d}function d8(l){var d=f8(l);d.next===null&&(d=l.alternate.memoizedState),xp(l,d.next.queue,{},oa())}function qx(){return Fs($p)}function h8(){return ts().memoizedState}function p8(){return ts().memoizedState}function uV(l){for(var d=l.return;d!==null;){switch(d.tag){case 24:case 3:var g=oa();l=Kl(g);var S=Wl(d,l,g);S!==null&&(Ii(S,d,g),mp(S,d,g)),d={cache:vx()},l.payload=d;return}d=d.return}}function _V(l,d,g){var S=oa();g={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},vg(l)?g8(d,g):(g=Ms(l,d,g,S),g!==null&&(Ii(g,l,S),v8(g,d,S)))}function m8(l,d,g){var S=oa();xp(l,d,g,S)}function xp(l,d,g,S){var R={lane:S,revertLane:0,gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null};if(vg(l))g8(d,R);else{var O=l.alternate;if(l.lanes===0&&(O===null||O.lanes===0)&&(O=d.lastRenderedReducer,O!==null))try{var X=d.lastRenderedState,re=O(X,g);if(R.hasEagerState=!0,R.eagerState=re,qn(re,X))return ks(l,d,R,0),br===null&&Un(),!1}catch{}finally{}if(g=Ms(l,d,R,S),g!==null)return Ii(g,l,S),v8(g,d,S),!0}return!1}function Ux(l,d,g,S){if(S={lane:2,revertLane:w2(),gesture:null,action:S,hasEagerState:!1,eagerState:null,next:null},vg(l)){if(d)throw Error(r(479))}else d=Ms(l,g,S,2),d!==null&&Ii(d,l,2)}function vg(l){var d=l.alternate;return l===fn||d!==null&&d===fn}function g8(l,d){cd=_g=!0;var g=l.pending;g===null?d.next=d:(d.next=g.next,g.next=d),l.pending=d}function v8(l,d,g){if((g&4194048)!==0){var S=d.lanes;S&=l.pendingLanes,g|=S,d.lanes=g,Qn(l,g)}}var wp={readContext:Fs,use:hg,useCallback:qr,useContext:qr,useEffect:qr,useImperativeHandle:qr,useLayoutEffect:qr,useInsertionEffect:qr,useMemo:qr,useReducer:qr,useRef:qr,useState:qr,useDebugValue:qr,useDeferredValue:qr,useTransition:qr,useSyncExternalStore:qr,useId:qr,useHostTransitionStatus:qr,useFormState:qr,useActionState:qr,useOptimistic:qr,useMemoCache:qr,useCacheRefresh:qr};wp.useEffectEvent=qr;var b8={readContext:Fs,use:hg,useCallback:function(l,d){return fi().memoizedState=[l,d===void 0?null:d],l},useContext:Fs,useEffect:n8,useImperativeHandle:function(l,d,g){g=g!=null?g.concat([l]):null,mg(4194308,4,a8.bind(null,d,l),g)},useLayoutEffect:function(l,d){return mg(4194308,4,l,d)},useInsertionEffect:function(l,d){mg(4,2,l,d)},useMemo:function(l,d){var g=fi();d=d===void 0?null:d;var S=l();if(k_){an(!0);try{l()}finally{an(!1)}}return g.memoizedState=[S,d],S},useReducer:function(l,d,g){var S=fi();if(g!==void 0){var R=g(d);if(k_){an(!0);try{g(d)}finally{an(!1)}}}else R=d;return S.memoizedState=S.baseState=R,l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:R},S.queue=l,l=l.dispatch=_V.bind(null,fn,l),[S.memoizedState,l]},useRef:function(l){var d=fi();return l={current:l},d.memoizedState=l},useState:function(l){l=Ix(l);var d=l.queue,g=m8.bind(null,fn,d);return d.dispatch=g,[l.memoizedState,g]},useDebugValue:Px,useDeferredValue:function(l,d){var g=fi();return Fx(g,l,d)},useTransition:function(){var l=Ix(!1);return l=_8.bind(null,fn,l.queue,!0,!1),fi().memoizedState=l,[!1,l]},useSyncExternalStore:function(l,d,g){var S=fn,R=fi();if(Dn){if(g===void 0)throw Error(r(407));g=g()}else{if(g=d(),br===null)throw Error(r(349));(Tn&127)!==0||P7(S,d,g)}R.memoizedState=g;var O={value:g,getSnapshot:d};return R.queue=O,n8(H7.bind(null,S,O,l),[l]),S.flags|=2048,ud(9,{destroy:void 0},F7.bind(null,S,O,g,d),null),g},useId:function(){var l=fi(),d=br.identifierPrefix;if(Dn){var g=Bo,S=$o;g=(S&~(1<<32-At(S)-1)).toString(32)+g,d="_"+d+"R_"+g,g=fg++,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[Xn]=d,O[Yn]=S;e:for(X=d.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===d)break e;for(;X.sibling===null;){if(X.return===null||X.return===d)break e;X=X.return}X.sibling.return=X.return,X=X.sibling}d.stateNode=O;e:switch(qs(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&&Hc(d)}}return Er(d),s2(d,d.type,l===null?null:l.memoizedProps,d.pendingProps,g),null;case 6:if(l&&d.stateNode!=null)l.memoizedProps!==S&&Hc(d);else{if(typeof S!="string"&&d.stateNode===null)throw Error(r(166));if(l=ue.current,td(d)){if(l=d.stateNode,g=d.memoizedProps,S=null,R=Ps,R!==null)switch(R.tag){case 27:case 5:S=R.memoizedProps}l[Xn]=d,l=!!(l.nodeValue===g||S!==null&&S.suppressHydrationWarning===!0||$9(l.nodeValue,g)),l||Ul(d,!0)}else l=$g(l).createTextNode(S),l[Xn]=d,d.stateNode=l}return Er(d),null;case 31:if(g=d.memoizedState,l===null||l.memoizedState!==null){if(S=td(d),g!==null){if(l===null){if(!S)throw Error(r(318));if(l=d.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(r(557));l[Xn]=d}else m_(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Er(d),l=!1}else g=hx(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=g),l=!0;if(!l)return d.flags&256?(sa(d),d):(sa(d),null);if((d.flags&128)!==0)throw Error(r(558))}return Er(d),null;case 13:if(S=d.memoizedState,l===null||l.memoizedState!==null&&l.memoizedState.dehydrated!==null){if(R=td(d),S!==null&&S.dehydrated!==null){if(l===null){if(!R)throw Error(r(318));if(R=d.memoizedState,R=R!==null?R.dehydrated:null,!R)throw Error(r(317));R[Xn]=d}else m_(),(d.flags&128)===0&&(d.memoizedState=null),d.flags|=4;Er(d),R=!1}else R=hx(),l!==null&&l.memoizedState!==null&&(l.memoizedState.hydrationErrors=R),R=!0;if(!R)return d.flags&256?(sa(d),d):(sa(d),null)}return sa(d),(d.flags&128)!==0?(d.lanes=g,d):(g=S!==null,l=l!==null&&l.memoizedState!==null,g&&(S=d.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&&(d.child.flags|=8192),kg(d,d.updateQueue),Er(d),null);case 4:return ne(),l===null&&E2(d.stateNode.containerInfo),Er(d),null;case 10:return $c(d.type),Er(d),null;case 19:if(U(es),S=d.memoizedState,S===null)return Er(d),null;if(R=(d.flags&128)!==0,O=S.rendering,O===null)if(R)Sp(S,!1);else{if(Ur!==0||l!==null&&(l.flags&128)!==0)for(l=d.child;l!==null;){if(O=ug(l),O!==null){for(d.flags|=128,Sp(S,!1),l=O.updateQueue,d.updateQueue=l,kg(d,l),d.subtreeFlags=0,l=g,g=d.child;g!==null;)lp(g,l),g=g.sibling;return H(es,es.current&1|2),Dn&&Lc(d,S.treeForkCount),d.child}l=l.sibling}S.tail!==null&&nt()>zg&&(d.flags|=128,R=!0,Sp(S,!1),d.lanes=4194304)}else{if(!R)if(l=ug(O),l!==null){if(d.flags|=128,R=!0,l=l.updateQueue,d.updateQueue=l,kg(d,l),Sp(S,!0),S.tail===null&&S.tailMode==="hidden"&&!O.alternate&&!Dn)return Er(d),null}else 2*nt()-S.renderingStartTime>zg&&g!==536870912&&(d.flags|=128,R=!0,Sp(S,!1),d.lanes=4194304);S.isBackwards?(O.sibling=d.child,d.child=O):(l=S.last,l!==null?l.sibling=O:d.child=O,S.last=O)}return S.tail!==null?(l=S.tail,S.rendering=l,S.tail=l.sibling,S.renderingStartTime=nt(),l.sibling=null,g=es.current,H(es,R?g&1|2:g&1),Dn&&Lc(d,S.treeForkCount),l):(Er(d),null);case 22:case 23:return sa(d),Nx(),S=d.memoizedState!==null,l!==null?l.memoizedState!==null!==S&&(d.flags|=8192):S&&(d.flags|=8192),S?(g&536870912)!==0&&(d.flags&128)===0&&(Er(d),d.subtreeFlags&6&&(d.flags|=8192)):Er(d),g=d.updateQueue,g!==null&&kg(d,g.retryQueue),g=null,l!==null&&l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),S=null,d.memoizedState!==null&&d.memoizedState.cachePool!==null&&(S=d.memoizedState.cachePool.pool),S!==g&&(d.flags|=2048),l!==null&&U(b_),null;case 24:return g=null,l!==null&&(g=l.memoizedState.cache),d.memoizedState.cache!==g&&(d.flags|=2048),$c(cs),Er(d),null;case 25:return null;case 30:return null}throw Error(r(156,d.tag))}function mV(l,d){switch(fx(d),d.tag){case 1:return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 3:return $c(cs),ne(),l=d.flags,(l&65536)!==0&&(l&128)===0?(d.flags=l&-65537|128,d):null;case 26:case 27:case 5:return he(d),null;case 31:if(d.memoizedState!==null){if(sa(d),d.alternate===null)throw Error(r(340));m_()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 13:if(sa(d),l=d.memoizedState,l!==null&&l.dehydrated!==null){if(d.alternate===null)throw Error(r(340));m_()}return l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 19:return U(es),null;case 4:return ne(),null;case 10:return $c(d.type),null;case 22:case 23:return sa(d),Nx(),l!==null&&U(b_),l=d.flags,l&65536?(d.flags=l&-65537|128,d):null;case 24:return $c(cs),null;case 25:return null;default:return null}}function q8(l,d){switch(fx(d),d.tag){case 3:$c(cs),ne();break;case 26:case 27:case 5:he(d);break;case 4:ne();break;case 31:d.memoizedState!==null&&sa(d);break;case 13:sa(d);break;case 19:U(es);break;case 10:$c(d.type);break;case 22:case 23:sa(d),Nx(),l!==null&&U(b_);break;case 24:$c(cs)}}function Cp(l,d){try{var g=d.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(d,d.return,re)}}function Yl(l,d,g){try{var S=d.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=d;var pe=g,Ne=re;try{Ne()}catch(Be){ur(R,pe,Be)}}}S=S.next}while(S!==O)}}catch(Be){ur(d,d.return,Be)}}function U8(l){var d=l.updateQueue;if(d!==null){var g=l.stateNode;try{O7(d,g)}catch(S){ur(l,l.return,S)}}}function G8(l,d,g){g.props=S_(l.type,l.memoizedProps),g.state=l.memoizedState;try{g.componentWillUnmount()}catch(S){ur(l,d,S)}}function Ep(l,d){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,d,R)}}function Po(l,d){var g=l.ref,S=l.refCleanup;if(g!==null)if(typeof S=="function")try{S()}catch(R){ur(l,d,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,d,R)}else g.current=null}function V8(l){var d=l.type,g=l.memoizedProps,S=l.stateNode;try{e:switch(d){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 i2(l,d,g){try{var S=l.stateNode;$V(S,l.type,g,d),S[Yn]=d}catch(R){ur(l,l.return,R)}}function K8(l){return l.tag===5||l.tag===3||l.tag===26||l.tag===27&&su(l.type)||l.tag===4}function a2(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||K8(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&&su(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 o2(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?(g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g).insertBefore(l,d):(d=g.nodeType===9?g.body:g.nodeName==="HTML"?g.ownerDocument.body:g,d.appendChild(l),g=g._reactRootContainer,g!=null||d.onclick!==null||(d.onclick=dr));else if(S!==4&&(S===27&&su(l.type)&&(g=l.stateNode,d=null),l=l.child,l!==null))for(o2(l,d,g),l=l.sibling;l!==null;)o2(l,d,g),l=l.sibling}function Sg(l,d,g){var S=l.tag;if(S===5||S===6)l=l.stateNode,d?g.insertBefore(l,d):g.appendChild(l);else if(S!==4&&(S===27&&su(l.type)&&(g=l.stateNode),l=l.child,l!==null))for(Sg(l,d,g),l=l.sibling;l!==null;)Sg(l,d,g),l=l.sibling}function W8(l){var d=l.stateNode,g=l.memoizedProps;try{for(var S=l.type,R=d.attributes;R.length;)d.removeAttributeNode(R[0]);qs(d,S,g),d[Xn]=l,d[Yn]=g}catch(O){ur(l,l.return,O)}}var qc=!1,_s=!1,c2=!1,Q8=typeof WeakSet=="function"?WeakSet:Set,Os=null;function gV(l,d){if(l=l.containerInfo,j2=Gg,l=Io(l),xs(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,Ne=0,Be=0,Ue=l,Te=null;t:for(;;){for(var Le;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),(Le=Ue.firstChild)!==null;)Te=Ue,Ue=Le;for(;;){if(Ue===l)break t;if(Te===g&&++Ne===R&&(re=X),Te===O&&++Be===S&&(pe=X),(Le=Ue.nextSibling)!==null)break;Ue=Te,Te=Ue.parentNode}Ue=Le}g=re===-1||pe===-1?null:{start:re,end:pe}}else g=null}g=g||{start:0,end:0}}else g=null;for(A2={focusedElem:l,selectionRange:g},Gg=!1,Os=d;Os!==null;)if(d=Os,l=d.child,(d.subtreeFlags&1028)!==0&&l!==null)l.return=d,Os=l;else for(;Os!==null;){switch(d=Os,O=d.alternate,l=d.flags,d.tag){case 0:if((l&4)!==0&&(l=d.updateQueue,l=l!==null?l.events:null,l!==null))for(g=0;g title"))),qs(O,S,g),O[Xn]=l,An(O),S=O;break e;case"link":var X=tE("link","href",R).get(S+(g.href||""));if(X){for(var re=0;regr&&(X=gr,gr=Kt,Kt=X);var we=Pl(re,Kt),be=Pl(re,gr);if(we&&be&&(Le.rangeCount!==1||Le.anchorNode!==we.node||Le.anchorOffset!==we.offset||Le.focusNode!==be.node||Le.focusOffset!==be.offset)){var Ee=Ue.createRange();Ee.setStart(we.node,we.offset),Le.removeAllRanges(),Kt>gr?(Le.addRange(Ee),Le.extend(be.node,be.offset)):(Ee.setEnd(be.node,be.offset),Le.addRange(Ee))}}}}for(Ue=[],Le=re;Le=Le.parentNode;)Le.nodeType===1&&Ue.push({element:Le,left:Le.scrollLeft,top:Le.scrollTop});for(typeof re.focus=="function"&&re.focus(),re=0;reg?32:g,K.T=null,g=p2,p2=null;var O=tu,X=Wc;if(Ss=0,pd=tu=null,Wc=0,(tr&6)!==0)throw Error(r(331));var re=tr;if(tr|=4,a9(O.current),r9(O,O.current,X,g),tr=re,Rp(0,!1),en&&typeof en.onPostCommitFiberRoot=="function")try{en.onPostCommitFiberRoot(Xt,O)}catch{}return!0}finally{Z.p=R,K.T=S,S9(l,d)}}function E9(l,d,g){d=Ra(g,d),d=Wx(l.stateNode,d,2),l=Wl(l,d,2),l!==null&&(un(l,2),Fo(l))}function ur(l,d,g){if(l.tag===3)E9(l,l,g);else for(;d!==null;){if(d.tag===3){E9(d,l,g);break}else if(d.tag===1){var S=d.stateNode;if(typeof d.type.getDerivedStateFromError=="function"||typeof S.componentDidCatch=="function"&&(eu===null||!eu.has(S))){l=Ra(g,l),g=N8(2),S=Wl(d,g,2),S!==null&&(z8(g,S,d,l),un(S,2),Fo(S));break}}d=d.return}}function b2(l,d,g){var S=l.pingCache;if(S===null){S=l.pingCache=new yV;var R=new Set;S.set(d,R)}else R=S.get(d),R===void 0&&(R=new Set,S.set(d,R));R.has(g)||(_2=!0,R.add(g),l=CV.bind(null,l,d,g),d.then(l,l))}function CV(l,d,g){var S=l.pingCache;S!==null&&S.delete(d),l.pingedLanes|=l.suspendedLanes&g,l.warmLanes&=~g,br===l&&(Tn&g)===g&&(Ur===4||Ur===3&&(Tn&62914560)===Tn&&300>nt()-Ng?(tr&2)===0&&md(l,0):f2|=g,hd===Tn&&(hd=0)),Fo(l)}function N9(l,d){d===0&&(d=ln()),l=Jr(l,d),l!==null&&(un(l,d),Fo(l))}function EV(l){var d=l.memoizedState,g=0;d!==null&&(g=d.retryLane),N9(l,g)}function NV(l,d){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(d),N9(l,g)}function zV(l,d){return Mt(l,d)}var Og=null,vd=null,y2=!1,Dg=!1,x2=!1,ru=0;function Fo(l){l!==vd&&l.next===null&&(vd===null?Og=vd=l:vd=vd.next=l),Dg=!0,y2||(y2=!0,AV())}function Rp(l,d){if(!x2&&Dg){x2=!0;do for(var g=!1,S=Og;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-At(42|l)+1)-1,O&=R&~(X&~re),O=O&201326741?O&201326741|1:O?O|2:0}O!==0&&(g=!0,T9(S,O))}else O=Tn,O=vs(S,S===br?O:0,S.cancelPendingCommit!==null||S.timeoutHandle!==-1),(O&3)===0||ns(S,O)||(g=!0,T9(S,O));S=S.next}while(g);x2=!1}}function jV(){z9()}function z9(){Dg=y2=!1;var l=0;ru!==0&&PV()&&(l=ru);for(var d=nt(),g=null,S=Og;S!==null;){var R=S.next,O=j9(S,d);O===0?(S.next=null,g===null?Og=R:g.next=R,R===null&&(vd=g)):(g=S,(l!==0||(O&3)!==0)&&(Dg=!0)),S=R}Ss!==0&&Ss!==5||Rp(l),ru!==0&&(ru=0)}function j9(l,d){for(var g=l.suspendedLanes,S=l.pingedLanes,R=l.expirationTimes,O=l.pendingLanes&-62914561;0re)break;var Be=pe.transferSize,Ue=pe.initiatorType;Be&&B9(Ue)&&(pe=pe.responseEnd,X+=Be*(pe"u"?null:document;function Y9(l,d,g){var S=bd;if(S&&typeof d=="string"&&d){var R=Bt(d);R='link[rel="'+l+'"][href="'+R+'"]',typeof g=="string"&&(R+='[crossorigin="'+g+'"]'),X9.has(R)||(X9.add(R),l={rel:l,crossOrigin:g,href:d},S.querySelector(R)===null&&(d=S.createElement("link"),qs(d,"link",l),An(d),S.head.appendChild(d)))}}function QV(l){Qc.D(l),Y9("dns-prefetch",l,null)}function XV(l,d){Qc.C(l,d),Y9("preconnect",l,d)}function YV(l,d,g){Qc.L(l,d,g);var S=bd;if(S&&l&&d){var R='link[rel="preload"][as="'+Bt(d)+'"]';d==="image"&&g&&g.imageSrcSet?(R+='[imagesrcset="'+Bt(g.imageSrcSet)+'"]',typeof g.imageSizes=="string"&&(R+='[imagesizes="'+Bt(g.imageSizes)+'"]')):R+='[href="'+Bt(l)+'"]';var O=R;switch(d){case"style":O=yd(l);break;case"script":O=xd(l)}$a.has(O)||(l=f({rel:"preload",href:d==="image"&&g&&g.imageSrcSet?void 0:l,as:d},g),$a.set(O,l),S.querySelector(R)!==null||d==="style"&&S.querySelector(Lp(O))||d==="script"&&S.querySelector(Ip(O))||(d=S.createElement("link"),qs(d,"link",l),An(d),S.head.appendChild(d)))}}function ZV(l,d){Qc.m(l,d);var g=bd;if(g&&l){var S=d&&typeof d.as=="string"?d.as:"script",R='link[rel="modulepreload"][as="'+Bt(S)+'"][href="'+Bt(l)+'"]',O=R;switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":O=xd(l)}if(!$a.has(O)&&(l=f({rel:"modulepreload",href:l},d),$a.set(O,l),g.querySelector(R)===null)){switch(S){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(g.querySelector(Ip(O)))return}S=g.createElement("link"),qs(S,"link",l),An(S),g.head.appendChild(S)}}}function JV(l,d,g){Qc.S(l,d,g);var S=bd;if(S&&l){var R=Yr(S).hoistableStyles,O=yd(l);d=d||"default";var X=R.get(O);if(!X){var re={loading:0,preload:null};if(X=S.querySelector(Lp(O)))re.loading=5;else{l=f({rel:"stylesheet",href:l,"data-precedence":d},g),(g=$a.get(O))&&I2(l,g);var pe=X=S.createElement("link");An(pe),qs(pe,"link",l),pe._p=new Promise(function(Ne,Be){pe.onload=Ne,pe.onerror=Be}),pe.addEventListener("load",function(){re.loading|=1}),pe.addEventListener("error",function(){re.loading|=2}),re.loading|=4,Pg(X,d,S)}X={type:"stylesheet",instance:X,count:1,state:re},R.set(O,X)}}}function eK(l,d){Qc.X(l,d);var g=bd;if(g&&l){var S=Yr(g).hoistableScripts,R=xd(l),O=S.get(R);O||(O=g.querySelector(Ip(R)),O||(l=f({src:l,async:!0},d),(d=$a.get(R))&&$2(l,d),O=g.createElement("script"),An(O),qs(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function tK(l,d){Qc.M(l,d);var g=bd;if(g&&l){var S=Yr(g).hoistableScripts,R=xd(l),O=S.get(R);O||(O=g.querySelector(Ip(R)),O||(l=f({src:l,async:!0,type:"module"},d),(d=$a.get(R))&&$2(l,d),O=g.createElement("script"),An(O),qs(O,"link",l),g.head.appendChild(O)),O={type:"script",instance:O,count:1,state:null},S.set(R,O))}}function Z9(l,d,g,S){var R=(R=ue.current)?Bg(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"?(d=yd(g.href),g=Yr(R).hoistableStyles,S=g.get(d),S||(S={type:"style",instance:null,count:0,state:null},g.set(d,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=yd(g.href);var O=Yr(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(Lp(l)))&&!O._p&&(X.instance=O,X.state.loading=5),$a.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},$a.set(l,g),O||nK(R,l,g,X.state))),d&&S===null)throw Error(r(528,""));return X}if(d&&S!==null)throw Error(r(529,""));return null;case"script":return d=g.async,g=g.src,typeof g=="string"&&d&&typeof d!="function"&&typeof d!="symbol"?(d=xd(g),g=Yr(R).hoistableScripts,S=g.get(d),S||(S={type:"script",instance:null,count:0,state:null},g.set(d,S)),S):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,l))}}function yd(l){return'href="'+Bt(l)+'"'}function Lp(l){return'link[rel="stylesheet"]['+l+"]"}function J9(l){return f({},l,{"data-precedence":l.precedence,precedence:null})}function nK(l,d,g,S){l.querySelector('link[rel="preload"][as="style"]['+d+"]")?S.loading=1:(d=l.createElement("link"),S.preload=d,d.addEventListener("load",function(){return S.loading|=1}),d.addEventListener("error",function(){return S.loading|=2}),qs(d,"link",g),An(d),l.head.appendChild(d))}function xd(l){return'[src="'+Bt(l)+'"]'}function Ip(l){return"script[async]"+l}function eE(l,d,g){if(d.count++,d.instance===null)switch(d.type){case"style":var S=l.querySelector('style[data-href~="'+Bt(g.href)+'"]');if(S)return d.instance=S,An(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"),An(S),qs(S,"style",R),Pg(S,g.precedence,l),d.instance=S;case"stylesheet":R=yd(g.href);var O=l.querySelector(Lp(R));if(O)return d.state.loading|=4,d.instance=O,An(O),O;S=J9(g),(R=$a.get(R))&&I2(S,R),O=(l.ownerDocument||l).createElement("link"),An(O);var X=O;return X._p=new Promise(function(re,pe){X.onload=re,X.onerror=pe}),qs(O,"link",S),d.state.loading|=4,Pg(O,g.precedence,l),d.instance=O;case"script":return O=xd(g.src),(R=l.querySelector(Ip(O)))?(d.instance=R,An(R),R):(S=g,(R=$a.get(O))&&(S=f({},g),$2(S,R)),l=l.ownerDocument||l,R=l.createElement("script"),An(R),qs(R,"link",S),l.head.appendChild(R),d.instance=R);case"void":return null;default:throw Error(r(443,d.type))}else d.type==="stylesheet"&&(d.state.loading&4)===0&&(S=d.instance,d.state.loading|=4,Pg(S,g.precedence,l));return d.instance}function Pg(l,d,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 rK(l,d,g){if(g===1||d.itemProp!=null)return!1;switch(l){case"meta":case"title":return!0;case"style":if(typeof d.precedence!="string"||typeof d.href!="string"||d.href==="")break;return!0;case"link":if(typeof d.rel!="string"||typeof d.href!="string"||d.href===""||d.onLoad||d.onError)break;switch(d.rel){case"stylesheet":return l=d.disabled,typeof d.precedence=="string"&&l==null;default:return!0}case"script":if(d.async&&typeof d.async!="function"&&typeof d.async!="symbol"&&!d.onLoad&&!d.onError&&d.src&&typeof d.src=="string")return!0}return!1}function rE(l){return!(l.type==="stylesheet"&&(l.state.loading&3)===0)}function sK(l,d,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=yd(S.href),O=d.querySelector(Lp(R));if(O){d=O._p,d!==null&&typeof d=="object"&&typeof d.then=="function"&&(l.count++,l=Hg.bind(l),d.then(l,l)),g.state.loading|=4,g.instance=O,An(O);return}O=d.ownerDocument||d,S=J9(S),(R=$a.get(R))&&I2(S,R),O=O.createElement("link"),An(O);var X=O;X._p=new Promise(function(re,pe){X.onload=re,X.onerror=pe}),qs(O,"link",S),g.instance=O}l.stylesheets===null&&(l.stylesheets=new Map),l.stylesheets.set(g,d),(d=g.state.preload)&&(g.state.loading&3)===0&&(l.count++,g=Hg.bind(l),d.addEventListener("load",g),d.addEventListener("error",g))}}var B2=0;function iK(l,d){return l.stylesheets&&l.count===0&&Ug(l,l.stylesheets),0B2?50:800)+d);return l.unsuspend=g,function(){l.unsuspend=null,clearTimeout(S),clearTimeout(R)}}:null}function Hg(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ug(this,this.stylesheets);else if(this.unsuspend){var l=this.unsuspend;this.unsuspend=null,l()}}}var qg=null;function Ug(l,d){l.stylesheets=null,l.unsuspend!==null&&(l.count++,qg=new Map,d.forEach(aK,l),qg=null,Hg.call(l))}function aK(l,d){if(!(d.state.loading&4)){var g=qg.get(l);if(g)var S=g.get(null);else{g=new Map,qg.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(),Q2.exports=rW(),Q2.exports}var iW=sW();const aW=!1;var gD=T.useLayoutEffect;function oW(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 cW(e){const n=T.useRef(null);return T.useImperativeHandle(e,()=>n.current,[]),n}function A0(e){return e[e.length-1]}function Ch(e,n){return typeof e=="function"?e(n):e}const vD=Object.prototype.hasOwnProperty,lW=Object.prototype.propertyIsEnumerable;function bD(e){for(const n in e)if(vD.call(e,n))return!0;return!1}const uW=()=>Object.create(null),N_=(e,n)=>P_(e,n,uW);function P_(e,n,t=()=>({}),r=0){if(e===n)return e;if(r>500)return n;const s=n,i=FE(e)&&FE(s);if(!i&&!(Sv(e)&&Sv(s)))return s;const a=i?e:BE(e);if(!a)return s;const o=i?s:BE(s);if(!o)return s;const c=a.length,u=o.length,h=i?new Array(u):t();let f=0;for(let p=0;p"u")return!0;const t=n.prototype;return!(!PE(t)||!t.hasOwnProperty("isPrototypeOf"))}function PE(e){return Object.prototype.toString.call(e)==="[object Object]"}function FE(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ou(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||!Ou(e[a],n[a],t)))return!1;return s===i}return!1}const _W=/[\x00-\x1f\x7f"<>`{}]/g;function fW(e){return e.replace(_W,n=>"%"+n.charCodeAt(0).toString(16).toUpperCase().padStart(2,"0"))}function HE(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 fW(n)}const dW=["http:","https:","mailto:","tel:"];function Cv(e,n){if(!e)return!1;try{const t=new URL(e);return!n.has(t.protocol)}catch{return!1}}function Gp(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+=HE(e.slice(t,s.index))+s[0],t=n.lastIndex;r=r+HE(t?e.slice(t):e);let i=!1;return r.startsWith("//")&&(i=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:i}}function hW(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function pW(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 Au=4,yD=5;function xD(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!I.parse&&I.caseSensitive===z&&I.prefix===j&&I.suffix===A));if(D)y=D;else{const I=mW(N,f,z,j,A);y=I,I.parent=s,I.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(I),B.length===2&&(a==null||a.push(B))}break}}s=y}if(k&&t.children&&!t.isRoot&&t.id&&t.id.charCodeAt(t.id.lastIndexOf("/")+1)===95){const b=Vd(f);b.kind=yD,b.parent=s,i++,b.depth=i,s.pathless??(s.pathless=[]),s.pathless.push(b),s=b}const v=(t.path||!t.children)&&!t.isRoot;if(v&&f.endsWith("/")){const b=Vd(f);b.kind=Au,b.parent=s,i++,b.depth=i,s.index=b,s=b}s.parse=k??null,s.priority=((h=p==null?void 0:p.params)==null?void 0:h.priority)??0,v&&!s.route&&(s.route=t,s.fullPath=f)}if(t.children)for(const f of t.children)Mb(e,n,f,c,s,i,a,o)}function wD(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 Vd(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 mW(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 gW(e,n){const t=Vd("/"),r=new Uint16Array(6),s=[];for(const i of e)Mb(!1,r,i,1,t,0,s);for(const i of s)i.sort(wD);n.masksTree=t,n.flatCache=Ev(1e3)}function vW(e,n){e||(e="/");const t=n.flatCache.get(e);if(t!==void 0)return t;const r=sS(e,n.masksTree);return n.flatCache.set(e,r),r}function bW(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=Vd("/"),Mb(n,new Uint16Array(6),{from:e},1,a,0),s.singleCache.set(i,a)),sS(r,a,t)}function yW(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=sS(e,n.segmentTree,t)}catch(a){if(a instanceof URIError)i=null;else throw a}return i&&(i.branch=SD(i.route)),n.matchCache.set(r,i),i}function xW(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function wW(e,n=!1,t){const r=Vd(e.fullPath),s=new Uint16Array(6),i=[],a={},o={};let c=0;Mb(n,s,e,1,r,0,i,u=>{if(t==null||t(u,c),u.id in a&&rS(),a[u.id]=u,c!==0&&u.path){const h=xW(u.fullPath);(!o[h]||u.fullPath.endsWith("/"))&&(o[h]=u)}c++});for(const u of i)u.sort(wD);return{processedTree:{segmentTree:r,singleCache:Ev(1e3),matchCache:Ev(1e3),flatCache:null,masksTree:null},routesById:a,routesByPath:o}}function sS(e,n,t=!1){const r=e.split("/"),s=SW(e,r,n,t);if(!s)return null;const[i]=kD(e,r,s);return{route:s.node.route,rawParams:i}}function kD(e,n,t){var h,f,p,m;const r=kW(t.node);let s=null;const i=Object.create(null);let a=((h=t.extract)==null?void 0:h.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;j--){const A=f.wildcard[j],{prefix:z,suffix:M}=A;if(!(z&&(x||!(A.caseSensitive?C:N??(N=C.toLowerCase())).startsWith(z)))){if(M){if(x)continue;const D=n.slice(p).join("/"),I=D.slice(-M.length);if((A.caseSensitive?I:I.toLowerCase())!==M||D.length-M.length=0;A--){const z=f.optional[A];o.push({node:z,index:p,skipped:j,statics:w,dynamics:k,optionals:v,extract:b,rawParams:y})}if(!x)for(let A=f.optional.length-1;A>=0;A--){const z=f.optional[A],{prefix:M,suffix:D}=z;if(M||D){const I=z.caseSensitive?C:N??(N=C.toLowerCase());if(M&&!I.startsWith(M)||D&&I.indexOf(D,I.length-D.length)=0;j--){const A=f.dynamic[j],{prefix:z,suffix:M}=A;if(z||M){const D=A.caseSensitive?C:N??(N=C.toLowerCase());if(z&&!D.startsWith(z)||M&&D.indexOf(M,D.length-M.length)=0;j--){const A=f.pathless[j];o.push({node:A,index:p,skipped:m,statics:w,dynamics:k,optionals:v,extract:b,rawParams:y})}}if(u)return u;if(r&&c){let h=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===Au)>(e.node.kind===Au)||n.node.kind===Au==(e.node.kind===Au)&&n.node.depth>e.node.depth))):!0}function X1(e){return Y1(e.filter(n=>n!==void 0).join("/"))}function Y1(e){return e.replace(/\/{2,}/g,"/")}function CD(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function ll(e){const n=e.length;return n>1&&e[n-1]==="/"?e.replace(/\/{1,}$/,""):e}function ED(e){return ll(CD(e))}function Nv(e,n){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${n}/`?e.slice(0,-1):e}function EW(e,n,t){return Nv(e,t)===Nv(n,t)}function NW({base:e,to:n,trailingSlash:t="never",cache:r}){if(n.includes("//")&&(n=Y1(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=Y1(e)),a=e.split("/");a.length>1&&A0(a)==="";)a.pop();const u=n.split("/");for(let h=0,f=u.length;h1?a.pop():a=[""]:p==="."||a.push(p)}}a.length>1&&(A0(a)===""?t==="never"&&a.pop():t==="always"&&a.push(""));const o=a.join("/"),c=(s?Y1(o):o)||"/";return i&&r&&r.set(i,c),c}function zW(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 J2(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=>GE(s,t)).join("/"):GE(r,t)}function UE({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 DW(e){const n=e.getAttribute(VE);if(n)return`[${VE}="${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 t1=!1;const Z1="window";function v3(e){try{return typeof e=="function"?e():document.querySelector(e)}catch{}}function KE(e){const n=new Set;for(const t of e){if(t===Z1)continue;const r=v3(t);r&&n.add(r)}return n}function LW(e,n){const t=e.options.scrollRestoration,r=e._scroll;t&&(r.restoring=!0);const s=e.options.getScrollRestorationKey||OW,i=new Set,a=o=>{const c=gu[o]||(gu[o]={});for(const u of i)u===document?c[Z1]={scrollX,scrollY}:u.isConnected&&(c[DW(u)]={scrollX:u.scrollLeft,scrollY:u.scrollTop})};t&&!r.restoration&&(r.restoration=!0,t1=!1,history.scrollRestoration="manual",document.addEventListener("scroll",o=>{t1||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())),MW()})),!r.reset&&(r.reset=!0,e.subscribe("onRendered",o=>{var k;const c=e.options.scrollRestorationBehavior,u=e.options.scrollToTopSelectors,h=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=gu[w];if(v){let b=gu[m];for(const y in v){if(y===Z1){if(h)continue}else{const x=v3(y);if(!x||h&&u&&(p??(p=KE(u)),p.has(x)))continue}b||(b=gu[m]={}),b[y]??(b[y]=v[y])}}}t1=!0;try{const v=o.toLocation.hash,b=o.toLocation.state.__hashScrollIntoViewOptions??!0;let y=!1;if(h){!v&&u&&(p??(p=KE(u)));const x=v&&b&&f,C=r.restoring?gu[m]:void 0;if(C)for(const N in C){const{scrollX:j,scrollY:A}=C[N];if(N===Z1){if(x)continue;scrollTo({top:A,left:j,behavior:c}),y=!0}else{const z=v3(N);z&&(z.scrollLeft=j,z.scrollTop=A,p==null||p.delete(z))}}if(!v){const N={top:0,left:0,behavior:c};if(y||scrollTo(N),p)for(const j of p)j.scrollTo(N)}}!y&&v&&b&&((k=document.getElementById(v))==null||k.scrollIntoView(b))}finally{t1=!1}}))}function IW(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 ew(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function $W(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]=ew(s):Array.isArray(i)?i.push(ew(s)):t[r]=[i,ew(s)]}return t}const BW=/^(?:\s|["[{\d-]|fa|nu|tr)/,PW=HW(JSON.parse),FW=qW(JSON.stringify,JSON.parse);function HW(e){return n=>{n[0]==="?"&&(n=n.substring(1));const t=$W(n);for(const r in t){const s=t[r];if(typeof s=="string")try{t[r]=e(s)}catch{}}return t}}function qW(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&&!BW.test(s))return s;try{return n(s),e(s)}catch{}}return s}return s=>{const i=IW(s,r);return i?`?${i}`:""}}const Wd="__root__";function UW(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 ND(e){return e instanceof Response&&!!e.options}function GW(e){return{input:({url:n})=>{for(const t of e)n=b3(t,n);return n},output:({url:n})=>{for(let t=e.length-1;t>=0;t--)n=zD(e[t],n);return n}}}function VW(e){const n=ED(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=X1(["/",n,i.pathname]),i)}}function b3(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 zD(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 KW(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([]),h=r(()=>u.get().map(k=>i.get(k).get())),f=r(()=>({status:a.get(),isLoading:a.get()==="pending",matches:h.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:h,byRoute:i,__store:f,getMatchStore:p,setMatches:w};function w(k){const v=u.get(),b=k.map(y=>y.routeId);s(()=>{pW(v,b)||u.set(b);for(const y of v)b.includes(y)||i.get(y).set(()=>{});for(const y of k){const x=p(y.routeId);x.get()!==y&&x.set(y)}})}return m}var Du="__TSR_index",WE="popstate",QE="beforeunload";function WW(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))??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&u.length&&h)for(const m of u){const w=zv(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[Du];o=XE(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[Du];o=XE(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[Du]!==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 h,f;const u=((h=e.getBlockers)==null?void 0:h.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 XE(e,n){n||(n={});const t=iS();return{...n,key:t,__TSR_key:t,[Du]:e}}function QW(e){var A,z;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=(()=>zv(`${n.location.pathname}${n.location.search}${n.location.hash}`,n.history.state));if(!((A=n.history.state)!=null&&A.__TSR_key)&&!((z=n.history.state)!=null&&z.key)){const M=iS();n.history.replaceState({[Du]:0,key:M,__TSR_key:M},"")}let u=c(),h,f=!1,p=!1,m=!1,w=!1;const k=()=>u;let v;const b=()=>{v&&(j._ignoreSubscribers=!0,(v[2]?n.history.pushState:n.history.replaceState)(v[1],"",v[0]),j._ignoreSubscribers=!1,v=void 0,h=void 0)},y=(M,D,I)=>{const B=o(D),G=!!v;G||(h=u),u=zv(D,I),v=[B,I,(v==null?void 0:v[2])||M],G||queueMicrotask(()=>b())},x=M=>{u=c(),j.notify({type:M})},C=async()=>{if(p){p=!1;return}const M=c(),D=M.state[Du]-u.state[Du],I=D===1,B=D===-1,G=!I&&!B||f;f=!1;const q=G?"GO":B?"BACK":"FORWARD",Q=G?{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:q})){p=!0,n.history.go(1),j.notify(Q);return}}}u=c(),j.notify(Q)},N=M=>{if(w){w=!1;return}let D=!1;const I=i();if(typeof document<"u"&&I.length)for(const B of I){const G=B.enableBeforeUnload??!0;if(G===!0){D=!0;break}if(typeof G=="function"&&G()===!0){D=!0;break}}if(D)return M.preventDefault(),M.returnValue=""},j=WW({getLocation:k,getLength:()=>n.history.length,pushState:(M,D)=>y(!0,M,D),replaceState:(M,D)=>y(!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:b,destroy:()=>{n.history.pushState=t,n.history.replaceState=r,n.removeEventListener(QE,N,{capture:!0}),n.removeEventListener(WE,C)},onBlocked:()=>{h&&u!==h&&(u=h)},getBlockers:i,setBlockers:a,notifyOnIndexChange:!1});return n.addEventListener(QE,N,{capture:!0}),n.addEventListener(WE,C),n.history.pushState=function(...M){const D=t.apply(n.history,M);return j._ignoreSubscribers||x("PUSH"),D},n.history.replaceState=function(...M){const D=r.apply(n.history,M);return j._ignoreSubscribers||x("REPLACE"),D},j}function XW(e){let n=e.replace(/[\x00-\x1f\x7f]/g,"");return n.startsWith("//")&&(n="/"+n.replace(/^\/+/,"")),n}function zv(e,n){const t=XW(e),r=t.indexOf("#"),s=t.indexOf("?"),i=iS();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||{[Du]:0,key:i,__TSR_key:i}}}function iS(){return(Math.random()+1).toString(36).substring(7)}function YE(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 Ob(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 ZE({key:e,__TSR_key:n,__TSR_index:t,__hashScrollIntoViewOptions:r,...s}){return s}function YW(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 ZW=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??aW??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=zW(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=QW()),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=Ev(1e3),u=this.buildRouteTree(),this.setRoutes(u)}if(!this.stores&&this.latestLocation){const u=this.getStoreConfig(this);this.batch=u.batch,this.stores=KW(this.latestLocation,u),LW(this)}const o=this.options.basepath??"/",c=this.options.rewrite;if(i||s!==o||a!==c){this.basepath=o;const u=[],h=ED(o);h&&h!=="/"&&u.push(VW({basepath:o})),c&&u.push(c),this.rewrite=u.length===0?void 0:u.length===1?u[0]:GW(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=wW(this.routeTree,this.options.caseSensitive,(r,s)=>{r.init({originalIndex:s})});return this.options.routeMasks&&gW(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:h,href:f,state:p})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const b=this.options.parseSearch(u),y=this.options.stringifySearch(b);return{href:c+y+h,publicHref:c+y+h,pathname:Gp(c).path,external:!1,searchStr:y,search:N_(r==null?void 0:r.search,b),hash:Gp(h.slice(1)).path,state:P_(r==null?void 0:r.state,p)}}const m=new URL(f,this.origin),w=b3(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:Gp(w.pathname).path,external:!!this.rewrite&&w.origin!==this.origin,searchStr:v,search:N_(r==null?void 0:r.search,k),hash:Gp(w.hash.slice(1)).path,state:P_(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)=>NW({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=yW(ll(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 I=zv(i.href,{});i={...i,to:b3(this.rewrite,new URL(I.pathname,this.origin)).pathname,search:this.options.parseSearch(I.search),hash:I.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],h=o[3],f=this.resolvePathWithBase(c,i.to?`${i.to}`:".");let p=JE(i.params,h);const m=this.routesByPath[ll(f)];let w;if(m)w=this.getRouteBranch(m);else if(f.includes("$"))w=[];else{const[I,B,G]=this.getMatchedRoutes(f);w=I,this.options.notFoundRoute&&(!G||G.path!=="/"&&B["**"])&&(w=[...w,this.options.notFoundRoute])}if(w.length&&bD(p))for(const I of w){const B=((M=I.options.params)==null?void 0:M.stringify)??I.options.stringifyParams;if(B){p===h&&(p=Object.assign(Object.create(null),p));try{Object.assign(p,B(p))}catch{}}}const k=t.leaveParams?f:Gp(UE({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 I={};w.forEach(B=>{if(B.options.validateSearch)try{Object.assign(I,J1(B.options.validateSearch,{...I,...v}))}catch{}}),v=I}v=eQ(v,i,w,t._includeValidateSearch),v=N_(u,v);const b=this.options.stringifySearch(v),y=i.hash===!0?a.hash:i.hash?Ch(i.hash,a.hash):void 0,x=y?`#${y}`:"";let C=i.state===!0?a.state:i.state?Ch(i.state,a.state):{};i.state&&(C=P_(a.state,C));const N=`${k}${b}${x}`;let j,A,z=!1;if(this.rewrite){const I=new URL(N,this.origin),B=zD(this.rewrite,I);j=I.href.replace(I.origin,""),B.origin!==this.origin?(A=B.href,z=!0):A=B.pathname+B.search+B.hash}else j=hW(N),A=j;return{publicHref:A,href:j,pathname:k,search:v,searchStr:b,state:C,hash:y??"",external:z,unmaskOnReload:i.unmaskOnReload}},s=r(t);if(t.mask)s.maskedLocation=r({from:t.from,...t.mask});else if(this.options.routeMasks){const i=vW(s.pathname,this.processedTree);if(i){const a=Object.assign(Object.create(null),i.rawParams),{from:o,params:c,...u}=i.route,h=JE(c,a);s.maskedLocation=r({from:t.from,...u,params:h})}}return s},this.commitLocation=async({viewTransition:t,ignoreBlocker:r,...s})=>{let i;const a=ll(this.latestLocation.href)===ll(s.href)&&Ou(ZE(s.state),ZE(this.latestLocation.state)),o=this._commitPromise;let c;const u=new Promise(h=>{c=h});if(u.resolve=()=>{c(),o==null||o.resolve()},this._commitPromise=u,a)this.load();else{let{maskedLocation:h,hashScrollIntoView:f,...p}=s;h&&(p={...h,state:{...h.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 h=!o&&i?i:s;if(Cv(h,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(h):window.location.href=h;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 lQ(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(Ob(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,h;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")&&YE(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)(h=this._flights)==null||h.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&&Cv(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[h,f]of r)(!i||i(f))&&(o.push(h),a.push(f));const c=[];for(const[h,f]of s??[])(!i||f.some(i))&&(c.push(h),a.push(...f));for(const h of o)r.delete(h);for(const h of c)s.delete(h);for(const h of a){const f=h._flight;h._flight=void 0,f&&!--f[2]&&(((u=this._flights)==null?void 0:u.get(h.id))===f&&this._flights.delete(h.id),c.push(f[1]))}for(const h of c)h.abort()},this.loadRouteChunk=Qd,this.preloadRoute=t=>uQ(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=bW(i.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,o.pathname,this.processedTree);return!c||t.params&&!Ou(c.rawParams,t.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Ou(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??FW,parseSearch:e.parseSearch??PW,protocolAllowlist:e.protocolAllowlist??dW}),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=SD(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["**"]:ll(e.pathname))&&(this.options.notFoundRoute?i=[...i,this.options.notFoundRoute]:a=!0);const o=a?tQ(this.options.notFoundMode,i):void 0,c=new Array(i.length),u=this._committed,h=(w,k)=>{const v=u[k];return(v==null?void 0:v.routeId)===w.id?v:w===this.options.notFoundRoute?u.find(b=>b.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(h)}const u=c.validateSearch;if(r&&u){const h=({search:f,next:p,meta:m})=>{const w=p(f);try{const k=J1(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(h)}}const i=(o,c,u)=>{if(o>=s.length){if(!n.search)return{};if(n.search===!0)return c;const f=Ch(n.search,c);return u&&(u.explicit=f),f}const h=(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:h,meta:u})};return i(0,e)}function tQ(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 Wd}function JE(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,Ch(e,t))}function eN(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 y3(e,n){var t,r;return(r=(t=e.options[n])==null?void 0:t.preload)==null?void 0:r.call(t)}function nQ(e,n){const t=y3(e,"component");let r=y3(e,"pendingComponent");return n&&(r?r=r.then(n):n()),t&&r?Promise.all([t,r]).then(()=>{}):t??r}function Qd(e,n,t){const r=()=>n===!1?void 0:n?y3(e,n):nQ(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 aS(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 Af(e,n){return e.routesById[n.routeId]}function R0(e,n,t){return ND(e)?[da,e]:Eh(e)?(e.routeId||(e.routeId=t),[Db,e]):n?(typeof(e==null?void 0:e.then)=="function"&&(e=new Error("A Promise was thrown",{cause:e})),[pl,e]):[ic,e]}function oS(e,n){var r,s;let t=R0(n,!0,e.id);if(t[0]!==pl)return t;try{(s=(r=e.options).onError)==null||s.call(r,t[1])}catch(i){t=R0(i,!0,e.id)}return t}function m0(e,n,t,r,s){return s[0].signal.aborted?$u:uS(e,n,t,oS(t,r),s)}async function rQ(e,n,t,r,s,i){var h,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 ul(e,m),[p,m0(e,n,w,C,t)]}if(c.aborted)return[p,$u];const b=m.paramsError??m.searchError;if(b!==void 0)return ul(e,m),[p,m0(e,n,w,b,t)];const y=w.options.beforeLoad;if(!y)continue;const x=m.status;p>=i&&(m.status="pending",(f=t[7])==null||f.call(t));try{M0(e,m,"beforeLoad",t[0]);const C=await jf(y({...v,search:m.search,context:m.context,...e.options.additionalContext}),c);if(c.aborted)return[p,$u];const N=uS(e,n,w,R0(C,!1,w.id),t);if(N[0]!==ic)return ul(e,m),[p,N];m.context={...m.context,...C}}catch(C){return ul(e,m),[p,m0(e,n,w,C,t)]}finally{m.status=x,M0(e,m,!1,t[0])}}s()}function cS(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 ul(e,n){var r;const t=n._flight;n._flight=void 0,(r=cS(e,n,t))==null||r.abort()}function qi(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=cS(e,a,o);c&&s.push(c)}}for(const a of s)a.abort()}function lS(e){for(const n of e){const t=n._flight;t&&t[2]++}}function M0(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 jD(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 tN(e,n,t,r,s,i,a){const o=a[0],c=o.signal;if(c.aborted)return $u;if(!s)return[ic,void 0];let u=t._flight;M0(e,t,"loader",o);try{if(!u){const h=new AbortController;u=[Promise.resolve().then(()=>s(jD(e,n,t,r,h,i,!!a[3]))).then(f=>R0(f,!1,r.id),f=>R0(f,!0,r.id)).then(f=>{var p;return f[0]!==ic&&((p=e._flights)==null?void 0:p.get(t.id))===u&&(e._flights.delete(t.id),u[2]||h.abort()),f[0]===pl&&u[2]?oS(r,f[1]):f}),h,1],(e._flights??(e._flights=new Map)).set(t.id,u)}return t._flight=u,t.abortController=u[1],uS(e,n,r,await jf(u[0],c),a)}catch(h){if(h!==c||!c.aborted)throw h;return ul(e,t),$u}finally{M0(e,t,!1,o)}}function nN(e,n,t){n[0]!==da&&(e.status="success",e.error=void 0,n[0]===ic?(e.loaderData=n[1],e.invalid=!1,e.updatedAt=Date.now(),e.preload=t):e.invalid=!0)}function sQ(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&&ul(e,r)}function rN(e,n){return n[0]===pl||n[0]===Db?{...e,status:n[0]===pl?"error":"notFound",error:n[1],_flight:void 0}:e}function iQ(e,n,t,r,s,i,a){var B,G;const o=n[1][t],c=Af(e,o),u=!!i[3],h=e._cache.get(o.id);let f,p=!1,m;try{if(o.status==="success"&&(f=c.options.shouldReload,typeof f=="function"&&(f=f(jD(e,n,o,c,i[0],s,u))),i[0].signal.aborted&&(m=$u)),!m)if(o.status!=="success")p=!0;else{const q=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>=q&&(i[5]||o.cause==="enter"||i[2].some(Q=>Q.routeId===o.routeId&&Q.id!==o.id)))}}catch(q){o.invalid=!0,ul(e,o),m=m0(e,n,c,q,i)}const w=c.options.loader,k=typeof w=="function",v=k?w:w==null?void 0:w.handler,b=!u||c.options.preload!==!1;let y=b&&w?(B=e._flights)==null?void 0:B.get(o.id):void 0;y===o._flight||m?y=void 0:y&&!p&&!u&&f===void 0?p=!0:p||(y=void 0);const x=!!(w&&p&&o.status==="success"&&!u&&!i[4]&&((k?void 0:w.staleReloadMode)??e.options.defaultStaleReloadMode)!=="blocking"),C=p&&b,N=C&&!x&&(o.status!=="success"||!!w),j=t>=a?i[7]:void 0,A=c.lazyFn&&c._lazy!==!0?j:void 0;if(C&&!w&&(o.invalid=!1,o.updatedAt=Date.now()),y&&y[2]++,N){const q=o._flight;o._flight=y,(G=cS(e,o,q))==null||G.abort(),t>=a&&(o.status="pending"),j==null||j()}C||(o.isFetching=!1);const z=(m?Promise.resolve(m):N?tN(e,n,o,c,v,s,i):Promise.resolve([ic,o.loaderData])).then(q=>(N&&(nN(o,q,u),q[0]===ic&&(w&&!i[0].signal.aborted&&sQ(e,o,h),t>=a&&(o.status="pending"))),q)),M=jf(Promise.resolve().then(()=>Qd(c,void 0,A)),i[0].signal).then(()=>{},q=>n[1].some((Q,K)=>K<=t&&(Q.status==="error"||Q.status==="notFound"||Q._notFound))?void 0:[t,m0(e,n,c,q,i)]).then(q=>z.then(Q=>(N&&!q&&Q[0]===ic&&o.status==="pending"&&!i[0].signal.aborted&&(o.status="success",j==null||j()),q)));if(r.push([t,z,M]),!x)return z.then(q=>rN(o,q));const D={...o,status:"pending",preload:!1,_flight:y};o.invalid=!1,o.isFetching="loader";const I=tN(e,n,D,c,v,s,i).then(q=>(o.isFetching=!1,nN(D,q,!1),q));return(n[2]??(n[2]=[])).push([t,I,M,D]),I.then(q=>rN(D,q))}async function x3(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=Af(e,n[o]);try{const u=Qd(c,!1);u&&await jf(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 rf(e,n){n[2]&&(qi(e,n[2].map(t=>t[3])),n[2]=void 0)}async function sN(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]>=da)throw[o,a];!s&&a[0]!==ic&&(s=[o,a],await Promise.all((t??[]).map(c=>{if(!(c[0]<=o))return c[1].then(u=>{if(u[0]===da)throw[c[0],u]})})))}})))}catch(i){return i}return n??s}function uS(e,n,t,r,s,i){for(;r[0]===da;){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):[da,a,e.buildLocation({...o,_fromLocation:n[0],_includeValidateSearch:!0})]}catch(c){r=i?[pl,c]:oS(t,c),i=!0}}return r}async function AD(e,n,t,r,s,i){const a=n[1];let o=await s,c=!1;const u=a.findIndex(m=>m._notFound),h=m=>m[1][0]===Db?x3(e,a,m,r.signal):m[0];let f=u<0?a.length:u;if(((o==null?void 0:o[1][0])??0)>=da)f=0;else if(o){f=o[2]??(o[2]=await h(o));for(const m of t){if(m[0]>=f)break;const w=await m[1];if(w[0]!==ic&&w[0]=f)break;const w=await m[2];if(w){o=w;break}}if(((o==null?void 0:o[1][0])??0)>=da){const m=o[1];if(m[0]!==da||m[1].options.reloadDocument||m[2])return rf(e,n),m;c=!0,o=[0,[pl,new Error("Too many redirects")]]}const p=o?o[2]??await h(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],b=()=>{m&&(k._notFound=void 0,w===pl?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)};b(),m||i==null||i();const y=Af(e,k);try{await jf(m?Promise.resolve().then(()=>Qd(y,w===pl?"errorComponent":"notFoundComponent")):Promise.all([Qd(y),Qd(y,"notFoundComponent")]),r.signal)}catch(x){if(x===r.signal&&r.signal.aborted)return rf(e,n),$u}m?c&&(r.abort(),await Promise.all([...t.map(x=>x[1]),...t.map(x=>x[2]),...(n[2]??[]).map(x=>x[1])]),rf(e,n),qi(e,a),b()):k.status="success"}return n}async function TD(e,n,t,r=0,s=n[1].length){var a,o;const i=n[1];for(let c=r;cy._notFound);if(e.options.notFoundMode!=="root"&&u>=0){const y=await x3(e,t,void 0,i,u);t[u]._notFound=void 0,t[y]._notFound=!0,u=y}let h=u<0?t.length:u+1,f=0;for(;f{for(let y=m;y=da&&(h=0);k()}if(!i.aborted&&!r[3]){const y=[];for(const[x,C]of e._flights??[])C[2]||(e._flights.delete(x),y.push(C[1]));for(const x of y)x.abort()}const b=AD(e,s,p,r[0],sN(p,v,s[2]),r[7]);(o=s[2])!=null&&o.length&&(s[3]=sN(s[2],void 0,void 0,b.then(y=>T0(y)?0:aS(t).length,()=>0))),a=await b}catch(c){if(rf(e,s),c===i&&i.aborted)return $u;throw c}return T0(a)?a:TD(e,a,i,r[6]===t.length?r[6]:0)}function w3(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(()=>w3(e,n),y);return}s[2]=0}const v=t.map(y=>({...y,_flight:void 0}));v[o].status="pending";const b=s[4]=e.startTransition(()=>e.stores.setMatches(v),v).then(y=>(y&&e._pending===s&&s[4]===b&&!s[2]&&(s[2]=Date.now()+w),y));return}}function Vp(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 iN(e,n){const t=e._pending;if(!t)return;clearTimeout(t[3]);const r=t[2]-Date.now();if(!t[4]||r<=0||!aS(n[3]).some(i=>i.id===t[1]))return;let s;try{await jf(new Promise(i=>{s=setTimeout(i,r)}),n[0].signal)}catch{}clearTimeout(s)}function MD(e,n){e._committed=n,e.stores.setMatches(n)}function aQ(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=aS(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?h.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:h.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,MD(e,t),qi(e,[...i.values(),...s],[...t,...o.values()]),YW(e,s,t,n)}async function n1(e,n){let t=e._tx;for(;t&&t!==n;){if(await t[5],e._tx===t)return;t=e._tx}}function OD(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 oQ(e,n,t,r,s){const i=t.map(c=>({...c}));lS(i);for(const c of r)ul(e,i[c[0]]),i[c[0]]=c[3];const a=[n[2],i];let o;try{o=await AD(e,a,r,n[0],s)}catch(c){throw qi(e,i),c}if(T0(o)){qi(e,i),o[0]===da&&e._tx===n&&e._committed===t&&await OD(e,n,o);return}if(await TD(e,o,n[0].signal),e._tx!==n||e._committed!==t){qi(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),ul(e,u))}MD(e,i),qi(e,t,i)}async function cQ(e,n,t,r,s,i){const a=await RD(e,n[2],n[3],[n[0],n[1],e._committed,void 0,s,t,i,r]);if(T0(a)){const f=a[0]===da&&e._tx===n;if((!f||a[1].options.reloadDocument)&&Vp(e,n),qi(e,n[3]),n[3]=[],!f)return;if(e._tx!==n){Vp(e,n);return}await OD(e,n,a);return}const o=a[1];if(e._tx===n&&await iN(e,n),e._tx!==n){Vp(e,n),qi(e,o),rf(e,a);return}const c=n[2],u=Ob(c,e.stores.resolvedLocation.get()),h=a[2];await e.startViewTransition(async()=>{var m;if(e._tx===n&&await iN(e,n),e._tx!==n){Vp(e,n),qi(e,o),rf(e,a);return}const f=()=>{Vp(e,n),aQ(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){rf(e,a);return}h!=null&&h.length&&oQ(e,n,o,h,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 lQ(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](),h=new AbortController,f=e._preflight;if(e._preflight=h,u||c==null||c[1](),f==null||f.abort(),!h.signal.aborted){const N=Ob(i,r);e.emit({type:"onBeforeNavigate",...N}),h.signal.aborted||e.emit({type:"onBeforeLoad",...N})}if(h.signal.aborted){await n1(e,t);return}const p=s.href===i.href;let m=h;const w=e.matchRoutes(i,{_controller:h});lS(w);const k=u?c[1](w):void 0;if(k?m=u:u==null||u.abort(),h.signal.aborted){qi(e,w),await n1(e,t);return}e._preflight=void 0;let v;const b=()=>cQ(e,x,p,()=>w3(e,x),n==null?void 0:n.sync,k),y=n!=null&&n.sync?new Promise(N=>v=N):Promise.resolve().then(b).then(),x=[m,o,i,w,Date.now(),y];if(e._tx=x,t){for(const N of e.stores.matches.get()){if(e._tx!==x)break;N.isFetching&&M0(e,N,!1)}t[0].abort(),qi(e,t[3],x[3],!0)}if(e._tx!==x){qi(e,x[3]),x[3]=[],v==null||v(),await n1(e,x);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))&&w3(e,x),v==null||v(b()),await y,await n1(e,x)}async function uQ(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}),lS(a),o=(e._preloads??(e._preloads=new Map)).set(i,a),c=await RD(e,t,a,[i,r,s,!0])}finally{o&&(o=o.delete(i),qi(e,a)),i.abort()}if(!T0(c))return c[1];if(!o||c.length<3)return;t=c[2]}catch(u){Eh(u)||console.error(u);return}}}const _Q="Error preloading route! ☝️";var DD=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=Wd:this.parentRoute||rS();let s=r?Wd:t==null?void 0:t.path;s&&s!=="/"&&(s=CD(s));const i=(t==null?void 0:t.id)||s;let a=r?Wd:X1([this.parentRoute.id==="__root__"?"":this.parentRoute.id,i]);s==="__root__"&&(s="/"),a!=="__root__"&&(a=X1(["/",a]));const o=a==="__root__"?"/":X1([this.parentRoute.fullPath,s]);this._path=s,this._id=a,this._fullPath=o,this._to=ll(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=>UW({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.")}},fQ=class extends DD{constructor(e){super(e)}},_S=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??dQ,{error:e,reset:this.reset}):this.props.children}};function dQ({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 hQ({children:e,fallback:n=null}){return _.jsx(it.Fragment,{children:LD()?e:n})}function LD(){return it.useSyncExternalStore(pQ,()=>!0,()=>!1)}function pQ(){return()=>{}}var ID=T.createContext(null);function wi(e){return T.useContext(ID)}var Lb=T.createContext(void 0),mQ=T.createContext(void 0),jr=(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))(jr||{});function gQ({update:e,notify:n,unwatched:t}){return{link:r,unlink:s,propagate:i,checkDirty:a,shallowPropagate:o};function r(u,h,f){const p=h.depsTail;if(p!==void 0&&p.dep===u)return;const m=p!==void 0?p.nextDep:h.deps;if(m!==void 0&&m.dep===u){m.version=f,h.depsTail=m;return}const w=u.subsTail;if(w!==void 0&&w.version===f&&w.sub===h)return;const k=h.depsTail=u.subsTail={version:f,dep:u,sub:h,prevDep:p,nextDep:m,prevSub:w,nextSub:void 0};m!==void 0&&(m.prevDep=k),p!==void 0?p.nextDep=k:h.deps=k,w!==void 0?w.nextSub=k:u.subs=k}function s(u,h=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:h.depsTail=p,p!==void 0?p.nextDep=m:h.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 h=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:h,prev:f},h=k);continue}}if((u=h)!==void 0){h=u.nextSub;continue}for(;f!==void 0;)if(u=f.value,f=f.prev,u!==void 0){h=u.nextSub;continue e}break}while(!0)}function a(u,h){let f,p=0,m=!1;e:do{const w=u.dep,k=w.flags;if(h.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,h=w,++p;continue}if(!m){const v=u.nextDep;if(v!==void 0){u=v;continue}}for(;p--;){const v=h.subs,b=v.nextSub!==void 0;if(b?(u=f.value,f=f.prev):u=v,m){if(e(h)){b&&o(v),h=u.sub;continue}m=!1}else h.flags&=-33;h=u.sub;const y=u.nextDep;if(y!==void 0){u=y;continue e}}return m}while(!0)}function o(u){do{const h=u.sub,f=h.flags;(f&48)===32&&(h.flags=f|16,(f&6)===2&&n(h))}while((u=u.nextSub)!==void 0)}function c(u,h){let f=h.depsTail;for(;f!==void 0;){if(f===u)return!0;f=f.prevDep}return!1}}function vQ(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 k3=[];let ev=0;const{link:aN,unlink:bQ,propagate:yQ,checkDirty:$D,shallowPropagate:oN}=gQ({update(e){return e._update()},notify(e){k3[S3++]=e,e.flags&=~jr.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=jr.Mutable|jr.Dirty,Av(e))}});let r1=0,S3=0,Xo,C3=0;function xQ(e){try{++C3,e()}finally{--C3||BD()}}function Av(e){const n=e.depsTail;let t=n!==void 0?n.nextDep:e.deps;for(;t!==void 0;)t=bQ(t,e)}function BD(){if(!(C3>0)){for(;r1{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=Xo,o=(n==null?void 0:n.compare)??Object.is;if(t)Xo=s,++ev,s.depsTail=void 0;else if(i===void 0)return!1;t&&(s.flags=jr.Mutable|jr.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{Xo=a,t&&(s.flags&=~jr.RecursedCheck),Av(s)}}};return t?(s.flags=jr.Mutable|jr.Dirty,s.get=function(){const i=s.flags;if(i&jr.Dirty||i&jr.Pending&&$D(s.deps,s)){if(s._update()){const a=s.subs;a!==void 0&&oN(a)}}else i&jr.Pending&&(s.flags=i&~jr.Pending);return Xo!==void 0&&aN(s,Xo,ev),s._snapshot}):s.set=function(i){if(s._update(i)){const a=s.subs;a!==void 0&&(yQ(a),oN(a),BD())}},s}function wQ(e){const n=()=>{const r=Xo;Xo=t,++ev,t.depsTail=void 0,t.flags=jr.Watching|jr.RecursedCheck;try{return e()}finally{Xo=r,t.flags&=~jr.RecursedCheck,Av(t)}},t={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:jr.Watching|jr.RecursedCheck,notify(){const r=this.flags;r&jr.Dirty||r&jr.Pending&&$D(this.deps,this)?n():this.flags=jr.Watching},stop(){this.flags=jr.None,this.depsTail=void 0,Av(this)}};return n(),t}var tw={exports:{}},nw={},rw={exports:{}},sw={};/** * @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 lN;function CQ(){if(lN)return iw;lN=1;var e=Nm();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 h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return iw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,iw}var uN;function EQ(){return uN||(uN=1,sw.exports=CQ()),sw.exports}/** + */var lN;function kQ(){if(lN)return sw;lN=1;var e=Nm();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 h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:o;return sw.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,sw}var uN;function SQ(){return uN||(uN=1,rw.exports=kQ()),rw.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.js * @@ -63,37 +63,37 @@ 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 _N;function NQ(){if(_N)return rw;_N=1;var e=Nm(),n=EQ();function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}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 rw.useSyncExternalStoreWithSelector=function(u,h,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 b(j){if(!y){if(y=!0,x=j,j=p(j),m!==void 0&&k.hasValue){var A=k.value;if(m(A,j))return C=A}return C=j}if(A=C,r(x,j))return A;var z=p(j);return m!==void 0&&m(A,z)?(x=j,A):(x=j,C=z)}var y=!1,x,C,N=f===void 0?null:f;return[function(){return b(h())},N===null?void 0:function(){return b(N())}]},[h,f,p,m]);var v=s(u,w[0],w[1]);return a(function(){k.hasValue=!0,k.value=v},[v]),c(v),v},rw}var fN;function zQ(){return fN||(fN=1,nw.exports=NQ()),nw.exports}var PD=zQ();const jQ=Em(PD);function AQ(e,n){return e===n}function cc(e,n,t=AQ){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 PD.useSyncExternalStoreWithSelector(r,s,s,n,t)}var dN={};function fS(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=B_(t.current,s):s}}function Tf(e){const n=xi(),t=T.useContext(e.from?vQ:Ib),r=e.from??t,s=n.stores.getMatchStore(r),i=fS(e,n),a=cc(s,o=>o?i(o):dN);if(a!==dN)return a;(e.shouldThrow??!0)&&rS()}function FD(e){return Tf({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function HD(e){const{select:n,...t}=e;return Tf({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function qD(e){return Tf({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 UD(e){return Tf({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function $b(e){const n=xi();return T.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function dS(e){return Tf({...e,select:n=>e.select?e.select(n.context):n.context})}function aw(e){const n=T.useRef(e);return Ou(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function TQ(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function RQ(e,n,t){if(e!=null&&e.external)return Cv(e.href,t)?void 0:e.href;if(!BQ(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),Cv(n,t)?void 0:n}catch{}}function MQ(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!zW(e.pathname,n.pathname,r))return!1}else{const a=Nv(e.pathname,r),o=Nv(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!Ou(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 OQ(e,n){const t=xi(),r=uW(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,preloadIntentProximity:h,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:w,viewTransition:k,children:v,target:b,disabled:y,style:x,className:C,onClick:N,onBlur:j,onFocus:A,onMouseEnter:z,onMouseLeave:M,onTouchStart:D,ignoreBlocker:I,params:B,search:G,hash:U,state:Q,mask:V,reloadDocument:Z,unsafeRelative:J,from:$,_fromLocation:L,...q}=e,P=LD(),F=aw(e.search),re=aw(e.params),ie=aw(a),ue=T.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,F,re,e.state,e.mask,e.unsafeRelative]),se=T.useCallback(Le=>{const nt=t.buildLocation({_fromLocation:Le,...ue}),ke=$Q(nt.maskedLocation?nt.maskedLocation.publicHref:nt.publicHref,nt.maskedLocation?nt.maskedLocation.external:nt.external,t.history,y),me=RQ(ke,o,t.protocolAllowlist);return[ke==null?void 0:ke.href,me,MQ(Le,nt,ie,t.basepath,P,me!==void 0)]},[ie,y,P,ue,t,o]),[K,oe,ce]=cc(t.stores.location,se,TQ),pe=ce?Ch(s,{})??DQ:ow,ve=ce?ow:Ch(i,{})??ow,Me=[C,pe.className,ve.className].filter(Boolean).join(" "),Fe=(x||pe.style||ve.style)&&{...x,...pe.style,...ve.style},Ye=T.useRef(!1),Te=e.reloadDocument||oe||y?!1:c??t.options.defaultPreload,$e=u??t.options.defaultPreloadDelay??0,yt=T.useCallback(()=>{t.preloadRoute(ue).catch(Le=>{console.warn(Le),console.warn(dQ)})},[t,ue]),ot=T.useCallback(Le=>{if(!Le){cw(r);return}if(!(Le.isIntersecting??Te==="intent")){Le.isIntersecting===!1&&cw(r);return}if(!$e){yt();return}g0.has(r)||g0.set(r,setTimeout(()=>{g0.delete(r),yt()},$e))},[yt,r,Te,$e]);lW(r,ot,Te!=="viewport"),T.useEffect(()=>{Ye.current||Te==="render"&&(yt(),Ye.current=!0)},[yt,Te]);const Mt=Le=>{const nt=Le.currentTarget.getAttribute("target"),ke=b!==void 0?b:nt;!y&&!(Le.metaKey||Le.altKey||Le.ctrlKey||Le.shiftKey)&&!Le.defaultPrevented&&(!ke||ke==="_self")&&Le.button===0&&(Le.preventDefault(),t.navigate({...ue,replace:p,resetScroll:w,hashScrollIntoView:f,startTransition:m,viewTransition:k,ignoreBlocker:I}))};if(oe)return{...q,ref:r,href:oe,...v&&{children:v},...b&&{target:b},...y&&{disabled:y},...x&&{style:x},...C&&{className:C},...N&&{onClick:N},...j&&{onBlur:j},...A&&{onFocus:A},...z&&{onMouseEnter:z},...M&&{onMouseLeave:M},...D&&{onTouchStart:D}};const jt=()=>{Te==="intent"&&yt()},Pt=()=>{Te==="intent"&&cw(r)};return{...q,...pe,...ve,href:K,ref:r,onClick:kd([N,Mt]),onBlur:kd([j,Pt]),onFocus:kd([A,ot]),onMouseEnter:kd([z,ot]),onMouseLeave:kd([M,Pt]),onTouchStart:kd([D,jt]),disabled:!!y,target:b,...Fe&&{style:Fe},...Me&&{className:Me},...y&&LQ,...ce&&IQ}}var ow={},DQ={className:"active"},LQ={role:"link","aria-disabled":!0},IQ={"data-status":"active","aria-current":"page"},g0=new WeakMap,cw=e=>{clearTimeout(g0.get(e)),g0.delete(e)},kd=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function $Q(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function BQ(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var Bb=T.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=OQ(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)}),PQ=class extends DD{constructor(n){super(n),this.useMatch=t=>Tf({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>dS({...t,from:this.id}),this.useSearch=t=>UD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>qD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>HD({...t,from:this.id}),this.useLoaderData=t=>FD({...t,from:this.id}),this.useNavigate=()=>$b({from:this.fullPath}),this.Link=it.forwardRef((t,r)=>_.jsx(Bb,{ref:r,from:this.fullPath,...t}))}};function FQ(e){return new PQ(e)}function HQ(){return e=>UQ(e)}var qQ=class extends hQ{constructor(e){super(e),this.useMatch=n=>Tf({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>dS({...n,from:this.id}),this.useSearch=n=>UD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>qD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>HD({...n,from:this.id}),this.useLoaderData=n=>FD({...n,from:this.id}),this.useNavigate=()=>$b({from:this.fullPath}),this.Link=it.forwardRef((n,t)=>_.jsx(Bb,{ref:t,from:this.fullPath,...n}))}};function UQ(e){return new qQ(e)}function hc(e){return n=>{const t=FQ(n);return t.isRoot=!1,t}}function GQ(e){const n=xi(),t=`not-found-${cc(n.stores.location,r=>r.pathname)}-${cc(n.stores.status,r=>r)}`;return _.jsx(_S,{getResetKey:()=>t,onCatch:(r,s)=>{var i;if(Eh(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Eh(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function KQ(){return _.jsx("p",{children:"Not Found"})}function Rd(e){return _.jsx(_.Fragment,{children:e.children})}function GD(e,n,t){return n.options.notFoundComponent?_.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?_.jsx(e.options.defaultNotFoundComponent,{...t}):_.jsx(KQ,{})}function Pb(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?_.jsx(t,{}):null}var VQ=(e,n)=>e[0]===n[0]&&e[1]===n[1],KD=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,VD=T.memo(function({routeId:n}){const t=xi();return _.jsx(WQ,{router:t,match:cc(t.stores.getMatchStore(n),r=>r)})});function WQ({router:e,match:n}){var f,p;const t=e.routesById[n.routeId],r=Pb(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=KD(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?T.Suspense:Rd,u=s?_S:Rd,h=a?GQ:Rd;return _.jsxs(t.isRoot?t.options.shellComponent??Rd:Rd,{children:[_.jsx(Ib.Provider,{value:n.routeId,children:_.jsx(c,{fallback:r,children:_.jsx(u,{getResetKey:()=>n,errorComponent:s,onCatch:(m,w)=>{if(Eh(m))throw m.routeId??(m.routeId=n.routeId),m;i==null||i(m,w)},children:_.jsx(h,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return T.createElement(a,m)},children:o?_.jsx(mQ,{fallback:r,children:_.jsx(hN,{match:n})}):_.jsx(hN,{match:n})})})})}),null]})}var hN=T.memo(function({match:n}){const t=xi(),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(O0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!KD(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return Pb(t,s)}if(n.status==="notFound")return GD(t,s,n.error);if(n.status==="error")throw n.error;return a}),O0=T.memo(function(){const n=xi(),t=T.useContext(Ib);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=cc(o,c=>[!!c._notFound,c.error],VQ),i=cc(n.stores.ids,c=>c[c.indexOf(t)+1])}if(r)return GD(n,n.routesById[t],s);if(!i)return null;const a=_.jsx(VD,{routeId:i});return t===Wd?_.jsx(T.Suspense,{fallback:Pb(n),children:a}):a});function WD(e,n){const t=e[1];e.length=0,t==null||t(n)}function QQ({t:e}){const n=xi(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{WD(t,!1),t.push(s,i),e(n),T.startTransition(r)}),gD(()=>{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(ll(s.publicHref)!==ll(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",...Db(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function XQ(){const e=xi(),n=e.routesById[Wd],t=Pb(e,n),r=e.ssr?Rd:T.Suspense,s=_.jsxs(_.Fragment,{children:[_.jsx(QQ,{t:T.useState()[1]}),_.jsx(r,{fallback:t,children:_.jsx(YQ,{})})]});return e.options.InnerWrap?_.jsx(e.options.InnerWrap,{children:s}):s}function YQ(){const e=xi(),n=e._rendered,t=cc(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;gD(()=>{n[0]===t&&WD(n,!0)},[n,t]);const i=s?_.jsx(VD,{routeId:s}):null;return _.jsx(Ib.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:_.jsx(_S,{getResetKey:()=>r,onCatch:void 0,children:i})})}var ZQ=e=>({createMutableStore:cN,createReadonlyStore:cN,batch:kQ}),JQ=e=>new eX(e),eX=class extends eQ{constructor(e){super(e,ZQ)}};function tX({router:e,children:n,...t}){bD(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=_.jsx(ID.Provider,{value:e,children:n});return e.options.Wrap?_.jsx(e.options.Wrap,{children:r}):r}function nX({router:e,...n}){return _.jsx(tX,{router:e,...n,children:_.jsx(XQ,{})})}function rX(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 sX(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=rX(e),a=xi(),{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 h=async f=>{function p(b){const y=a.parseLocation(b),[,x,C]=a.getMatchedRoutes(y.pathname);return C===void 0?{routeId:"__notFound__",fullPath:y.pathname,pathname:y.pathname,params:x,search:a.options.parseSearch(b.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:y.pathname,params:x,search:a.options.parseSearch(b.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(b=>{u({status:"blocked",current:m,next:w,action:f.action,proceed:()=>b(!1),reset:()=>b(!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:h,enableBeforeUnload:r})},[t,r,s,i,o,a]),c}function QD(e){const n=xi({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return cc(t.stores.__store,fS(e,t))}function iX(e){const n=xi();return cc(n.stores.location,fS(e,n))}const Tv=new WeakMap,tv=new WeakMap;function oo(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))Tv.set(s,(Tv.get(s)??0)+1),(r=tv.get(s))==null||r.add(t)}function jm(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 Kh(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?Tv.get(s):void 0,a=await t();if(!s||Tv.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;tv.set(s,o);try{const c=await t();return o.size?r(c,e.getQueryData(n),o):c}finally{tv.get(s)===o&&tv.delete(s)}}const Nh=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function XD(e){const n=e.queryKey[2];if(n==="resolvedFile")return Nh(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&&Nh(t.ref)}function Pa(e,n=yi(),t,r=!1){if(!zn(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!XD(i)&&(!t||t(i))};r?tt.cancelQueries(s).then(()=>{zn(n)&&tt.invalidateQueries(s)}):tt.invalidateQueries(s)}const YD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],hS=["getArtifacts","getArtifactFileText","getArtifactFileMetadata","searchArtifacts","getFileLocation"],aX=["listProjects","listProjectActivity","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...hS,...YD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function oX(e,n=yi(),t=!1){const r=tt.getQueryData([...n,"listChatSessions",e])??[],s=tt.getQueryData([...n,"listRuns",e])??[],i=tt.getQueryData([...n,"listExperiments",e])??[];Pa([...YD,...hS,"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 Fb(e){const n=yi();bl.add(e),oo(tt,[...n,"listChatSessions"],e),tt.setQueriesData({queryKey:[...n,"listChatSessions"]},t=>t==null?void 0:t.filter(r=>r.id!==e));for(const t of["getChatMessages","getSessionWorktree"])nS({queryKey:[...n,t,e]})}function cX(e){const n=yi(),t=tt.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])Fb(r.id);nS({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const lX={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 uX(e,n){var a;if(!zn(n))return;const t=(o,c=n,u)=>Pa(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(lX[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),tt.invalidateQueries({queryKey:["gateway","runtime"]});return}if(r.startsWith("/api/chat/")){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")){oX(o,n,!0);return}t(["listProjects","listProjectActivity"],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 _X={},fX="en",pS=["en","zh-CN","fa","ar","es","hi"],ZD="orx:locale",mS=["localStorage","preferredLanguage","baseLocale"],pN=[],D0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let mN=!1,E=()=>{var t;let e=mS;!D0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=tL(window.location.href));const n=dX(e);if(n)return mN||(mN=!0,JD(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function dX(e,n){let t;for(const r of e){if(r==="baseLocale")t=fX;else if(r==="preferredLanguage"&&!D0)t=vX();else if(r==="localStorage"&&!D0)t=localStorage.getItem(ZD)??void 0;else if(nL(r)&&Rv.has(r)){const i=Rv.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return mX(a)}}const s=L0(t);if(s)return s}}const hX=e=>{window.location.reload()};let JD=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=E()}catch{}const s=[];let i=mS;!D0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=tL(window.location.href));for(const c of i)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(ZD,e);else if(nL(c)&&Rv.has(c)){const u=Rv.get(c);if(u){let h=u.setLocale(e);h instanceof Promise&&(h=h.catch(f=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:f})}),s.push(h))}}}const a=()=>{!D0&&t.reload&&window.location&&e!==r&&hX()};if(s.length)return Promise.all(s).then(()=>{a()});a()},pX=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function L0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of pS)if(t.toLowerCase()===n)return t}function eL(e){return!!e&&pS.some(n=>n===e)}function mX(e){const n=L0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${pS.join(", ")}`)}function gX(e,n){return e.exec(n.href)}function vX(){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=L0(t.fullTag);if(r)return r;const s=L0(t.baseTag);if(s)return s}}function bX(e){return yX(e)}function yX(e){const n=typeof e=="string"?new URL(e,pX()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&L0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let gN,vN;function xX(e){if(pN.length===0)return;const n=typeof e=="string"?e:e.href;if(gN===n)return vN;const t=new URL(n,"http://example.com"),r=bX(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of pN){const c=new _X(o.match,a.href);if(gX(c,a)){i=o;break}}if(i)break}return gN=n,vN=i,i}function tL(e){const n=xX(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:mS}const Rv=new Map;function nL(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const wX=e=>`Actions for ${e==null?void 0:e.name}`,kX=e=>`${e==null?void 0:e.name} 的操作`,SX=e=>`عملیات ${e==null?void 0:e.name}`,CX=e=>`إجراءات ${e==null?void 0:e.name}`,EX=e=>`Acciones para ${e==null?void 0:e.name}`,NX=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,zX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kX(e):t==="fa"?SX(e):t==="ar"?CX(e):t==="es"?EX(e):t==="hi"?NX(e):wX(e)}),jX=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,AX=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,TX=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,RX=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,MX=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,OX=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,DX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AX(e):t==="fa"?TX(e):t==="ar"?RX(e):t==="es"?MX(e):t==="hi"?OX(e):jX(e)}),LX=e=>`Branch: ${e==null?void 0:e.branch}`,IX=e=>`分支:${e==null?void 0:e.branch}`,$X=e=>`شاخه: ${e==null?void 0:e.branch}`,BX=e=>`الفرع: ${e==null?void 0:e.branch}`,PX=e=>`Rama: ${e==null?void 0:e.branch}`,FX=e=>`ब्रांच: ${e==null?void 0:e.branch}`,HX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IX(e):t==="fa"?$X(e):t==="ar"?BX(e):t==="es"?PX(e):t==="hi"?FX(e):LX(e)}),qX=e=>`Browse code on ${e==null?void 0:e.branch}`,UX=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,GX=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,KX=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,VX=e=>`Explorar el código en ${e==null?void 0:e.branch}`,WX=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,rL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UX(e):t==="fa"?GX(e):t==="ar"?KX(e):t==="es"?VX(e):t==="hi"?WX(e):qX(e)}),QX=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,XX=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,YX=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,ZX=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,JX=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,eY=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,tY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XX(e):t==="fa"?YX(e):t==="ar"?ZX(e):t==="es"?JX(e):t==="hi"?eY(e):QX(e)}),nY=e=>`Collapse ${e==null?void 0:e.name}`,rY=e=>`折叠 ${e==null?void 0:e.name}`,sY=e=>`بستن ${e==null?void 0:e.name}`,iY=e=>`طيّ ${e==null?void 0:e.name}`,aY=e=>`Contraer ${e==null?void 0:e.name}`,oY=e=>`${e==null?void 0:e.name} समेटें`,cY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rY(e):t==="fa"?sY(e):t==="ar"?iY(e):t==="es"?aY(e):t==="hi"?oY(e):nY(e)}),lY=e=>`Committed changes versus ${e==null?void 0:e.parent}`,uY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,_Y=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,fY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,dY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,hY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,pY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uY(e):t==="fa"?_Y(e):t==="ar"?fY(e):t==="es"?dY(e):t==="hi"?hY(e):lY(e)}),mY=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,gY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,vY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,bY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,yY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,xY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,wY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gY(e):t==="fa"?vY(e):t==="ar"?bY(e):t==="es"?yY(e):t==="hi"?xY(e):mY(e)}),kY=e=>`Copy ${e==null?void 0:e.value}`,SY=e=>`复制 ${e==null?void 0:e.value}`,CY=e=>`کپی ${e==null?void 0:e.value}`,EY=e=>`نسخ ${e==null?void 0:e.value}`,NY=e=>`Copiar ${e==null?void 0:e.value}`,zY=e=>`${e==null?void 0:e.value} कॉपी करें`,jY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SY(e):t==="fa"?CY(e):t==="ar"?EY(e):t==="es"?NY(e):t==="hi"?zY(e):kY(e)}),AY=e=>`Delete ${e==null?void 0:e.name}`,TY=e=>`删除 ${e==null?void 0:e.name}`,RY=e=>`حذف ${e==null?void 0:e.name}`,MY=e=>`حذف ${e==null?void 0:e.name}`,OY=e=>`Eliminar ${e==null?void 0:e.name}`,DY=e=>`${e==null?void 0:e.name} हटाएं`,N3=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TY(e):t==="fa"?RY(e):t==="ar"?MY(e):t==="es"?OY(e):t==="hi"?DY(e):AY(e)}),LY=e=>`Download ${e==null?void 0:e.name}`,IY=e=>`下载 ${e==null?void 0:e.name}`,$Y=e=>`بارگیری ${e==null?void 0:e.name}`,BY=e=>`تنزيل ${e==null?void 0:e.name}`,PY=e=>`Descargar ${e==null?void 0:e.name}`,FY=e=>`${e==null?void 0:e.name} डाउनलोड करें`,Mv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IY(e):t==="fa"?$Y(e):t==="ar"?BY(e):t==="es"?PY(e):t==="hi"?FY(e):LY(e)}),HY=e=>`Expand ${e==null?void 0:e.name}`,qY=e=>`展开 ${e==null?void 0:e.name}`,UY=e=>`باز کردن ${e==null?void 0:e.name}`,GY=e=>`توسيع ${e==null?void 0:e.name}`,KY=e=>`Expandir ${e==null?void 0:e.name}`,VY=e=>`${e==null?void 0:e.name} फैलाएं`,WY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qY(e):t==="fa"?UY(e):t==="ar"?GY(e):t==="es"?KY(e):t==="hi"?VY(e):HY(e)}),QY=e=>`Hide additional ${e==null?void 0:e.target}`,XY=e=>`隐藏其余${e==null?void 0:e.target}`,YY=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,ZY=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,JY=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,eZ=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,tZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XY(e):t==="fa"?YY(e):t==="ar"?ZY(e):t==="es"?JY(e):t==="hi"?eZ(e):QY(e)}),nZ=e=>`Hide error details for ${e==null?void 0:e.activity}`,rZ=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,sZ=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,iZ=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,aZ=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,oZ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,cZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rZ(e):t==="fa"?sZ(e):t==="ar"?iZ(e):t==="es"?aZ(e):t==="hi"?oZ(e):nZ(e)}),lZ=e=>`${e==null?void 0:e.count} consecutive identical calls`,uZ=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,_Z=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,fZ=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,dZ=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,hZ=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,pZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uZ(e):t==="fa"?_Z(e):t==="ar"?fZ(e):t==="es"?dZ(e):t==="hi"?hZ(e):lZ(e)}),mZ=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,gZ=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,vZ=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,bZ=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,yZ=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,xZ=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,wZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gZ(e):t==="fa"?vZ(e):t==="ar"?bZ(e):t==="es"?yZ(e):t==="hi"?xZ(e):mZ(e)}),kZ=e=>`Open ${e==null?void 0:e.branch} on GitHub`,SZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,CZ=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,EZ=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,NZ=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,zZ=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,sL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SZ(e):t==="fa"?CZ(e):t==="ar"?EZ(e):t==="es"?NZ(e):t==="hi"?zZ(e):kZ(e)}),jZ=e=>`Open experiment ${e==null?void 0:e.name}`,AZ=e=>`打开实验 ${e==null?void 0:e.name}`,TZ=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,RZ=e=>`فتح التجربة ${e==null?void 0:e.name}`,MZ=e=>`Abrir el experimento ${e==null?void 0:e.name}`,OZ=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,DZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?AZ(e):t==="fa"?TZ(e):t==="ar"?RZ(e):t==="es"?MZ(e):t==="hi"?OZ(e):jZ(e)}),LZ=e=>`Open ${e==null?void 0:e.path} in the right pane`,IZ=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,$Z=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,BZ=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,PZ=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,FZ=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,HZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IZ(e):t==="fa"?$Z(e):t==="ar"?BZ(e):t==="es"?PZ(e):t==="hi"?FZ(e):LZ(e)}),qZ=e=>`Open ${e==null?void 0:e.name}`,UZ=e=>`打开 ${e==null?void 0:e.name}`,GZ=e=>`باز کردن ${e==null?void 0:e.name}`,KZ=e=>`فتح ${e==null?void 0:e.name}`,VZ=e=>`Abrir ${e==null?void 0:e.name}`,WZ=e=>`${e==null?void 0:e.name} खोलें`,QZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?UZ(e):t==="fa"?GZ(e):t==="ar"?KZ(e):t==="es"?VZ(e):t==="hi"?WZ(e):qZ(e)}),XZ=e=>`Open logs for run ${e==null?void 0:e.run}`,YZ=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,ZZ=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,JZ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,eJ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,tJ=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,nJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YZ(e):t==="fa"?ZZ(e):t==="ar"?JZ(e):t==="es"?eJ(e):t==="hi"?tJ(e):XZ(e)}),rJ=e=>`Open ${e==null?void 0:e.name} on GitHub`,sJ=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,iJ=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,aJ=e=>`فتح ${e==null?void 0:e.name} على GitHub`,oJ=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,cJ=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,Ov=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sJ(e):t==="fa"?iJ(e):t==="ar"?aJ(e):t==="es"?oJ(e):t==="hi"?cJ(e):rJ(e)}),lJ=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,uJ=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,_J=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,fJ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,dJ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,hJ=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,pJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uJ(e):t==="fa"?_J(e):t==="ar"?fJ(e):t==="es"?dJ(e):t==="hi"?hJ(e):lJ(e)}),mJ=e=>`Overleaf — ${e==null?void 0:e.status}`,gJ=e=>`Overleaf — ${e==null?void 0:e.status}`,vJ=e=>`Overleaf — ${e==null?void 0:e.status}`,bJ=e=>`Overleaf — ${e==null?void 0:e.status}`,yJ=e=>`Overleaf — ${e==null?void 0:e.status}`,xJ=e=>`Overleaf — ${e==null?void 0:e.status}`,wJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gJ(e):t==="fa"?vJ(e):t==="ar"?bJ(e):t==="es"?yJ(e):t==="hi"?xJ(e):mJ(e)}),kJ=e=>`Preview /${e==null?void 0:e.name} skill`,SJ=e=>`预览 /${e==null?void 0:e.name} 技能`,CJ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,EJ=e=>`معاينة مهارة /${e==null?void 0:e.name}`,NJ=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,zJ=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,jJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SJ(e):t==="fa"?CJ(e):t==="ar"?EJ(e):t==="es"?NJ(e):t==="hi"?zJ(e):kJ(e)}),AJ=e=>`Remove annotation ${e==null?void 0:e.number}`,TJ=e=>`移除批注 ${e==null?void 0:e.number}`,RJ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,MJ=e=>`إزالة التعليق ${e==null?void 0:e.number}`,OJ=e=>`Quitar la anotación ${e==null?void 0:e.number}`,DJ=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,LJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TJ(e):t==="fa"?RJ(e):t==="ar"?MJ(e):t==="es"?OJ(e):t==="hi"?DJ(e):AJ(e)}),IJ=e=>`Remove ${e==null?void 0:e.name}`,$J=e=>`移除 ${e==null?void 0:e.name}`,BJ=e=>`حذف ${e==null?void 0:e.name}`,PJ=e=>`إزالة ${e==null?void 0:e.name}`,FJ=e=>`Quitar ${e==null?void 0:e.name}`,HJ=e=>`${e==null?void 0:e.name} हटाएं`,qJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$J(e):t==="fa"?BJ(e):t==="ar"?PJ(e):t==="es"?FJ(e):t==="hi"?HJ(e):IJ(e)}),UJ=e=>`Remove queued message: ${e==null?void 0:e.text}`,GJ=e=>`移除排队消息:${e==null?void 0:e.text}`,KJ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,VJ=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,WJ=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,QJ=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,XJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GJ(e):t==="fa"?KJ(e):t==="ar"?VJ(e):t==="es"?WJ(e):t==="hi"?QJ(e):UJ(e)}),YJ=e=>`Retry queued message: ${e==null?void 0:e.text}`,ZJ=e=>`重试排队消息:${e==null?void 0:e.text}`,JJ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,eee=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,tee=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,nee=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,ree=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZJ(e):t==="fa"?JJ(e):t==="ar"?eee(e):t==="es"?tee(e):t==="hi"?nee(e):YJ(e)}),see=e=>`Run ${e==null?void 0:e.value} in a terminal here`,iee=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,aee=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,oee=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,cee=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,lee=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,bN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iee(e):t==="fa"?aee(e):t==="ar"?oee(e):t==="es"?cee(e):t==="hi"?lee(e):see(e)}),uee=e=>`Run ${e==null?void 0:e.id}`,_ee=e=>`运行 ${e==null?void 0:e.id}`,fee=e=>`اجرای ${e==null?void 0:e.id}`,dee=e=>`تشغيل ${e==null?void 0:e.id}`,hee=e=>`Ejecución ${e==null?void 0:e.id}`,pee=e=>`रन ${e==null?void 0:e.id}`,mee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_ee(e):t==="fa"?fee(e):t==="ar"?dee(e):t==="es"?hee(e):t==="hi"?pee(e):uee(e)}),gee=e=>`Show error details for ${e==null?void 0:e.activity}`,vee=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,bee=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,yee=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,xee=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,wee=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,kee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vee(e):t==="fa"?bee(e):t==="ar"?yee(e):t==="es"?xee(e):t==="hi"?wee(e):gee(e)}),See=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,Cee=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,Eee=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,Nee=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,zee=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,jee=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,Aee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Cee(e):t==="fa"?Eee(e):t==="ar"?Nee(e):t==="es"?zee(e):t==="hi"?jee(e):See(e)}),Tee=e=>`${e==null?void 0:e.name} skill`,Ree=e=>`${e==null?void 0:e.name} 技能`,Mee=e=>`مهارت ${e==null?void 0:e.name}`,Oee=e=>`مهارة ${e==null?void 0:e.name}`,Dee=e=>`Skill ${e==null?void 0:e.name}`,Lee=e=>`${e==null?void 0:e.name} स्किल`,Iee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ree(e):t==="fa"?Mee(e):t==="ar"?Oee(e):t==="es"?Dee(e):t==="hi"?Lee(e):Tee(e)}),$ee=e=>`Value for ${e==null?void 0:e.name}`,Bee=e=>`${e==null?void 0:e.name} 的值`,Pee=e=>`مقدار ${e==null?void 0:e.name}`,Fee=e=>`قيمة ${e==null?void 0:e.name}`,Hee=e=>`Valor de ${e==null?void 0:e.name}`,qee=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,Uee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bee(e):t==="fa"?Pee(e):t==="ar"?Fee(e):t==="es"?Hee(e):t==="hi"?qee(e):$ee(e)}),Gee=()=>"Agent reported back",Kee=()=>"智能体已返回结果",Vee=()=>"عامل نتیجه را گزارش کرد",Wee=()=>"أبلغ الوكيل بالنتيجة",Qee=()=>"El agente informó de los resultados",Xee=()=>"एजेंट ने रिपोर्ट भेजी",Yee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kee():t==="fa"?Vee():t==="ar"?Wee():t==="es"?Qee():t==="hi"?Xee():Gee()}),Zee=()=>"Browse",Jee=()=>"浏览",ete=()=>"مرور",tte=()=>"تصفّح",nte=()=>"Navegar",rte=()=>"ब्राउज़ करें",ste=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jee():t==="fa"?ete():t==="ar"?tte():t==="es"?nte():t==="hi"?rte():Zee()}),ite=()=>"Browsing…",ate=()=>"正在浏览…",ote=()=>"در حال مرور…",cte=()=>"جارٍ التصفّح…",lte=()=>"Navegando…",ute=()=>"ब्राउज़ कर रहा है…",_te=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ate():t==="fa"?ote():t==="ar"?cte():t==="es"?lte():t==="hi"?ute():ite()}),fte=()=>"Checked experiment status and updated notes",dte=()=>"已检查实验状态并更新笔记",hte=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",pte=()=>"فحص حالة التجربة وحدّث الملاحظات",mte=()=>"Consultó el estado del experimento y actualizó las notas",gte=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",vte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dte():t==="fa"?hte():t==="ar"?pte():t==="es"?mte():t==="hi"?gte():fte()}),bte=()=>"Closed an agent",yte=()=>"已关闭智能体",xte=()=>"عامل بسته شد",wte=()=>"أغلق وكيلًا",kte=()=>"Cerró un agente",Ste=()=>"एक एजेंट बंद किया",Cte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yte():t==="fa"?xte():t==="ar"?wte():t==="es"?kte():t==="hi"?Ste():bte()}),Ete=()=>"Context compacted",Nte=()=>"上下文已压缩",zte=()=>"زمینه فشرده شد",jte=()=>"تم ضغط السياق",Ate=()=>"Contexto comprimido",Tte=()=>"कॉन्टेक्स्ट छोटा किया गया",Rte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nte():t==="fa"?zte():t==="ar"?jte():t==="es"?Ate():t==="hi"?Tte():Ete()}),Mte=()=>"Compacting conversation…",Ote=()=>"正在压缩对话…",Dte=()=>"در حال فشرده‌سازی گفت‌وگو…",Lte=()=>"جارٍ ضغط المحادثة…",Ite=()=>"Comprimiendo la conversación…",$te=()=>"बातचीत छोटी की जा रही है…",yN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ote():t==="fa"?Dte():t==="ar"?Lte():t==="es"?Ite():t==="hi"?$te():Mte()}),Bte=()=>"Compacting failed",Pte=()=>"压缩失败",Fte=()=>"فشرده‌سازی ناموفق بود",Hte=()=>"فشل الضغط",qte=()=>"Error al comprimir",Ute=()=>"छोटा करना विफल",Gte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pte():t==="fa"?Fte():t==="ar"?Hte():t==="es"?qte():t==="hi"?Ute():Bte()}),Kte=e=>`Created ${e==null?void 0:e.target}`,Vte=e=>`已创建 ${e==null?void 0:e.target}`,Wte=e=>`${e==null?void 0:e.target} ایجاد شد`,Qte=e=>`أنشأ ${e==null?void 0:e.target}`,Xte=e=>`Creó ${e==null?void 0:e.target}`,Yte=e=>`${e==null?void 0:e.target} बनाया`,Zte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vte(e):t==="fa"?Wte(e):t==="ar"?Qte(e):t==="es"?Xte(e):t==="hi"?Yte(e):Kte(e)}),Jte=()=>"Delegate",ene=()=>"委派",tne=()=>"واگذاری",nne=()=>"تفويض",rne=()=>"Delegar",sne=()=>"सौंपें",ine=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ene():t==="fa"?tne():t==="ar"?nne():t==="es"?rne():t==="hi"?sne():Jte()}),ane=()=>"Delegating…",one=()=>"正在委派…",cne=()=>"در حال واگذاری…",lne=()=>"جارٍ التفويض…",une=()=>"Delegando…",_ne=()=>"सौंप रहा है…",fne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?one():t==="fa"?cne():t==="ar"?lne():t==="es"?une():t==="hi"?_ne():ane()}),dne=e=>`Deleted ${e==null?void 0:e.target}`,hne=e=>`已删除 ${e==null?void 0:e.target}`,pne=e=>`${e==null?void 0:e.target} حذف شد`,mne=e=>`حذف ${e==null?void 0:e.target}`,gne=e=>`Eliminó ${e==null?void 0:e.target}`,vne=e=>`${e==null?void 0:e.target} हटाया`,bne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hne(e):t==="fa"?pne(e):t==="ar"?mne(e):t==="es"?gne(e):t==="hi"?vne(e):dne(e)}),yne=()=>"Edit",xne=()=>"编辑",wne=()=>"ویرایش",kne=()=>"تعديل",Sne=()=>"Editar",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=e=>`Edited ${e==null?void 0:e.target}`,zne=e=>`已编辑 ${e==null?void 0:e.target}`,jne=e=>`${e==null?void 0:e.target} ویرایش شد`,Ane=e=>`عدّل ${e==null?void 0:e.target}`,Tne=e=>`Editó ${e==null?void 0:e.target}`,Rne=e=>`${e==null?void 0:e.target} संपादित किया`,Mne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zne(e):t==="fa"?jne(e):t==="ar"?Ane(e):t==="es"?Tne(e):t==="hi"?Rne(e):Nne(e)}),One=()=>"Editing…",Dne=()=>"正在编辑…",Lne=()=>"در حال ویرایش…",Ine=()=>"جارٍ التعديل…",$ne=()=>"Editando…",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.activity} for “${e==null?void 0:e.query}”`,Hne=e=>`${e==null?void 0:e.activity}:“${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}”`,Kne=e=>`“${e==null?void 0:e.query}” के लिए ${e==null?void 0:e.activity}`,Vne=((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"?Kne(e):Fne(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} اجرا شد`,Kre=e=>`نفّذ ${e==null?void 0:e.command}`,Vre=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"?Kre(e):t==="es"?Vre(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} स्किल पढ़ी`,lw=((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} पढ़ा`,Vp=((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=()=>"در حال خواندن…",Kse=()=>"جارٍ القراءة…",Vse=()=>"Leyendo…",Wse=()=>"पढ़ रहा है…",Qse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Use():t==="fa"?Gse():t==="ar"?Kse():t==="es"?Vse():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…",Kie=()=>"正在运行…",Vie=()=>"در حال اجرا…",Wie=()=>"جارٍ التشغيل…",Qie=()=>"Ejecutando…",Xie=()=>"चल रहा है…",iL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kie():t==="fa"?Vie():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=()=>"कोड खोजा",uw=((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}” के लिए कोड खोजा`,_w=((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=()=>"已搜索文献",Kae=()=>"منابع علمی جست‌وجو شد",Vae=()=>"بحث في الأدبيات",Wae=()=>"Buscó en la literatura",Qae=()=>"साहित्य खोजा",xN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gae():t==="fa"?Kae():t==="ar"?Vae():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}” के लिए वेब खोजा`,wN=((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=()=>"已创建智能体",Koe=()=>"یک عامل ساخته شد",Voe=()=>"أنشأ وكيلًا",Woe=()=>"Creó un agente",Qoe=()=>"एक एजेंट शुरू किया",Xoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Goe():t==="fa"?Koe():t==="ar"?Voe():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}`,kN=((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.",Kce=()=>"可以继续。",Vce=()=>"ادامه در دسترس است.",Wce=()=>"المتابعة متاحة.",Qce=()=>"Puedes continuar.",Xce=()=>"जारी रखना उपलब्ध है।",Yce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kce():t==="fa"?Vce():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=()=>"आर्टिफ़ैक्ट",aL=((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()}),Kle=()=>"Close panel",Vle=()=>"关闭面板",Wle=()=>"بستن پنل",Qle=()=>"إغلاق اللوحة",Xle=()=>"Cerrar panel",Yle=()=>"पैनल बंद करें",I0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vle():t==="fa"?Wle():t==="ar"?Qle():t==="es"?Xle():t==="hi"?Yle():Kle()}),Zle=()=>"Current task",Jle=()=>"当前任务",eue=()=>"وظیفهٔ فعلی",tue=()=>"المهمة الحالية",nue=()=>"Tarea actual",rue=()=>"मौजूदा टास्क",SN=((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=()=>"पूरा प्रोजेक्ट",CN=((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=()=>"पैनल फैलाएं",EN=((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=()=>"实验",Kue=()=>"آزمایش‌ها",Vue=()=>"التجارب",Wue=()=>"Experimentos",Que=()=>"प्रयोग",oL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gue():t==="fa"?Kue():t==="ar"?Vue():t==="es"?Wue():t==="hi"?Que():Uue()}),Xue=()=>"Files",Yue=()=>"文件",Zue=()=>"فایل‌ها",Jue=()=>"الملفات",e_e=()=>"Archivos",t_e=()=>"फ़ाइलें",z3=((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=()=>"प्रोजेक्ट",v0=((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=()=>"पैनल वापस लाएं",NN=((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=()=>"إعادة المحاولة",K_e=()=>"Reintentar",V_e=()=>"फिर से कोशिश करें",ni=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q_e():t==="fa"?U_e():t==="ar"?G_e():t==="es"?K_e():t==="hi"?V_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}`,Kfe=e=>`طيّ ${e==null?void 0:e.name}`,Vfe=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"?Kfe(e):t==="es"?Vfe(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}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,gS=((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=()=>"Some folders could not be searched. Results may be incomplete.",Gde=()=>"部分文件夹无法搜索,结果可能不完整。",Kde=()=>"جستجو در برخی پوشه‌ها ممکن نبود. نتایج ممکن است ناقص باشند.",Vde=()=>"تعذر البحث في بعض المجلدات. قد تكون النتائج غير مكتملة.",Wde=()=>"No se pudieron buscar algunas carpetas. Los resultados pueden estar incompletos.",Qde=()=>"कुछ फ़ोल्डरों में खोज नहीं हो सकी। परिणाम अधूरे हो सकते हैं।",Xde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gde():t==="fa"?Kde():t==="ar"?Vde():t==="es"?Wde():t==="hi"?Qde():Ude()}),Yde=()=>"Load more results",Zde=()=>"加载更多结果",Jde=()=>"بارگیری نتایج بیشتر",ehe=()=>"تحميل المزيد من النتائج",the=()=>"Cargar más resultados",nhe=()=>"और परिणाम लोड करें",rhe=((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()}),she=()=>"No matching artifacts",ihe=()=>"没有匹配的产物",ahe=()=>"فایل منطبقی پیدا نشد",ohe=()=>"لا توجد ملفات مطابقة",che=()=>"No hay artefactos coincidentes",lhe=()=>"कोई मेल खाता आर्टिफ़ैक्ट नहीं मिला",uhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ihe():t==="fa"?ahe():t==="ar"?ohe():t==="es"?che():t==="hi"?lhe():she()}),_he=()=>"Search artifacts by name or path",fhe=()=>"按名称或路径搜索产物",dhe=()=>"جستجوی فایل‌ها بر اساس نام یا مسیر",hhe=()=>"البحث في الملفات حسب الاسم أو المسار",phe=()=>"Buscar artefactos por nombre o ruta",mhe=()=>"नाम या पथ से आर्टिफ़ैक्ट खोजें",zN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fhe():t==="fa"?dhe():t==="ar"?hhe():t==="es"?phe():t==="hi"?mhe():_he()}),ghe=()=>"Searching…",vhe=()=>"正在搜索…",bhe=()=>"در حال جستجو…",yhe=()=>"جارٍ البحث…",xhe=()=>"Buscando…",whe=()=>"खोज रहे हैं…",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=()=>"Click an artifact to view it",Che=()=>"点击产物即可查看",Ehe=()=>"برای مشاهده، یک خروجی را انتخاب کنید",Nhe=()=>"انقر على مُخرَج لعرضه",zhe=()=>"Selecciona un artefacto para verlo",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=()=>"Delete artifact",Rhe=()=>"删除产物",Mhe=()=>"حذف خروجی",Ohe=()=>"حذف المُخرَج",Dhe=()=>"Eliminar artefacto",Lhe=()=>"आर्टिफ़ैक्ट हटाएं",jN=((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=()=>"Delete folder",$he=()=>"删除文件夹",Bhe=()=>"حذف پوشه",Phe=()=>"حذف المجلد",Fhe=()=>"Eliminar carpeta",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=()=>"Failed to load:",Ghe=()=>"加载失败:",Khe=()=>"بارگیری ناموفق بود:",Vhe=()=>"تعذّر التحميل:",Whe=()=>"Error al cargar:",Qhe=()=>"लोड नहीं हो सका:",Xhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ghe():t==="fa"?Khe():t==="ar"?Vhe():t==="es"?Whe():t==="hi"?Qhe():Uhe()}),Yhe=()=>"File truncated — showing the first 512 KB.",Zhe=()=>"文件已截断——仅显示前 512 KB。",Jhe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",epe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",tpe=()=>"Archivo truncado — se muestran los primeros 512 KB.",npe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",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=()=>"Listing truncated — the folder has more artifacts.",ipe=()=>"列表已截断——文件夹中还有更多产物。",ape=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",ope=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",cpe=()=>"Listado truncado — la carpeta tiene más artefactos.",lpe=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",upe=((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()}),_pe=()=>"Loading…",fpe=()=>"正在加载…",dpe=()=>"در حال بارگیری…",hpe=()=>"جارٍ التحميل…",ppe=()=>"Cargando…",mpe=()=>"लोड हो रहा है…",cL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fpe():t==="fa"?dpe():t==="ar"?hpe():t==="es"?ppe():t==="hi"?mpe():_pe()}),gpe=()=>"Loading artifacts…",vpe=()=>"正在加载产物…",bpe=()=>"در حال بارگیری خروجی‌ها…",ype=()=>"جارٍ تحميل المُخرَجات…",xpe=()=>"Cargando artefactos…",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=()=>"Modified",Cpe=()=>"修改时间",Epe=()=>"ویرایش‌شده",Npe=()=>"عُدّل",zpe=()=>"Modificado",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=()=>"No artifacts yet",Rpe=()=>"尚无产物",Mpe=()=>"هنوز خروجی‌ای وجود ندارد",Ope=()=>"لا توجد مُخرَجات بعد",Dpe=()=>"Aún no hay artefactos",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=()=>"Open raw in new tab",Bpe=()=>"在新标签页中打开原始文件",Ppe=()=>"باز کردن فایل خام در زبانهٔ جدید",Fpe=()=>"فتح الملف الخام في تبويب جديد",Hpe=()=>"Abrir sin formato en una pestaña nueva",qpe=()=>"नए टैब में रॉ खोलें",AN=((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()}),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.",Gpe=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",Kpe=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",Vpe=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",Wpe=()=>"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.",Qpe=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",Xpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gpe():t==="fa"?Kpe():t==="ar"?Vpe():t==="es"?Wpe():t==="hi"?Qpe():Upe()}),Ype=()=>"File too large to preview inline.",Zpe=()=>"文件太大,无法内嵌预览。",Jpe=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",e0e=()=>"الملف كبير جدًا للمعاينة المضمّنة.",t0e=()=>"El archivo es demasiado grande para previsualizarlo.",n0e=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",r0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zpe():t==="fa"?Jpe():t==="ar"?e0e():t==="es"?t0e():t==="hi"?n0e():Ype()}),s0e=()=>"This is the baseline branch, so there is no parent comparison.",i0e=()=>"这是基线分支,因此没有父分支可供比较。",a0e=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",o0e=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",c0e=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",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=()=>"Failed to load changes:",f0e=()=>"加载更改失败:",d0e=()=>"بارگیری تغییرات ناموفق بود:",h0e=()=>"تعذّر تحميل التغييرات:",p0e=()=>"Error al cargar los cambios:",m0e=()=>"बदलाव लोड नहीं हो सके:",g0e=((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()}),v0e=()=>"Loading changes…",b0e=()=>"正在加载更改…",y0e=()=>"در حال بارگیری تغییرات…",x0e=()=>"جارٍ تحميل التغييرات…",w0e=()=>"Cargando cambios…",k0e=()=>"बदलाव लोड हो रहे हैं…",S0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b0e():t==="fa"?y0e():t==="ar"?x0e():t==="es"?w0e():t==="hi"?k0e():v0e()}),C0e=()=>"No committed changes from the parent branch.",E0e=()=>"与父分支相比没有已提交的更改。",N0e=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",z0e=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",j0e=()=>"No hay cambios confirmados respecto a la rama padre.",A0e=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",T0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E0e():t==="fa"?N0e():t==="ar"?z0e():t==="es"?j0e():t==="hi"?A0e():C0e()}),R0e=e=>`agent ${e==null?void 0:e.number}`,M0e=e=>`智能体 ${e==null?void 0:e.number}`,O0e=e=>`عامل ${e==null?void 0:e.number}`,D0e=e=>`وكيل ${e==null?void 0:e.number}`,L0e=e=>`agente ${e==null?void 0:e.number}`,I0e=e=>`एजेंट ${e==null?void 0:e.number}`,TN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?M0e(e):t==="fa"?O0e(e):t==="ar"?D0e(e):t==="es"?L0e(e):t==="hi"?I0e(e):R0e(e)}),$0e=()=>"agent sessions",B0e=()=>"智能体会话",P0e=()=>"نشست‌های عامل‌ها",F0e=()=>"جلسات الوكلاء",H0e=()=>"sesiones de agente",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=()=>"All sessions",K0e=()=>"所有会话",V0e=()=>"همهٔ نشست‌ها",W0e=()=>"كل الجلسات",Q0e=()=>"Todas las sesiones",X0e=()=>"सभी सेशन",lL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K0e():t==="fa"?V0e():t==="ar"?W0e():t==="es"?Q0e():t==="hi"?X0e():G0e()}),Y0e=e=>`${e==null?void 0:e.count} annotations`,Z0e=e=>`${e==null?void 0:e.count} 条批注`,J0e=e=>`${e==null?void 0:e.count} یادداشت`,eme=e=>`التعليقات: ${e==null?void 0:e.count}`,tme=e=>`${e==null?void 0:e.count} anotaciones`,nme=e=>`${e==null?void 0:e.count} एनोटेशन`,rme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Z0e(e):t==="fa"?J0e(e):t==="ar"?eme(e):t==="es"?tme(e):t==="hi"?nme(e):Y0e(e)}),sme=()=>"Archive",ime=()=>"归档",ame=()=>"بایگانی",ome=()=>"أرشفة",cme=()=>"Archivar",lme=()=>"आर्काइव करें",ume=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ime():t==="fa"?ame():t==="ar"?ome():t==="es"?cme():t==="hi"?lme():sme()}),_me=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",fme=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",dme=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",hme=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",pme=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",mme=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",gme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fme():t==="fa"?dme():t==="ar"?hme():t==="es"?pme():t==="hi"?mme():_me()}),vme=()=>"Asked about selected text",bme=()=>"已询问所选文本",yme=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",xme=()=>"سأل عن النص المحدد",wme=()=>"Preguntó sobre el texto seleccionado",kme=()=>"चयनित टेक्स्ट के बारे में पूछा",Sme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bme():t==="fa"?yme():t==="ar"?xme():t==="es"?wme():t==="hi"?kme():vme()}),Cme=()=>"Attachment",Eme=()=>"附件",Nme=()=>"پیوست",zme=()=>"مرفق",jme=()=>"Adjunto",Ame=()=>"अटैचमेंट",Tme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eme():t==="fa"?Nme():t==="ar"?zme():t==="es"?jme():t==="hi"?Ame():Cme()}),Rme=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,Mme=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,Ome=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,Dme=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,Lme=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,Ime=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,$me=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Mme(e):t==="fa"?Ome(e):t==="ar"?Dme(e):t==="es"?Lme(e):t==="hi"?Ime(e):Rme(e)}),Bme=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",Pme=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",Fme=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",Hme=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",qme=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",Ume=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",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()}),Kme=()=>"Wait for the turn to finish before running a command.",Vme=()=>"请等待本轮结束后再运行命令。",Wme=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",Qme=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",Xme=()=>"Espera a que termine el turno antes de ejecutar un comando.",Yme=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",Zme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vme():t==="fa"?Wme():t==="ar"?Qme():t==="es"?Xme():t==="hi"?Yme():Kme()}),Jme=e=>`Exited with code ${e==null?void 0:e.code}`,ege=e=>`退出码 ${e==null?void 0:e.code}`,tge=e=>`با کد ${e==null?void 0:e.code} خارج شد`,nge=e=>`خرج برمز ${e==null?void 0:e.code}`,rge=e=>`Terminó con el código ${e==null?void 0:e.code}`,sge=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,ige=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ege(e):t==="fa"?tge(e):t==="ar"?nge(e):t==="es"?rge(e):t==="hi"?sge(e):Jme(e)}),age=e=>`Command not run: ${e==null?void 0:e.error}`,oge=e=>`命令未运行:${e==null?void 0:e.error}`,cge=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,lge=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,uge=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,_ge=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,RN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oge(e):t==="fa"?cge(e):t==="ar"?lge(e):t==="es"?uge(e):t==="hi"?_ge(e):age(e)}),fge=()=>"Collapse tool activity",dge=()=>"折叠工具活动",hge=()=>"بستن فعالیت ابزارها",pge=()=>"طيّ نشاط الأداة",mge=()=>"Contraer actividad de herramientas",gge=()=>"टूल गतिविधि समेटें",vge=((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()}),bge=()=>"Wait for the turn to finish before compacting.",yge=()=>"请等待本轮结束后再压缩。",xge=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",wge=()=>"انتظر انتهاء الجولة قبل الضغط.",kge=()=>"Espera a que termine el turno antes de comprimir.",Sge=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",Cge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yge():t==="fa"?xge():t==="ar"?wge():t==="es"?kge():t==="hi"?Sge():bge()}),Ege=e=>`Compacting failed: ${e==null?void 0:e.error}`,Nge=e=>`压缩失败:${e==null?void 0:e.error}`,zge=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,jge=e=>`فشل الضغط: ${e==null?void 0:e.error}`,Age=e=>`Error al comprimir: ${e==null?void 0:e.error}`,Tge=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,Rge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nge(e):t==="fa"?zge(e):t==="ar"?jge(e):t==="es"?Age(e):t==="hi"?Tge(e):Ege(e)}),Mge=()=>"Continue",Oge=()=>"继续",Dge=()=>"ادامه",Lge=()=>"متابعة",Ige=()=>"Continuar",$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=()=>"Copy response",Fge=()=>"复制回复",Hge=()=>"کپی پاسخ",qge=()=>"نسخ الرد",Uge=()=>"Copiar respuesta",Gge=()=>"जवाब कॉपी करें",MN=((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=e=>`Delete “${e==null?void 0:e.title}”? + */var _N;function CQ(){if(_N)return nw;_N=1;var e=Nm(),n=SQ();function t(u,h){return u===h&&(u!==0||1/u===1/h)||u!==u&&h!==h}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 nw.useSyncExternalStoreWithSelector=function(u,h,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 b(j){if(!y){if(y=!0,x=j,j=p(j),m!==void 0&&k.hasValue){var A=k.value;if(m(A,j))return C=A}return C=j}if(A=C,r(x,j))return A;var z=p(j);return m!==void 0&&m(A,z)?(x=j,A):(x=j,C=z)}var y=!1,x,C,N=f===void 0?null:f;return[function(){return b(h())},N===null?void 0:function(){return b(N())}]},[h,f,p,m]);var v=s(u,w[0],w[1]);return a(function(){k.hasValue=!0,k.value=v},[v]),c(v),v},nw}var fN;function EQ(){return fN||(fN=1,tw.exports=CQ()),tw.exports}var PD=EQ();const NQ=Em(PD);function zQ(e,n){return e===n}function cc(e,n,t=zQ){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 PD.useSyncExternalStoreWithSelector(r,s,s,n,t)}var dN={};function fS(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=P_(t.current,s):s}}function Tf(e){const n=wi(),t=T.useContext(e.from?mQ:Lb),r=e.from??t,s=n.stores.getMatchStore(r),i=fS(e,n),a=cc(s,o=>o?i(o):dN);if(a!==dN)return a;(e.shouldThrow??!0)&&rS()}function FD(e){return Tf({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.loaderData):n.loaderData})}function HD(e){const{select:n,...t}=e;return Tf({...t,select:r=>n?n(r.loaderDeps):r.loaderDeps})}function qD(e){return Tf({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 UD(e){return Tf({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:n=>e.select?e.select(n.search):n.search})}function Ib(e){const n=wi();return T.useCallback(t=>n.navigate({...t,from:t.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,n])}function dS(e){return Tf({...e,select:n=>e.select?e.select(n.context):n.context})}function iw(e){const n=T.useRef(e);return Ou(n.current,e,{ignoreUndefined:!1})||(n.current=e),n.current}function jQ(e,n){return e[0]===n[0]&&e[1]===n[1]&&e[2]===n[2]}function AQ(e,n,t){if(e!=null&&e.external)return Cv(e.href,t)?void 0:e.href;if(!IQ(n)&&!(typeof n!="string"||n.indexOf(":")===-1))try{return new URL(n),Cv(n,t)?void 0:n}catch{}}function TQ(e,n,t,r,s,i){if(i)return!1;if(t!=null&&t.exact){if(!EW(e.pathname,n.pathname,r))return!1}else{const a=Nv(e.pathname,r),o=Nv(n.pathname,r);if(!(a.startsWith(o)&&(a.length===o.length||a[o.length]==="/")))return!1}return((t==null?void 0:t.includeSearch)??!0)&&!Ou(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 RQ(e,n){const t=wi(),r=cW(n),{activeProps:s,inactiveProps:i,activeOptions:a,to:o,preload:c,preloadDelay:u,preloadIntentProximity:h,hashScrollIntoView:f,replace:p,startTransition:m,resetScroll:w,viewTransition:k,children:v,target:b,disabled:y,style:x,className:C,onClick:N,onBlur:j,onFocus:A,onMouseEnter:z,onMouseLeave:M,onTouchStart:D,ignoreBlocker:I,params:B,search:G,hash:q,state:Q,mask:K,reloadDocument:Z,unsafeRelative:J,from:$,_fromLocation:L,...F}=e,U=LD(),H=iw(e.search),oe=iw(e.params),ae=iw(a),ue=T.useMemo(()=>e,[t,e.from,e._fromLocation,e.hash,e.to,H,oe,e.state,e.mask,e.unsafeRelative]),se=T.useCallback(Ie=>{const nt=t.buildLocation({_fromLocation:Ie,...ue}),ke=LQ(nt.maskedLocation?nt.maskedLocation.publicHref:nt.publicHref,nt.maskedLocation?nt.maskedLocation.external:nt.external,t.history,y),ge=AQ(ke,o,t.protocolAllowlist);return[ke==null?void 0:ke.href,ge,TQ(Ie,nt,ae,t.basepath,U,ge!==void 0)]},[ae,y,U,ue,t,o]),[V,ne,ce]=cc(t.stores.location,se,jQ),he=ce?Ch(s,{})??MQ:aw,me=ce?aw:Ch(i,{})??aw,Ae=[C,he.className,me.className].filter(Boolean).join(" "),Pe=(x||he.style||me.style)&&{...x,...he.style,...me.style},Ye=T.useRef(!1),Re=e.reloadDocument||ne||y?!1:c??t.options.defaultPreload,$e=u??t.options.defaultPreloadDelay??0,yt=T.useCallback(()=>{t.preloadRoute(ue).catch(Ie=>{console.warn(Ie),console.warn(_Q)})},[t,ue]),ot=T.useCallback(Ie=>{if(!Ie){ow(r);return}if(!(Ie.isIntersecting??Re==="intent")){Ie.isIntersecting===!1&&ow(r);return}if(!$e){yt();return}g0.has(r)||g0.set(r,setTimeout(()=>{g0.delete(r),yt()},$e))},[yt,r,Re,$e]);oW(r,ot,Re!=="viewport"),T.useEffect(()=>{Ye.current||Re==="render"&&(yt(),Ye.current=!0)},[yt,Re]);const Mt=Ie=>{const nt=Ie.currentTarget.getAttribute("target"),ke=b!==void 0?b:nt;!y&&!(Ie.metaKey||Ie.altKey||Ie.ctrlKey||Ie.shiftKey)&&!Ie.defaultPrevented&&(!ke||ke==="_self")&&Ie.button===0&&(Ie.preventDefault(),t.navigate({...ue,replace:p,resetScroll:w,hashScrollIntoView:f,startTransition:m,viewTransition:k,ignoreBlocker:I}))};if(ne)return{...F,ref:r,href:ne,...v&&{children:v},...b&&{target:b},...y&&{disabled:y},...x&&{style:x},...C&&{className:C},...N&&{onClick:N},...j&&{onBlur:j},...A&&{onFocus:A},...z&&{onMouseEnter:z},...M&&{onMouseLeave:M},...D&&{onTouchStart:D}};const jt=()=>{Re==="intent"&&yt()},Pt=()=>{Re==="intent"&&ow(r)};return{...F,...he,...me,href:V,ref:r,onClick:kd([N,Mt]),onBlur:kd([j,Pt]),onFocus:kd([A,ot]),onMouseEnter:kd([z,ot]),onMouseLeave:kd([M,Pt]),onTouchStart:kd([D,jt]),disabled:!!y,target:b,...Pe&&{style:Pe},...Ae&&{className:Ae},...y&&OQ,...ce&&DQ}}var aw={},MQ={className:"active"},OQ={role:"link","aria-disabled":!0},DQ={"data-status":"active","aria-current":"page"},g0=new WeakMap,ow=e=>{clearTimeout(g0.get(e)),g0.delete(e)},kd=e=>n=>{for(const t of e)if(t){if(n.defaultPrevented)return;t(n)}};function LQ(e,n,t,r){if(!r)return n?{href:e,external:!0}:{href:t.createHref(e)||"/",external:!1}}function IQ(e){if(typeof e!="string")return!1;const n=e.charCodeAt(0);return n===47?e.charCodeAt(1)!==47:n===46}var $b=T.forwardRef((e,n)=>{const{_asChild:t,...r}=e,{type:s,...i}=RQ(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)}),$Q=class extends DD{constructor(n){super(n),this.useMatch=t=>Tf({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>dS({...t,from:this.id}),this.useSearch=t=>UD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>qD({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>HD({...t,from:this.id}),this.useLoaderData=t=>FD({...t,from:this.id}),this.useNavigate=()=>Ib({from:this.fullPath}),this.Link=it.forwardRef((t,r)=>_.jsx($b,{ref:r,from:this.fullPath,...t}))}};function BQ(e){return new $Q(e)}function PQ(){return e=>HQ(e)}var FQ=class extends fQ{constructor(e){super(e),this.useMatch=n=>Tf({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>dS({...n,from:this.id}),this.useSearch=n=>UD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>qD({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>HD({...n,from:this.id}),this.useLoaderData=n=>FD({...n,from:this.id}),this.useNavigate=()=>Ib({from:this.fullPath}),this.Link=it.forwardRef((n,t)=>_.jsx($b,{ref:t,from:this.fullPath,...n}))}};function HQ(e){return new FQ(e)}function hc(e){return n=>{const t=BQ(n);return t.isRoot=!1,t}}function qQ(e){const n=wi(),t=`not-found-${cc(n.stores.location,r=>r.pathname)}-${cc(n.stores.status,r=>r)}`;return _.jsx(_S,{getResetKey:()=>t,onCatch:(r,s)=>{var i;if(Eh(r))(i=e.onCatch)==null||i.call(e,r,s);else throw r},errorComponent:({error:r})=>{var s;if(Eh(r))return(s=e.fallback)==null?void 0:s.call(e,r);throw r},children:e.children})}function UQ(){return _.jsx("p",{children:"Not Found"})}function Rd(e){return _.jsx(_.Fragment,{children:e.children})}function GD(e,n,t){return n.options.notFoundComponent?_.jsx(n.options.notFoundComponent,{...t}):e.options.defaultNotFoundComponent?_.jsx(e.options.defaultNotFoundComponent,{...t}):_.jsx(UQ,{})}function Bb(e,n){const t=(n==null?void 0:n.options.pendingComponent)??e.options.defaultPendingComponent;return t?_.jsx(t,{}):null}var GQ=(e,n)=>e[0]===n[0]&&e[1]===n[1],VD=(e,n,t)=>!n.isRoot||n.options.shellComponent||n.options.wrapInSuspense||t===!1||t==="data-only"||!e.ssr,KD=T.memo(function({routeId:n}){const t=wi();return _.jsx(VQ,{router:t,match:cc(t.stores.getMatchStore(n),r=>r)})});function VQ({router:e,match:n}){var f,p;const t=e.routesById[n.routeId],r=Bb(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=VD(e,t,n.ssr)&&(t.options.wrapInSuspense??r??(((p=t.options.errorComponent)==null?void 0:p.preload)||o))?T.Suspense:Rd,u=s?_S:Rd,h=a?qQ:Rd;return _.jsxs(t.isRoot?t.options.shellComponent??Rd:Rd,{children:[_.jsx(Lb.Provider,{value:n.routeId,children:_.jsx(c,{fallback:r,children:_.jsx(u,{getResetKey:()=>n,errorComponent:s,onCatch:(m,w)=>{if(Eh(m))throw m.routeId??(m.routeId=n.routeId),m;i==null||i(m,w)},children:_.jsx(h,{fallback:m=>{if(m.routeId??(m.routeId=n.routeId),m.routeId!==n.routeId)throw m;return T.createElement(a,m)},children:o?_.jsx(hQ,{fallback:r,children:_.jsx(hN,{match:n})}):_.jsx(hN,{match:n})})})})}),null]})}var hN=T.memo(function({match:n}){const t=wi(),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(O0,{})},[i,s.options.component,t.options.defaultComponent]);if(n.status==="pending"){if(t.ssr&&!VD(t,s,n.ssr))return a;if(t._tx)throw t._tx[5];return Bb(t,s)}if(n.status==="notFound")return GD(t,s,n.error);if(n.status==="error")throw n.error;return a}),O0=T.memo(function(){const n=wi(),t=T.useContext(Lb);let r,s,i;{const o=n.stores.getMatchStore(t);[r,s]=cc(o,c=>[!!c._notFound,c.error],GQ),i=cc(n.stores.ids,c=>c[c.indexOf(t)+1])}if(r)return GD(n,n.routesById[t],s);if(!i)return null;const a=_.jsx(KD,{routeId:i});return t===Wd?_.jsx(T.Suspense,{fallback:Bb(n),children:a}):a});function WD(e,n){const t=e[1];e.length=0,t==null||t(n)}function KQ({t:e}){const n=wi(),t=n._rendered??(n._rendered=[]);return n.startTransition=(r,s)=>new Promise(i=>{WD(t,!1),t.push(s,i),e(n),T.startTransition(r)}),gD(()=>{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(ll(s.publicHref)!==ll(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",...Ob(a,a)})}):n._tx||n.load({sync:!0}).catch(console.error),r},[n,n.history]),null}function WQ(){const e=wi(),n=e.routesById[Wd],t=Bb(e,n),r=e.ssr?Rd:T.Suspense,s=_.jsxs(_.Fragment,{children:[_.jsx(KQ,{t:T.useState()[1]}),_.jsx(r,{fallback:t,children:_.jsx(QQ,{})})]});return e.options.InnerWrap?_.jsx(e.options.InnerWrap,{children:s}):s}function QQ(){const e=wi(),n=e._rendered,t=cc(e.stores.matches,a=>n[0]??a),r=t[0],s=r==null?void 0:r.routeId;gD(()=>{n[0]===t&&WD(n,!0)},[n,t]);const i=s?_.jsx(KD,{routeId:s}):null;return _.jsx(Lb.Provider,{value:s,children:e.options.disableGlobalCatchBoundary?i:_.jsx(_S,{getResetKey:()=>r,onCatch:void 0,children:i})})}var XQ=e=>({createMutableStore:cN,createReadonlyStore:cN,batch:xQ}),YQ=e=>new ZQ(e),ZQ=class extends ZW{constructor(e){super(e,XQ)}};function JQ({router:e,children:n,...t}){bD(t)&&e.update({...e.options,...t,context:{...e.options.context,...t.context}});const r=_.jsx(ID.Provider,{value:e,children:n});return e.options.Wrap?_.jsx(e.options.Wrap,{children:r}):r}function eX({router:e,...n}){return _.jsx(JQ,{router:e,...n,children:_.jsx(WQ,{})})}function tX(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 nX(e,n){const{shouldBlockFn:t,enableBeforeUnload:r=!0,disabled:s=!1,withResolver:i=!1}=tX(e),a=wi(),{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 h=async f=>{function p(b){const y=a.parseLocation(b),[,x,C]=a.getMatchedRoutes(y.pathname);return C===void 0?{routeId:"__notFound__",fullPath:y.pathname,pathname:y.pathname,params:x,search:a.options.parseSearch(b.search)}:{routeId:C.id,fullPath:C.fullPath,pathname:y.pathname,params:x,search:a.options.parseSearch(b.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(b=>{u({status:"blocked",current:m,next:w,action:f.action,proceed:()=>b(!1),reset:()=>b(!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:h,enableBeforeUnload:r})},[t,r,s,i,o,a]),c}function QD(e){const n=wi({warn:(e==null?void 0:e.router)===void 0}),t=(e==null?void 0:e.router)||n;return cc(t.stores.__store,fS(e,t))}function rX(e){const n=wi();return cc(n.stores.location,fS(e,n))}const Tv=new WeakMap,tv=new WeakMap;function oo(e,n,t="*"){var r;for(const s of e.getQueryCache().findAll({queryKey:n}))Tv.set(s,(Tv.get(s)??0)+1),(r=tv.get(s))==null||r.add(t)}function jm(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 Vh(e,n,t,r=(s,i)=>i??s){const s=e.getQueryCache().find({queryKey:n,exact:!0}),i=s?Tv.get(s):void 0,a=await t();if(!s||Tv.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;tv.set(s,o);try{const c=await t();return o.size?r(c,e.getQueryData(n),o):c}finally{tv.get(s)===o&&tv.delete(s)}}const Nh=e=>typeof e=="string"&&/^[0-9a-f]{40}$/i.test(e);function XD(e){const n=e.queryKey[2];if(n==="resolvedFile")return Nh(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&&Nh(t.ref)}function Pa(e,n=xi(),t,r=!1){if(!zn(n))return;const s={queryKey:n,predicate:i=>e.includes(String(i.queryKey[2]))&&!XD(i)&&(!t||t(i))};r?tt.cancelQueries(s).then(()=>{zn(n)&&tt.invalidateQueries(s)}):tt.invalidateQueries(s)}const YD=["resolvedFile","getProjectFile","getArtifactFileText","getArtifactFileMetadata"],hS=["getArtifacts","getArtifactFileText","getArtifactFileMetadata","searchArtifacts","getFileLocation"],sX=["listProjects","listProjectActivity","listExperiments","listRuns","listChatSessions","getChatMessages","getHarnesses","getUpdateStatus",...hS,...YD,"getAbsoluteFile","fileVersion","getCodeTree","getSessionWorktree","getRunDiff","getExperimentDiff"];function iX(e,n=xi(),t=!1){const r=tt.getQueryData([...n,"listChatSessions",e])??[],s=tt.getQueryData([...n,"listRuns",e])??[],i=tt.getQueryData([...n,"listExperiments",e])??[];Pa([...YD,...hS,"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 Pb(e){const n=xi();bl.add(e),oo(tt,[...n,"listChatSessions"],e),tt.setQueriesData({queryKey:[...n,"listChatSessions"]},t=>t==null?void 0:t.filter(r=>r.id!==e));for(const t of["getChatMessages","getSessionWorktree"])nS({queryKey:[...n,t,e]})}function aX(e){const n=xi(),t=tt.getQueryData([...n,"listChatSessions",e]);for(const r of t??[])Pb(r.id);nS({queryKey:n,predicate:r=>r.queryKey.slice(3).includes(e)})}const oX={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 cX(e,n){var a;if(!zn(n))return;const t=(o,c=n,u)=>Pa(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(oX[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),tt.invalidateQueries({queryKey:["gateway","runtime"]});return}if(r.startsWith("/api/chat/")){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")){iX(o,n,!0);return}t(["listProjects","listProjectActivity"],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 lX={},uX="en",pS=["en","zh-CN","fa","ar","es","hi"],ZD="orx:locale",mS=["localStorage","preferredLanguage","baseLocale"],pN=[],D0=typeof window>"u";globalThis.__paraglide=globalThis.__paraglide??{};globalThis.__paraglide.ssr=globalThis.__paraglide.ssr??{};let mN=!1,E=()=>{var t;let e=mS;!D0&&typeof window<"u"&&((t=window.location)!=null&&t.href)&&(e=tL(window.location.href));const n=_X(e);if(n)return mN||(mN=!0,JD(n,{reload:!1})),n;throw new Error("No locale found. Read the docs https://paraglidejs.com/errors#no-locale-found")};function _X(e,n){let t;for(const r of e){if(r==="baseLocale")t=uX;else if(r==="preferredLanguage"&&!D0)t=mX();else if(r==="localStorage"&&!D0)t=localStorage.getItem(ZD)??void 0;else if(nL(r)&&Rv.has(r)){const i=Rv.get(r);if(i){const a=i.getLocale();if(a instanceof Promise)continue;if(a!==void 0)return hX(a)}}const s=L0(t);if(s)return s}}const fX=e=>{window.location.reload()};let JD=(e,n)=>{var o;const t={reload:!0,...n};let r;try{r=E()}catch{}const s=[];let i=mS;!D0&&typeof window<"u"&&((o=window.location)!=null&&o.href)&&(i=tL(window.location.href));for(const c of i)if(c!=="baseLocale"){if(c==="localStorage"&&typeof window<"u")localStorage.setItem(ZD,e);else if(nL(c)&&Rv.has(c)){const u=Rv.get(c);if(u){let h=u.setLocale(e);h instanceof Promise&&(h=h.catch(f=>{throw new Error(`Custom strategy "${c}" setLocale failed.`,{cause:f})}),s.push(h))}}}const a=()=>{!D0&&t.reload&&window.location&&e!==r&&fX()};if(s.length)return Promise.all(s).then(()=>{a()});a()},dX=()=>typeof window<"u"?window.location.origin:"http://fallback.com";function L0(e){if(typeof e!="string")return;const n=e.toLowerCase();for(const t of pS)if(t.toLowerCase()===n)return t}function eL(e){return!!e&&pS.some(n=>n===e)}function hX(e){const n=L0(e);if(n)return n;throw new Error(`Invalid locale: ${e}. Expected one of: ${pS.join(", ")}`)}function pX(e,n){return e.exec(n.href)}function mX(){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=L0(t.fullTag);if(r)return r;const s=L0(t.baseTag);if(s)return s}}function gX(e){return vX(e)}function vX(e){const n=typeof e=="string"?new URL(e,dX()):new URL(e),t=n.pathname.split("/").filter(Boolean);return t.length>0&&L0(t[0])&&(n.pathname="/"+t.slice(1).join("/")),n}let gN,vN;function bX(e){if(pN.length===0)return;const n=typeof e=="string"?e:e.href;if(gN===n)return vN;const t=new URL(n,"http://example.com"),r=gX(t),s=r.href===t.href?[t]:[t,r];let i;for(const a of s){for(const o of pN){const c=new lX(o.match,a.href);if(pX(c,a)){i=o;break}}if(i)break}return gN=n,vN=i,i}function tL(e){const n=bX(e);return n&&n.exclude!==!0&&Array.isArray(n.strategy)?n.strategy:mS}const Rv=new Map;function nL(e){return typeof e=="string"&&/^custom-[A-Za-z0-9_-]+$/.test(e)}const yX=e=>`Actions for ${e==null?void 0:e.name}`,xX=e=>`${e==null?void 0:e.name} 的操作`,wX=e=>`عملیات ${e==null?void 0:e.name}`,kX=e=>`إجراءات ${e==null?void 0:e.name}`,SX=e=>`Acciones para ${e==null?void 0:e.name}`,CX=e=>`${e==null?void 0:e.name} के लिए क्रियाएं`,EX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xX(e):t==="fa"?wX(e):t==="ar"?kX(e):t==="es"?SX(e):t==="hi"?CX(e):yX(e)}),NX=e=>`${e==null?void 0:e.path} — press Space to preview; double-click or press Enter to keep open in a tab`,zX=e=>`${e==null?void 0:e.path}——按空格键预览;双击或按 Enter 以在标签页中保持打开`,jX=e=>`${e==null?void 0:e.path} — برای پیش‌نمایش Space و برای باز نگه‌داشتن در زبانه دوبار کلیک کنید یا Enter را بزنید`,AX=e=>`${e==null?void 0:e.path} — اضغط المسافة للمعاينة؛ انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا في تبويب`,TX=e=>`${e==null?void 0:e.path} — pulsa Espacio para previsualizarlo; haz doble clic o pulsa Intro para mantenerlo abierto en una pestaña`,RX=e=>`${e==null?void 0:e.path} — पूर्वावलोकन के लिए स्पेस दबाएं; टैब में खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,MX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zX(e):t==="fa"?jX(e):t==="ar"?AX(e):t==="es"?TX(e):t==="hi"?RX(e):NX(e)}),OX=e=>`Branch: ${e==null?void 0:e.branch}`,DX=e=>`分支:${e==null?void 0:e.branch}`,LX=e=>`شاخه: ${e==null?void 0:e.branch}`,IX=e=>`الفرع: ${e==null?void 0:e.branch}`,$X=e=>`Rama: ${e==null?void 0:e.branch}`,BX=e=>`ब्रांच: ${e==null?void 0:e.branch}`,PX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DX(e):t==="fa"?LX(e):t==="ar"?IX(e):t==="es"?$X(e):t==="hi"?BX(e):OX(e)}),FX=e=>`Browse code on ${e==null?void 0:e.branch}`,HX=e=>`浏览分支 ${e==null?void 0:e.branch} 上的代码`,qX=e=>`مرور کد در شاخهٔ ${e==null?void 0:e.branch}`,UX=e=>`تصفّح الشيفرة على ${e==null?void 0:e.branch}`,GX=e=>`Explorar el código en ${e==null?void 0:e.branch}`,VX=e=>`${e==null?void 0:e.branch} पर कोड ब्राउज़ करें`,rL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HX(e):t==="fa"?qX(e):t==="ar"?UX(e):t==="es"?GX(e):t==="hi"?VX(e):FX(e)}),KX=e=>`Harness and model for this chat: ${e==null?void 0:e.label}`,WX=e=>`此聊天的智能体工具和模型:${e==null?void 0:e.label}`,QX=e=>`ابزار عامل و مدل این گفتگو: ${e==null?void 0:e.label}`,XX=e=>`أداة البرمجة والنموذج المستخدمان في هذه المحادثة: ${e==null?void 0:e.label}`,YX=e=>`Agente y modelo de este chat: ${e==null?void 0:e.label}`,ZX=e=>`इस चैट का हार्नेस और मॉडल: ${e==null?void 0:e.label}`,JX=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WX(e):t==="fa"?QX(e):t==="ar"?XX(e):t==="es"?YX(e):t==="hi"?ZX(e):KX(e)}),eY=e=>`Collapse ${e==null?void 0:e.name}`,tY=e=>`折叠 ${e==null?void 0:e.name}`,nY=e=>`بستن ${e==null?void 0:e.name}`,rY=e=>`طيّ ${e==null?void 0:e.name}`,sY=e=>`Contraer ${e==null?void 0:e.name}`,iY=e=>`${e==null?void 0:e.name} समेटें`,aY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tY(e):t==="fa"?nY(e):t==="ar"?rY(e):t==="es"?sY(e):t==="hi"?iY(e):eY(e)}),oY=e=>`Committed changes versus ${e==null?void 0:e.parent}`,cY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改`,lY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent}`,uY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent}`,_Y=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent}`,fY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव`,dY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cY(e):t==="fa"?lY(e):t==="ar"?uY(e):t==="es"?_Y(e):t==="hi"?fY(e):oY(e)}),hY=e=>`Committed changes versus ${e==null?void 0:e.parent} (diff truncated; counts are lower bounds)`,pY=e=>`与 ${e==null?void 0:e.parent} 相比的已提交更改(差异已截断,计数为下限)`,mY=e=>`تغییرات کامیت‌شده نسبت به ${e==null?void 0:e.parent} (تفاوت کوتاه شده و شمارش‌ها حد پایین‌اند)`,gY=e=>`التغييرات المودعة مقابل ${e==null?void 0:e.parent} (الفرق مقتطع؛ الأعداد حدود دنيا)`,vY=e=>`Cambios confirmados respecto a ${e==null?void 0:e.parent} (diff truncado; los recuentos son mínimos)`,bY=e=>`${e==null?void 0:e.parent} की तुलना में कमिट किए गए बदलाव (डिफ़ छोटा किया गया; संख्याएं न्यूनतम हैं)`,yY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pY(e):t==="fa"?mY(e):t==="ar"?gY(e):t==="es"?vY(e):t==="hi"?bY(e):hY(e)}),xY=e=>`Copy ${e==null?void 0:e.value}`,wY=e=>`复制 ${e==null?void 0:e.value}`,kY=e=>`کپی ${e==null?void 0:e.value}`,SY=e=>`نسخ ${e==null?void 0:e.value}`,CY=e=>`Copiar ${e==null?void 0:e.value}`,EY=e=>`${e==null?void 0:e.value} कॉपी करें`,NY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wY(e):t==="fa"?kY(e):t==="ar"?SY(e):t==="es"?CY(e):t==="hi"?EY(e):xY(e)}),zY=e=>`Delete ${e==null?void 0:e.name}`,jY=e=>`删除 ${e==null?void 0:e.name}`,AY=e=>`حذف ${e==null?void 0:e.name}`,TY=e=>`حذف ${e==null?void 0:e.name}`,RY=e=>`Eliminar ${e==null?void 0:e.name}`,MY=e=>`${e==null?void 0:e.name} हटाएं`,E3=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jY(e):t==="fa"?AY(e):t==="ar"?TY(e):t==="es"?RY(e):t==="hi"?MY(e):zY(e)}),OY=e=>`Download ${e==null?void 0:e.name}`,DY=e=>`下载 ${e==null?void 0:e.name}`,LY=e=>`بارگیری ${e==null?void 0:e.name}`,IY=e=>`تنزيل ${e==null?void 0:e.name}`,$Y=e=>`Descargar ${e==null?void 0:e.name}`,BY=e=>`${e==null?void 0:e.name} डाउनलोड करें`,Mv=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DY(e):t==="fa"?LY(e):t==="ar"?IY(e):t==="es"?$Y(e):t==="hi"?BY(e):OY(e)}),PY=e=>`Expand ${e==null?void 0:e.name}`,FY=e=>`展开 ${e==null?void 0:e.name}`,HY=e=>`باز کردن ${e==null?void 0:e.name}`,qY=e=>`توسيع ${e==null?void 0:e.name}`,UY=e=>`Expandir ${e==null?void 0:e.name}`,GY=e=>`${e==null?void 0:e.name} फैलाएं`,VY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FY(e):t==="fa"?HY(e):t==="ar"?qY(e):t==="es"?UY(e):t==="hi"?GY(e):PY(e)}),KY=e=>`Hide additional ${e==null?void 0:e.target}`,WY=e=>`隐藏其余${e==null?void 0:e.target}`,QY=e=>`پنهان کردن موارد بیشترِ ${e==null?void 0:e.target}`,XY=e=>`إخفاء ${e==null?void 0:e.target} الإضافية`,YY=e=>`Ocultar ${e==null?void 0:e.target} adicionales`,ZY=e=>`अतिरिक्त ${e==null?void 0:e.target} छिपाएं`,JY=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WY(e):t==="fa"?QY(e):t==="ar"?XY(e):t==="es"?YY(e):t==="hi"?ZY(e):KY(e)}),eZ=e=>`Hide error details for ${e==null?void 0:e.activity}`,tZ=e=>`隐藏 ${e==null?void 0:e.activity} 的错误详情`,nZ=e=>`پنهان کردن جزئیات خطای ${e==null?void 0:e.activity}`,rZ=e=>`إخفاء تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,sZ=e=>`Ocultar los detalles del error de ${e==null?void 0:e.activity}`,iZ=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण छिपाएं`,aZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tZ(e):t==="fa"?nZ(e):t==="ar"?rZ(e):t==="es"?sZ(e):t==="hi"?iZ(e):eZ(e)}),oZ=e=>`${e==null?void 0:e.count} consecutive identical calls`,cZ=e=>`连续 ${e==null?void 0:e.count} 次相同调用`,lZ=e=>`${e==null?void 0:e.count} فراخوانی یکسان پیاپی`,uZ=e=>`الاستدعاءات المتطابقة المتتالية: ${e==null?void 0:e.count}`,_Z=e=>`Llamadas idénticas consecutivas: ${e==null?void 0:e.count}`,fZ=e=>`${e==null?void 0:e.count} लगातार समान कॉल`,dZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cZ(e):t==="fa"?lZ(e):t==="ar"?uZ(e):t==="es"?_Z(e):t==="hi"?fZ(e):oZ(e)}),hZ=e=>`${e==null?void 0:e.name} — double-click or press Enter to keep open`,pZ=e=>`${e==null?void 0:e.name}——双击或按 Enter 以保持打开`,mZ=e=>`${e==null?void 0:e.name} — برای باز نگه‌داشتن دوبار کلیک کنید یا Enter را بزنید`,gZ=e=>`${e==null?void 0:e.name} — انقر نقرًا مزدوجًا أو اضغط Enter لإبقائه مفتوحًا`,vZ=e=>`${e==null?void 0:e.name} — haz doble clic o pulsa Intro para mantenerlo abierto`,bZ=e=>`${e==null?void 0:e.name} — खुला रखने के लिए डबल-क्लिक करें या Enter दबाएं`,yZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pZ(e):t==="fa"?mZ(e):t==="ar"?gZ(e):t==="es"?vZ(e):t==="hi"?bZ(e):hZ(e)}),xZ=e=>`Open ${e==null?void 0:e.branch} on GitHub`,wZ=e=>`在 GitHub 上打开 ${e==null?void 0:e.branch}`,kZ=e=>`باز کردن ${e==null?void 0:e.branch} در GitHub`,SZ=e=>`فتح ${e==null?void 0:e.branch} على GitHub`,CZ=e=>`Abrir ${e==null?void 0:e.branch} en GitHub`,EZ=e=>`${e==null?void 0:e.branch} को GitHub पर खोलें`,sL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wZ(e):t==="fa"?kZ(e):t==="ar"?SZ(e):t==="es"?CZ(e):t==="hi"?EZ(e):xZ(e)}),NZ=e=>`Open experiment ${e==null?void 0:e.name}`,zZ=e=>`打开实验 ${e==null?void 0:e.name}`,jZ=e=>`باز کردن آزمایش ${e==null?void 0:e.name}`,AZ=e=>`فتح التجربة ${e==null?void 0:e.name}`,TZ=e=>`Abrir el experimento ${e==null?void 0:e.name}`,RZ=e=>`${e==null?void 0:e.name} प्रयोग खोलें`,MZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zZ(e):t==="fa"?jZ(e):t==="ar"?AZ(e):t==="es"?TZ(e):t==="hi"?RZ(e):NZ(e)}),OZ=e=>`Open ${e==null?void 0:e.path} in the right pane`,DZ=e=>`在右侧面板中打开 ${e==null?void 0:e.path}`,LZ=e=>`باز کردن ${e==null?void 0:e.path} در پنل سمت راست`,IZ=e=>`فتح ${e==null?void 0:e.path} في الجزء الأيمن`,$Z=e=>`Abrir ${e==null?void 0:e.path} en el panel derecho`,BZ=e=>`${e==null?void 0:e.path} को दाएं पैनल में खोलें`,PZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DZ(e):t==="fa"?LZ(e):t==="ar"?IZ(e):t==="es"?$Z(e):t==="hi"?BZ(e):OZ(e)}),FZ=e=>`Open ${e==null?void 0:e.name}`,HZ=e=>`打开 ${e==null?void 0:e.name}`,qZ=e=>`باز کردن ${e==null?void 0:e.name}`,UZ=e=>`فتح ${e==null?void 0:e.name}`,GZ=e=>`Abrir ${e==null?void 0:e.name}`,VZ=e=>`${e==null?void 0:e.name} खोलें`,KZ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HZ(e):t==="fa"?qZ(e):t==="ar"?UZ(e):t==="es"?GZ(e):t==="hi"?VZ(e):FZ(e)}),WZ=e=>`Open logs for run ${e==null?void 0:e.run}`,QZ=e=>`打开运行 ${e==null?void 0:e.run} 的日志`,XZ=e=>`باز کردن گزارش‌های اجرای ${e==null?void 0:e.run}`,YZ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.run}`,ZZ=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.run}`,JZ=e=>`रन ${e==null?void 0:e.run} के लॉग खोलें`,eJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QZ(e):t==="fa"?XZ(e):t==="ar"?YZ(e):t==="es"?ZZ(e):t==="hi"?JZ(e):WZ(e)}),tJ=e=>`Open ${e==null?void 0:e.name} on GitHub`,nJ=e=>`在 GitHub 上打开 ${e==null?void 0:e.name}`,rJ=e=>`باز کردن ${e==null?void 0:e.name} در GitHub`,sJ=e=>`فتح ${e==null?void 0:e.name} على GitHub`,iJ=e=>`Abrir ${e==null?void 0:e.name} en GitHub`,aJ=e=>`${e==null?void 0:e.name} को GitHub पर खोलें`,Ov=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nJ(e):t==="fa"?rJ(e):t==="ar"?sJ(e):t==="es"?iJ(e):t==="hi"?aJ(e):tJ(e)}),oJ=e=>`Open logs for run ${e==null?void 0:e.id} in the right pane`,cJ=e=>`在右侧面板中打开运行 ${e==null?void 0:e.id} 的日志`,lJ=e=>`باز کردن گزارش اجرای ${e==null?void 0:e.id} در پنل سمت راست`,uJ=e=>`فتح سجلات التشغيل ${e==null?void 0:e.id} في الجزء الأيمن`,_J=e=>`Abrir los logs de la ejecución ${e==null?void 0:e.id} en el panel derecho`,fJ=e=>`दाएं पैनल में रन ${e==null?void 0:e.id} के लॉग खोलें`,dJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cJ(e):t==="fa"?lJ(e):t==="ar"?uJ(e):t==="es"?_J(e):t==="hi"?fJ(e):oJ(e)}),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=>`Overleaf — ${e==null?void 0:e.status}`,vJ=e=>`Overleaf — ${e==null?void 0:e.status}`,bJ=e=>`Overleaf — ${e==null?void 0:e.status}`,yJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pJ(e):t==="fa"?mJ(e):t==="ar"?gJ(e):t==="es"?vJ(e):t==="hi"?bJ(e):hJ(e)}),xJ=e=>`Preview /${e==null?void 0:e.name} skill`,wJ=e=>`预览 /${e==null?void 0:e.name} 技能`,kJ=e=>`پیش‌نمایش مهارت ‎/${e==null?void 0:e.name}`,SJ=e=>`معاينة مهارة /${e==null?void 0:e.name}`,CJ=e=>`Vista previa de la skill /${e==null?void 0:e.name}`,EJ=e=>`/${e==null?void 0:e.name} स्किल का पूर्वावलोकन करें`,NJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wJ(e):t==="fa"?kJ(e):t==="ar"?SJ(e):t==="es"?CJ(e):t==="hi"?EJ(e):xJ(e)}),zJ=e=>`Remove annotation ${e==null?void 0:e.number}`,jJ=e=>`移除批注 ${e==null?void 0:e.number}`,AJ=e=>`حذف یادداشت ${e==null?void 0:e.number}`,TJ=e=>`إزالة التعليق ${e==null?void 0:e.number}`,RJ=e=>`Quitar la anotación ${e==null?void 0:e.number}`,MJ=e=>`एनोटेशन ${e==null?void 0:e.number} हटाएं`,OJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jJ(e):t==="fa"?AJ(e):t==="ar"?TJ(e):t==="es"?RJ(e):t==="hi"?MJ(e):zJ(e)}),DJ=e=>`Remove ${e==null?void 0:e.name}`,LJ=e=>`移除 ${e==null?void 0:e.name}`,IJ=e=>`حذف ${e==null?void 0:e.name}`,$J=e=>`إزالة ${e==null?void 0:e.name}`,BJ=e=>`Quitar ${e==null?void 0:e.name}`,PJ=e=>`${e==null?void 0:e.name} हटाएं`,FJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LJ(e):t==="fa"?IJ(e):t==="ar"?$J(e):t==="es"?BJ(e):t==="hi"?PJ(e):DJ(e)}),HJ=e=>`Remove queued message: ${e==null?void 0:e.text}`,qJ=e=>`移除排队消息:${e==null?void 0:e.text}`,UJ=e=>`حذف پیام صف: ${e==null?void 0:e.text}`,GJ=e=>`إزالة الرسالة من قائمة الانتظار: ${e==null?void 0:e.text}`,VJ=e=>`Quitar el mensaje en cola: ${e==null?void 0:e.text}`,KJ=e=>`कतार में लगा संदेश हटाएं: ${e==null?void 0:e.text}`,WJ=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qJ(e):t==="fa"?UJ(e):t==="ar"?GJ(e):t==="es"?VJ(e):t==="hi"?KJ(e):HJ(e)}),QJ=e=>`Retry queued message: ${e==null?void 0:e.text}`,XJ=e=>`重试排队消息:${e==null?void 0:e.text}`,YJ=e=>`تلاش دوباره برای پیام صف: ${e==null?void 0:e.text}`,ZJ=e=>`إعادة محاولة إرسال الرسالة في قائمة الانتظار: ${e==null?void 0:e.text}`,JJ=e=>`Reintentar el mensaje en cola: ${e==null?void 0:e.text}`,eee=e=>`कतार में लगा संदेश फिर से भेजें: ${e==null?void 0:e.text}`,tee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XJ(e):t==="fa"?YJ(e):t==="ar"?ZJ(e):t==="es"?JJ(e):t==="hi"?eee(e):QJ(e)}),nee=e=>`Run ${e==null?void 0:e.value} in a terminal here`,ree=e=>`在此处的终端中运行 ${e==null?void 0:e.value}`,see=e=>`اجرای ${e==null?void 0:e.value} در ترمینال همین‌جا`,iee=e=>`تشغيل ${e==null?void 0:e.value} في طرفية هنا`,aee=e=>`Ejecutar ${e==null?void 0:e.value} en una terminal aquí`,oee=e=>`${e==null?void 0:e.value} को यहाँ टर्मिनल में चलाएँ`,bN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ree(e):t==="fa"?see(e):t==="ar"?iee(e):t==="es"?aee(e):t==="hi"?oee(e):nee(e)}),cee=e=>`Run ${e==null?void 0:e.id}`,lee=e=>`运行 ${e==null?void 0:e.id}`,uee=e=>`اجرای ${e==null?void 0:e.id}`,_ee=e=>`تشغيل ${e==null?void 0:e.id}`,fee=e=>`Ejecución ${e==null?void 0:e.id}`,dee=e=>`रन ${e==null?void 0:e.id}`,hee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lee(e):t==="fa"?uee(e):t==="ar"?_ee(e):t==="es"?fee(e):t==="hi"?dee(e):cee(e)}),pee=e=>`Show error details for ${e==null?void 0:e.activity}`,mee=e=>`显示 ${e==null?void 0:e.activity} 的错误详情`,gee=e=>`نمایش جزئیات خطای ${e==null?void 0:e.activity}`,vee=e=>`عرض تفاصيل الخطأ لـ ${e==null?void 0:e.activity}`,bee=e=>`Mostrar los detalles del error de ${e==null?void 0:e.activity}`,yee=e=>`${e==null?void 0:e.activity} के लिए त्रुटि विवरण दिखाएं`,xee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?mee(e):t==="fa"?gee(e):t==="ar"?vee(e):t==="es"?bee(e):t==="hi"?yee(e):pee(e)}),wee=e=>`Show ${e==null?void 0:e.count} more ${e==null?void 0:e.target}`,kee=e=>`再显示 ${e==null?void 0:e.count} 个${e==null?void 0:e.target}`,See=e=>`نمایش ${e==null?void 0:e.count} مورد دیگر از ${e==null?void 0:e.target}`,Cee=e=>`عرض المزيد من ${e==null?void 0:e.target} (${e==null?void 0:e.count})`,Eee=e=>`Mostrar ${e==null?void 0:e.count} ${e==null?void 0:e.target} más`,Nee=e=>`${e==null?void 0:e.count} और ${e==null?void 0:e.target} दिखाएं`,zee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kee(e):t==="fa"?See(e):t==="ar"?Cee(e):t==="es"?Eee(e):t==="hi"?Nee(e):wee(e)}),jee=e=>`${e==null?void 0:e.name} skill`,Aee=e=>`${e==null?void 0:e.name} 技能`,Tee=e=>`مهارت ${e==null?void 0:e.name}`,Ree=e=>`مهارة ${e==null?void 0:e.name}`,Mee=e=>`Skill ${e==null?void 0:e.name}`,Oee=e=>`${e==null?void 0:e.name} स्किल`,Dee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Aee(e):t==="fa"?Tee(e):t==="ar"?Ree(e):t==="es"?Mee(e):t==="hi"?Oee(e):jee(e)}),Lee=e=>`Value for ${e==null?void 0:e.name}`,Iee=e=>`${e==null?void 0:e.name} 的值`,$ee=e=>`مقدار ${e==null?void 0:e.name}`,Bee=e=>`قيمة ${e==null?void 0:e.name}`,Pee=e=>`Valor de ${e==null?void 0:e.name}`,Fee=e=>`${e==null?void 0:e.name} के लिए वैल्यू`,Hee=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Iee(e):t==="fa"?$ee(e):t==="ar"?Bee(e):t==="es"?Pee(e):t==="hi"?Fee(e):Lee(e)}),qee=()=>"Agent reported back",Uee=()=>"智能体已返回结果",Gee=()=>"عامل نتیجه را گزارش کرد",Vee=()=>"أبلغ الوكيل بالنتيجة",Kee=()=>"El agente informó de los resultados",Wee=()=>"एजेंट ने रिपोर्ट भेजी",Qee=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uee():t==="fa"?Gee():t==="ar"?Vee():t==="es"?Kee():t==="hi"?Wee():qee()}),Xee=()=>"Browse",Yee=()=>"浏览",Zee=()=>"مرور",Jee=()=>"تصفّح",ete=()=>"Navegar",tte=()=>"ब्राउज़ करें",nte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yee():t==="fa"?Zee():t==="ar"?Jee():t==="es"?ete():t==="hi"?tte():Xee()}),rte=()=>"Browsing…",ste=()=>"正在浏览…",ite=()=>"در حال مرور…",ate=()=>"جارٍ التصفّح…",ote=()=>"Navegando…",cte=()=>"ब्राउज़ कर रहा है…",lte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ste():t==="fa"?ite():t==="ar"?ate():t==="es"?ote():t==="hi"?cte():rte()}),ute=()=>"Checked experiment status and updated notes",_te=()=>"已检查实验状态并更新笔记",fte=()=>"وضعیت آزمایش بررسی و یادداشت‌ها به‌روز شد",dte=()=>"فحص حالة التجربة وحدّث الملاحظات",hte=()=>"Consultó el estado del experimento y actualizó las notas",pte=()=>"प्रयोग की स्थिति जाँची और नोट्स अपडेट किए",mte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_te():t==="fa"?fte():t==="ar"?dte():t==="es"?hte():t==="hi"?pte():ute()}),gte=()=>"Closed an agent",vte=()=>"已关闭智能体",bte=()=>"عامل بسته شد",yte=()=>"أغلق وكيلًا",xte=()=>"Cerró un agente",wte=()=>"एक एजेंट बंद किया",kte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vte():t==="fa"?bte():t==="ar"?yte():t==="es"?xte():t==="hi"?wte():gte()}),Ste=()=>"Context compacted",Cte=()=>"上下文已压缩",Ete=()=>"زمینه فشرده شد",Nte=()=>"تم ضغط السياق",zte=()=>"Contexto comprimido",jte=()=>"कॉन्टेक्स्ट छोटा किया गया",Ate=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cte():t==="fa"?Ete():t==="ar"?Nte():t==="es"?zte():t==="hi"?jte():Ste()}),Tte=()=>"Compacting conversation…",Rte=()=>"正在压缩对话…",Mte=()=>"در حال فشرده‌سازی گفت‌وگو…",Ote=()=>"جارٍ ضغط المحادثة…",Dte=()=>"Comprimiendo la conversación…",Lte=()=>"बातचीत छोटी की जा रही है…",yN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rte():t==="fa"?Mte():t==="ar"?Ote():t==="es"?Dte():t==="hi"?Lte():Tte()}),Ite=()=>"Compacting failed",$te=()=>"压缩失败",Bte=()=>"فشرده‌سازی ناموفق بود",Pte=()=>"فشل الضغط",Fte=()=>"Error al comprimir",Hte=()=>"छोटा करना विफल",qte=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$te():t==="fa"?Bte():t==="ar"?Pte():t==="es"?Fte():t==="hi"?Hte():Ite()}),Ute=e=>`Created ${e==null?void 0:e.target}`,Gte=e=>`已创建 ${e==null?void 0:e.target}`,Vte=e=>`${e==null?void 0:e.target} ایجاد شد`,Kte=e=>`أنشأ ${e==null?void 0:e.target}`,Wte=e=>`Creó ${e==null?void 0:e.target}`,Qte=e=>`${e==null?void 0:e.target} बनाया`,Xte=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gte(e):t==="fa"?Vte(e):t==="ar"?Kte(e):t==="es"?Wte(e):t==="hi"?Qte(e):Ute(e)}),Yte=()=>"Delegate",Zte=()=>"委派",Jte=()=>"واگذاری",ene=()=>"تفويض",tne=()=>"Delegar",nne=()=>"सौंपें",rne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zte():t==="fa"?Jte():t==="ar"?ene():t==="es"?tne():t==="hi"?nne():Yte()}),sne=()=>"Delegating…",ine=()=>"正在委派…",ane=()=>"در حال واگذاری…",one=()=>"جارٍ التفويض…",cne=()=>"Delegando…",lne=()=>"सौंप रहा है…",une=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ine():t==="fa"?ane():t==="ar"?one():t==="es"?cne():t==="hi"?lne():sne()}),_ne=e=>`Deleted ${e==null?void 0:e.target}`,fne=e=>`已删除 ${e==null?void 0:e.target}`,dne=e=>`${e==null?void 0:e.target} حذف شد`,hne=e=>`حذف ${e==null?void 0:e.target}`,pne=e=>`Eliminó ${e==null?void 0:e.target}`,mne=e=>`${e==null?void 0:e.target} हटाया`,gne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fne(e):t==="fa"?dne(e):t==="ar"?hne(e):t==="es"?pne(e):t==="hi"?mne(e):_ne(e)}),vne=()=>"Edit",bne=()=>"编辑",yne=()=>"ویرایش",xne=()=>"تعديل",wne=()=>"Editar",kne=()=>"संपादित करें",Sne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bne():t==="fa"?yne():t==="ar"?xne():t==="es"?wne():t==="hi"?kne():vne()}),Cne=e=>`Edited ${e==null?void 0:e.target}`,Ene=e=>`已编辑 ${e==null?void 0:e.target}`,Nne=e=>`${e==null?void 0:e.target} ویرایش شد`,zne=e=>`عدّل ${e==null?void 0:e.target}`,jne=e=>`Editó ${e==null?void 0:e.target}`,Ane=e=>`${e==null?void 0:e.target} संपादित किया`,Tne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ene(e):t==="fa"?Nne(e):t==="ar"?zne(e):t==="es"?jne(e):t==="hi"?Ane(e):Cne(e)}),Rne=()=>"Editing…",Mne=()=>"正在编辑…",One=()=>"در حال ویرایش…",Dne=()=>"جارٍ التعديل…",Lne=()=>"Editando…",Ine=()=>"संपादित कर रहा है…",$ne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mne():t==="fa"?One():t==="ar"?Dne():t==="es"?Lne():t==="hi"?Ine():Rne()}),Bne=e=>`${e==null?void 0:e.activity} for “${e==null?void 0:e.query}”`,Pne=e=>`${e==null?void 0:e.activity}:“${e==null?void 0:e.query}”`,Fne=e=>`${e==null?void 0:e.activity}: «${e==null?void 0:e.query}»`,Hne=e=>`${e==null?void 0:e.activity} عن «${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.query}” के लिए ${e==null?void 0:e.activity}`,Gne=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Pne(e):t==="fa"?Fne(e):t==="ar"?Hne(e):t==="es"?qne(e):t==="hi"?Une(e):Bne(e)}),Vne=()=>"Imported from your terminal — new turns continue in the agent's own history",Kne=()=>"从你的终端导入 — 新的回合将在智能体自己的历史中继续",Wne=()=>"از ترمینال شما وارد شد — نوبت‌های جدید در تاریخچهٔ خود عامل ادامه می‌یابند",Qne=()=>"مستورد من طرفيتك — الجولات الجديدة تتابع في سجل الوكيل نفسه",Xne=()=>"Importado desde tu terminal — los turnos nuevos continúan en el historial del agente",Yne=()=>"आपके टर्मिनल से इम्पोर्ट किया गया — नए टर्न एजेंट के अपने इतिहास में जारी रहेंगे",Zne=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kne():t==="fa"?Wne():t==="ar"?Qne():t==="es"?Xne():t==="hi"?Yne():Vne()}),Jne=e=>`Listed files matching ${e==null?void 0:e.pattern}`,ere=e=>`已列出与 ${e==null?void 0:e.pattern} 匹配的文件`,tre=e=>`فایل‌های مطابق ${e==null?void 0:e.pattern} فهرست شد`,nre=e=>`سرد الملفات المطابقة لـ ${e==null?void 0:e.pattern}`,rre=e=>`Listó archivos que coinciden con ${e==null?void 0:e.pattern}`,sre=e=>`${e==null?void 0:e.pattern} से मेल खाती फ़ाइलों की सूची बनाई`,ire=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ere(e):t==="fa"?tre(e):t==="ar"?nre(e):t==="es"?rre(e):t==="hi"?sre(e):Jne(e)}),are=()=>"Load",ore=()=>"加载",cre=()=>"بارگیری",lre=()=>"تحميل",ure=()=>"Cargar",_re=()=>"लोड करें",fre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ore():t==="fa"?cre():t==="ar"?lre():t==="es"?ure():t==="hi"?_re():are()}),dre=()=>"Loaded a skill",hre=()=>"已加载技能",pre=()=>"یک مهارت بارگیری شد",mre=()=>"حمّل مهارة",gre=()=>"Cargó una skill",vre=()=>"एक स्किल लोड की",bre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hre():t==="fa"?pre():t==="ar"?mre():t==="es"?gre():t==="hi"?vre():dre()}),yre=e=>`Loaded ${e==null?void 0:e.name} skill`,xre=e=>`已加载技能 ${e==null?void 0:e.name}`,wre=e=>`مهارت ${e==null?void 0:e.name} بارگیری شد`,kre=e=>`حمّل مهارة ${e==null?void 0:e.name}`,Sre=e=>`Cargó la skill ${e==null?void 0:e.name}`,Cre=e=>`${e==null?void 0:e.name} स्किल लोड की`,Ere=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xre(e):t==="fa"?wre(e):t==="ar"?kre(e):t==="es"?Sre(e):t==="hi"?Cre(e):yre(e)}),Nre=()=>"Loading…",zre=()=>"正在加载…",jre=()=>"در حال بارگیری…",Are=()=>"جارٍ التحميل…",Tre=()=>"Cargando…",Rre=()=>"लोड हो रहा है…",Mre=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zre():t==="fa"?jre():t==="ar"?Are():t==="es"?Tre():t==="hi"?Rre():Nre()}),Ore=e=>`Opened ${e==null?void 0:e.target}`,Dre=e=>`已打开 ${e==null?void 0:e.target}`,Lre=e=>`${e==null?void 0:e.target} باز شد`,Ire=e=>`فتح ${e==null?void 0:e.target}`,$re=e=>`Abrió ${e==null?void 0:e.target}`,Bre=e=>`${e==null?void 0:e.target} खोला`,Pre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Dre(e):t==="fa"?Lre(e):t==="ar"?Ire(e):t==="es"?$re(e):t==="hi"?Bre(e):Ore(e)}),Fre=e=>`Ran ${e==null?void 0:e.command}`,Hre=e=>`已运行 ${e==null?void 0:e.command}`,qre=e=>`${e==null?void 0:e.command} اجرا شد`,Ure=e=>`نفّذ ${e==null?void 0:e.command}`,Gre=e=>`Ejecutó ${e==null?void 0:e.command}`,Vre=e=>`${e==null?void 0:e.command} चलाया`,Kre=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hre(e):t==="fa"?qre(e):t==="ar"?Ure(e):t==="es"?Gre(e):t==="hi"?Vre(e):Fre(e)}),Wre=()=>"Ran a sub-agent",Qre=()=>"已运行子智能体",Xre=()=>"یک عامل فرعی اجرا شد",Yre=()=>"شغّل وكيلًا فرعيًا",Zre=()=>"Ejecutó un subagente",Jre=()=>"एक सब-एजेंट चलाया",ese=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qre():t==="fa"?Xre():t==="ar"?Yre():t==="es"?Zre():t==="hi"?Jre():Wre()}),tse=()=>"Read",nse=()=>"读取",rse=()=>"خواندن",sse=()=>"قراءة",ise=()=>"Leer",ase=()=>"पढ़ें",ose=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nse():t==="fa"?rse():t==="ar"?sse():t==="es"?ise():t==="hi"?ase():tse()}),cse=()=>"Read experiment notes",lse=()=>"已读取实验笔记",use=()=>"یادداشت‌های آزمایش خوانده شد",_se=()=>"قرأ ملاحظات التجربة",fse=()=>"Leyó las notas del experimento",dse=()=>"प्रयोग के नोट्स पढ़े",hse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lse():t==="fa"?use():t==="ar"?_se():t==="es"?fse():t==="hi"?dse():cse()}),pse=()=>"Read a paper",mse=()=>"已读取论文",gse=()=>"یک مقاله خوانده شد",vse=()=>"قرأ ورقة",bse=()=>"Leyó un paper",yse=()=>"एक पेपर पढ़ा",xse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mse():t==="fa"?gse():t==="ar"?vse():t==="es"?bse():t==="hi"?yse():pse()}),wse=e=>`Read ${e==null?void 0:e.name} skill`,kse=e=>`已读取技能 ${e==null?void 0:e.name}`,Sse=e=>`مهارت ${e==null?void 0:e.name} خوانده شد`,Cse=e=>`قرأ مهارة ${e==null?void 0:e.name}`,Ese=e=>`Leyó la skill ${e==null?void 0:e.name}`,Nse=e=>`${e==null?void 0:e.name} स्किल पढ़ी`,cw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kse(e):t==="fa"?Sse(e):t==="ar"?Cse(e):t==="es"?Ese(e):t==="hi"?Nse(e):wse(e)}),zse=e=>`Read ${e==null?void 0:e.target}`,jse=e=>`已读取 ${e==null?void 0:e.target}`,Ase=e=>`${e==null?void 0:e.target} خوانده شد`,Tse=e=>`قرأ ${e==null?void 0:e.target}`,Rse=e=>`Leyó ${e==null?void 0:e.target}`,Mse=e=>`${e==null?void 0:e.target} पढ़ा`,Kp=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jse(e):t==="fa"?Ase(e):t==="ar"?Tse(e):t==="es"?Rse(e):t==="hi"?Mse(e):zse(e)}),Ose=()=>"Read a web page",Dse=()=>"已读取网页",Lse=()=>"یک صفحهٔ وب خوانده شد",Ise=()=>"قرأ صفحة ويب",$se=()=>"Leyó una página web",Bse=()=>"एक वेब पेज पढ़ा",Pse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dse():t==="fa"?Lse():t==="ar"?Ise():t==="es"?$se():t==="hi"?Bse():Ose()}),Fse=()=>"Reading…",Hse=()=>"正在读取…",qse=()=>"در حال خواندن…",Use=()=>"جارٍ القراءة…",Gse=()=>"Leyendo…",Vse=()=>"पढ़ रहा है…",Kse=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hse():t==="fa"?qse():t==="ar"?Use():t==="es"?Gse():t==="hi"?Vse():Fse()}),Wse=()=>"Resumed an agent",Qse=()=>"已恢复智能体",Xse=()=>"عامل از سر گرفته شد",Yse=()=>"استأنف عمل وكيل",Zse=()=>"Reanudó un agente",Jse=()=>"एक एजेंट फिर से शुरू किया",eie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qse():t==="fa"?Xse():t==="ar"?Yse():t==="es"?Zse():t==="hi"?Jse():Wse()}),tie=()=>"Review",nie=()=>"查看",rie=()=>"بازبینی",sie=()=>"مراجعة",iie=()=>"Revisar",aie=()=>"समीक्षा करें",oie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nie():t==="fa"?rie():t==="ar"?sie():t==="es"?iie():t==="hi"?aie():tie()}),cie=()=>"Reviewed run log",lie=()=>"已查看运行日志",uie=()=>"گزارش اجرا بازبینی شد",_ie=()=>"راجع سجل التشغيل",fie=()=>"Revisó el log de la ejecución",die=()=>"रन लॉग की समीक्षा की",hie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lie():t==="fa"?uie():t==="ar"?_ie():t==="es"?fie():t==="hi"?die():cie()}),pie=()=>"Reviewed run logs",mie=()=>"已查看运行日志",gie=()=>"گزارش‌های اجرا بازبینی شد",vie=()=>"راجع سجلات التشغيل",bie=()=>"Revisó los logs de las ejecuciones",yie=()=>"रन लॉग की समीक्षा की",xie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mie():t==="fa"?gie():t==="ar"?vie():t==="es"?bie():t==="hi"?yie():pie()}),wie=()=>"Reviewed experiment status and notes",kie=()=>"已查看实验状态和笔记",Sie=()=>"وضعیت و یادداشت‌های آزمایش بازبینی شد",Cie=()=>"راجع حالة التجربة وملاحظاتها",Eie=()=>"Revisó el estado y las notas del experimento",Nie=()=>"प्रयोग की स्थिति और नोट्स की समीक्षा की",zie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kie():t==="fa"?Sie():t==="ar"?Cie():t==="es"?Eie():t==="hi"?Nie():wie()}),jie=()=>"Reviewing…",Aie=()=>"正在查看…",Tie=()=>"در حال بازبینی…",Rie=()=>"جارٍ المراجعة…",Mie=()=>"Revisando…",Oie=()=>"समीक्षा कर रहा है…",Die=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aie():t==="fa"?Tie():t==="ar"?Rie():t==="es"?Mie():t==="hi"?Oie():jie()}),Lie=()=>"Run",Iie=()=>"运行",$ie=()=>"اجرا",Bie=()=>"تشغيل",Pie=()=>"Ejecutar",Fie=()=>"चलाएं",Hie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iie():t==="fa"?$ie():t==="ar"?Bie():t==="es"?Pie():t==="hi"?Fie():Lie()}),qie=()=>"Running…",Uie=()=>"正在运行…",Gie=()=>"در حال اجرا…",Vie=()=>"جارٍ التشغيل…",Kie=()=>"Ejecutando…",Wie=()=>"चल रहा है…",iL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uie():t==="fa"?Gie():t==="ar"?Vie():t==="es"?Kie():t==="hi"?Wie():qie()}),Qie=()=>"Search",Xie=()=>"搜索",Yie=()=>"جست‌وجو",Zie=()=>"بحث",Jie=()=>"Buscar",eae=()=>"खोजें",tae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xie():t==="fa"?Yie():t==="ar"?Zie():t==="es"?Jie():t==="hi"?eae():Qie()}),nae=()=>"Searched alphaXiv full text",rae=()=>"已搜索 alphaXiv 全文",sae=()=>"متن کامل alphaXiv جست‌وجو شد",iae=()=>"بحث في نص alphaXiv الكامل",aae=()=>"Buscó en el texto completo de alphaXiv",oae=()=>"alphaXiv का पूरा टेक्स्ट खोजा",cae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rae():t==="fa"?sae():t==="ar"?iae():t==="es"?aae():t==="hi"?oae():nae()}),lae=()=>"Searched alphaXiv semantically",uae=()=>"已对 alphaXiv 进行语义搜索",_ae=()=>"جست‌وجوی معنایی در alphaXiv انجام شد",fae=()=>"أجرى بحثًا دلاليًا في alphaXiv",dae=()=>"Hizo una búsqueda semántica en alphaXiv",hae=()=>"alphaXiv को सिमेंटिक रूप से खोजा",pae=((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()}),mae=()=>"Searched bioRxiv",gae=()=>"已搜索 bioRxiv",vae=()=>"bioRxiv جست‌وجو شد",bae=()=>"بحث في bioRxiv",yae=()=>"Buscó en bioRxiv",xae=()=>"bioRxiv खोजा",wae=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gae():t==="fa"?vae():t==="ar"?bae():t==="es"?yae():t==="hi"?xae():mae()}),kae=()=>"Searched code",Sae=()=>"已搜索代码",Cae=()=>"کد جست‌وجو شد",Eae=()=>"بحث في الشيفرة",Nae=()=>"Buscó en el código",zae=()=>"कोड खोजा",lw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sae():t==="fa"?Cae():t==="ar"?Eae():t==="es"?Nae():t==="hi"?zae():kae()}),jae=e=>`Searched code for “${e==null?void 0:e.pattern}”`,Aae=e=>`已在代码中搜索“${e==null?void 0:e.pattern}”`,Tae=e=>`کد برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Rae=e=>`بحث في الشيفرة عن «${e==null?void 0:e.pattern}»`,Mae=e=>`Buscó “${e==null?void 0:e.pattern}” en el código`,Oae=e=>`“${e==null?void 0:e.pattern}” के लिए कोड खोजा`,uw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Aae(e):t==="fa"?Tae(e):t==="ar"?Rae(e):t==="es"?Mae(e):t==="hi"?Oae(e):jae(e)}),Dae=e=>`Searched images for “${e==null?void 0:e.query}”`,Lae=e=>`已搜索图片“${e==null?void 0:e.query}”`,Iae=e=>`تصاویر برای «${e==null?void 0:e.query}» جست‌وجو شد`,$ae=e=>`بحث في الصور عن «${e==null?void 0:e.query}»`,Bae=e=>`Buscó imágenes de “${e==null?void 0:e.query}”`,Pae=e=>`“${e==null?void 0:e.query}” के लिए इमेज खोजीं`,Fae=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lae(e):t==="fa"?Iae(e):t==="ar"?$ae(e):t==="es"?Bae(e):t==="hi"?Pae(e):Dae(e)}),Hae=()=>"Searched the literature",qae=()=>"已搜索文献",Uae=()=>"منابع علمی جست‌وجو شد",Gae=()=>"بحث في الأدبيات",Vae=()=>"Buscó en la literatura",Kae=()=>"साहित्य खोजा",xN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qae():t==="fa"?Uae():t==="ar"?Gae():t==="es"?Vae():t==="hi"?Kae():Hae()}),Wae=e=>`Searched “${e==null?void 0:e.pattern}” on a page`,Qae=e=>`已在页面中搜索“${e==null?void 0:e.pattern}”`,Xae=e=>`صفحه برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Yae=e=>`بحث عن «${e==null?void 0:e.pattern}» في صفحة`,Zae=e=>`Buscó “${e==null?void 0:e.pattern}” en una página`,Jae=e=>`पेज पर “${e==null?void 0:e.pattern}” खोजा`,eoe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qae(e):t==="fa"?Xae(e):t==="ar"?Yae(e):t==="es"?Zae(e):t==="hi"?Jae(e):Wae(e)}),toe=()=>"Searched OpenAlex",noe=()=>"已搜索 OpenAlex",roe=()=>"OpenAlex جست‌وجو شد",soe=()=>"بحث في OpenAlex",ioe=()=>"Buscó en OpenAlex",aoe=()=>"OpenAlex खोजा",ooe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?noe():t==="fa"?roe():t==="ar"?soe():t==="es"?ioe():t==="hi"?aoe():toe()}),coe=()=>"Searched PubMed",loe=()=>"已搜索 PubMed",uoe=()=>"PubMed جست‌وجو شد",_oe=()=>"بحث في PubMed",foe=()=>"Buscó en PubMed",doe=()=>"PubMed खोजा",hoe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?loe():t==="fa"?uoe():t==="ar"?_oe():t==="es"?foe():t==="hi"?doe():coe()}),poe=e=>`Searched the web for “${e==null?void 0:e.query}”`,moe=e=>`已在网页中搜索“${e==null?void 0:e.query}”`,goe=e=>`وب برای «${e==null?void 0:e.query}» جست‌وجو شد`,voe=e=>`بحث في الويب عن «${e==null?void 0:e.query}»`,boe=e=>`Buscó “${e==null?void 0:e.query}” en la web`,yoe=e=>`“${e==null?void 0:e.query}” के लिए वेब खोजा`,wN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?moe(e):t==="fa"?goe(e):t==="ar"?voe(e):t==="es"?boe(e):t==="hi"?yoe(e):poe(e)}),xoe=e=>`Searched a web page for “${e==null?void 0:e.pattern}”`,woe=e=>`已在网页中搜索“${e==null?void 0:e.pattern}”`,koe=e=>`صفحهٔ وب برای «${e==null?void 0:e.pattern}» جست‌وجو شد`,Soe=e=>`بحث في صفحة ويب عن «${e==null?void 0:e.pattern}»`,Coe=e=>`Buscó “${e==null?void 0:e.pattern}” en una página web`,Eoe=e=>`“${e==null?void 0:e.pattern}” के लिए एक वेब पेज खोजा`,Noe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?woe(e):t==="fa"?koe(e):t==="ar"?Soe(e):t==="es"?Coe(e):t==="hi"?Eoe(e):xoe(e)}),zoe=()=>"Searching…",joe=()=>"正在搜索…",Aoe=()=>"در حال جست‌وجو…",Toe=()=>"جارٍ البحث…",Roe=()=>"Buscando…",Moe=()=>"खोज रहा है…",Ooe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?joe():t==="fa"?Aoe():t==="ar"?Toe():t==="es"?Roe():t==="hi"?Moe():zoe()}),Doe=()=>"Sent input to an agent",Loe=()=>"已向智能体发送输入",Ioe=()=>"ورودی به عامل فرستاده شد",$oe=()=>"أرسل مدخلًا إلى وكيل",Boe=()=>"Envió información a un agente",Poe=()=>"एक एजेंट को इनपुट भेजा",Foe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Loe():t==="fa"?Ioe():t==="ar"?$oe():t==="es"?Boe():t==="hi"?Poe():Doe()}),Hoe=()=>"Spawned an agent",qoe=()=>"已创建智能体",Uoe=()=>"یک عامل ساخته شد",Goe=()=>"أنشأ وكيلًا",Voe=()=>"Creó un agente",Koe=()=>"एक एजेंट शुरू किया",Woe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qoe():t==="fa"?Uoe():t==="ar"?Goe():t==="es"?Voe():t==="hi"?Koe():Hoe()}),Qoe=()=>"Sub-agent",Xoe=()=>"子智能体",Yoe=()=>"عامل فرعی",Zoe=()=>"وكيل فرعي",Joe=()=>"Subagente",ece=()=>"सब-एजेंट",tce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xoe():t==="fa"?Yoe():t==="ar"?Zoe():t==="es"?Joe():t==="hi"?ece():Qoe()}),nce=()=>"Sub-agent interrupted",rce=()=>"子智能体已中断",sce=()=>"عامل فرعی متوقف شد",ice=()=>"قُوطع الوكيل الفرعي",ace=()=>"Subagente interrumpido",oce=()=>"सब-एजेंट बाधित हुआ",cce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rce():t==="fa"?sce():t==="ar"?ice():t==="es"?ace():t==="hi"?oce():nce()}),lce=()=>"Sub-agent started",uce=()=>"子智能体已启动",_ce=()=>"عامل فرعی آغاز شد",fce=()=>"بدأ الوكيل الفرعي",dce=()=>"Subagente iniciado",hce=()=>"सब-एजेंट शुरू हुआ",pce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uce():t==="fa"?_ce():t==="ar"?fce():t==="es"?dce():t==="hi"?hce():lce()}),mce=()=>"Updated experiment notes",gce=()=>"已更新实验笔记",vce=()=>"یادداشت‌های آزمایش به‌روز شد",bce=()=>"حدّث ملاحظات التجربة",yce=()=>"Actualizó las notas del experimento",xce=()=>"प्रयोग के नोट्स अपडेट किए",wce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gce():t==="fa"?vce():t==="ar"?bce():t==="es"?yce():t==="hi"?xce():mce()}),kce=()=>"Waiting on an agent",Sce=()=>"正在等待智能体",Cce=()=>"در انتظار عامل",Ece=()=>"في انتظار وكيل",Nce=()=>"Esperando a un agente",zce=()=>"एजेंट का इंतज़ार है",jce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sce():t==="fa"?Cce():t==="ar"?Ece():t==="es"?Nce():t==="hi"?zce():kce()}),Ace=e=>`Approval required: ${e==null?void 0:e.label}`,Tce=e=>`需要批准:${e==null?void 0:e.label}`,Rce=e=>`نیازمند تأیید: ${e==null?void 0:e.label}`,Mce=e=>`الموافقة مطلوبة: ${e==null?void 0:e.label}`,Oce=e=>`Aprobación necesaria: ${e==null?void 0:e.label}`,Dce=e=>`स्वीकृति ज़रूरी है: ${e==null?void 0:e.label}`,kN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Tce(e):t==="fa"?Rce(e):t==="ar"?Mce(e):t==="es"?Oce(e):t==="hi"?Dce(e):Ace(e)}),Lce=()=>"The CLI is retrying the turn.",Ice=()=>"CLI 正在重试本轮。",$ce=()=>"CLI در حال تلاش دوباره برای این نوبت است.",Bce=()=>"تحاول واجهة سطر الأوامر تنفيذ الجولة مجددًا.",Pce=()=>"La CLI está reintentando el turno.",Fce=()=>"CLI टर्न फिर से कोशिश कर रहा है।",Hce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ice():t==="fa"?$ce():t==="ar"?Bce():t==="es"?Pce():t==="hi"?Fce():Lce()}),qce=()=>"Continue is available.",Uce=()=>"可以继续。",Gce=()=>"ادامه در دسترس است.",Vce=()=>"المتابعة متاحة.",Kce=()=>"Puedes continuar.",Wce=()=>"जारी रखना उपलब्ध है।",Qce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uce():t==="fa"?Gce():t==="ar"?Vce():t==="es"?Kce():t==="hi"?Wce():qce()}),Xce=()=>"Retry is available.",Yce=()=>"可以重试。",Zce=()=>"تلاش دوباره در دسترس است.",Jce=()=>"إعادة المحاولة متاحة.",ele=()=>"Puedes reintentarlo.",tle=()=>"फिर से कोशिश करना उपलब्ध है।",nle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yce():t==="fa"?Zce():t==="ar"?Jce():t==="es"?ele():t==="hi"?tle():Xce()}),rle=()=>"Running a tool",sle=()=>"正在运行工具",ile=()=>"در حال اجرای ابزار",ale=()=>"جارٍ تشغيل أداة",ole=()=>"Ejecutando una herramienta",cle=()=>"एक टूल चल रहा है",lle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sle():t==="fa"?ile():t==="ar"?ale():t==="es"?ole():t==="hi"?cle():rle()}),ule=()=>"Tool activity completed",_le=()=>"工具活动已完成",fle=()=>"فعالیت ابزار کامل شد",dle=()=>"اكتمل نشاط الأداة",hle=()=>"Actividad de la herramienta completada",ple=()=>"टूल गतिविधि पूरी हुई",mle=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_le():t==="fa"?fle():t==="ar"?dle():t==="es"?hle():t==="hi"?ple():ule()}),gle=e=>`Tool activity failed: ${e==null?void 0:e.labels}`,vle=e=>`工具活动失败:${e==null?void 0:e.labels}`,ble=e=>`فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,yle=e=>`فشل نشاط الأداة: ${e==null?void 0:e.labels}`,xle=e=>`Error en la actividad de la herramienta: ${e==null?void 0:e.labels}`,wle=e=>`टूल गतिविधि विफल: ${e==null?void 0:e.labels}`,kle=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vle(e):t==="fa"?ble(e):t==="ar"?yle(e):t==="es"?xle(e):t==="hi"?wle(e):gle(e)}),Sle=e=>`${e==null?void 0:e.count} tool activities failed: ${e==null?void 0:e.labels}`,Cle=e=>`${e==null?void 0:e.count} 个工具活动失败:${e==null?void 0:e.labels}`,Ele=e=>`${e==null?void 0:e.count} فعالیت ابزار ناموفق بود: ${e==null?void 0:e.labels}`,Nle=e=>`فشل ${e==null?void 0:e.count} من أنشطة الأدوات: ${e==null?void 0:e.labels}`,zle=e=>`Actividades de herramientas con error (${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,n={})=>{const t=n.locale??E();return t==="zh-CN"?Cle(e):t==="fa"?Ele(e):t==="ar"?Nle(e):t==="es"?zle(e):t==="hi"?jle(e):Sle(e)}),Tle=()=>"Turn did not finish.",Rle=()=>"本轮未完成。",Mle=()=>"این نوبت کامل نشد.",Ole=()=>"لم تكتمل الجولة.",Dle=()=>"El turno no terminó.",Lle=()=>"यह टर्न पूरा नहीं हुआ।",Ile=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rle():t==="fa"?Mle():t==="ar"?Ole():t==="es"?Dle():t==="hi"?Lle():Tle()}),$le=()=>"Artifacts",Ble=()=>"产物",Ple=()=>"خروجی‌ها",Fle=()=>"المُخرَجات",Hle=()=>"Artefactos",qle=()=>"आर्टिफ़ैक्ट",aL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ble():t==="fa"?Ple():t==="ar"?Fle():t==="es"?Hle():t==="hi"?qle():$le()}),Ule=()=>"Close panel",Gle=()=>"关闭面板",Vle=()=>"بستن پنل",Kle=()=>"إغلاق اللوحة",Wle=()=>"Cerrar panel",Qle=()=>"पैनल बंद करें",I0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gle():t==="fa"?Vle():t==="ar"?Kle():t==="es"?Wle():t==="hi"?Qle():Ule()}),Xle=()=>"Current task",Yle=()=>"当前任务",Zle=()=>"وظیفهٔ فعلی",Jle=()=>"المهمة الحالية",eue=()=>"Tarea actual",tue=()=>"मौजूदा टास्क",SN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yle():t==="fa"?Zle():t==="ar"?Jle():t==="es"?eue():t==="hi"?tue():Xle()}),nue=()=>"Drag to resize panel",rue=()=>"拖动以调整面板大小",sue=()=>"برای تغییر اندازهٔ پنل بکشید",iue=()=>"اسحب لتغيير حجم اللوحة",aue=()=>"Arrastra para cambiar el tamaño del panel",oue=()=>"पैनल का आकार बदलने के लिए खींचें",cue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rue():t==="fa"?sue():t==="ar"?iue():t==="es"?aue():t==="hi"?oue():nue()}),lue=()=>"Drag toward the center to restore panel",uue=()=>"向中央拖动以恢复面板",_ue=()=>"برای بازگرداندن پنل به‌سوی مرکز بکشید",fue=()=>"اسحب نحو المنتصف لاستعادة اللوحة",due=()=>"Arrastra hacia el centro para restaurar el panel",hue=()=>"पैनल वापस लाने के लिए बीच की ओर खींचें",pue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uue():t==="fa"?_ue():t==="ar"?fue():t==="es"?due():t==="hi"?hue():lue()}),mue=()=>"Entire project",gue=()=>"整个项目",vue=()=>"کل پروژه",bue=()=>"المشروع بالكامل",yue=()=>"Todo el proyecto",xue=()=>"पूरा प्रोजेक्ट",CN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gue():t==="fa"?vue():t==="ar"?bue():t==="es"?yue():t==="hi"?xue():mue()}),wue=()=>"Expand panel",kue=()=>"展开面板",Sue=()=>"گسترش پنل",Cue=()=>"توسيع اللوحة",Eue=()=>"Expandir panel",Nue=()=>"पैनल फैलाएं",EN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kue():t==="fa"?Sue():t==="ar"?Cue():t==="es"?Eue():t==="hi"?Nue():wue()}),zue=e=>`Experiment filter: ${e==null?void 0:e.scope}`,jue=e=>`实验筛选:${e==null?void 0:e.scope}`,Aue=e=>`فیلتر آزمایش: ${e==null?void 0:e.scope}`,Tue=e=>`تصفية التجارب: ${e==null?void 0:e.scope}`,Rue=e=>`Filtro de experimentos: ${e==null?void 0:e.scope}`,Mue=e=>`प्रयोग फ़िल्टर: ${e==null?void 0:e.scope}`,Oue=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jue(e):t==="fa"?Aue(e):t==="ar"?Tue(e):t==="es"?Rue(e):t==="hi"?Mue(e):zue(e)}),Due=()=>"Experiment view",Lue=()=>"实验视图",Iue=()=>"نمای آزمایش",$ue=()=>"عرض التجربة",Bue=()=>"Vista de experimento",Pue=()=>"प्रयोग व्यू",Fue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lue():t==="fa"?Iue():t==="ar"?$ue():t==="es"?Bue():t==="hi"?Pue():Due()}),Hue=()=>"Experiments",que=()=>"实验",Uue=()=>"آزمایش‌ها",Gue=()=>"التجارب",Vue=()=>"Experimentos",Kue=()=>"प्रयोग",oL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?que():t==="fa"?Uue():t==="ar"?Gue():t==="es"?Vue():t==="hi"?Kue():Hue()}),Wue=()=>"Files",Que=()=>"文件",Xue=()=>"فایل‌ها",Yue=()=>"الملفات",Zue=()=>"Archivos",Jue=()=>"फ़ाइलें",N3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Que():t==="fa"?Xue():t==="ar"?Yue():t==="es"?Zue():t==="hi"?Jue():Wue()}),e_e=()=>"Filter experiments",t_e=()=>"筛选实验",n_e=()=>"فیلتر آزمایش‌ها",r_e=()=>"تصفية التجارب",s_e=()=>"Filtrar experimentos",i_e=()=>"प्रयोग फ़िल्टर करें",a_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t_e():t==="fa"?n_e():t==="ar"?r_e():t==="es"?s_e():t==="hi"?i_e():e_e()}),o_e=()=>"Current task filtering is unavailable for unattributed experiments",c_e=()=>"存在无法归属的实验时,不能按当前任务筛选",l_e=()=>"برای آزمایش‌های بدون وظیفه، فیلتر وظیفهٔ کنونی در دسترس نیست",u_e=()=>"تصفية المهمة الحالية غير متاحة للتجارب غير المنسوبة",__e=()=>"No se puede filtrar por la tarea actual en experimentos sin tarea asignada",f_e=()=>"बिना श्रेय वाले प्रयोगों के लिए मौजूदा टास्क फ़िल्टरिंग उपलब्ध नहीं है",d_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c_e():t==="fa"?l_e():t==="ar"?u_e():t==="es"?__e():t==="hi"?f_e():o_e()}),h_e=()=>"No experiments from the current task yet. Switch to Entire project to see all experiments.",p_e=()=>"当前任务还没有实验。切换到“整个项目”即可查看所有实验。",m_e=()=>"وظیفهٔ کنونی هنوز آزمایشی ندارد. برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",g_e=()=>"لا توجد تجارب من المهمة الحالية بعد. بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",v_e=()=>"Aún no hay experimentos de la tarea actual. Cambia a Todo el proyecto para ver todos los experimentos.",b_e=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं। सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",y_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p_e():t==="fa"?m_e():t==="ar"?g_e():t==="es"?v_e():t==="hi"?b_e():h_e()}),x_e=()=>"Open a task to filter to its experiments",w_e=()=>"请打开一个任务以筛选其实验",k_e=()=>"برای محدود کردن آزمایش‌ها، یک وظیفه را باز کنید",S_e=()=>"افتح مهمة لعرض تجاربها فقط",C_e=()=>"Abre una tarea para filtrar por sus experimentos",E_e=()=>"इसके प्रयोगों तक फ़िल्टर करने के लिए एक टास्क खोलें",N_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w_e():t==="fa"?k_e():t==="ar"?S_e():t==="es"?C_e():t==="hi"?E_e():x_e()}),z_e=()=>"projects",j_e=()=>"项目",A_e=()=>"پروژه‌ها",T_e=()=>"المشاريع",R_e=()=>"los proyectos",M_e=()=>"प्रोजेक्ट",v0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j_e():t==="fa"?A_e():t==="ar"?T_e():t==="es"?R_e():t==="hi"?M_e():z_e()}),O_e=()=>"Restore panel",D_e=()=>"还原面板",L_e=()=>"بازگرداندن اندازهٔ پنل",I_e=()=>"استعادة اللوحة",$_e=()=>"Restaurar panel",B_e=()=>"पैनल वापस लाएं",NN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D_e():t==="fa"?L_e():t==="ar"?I_e():t==="es"?$_e():t==="hi"?B_e():O_e()}),P_e=()=>"Retry",F_e=()=>"重试",H_e=()=>"تلاش دوباره",q_e=()=>"إعادة المحاولة",U_e=()=>"Reintentar",G_e=()=>"फिर से कोशिश करें",ri=((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()}),V_e=()=>"Select a project to browse its files.",K_e=()=>"选择一个项目以浏览其文件。",W_e=()=>"برای مرور فایل‌ها، یک پروژه را انتخاب کنید.",Q_e=()=>"اختر مشروعًا لتصفح ملفاته.",X_e=()=>"Selecciona un proyecto para explorar sus archivos.",Y_e=()=>"फ़ाइलें ब्राउज़ करने के लिए एक प्रोजेक्ट चुनें।",Z_e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K_e():t==="fa"?W_e():t==="ar"?Q_e():t==="es"?X_e():t==="hi"?Y_e():V_e()}),J_e=()=>"settings",efe=()=>"设置",tfe=()=>"تنظیمات",nfe=()=>"الإعدادات",rfe=()=>"la configuración",sfe=()=>"सेटिंग्स",ife=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?efe():t==="fa"?tfe():t==="ar"?nfe():t==="es"?rfe():t==="hi"?sfe():J_e()}),afe=()=>"Show archived",ofe=()=>"显示已归档",cfe=()=>"نمایش بایگانی‌شده‌ها",lfe=()=>"إظهار المؤرشف",ufe=()=>"Mostrar archivados",_fe=()=>"संग्रहीत दिखाएँ",ffe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ofe():t==="fa"?cfe():t==="ar"?lfe():t==="es"?ufe():t==="hi"?_fe():afe()}),dfe=e=>`Couldn’t load OpenResearch ${e==null?void 0:e.items}.`,hfe=e=>`无法加载 OpenResearch 的${e==null?void 0:e.items}。`,pfe=e=>`بارگذاری ${e==null?void 0:e.items} در OpenResearch ناموفق بود.`,mfe=e=>`تعذّر تحميل ${e==null?void 0:e.items} في OpenResearch.`,gfe=e=>`Error al cargar ${e==null?void 0:e.items} de OpenResearch.`,vfe=e=>`OpenResearch ${e==null?void 0:e.items} लोड नहीं हो सके।`,bfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hfe(e):t==="fa"?pfe(e):t==="ar"?mfe(e):t==="es"?gfe(e):t==="hi"?vfe(e):dfe(e)}),yfe=()=>"Sub-agent",xfe=()=>"子智能体",wfe=()=>"عامل فرعی",kfe=()=>"وكيل فرعي",Sfe=()=>"Subagente",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=()=>"Table",zfe=()=>"表格",jfe=()=>"جدول",Afe=()=>"جدول",Tfe=()=>"Tabla",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=()=>"Tree",Dfe=()=>"树状图",Lfe=()=>"درخت",Ife=()=>"شجرة",$fe=()=>"Árbol",Bfe=()=>"ट्री",Pfe=((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()}),Ffe=e=>`Collapse ${e==null?void 0:e.name}`,Hfe=e=>`折叠 ${e==null?void 0:e.name}`,qfe=e=>`بستن پوشهٔ ${e==null?void 0:e.name}`,Ufe=e=>`طيّ ${e==null?void 0:e.name}`,Gfe=e=>`Contraer ${e==null?void 0:e.name}`,Vfe=e=>`${e==null?void 0:e.name} समेटें`,Kfe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hfe(e):t==="fa"?qfe(e):t==="ar"?Ufe(e):t==="es"?Gfe(e):t==="hi"?Vfe(e):Ffe(e)}),Wfe=e=>`Delete “${e==null?void 0:e.path}” from the artifacts directory?`,Qfe=e=>`从产物目录中删除“${e==null?void 0:e.path}”?`,Xfe=e=>`«${e==null?void 0:e.path}» از پوشهٔ خروجی‌ها حذف شود؟`,Yfe=e=>`حذف «${e==null?void 0:e.path}» من دليل المُخرَجات؟`,Zfe=e=>`¿Eliminar “${e==null?void 0:e.path}” del directorio de artefactos?`,Jfe=e=>`“${e==null?void 0:e.path}” को आर्टिफ़ैक्ट डायरेक्टरी से हटाएं?`,gS=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qfe(e):t==="fa"?Xfe(e):t==="ar"?Yfe(e):t==="es"?Zfe(e):t==="hi"?Jfe(e):Wfe(e)}),ede=e=>`Delete folder ${e==null?void 0:e.name}`,tde=e=>`删除文件夹 ${e==null?void 0:e.name}`,nde=e=>`حذف پوشهٔ ${e==null?void 0:e.name}`,rde=e=>`حذف المجلد ${e==null?void 0:e.name}`,sde=e=>`Eliminar la carpeta ${e==null?void 0:e.name}`,ide=e=>`${e==null?void 0:e.name} फ़ोल्डर हटाएं`,ade=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tde(e):t==="fa"?nde(e):t==="ar"?rde(e):t==="es"?sde(e):t==="hi"?ide(e):ede(e)}),ode=e=>`Expand ${e==null?void 0:e.name}`,cde=e=>`展开 ${e==null?void 0:e.name}`,lde=e=>`باز کردن پوشهٔ ${e==null?void 0:e.name}`,ude=e=>`توسيع ${e==null?void 0:e.name}`,_de=e=>`Expandir ${e==null?void 0:e.name}`,fde=e=>`${e==null?void 0:e.name} फैलाएं`,dde=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cde(e):t==="fa"?lde(e):t==="ar"?ude(e):t==="es"?_de(e):t==="hi"?fde(e):ode(e)}),hde=()=>"Binary or unsupported file — no inline preview.",pde=()=>"二进制文件或不受支持的文件 — 无法内嵌预览。",mde=()=>"فایل دودویی یا پشتیبانی‌نشده است — پیش‌نمایش درون‌صفحه‌ای ندارد.",gde=()=>"ملف ثنائي أو غير مدعوم — لا توجد معاينة مضمّنة.",vde=()=>"Archivo binario o no compatible — sin vista previa.",bde=()=>"बाइनरी या असमर्थित फ़ाइल — इनलाइन प्रीव्यू नहीं है।",yde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pde():t==="fa"?mde():t==="ar"?gde():t==="es"?vde():t==="hi"?bde():hde()}),xde=()=>"Copy path",wde=()=>"复制路径",kde=()=>"کپی مسیر",Sde=()=>"نسخ المسار",Cde=()=>"Copiar ruta",Ede=()=>"पथ कॉपी करें",Nde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wde():t==="fa"?kde():t==="ar"?Sde():t==="es"?Cde():t==="hi"?Ede():xde()}),zde=()=>"Artifact not found",jde=()=>"找不到产物",Ade=()=>"خروجی پیدا نشد",Tde=()=>"لم يُعثر على المُخرَج",Rde=()=>"No se encontró el artefacto",Mde=()=>"आर्टिफ़ैक्ट नहीं मिला",Ode=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jde():t==="fa"?Ade():t==="ar"?Tde():t==="es"?Rde():t==="hi"?Mde():zde()}),Dde=()=>"Open raw",Lde=()=>"打开原始文件",Ide=()=>"باز کردن فایل خام",$de=()=>"فتح الملف الخام",Bde=()=>"Abrir sin formato",Pde=()=>"रॉ खोलें",Fde=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lde():t==="fa"?Ide():t==="ar"?$de():t==="es"?Bde():t==="hi"?Pde():Dde()}),Hde=()=>"Cancel search",qde=()=>"取消搜索",Ude=()=>"لغو جستجو",Gde=()=>"إلغاء البحث",Vde=()=>"Cancelar búsqueda",Kde=()=>"खोज रद्द करें",zN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qde():t==="fa"?Ude():t==="ar"?Gde():t==="es"?Vde():t==="hi"?Kde():Hde()}),Wde=()=>"Search cancelled. Change the query to start a new search.",Qde=()=>"搜索已取消。更改查询可开始新的搜索。",Xde=()=>"جستجو لغو شد. برای شروع جستجوی جدید، عبارت را تغییر دهید.",Yde=()=>"تم إلغاء البحث. غيّر الاستعلام لبدء بحث جديد.",Zde=()=>"Búsqueda cancelada. Cambia la consulta para iniciar otra.",Jde=()=>"खोज रद्द हुई। नई खोज शुरू करने के लिए क्वेरी बदलें।",ehe=((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()}),the=()=>"Continue",nhe=()=>"继续",rhe=()=>"ادامه",she=()=>"متابعة",ihe=()=>"Continuar",ahe=()=>"जारी रखें",ohe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nhe():t==="fa"?rhe():t==="ar"?she():t==="es"?ihe():t==="hi"?ahe():the()}),che=()=>"Some folders could not be searched. Results may be incomplete.",lhe=()=>"部分文件夹无法搜索,结果可能不完整。",uhe=()=>"جستجو در برخی پوشه‌ها ممکن نبود. نتایج ممکن است ناقص باشند.",_he=()=>"تعذر البحث في بعض المجلدات. قد تكون النتائج غير مكتملة.",fhe=()=>"No se pudieron buscar algunas carpetas. Los resultados pueden estar incompletos.",dhe=()=>"कुछ फ़ोल्डरों में खोज नहीं हो सकी। परिणाम अधूरे हो सकते हैं।",hhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lhe():t==="fa"?uhe():t==="ar"?_he():t==="es"?fhe():t==="hi"?dhe():che()}),phe=()=>"Load more results",mhe=()=>"加载更多结果",ghe=()=>"بارگیری نتایج بیشتر",vhe=()=>"تحميل المزيد من النتائج",bhe=()=>"Cargar más resultados",yhe=()=>"और परिणाम लोड करें",xhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mhe():t==="fa"?ghe():t==="ar"?vhe():t==="es"?bhe():t==="hi"?yhe():phe()}),whe=()=>"Continue for up to 15 more minutes.",khe=()=>"继续搜索,最多再等待 15 分钟。",She=()=>"ادامه برای حداکثر ۱۵ دقیقهٔ دیگر.",Che=()=>"المتابعة لمدة تصل إلى 15 دقيقة إضافية.",Ehe=()=>"Continuar durante un máximo de 15 minutos más.",Nhe=()=>"अधिकतम 15 मिनट और जारी रखें।",zhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?khe():t==="fa"?She():t==="ar"?Che():t==="es"?Ehe():t==="hi"?Nhe():whe()}),jhe=()=>"No matching artifacts",Ahe=()=>"没有匹配的产物",The=()=>"فایل منطبقی پیدا نشد",Rhe=()=>"لا توجد ملفات مطابقة",Mhe=()=>"No hay artefactos coincidentes",Ohe=()=>"कोई मेल खाता आर्टिफ़ैक्ट नहीं मिला",Dhe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ahe():t==="fa"?The():t==="ar"?Rhe():t==="es"?Mhe():t==="hi"?Ohe():jhe()}),Lhe=()=>"Search artifacts by name or path",Ihe=()=>"按名称或路径搜索产物",$he=()=>"جستجوی فایل‌ها بر اساس نام یا مسیر",Bhe=()=>"البحث في الملفات حسب الاسم أو المسار",Phe=()=>"Buscar artefactos por nombre o ruta",Fhe=()=>"नाम या पथ से आर्टिफ़ैक्ट खोजें",jN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ihe():t==="fa"?$he():t==="ar"?Bhe():t==="es"?Phe():t==="hi"?Fhe():Lhe()}),Hhe=()=>"Searching…",qhe=()=>"正在搜索…",Uhe=()=>"در حال جستجو…",Ghe=()=>"جارٍ البحث…",Vhe=()=>"Buscando…",Khe=()=>"खोज रहे हैं…",Whe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qhe():t==="fa"?Uhe():t==="ar"?Ghe():t==="es"?Vhe():t==="hi"?Khe():Hhe()}),Qhe=()=>"Search is taking a long time. The artifacts directory may contain many files or a network mount. Continue searching?",Xhe=()=>"搜索耗时较长。产物目录可能包含大量文件或网络挂载。是否继续搜索?",Yhe=()=>"جستجو طولانی شده است. پوشهٔ فایل‌ها ممکن است فایل‌های زیاد یا یک درایو شبکه داشته باشد. ادامه می‌دهید؟",Zhe=()=>"يستغرق البحث وقتًا طويلًا. قد يحتوي مجلد الملفات على ملفات كثيرة أو وحدة شبكة. هل تريد المتابعة؟",Jhe=()=>"La búsqueda está tardando mucho. El directorio de artefactos puede contener muchos archivos o un volumen de red. ¿Continuar?",epe=()=>"खोज में बहुत समय लग रहा है। आर्टिफ़ैक्ट फ़ोल्डर में बहुत सारी फ़ाइलें या नेटवर्क वॉल्यूम हो सकता है। खोज जारी रखें?",tpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xhe():t==="fa"?Yhe():t==="ar"?Zhe():t==="es"?Jhe():t==="hi"?epe():Qhe()}),npe=()=>"Continuing removes the time limit. If the filesystem fails, this operation may never finish. You can still cancel further traversal, but an already blocked filesystem call cannot be interrupted.",rpe=()=>"继续将移除时间限制。如果文件系统发生故障,操作可能永远无法完成。仍可取消后续遍历,但无法中断已阻塞的文件系统调用。",spe=()=>"ادامه، محدودیت زمانی را حذف می‌کند. در صورت خرابی سیستم فایل، عملیات ممکن است هرگز تمام نشود. می‌توانید ادامهٔ پیمایش را لغو کنید، اما فراخوانی سیستم فایل که قبلاً مسدود شده قابل قطع نیست.",ipe=()=>"تزيل المتابعة الحد الزمني. إذا تعطل نظام الملفات فقد لا تنتهي العملية. يمكنك إلغاء المزيد من البحث، لكن لا يمكن مقاطعة استدعاء نظام ملفات عالق بالفعل.",ape=()=>"Continuar elimina el límite de tiempo. Si el sistema de archivos falla, la operación podría no terminar. Puedes cancelar el recorrido, pero no interrumpir una llamada al sistema de archivos ya bloqueada.",ope=()=>"जारी रखने पर समय सीमा हट जाएगी। फ़ाइल सिस्टम विफल होने पर यह प्रक्रिया कभी समाप्त नहीं हो सकती। आगे की खोज रद्द की जा सकती है, लेकिन पहले से अटकी फ़ाइल सिस्टम कॉल बाधित नहीं की जा सकती।",cpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rpe():t==="fa"?spe():t==="ar"?ipe():t==="es"?ape():t==="hi"?ope():npe()}),lpe=()=>"Click an artifact to view it",upe=()=>"点击产物即可查看",_pe=()=>"برای مشاهده، یک خروجی را انتخاب کنید",fpe=()=>"انقر على مُخرَج لعرضه",dpe=()=>"Selecciona un artefacto para verlo",hpe=()=>"देखने के लिए किसी आर्टिफ़ैक्ट पर क्लिक करें",ppe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?upe():t==="fa"?_pe():t==="ar"?fpe():t==="es"?dpe():t==="hi"?hpe():lpe()}),mpe=()=>"Delete artifact",gpe=()=>"删除产物",vpe=()=>"حذف خروجی",bpe=()=>"حذف المُخرَج",ype=()=>"Eliminar artefacto",xpe=()=>"आर्टिफ़ैक्ट हटाएं",AN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gpe():t==="fa"?vpe():t==="ar"?bpe():t==="es"?ype():t==="hi"?xpe():mpe()}),wpe=()=>"Delete folder",kpe=()=>"删除文件夹",Spe=()=>"حذف پوشه",Cpe=()=>"حذف المجلد",Epe=()=>"Eliminar carpeta",Npe=()=>"फ़ोल्डर हटाएं",zpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kpe():t==="fa"?Spe():t==="ar"?Cpe():t==="es"?Epe():t==="hi"?Npe():wpe()}),jpe=()=>"Failed to load:",Ape=()=>"加载失败:",Tpe=()=>"بارگیری ناموفق بود:",Rpe=()=>"تعذّر التحميل:",Mpe=()=>"Error al cargar:",Ope=()=>"लोड नहीं हो सका:",Dpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ape():t==="fa"?Tpe():t==="ar"?Rpe():t==="es"?Mpe():t==="hi"?Ope():jpe()}),Lpe=()=>"File truncated — showing the first 512 KB.",Ipe=()=>"文件已截断——仅显示前 512 KB。",$pe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",Bpe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",Ppe=()=>"Archivo truncado — se muestran los primeros 512 KB.",Fpe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",Hpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ipe():t==="fa"?$pe():t==="ar"?Bpe():t==="es"?Ppe():t==="hi"?Fpe():Lpe()}),qpe=()=>"Listing truncated — the folder has more artifacts.",Upe=()=>"列表已截断——文件夹中还有更多产物。",Gpe=()=>"فهرست کوتاه شده است — خروجی‌های بیشتری در پوشه وجود دارد.",Vpe=()=>"تم اقتطاع القائمة — يحتوي المجلد على مُخرَجات أخرى.",Kpe=()=>"Listado truncado — la carpeta tiene más artefactos.",Wpe=()=>"सूची छोटी की गई — इस फ़ोल्डर में और भी आर्टिफ़ैक्ट हैं।",Qpe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Upe():t==="fa"?Gpe():t==="ar"?Vpe():t==="es"?Kpe():t==="hi"?Wpe():qpe()}),Xpe=()=>"Loading…",Ype=()=>"正在加载…",Zpe=()=>"در حال بارگیری…",Jpe=()=>"جارٍ التحميل…",e0e=()=>"Cargando…",t0e=()=>"लोड हो रहा है…",cL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ype():t==="fa"?Zpe():t==="ar"?Jpe():t==="es"?e0e():t==="hi"?t0e():Xpe()}),n0e=()=>"Loading artifacts…",r0e=()=>"正在加载产物…",s0e=()=>"در حال بارگیری خروجی‌ها…",i0e=()=>"جارٍ تحميل المُخرَجات…",a0e=()=>"Cargando artefactos…",o0e=()=>"आर्टिफ़ैक्ट लोड हो रहे हैं…",c0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r0e():t==="fa"?s0e():t==="ar"?i0e():t==="es"?a0e():t==="hi"?o0e():n0e()}),l0e=()=>"Modified",u0e=()=>"修改时间",_0e=()=>"ویرایش‌شده",f0e=()=>"عُدّل",d0e=()=>"Modificado",h0e=()=>"बदला गया",p0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u0e():t==="fa"?_0e():t==="ar"?f0e():t==="es"?d0e():t==="hi"?h0e():l0e()}),m0e=()=>"No artifacts yet",g0e=()=>"尚无产物",v0e=()=>"هنوز خروجی‌ای وجود ندارد",b0e=()=>"لا توجد مُخرَجات بعد",y0e=()=>"Aún no hay artefactos",x0e=()=>"अभी तक कोई आर्टिफ़ैक्ट नहीं",w0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g0e():t==="fa"?v0e():t==="ar"?b0e():t==="es"?y0e():t==="hi"?x0e():m0e()}),k0e=()=>"Open raw in new tab",S0e=()=>"在新标签页中打开原始文件",C0e=()=>"باز کردن فایل خام در زبانهٔ جدید",E0e=()=>"فتح الملف الخام في تبويب جديد",N0e=()=>"Abrir sin formato en una pestaña nueva",z0e=()=>"नए टैब में रॉ खोलें",TN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S0e():t==="fa"?C0e():t==="ar"?E0e():t==="es"?N0e():t==="hi"?z0e():k0e()}),j0e=()=>"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.",A0e=()=>"这里是项目的持久输出空间,用于保存报告、图表、图片、CSV、PDF 和其他研究产物。你可以让智能体撰写报告,也可以自行添加文件。",T0e=()=>"این فضای پایدار خروجی پروژه برای گزارش‌ها، نمودارها، تصاویر، فایل‌های CSV و PDF و دیگر خروجی‌های پژوهشی است. از عامل بخواهید گزارشی بنویسد یا فایل‌های خودتان را اضافه کنید.",R0e=()=>"هذه هي مساحة المُخرَجات الدائمة للمشروع، للتقارير والأشكال والصور وملفات CSV وملفات PDF وغيرها من مُخرَجات البحث. اطلب من الوكيل كتابة تقرير أو أضِف ملفاتك الخاصة.",M0e=()=>"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.",O0e=()=>"यह प्रोजेक्ट का स्थायी आउटपुट स्थान है — रिपोर्ट, फ़िगर, इमेज, CSV, PDF और अन्य शोध आर्टिफ़ैक्ट के लिए। एजेंट से कोई लेख लिखने को कहें या अपनी फ़ाइलें खुद जोड़ें।",D0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A0e():t==="fa"?T0e():t==="ar"?R0e():t==="es"?M0e():t==="hi"?O0e():j0e()}),L0e=()=>"File too large to preview inline.",I0e=()=>"文件太大,无法内嵌预览。",$0e=()=>"فایل برای پیش‌نمایش درون‌صفحه‌ای بیش از حد بزرگ است.",B0e=()=>"الملف كبير جدًا للمعاينة المضمّنة.",P0e=()=>"El archivo es demasiado grande para previsualizarlo.",F0e=()=>"फ़ाइल इनलाइन प्रीव्यू के लिए बहुत बड़ी है।",H0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I0e():t==="fa"?$0e():t==="ar"?B0e():t==="es"?P0e():t==="hi"?F0e():L0e()}),q0e=()=>"This is the baseline branch, so there is no parent comparison.",U0e=()=>"这是基线分支,因此没有父分支可供比较。",G0e=()=>"این شاخهٔ مبناست، بنابراین شاخهٔ والدی برای مقایسه ندارد.",V0e=()=>"هذا هو الفرع الأساس، فلا يوجد فرع أصل للمقارنة.",K0e=()=>"Esta es la rama base, así que no hay comparación con una rama padre.",W0e=()=>"यह बेसलाइन ब्रांच है, इसलिए कोई पैरेंट तुलना नहीं है।",Q0e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U0e():t==="fa"?G0e():t==="ar"?V0e():t==="es"?K0e():t==="hi"?W0e():q0e()}),X0e=()=>"Failed to load changes:",Y0e=()=>"加载更改失败:",Z0e=()=>"بارگیری تغییرات ناموفق بود:",J0e=()=>"تعذّر تحميل التغييرات:",eme=()=>"Error al cargar los cambios:",tme=()=>"बदलाव लोड नहीं हो सके:",nme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y0e():t==="fa"?Z0e():t==="ar"?J0e():t==="es"?eme():t==="hi"?tme():X0e()}),rme=()=>"Loading changes…",sme=()=>"正在加载更改…",ime=()=>"در حال بارگیری تغییرات…",ame=()=>"جارٍ تحميل التغييرات…",ome=()=>"Cargando cambios…",cme=()=>"बदलाव लोड हो रहे हैं…",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=()=>"No committed changes from the parent branch.",_me=()=>"与父分支相比没有已提交的更改。",fme=()=>"نسبت به شاخهٔ والد تغییر ثبت‌شده‌ای وجود ندارد.",dme=()=>"لا توجد تغييرات مودعة عن الفرع الأصل.",hme=()=>"No hay cambios confirmados respecto a la rama padre.",pme=()=>"पैरेंट ब्रांच से कोई कमिट किए गए बदलाव नहीं।",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=e=>`agent ${e==null?void 0:e.number}`,vme=e=>`智能体 ${e==null?void 0:e.number}`,bme=e=>`عامل ${e==null?void 0:e.number}`,yme=e=>`وكيل ${e==null?void 0:e.number}`,xme=e=>`agente ${e==null?void 0:e.number}`,wme=e=>`एजेंट ${e==null?void 0:e.number}`,RN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vme(e):t==="fa"?bme(e):t==="ar"?yme(e):t==="es"?xme(e):t==="hi"?wme(e):gme(e)}),kme=()=>"agent sessions",Sme=()=>"智能体会话",Cme=()=>"نشست‌های عامل‌ها",Eme=()=>"جلسات الوكلاء",Nme=()=>"sesiones de agente",zme=()=>"एजेंट सेशन",jme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sme():t==="fa"?Cme():t==="ar"?Eme():t==="es"?Nme():t==="hi"?zme():kme()}),Ame=()=>"All sessions",Tme=()=>"所有会话",Rme=()=>"همهٔ نشست‌ها",Mme=()=>"كل الجلسات",Ome=()=>"Todas las sesiones",Dme=()=>"सभी सेशन",lL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tme():t==="fa"?Rme():t==="ar"?Mme():t==="es"?Ome():t==="hi"?Dme():Ame()}),Lme=e=>`${e==null?void 0:e.count} annotations`,Ime=e=>`${e==null?void 0:e.count} 条批注`,$me=e=>`${e==null?void 0:e.count} یادداشت`,Bme=e=>`التعليقات: ${e==null?void 0:e.count}`,Pme=e=>`${e==null?void 0:e.count} anotaciones`,Fme=e=>`${e==null?void 0:e.count} एनोटेशन`,Hme=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ime(e):t==="fa"?$me(e):t==="ar"?Bme(e):t==="es"?Pme(e):t==="hi"?Fme(e):Lme(e)}),qme=()=>"Archive",Ume=()=>"归档",Gme=()=>"بایگانی",Vme=()=>"أرشفة",Kme=()=>"Archivar",Wme=()=>"आर्काइव करें",Qme=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ume():t==="fa"?Gme():t==="ar"?Vme():t==="es"?Kme():t==="hi"?Wme():qme()}),Xme=()=>"Ask the research agent… (/ for commands and skills, ! for shell)",Yme=()=>"询问研究智能体…(输入 / 使用命令和技能,输入 ! 运行 shell)",Zme=()=>"از عامل پژوهش بپرسید… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)",Jme=()=>"اسأل وكيل البحث… (/ للأوامر والمهارات، ! للطرفية)",ege=()=>"Pregunta al agente de investigación… (/ para comandos y skills, ! para la shell)",tge=()=>"शोध एजेंट से पूछें… (कमांड और स्किल के लिए /, शेल के लिए !)",nge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yme():t==="fa"?Zme():t==="ar"?Jme():t==="es"?ege():t==="hi"?tge():Xme()}),rge=()=>"Asked about selected text",sge=()=>"已询问所选文本",ige=()=>"دربارهٔ متن انتخاب‌شده پرسیده شد",age=()=>"سأل عن النص المحدد",oge=()=>"Preguntó sobre el texto seleccionado",cge=()=>"चयनित टेक्स्ट के बारे में पूछा",lge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sge():t==="fa"?ige():t==="ar"?age():t==="es"?oge():t==="hi"?cge():rge()}),uge=()=>"Attachment",_ge=()=>"附件",fge=()=>"پیوست",dge=()=>"مرفق",hge=()=>"Adjunto",pge=()=>"अटैचमेंट",mge=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ge():t==="fa"?fge():t==="ar"?dge():t==="es"?hge():t==="hi"?pge():uge()}),gge=e=>`${e==null?void 0:e.name} is too large — each attachment must be under 30 MB.`,vge=e=>`${e==null?void 0:e.name} 太大 — 每个附件必须小于 30 MB。`,bge=e=>`${e==null?void 0:e.name} بیش از حد بزرگ است — هر پیوست باید کمتر از ۳۰ مگابایت باشد.`,yge=e=>`${e==null?void 0:e.name} كبير جدًا — يجب أن يكون كل مرفق أقل من 30 ميغابايت.`,xge=e=>`${e==null?void 0:e.name} es demasiado grande — cada adjunto debe ocupar menos de 30 MB.`,wge=e=>`${e==null?void 0:e.name} बहुत बड़ी है — हर अटैचमेंट 30 MB से कम होनी चाहिए।`,kge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vge(e):t==="fa"?bge(e):t==="ar"?yge(e):t==="es"?xge(e):t==="hi"?wge(e):gge(e)}),Sge=()=>"Attachments exceed the 40 MB total limit — remove one and try again.",Cge=()=>"附件总大小超过 40 MB 限制 — 请移除一个附件后重试。",Ege=()=>"حجم پیوست‌ها از سقف ۴۰ مگابایت بیشتر است — یکی را حذف و دوباره تلاش کنید.",Nge=()=>"تتجاوز المرفقات الحد الإجمالي 40 ميغابايت — أزِل واحدًا وحاول مجددًا.",zge=()=>"Los adjuntos superan el límite total de 40 MB — quita uno y vuelve a intentarlo.",jge=()=>"अटैचमेंट 40 MB की कुल सीमा से ज़्यादा हैं — एक हटाएं और फिर से कोशिश करें।",Age=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cge():t==="fa"?Ege():t==="ar"?Nge():t==="es"?zge():t==="hi"?jge():Sge()}),Tge=()=>"Wait for the turn to finish before running a command.",Rge=()=>"请等待本轮结束后再运行命令。",Mge=()=>"پیش از اجرای فرمان، صبر کنید تا نوبت تمام شود.",Oge=()=>"انتظر انتهاء الجولة قبل تنفيذ أمر.",Dge=()=>"Espera a que termine el turno antes de ejecutar un comando.",Lge=()=>"कमांड चलाने से पहले टर्न खत्म होने का इंतज़ार करें।",Ige=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rge():t==="fa"?Mge():t==="ar"?Oge():t==="es"?Dge():t==="hi"?Lge():Tge()}),$ge=e=>`Exited with code ${e==null?void 0:e.code}`,Bge=e=>`退出码 ${e==null?void 0:e.code}`,Pge=e=>`با کد ${e==null?void 0:e.code} خارج شد`,Fge=e=>`خرج برمز ${e==null?void 0:e.code}`,Hge=e=>`Terminó con el código ${e==null?void 0:e.code}`,qge=e=>`कोड ${e==null?void 0:e.code} के साथ बाहर निकला`,Uge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Bge(e):t==="fa"?Pge(e):t==="ar"?Fge(e):t==="es"?Hge(e):t==="hi"?qge(e):$ge(e)}),Gge=e=>`Command not run: ${e==null?void 0:e.error}`,Vge=e=>`命令未运行:${e==null?void 0:e.error}`,Kge=e=>`فرمان اجرا نشد: ${e==null?void 0:e.error}`,Wge=e=>`لم يُنفَّذ الأمر: ${e==null?void 0:e.error}`,Qge=e=>`No se ejecutó el comando: ${e==null?void 0:e.error}`,Xge=e=>`कमांड नहीं चलाई गई: ${e==null?void 0:e.error}`,MN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vge(e):t==="fa"?Kge(e):t==="ar"?Wge(e):t==="es"?Qge(e):t==="hi"?Xge(e):Gge(e)}),Yge=()=>"Collapse tool activity",Zge=()=>"折叠工具活动",Jge=()=>"بستن فعالیت ابزارها",e1e=()=>"طيّ نشاط الأداة",t1e=()=>"Contraer actividad de herramientas",n1e=()=>"टूल गतिविधि समेटें",r1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zge():t==="fa"?Jge():t==="ar"?e1e():t==="es"?t1e():t==="hi"?n1e():Yge()}),s1e=()=>"Wait for the turn to finish before compacting.",i1e=()=>"请等待本轮结束后再压缩。",a1e=()=>"پیش از فشرده‌سازی، منتظر پایان نوبت بمانید.",o1e=()=>"انتظر انتهاء الجولة قبل الضغط.",c1e=()=>"Espera a que termine el turno antes de comprimir.",l1e=()=>"छोटा करने से पहले टर्न पूरा होने का इंतज़ार करें।",u1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i1e():t==="fa"?a1e():t==="ar"?o1e():t==="es"?c1e():t==="hi"?l1e():s1e()}),_1e=e=>`Compacting failed: ${e==null?void 0:e.error}`,f1e=e=>`压缩失败:${e==null?void 0:e.error}`,d1e=e=>`فشرده‌سازی ناموفق بود: ${e==null?void 0:e.error}`,h1e=e=>`فشل الضغط: ${e==null?void 0:e.error}`,p1e=e=>`Error al comprimir: ${e==null?void 0:e.error}`,m1e=e=>`छोटा करना विफल: ${e==null?void 0:e.error}`,g1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f1e(e):t==="fa"?d1e(e):t==="ar"?h1e(e):t==="es"?p1e(e):t==="hi"?m1e(e):_1e(e)}),v1e=()=>"Continue",b1e=()=>"继续",y1e=()=>"ادامه",x1e=()=>"متابعة",w1e=()=>"Continuar",k1e=()=>"जारी रखें",S1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b1e():t==="fa"?y1e():t==="ar"?x1e():t==="es"?w1e():t==="hi"?k1e():v1e()}),C1e=()=>"Copy response",E1e=()=>"复制回复",N1e=()=>"کپی پاسخ",z1e=()=>"نسخ الرد",j1e=()=>"Copiar respuesta",A1e=()=>"जवाब कॉपी करें",ON=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E1e():t==="fa"?N1e():t==="ar"?z1e():t==="es"?j1e():t==="hi"?A1e():C1e()}),T1e=e=>`Delete “${e==null?void 0:e.title}”? -Its transcript will be permanently removed.`,Vge=e=>`删除“${e==null?void 0:e.title}”? +Its transcript will be permanently removed.`,R1e=e=>`删除“${e==null?void 0:e.title}”? -其对话记录将被永久移除。`,Wge=e=>`«${e==null?void 0:e.title}» حذف شود؟ +其对话记录将被永久移除。`,M1e=e=>`«${e==null?void 0:e.title}» حذف شود؟ -رونوشت آن برای همیشه حذف خواهد شد.`,Qge=e=>`حذف «${e==null?void 0:e.title}»؟ +رونوشت آن برای همیشه حذف خواهد شد.`,O1e=e=>`حذف «${e==null?void 0:e.title}»؟ -سيُحذف سجل المحادثة نهائيًا.`,Xge=e=>`¿Eliminar “${e==null?void 0:e.title}”? +سيُحذف سجل المحادثة نهائيًا.`,D1e=e=>`¿Eliminar “${e==null?void 0:e.title}”? -Su transcripción se eliminará de forma permanente.`,Yge=e=>`“${e==null?void 0:e.title}” हटाएं? +Su transcripción se eliminará de forma permanente.`,L1e=e=>`“${e==null?void 0:e.title}” हटाएं? -इसका ट्रांसक्रिप्ट स्थायी रूप से हट जाएगा।`,Zge=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vge(e):t==="fa"?Wge(e):t==="ar"?Qge(e):t==="es"?Xge(e):t==="hi"?Yge(e):Kge(e)}),Jge=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,e1e=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,t1e=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,n1e=e=>`تعذّر حذف «${e==null?void 0:e.title}»: ${e==null?void 0:e.error}`,r1e=e=>`No se pudo eliminar “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,s1e=e=>`“${e==null?void 0:e.title}” हटाने में विफल: ${e==null?void 0:e.error}`,i1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?e1e(e):t==="fa"?t1e(e):t==="ar"?n1e(e):t==="es"?r1e(e):t==="hi"?s1e(e):Jge(e)}),a1e=()=>"Could not exit Plan mode. Try again.",o1e=()=>"无法退出计划模式。请重试。",c1e=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",l1e=()=>"تعذّر الخروج من وضع التخطيط. حاول مجددًا.",u1e=()=>"No se pudo salir del modo Plan. Inténtalo de nuevo.",_1e=()=>"प्लान मोड से बाहर नहीं निकला जा सका। फिर से कोशिश करें।",f1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o1e():t==="fa"?c1e():t==="ar"?l1e():t==="es"?u1e():t==="hi"?_1e():a1e()}),d1e=()=>"Expand tool activity",h1e=()=>"展开工具活动",p1e=()=>"باز کردن فعالیت ابزارها",m1e=()=>"توسيع نشاط الأداة",g1e=()=>"Expandir actividad de herramientas",v1e=()=>"टूल गतिविधि फैलाएं",b1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h1e():t==="fa"?p1e():t==="ar"?m1e():t==="es"?g1e():t==="hi"?v1e():d1e()}),y1e=()=>"experiments",x1e=()=>"实验",w1e=()=>"آزمایش‌ها",k1e=()=>"التجارب",S1e=()=>"experimentos",C1e=()=>"प्रयोग",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=()=>"You",z1e=()=>"你",j1e=()=>"شما",A1e=()=>"أنت",T1e=()=>"Tú",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=()=>"Goal cleared",D1e=()=>"已清除目标",L1e=()=>"هدف پاک شد",I1e=()=>"تم مسح الهدف",$1e=()=>"Objetivo borrado",B1e=()=>"लक्ष्य हटाया गया",P1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D1e():t==="fa"?L1e():t==="ar"?I1e():t==="es"?$1e():t==="hi"?B1e():O1e()}),F1e=e=>`Current goal: ${e==null?void 0:e.goal}`,H1e=e=>`当前目标:${e==null?void 0:e.goal}`,q1e=e=>`هدف فعلی: ${e==null?void 0:e.goal}`,U1e=e=>`الهدف الحالي: ${e==null?void 0:e.goal}`,G1e=e=>`Objetivo actual: ${e==null?void 0:e.goal}`,K1e=e=>`मौजूदा लक्ष्य: ${e==null?void 0:e.goal}`,V1e=((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"?K1e(e):F1e(e)}),W1e=e=>`Setting the goal failed: ${e==null?void 0:e.error}`,Q1e=e=>`设置目标失败:${e==null?void 0:e.error}`,X1e=e=>`تنظیم هدف ناموفق بود: ${e==null?void 0:e.error}`,Y1e=e=>`فشل تعيين الهدف: ${e==null?void 0:e.error}`,Z1e=e=>`Error al definir el objetivo: ${e==null?void 0:e.error}`,J1e=e=>`लक्ष्य सेट करना विफल: ${e==null?void 0:e.error}`,ON=((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)}),eve=()=>"No goal set — add one after /goal",tve=()=>"尚未设置目标 — 在 /goal 后面写一个",nve=()=>"هدفی تنظیم نشده — یکی را بعد از /goal بنویسید",rve=()=>"لا يوجد هدف — أضف واحدًا بعد /goal",sve=()=>"Sin objetivo — añade uno después de /goal",ive=()=>"कोई लक्ष्य नहीं — /goal के बाद एक जोड़ें",ave=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tve():t==="fa"?nve():t==="ar"?rve():t==="es"?sve():t==="hi"?ive():eve()}),ove=()=>"Goal set",cve=()=>"已设置目标",lve=()=>"هدف تنظیم شد",uve=()=>"تم تعيين الهدف",_ve=()=>"Objetivo definido",fve=()=>"लक्ष्य सेट किया गया",dve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cve():t==="fa"?lve():t==="ar"?uve():t==="es"?_ve():t==="hi"?fve():ove()}),hve=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,pve=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,mve=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,gve=e=>`${e==null?void 0:e.harness} غير متاح — افتح مُنتقي النماذج`,vve=e=>`${e==null?void 0:e.harness} no está disponible — abre el selector de modelos`,bve=e=>`${e==null?void 0:e.harness} उपलब्ध नहीं है — मॉडल पिकर खोलें`,yve=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pve(e):t==="fa"?mve(e):t==="ar"?gve(e):t==="es"?vve(e):t==="hi"?bve(e):hve(e)}),xve=e=>`Importing that chat failed: ${e==null?void 0:e.error}`,wve=e=>`导入该聊天失败:${e==null?void 0:e.error}`,kve=e=>`وارد کردن آن گفت‌وگو ناموفق بود: ${e==null?void 0:e.error}`,Sve=e=>`فشل استيراد تلك المحادثة: ${e==null?void 0:e.error}`,Cve=e=>`Error al importar ese chat: ${e==null?void 0:e.error}`,Eve=e=>`उस चैट को इम्पोर्ट करना विफल: ${e==null?void 0:e.error}`,Nve=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wve(e):t==="fa"?kve(e):t==="ar"?Sve(e):t==="es"?Cve(e):t==="hi"?Eve(e):xve(e)}),zve=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,jve=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,Ave=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,Tve=e=>`راسِل ${e==null?void 0:e.harness}… (/ للأوامر والمهارات، ! للطرفية)`,Rve=e=>`Escribe a ${e==null?void 0:e.harness}… (/ para comandos y skills, ! para la shell)`,Mve=e=>`${e==null?void 0:e.harness} को संदेश भेजें… (कमांड और स्किल के लिए /, शेल के लिए !)`,Ove=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jve(e):t==="fa"?Ave(e):t==="ar"?Tve(e):t==="es"?Rve(e):t==="hi"?Mve(e):zve(e)}),Dve=e=>`Message not sent: ${e==null?void 0:e.error}`,Lve=e=>`消息未发送:${e==null?void 0:e.error}`,Ive=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,$ve=e=>`لم تُرسل الرسالة: ${e==null?void 0:e.error}`,Bve=e=>`Mensaje no enviado: ${e==null?void 0:e.error}`,Pve=e=>`संदेश नहीं भेजा गया: ${e==null?void 0:e.error}`,Fve=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Lve(e):t==="fa"?Ive(e):t==="ar"?$ve(e):t==="es"?Bve(e):t==="hi"?Pve(e):Dve(e)}),Hve=()=>"Model unavailable",qve=()=>"模型不可用",Uve=()=>"مدل در دسترس نیست",Gve=()=>"النموذج غير متاح",Kve=()=>"Modelo no disponible",Vve=()=>"मॉडल उपलब्ध नहीं",Wve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qve():t==="fa"?Uve():t==="ar"?Gve():t==="es"?Kve():t==="hi"?Vve():Hve()}),Qve=()=>"New session",Xve=()=>"新会话",Yve=()=>"نشست جدید",Zve=()=>"جلسة جديدة",Jve=()=>"Nueva sesión",ebe=()=>"नया सेशन",DN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xve():t==="fa"?Yve():t==="ar"?Zve():t==="es"?Jve():t==="hi"?ebe():Qve()}),tbe=()=>"No active sessions",nbe=()=>"没有活跃会话",rbe=()=>"نشست فعالی وجود ندارد",sbe=()=>"لا توجد جلسات نشطة",ibe=()=>"No hay sesiones activas",abe=()=>"कोई सक्रिय सेशन नहीं",obe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nbe():t==="fa"?rbe():t==="ar"?sbe():t==="es"?ibe():t==="hi"?abe():tbe()}),cbe=()=>"No activity",lbe=()=>"无活动",ube=()=>"بدون فعالیت",_be=()=>"لا يوجد نشاط",fbe=()=>"Sin actividad",dbe=()=>"कोई गतिविधि नहीं",hbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lbe():t==="fa"?ube():t==="ar"?_be():t==="es"?fbe():t==="hi"?dbe():cbe()}),pbe=()=>"No archived sessions",mbe=()=>"没有已归档的会话",gbe=()=>"نشست بایگانی‌شده‌ای وجود ندارد",vbe=()=>"لا توجد جلسات مؤرشفة",bbe=()=>"No hay sesiones archivadas",ybe=()=>"कोई आर्काइव किया गया सेशन नहीं",xbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mbe():t==="fa"?gbe():t==="ar"?vbe():t==="es"?bbe():t==="hi"?ybe():pbe()}),wbe=()=>"No sessions yet",kbe=()=>"还没有会话",Sbe=()=>"هنوز نشستی وجود ندارد",Cbe=()=>"لا توجد جلسات بعد",Ebe=()=>"Aún no hay sesiones",Nbe=()=>"अभी तक कोई सेशन नहीं",zbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kbe():t==="fa"?Sbe():t==="ar"?Cbe():t==="es"?Ebe():t==="hi"?Nbe():wbe()}),jbe=()=>"There is nothing to compact yet",Abe=()=>"还没有可压缩的内容",Tbe=()=>"هنوز چیزی برای فشرده‌سازی وجود ندارد",Rbe=()=>"لا يوجد شيء لضغطه بعد",Mbe=()=>"Aún no hay nada que comprimir",Obe=()=>"छोटा करने के लिए अभी कुछ नहीं है",Dbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Abe():t==="fa"?Tbe():t==="ar"?Rbe():t==="es"?Mbe():t==="hi"?Obe():jbe()}),Lbe=()=>"No response to copy yet",Ibe=()=>"还没有可复制的回复",$be=()=>"هنوز پاسخی برای کپی وجود ندارد",Bbe=()=>"لا يوجد رد لنسخه بعد",Pbe=()=>"Aún no hay ninguna respuesta que copiar",Fbe=()=>"कॉपी करने के लिए अभी कोई जवाब नहीं है",Hbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ibe():t==="fa"?$be():t==="ar"?Bbe():t==="es"?Pbe():t==="hi"?Fbe():Lbe()}),qbe=()=>"Nothing to export yet",Ube=()=>"还没有可导出的内容",Gbe=()=>"هنوز چیزی برای خروجی گرفتن وجود ندارد",Kbe=()=>"لا يوجد شيء لتصديره بعد",Vbe=()=>"Aún no hay nada que exportar",Wbe=()=>"एक्सपोर्ट करने के लिए अभी कुछ नहीं है",Qbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ube():t==="fa"?Gbe():t==="ar"?Kbe():t==="es"?Vbe():t==="hi"?Wbe():qbe()}),Xbe=()=>"1 annotation",Ybe=()=>"1 条批注",Zbe=()=>"۱ یادداشت",Jbe=()=>"تعليق واحد",eye=()=>"1 anotación",tye=()=>"1 एनोटेशन",nye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ybe():t==="fa"?Zbe():t==="ar"?Jbe():t==="es"?eye():t==="hi"?tye():Xbe()}),rye=()=>"Open sub-agent transcript",sye=()=>"打开子智能体记录",iye=()=>"باز کردن متن گفت‌وگوی عامل فرعی",aye=()=>"فتح سجل محادثة الوكيل الفرعي",oye=()=>"Abrir la transcripción del subagente",cye=()=>"सब-एजेंट ट्रांसक्रिप्ट खोलें",lye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sye():t==="fa"?iye():t==="ar"?aye():t==="es"?oye():t==="hi"?cye():rye()}),uye=()=>"About this demo",_ye=()=>"关于此演示",fye=()=>"دربارهٔ این نسخهٔ نمایشی",dye=()=>"حول هذا العرض التوضيحي",hye=()=>"Acerca de esta demo",pye=()=>"इस डेमो के बारे में",LN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ye():t==="fa"?fye():t==="ar"?dye():t==="es"?hye():t==="hi"?pye():uye()}),mye=()=>"Accept and auto mode",gye=()=>"接受并使用自动模式",vye=()=>"پذیرش و حالت خودکار",bye=()=>"قبول وتفعيل الوضع التلقائي",yye=()=>"Aceptar en modo automático",xye=()=>"स्वीकार करें और ऑटो मोड",wye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gye():t==="fa"?vye():t==="ar"?bye():t==="es"?yye():t==="hi"?xye():mye()}),kye=()=>"Accept and bypass all",Sye=()=>"接受并跳过所有审批",Cye=()=>"پذیرش و عبور از همهٔ تأییدها",Eye=()=>"القبول وتجاوز الكل",Nye=()=>"Aceptar y omitir permisos",zye=()=>"स्वीकार करें और सब बायपास करें",jye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sye():t==="fa"?Cye():t==="ar"?Eye():t==="es"?Nye():t==="hi"?zye():kye()}),Aye=()=>"Active",Tye=()=>"活跃",Rye=()=>"فعال",Mye=()=>"نشط",Oye=()=>"Activas",Dye=()=>"सक्रिय",Lye=((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()}),Iye=()=>"All",$ye=()=>"全部",Bye=()=>"همه",Pye=()=>"الكل",Fye=()=>"Todas",Hye=()=>"सभी",qye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ye():t==="fa"?Bye():t==="ar"?Pye():t==="es"?Fye():t==="hi"?Hye():Iye()}),Uye=()=>"Allow",Gye=()=>"允许",Kye=()=>"اجازه دادن",Vye=()=>"السماح",Wye=()=>"Permitir",Qye=()=>"अनुमति दें",Xye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gye():t==="fa"?Kye():t==="ar"?Vye():t==="es"?Wye():t==="hi"?Qye():Uye()}),Yye=()=>"Approval required",Zye=()=>"需要批准",Jye=()=>"نیازمند تأیید",exe=()=>"الموافقة مطلوبة",txe=()=>"Aprobación necesaria",nxe=()=>"स्वीकृति ज़रूरी है",rxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zye():t==="fa"?Jye():t==="ar"?exe():t==="es"?txe():t==="hi"?nxe():Yye()}),sxe=()=>"Archived",ixe=()=>"已归档",axe=()=>"بایگانی‌شده",oxe=()=>"مؤرشف",cxe=()=>"Archivadas",lxe=()=>"आर्काइव किया गया",IN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ixe():t==="fa"?axe():t==="ar"?oxe():t==="es"?cxe():t==="hi"?lxe():sxe()}),uxe=()=>"Ask about this",_xe=()=>"询问此内容",fxe=()=>"دربارهٔ این بپرسید",dxe=()=>"اسأل عن هذا",hxe=()=>"Preguntar sobre esto",pxe=()=>"इसके बारे में पूछें",mxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_xe():t==="fa"?fxe():t==="ar"?dxe():t==="es"?hxe():t==="hi"?pxe():uxe()}),gxe=()=>"Attach a PDF or image",vxe=()=>"附加 PDF 或图片",bxe=()=>"پیوست PDF یا تصویر",yxe=()=>"إرفاق ملف PDF أو صورة",xxe=()=>"Adjuntar un PDF o una imagen",wxe=()=>"PDF या इमेज अटैच करें",$N=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vxe():t==="fa"?bxe():t==="ar"?yxe():t==="es"?xxe():t==="hi"?wxe():gxe()}),kxe=()=>"Bash",Sxe=()=>"Bash",Cxe=()=>"Bash",Exe=()=>"Bash",Nxe=()=>"Bash",zxe=()=>"Bash",uL=((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=()=>"Browsed the web",Axe=()=>"已浏览网页",Txe=()=>"وب مرور شد",Rxe=()=>"تصفّح الويب",Mxe=()=>"Navegó por la web",Oxe=()=>"वेब ब्राउज़ किया",BN=((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()}),Dxe=()=>"Built the project",Lxe=()=>"已构建项目",Ixe=()=>"پروژه ساخته شد",$xe=()=>"بنى المشروع",Bxe=()=>"Compiló el proyecto",Pxe=()=>"प्रोजेक्ट बिल्ड किया",Fxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lxe():t==="fa"?Ixe():t==="ar"?$xe():t==="es"?Bxe():t==="hi"?Pxe():Dxe()}),Hxe=()=>"Cancel",qxe=()=>"取消",Uxe=()=>"لغو",Gxe=()=>"إلغاء",Kxe=()=>"Cancelar",Vxe=()=>"रद्द करें",Wxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qxe():t==="fa"?Uxe():t==="ar"?Gxe():t==="es"?Kxe():t==="hi"?Vxe():Hxe()}),Qxe=()=>"Cancelled an experiment run",Xxe=()=>"已取消实验运行",Yxe=()=>"اجرای آزمایش لغو شد",Zxe=()=>"ألغى تشغيل تجربة",Jxe=()=>"Canceló una ejecución de experimento",e2e=()=>"एक प्रयोग रन रद्द किया",t2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xxe():t==="fa"?Yxe():t==="ar"?Zxe():t==="es"?Jxe():t==="hi"?e2e():Qxe()}),n2e=()=>"Checked code style",r2e=()=>"已检查代码风格",s2e=()=>"سبک کد بررسی شد",i2e=()=>"فحص نمط الشيفرة",a2e=()=>"Revisó el estilo del código",o2e=()=>"कोड स्टाइल जाँची",c2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r2e():t==="fa"?s2e():t==="ar"?i2e():t==="es"?a2e():t==="hi"?o2e():n2e()}),l2e=()=>"Checked compute options",u2e=()=>"已检查算力选项",_2e=()=>"گزینه‌های رایانشی بررسی شد",f2e=()=>"فحص خيارات الحوسبة",d2e=()=>"Consultó las opciones de cómputo",h2e=()=>"कंप्यूट विकल्प जाँचे",p2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u2e():t==="fa"?_2e():t==="ar"?f2e():t==="es"?d2e():t==="hi"?h2e():l2e()}),m2e=()=>"Checked experiment status",g2e=()=>"已检查实验状态",v2e=()=>"وضعیت آزمایش بررسی شد",b2e=()=>"فحص حالة التجربة",y2e=()=>"Consultó el estado del experimento",x2e=()=>"प्रयोग की स्थिति जाँची",PN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g2e():t==="fa"?v2e():t==="ar"?b2e():t==="es"?y2e():t==="hi"?x2e():m2e()}),w2e=()=>"Checked Git status",k2e=()=>"已检查 Git 状态",S2e=()=>"وضعیت Git بررسی شد",C2e=()=>"فحص حالة Git",E2e=()=>"Consultó el estado de Git",N2e=()=>"Git स्थिति जाँची",z2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k2e():t==="fa"?S2e():t==="ar"?C2e():t==="es"?E2e():t==="hi"?N2e():w2e()}),j2e=()=>"Checked local times",A2e=()=>"已查询当地时间",T2e=()=>"زمان‌های محلی بررسی شد",R2e=()=>"فحص التوقيتات المحلية",M2e=()=>"Consultó horas locales",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=()=>"Checked market data",I2e=()=>"已查询市场数据",$2e=()=>"داده‌های بازار بررسی شد",B2e=()=>"فحص بيانات السوق",P2e=()=>"Consultó datos de mercado",F2e=()=>"बाज़ार डेटा जाँचा",H2e=((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()}),q2e=()=>"Checked sports data",U2e=()=>"已查询体育数据",G2e=()=>"داده‌های ورزشی بررسی شد",K2e=()=>"فحص البيانات الرياضية",V2e=()=>"Consultó datos deportivos",W2e=()=>"खेल डेटा जाँचा",Q2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U2e():t==="fa"?G2e():t==="ar"?K2e():t==="es"?V2e():t==="hi"?W2e():q2e()}),X2e=()=>"Checked the weather",Y2e=()=>"已查询天气",Z2e=()=>"آب‌وهوا بررسی شد",J2e=()=>"فحص حالة الطقس",ewe=()=>"Consultó el tiempo",twe=()=>"मौसम जाँचा",nwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y2e():t==="fa"?Z2e():t==="ar"?J2e():t==="es"?ewe():t==="hi"?twe():X2e()}),rwe=()=>"Checked types",swe=()=>"已检查类型",iwe=()=>"نوع‌ها بررسی شد",awe=()=>"فحص الأنواع",owe=()=>"Comprobó los tipos",cwe=()=>"टाइप जाँचे",lwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?swe():t==="fa"?iwe():t==="ar"?awe():t==="es"?owe():t==="hi"?cwe():rwe()}),uwe=()=>"Clear annotations",_we=()=>"清除批注",fwe=()=>"پاک کردن یادداشت‌ها",dwe=()=>"مسح التعليقات",hwe=()=>"Borrar anotaciones",pwe=()=>"एनोटेशन साफ़ करें",FN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_we():t==="fa"?fwe():t==="ar"?dwe():t==="es"?hwe():t==="hi"?pwe():uwe()}),mwe=e=>`Clear the goal: ${e==null?void 0:e.goal}`,gwe=e=>`清除目标:${e==null?void 0:e.goal}`,vwe=e=>`پاک‌کردن هدف: ${e==null?void 0:e.goal}`,bwe=e=>`مسح الهدف: ${e==null?void 0:e.goal}`,ywe=e=>`Borrar el objetivo: ${e==null?void 0:e.goal}`,xwe=e=>`लक्ष्य हटाएँ: ${e==null?void 0:e.goal}`,HN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gwe(e):t==="fa"?vwe(e):t==="ar"?bwe(e):t==="es"?ywe(e):t==="hi"?xwe(e):mwe(e)}),wwe=()=>"Customize",kwe=()=>"自定义",Swe=()=>"سفارشی‌سازی",Cwe=()=>"تخصيص",Ewe=()=>"Personalizar",Nwe=()=>"कस्टमाइज़ करें",zwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kwe():t==="fa"?Swe():t==="ar"?Cwe():t==="es"?Ewe():t==="hi"?Nwe():wwe()}),jwe=()=>"Data sources",Awe=()=>"数据源",Twe=()=>"منابع داده",Rwe=()=>"مصادر البيانات",Mwe=()=>"Fuentes de datos",Owe=()=>"डेटा स्रोत",fw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Awe():t==="fa"?Twe():t==="ar"?Rwe():t==="es"?Mwe():t==="hi"?Owe():jwe()}),Dwe=()=>"Delegated a task to a new agent",Lwe=()=>"已将任务委派给新智能体",Iwe=()=>"وظیفه به عامل جدید واگذار شد",$we=()=>"فوّض مهمة إلى وكيل جديد",Bwe=()=>"Delegó una tarea a un nuevo agente",Pwe=()=>"एक नए एजेंट को टास्क सौंपा",Fwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lwe():t==="fa"?Iwe():t==="ar"?$we():t==="es"?Bwe():t==="hi"?Pwe():Dwe()}),Hwe=()=>"Delete",qwe=()=>"删除",Uwe=()=>"حذف",Gwe=()=>"حذف",Kwe=()=>"Eliminar",Vwe=()=>"हटाएं",_L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qwe():t==="fa"?Uwe():t==="ar"?Gwe():t==="es"?Kwe():t==="hi"?Vwe():Hwe()}),Wwe=()=>"This prompt runs a small 200-step training probe on your machine. Hit enter to get started.",Qwe=()=>"这条提示会在你的机器上运行一个小型 200 步训练探测。按 Enter 开始。",Xwe=()=>"این پیام یک کاوش آموزشی کوچک ۲۰۰ مرحله‌ای روی دستگاه شما اجرا می‌کند. برای شروع Enter را بزنید.",Ywe=()=>"يشغّل هذا الطلب اختبار تدريب صغيرًا من 200 خطوة على جهازك. اضغط Enter للبدء.",Zwe=()=>"Este prompt ejecuta en tu equipo una pequeña prueba de entrenamiento de 200 pasos. Pulsa Intro para empezar.",Jwe=()=>"यह प्रॉम्प्ट आपकी मशीन पर एक छोटा 200-स्टेप ट्रेनिंग परीक्षण चलाता है। शुरू करने के लिए एंटर दबाएं।",e4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qwe():t==="fa"?Xwe():t==="ar"?Ywe():t==="es"?Zwe():t==="hi"?Jwe():Wwe()}),t4e=()=>"to monitor it.",n4e=()=>"以查看进度。",r4e=()=>"بزنید.",s4e=()=>"لمتابعتها.",i4e=()=>"para seguirlo.",a4e=()=>"इस पर नज़र रखने के लिए।",qN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n4e():t==="fa"?r4e():t==="ar"?s4e():t==="es"?i4e():t==="hi"?a4e():t4e()}),o4e=()=>"The experiment is now running. Tap",c4e=()=>"实验正在运行。点按",l4e=()=>"آزمایش اکنون در حال اجراست. برای پیگیری روی",u4e=()=>"التجربة قيد التشغيل الآن. اضغط على",_4e=()=>"El experimento ya se está ejecutando. Pulsa",f4e=()=>"प्रयोग अब चल रहा है। टैप करें",UN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c4e():t==="fa"?l4e():t==="ar"?u4e():t==="es"?_4e():t==="hi"?f4e():o4e()}),d4e=()=>"Deny",h4e=()=>"拒绝",p4e=()=>"رد کردن",m4e=()=>"رفض",g4e=()=>"Denegar",v4e=()=>"अस्वीकार करें",b4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h4e():t==="fa"?p4e():t==="ar"?m4e():t==="es"?g4e():t==="hi"?v4e():d4e()}),y4e=()=>"Dismiss",x4e=()=>"关闭",w4e=()=>"بستن",k4e=()=>"إغلاق",S4e=()=>"Cerrar",C4e=()=>"खारिज करें",s1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x4e():t==="fa"?w4e():t==="ar"?k4e():t==="es"?S4e():t==="hi"?C4e():y4e()}),E4e=()=>"Edit and re-send",N4e=()=>"编辑并重新发送",z4e=()=>"ویرایش و ارسال دوباره",j4e=()=>"تعديل وإعادة الإرسال",A4e=()=>"Editar y reenviar",T4e=()=>"संपादित करें और फिर भेजें",GN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N4e():t==="fa"?z4e():t==="ar"?j4e():t==="es"?A4e():t==="hi"?T4e():E4e()}),R4e=()=>"Edit message",M4e=()=>"编辑消息",O4e=()=>"ویرایش پیام",D4e=()=>"تعديل الرسالة",L4e=()=>"Editar mensaje",I4e=()=>"संदेश संपादित करें",$4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M4e():t==="fa"?O4e():t==="ar"?D4e():t==="es"?L4e():t==="hi"?I4e():R4e()}),B4e=()=>"Edited a file",P4e=()=>"已编辑文件",F4e=()=>"فایل ویرایش شد",H4e=()=>"عدّل ملفًا",q4e=()=>"Editó un archivo",U4e=()=>"एक फ़ाइल संपादित की",KN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P4e():t==="fa"?F4e():t==="ar"?H4e():t==="es"?q4e():t==="hi"?U4e():B4e()}),G4e=()=>"Exit Bash mode",K4e=()=>"退出 Bash 模式",V4e=()=>"خروج از حالت Bash",W4e=()=>"الخروج من وضع Bash",Q4e=()=>"Salir del modo Bash",X4e=()=>"Bash मोड से बाहर निकलें",VN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K4e():t==="fa"?V4e():t==="ar"?W4e():t==="es"?Q4e():t==="hi"?X4e():G4e()}),Y4e=()=>"Exit Plan mode",Z4e=()=>"退出计划模式",J4e=()=>"خروج از حالت طرح",e3e=()=>"الخروج من وضع التخطيط",t3e=()=>"Salir del modo Plan",n3e=()=>"प्लान मोड से बाहर निकलें",WN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z4e():t==="fa"?J4e():t==="ar"?e3e():t==="es"?t3e():t==="hi"?n3e():Y4e()}),r3e=()=>"Failed:",s3e=()=>"失败:",i3e=()=>"ناموفق:",a3e=()=>"فشل:",o3e=()=>"Error:",c3e=()=>"विफल:",vS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s3e():t==="fa"?i3e():t==="ar"?a3e():t==="es"?o3e():t==="hi"?c3e():r3e()}),l3e=()=>"Filter sessions",u3e=()=>"筛选会话",_3e=()=>"فیلتر نشست‌ها",f3e=()=>"تصفية الجلسات",d3e=()=>"Filtrar sesiones",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=()=>"Goal",m3e=()=>"目标",g3e=()=>"هدف",v3e=()=>"الهدف",b3e=()=>"Objetivo",y3e=()=>"लक्ष्य",x3e=((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()}),w3e=()=>"is unavailable.",k3e=()=>"不可用。",S3e=()=>"در دسترس نیست.",C3e=()=>"غير متاح.",E3e=()=>"no está disponible.",N3e=()=>"उपलब्ध नहीं है।",z3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k3e():t==="fa"?S3e():t==="ar"?C3e():t==="es"?E3e():t==="hi"?N3e():w3e()}),j3e=()=>"Later queued messages will wait until this is retried or removed.",A3e=()=>"后续排队的消息会等待此消息重试或移除。",T3e=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",R3e=()=>"ستنتظر الرسائل التالية في قائمة الانتظار حتى تُعاد المحاولة أو تُزال هذه الرسالة.",M3e=()=>"Los mensajes que están después en la cola esperarán hasta que este se reintente o se quite.",O3e=()=>"बाद में कतार में लगे संदेश तब तक रुके रहेंगे जब तक इसे फिर से कोशिश न किया जाए या हटाया न जाए।",D3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A3e():t==="fa"?T3e():t==="ar"?R3e():t==="es"?M3e():t==="hi"?O3e():j3e()}),L3e=()=>"Listed files",I3e=()=>"已列出文件",$3e=()=>"فایل‌ها فهرست شد",B3e=()=>"سرد الملفات",P3e=()=>"Listó archivos",F3e=()=>"फ़ाइलों की सूची बनाई",XN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I3e():t==="fa"?$3e():t==="ar"?B3e():t==="es"?P3e():t==="hi"?F3e():L3e()}),H3e=()=>"Listed project runs",q3e=()=>"已列出项目运行",U3e=()=>"اجراهای پروژه فهرست شد",G3e=()=>"سرد عمليات تشغيل المشروع",K3e=()=>"Listó las ejecuciones del proyecto",V3e=()=>"प्रोजेक्ट रन की सूची बनाई",W3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q3e():t==="fa"?U3e():t==="ar"?G3e():t==="es"?K3e():t==="hi"?V3e():H3e()}),Q3e=()=>"Listed projects",X3e=()=>"已列出项目",Y3e=()=>"پروژه‌ها فهرست شد",Z3e=()=>"سرد المشاريع",J3e=()=>"Listó proyectos",e5e=()=>"प्रोजेक्ट की सूची बनाई",t5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X3e():t==="fa"?Y3e():t==="ar"?Z3e():t==="es"?J3e():t==="hi"?e5e():Q3e()}),n5e=()=>"Loading conversation…",r5e=()=>"正在加载对话…",s5e=()=>"در حال بارگیری گفتگو…",i5e=()=>"جارٍ تحميل المحادثة…",a5e=()=>"Cargando conversación…",o5e=()=>"बातचीत लोड हो रही है…",c5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r5e():t==="fa"?s5e():t==="ar"?i5e():t==="es"?a5e():t==="hi"?o5e():n5e()}),l5e=()=>"New Chat",u5e=()=>"新对话",_5e=()=>"گفتگوی جدید",f5e=()=>"محادثة جديدة",d5e=()=>"Nuevo chat",h5e=()=>"नई चैट",p5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u5e():t==="fa"?_5e():t==="ar"?f5e():t==="es"?d5e():t==="hi"?h5e():l5e()}),m5e=()=>"Next version",g5e=()=>"下一版本",v5e=()=>"نسخهٔ بعدی",b5e=()=>"النسخة التالية",y5e=()=>"Siguiente versión",x5e=()=>"अगला वर्शन",YN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g5e():t==="fa"?v5e():t==="ar"?b5e():t==="es"?y5e():t==="hi"?x5e():m5e()}),w5e=()=>"Open the session this agent spawned",k5e=()=>"打开此智能体创建的会话",S5e=()=>"باز کردن نشست ساخته‌شده توسط این عامل",C5e=()=>"فتح الجلسة التي أنشأها هذا الوكيل",E5e=()=>"Abrir la sesión que creó este agente",N5e=()=>"इस एजेंट द्वारा शुरू किया गया सेशन खोलें",z5e=((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()}),j5e=()=>"Opened web pages",A5e=()=>"已打开网页",T5e=()=>"صفحه‌های وب باز شد",R5e=()=>"فتح صفحات ويب",M5e=()=>"Abrió páginas web",O5e=()=>"वेब पेज खोले",D5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A5e():t==="fa"?T5e():t==="ar"?R5e():t==="es"?M5e():t==="hi"?O5e():j5e()}),L5e=()=>"Plan",I5e=()=>"计划",$5e=()=>"طرح",B5e=()=>"خطة",P5e=()=>"Plan",F5e=()=>"प्लान",H5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I5e():t==="fa"?$5e():t==="ar"?B5e():t==="es"?P5e():t==="hi"?F5e():L5e()}),q5e=()=>"Plan approved",U5e=()=>"计划已批准",G5e=()=>"طرح تأیید شد",K5e=()=>"تمت الموافقة على الخطة",V5e=()=>"Plan aprobado",W5e=()=>"प्लान स्वीकृत",Q5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U5e():t==="fa"?G5e():t==="ar"?K5e():t==="es"?V5e():t==="hi"?W5e():q5e()}),X5e=()=>"Plan rejected",Y5e=()=>"计划已拒绝",Z5e=()=>"طرح رد شد",J5e=()=>"رُفضت الخطة",eke=()=>"Plan rechazado",tke=()=>"प्लान अस्वीकृत",nke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y5e():t==="fa"?Z5e():t==="ar"?J5e():t==="es"?eke():t==="hi"?tke():X5e()}),rke=()=>"Plan resolved",ske=()=>"计划已处理",ike=()=>"طرح تعیین تکلیف شد",ake=()=>"تمت معالجة الخطة",oke=()=>"Plan resuelto",cke=()=>"प्लान सुलझाया गया",lke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ske():t==="fa"?ike():t==="ar"?ake():t==="es"?oke():t==="hi"?cke():rke()}),uke=()=>"Plan revision requested",_ke=()=>"已请求修改计划",fke=()=>"درخواست بازنگری طرح ثبت شد",dke=()=>"طُلب تعديل الخطة",hke=()=>"Cambios en el plan solicitados",pke=()=>"प्लान में बदलाव का अनुरोध",mke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ke():t==="fa"?fke():t==="ar"?dke():t==="es"?hke():t==="hi"?pke():uke()}),gke=()=>"Previous version",vke=()=>"上一版本",bke=()=>"نسخهٔ قبلی",yke=()=>"النسخة السابقة",xke=()=>"Versión anterior",wke=()=>"पिछला वर्शन",ZN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vke():t==="fa"?bke():t==="ar"?yke():t==="es"?xke():t==="hi"?wke():gke()}),kke=()=>"Ran a command",Ske=()=>"已运行命令",Cke=()=>"فرمان اجرا شد",Eke=()=>"نفّذ أمرًا",Nke=()=>"Ejecutó un comando",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=()=>"Ran tests",Tke=()=>"已运行测试",Rke=()=>"آزمون‌ها اجرا شد",Mke=()=>"شغّل الاختبارات",Oke=()=>"Ejecutó tests",Dke=()=>"टेस्ट चलाए",Lke=((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()}),Ike=()=>"Read a file",$ke=()=>"已读取文件",Bke=()=>"فایل خوانده شد",Pke=()=>"قرأ ملفًا",Fke=()=>"Leyó un archivo",Hke=()=>"एक फ़ाइल पढ़ी",qke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ke():t==="fa"?Bke():t==="ar"?Pke():t==="es"?Fke():t==="hi"?Hke():Ike()}),Uke=()=>"Read Git history",Gke=()=>"已读取 Git 历史",Kke=()=>"تاریخچهٔ Git خوانده شد",Vke=()=>"قرأ سجل Git",Wke=()=>"Leyó el historial de Git",Qke=()=>"Git इतिहास पढ़ा",Xke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gke():t==="fa"?Kke():t==="ar"?Vke():t==="es"?Wke():t==="hi"?Qke():Uke()}),Yke=()=>"Read project details",Zke=()=>"已读取项目详情",Jke=()=>"جزئیات پروژه خوانده شد",eSe=()=>"قرأ تفاصيل المشروع",tSe=()=>"Leyó los detalles del proyecto",nSe=()=>"प्रोजेक्ट विवरण पढ़ा",rSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zke():t==="fa"?Jke():t==="ar"?eSe():t==="es"?tSe():t==="hi"?nSe():Yke()}),sSe=()=>"Reject",iSe=()=>"拒绝",aSe=()=>"رد کردن",oSe=()=>"رفض",cSe=()=>"Rechazar",lSe=()=>"अस्वीकार करें",uSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iSe():t==="fa"?aSe():t==="ar"?oSe():t==="es"?cSe():t==="hi"?lSe():sSe()}),_Se=()=>"Remove",fSe=()=>"移除",dSe=()=>"حذف",hSe=()=>"إزالة",pSe=()=>"Quitar",mSe=()=>"हटाएं",gSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fSe():t==="fa"?dSe():t==="ar"?hSe():t==="es"?pSe():t==="hi"?mSe():_Se()}),vSe=()=>"Remove annotation",bSe=()=>"移除批注",ySe=()=>"حذف یادداشت",xSe=()=>"إزالة التعليق",wSe=()=>"Quitar anotación",kSe=()=>"एनोटेशन हटाएं",SSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bSe():t==="fa"?ySe():t==="ar"?xSe():t==="es"?wSe():t==="hi"?kSe():vSe()}),CSe=()=>"Remove file",ESe=()=>"移除文件",NSe=()=>"حذف فایل",zSe=()=>"إزالة الملف",jSe=()=>"Quitar archivo",ASe=()=>"फ़ाइल हटाएं",JN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ESe():t==="fa"?NSe():t==="ar"?zSe():t==="es"?jSe():t==="hi"?ASe():CSe()}),TSe=()=>"Remove image",RSe=()=>"移除图片",MSe=()=>"حذف تصویر",OSe=()=>"إزالة الصورة",DSe=()=>"Quitar imagen",LSe=()=>"इमेज हटाएं",ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RSe():t==="fa"?MSe():t==="ar"?OSe():t==="es"?DSe():t==="hi"?LSe():TSe()}),ISe=()=>"Remove queued message",$Se=()=>"移除排队消息",BSe=()=>"حذف پیام صف",PSe=()=>"إزالة الرسالة من قائمة الانتظار",FSe=()=>"Quitar mensaje en cola",HSe=()=>"कतार में लगा संदेश हटाएं",tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Se():t==="fa"?BSe():t==="ar"?PSe():t==="es"?FSe():t==="hi"?HSe():ISe()}),qSe=()=>"Rename",USe=()=>"重命名",GSe=()=>"تغییر نام",KSe=()=>"إعادة تسمية",VSe=()=>"Renombrar",WSe=()=>"नाम बदलें",fL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?USe():t==="fa"?GSe():t==="ar"?KSe():t==="es"?VSe():t==="hi"?WSe():qSe()}),QSe=()=>"Reviewed code changes",XSe=()=>"已审查代码更改",YSe=()=>"تغییرات کد بازبینی شد",ZSe=()=>"راجع تغييرات الشيفرة",JSe=()=>"Revisó cambios en el código",e6e=()=>"कोड में बदलावों की समीक्षा की",t6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XSe():t==="fa"?YSe():t==="ar"?ZSe():t==="es"?JSe():t==="hi"?e6e():QSe()}),n6e=()=>"Run",r6e=()=>"运行",s6e=()=>"اجرا",i6e=()=>"تشغيل",a6e=()=>"Ejecutar",o6e=()=>"रन",nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r6e():t==="fa"?s6e():t==="ar"?i6e():t==="es"?a6e():t==="hi"?o6e():n6e()}),c6e=()=>"Selected chat text",l6e=()=>"已选聊天文本",u6e=()=>"متن انتخاب‌شدهٔ گفتگو",_6e=()=>"النص المحدد من المحادثة",f6e=()=>"Texto seleccionado del chat",d6e=()=>"चयनित चैट टेक्स्ट",h6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l6e():t==="fa"?u6e():t==="ar"?_6e():t==="es"?f6e():t==="hi"?d6e():c6e()}),p6e=()=>"Selected text:",m6e=()=>"已选文本:",g6e=()=>"متن انتخاب‌شده:",v6e=()=>"النص المحدد:",b6e=()=>"Texto seleccionado:",y6e=()=>"चयनित टेक्स्ट:",x6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m6e():t==="fa"?g6e():t==="ar"?v6e():t==="es"?b6e():t==="hi"?y6e():p6e()}),w6e=()=>"Send",k6e=()=>"发送",S6e=()=>"ارسال",C6e=()=>"إرسال رسالة",E6e=()=>"Enviar",N6e=()=>"भेजें",j3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k6e():t==="fa"?S6e():t==="ar"?C6e():t==="es"?E6e():t==="hi"?N6e():w6e()}),z6e=()=>"Session options",j6e=()=>"会话选项",A6e=()=>"گزینه‌های نشست",T6e=()=>"خيارات الجلسة",R6e=()=>"Opciones de la sesión",M6e=()=>"सेशन विकल्प",rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j6e():t==="fa"?A6e():t==="ar"?T6e():t==="es"?R6e():t==="hi"?M6e():z6e()}),O6e=()=>"Session title",D6e=()=>"会话标题",L6e=()=>"عنوان نشست",I6e=()=>"عنوان الجلسة",$6e=()=>"Título de la sesión",B6e=()=>"सेशन शीर्षक",P6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D6e():t==="fa"?L6e():t==="ar"?I6e():t==="es"?$6e():t==="hi"?B6e():O6e()}),F6e=()=>"Show sidebar",H6e=()=>"显示侧边栏",q6e=()=>"نمایش نوار کناری",U6e=()=>"إظهار الشريط الجانبي",G6e=()=>"Mostrar barra lateral",K6e=()=>"साइडबार दिखाएं",sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H6e():t==="fa"?q6e():t==="ar"?U6e():t==="es"?G6e():t==="hi"?K6e():F6e()}),V6e=()=>"Started an experiment run",W6e=()=>"已启动实验运行",Q6e=()=>"اجرای آزمایش آغاز شد",X6e=()=>"بدأ تشغيل تجربة",Y6e=()=>"Inició una ejecución de experimento",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():V6e()}),eCe=()=>"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.",tCe=()=>"我有一个想探索的粗略想法。请不断向我提问,直到我们得到一个具体、可检验的研究问题和第一个实验的计划。",nCe=()=>"یک ایدهٔ خام دارم که می‌خواهم بررسی کنم. از من سؤال بپرس تا به یک پرسش پژوهشی مشخص و قابل آزمون و یک برنامه برای اولین آزمایش برسیم.",rCe=()=>"لديّ فكرة أولية أريد استكشافها. اطرح عليّ أسئلة حتى نصل إلى سؤال بحثي محدد وقابل للاختبار وخطة للتجربة الأولى.",sCe=()=>"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.",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=()=>"Shape a research question",cCe=()=>"明确研究问题",lCe=()=>"شکل دادن به پرسش پژوهشی",uCe=()=>"صياغة سؤال بحثي",_Ce=()=>"Definir una pregunta de investigación",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=()=>"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.",pCe=()=>"先问我要研究的主题,然后检索相关文献,总结最强的基线方法和尚未解决的问题,并建议一个小实验可以在哪里做出贡献。",mCe=()=>"اول موضوع را از من بپرس، سپس ادبیات آن را جست‌وجو کن، قوی‌ترین خط‌های مبنا و مسائل باز را خلاصه کن و پیشنهاد بده یک آزمایش کوچک کجا می‌تواند مفید باشد.",gCe=()=>"اسألني عن الموضوع أولًا، ثم ابحث في الأدبيات حوله، ولخّص أقوى خطوط الأساس والمسائل المفتوحة، واقترح أين يمكن لتجربة صغيرة أن تسهم.",vCe=()=>"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.",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=()=>"Survey related work",wCe=()=>"调研相关工作",kCe=()=>"مرور کارهای مرتبط",SCe=()=>"استعراض الأعمال ذات الصلة",CCe=()=>"Revisar trabajos relacionados",ECe=()=>"संबंधित कार्य का सर्वेक्षण करें",NCe=((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()}),zCe=()=>"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.",jCe=()=>"搭建一个最小的训练脚本,包含配置、依赖和运行命令,能在单张 GPU 上几分钟内端到端训练一个小模型。",ACe=()=>"یک اسکریپت آموزش حداقلی با پیکربندی، وابستگی‌ها و دستور اجرا آماده کن که یک مدل کوچک را در چند دقیقه روی یک GPU به‌طور کامل آموزش دهد.",TCe=()=>"أنشئ أصغر سكربت تدريب ممكن مع إعدادات واعتماديات وأمر تشغيل يدرّب نموذجًا صغيرًا من البداية إلى النهاية في دقائق على وحدة GPU واحدة.",RCe=()=>"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.",MCe=()=>"एक न्यूनतम ट्रेनिंग स्क्रिप्ट सेट अप करें, जिसमें एक कॉन्फ़िग, डिपेंडेंसी और एक रन कमांड हो, जो एक GPU पर कुछ ही मिनटों में एक छोटे मॉडल को पूरी तरह ट्रेन कर दे।",OCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jCe():t==="fa"?ACe():t==="ar"?TCe():t==="es"?RCe():t==="hi"?MCe():zCe()}),DCe=()=>"Scaffold a baseline",LCe=()=>"搭建基线",ICe=()=>"ساخت خط مبنا",$Ce=()=>"بناء خط أساس",BCe=()=>"Crear un modelo de referencia",PCe=()=>"एक बेसलाइन तैयार करें",FCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LCe():t==="fa"?ICe():t==="ar"?$Ce():t==="es"?BCe():t==="hi"?PCe():DCe()}),HCe=()=>"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.",qCe=()=>"从我们的计划中选一个成本低、定义明确的假设,把它实现为基线的一个变体,并启动第一次运行来比较两者。",UCe=()=>"یک فرضیهٔ کم‌هزینه و مشخص از برنامه‌مان انتخاب کن، آن را به‌صورت یک نسخهٔ تغییریافته از خط مبنا پیاده کن و اولین اجرا را برای مقایسهٔ این دو شروع کن.",GCe=()=>"اختر فرضية واحدة منخفضة التكلفة ومحددة جيدًا من خطتنا، ونفّذها كنسخة معدّلة من خط الأساس، وابدأ أول تشغيل لمقارنة الاثنين.",KCe=()=>"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.",VCe=()=>"हमारी योजना से एक सस्ती, स्पष्ट रूप से परिभाषित परिकल्पना चुनें, इसे बेसलाइन के एक वेरिएंट के रूप में लागू करें, और दोनों की तुलना के लिए पहला रन शुरू करें।",WCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qCe():t==="fa"?UCe():t==="ar"?GCe():t==="es"?KCe():t==="hi"?VCe():HCe()}),QCe=()=>"Run a first experiment",XCe=()=>"运行第一个实验",YCe=()=>"اجرای اولین آزمایش",ZCe=()=>"تشغيل التجربة الأولى",JCe=()=>"Ejecutar un primer experimento",e7e=()=>"पहला प्रयोग चलाएं",t7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XCe():t==="fa"?YCe():t==="ar"?ZCe():t==="es"?JCe():t==="hi"?e7e():QCe()}),n7e=()=>"Reading the project to suggest where to start…",r7e=()=>"正在阅读项目以建议从哪里开始…",s7e=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",i7e=()=>"جارٍ قراءة المشروع لاقتراح نقطة البدء…",a7e=()=>"Leyendo el proyecto para sugerir por dónde empezar…",o7e=()=>"कहाँ से शुरू करें यह सुझाने के लिए प्रोजेक्ट पढ़ा जा रहा है…",c7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r7e():t==="fa"?s7e():t==="ar"?i7e():t==="es"?a7e():t==="hi"?o7e():n7e()}),l7e=()=>"Starter prompts",u7e=()=>"入门提示",_7e=()=>"پیشنهادهای شروع",f7e=()=>"اقتراحات للبدء",d7e=()=>"Prompts para empezar",h7e=()=>"शुरुआती प्रॉम्प्ट",p7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u7e():t==="fa"?_7e():t==="ar"?f7e():t==="es"?d7e():t==="hi"?h7e():l7e()}),m7e=()=>"Stop",g7e=()=>"停止",v7e=()=>"توقف",b7e=()=>"إيقاف",y7e=()=>"Detener",x7e=()=>"रोकें",iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g7e():t==="fa"?v7e():t==="ar"?b7e():t==="es"?y7e():t==="hi"?x7e():m7e()}),w7e=()=>"Submit",k7e=()=>"提交",S7e=()=>"ارسال",C7e=()=>"إرسال",E7e=()=>"Enviar",N7e=()=>"सबमिट करें",z7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k7e():t==="fa"?S7e():t==="ar"?C7e():t==="es"?E7e():t==="hi"?N7e():w7e()}),j7e=()=>"Tool failed",A7e=()=>"工具失败",T7e=()=>"ابزار ناموفق بود",R7e=()=>"فشلت الأداة",M7e=()=>"Error en la herramienta",O7e=()=>"टूल विफल",D7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A7e():t==="fa"?T7e():t==="ar"?R7e():t==="es"?M7e():t==="hi"?O7e():j7e()}),L7e=()=>"Used tools",I7e=()=>"已使用工具",$7e=()=>"ابزارها استفاده شد",B7e=()=>"استخدم الأدوات",P7e=()=>"Usó herramientas",F7e=()=>"टूल इस्तेमाल किए",dL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I7e():t==="fa"?$7e():t==="ar"?B7e():t==="es"?P7e():t==="hi"?F7e():L7e()}),H7e=()=>"View full plan",q7e=()=>"查看完整计划",U7e=()=>"مشاهدهٔ طرح کامل",G7e=()=>"عرض الخطة كاملة",K7e=()=>"Ver plan completo",V7e=()=>"पूरा प्लान देखें",W7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q7e():t==="fa"?U7e():t==="ar"?G7e():t==="es"?K7e():t==="hi"?V7e():H7e()}),Q7e=()=>"Waited for an experiment run",X7e=()=>"已等待实验运行",Y7e=()=>"برای اجرای آزمایش صبر شد",Z7e=()=>"انتظر تشغيل تجربة",J7e=()=>"Esperó a una ejecución de experimento",e8e=()=>"एक प्रयोग रन का इंतज़ार किया",t8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X7e():t==="fa"?Y7e():t==="ar"?Z7e():t==="es"?J7e():t==="hi"?e8e():Q7e()}),n8e=()=>"Waiting for your input…",r8e=()=>"正在等待你的输入…",s8e=()=>"منتظر ورودی شما…",i8e=()=>"في انتظار إدخالك…",a8e=()=>"Esperando tu respuesta…",o8e=()=>"आपके इनपुट का इंतज़ार है…",c8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r8e():t==="fa"?s8e():t==="ar"?i8e():t==="es"?a8e():t==="hi"?o8e():n8e()}),l8e=()=>"What should we research?",u8e=()=>"我们应该研究什么?",_8e=()=>"چه چیزی را پژوهش کنیم؟",f8e=()=>"ما الذي نبحثه؟",d8e=()=>"¿Qué investigamos?",h8e=()=>"हमें क्या शोध करना चाहिए?",p8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u8e():t==="fa"?_8e():t==="ar"?f8e():t==="es"?d8e():t==="hi"?h8e():l8e()}),m8e=()=>"You, mid-task",g8e=()=>"你(任务进行中)",v8e=()=>"شما، هنگام انجام وظیفه",b8e=()=>"أنت، أثناء المهمة",y8e=()=>"Tú, durante la tarea",x8e=()=>"आप, टास्क के बीच में",w8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g8e():t==="fa"?v8e():t==="ar"?b8e():t==="es"?y8e():t==="hi"?x8e():m8e()}),k8e=()=>"Pasted image",S8e=()=>"粘贴的图片",C8e=()=>"تصویر جای‌گذاری‌شده",E8e=()=>"صورة ملصقة",N8e=()=>"Imagen pegada",z8e=()=>"पेस्ट की गई इमेज",hL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S8e():t==="fa"?C8e():t==="ar"?E8e():t==="es"?N8e():t==="hi"?z8e():k8e()}),j8e=()=>"Plan",A8e=()=>"计划",T8e=()=>"طرح",R8e=()=>"خطة",M8e=()=>"Plan",O8e=()=>"प्लान",pL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A8e():t==="fa"?T8e():t==="ar"?R8e():t==="es"?M8e():t==="hi"?O8e():j8e()}),D8e=()=>"Plan mode — ready to proceed?",L8e=()=>"计划模式 — 准备好继续了吗?",I8e=()=>"حالت طرح — آماده‌اید ادامه دهید؟",$8e=()=>"وضع التخطيط — جاهز للمتابعة؟",B8e=()=>"Modo Plan — ¿listo para continuar?",P8e=()=>"प्लान मोड — आगे बढ़ने के लिए तैयार?",F8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L8e():t==="fa"?I8e():t==="ar"?$8e():t==="es"?B8e():t==="hi"?P8e():D8e()}),H8e=()=>"Proposed plan",q8e=()=>"提议的计划",U8e=()=>"طرح پیشنهادی",G8e=()=>"خطة مقترحة",K8e=()=>"Plan propuesto",V8e=()=>"प्रस्तावित प्लान",az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q8e():t==="fa"?U8e():t==="ar"?G8e():t==="es"?K8e():t==="hi"?V8e():H8e()}),W8e=()=>"Question",Q8e=()=>"问题",X8e=()=>"پرسش",Y8e=()=>"سؤال",Z8e=()=>"Pregunta",J8e=()=>"प्रश्न",e9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q8e():t==="fa"?X8e():t==="ar"?Y8e():t==="es"?Z8e():t==="hi"?J8e():W8e()}),t9e=()=>"Queued",n9e=()=>"已排队",r9e=()=>"در صف",s9e=()=>"في قائمة الانتظار",i9e=()=>"En cola",a9e=()=>"कतार में",o9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n9e():t==="fa"?r9e():t==="ar"?s9e():t==="es"?i9e():t==="hi"?a9e():t9e()}),c9e=()=>"Recents",l9e=()=>"最近",u9e=()=>"اخیر",_9e=()=>"الأخيرة",f9e=()=>"Recientes",d9e=()=>"हाल की",mL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l9e():t==="fa"?u9e():t==="ar"?_9e():t==="es"?f9e():t==="hi"?d9e():c9e()}),h9e=()=>"Re-check its setup.",p9e=()=>"请重新检查其设置。",m9e=()=>"راه‌اندازی آن را دوباره بررسی کنید.",g9e=()=>"أعد فحص إعداده.",v9e=()=>"Vuelve a comprobar su configuración.",b9e=()=>"इसका सेटअप फिर से जाँचें।",y9e=((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()}),x9e=()=>"Could not recover this turn. Try again.",w9e=()=>"无法恢复本轮。请重试。",k9e=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",S9e=()=>"تعذّرت استعادة هذه الجولة. حاول مجددًا.",C9e=()=>"No se pudo recuperar este turno. Inténtalo de nuevo.",E9e=()=>"यह टर्न रिकवर नहीं हो सका। फिर से कोशिश करें।",N9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w9e():t==="fa"?k9e():t==="ar"?S9e():t==="es"?C9e():t==="hi"?E9e():x9e()}),z9e=()=>"Could not remove the queued message. Try again.",j9e=()=>"无法移除排队消息。请重试。",A9e=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",T9e=()=>"تعذّرت إزالة الرسالة من قائمة الانتظار. حاول مجددًا.",R9e=()=>"No se pudo quitar el mensaje en cola. Inténtalo de nuevo.",M9e=()=>"कतार में लगा संदेश हटाया नहीं जा सका। फिर से कोशिश करें।",O9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j9e():t==="fa"?A9e():t==="ar"?T9e():t==="es"?R9e():t==="hi"?M9e():z9e()}),D9e=e=>`Could not re-send: ${e==null?void 0:e.error}`,L9e=e=>`无法重新发送:${e==null?void 0:e.error}`,I9e=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,$9e=e=>`تعذّرت إعادة الإرسال: ${e==null?void 0:e.error}`,B9e=e=>`No se pudo reenviar: ${e==null?void 0:e.error}`,P9e=e=>`फिर से नहीं भेजा जा सका: ${e==null?void 0:e.error}`,F9e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?L9e(e):t==="fa"?I9e(e):t==="ar"?$9e(e):t==="es"?B9e(e):t==="hi"?P9e(e):D9e(e)}),H9e=()=>"Resolved",q9e=()=>"已处理",U9e=()=>"رسیدگی شد",G9e=()=>"مُعالَج",K9e=()=>"Resuelto",V9e=()=>"सुलझाया गया",W9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q9e():t==="fa"?U9e():t==="ar"?G9e():t==="es"?K9e():t==="hi"?V9e():H9e()}),Q9e=()=>"Could not retry the queued message. Try again.",X9e=()=>"无法重试排队消息。请重试。",Y9e=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",Z9e=()=>"تعذّرت إعادة محاولة إرسال الرسالة في قائمة الانتظار. حاول مجددًا.",J9e=()=>"No se pudo reintentar el mensaje en cola. Inténtalo de nuevo.",eEe=()=>"कतार में लगा संदेश फिर से नहीं भेजा जा सका। फिर से कोशिश करें।",tEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X9e():t==="fa"?Y9e():t==="ar"?Z9e():t==="es"?J9e():t==="hi"?eEe():Q9e()}),nEe=()=>"run logs",rEe=()=>"运行日志",sEe=()=>"گزارش‌های اجرا",iEe=()=>"سجلات التشغيل",aEe=()=>"logs de ejecución",oEe=()=>"रन लॉग",cEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rEe():t==="fa"?sEe():t==="ar"?iEe():t==="es"?aEe():t==="hi"?oEe():nEe()}),lEe=()=>"Scroll to bottom",uEe=()=>"滚动到底部",_Ee=()=>"رفتن به پایین گفتگو",fEe=()=>"التمرير إلى الأسفل",dEe=()=>"Ir al final",hEe=()=>"नीचे तक स्क्रॉल करें",oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uEe():t==="fa"?_Ee():t==="ar"?fEe():t==="es"?dEe():t==="hi"?hEe():lEe()}),pEe=()=>"The selected harness is unavailable",mEe=()=>"所选智能体工具不可用",gEe=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",vEe=()=>"أداة البرمجة المحددة غير متاحة",bEe=()=>"El agente seleccionado no está disponible",yEe=()=>"चुना गया हार्नेस उपलब्ध नहीं है",i1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mEe():t==="fa"?gEe():t==="ar"?vEe():t==="es"?bEe():t==="hi"?yEe():pEe()}),xEe=()=>"Session limit reached",wEe=()=>"已达到会话使用限额",kEe=()=>"به سقف مصرف نشست رسیده‌اید",SEe=()=>"تم بلوغ حد الاستخدام",CEe=()=>"Límite de la sesión alcanzado",EEe=()=>"सेशन सीमा पूरी हो गई",NEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wEe():t==="fa"?kEe():t==="ar"?SEe():t==="es"?CEe():t==="hi"?EEe():xEe()}),zEe=()=>"The chat session was not created",jEe=()=>"未能创建聊天会话",AEe=()=>"نشست گفت‌وگو ایجاد نشد",TEe=()=>"لم تُنشأ جلسة المحادثة",REe=()=>"No se creó la sesión de chat",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=()=>"Show full conversation",LEe=()=>"显示完整对话",IEe=()=>"نمایش کامل گفتگو",$Ee=()=>"عرض المحادثة كاملة",BEe=()=>"Mostrar la conversación completa",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=()=>" · Spawned by another agent",qEe=()=>" · 由另一个智能体创建",UEe=()=>" · ساخته‌شده به‌دست عامل دیگر",GEe=()=>" · أنشأه وكيل آخر",KEe=()=>" · Creada por otro agente",VEe=()=>" · किसी और एजेंट द्वारा शुरू किया गया",WEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qEe():t==="fa"?UEe():t==="ar"?GEe():t==="es"?KEe():t==="hi"?VEe():HEe()}),QEe=()=>"Starting…",XEe=()=>"正在启动…",YEe=()=>"در حال شروع…",ZEe=()=>"جارٍ البدء…",JEe=()=>"Iniciando…",eNe=()=>"शुरू हो रहा है…",tNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XEe():t==="fa"?YEe():t==="ar"?ZEe():t==="es"?JEe():t==="hi"?eNe():QEe()}),nNe=e=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,rNe=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,sNe=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,iNe=e=>`وجّه ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} للإضافة إلى قائمة الانتظار)`,aNe=e=>`Guía a ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} para poner en cola)`,oNe=e=>`${e==null?void 0:e.harness} को दिशा दें… (कतार में लगाने के लिए ${e==null?void 0:e.shortcut})`,cNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rNe(e):t==="fa"?sNe(e):t==="ar"?iNe(e):t==="es"?aNe(e):t==="hi"?oNe(e):nNe(e)}),lNe=()=>"Could not stop the turn. Try again.",uNe=()=>"无法停止本轮。请重试。",_Ne=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",fNe=()=>"تعذّر إيقاف الجولة. حاول مجددًا.",dNe=()=>"No se pudo detener el turno. Inténtalo de nuevo.",hNe=()=>"टर्न रोका नहीं जा सका। फिर से कोशिश करें।",pNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uNe():t==="fa"?_Ne():t==="ar"?fNe():t==="es"?dNe():t==="hi"?hNe():lNe()}),mNe=e=>`Could not switch fork: ${e==null?void 0:e.error}`,gNe=e=>`无法切换分支:${e==null?void 0:e.error}`,vNe=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,bNe=e=>`تعذّر تبديل التفرّع: ${e==null?void 0:e.error}`,yNe=e=>`No se pudo cambiar de bifurcación: ${e==null?void 0:e.error}`,xNe=e=>`फ़ोर्क नहीं बदला जा सका: ${e==null?void 0:e.error}`,wNe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gNe(e):t==="fa"?vNe(e):t==="ar"?bNe(e):t==="es"?yNe(e):t==="hi"?xNe(e):mNe(e)}),kNe=()=>"The agent",SNe=()=>"智能体",CNe=()=>"عامل",ENe=()=>"الوكيل",NNe=()=>"El agente",zNe=()=>"एजेंट",jNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SNe():t==="fa"?CNe():t==="ar"?ENe():t==="es"?NNe():t==="hi"?zNe():kNe()}),ANe=()=>"Thinking",TNe=()=>"正在思考",RNe=()=>"در حال فکر کردن",MNe=()=>"جارٍ التفكير",ONe=()=>"Pensando",DNe=()=>"सोच रहा है",LNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TNe():t==="fa"?RNe():t==="ar"?MNe():t==="es"?ONe():t==="hi"?DNe():ANe()}),INe=()=>"Could not toggle Plan mode. Try again.",$Ne=()=>"无法切换计划模式。请重试。",BNe=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",PNe=()=>"تعذّر تبديل وضع التخطيط. حاول مجددًا.",FNe=()=>"No se pudo cambiar el modo Plan. Inténtalo de nuevo.",HNe=()=>"प्लान मोड टॉगल नहीं हो सका। फिर से कोशिश करें।",cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ne():t==="fa"?BNe():t==="ar"?PNe():t==="es"?FNe():t==="hi"?HNe():INe()}),qNe=()=>"This turn did not finish.",UNe=()=>"本轮未完成。",GNe=()=>"این نوبت کامل نشد.",KNe=()=>"لم تكتمل هذه الجولة.",VNe=()=>"Este turno no terminó.",WNe=()=>"यह टर्न पूरा नहीं हुआ।",lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UNe():t==="fa"?GNe():t==="ar"?KNe():t==="es"?VNe():t==="hi"?WNe():qNe()}),QNe=()=>"Type a custom answer…",XNe=()=>"输入自定义回答…",YNe=()=>"پاسخ دلخواه را بنویسید…",ZNe=()=>"اكتب إجابة مخصصة…",JNe=()=>"Escribe una respuesta personalizada…",eze=()=>"अपना जवाब टाइप करें…",tze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XNe():t==="fa"?YNe():t==="ar"?ZNe():t==="es"?JNe():t==="hi"?eze():QNe()}),nze=()=>"Unarchive",rze=()=>"取消归档",sze=()=>"خارج کردن از بایگانی",ize=()=>"إلغاء الأرشفة",aze=()=>"Desarchivar",oze=()=>"आर्काइव से निकालें",cze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rze():t==="fa"?sze():t==="ar"?ize():t==="es"?aze():t==="hi"?oze():nze()}),lze=()=>"Untitled",uze=()=>"未命名",_ze=()=>"بدون عنوان",fze=()=>"بدون عنوان",dze=()=>"Sin título",hze=()=>"बिना शीर्षक",Md=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uze():t==="fa"?_ze():t==="ar"?fze():t==="es"?dze():t==="hi"?hze():lze()}),pze=()=>"Could not update autonomy. Try again.",mze=()=>"无法更新自主程度。请重试。",gze=()=>"به‌روزرسانی خودمختاری انجام نشد. دوباره تلاش کنید.",vze=()=>"تعذّر تحديث الاستقلالية. حاول مجددًا.",bze=()=>"No se pudo actualizar la autonomía. Inténtalo de nuevo.",yze=()=>"स्वायत्तता अपडेट नहीं हो सकी। फिर से कोशिश करें।",xze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mze():t==="fa"?gze():t==="ar"?vze():t==="es"?bze():t==="hi"?yze():pze()}),wze=()=>"Could not update permissions. Try again.",kze=()=>"无法更新权限。请重试。",Sze=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",Cze=()=>"تعذّر تحديث الأذونات. حاول مجددًا.",Eze=()=>"No se pudieron actualizar los permisos. Inténtalo de nuevo.",Nze=()=>"अनुमतियाँ अपडेट नहीं हो सकीं। फिर से कोशिश करें।",zze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kze():t==="fa"?Sze():t==="ar"?Cze():t==="es"?Eze():t==="hi"?Nze():wze()}),jze=()=>"Work details",Aze=()=>"工作详情",Tze=()=>"جزئیات کار",Rze=()=>"تفاصيل العمل",Mze=()=>"Detalles del trabajo",Oze=()=>"काम का विवरण",Dze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aze():t==="fa"?Tze():t==="ar"?Rze():t==="es"?Mze():t==="hi"?Oze():jze()}),Lze=e=>`${e==null?void 0:e.minutes}m ${e==null?void 0:e.seconds}s`,Ize=e=>`${e==null?void 0:e.minutes}分${e==null?void 0:e.seconds}秒`,$ze=e=>`${e==null?void 0:e.minutes} دقیقه ${e==null?void 0:e.seconds} ثانیه`,Bze=e=>`${e==null?void 0:e.minutes}د ${e==null?void 0:e.seconds}ث`,Pze=e=>`${e==null?void 0:e.minutes} min ${e==null?void 0:e.seconds} s`,Fze=e=>`${e==null?void 0:e.minutes}मि ${e==null?void 0:e.seconds}से`,Hze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ize(e):t==="fa"?$ze(e):t==="ar"?Bze(e):t==="es"?Pze(e):t==="hi"?Fze(e):Lze(e)}),qze=e=>`Worked for ${e==null?void 0:e.duration}`,Uze=e=>`已工作 ${e==null?void 0:e.duration}`,Gze=e=>`به‌مدت ${e==null?void 0:e.duration} کار کرد`,Kze=e=>`عمل لمدة ${e==null?void 0:e.duration}`,Vze=e=>`Trabajó durante ${e==null?void 0:e.duration}`,Wze=e=>`${e==null?void 0:e.duration} तक काम किया`,Qze=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Uze(e):t==="fa"?Gze(e):t==="ar"?Kze(e):t==="es"?Vze(e):t==="hi"?Wze(e):qze(e)}),Xze=()=>"Working…",Yze=()=>"正在工作…",Zze=()=>"در حال کار…",Jze=()=>"جارٍ العمل…",eje=()=>"Trabajando…",tje=()=>"काम हो रहा है…",bS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yze():t==="fa"?Zze():t==="ar"?Jze():t==="es"?eje():t==="hi"?tje():Xze()}),nje=()=>"Close tab",rje=()=>"关闭标签页",sje=()=>"بستن زبانه",ije=()=>"إغلاق التبويب",aje=()=>"Cerrar pestaña",oje=()=>"टैब बंद करें",cje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rje():t==="fa"?sje():t==="ar"?ije():t==="es"?aje():t==="hi"?oje():nje()}),lje=()=>"Changes",uje=()=>"更改",_je=()=>"تغییرات",fje=()=>"التغييرات",dje=()=>"Cambios",hje=()=>"बदलाव",gL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uje():t==="fa"?_je():t==="ar"?fje():t==="es"?dje():t==="hi"?hje():lje()}),pje=()=>"Code browser view",mje=()=>"代码浏览器视图",gje=()=>"نمای مرورگر کد",vje=()=>"عرض متصفح الشيفرة",bje=()=>"Vista del explorador de código",yje=()=>"कोड ब्राउज़र व्यू",xje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mje():t==="fa"?gje():t==="ar"?vje():t==="es"?bje():t==="hi"?yje():pje()}),wje=()=>"Files",kje=()=>"文件",Sje=()=>"فایل‌ها",Cje=()=>"الملفات",Eje=()=>"Archivos",Nje=()=>"फ़ाइलें",zje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kje():t==="fa"?Sje():t==="ar"?Cje():t==="es"?Eje():t==="hi"?Nje():wje()}),jje=()=>"Refresh",Aje=()=>"刷新",Tje=()=>"تازه‌سازی",Rje=()=>"تحديث",Mje=()=>"Actualizar",Oje=()=>"रीफ़्रेश करें",uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aje():t==="fa"?Tje():t==="ar"?Rje():t==="es"?Mje():t==="hi"?Oje():jje()}),Dje=()=>"listing truncated",Lje=()=>"列表已截断",Ije=()=>"فهرست کوتاه شده است",$je=()=>"القائمة مقتطعة",Bje=()=>"listado truncado",Pje=()=>"सूची छोटी की गई",Fje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lje():t==="fa"?Ije():t==="ar"?$je():t==="es"?Bje():t==="hi"?Pje():Dje()}),Hje=()=>"No files.",qje=()=>"没有文件。",Uje=()=>"فایلی وجود ندارد.",Gje=()=>"لا توجد ملفات.",Kje=()=>"No hay archivos.",Vje=()=>"कोई फ़ाइल नहीं।",Wje=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qje():t==="fa"?Uje():t==="ar"?Gje():t==="es"?Kje():t==="hi"?Vje():Hje()}),Qje=()=>"Refresh failed:",Xje=()=>"刷新失败:",Yje=()=>"تازه‌سازی ناموفق بود:",Zje=()=>"فشل التحديث:",Jje=()=>"Error al actualizar:",eAe=()=>"रीफ़्रेश विफल:",tAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xje():t==="fa"?Yje():t==="ar"?Zje():t==="es"?Jje():t==="hi"?eAe():Qje()}),nAe=()=>"Cancelling…",rAe=()=>"正在取消…",sAe=()=>"در حال لغو…",iAe=()=>"جارٍ الإلغاء…",aAe=()=>"Cancelando…",oAe=()=>"रद्द हो रहा है…",cAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rAe():t==="fa"?sAe():t==="ar"?iAe():t==="es"?aAe():t==="hi"?oAe():nAe()}),lAe=()=>"Checking…",uAe=()=>"正在检查…",_Ae=()=>"در حال بررسی…",fAe=()=>"جارٍ التحقق…",dAe=()=>"Comprobando…",hAe=()=>"जाँचा जा रहा है…",ya=((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=()=>"Copied",mAe=()=>"已复制",gAe=()=>"کپی شد",vAe=()=>"تم النسخ",bAe=()=>"Copiado",yAe=()=>"कॉपी हो गया",uf=((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=e=>`Failed to load: ${e==null?void 0:e.error}`,wAe=e=>`加载失败:${e==null?void 0:e.error}`,kAe=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,SAe=e=>`تعذّر التحميل: ${e==null?void 0:e.error}`,CAe=e=>`Error al cargar: ${e==null?void 0:e.error}`,EAe=e=>`लोड नहीं हो सका: ${e==null?void 0:e.error}`,yS=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wAe(e):t==="fa"?kAe(e):t==="ar"?SAe(e):t==="es"?CAe(e):t==="hi"?EAe(e):xAe(e)}),NAe=()=>"Loading…",zAe=()=>"正在加载…",jAe=()=>"در حال بارگیری…",AAe=()=>"جارٍ التحميل…",TAe=()=>"Cargando…",RAe=()=>"लोड हो रहा है…",xS=((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()}),MAe=e=>`+ ${e==null?void 0:e.count} more`,OAe=e=>`另有 ${e==null?void 0:e.count} 项`,DAe=e=>`${e==null?void 0:e.count}+ مورد دیگر`,LAe=e=>`المزيد (+${e==null?void 0:e.count})`,IAe=e=>`+ ${e==null?void 0:e.count} más`,$Ae=e=>`+ ${e==null?void 0:e.count} और`,BAe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OAe(e):t==="fa"?DAe(e):t==="ar"?LAe(e):t==="es"?IAe(e):t==="hi"?$Ae(e):MAe(e)}),PAe=()=>"Rendered view",FAe=()=>"渲染视图",HAe=()=>"نمای رندرشده",qAe=()=>"العرض المُنسَّق",UAe=()=>"Vista renderizada",GAe=()=>"रेंडर किया गया व्यू",Dv=((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=()=>"Save",VAe=()=>"保存",WAe=()=>"ذخیره",QAe=()=>"حفظ",XAe=()=>"Guardar",YAe=()=>"सेव करें",pc=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VAe():t==="fa"?WAe():t==="ar"?QAe():t==="es"?XAe():t==="hi"?YAe():KAe()}),ZAe=()=>"Saving…",JAe=()=>"正在保存…",eTe=()=>"در حال ذخیره…",tTe=()=>"جارٍ الحفظ…",nTe=()=>"Guardando…",rTe=()=>"सेव हो रहा है…",Sa=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JAe():t==="fa"?eTe():t==="ar"?tTe():t==="es"?nTe():t==="hi"?rTe():ZAe()}),sTe=()=>"Show less",iTe=()=>"收起",aTe=()=>"نمایش کمتر",oTe=()=>"عرض أقل",cTe=()=>"Mostrar menos",lTe=()=>"कम दिखाएं",vL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iTe():t==="fa"?aTe():t==="ar"?oTe():t==="es"?cTe():t==="hi"?lTe():sTe()}),uTe=()=>"Show more",_Te=()=>"展开",fTe=()=>"نمایش بیشتر",dTe=()=>"عرض المزيد",hTe=()=>"Mostrar más",pTe=()=>"और दिखाएं",mTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Te():t==="fa"?fTe():t==="ar"?dTe():t==="es"?hTe():t==="hi"?pTe():uTe()}),gTe=()=>"Stop",vTe=()=>"停止",bTe=()=>"توقف",yTe=()=>"إيقاف",xTe=()=>"Detener",wTe=()=>"रोकें",bL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vTe():t==="fa"?bTe():t==="ar"?yTe():t==="es"?xTe():t==="hi"?wTe():gTe()}),kTe=()=>"Stopping…",STe=()=>"正在停止…",CTe=()=>"در حال توقف…",ETe=()=>"جارٍ الإيقاف…",NTe=()=>"Deteniendo…",zTe=()=>"रोका जा रहा है…",jTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?STe():t==="fa"?CTe():t==="ar"?ETe():t==="es"?NTe():t==="hi"?zTe():kTe()}),ATe=()=>"View source",TTe=()=>"查看源代码",RTe=()=>"نمایش متن منبع",MTe=()=>"عرض المصدر",OTe=()=>"Ver código fuente",DTe=()=>"स्रोत देखें",Pd=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TTe():t==="fa"?RTe():t==="ar"?MTe():t==="es"?OTe():t==="hi"?DTe():ATe()}),LTe=()=>"Shorten this chat's context",ITe=()=>"压缩此聊天的上下文",$Te=()=>"کوتاه‌کردن زمینهٔ این گفت‌وگو",BTe=()=>"اختصار سياق هذه المحادثة",PTe=()=>"Comprime el contexto de este chat",FTe=()=>"इस चैट का कॉन्टेक्स्ट छोटा करें",HTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ITe():t==="fa"?$Te():t==="ar"?BTe():t==="es"?PTe():t==="hi"?FTe():LTe()}),qTe=()=>"Runs as a remote Hugging Face Job",UTe=()=>"作为远程 Hugging Face Job 运行",GTe=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",KTe=()=>"يعمل كمهمة Hugging Face بعيدة",VTe=()=>"Se ejecuta como un Job remoto de Hugging Face",WTe=()=>"एक रिमोट Hugging Face Job के रूप में चलता है",QTe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UTe():t==="fa"?GTe():t==="ar"?KTe():t==="es"?VTe():t==="hi"?WTe():qTe()}),XTe=()=>"Runs as a Job on your Kubernetes cluster",YTe=()=>"作为 Kubernetes 集群上的 Job 运行",ZTe=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",JTe=()=>"يعمل كمهمة على عنقود Kubernetes الخاص بك",eRe=()=>"Se ejecuta como un Job en tu clúster de Kubernetes",tRe=()=>"आपके Kubernetes क्लस्टर पर एक Job के रूप में चलता है",nRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YTe():t==="fa"?ZTe():t==="ar"?JTe():t==="es"?eRe():t==="hi"?tRe():XTe()}),rRe=()=>"Runs directly on this computer",sRe=()=>"直接在此计算机上运行",iRe=()=>"مستقیماً روی این رایانه اجرا می‌شود",aRe=()=>"يعمل مباشرة على هذا الحاسوب",oRe=()=>"Se ejecuta directamente en este equipo",cRe=()=>"सीधे इस कंप्यूटर पर चलता है",lRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sRe():t==="fa"?iRe():t==="ar"?aRe():t==="es"?oRe():t==="hi"?cRe():rRe()}),uRe=()=>"Runs in a remote Modal sandbox",_Re=()=>"在远程 Modal 沙箱中运行",fRe=()=>"در sandbox دوردست Modal اجرا می‌شود",dRe=()=>"يعمل في بيئة Modal معزولة عن بُعد",hRe=()=>"Se ejecuta en un sandbox remoto de Modal",pRe=()=>"एक रिमोट Modal सैंडबॉक्स में चलता है",mRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Re():t==="fa"?fRe():t==="ar"?dRe():t==="es"?hRe():t==="hi"?pRe():uRe()}),gRe=()=>"Runs on an ephemeral OpenResearch box",vRe=()=>"在临时 OpenResearch 主机上运行",bRe=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",yRe=()=>"يعمل على صندوق OpenResearch مؤقت",xRe=()=>"Se ejecuta en una máquina efímera de OpenResearch",wRe=()=>"एक अस्थायी OpenResearch बॉक्स पर चलता है",kRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vRe():t==="fa"?bRe():t==="ar"?yRe():t==="es"?xRe():t==="hi"?wRe():gRe()}),SRe=()=>"Runs on the connected Ray cluster",CRe=()=>"在已连接的 Ray 集群上运行",ERe=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",NRe=()=>"يعمل على عنقود Ray المتصل",zRe=()=>"Se ejecuta en el clúster de Ray conectado",jRe=()=>"कनेक्टेड Ray क्लस्टर पर चलता है",ARe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CRe():t==="fa"?ERe():t==="ar"?NRe():t==="es"?zRe():t==="hi"?jRe():SRe()}),TRe=()=>"Runs as a scheduled job on your Slurm cluster",RRe=()=>"作为 Slurm 集群上的调度作业运行",MRe=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",ORe=()=>"يعمل كمهمة مجدولة على عنقود Slurm الخاص بك",DRe=()=>"Se ejecuta como un job programado en tu clúster de Slurm",LRe=()=>"आपके Slurm क्लस्टर पर एक शेड्यूल्ड जॉब के रूप में चलता है",IRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RRe():t==="fa"?MRe():t==="ar"?ORe():t==="es"?DRe():t==="hi"?LRe():TRe()}),$Re=()=>"Runs on a host from your SSH config",BRe=()=>"在 SSH 配置中的主机上运行",PRe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",FRe=()=>"يعمل على مضيف من إعداد SSH الخاص بك",HRe=()=>"Se ejecuta en un host de tu configuración SSH",qRe=()=>"आपके SSH कॉन्फ़िग के किसी होस्ट पर चलता है",URe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BRe():t==="fa"?PRe():t==="ar"?FRe():t==="es"?HRe():t==="hi"?qRe():$Re()}),GRe=()=>"Runs through Tinker’s remote compute",KRe=()=>"通过 Tinker 远程算力运行",VRe=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",WRe=()=>"يعمل عبر حوسبة Tinker البعيدة",QRe=()=>"Se ejecuta en el cómputo remoto de Tinker",XRe=()=>"Tinker के रिमोट कंप्यूट के ज़रिए चलता है",YRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KRe():t==="fa"?VRe():t==="ar"?WRe():t==="es"?QRe():t==="hi"?XRe():GRe()}),ZRe=()=>"HF Jobs",JRe=()=>"HF Jobs",eMe=()=>"HF Jobs",tMe=()=>"HF Jobs",nMe=()=>"HF Jobs",rMe=()=>"HF Jobs",sMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JRe():t==="fa"?eMe():t==="ar"?tMe():t==="es"?nMe():t==="hi"?rMe():ZRe()}),iMe=()=>"Kubernetes",aMe=()=>"Kubernetes",oMe=()=>"Kubernetes",cMe=()=>"Kubernetes",lMe=()=>"Kubernetes",uMe=()=>"Kubernetes",_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=()=>"This machine",dMe=()=>"此计算机",hMe=()=>"این رایانه",pMe=()=>"هذا الجهاز",mMe=()=>"Este equipo",gMe=()=>"यह मशीन",yL=((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()}),vMe=()=>"Modal",bMe=()=>"Modal",yMe=()=>"Modal",xMe=()=>"Modal",wMe=()=>"Modal",kMe=()=>"Modal",SMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bMe():t==="fa"?yMe():t==="ar"?xMe():t==="es"?wMe():t==="hi"?kMe():vMe()}),CMe=()=>"OpenResearch",EMe=()=>"OpenResearch",NMe=()=>"OpenResearch",zMe=()=>"OpenResearch",jMe=()=>"OpenResearch",AMe=()=>"OpenResearch",TMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EMe():t==="fa"?NMe():t==="ar"?zMe():t==="es"?jMe():t==="hi"?AMe():CMe()}),RMe=()=>"Ray",MMe=()=>"Ray",OMe=()=>"Ray",DMe=()=>"Ray",LMe=()=>"Ray",IMe=()=>"Ray",$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=()=>"Slurm",PMe=()=>"Slurm",FMe=()=>"Slurm",HMe=()=>"Slurm",qMe=()=>"Slurm",UMe=()=>"Slurm",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()}),KMe=()=>"SSH",VMe=()=>"SSH",WMe=()=>"SSH",QMe=()=>"SSH",XMe=()=>"SSH",YMe=()=>"SSH",ZMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VMe():t==="fa"?WMe():t==="ar"?QMe():t==="es"?XMe():t==="hi"?YMe():KMe()}),JMe=()=>"Tinker",eOe=()=>"Tinker",tOe=()=>"Tinker",nOe=()=>"Tinker",rOe=()=>"Tinker",sOe=()=>"Tinker",iOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eOe():t==="fa"?tOe():t==="ar"?nOe():t==="es"?rOe():t==="hi"?sOe():JMe()}),aOe=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",oOe=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",cOe=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",lOe=()=>"تعمل مهمة Hugging Face عن بُعد في حسابك باستخدام العتاد المحدد. تتولى Hugging Face احتساب رسوم الاستخدام.",uOe=()=>"Un Hugging Face Job se ejecuta de forma remota en tu cuenta con el hardware seleccionado. Hugging Face factura el uso.",_Oe=()=>"एक Hugging Face Job चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है। इस्तेमाल का बिल Hugging Face करता है।",fOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oOe():t==="fa"?cOe():t==="ar"?lOe():t==="es"?uOe():t==="hi"?_Oe():aOe()}),dOe=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",hOe=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",pOe=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",mOe=()=>"تعمل بيئة Modal معزولة عن بُعد في حسابك باستخدام العتاد المحدد، وتُخفَّض مواردها إلى الصفر بعد انتهاء التشغيل.",gOe=()=>"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.",vOe=()=>"एक Modal सैंडबॉक्स चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है और रन के बाद शून्य पर स्केल हो जाता है।",bOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hOe():t==="fa"?pOe():t==="ar"?mOe():t==="es"?gOe():t==="hi"?vOe():dOe()}),yOe=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",xOe=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",wOe=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",kOe=()=>"تعمل التجربة على جهاز OpenResearch مؤقت، وتتحمل مؤسستك تكلفته، ويُحذف الجهاز عند انتهاء التشغيل.",SOe=()=>"Una máquina efímera de OpenResearch ejecuta el experimento, se factura a tu organización y se elimina al terminar la ejecución.",COe=()=>"एक अस्थायी OpenResearch बॉक्स प्रयोग चलाता है, आपके संगठन को बिल किया जाता है, और रन खत्म होने पर हटा दिया जाता है।",EOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xOe():t==="fa"?wOe():t==="ar"?kOe():t==="es"?SOe():t==="hi"?COe():yOe()}),NOe=()=>"This computer must stay awake and online while Tinker runs.",zOe=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",jOe=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",AOe=()=>"يجب أن يبقى هذا الحاسوب مستيقظًا ومتصلًا أثناء تشغيل Tinker.",TOe=()=>"Este equipo debe permanecer encendido y conectado mientras Tinker se ejecuta.",ROe=()=>"जब तक Tinker चल रहा है, इस कंप्यूटर को जागते और ऑनलाइन रहना होगा।",MOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zOe():t==="fa"?jOe():t==="ar"?AOe():t==="es"?TOe():t==="hi"?ROe():NOe()}),OOe=()=>"Context window",DOe=()=>"上下文窗口",LOe=()=>"پنجرهٔ زمینه",IOe=()=>"نافذة السياق",$Oe=()=>"Ventana de contexto",BOe=()=>"कॉन्टेक्स्ट विंडो",POe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DOe():t==="fa"?LOe():t==="ar"?IOe():t==="es"?$Oe():t==="hi"?BOe():OOe()}),FOe=()=>"Context window used",HOe=()=>"已使用的上下文窗口",qOe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",UOe=()=>"المستخدَم من نافذة السياق",GOe=()=>"Ventana de contexto usada",KOe=()=>"इस्तेमाल हुई कॉन्टेक्स्ट विंडो",VOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HOe():t==="fa"?qOe():t==="ar"?UOe():t==="es"?GOe():t==="hi"?KOe():FOe()}),WOe=e=>`${e==null?void 0:e.value} tokens`,QOe=e=>`${e==null?void 0:e.value} 个 token`,XOe=e=>`${e==null?void 0:e.value} توکن`,YOe=e=>`${e==null?void 0:e.value} رمز`,ZOe=e=>`${e==null?void 0:e.value} tokens`,JOe=e=>`${e==null?void 0:e.value} टोकन`,eDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?QOe(e):t==="fa"?XOe(e):t==="ar"?YOe(e):t==="es"?ZOe(e):t==="hi"?JOe(e):WOe(e)}),tDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,nDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,rDe=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,sDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,iDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,aDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,oDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nDe(e):t==="fa"?rDe(e):t==="ar"?sDe(e):t==="es"?iDe(e):t==="hi"?aDe(e):tDe(e)}),cDe=()=>"Copy the last response",lDe=()=>"复制最新回复",uDe=()=>"کپی آخرین پاسخ",_De=()=>"نسخ آخر رد",fDe=()=>"Copia la última respuesta",dDe=()=>"आखिरी जवाब कॉपी करें",hDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lDe():t==="fa"?uDe():t==="ar"?_De():t==="es"?fDe():t==="hi"?dDe():cDe()}),pDe=()=>"No runs yet — ask the agent to launch one.",mDe=()=>"尚无运行——让智能体启动一个。",gDe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",vDe=()=>"لا توجد عمليات تشغيل بعد — اطلب من الوكيل بدء واحدة.",bDe=()=>"Aún no hay ejecuciones — pídele al agente que lance una.",yDe=()=>"अभी तक कोई रन नहीं — एजेंट से एक शुरू करने को कहें।",xDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mDe():t==="fa"?gDe():t==="ar"?vDe():t==="es"?bDe():t==="hi"?yDe():pDe()}),wDe=()=>"Run",kDe=()=>"运行",SDe=()=>"اجرا",CDe=()=>"تشغيل",EDe=()=>"Ejecución",NDe=()=>"रन",_z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kDe():t==="fa"?SDe():t==="ar"?CDe():t==="es"?EDe():t==="hi"?NDe():wDe()}),zDe=()=>"Switch run",jDe=()=>"切换运行",ADe=()=>"تغییر اجرا",TDe=()=>"تبديل التشغيل",RDe=()=>"Cambiar de ejecución",MDe=()=>"रन बदलें",ODe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jDe():t==="fa"?ADe():t==="ar"?TDe():t==="es"?RDe():t==="hi"?MDe():zDe()}),DDe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,LDe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,IDe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,$De=e=>`${e==null?void 0:e.days}ي ${e==null?void 0:e.hours}س`,BDe=e=>`${e==null?void 0:e.days} d ${e==null?void 0:e.hours} h`,PDe=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"?LDe(e):t==="fa"?IDe(e):t==="ar"?$De(e):t==="es"?BDe(e):t==="hi"?PDe(e):DDe(e)}),HDe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,qDe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,UDe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,GDe=e=>`${e==null?void 0:e.hours}س ${e==null?void 0:e.minutes}د`,KDe=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}मि`,WDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qDe(e):t==="fa"?UDe(e):t==="ar"?GDe(e):t==="es"?KDe(e):t==="hi"?VDe(e):HDe(e)}),QDe=e=>`${e==null?void 0:e.value}m`,XDe=e=>`${e==null?void 0:e.value} 分钟`,YDe=e=>`${e==null?void 0:e.value} دقیقه`,ZDe=e=>`${e==null?void 0:e.value}د`,JDe=e=>`${e==null?void 0:e.value} min`,eLe=e=>`${e==null?void 0:e.value}मि`,tLe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XDe(e):t==="fa"?YDe(e):t==="ar"?ZDe(e):t==="es"?JDe(e):t==="hi"?eLe(e):QDe(e)}),nLe=e=>`${e==null?void 0:e.value}s`,rLe=e=>`${e==null?void 0:e.value} 秒`,sLe=e=>`${e==null?void 0:e.value} ثانیه`,iLe=e=>`${e==null?void 0:e.value}ث`,aLe=e=>`${e==null?void 0:e.value} s`,oLe=e=>`${e==null?void 0:e.value}से`,cLe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rLe(e):t==="fa"?sLe(e):t==="ar"?iLe(e):t==="es"?aLe(e):t==="hi"?oLe(e):nLe(e)}),lLe=()=>"Code",uLe=()=>"代码",_Le=()=>"کد",fLe=()=>"الشيفرة",dLe=()=>"Código",hLe=()=>"कोड",pLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uLe():t==="fa"?_Le():t==="ar"?fLe():t==="es"?dLe():t==="hi"?hLe():lLe()}),mLe=()=>"created",gLe=()=>"创建于",vLe=()=>"ایجادشده",bLe=()=>"أُنشئ",yLe=()=>"creado",xLe=()=>"बनाया गया",wLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gLe():t==="fa"?vLe():t==="ar"?bLe():t==="es"?yLe():t==="hi"?xLe():mLe()}),kLe=()=>"from",SLe=()=>"来自",CLe=()=>"از",ELe=()=>"من",NLe=()=>"desde",zLe=()=>"से",jLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SLe():t==="fa"?CLe():t==="ar"?ELe():t==="es"?NLe():t==="hi"?zLe():kLe()}),ALe=()=>"Logs",TLe=()=>"日志",RLe=()=>"گزارش‌ها",MLe=()=>"السجلات",OLe=()=>"Logs",DLe=()=>"लॉग",LLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TLe():t==="fa"?RLe():t==="ar"?MLe():t==="es"?OLe():t==="hi"?DLe():ALe()}),ILe=()=>"Latest run",$Le=()=>"最新运行",BLe=()=>"آخرین اجرا",PLe=()=>"أحدث تشغيل",FLe=()=>"Última ejecución",HLe=()=>"नवीनतम रन",qLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Le():t==="fa"?BLe():t==="ar"?PLe():t==="es"?FLe():t==="hi"?HLe():ILe()}),ULe=()=>"Code",GLe=()=>"代码",KLe=()=>"کد",VLe=()=>"الشيفرة",WLe=()=>"Código",QLe=()=>"कोड",XLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GLe():t==="fa"?KLe():t==="ar"?VLe():t==="es"?WLe():t==="hi"?QLe():ULe()}),YLe=()=>"Commit",ZLe=()=>"提交",JLe=()=>"کامیت",eIe=()=>"إيداع",tIe=()=>"Commit",nIe=()=>"कमिट",rIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZLe():t==="fa"?JLe():t==="ar"?eIe():t==="es"?tIe():t==="hi"?nIe():YLe()}),sIe=()=>"created",iIe=()=>"创建于",aIe=()=>"ایجادشده",oIe=()=>"أُنشئ",cIe=()=>"creado",lIe=()=>"बनाया गया",uIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iIe():t==="fa"?aIe():t==="ar"?oIe():t==="es"?cIe():t==="hi"?lIe():sIe()}),_Ie=()=>"Description",fIe=()=>"说明",dIe=()=>"توضیحات",hIe=()=>"الوصف",pIe=()=>"Descripción",mIe=()=>"विवरण",gIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fIe():t==="fa"?dIe():t==="ar"?hIe():t==="es"?pIe():t==="hi"?mIe():_Ie()}),vIe=()=>"Duration",bIe=()=>"时长",yIe=()=>"مدت",xIe=()=>"المدة",wIe=()=>"Duración",kIe=()=>"अवधि",SIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bIe():t==="fa"?yIe():t==="ar"?xIe():t==="es"?wIe():t==="hi"?kIe():vIe()}),CIe=()=>"exit",EIe=()=>"退出码",NIe=()=>"خروج",zIe=()=>"رمز الخروج",jIe=()=>"salida",AIe=()=>"एग्ज़िट",TIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EIe():t==="fa"?NIe():t==="ar"?zIe():t==="es"?jIe():t==="hi"?AIe():CIe()}),RIe=()=>"from",MIe=()=>"来自",OIe=()=>"از",DIe=()=>"من",LIe=()=>"desde",IIe=()=>"से",$Ie=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MIe():t==="fa"?OIe():t==="ar"?DIe():t==="es"?LIe():t==="hi"?IIe():RIe()}),BIe=()=>"Logs",PIe=()=>"日志",FIe=()=>"گزارش‌ها",HIe=()=>"السجلات",qIe=()=>"Logs",UIe=()=>"लॉग",GIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PIe():t==="fa"?FIe():t==="ar"?HIe():t==="es"?qIe():t==="hi"?UIe():BIe()}),KIe=()=>"Run",VIe=()=>"运行",WIe=()=>"اجرا",QIe=()=>"تشغيل",XIe=()=>"Ejecución",YIe=()=>"रन",ZIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VIe():t==="fa"?WIe():t==="ar"?QIe():t==="es"?XIe():t==="hi"?YIe():KIe()}),JIe=()=>"Run history",e$e=()=>"运行历史",t$e=()=>"تاریخچهٔ اجرا",n$e=()=>"سجل التشغيل",r$e=()=>"Historial de ejecuciones",s$e=()=>"रन इतिहास",i$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e$e():t==="fa"?t$e():t==="ar"?n$e():t==="es"?r$e():t==="hi"?s$e():JIe()}),a$e=()=>"Started",o$e=()=>"开始时间",c$e=()=>"آغاز",l$e=()=>"بدأ",u$e=()=>"Inicio",_$e=()=>"शुरू हुआ",f$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o$e():t==="fa"?c$e():t==="ar"?l$e():t==="es"?u$e():t==="hi"?_$e():a$e()}),d$e=()=>"Runs",h$e=()=>"运行",p$e=()=>"اجراها",m$e=()=>"عمليات التشغيل",g$e=()=>"Ejecuciones",v$e=()=>"रन",b$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h$e():t==="fa"?p$e():t==="ar"?m$e():t==="es"?g$e():t==="hi"?v$e():d$e()}),y$e=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",x$e=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",w$e=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",k$e=()=>"ستظهر التجارب وعمليات تشغيلها هنا. اطلب من الوكيل إعداد تجربة للبدء.",S$e=()=>"Los experimentos y sus ejecuciones aparecerán aquí. Pídele al agente que configure un experimento para empezar.",C$e=()=>"प्रयोग और उनके रन यहाँ दिखेंगे। शुरू करने के लिए एजेंट से एक प्रयोग सेट अप करने को कहें।",E$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x$e():t==="fa"?w$e():t==="ar"?k$e():t==="es"?S$e():t==="hi"?C$e():y$e()}),N$e=()=>"No runs yet",z$e=()=>"还没有运行",j$e=()=>"هنوز اجرایی وجود ندارد",A$e=()=>"لا عمليات تشغيل بعد",T$e=()=>"Aún no hay ejecuciones",R$e=()=>"अभी तक कोई रन नहीं",M$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z$e():t==="fa"?j$e():t==="ar"?A$e():t==="es"?T$e():t==="hi"?R$e():N$e()}),O$e=()=>"No experiments yet.",D$e=()=>"还没有实验。",L$e=()=>"هنوز آزمایشی وجود ندارد.",I$e=()=>"لا توجد تجارب بعد.",$$e=()=>"Aún no hay experimentos.",B$e=()=>"अभी तक कोई प्रयोग नहीं।",P$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D$e():t==="fa"?L$e():t==="ar"?I$e():t==="es"?$$e():t==="hi"?B$e():O$e()}),F$e=()=>"Not run yet",H$e=()=>"尚未运行",q$e=()=>"هنوز اجرا نشده",U$e=()=>"لم تُشغَّل بعد",G$e=()=>"Aún sin ejecutar",K$e=()=>"अभी तक नहीं चलाया गया",V$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H$e():t==="fa"?q$e():t==="ar"?U$e():t==="es"?G$e():t==="hi"?K$e():F$e()}),W$e=()=>"1 run",Q$e=()=>"1 次运行",X$e=()=>"۱ اجرا",Y$e=()=>"تشغيل واحد",Z$e=()=>"1 ejecución",J$e=()=>"1 रन",eBe=((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()}),tBe=()=>"Open logs",nBe=()=>"打开日志",rBe=()=>"باز کردن گزارش‌ها",sBe=()=>"فتح السجلات",iBe=()=>"Abrir logs",aBe=()=>"लॉग खोलें",oBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nBe():t==="fa"?rBe():t==="ar"?sBe():t==="es"?iBe():t==="hi"?aBe():tBe()}),cBe=e=>`${e==null?void 0:e.count} runs`,lBe=e=>`${e==null?void 0:e.count} 次运行`,uBe=e=>`${e==null?void 0:e.count} اجرا`,_Be=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,fBe=e=>`${e==null?void 0:e.count} ejecuciones`,dBe=e=>`${e==null?void 0:e.count} रन`,hBe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lBe(e):t==="fa"?uBe(e):t==="ar"?_Be(e):t==="es"?fBe(e):t==="hi"?dBe(e):cBe(e)}),pBe=()=>"Stop requested",mBe=()=>"已请求停止",gBe=()=>"درخواست توقف ثبت شد",vBe=()=>"طُلب الإيقاف",bBe=()=>"Detención solicitada",yBe=()=>"रोकने का अनुरोध किया गया",xBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mBe():t==="fa"?gBe():t==="ar"?vBe():t==="es"?bBe():t==="hi"?yBe():pBe()}),wBe=()=>"Stop run",kBe=()=>"停止运行",SBe=()=>"توقف اجرا",CBe=()=>"إيقاف التشغيل",EBe=()=>"Detener ejecución",NBe=()=>"रन रोकें",zBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kBe():t==="fa"?SBe():t==="ar"?CBe():t==="es"?EBe():t==="hi"?NBe():wBe()}),jBe=()=>"Code",ABe=()=>"代码",TBe=()=>"کد",RBe=()=>"الشيفرة",MBe=()=>"Código",OBe=()=>"कोड",DBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ABe():t==="fa"?TBe():t==="ar"?RBe():t==="es"?MBe():t==="hi"?OBe():jBe()}),LBe=()=>"Experiments",IBe=()=>"实验",$Be=()=>"آزمایش‌ها",BBe=()=>"التجارب",PBe=()=>"Experimentos",FBe=()=>"प्रयोग",HBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IBe():t==="fa"?$Be():t==="ar"?BBe():t==="es"?PBe():t==="hi"?FBe():LBe()}),qBe=()=>"Logs",UBe=()=>"日志",GBe=()=>"گزارش‌ها",KBe=()=>"السجلات",VBe=()=>"Logs",WBe=()=>"लॉग",A3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UBe():t==="fa"?GBe():t==="ar"?KBe():t==="es"?VBe():t==="hi"?WBe():qBe()}),QBe=()=>"Stop failed:",XBe=()=>"停止失败:",YBe=()=>"توقف ناموفق بود:",ZBe=()=>"فشل الإيقاف:",JBe=()=>"Error al detener:",ePe=()=>"रोकना विफल:",tPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XBe():t==="fa"?YBe():t==="ar"?ZBe():t==="es"?JBe():t==="hi"?ePe():QBe()}),nPe=()=>"Download this chat as Markdown",rPe=()=>"将此聊天下载为 Markdown",sPe=()=>"دانلود این گفت‌وگو به‌صورت Markdown",iPe=()=>"تنزيل هذه المحادثة بتنسيق Markdown",aPe=()=>"Descarga este chat en Markdown",oPe=()=>"इस चैट को Markdown के रूप में डाउनलोड करें",cPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rPe():t==="fa"?sPe():t==="ar"?iPe():t==="es"?aPe():t==="hi"?oPe():nPe()}),lPe=()=>"Copy absolute path",uPe=()=>"复制绝对路径",_Pe=()=>"کپی مسیر مطلق",fPe=()=>"نسخ المسار المطلق",dPe=()=>"Copiar ruta absoluta",hPe=()=>"पूर्ण पथ कॉपी करें",T3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uPe():t==="fa"?_Pe():t==="ar"?fPe():t==="es"?dPe():t==="hi"?hPe():lPe()}),pPe=()=>"Open in right-hand panel",mPe=()=>"在右侧面板打开",gPe=()=>"باز کردن در پنل راست",vPe=()=>"فتح في اللوحة اليمنى",bPe=()=>"Abrir en el panel derecho",yPe=()=>"दाएँ पैनल में खोलें",xPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mPe():t==="fa"?gPe():t==="ar"?vPe():t==="es"?bPe():t==="hi"?yPe():pPe()}),wPe=e=>`Remote path: ${e==null?void 0:e.path}`,kPe=e=>`远程路径:${e==null?void 0:e.path}`,SPe=e=>`مسیر راه دور: ${e==null?void 0:e.path}`,CPe=e=>`المسار البعيد: ${e==null?void 0:e.path}`,EPe=e=>`Ruta remota: ${e==null?void 0:e.path}`,NPe=e=>`दूरस्थ पथ: ${e==null?void 0:e.path}`,xL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?kPe(e):t==="fa"?SPe(e):t==="ar"?CPe(e):t==="es"?EPe(e):t==="hi"?NPe(e):wPe(e)}),zPe=()=>"Resolving file location…",jPe=()=>"正在解析文件位置…",APe=()=>"در حال یافتن محل فایل…",TPe=()=>"جارٍ تحديد موقع الملف…",RPe=()=>"Resolviendo la ubicación del archivo…",MPe=()=>"फ़ाइल का स्थान खोजा जा रहा है…",wL=((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()}),OPe=()=>"Clipboard access is unavailable.",DPe=()=>"无法访问剪贴板。",LPe=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",IPe=()=>"الوصول إلى الحافظة غير متاح.",$Pe=()=>"El acceso al portapapeles no está disponible.",BPe=()=>"क्लिपबोर्ड एक्सेस उपलब्ध नहीं है।",kL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DPe():t==="fa"?LPe():t==="ar"?IPe():t==="es"?$Pe():t==="hi"?BPe():OPe()}),PPe=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,FPe=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,HPe=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,qPe=e=>`حذف «${e==null?void 0:e.path}»؟ لا يمكن التراجع عن هذا الإجراء.`,UPe=e=>`¿Eliminar “${e==null?void 0:e.path}”? Esta acción no se puede deshacer.`,GPe=e=>`“${e==null?void 0:e.path}” हटाएं? इसे वापस नहीं लाया जा सकता।`,KPe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FPe(e):t==="fa"?HPe(e):t==="ar"?qPe(e):t==="es"?UPe(e):t==="hi"?GPe(e):PPe(e)}),VPe=()=>"Duplicate",WPe=()=>"创建副本",QPe=()=>"ایجاد نسخهٔ تکراری",XPe=()=>"تكرار",YPe=()=>"Duplicar",ZPe=()=>"डुप्लिकेट करें",JPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WPe():t==="fa"?QPe():t==="ar"?XPe():t==="es"?YPe():t==="hi"?ZPe():VPe()}),eFe=e=>`File actions for ${e==null?void 0:e.path}`,tFe=e=>`${e==null?void 0:e.path} 的文件操作`,nFe=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,rFe=e=>`إجراءات الملف لـ ${e==null?void 0:e.path}`,sFe=e=>`Acciones de archivo para ${e==null?void 0:e.path}`,iFe=e=>`${e==null?void 0:e.path} के लिए फ़ाइल क्रियाएं`,aFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tFe(e):t==="fa"?nFe(e):t==="ar"?rFe(e):t==="es"?sFe(e):t==="hi"?iFe(e):eFe(e)}),oFe=()=>"Open",cFe=()=>"打开",lFe=()=>"باز کردن",uFe=()=>"فتح",_Fe=()=>"Abrir",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=e=>`Rename ${e==null?void 0:e.path}`,pFe=e=>`重命名 ${e==null?void 0:e.path}`,mFe=e=>`تغییر نام ${e==null?void 0:e.path}`,gFe=e=>`إعادة تسمية ${e==null?void 0:e.path}`,vFe=e=>`Renombrar ${e==null?void 0:e.path}`,bFe=e=>`${e==null?void 0:e.path} का नाम बदलें`,yFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pFe(e):t==="fa"?mFe(e):t==="ar"?gFe(e):t==="es"?vFe(e):t==="hi"?bFe(e):hFe(e)}),xFe=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,wFe=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,kFe=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,SFe=e=>`ليس في ${e==null?void 0:e.root} — عرض النسخة من مُخرَجات المشروع.`,CFe=e=>`No está en ${e==null?void 0:e.root} — se muestra la copia de los artefactos del proyecto.`,EFe=e=>`${e==null?void 0:e.root} में नहीं — प्रोजेक्ट के आर्टिफ़ैक्ट से कॉपी दिखाई जा रही है।`,NFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wFe(e):t==="fa"?kFe(e):t==="ar"?SFe(e):t==="es"?CFe(e):t==="hi"?EFe(e):xFe(e)}),zFe=()=>"Binary file — no inline preview.",jFe=()=>"二进制文件——无法内嵌预览。",AFe=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",TFe=()=>"ملف ثنائي — لا توجد معاينة مضمّنة.",RFe=()=>"Archivo binario — sin vista previa.",MFe=()=>"बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।",OFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jFe():t==="fa"?AFe():t==="ar"?TFe():t==="es"?RFe():t==="hi"?MFe():zFe()}),DFe=()=>"This file changed on disk. Your edits have not been overwritten.",LFe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",IFe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",$Fe=()=>"تغيّر هذا الملف على القرص. لم تُستبدل تعديلاتك.",BFe=()=>"Este archivo cambió en disco. Tus cambios no se han sobrescrito.",PFe=()=>"यह फ़ाइल डिस्क पर बदल गई है। आपके बदलाव अधिलेखित नहीं हुए हैं।",fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LFe():t==="fa"?IFe():t==="ar"?$Fe():t==="es"?BFe():t==="hi"?PFe():DFe()}),FFe=()=>"Compile failed",HFe=()=>"编译失败",qFe=()=>"کامپایل ناموفق بود",UFe=()=>"فشل التجميع",GFe=()=>"Error al compilar",KFe=()=>"कंपाइल विफल",VFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HFe():t==="fa"?qFe():t==="ar"?UFe():t==="es"?GFe():t==="hi"?KFe():FFe()}),WFe=()=>"Compile PDF",QFe=()=>"编译 PDF",XFe=()=>"کامپایل PDF",YFe=()=>"تجميع PDF",ZFe=()=>"Compilar PDF",JFe=()=>"PDF कंपाइल करें",dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QFe():t==="fa"?XFe():t==="ar"?YFe():t==="es"?ZFe():t==="hi"?JFe():WFe()}),eHe=()=>"Compiled, but the engine reported errors — check the output below.",tHe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",nHe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",rHe=()=>"اكتمل التجميع، لكن المحرك أبلغ عن أخطاء — راجع المُخرَجات أدناه.",sHe=()=>"Compilado, pero el motor informó de errores — revisa la salida de abajo.",iHe=()=>"कंपाइल हुआ, पर इंजन ने त्रुटियाँ बताईं — नीचे आउटपुट जाँचें।",aHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tHe():t==="fa"?nHe():t==="ar"?rHe():t==="es"?sHe():t==="hi"?iHe():eHe()}),oHe=()=>"Copy command",cHe=()=>"复制命令",lHe=()=>"کپی فرمان",uHe=()=>"نسخ الأمر",_He=()=>"Copiar comando",fHe=()=>"कमांड कॉपी करें",dHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cHe():t==="fa"?lHe():t==="ar"?uHe():t==="es"?_He():t==="hi"?fHe():oHe()}),hHe=()=>"Copy file contents",pHe=()=>"复制文件内容",mHe=()=>"کپی محتوای فایل",gHe=()=>"نسخ محتوى الملف",vHe=()=>"Copiar contenido del archivo",bHe=()=>"फ़ाइल की सामग्री कॉपी करें",hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pHe():t==="fa"?mHe():t==="ar"?gHe():t==="es"?vHe():t==="hi"?bHe():hHe()}),yHe=()=>"Could not copy file contents",xHe=()=>"无法复制文件内容",wHe=()=>"کپی محتوای فایل ممکن نشد",kHe=()=>"تعذّر نسخ محتوى الملف",SHe=()=>"No se pudo copiar el contenido del archivo",CHe=()=>"फ़ाइल की सामग्री कॉपी नहीं हो सकी",EHe=((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()}),NHe=()=>"Copy install command",zHe=()=>"复制安装命令",jHe=()=>"کپی فرمان نصب",AHe=()=>"نسخ أمر التثبيت",THe=()=>"Copiar comando de instalación",RHe=()=>"इंस्टॉल कमांड कॉपी करें",MHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zHe():t==="fa"?jHe():t==="ar"?AHe():t==="es"?THe():t==="hi"?RHe():NHe()}),OHe=()=>"This file was deleted on disk. Your edits have not been discarded.",DHe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",LHe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",IHe=()=>"حُذف هذا الملف من القرص. لم تُتجاهل تعديلاتك.",$He=()=>"Este archivo se eliminó del disco. Tus cambios no se han descartado.",BHe=()=>"यह फ़ाइल डिस्क से हटा दी गई थी। आपके बदलाव मिटाए नहीं गए हैं।",pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DHe():t==="fa"?LHe():t==="ar"?IHe():t==="es"?$He():t==="hi"?BHe():OHe()}),PHe=()=>"Discard my edits and reload",FHe=()=>"放弃我的编辑并重新加载",HHe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",qHe=()=>"تجاهل تعديلاتي وإعادة التحميل",UHe=()=>"Descartar mis cambios y recargar",GHe=()=>"मेरे बदलाव छोड़ें और फिर से लोड करें",KHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FHe():t==="fa"?HHe():t==="ar"?qHe():t==="es"?UHe():t==="hi"?GHe():PHe()}),VHe=()=>"Discard unsaved changes and close this file?",WHe=()=>"要丢弃未保存的更改并关闭此文件吗?",QHe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",XHe=()=>"تجاهل التغييرات غير المحفوظة وإغلاق هذا الملف؟",YHe=()=>"¿Descartar los cambios sin guardar y cerrar este archivo?",ZHe=()=>"सेव न किए गए बदलाव छोड़ें और यह फ़ाइल बंद करें?",mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WHe():t==="fa"?QHe():t==="ar"?XHe():t==="es"?YHe():t==="hi"?ZHe():VHe()}),JHe=()=>"Dismiss",eqe=()=>"关闭",tqe=()=>"بستن",nqe=()=>"تجاهل",rqe=()=>"Cerrar",sqe=()=>"खारिज करें",iqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eqe():t==="fa"?tqe():t==="ar"?nqe():t==="es"?rqe():t==="hi"?sqe():JHe()}),aqe=()=>"Dismiss compile message",oqe=()=>"关闭编译消息",cqe=()=>"بستن پیام کامپایل",lqe=()=>"تجاهل رسالة التجميع",uqe=()=>"Cerrar mensaje de compilación",_qe=()=>"कंपाइल संदेश खारिज करें",fqe=((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()}),dqe=()=>"Dismiss Overleaf message",hqe=()=>"关闭 Overleaf 消息",pqe=()=>"بستن پیام Overleaf",mqe=()=>"تجاهل رسالة Overleaf",gqe=()=>"Cerrar mensaje de Overleaf",vqe=()=>"Overleaf संदेश खारिज करें",bqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hqe():t==="fa"?pqe():t==="ar"?mqe():t==="es"?gqe():t==="hi"?vqe():dqe()}),yqe=()=>"Download",xqe=()=>"下载",wqe=()=>"بارگیری",kqe=()=>"تنزيل",Sqe=()=>"Descargar",Cqe=()=>"डाउनलोड करें",SL=((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()}),Eqe=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,Nqe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,zqe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,jqe=e=>`تنزيل ${e==null?void 0:e.name} (غير محدَّث — أعِد التجميع أولًا)`,Aqe=e=>`Descargar ${e==null?void 0:e.name} (desactualizado — vuelve a compilar antes)`,Tqe=e=>`${e==null?void 0:e.name} डाउनलोड करें (पुरानी — पहले फिर से कंपाइल करें)`,Rqe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nqe(e):t==="fa"?zqe(e):t==="ar"?jqe(e):t==="es"?Aqe(e):t==="hi"?Tqe(e):Eqe(e)}),Mqe=()=>"Failed to load file:",Oqe=()=>"加载文件失败:",Dqe=()=>"بارگیری فایل ناموفق بود:",Lqe=()=>"تعذّر تحميل الملف:",Iqe=()=>"Error al cargar el archivo:",$qe=()=>"फ़ाइल लोड नहीं हो सकी:",gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oqe():t==="fa"?Dqe():t==="ar"?Lqe():t==="es"?Iqe():t==="hi"?$qe():Mqe()}),Bqe=()=>"File truncated — showing the first 512 KB.",Pqe=()=>"文件已截断——仅显示前 512 KB。",Fqe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",Hqe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",qqe=()=>"Archivo truncado — se muestran los primeros 512 KB.",Uqe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",Gqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pqe():t==="fa"?Fqe():t==="ar"?Hqe():t==="es"?qqe():t==="hi"?Uqe():Bqe()}),Kqe=()=>"The page below stops partway — the full file could not be loaded.",Vqe=()=>"下方页面在中途结束——无法加载完整文件。",Wqe=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",Qqe=()=>"عرض الصفحة أدناه غير مكتمل — تعذّر تحميل الملف كاملًا.",Xqe=()=>"La página se corta a mitad — no se pudo cargar el archivo completo.",Yqe=()=>"नीचे का पेज बीच में रुक जाता है — पूरी फ़ाइल लोड नहीं हो सकी।",Zqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vqe():t==="fa"?Wqe():t==="ar"?Qqe():t==="es"?Xqe():t==="hi"?Yqe():Kqe()}),Jqe=e=>`Rendered HTML: ${e==null?void 0:e.name}`,eUe=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,tUe=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,nUe=e=>`HTML المعروض: ${e==null?void 0:e.name}`,rUe=e=>`HTML renderizado: ${e==null?void 0:e.name}`,sUe=e=>`रेंडर किया गया HTML: ${e==null?void 0:e.name}`,iUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eUe(e):t==="fa"?tUe(e):t==="ar"?nUe(e):t==="es"?rUe(e):t==="hi"?sUe(e):Jqe(e)}),aUe=()=>"Loading…",oUe=()=>"正在加载…",cUe=()=>"در حال بارگیری…",lUe=()=>"جارٍ التحميل…",uUe=()=>"Cargando…",_Ue=()=>"लोड हो रहा है…",CL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oUe():t==="fa"?cUe():t==="ar"?lUe():t==="es"?uUe():t==="hi"?_Ue():aUe()}),fUe=()=>"File not found.",dUe=()=>"找不到文件。",hUe=()=>"فایل پیدا نشد.",pUe=()=>"لم يُعثر على الملف.",mUe=()=>"No se encontró el archivo.",gUe=()=>"फ़ाइल नहीं मिली।",Lv=((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()}),vUe=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,bUe=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,yUe=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,xUe=e=>`لم يُعثر على الملف في مُخرَجات المشروع أو في ${e==null?void 0:e.root}.`,wUe=e=>`No se encontró el archivo en los artefactos del proyecto ni en ${e==null?void 0:e.root}.`,kUe=e=>`फ़ाइल प्रोजेक्ट के आर्टिफ़ैक्ट या ${e==null?void 0:e.root} में नहीं मिली।`,SUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bUe(e):t==="fa"?yUe(e):t==="ar"?xUe(e):t==="es"?wUe(e):t==="hi"?kUe(e):vUe(e)}),CUe=e=>`File not found on branch ${e==null?void 0:e.branch}.`,EUe=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,NUe=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,zUe=e=>`لم يُعثر على الملف في الفرع ${e==null?void 0:e.branch}.`,jUe=e=>`No se encontró el archivo en la rama ${e==null?void 0:e.branch}.`,AUe=e=>`फ़ाइल ${e==null?void 0:e.branch} ब्रांच पर नहीं मिली।`,TUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EUe(e):t==="fa"?NUe(e):t==="ar"?zUe(e):t==="es"?jUe(e):t==="hi"?AUe(e):CUe(e)}),RUe=()=>"File not found on disk.",MUe=()=>"磁盘上找不到此文件。",OUe=()=>"فایل روی دیسک پیدا نشد.",DUe=()=>"لم يُعثر على الملف على القرص.",LUe=()=>"No se encontró el archivo en disco.",IUe=()=>"फ़ाइल डिस्क पर नहीं मिली।",$Ue=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MUe():t==="fa"?OUe():t==="ar"?DUe():t==="es"?LUe():t==="hi"?IUe():RUe()}),BUe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,PUe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,FUe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,HUe=e=>`لم يُعثر على الملف في ${e==null?void 0:e.root} ولا في مُخرَجات المشروع.`,qUe=e=>`No se encontró el archivo en ${e==null?void 0:e.root} ni en los artefactos del proyecto.`,UUe=e=>`फ़ाइल ${e==null?void 0:e.root} या प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं मिली।`,GUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PUe(e):t==="fa"?FUe(e):t==="ar"?HUe(e):t==="es"?qUe(e):t==="hi"?UUe(e):BUe(e)}),KUe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,VUe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,WUe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,QUe=e=>`ليس في مُخرَجات المشروع — عرض النسخة من ${e==null?void 0:e.root}.`,XUe=e=>`No está en los artefactos del proyecto — se muestra la copia que hay en ${e==null?void 0:e.root}.`,YUe=e=>`प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं — ${e==null?void 0:e.root} से कॉपी दिखाई जा रही है।`,ZUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VUe(e):t==="fa"?WUe(e):t==="ar"?QUe(e):t==="es"?XUe(e):t==="hi"?YUe(e):KUe(e)}),JUe=()=>"Open in default editor",eGe=()=>"在默认编辑器中打开",tGe=()=>"باز کردن در ویرایشگر پیش‌فرض",nGe=()=>"فتح في المحرر الافتراضي",rGe=()=>"Abrir en el editor predeterminado",sGe=()=>"डिफ़ॉल्ट एडिटर में खोलें",vz=((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=e=>`Committed copy from ${e==null?void 0:e.branch}, not on disk`,aGe=e=>`${e==null?void 0:e.branch} 上已提交的副本,不在磁盘上`,oGe=e=>`نسخهٔ کامیت‌شده از ${e==null?void 0:e.branch}، نه روی دیسک`,cGe=e=>`نسخة مودعة من ${e==null?void 0:e.branch}، ليست على القرص`,lGe=e=>`Copia confirmada de ${e==null?void 0:e.branch}, no en disco`,uGe=e=>`${e==null?void 0:e.branch} की कमिट की गई कॉपी, डिस्क पर नहीं`,wS=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?aGe(e):t==="fa"?oGe(e):t==="ar"?cGe(e):t==="es"?lGe(e):t==="hi"?uGe(e):iGe(e)}),_Ge=()=>"Only for projects on this computer",fGe=()=>"仅适用于此电脑上的项目",dGe=()=>"فقط برای پروژه‌های این رایانه",hGe=()=>"فقط للمشاريع على هذا الكمبيوتر",pGe=()=>"Solo para proyectos en este equipo",mGe=()=>"केवल इस कंप्यूटर के प्रोजेक्ट के लिए",gGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fGe():t==="fa"?dGe():t==="ar"?hGe():t==="es"?pGe():t==="hi"?mGe():_Ge()}),vGe=()=>"Only for files in the project folder",bGe=()=>"仅适用于项目文件夹中的文件",yGe=()=>"فقط برای فایل‌های پوشهٔ پروژه",xGe=()=>"فقط لملفات مجلد المشروع",wGe=()=>"Solo para archivos de la carpeta del proyecto",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=()=>"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.",EGe=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",NGe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",zGe=()=>"تم سحب نسخة Overleaf من هذا الملف بينما كانت لديك تعديلات غير محفوظة، لذا ما تراه لم يعد مطابقًا لما هو على القرص. الحفظ الآن يرسل هذه المسودة إلى Overleaf بدلًا من ذلك.",jGe=()=>"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.",AGe=()=>"इस फ़ाइल की Overleaf कॉपी तब खींची गई जब आपके पास सेव न किए गए बदलाव थे, इसलिए जो आप देख रहे हैं वह अब डिस्क पर मौजूद चीज़ नहीं है। अभी सेव करने पर यह ड्राफ़्ट सीधे Overleaf को भेज दिया जाएगा।",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=()=>"Overwrite disk file",MGe=()=>"覆盖磁盘文件",OGe=()=>"بازنویسی فایل روی دیسک",DGe=()=>"استبدال الملف على القرص",LGe=()=>"Sobrescribir el archivo en disco",IGe=()=>"डिस्क फ़ाइल अधिलेखित करें",$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=()=>"Compiled PDF is out of date",PGe=()=>"已编译的 PDF 不是最新版本",FGe=()=>"PDF کامپایل‌شده به‌روز نیست",HGe=()=>"ملف PDF المُجمَّع غير محدَّث",qGe=()=>"El PDF compilado está desactualizado",UGe=()=>"कंपाइल की गई PDF पुरानी है",GGe=((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()}),KGe=()=>"project clone",VGe=()=>"项目克隆",WGe=()=>"کلون پروژه",QGe=()=>"نسخة المشروع المستنسخة",XGe=()=>"el clon del proyecto",YGe=()=>"प्रोजेक्ट क्लोन",a1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VGe():t==="fa"?WGe():t==="ar"?QGe():t==="es"?XGe():t==="hi"?YGe():KGe()}),ZGe=()=>"Recompile PDF",JGe=()=>"重新编译 PDF",eKe=()=>"کامپایل دوبارهٔ PDF",tKe=()=>"إعادة تجميع PDF",nKe=()=>"Volver a compilar el PDF",rKe=()=>"PDF फिर से कंपाइल करें",bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JGe():t==="fa"?eKe():t==="ar"?tKe():t==="es"?nKe():t==="hi"?rKe():ZGe()}),sKe=()=>"Reload from disk",iKe=()=>"从磁盘重新加载",aKe=()=>"بارگذاری مجدد از دیسک",oKe=()=>"إعادة التحميل من القرص",cKe=()=>"Recargar desde el disco",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=()=>"Reveal in file manager",fKe=()=>"在文件管理器中显示",dKe=()=>"نمایش در مدیر فایل",hKe=()=>"إظهار في مدير الملفات",pKe=()=>"Mostrar en el administrador de archivos",mKe=()=>"फ़ाइल मैनेजर में दिखाएँ",R3=((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()}),gKe=()=>"Save failed",vKe=()=>"保存失败",bKe=()=>"ذخیره ناموفق بود",yKe=()=>"فشل الحفظ",xKe=()=>"Error al guardar",wKe=()=>"सेव विफल",kKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vKe():t==="fa"?bKe():t==="ar"?yKe():t==="es"?xKe():t==="hi"?wKe():gKe()}),SKe=()=>"Saving…",CKe=()=>"正在保存…",EKe=()=>"در حال ذخیره…",NKe=()=>"جارٍ الحفظ…",zKe=()=>"Guardando…",jKe=()=>"सेव हो रहा है…",AKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CKe():t==="fa"?EKe():t==="ar"?NKe():t==="es"?zKe():t==="hi"?jKe():SKe()}),TKe=()=>"Selected — press ⌘C",RKe=()=>"已选中 — 按 ⌘C 复制",MKe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",OKe=()=>"محدد — اضغط ⌘C",DKe=()=>"Seleccionado — pulsa ⌘C",LKe=()=>"चयनित — ⌘C दबाएं",IKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RKe():t==="fa"?MKe():t==="ar"?OKe():t==="es"?DKe():t==="hi"?LKe():TKe()}),$Ke=()=>"session’s worktree",BKe=()=>"会话工作树",PKe=()=>"درخت کاری نشست",FKe=()=>"شجرة عمل الجلسة",HKe=()=>"el árbol de trabajo de la sesión",qKe=()=>"सेशन की वर्कट्री",o1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BKe():t==="fa"?PKe():t==="ar"?FKe():t==="es"?HKe():t==="hi"?qKe():$Ke()}),UKe=()=>"Show compiled PDF",GKe=()=>"显示已编译的 PDF",KKe=()=>"نمایش PDF کامپایل‌شده",VKe=()=>"عرض ملف PDF المُجمَّع",WKe=()=>"Mostrar el PDF compilado",QKe=()=>"कंपाइल की गई PDF दिखाएं",yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GKe():t==="fa"?KKe():t==="ar"?VKe():t==="es"?WKe():t==="hi"?QKe():UKe()}),XKe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",YKe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",ZKe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",JKe=()=>"أُنشئ ملف PDF هذا من نسخة أقدم من المصدر — أعِد تجميعه لتحديثه.",eVe=()=>"Este PDF se compiló a partir de una versión anterior del código fuente — vuelve a compilar para actualizarlo.",tVe=()=>"यह PDF सोर्स के पुराने वर्शन से कंपाइल हुआ था — अपडेट करने के लिए फिर से कंपाइल करें।",nVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YKe():t==="fa"?ZKe():t==="ar"?JKe():t==="es"?eVe():t==="hi"?tVe():XKe()}),rVe=()=>"This session's worktree isn't available — showing the project clone's copy.",sVe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",iVe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",aVe=()=>"شجرة عمل هذه الجلسة غير متاحة — عرض الملف من نسخة المشروع المستنسخة.",oVe=()=>"El árbol de trabajo de esta sesión no está disponible — se muestra la copia del clon del proyecto.",cVe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है — प्रोजेक्ट क्लोन की कॉपी दिखाई जा रही है।",lVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sVe():t==="fa"?iVe():t==="ar"?aVe():t==="es"?oVe():t==="hi"?cVe():rVe()}),uVe=()=>"Unsaved",_Ve=()=>"未保存",fVe=()=>"ذخیره نشده",dVe=()=>"غير محفوظ",hVe=()=>"Sin guardar",pVe=()=>"सेव नहीं हुआ",EL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ve():t==="fa"?fVe():t==="ar"?dVe():t==="es"?hVe():t==="hi"?pVe():uVe()}),mVe=()=>"Unsaved — ⌘S to save",gVe=()=>"未保存 — 按 ⌘S 保存",vVe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",bVe=()=>"غير محفوظ — ⌘S للحفظ",yVe=()=>"Sin guardar — ⌘S para guardar",xVe=()=>"सेव नहीं हुआ — सेव करने के लिए ⌘S दबाएं",wVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gVe():t==="fa"?vVe():t==="ar"?bVe():t==="es"?yVe():t==="hi"?xVe():mVe()}),kVe=()=>"Update orx on the remote machine to edit this file safely.",SVe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",CVe=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",EVe=()=>"حدّث orx على الجهاز البعيد لتعديل هذا الملف بأمان.",NVe=()=>"Actualiza orx en la máquina remota para editar este archivo de forma segura.",zVe=()=>"इस फ़ाइल को सुरक्षित रूप से संपादित करने के लिए रिमोट मशीन पर orx अपडेट करें।",jVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SVe():t==="fa"?CVe():t==="ar"?EVe():t==="es"?NVe():t==="hi"?zVe():kVe()}),AVe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",TVe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",RVe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",MVe=()=>"شجرة عمل هذه الجلسة غير متاحة، والملف ليس في نسخة المشروع المستنسخة ولا في مُخرَجاته.",OVe=()=>"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.",DVe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है, और फ़ाइल प्रोजेक्ट क्लोन या उसके आर्टिफ़ैक्ट में नहीं है।",LVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TVe():t==="fa"?RVe():t==="ar"?MVe():t==="es"?OVe():t==="hi"?DVe():AVe()}),IVe=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",$Ve=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",BVe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",PVe=()=>"ستظهر ملفات مساحة العمل هنا. اطلب من الوكيل إنشاء ملف للبدء.",FVe=()=>"Los archivos de este espacio de trabajo aparecerán aquí. Pídele al agente que cree un archivo para empezar.",HVe=()=>"इस वर्कस्पेस की फ़ाइलें यहाँ दिखेंगी। शुरू करने के लिए एजेंट से एक फ़ाइल बनाने को कहें।",qVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ve():t==="fa"?BVe():t==="ar"?PVe():t==="es"?FVe():t==="hi"?HVe():IVe()}),UVe=()=>"Back to preview",GVe=()=>"返回预览",KVe=()=>"بازگشت به پیش‌نمایش",VVe=()=>"العودة إلى المعاينة",WVe=()=>"Volver a la vista previa",QVe=()=>"प्रीव्यू पर वापस जाएं",XVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GVe():t==="fa"?KVe():t==="ar"?VVe():t==="es"?WVe():t==="hi"?QVe():UVe()}),YVe=e=>`${e==null?void 0:e.count} changed files`,ZVe=e=>`${e==null?void 0:e.count} 个已更改文件`,JVe=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,eWe=e=>`الملفات المعدَّلة: ${e==null?void 0:e.count}`,tWe=e=>`${e==null?void 0:e.count} archivos modificados`,nWe=e=>`${e==null?void 0:e.count} बदली गई फ़ाइलें`,NL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZVe(e):t==="fa"?JVe(e):t==="ar"?eWe(e):t==="es"?tWe(e):t==="hi"?nWe(e):YVe(e)}),rWe=()=>"Changed files",sWe=()=>"已更改文件",iWe=()=>"فایل‌های تغییرکرده",aWe=()=>"الملفات المتغيّرة",oWe=()=>"Archivos modificados",cWe=()=>"बदली गई फ़ाइलें",lWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sWe():t==="fa"?iWe():t==="ar"?aWe():t==="es"?oWe():t==="hi"?cWe():rWe()}),uWe=()=>"Diff preview truncated",_We=()=>"差异预览已截断",fWe=()=>"پیش‌نمایش تفاوت کوتاه شده است",dWe=()=>"معاينة الفروق مقتطعة",hWe=()=>"Vista previa del diff truncada",pWe=()=>"डिफ़ प्रीव्यू छोटा किया गया",mWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_We():t==="fa"?fWe():t==="ar"?dWe():t==="es"?hWe():t==="hi"?pWe():uWe()}),gWe=e=>`${e==null?void 0:e.count} files shown (partial)`,vWe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,bWe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,yWe=e=>`الملفات المعروضة: ${e==null?void 0:e.count} (عرض جزئي)`,xWe=e=>`${e==null?void 0:e.count} archivos mostrados (parcial)`,wWe=e=>`${e==null?void 0:e.count} फ़ाइलें दिखाई गईं (आंशिक)`,kWe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vWe(e):t==="fa"?bWe(e):t==="ar"?yWe(e):t==="es"?xWe(e):t==="hi"?wWe(e):gWe(e)}),SWe=()=>"No changes.",CWe=()=>"没有更改。",EWe=()=>"تغییری وجود ندارد.",NWe=()=>"لا توجد تغييرات.",zWe=()=>"No hay cambios.",jWe=()=>"कोई बदलाव नहीं।",AWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CWe():t==="fa"?EWe():t==="ar"?NWe():t==="es"?zWe():t==="hi"?jWe():SWe()}),TWe=()=>"No complete file preview was available before the cutoff.",RWe=()=>"在截断位置之前没有完整的文件预览。",MWe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",OWe=()=>"لم تتوفر معاينة كاملة للملف قبل الحد الأقصى.",DWe=()=>"No se pudo previsualizar ningún archivo completo antes del límite.",LWe=()=>"कटऑफ़ से पहले कोई पूरा फ़ाइल प्रीव्यू उपलब्ध नहीं था।",IWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RWe():t==="fa"?MWe():t==="ar"?OWe():t==="es"?DWe():t==="hi"?LWe():TWe()}),$We=()=>"No textual diff for this file.",BWe=()=>"此文件没有文本差异。",PWe=()=>"برای این فایل تفاوت متنی وجود ندارد.",FWe=()=>"لا يوجد فرق نصّي لهذا الملف.",HWe=()=>"No hay diff de texto para este archivo.",qWe=()=>"इस फ़ाइल के लिए कोई टेक्स्ट डिफ़ नहीं है।",UWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BWe():t==="fa"?PWe():t==="ar"?FWe():t==="es"?HWe():t==="hi"?qWe():$We()}),GWe=()=>"1 changed file",KWe=()=>"1 个已更改文件",VWe=()=>"۱ فایل تغییرکرده",WWe=()=>"ملف واحد معدَّل",QWe=()=>"1 archivo modificado",XWe=()=>"1 बदली गई फ़ाइल",zL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KWe():t==="fa"?VWe():t==="ar"?WWe():t==="es"?QWe():t==="hi"?XWe():GWe()}),YWe=()=>"1 file shown (partial)",ZWe=()=>"显示 1 个文件(部分)",JWe=()=>"۱ فایل نمایش داده شده (ناقص)",eQe=()=>"عُرض ملف واحد (جزئيًا)",tQe=()=>"1 archivo mostrado (parcial)",nQe=()=>"1 फ़ाइल दिखाई गई (आंशिक)",rQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZWe():t==="fa"?JWe():t==="ar"?eQe():t==="es"?tQe():t==="hi"?nQe():YWe()}),sQe=()=>"Unable to parse this diff.",iQe=()=>"无法解析此差异。",aQe=()=>"خواندن این تفاوت ممکن نبود.",oQe=()=>"تعذّر تحليل هذا الفرق.",cQe=()=>"No se pudo interpretar este diff.",lQe=()=>"यह डिफ़ पार्स नहीं हो सका।",uQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iQe():t==="fa"?aQe():t==="ar"?oQe():t==="es"?cQe():t==="hi"?lQe():sQe()}),_Qe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,fQe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,dQe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,hQe=e=>`عرض أول ${e==null?void 0:e.limit} (قُرئ ${e==null?void 0:e.read}). اطّلع على الفرق الكامل محليًا عبر git.`,pQe=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.`,mQe=e=>`पहले ${e==null?void 0:e.limit} दिखाए जा रहे हैं (${e==null?void 0:e.read} पढ़े गए)। git के साथ लोकल रूप से पूरा डिफ़ देखें।`,gQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fQe(e):t==="fa"?dQe(e):t==="ar"?hQe(e):t==="es"?pQe(e):t==="hi"?mQe(e):_Qe(e)}),vQe=()=>"View full diff",bQe=()=>"查看完整差异",yQe=()=>"نمایش تفاوت کامل",xQe=()=>"عرض الفرق الكامل",wQe=()=>"Ver diff completo",kQe=()=>"पूरा डिफ़ देखें",SQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bQe():t==="fa"?yQe():t==="ar"?xQe():t==="es"?wQe():t==="hi"?kQe():vQe()}),CQe=()=>"Create a token ↗",EQe=()=>"创建令牌 ↗",NQe=()=>"ساخت توکن ↗",zQe=()=>"إنشاء رمز ↗",jQe=()=>"Crear un token ↗",AQe=()=>"एक टोकन बनाएं ↗",TQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EQe():t==="fa"?NQe():t==="ar"?zQe():t==="es"?jQe():t==="hi"?AQe():CQe()}),RQe=()=>"Keep the agent working toward a goal",MQe=()=>"让智能体持续朝目标推进",OQe=()=>"عامل را در مسیر یک هدف نگه دارید",DQe=()=>"اجعل الوكيل يعمل نحو هدف",LQe=()=>"Mantén al agente trabajando hacia un objetivo",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=()=>"Approve and run",PQe=()=>"批准并运行",FQe=()=>"تأیید و اجرا",HQe=()=>"الموافقة والتشغيل",qQe=()=>"Aprobar y ejecutar",UQe=()=>"स्वीकार करें और चलाएं",GQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PQe():t==="fa"?FQe():t==="ar"?HQe():t==="es"?qQe():t==="hi"?UQe():BQe()}),KQe=()=>"Cancel setup",VQe=()=>"取消设置",WQe=()=>"لغو راه‌اندازی",QQe=()=>"إلغاء الإعداد",XQe=()=>"Cancelar configuración",YQe=()=>"सेटअप रद्द करें",ZQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VQe():t==="fa"?WQe():t==="ar"?QQe():t==="es"?XQe():t==="hi"?YQe():KQe()}),JQe=()=>"Checking connection…",eXe=()=>"正在检查连接…",tXe=()=>"در حال بررسی اتصال…",nXe=()=>"جارٍ التحقق من الإعداد…",rXe=()=>"Comprobando conexión…",sXe=()=>"कनेक्शन जाँचा जा रहा है…",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=e=>`${e==null?void 0:e.agent} is connected.`,oXe=e=>`${e==null?void 0:e.agent} 已连接。`,cXe=e=>`${e==null?void 0:e.agent} متصل است.`,lXe=e=>`أصبح ${e==null?void 0:e.agent} جاهزًا.`,uXe=e=>`${e==null?void 0:e.agent} está conectado.`,_Xe=e=>`${e==null?void 0:e.agent} कनेक्टेड है।`,fXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oXe(e):t==="fa"?cXe(e):t==="ar"?lXe(e):t==="es"?uXe(e):t==="hi"?_Xe(e):aXe(e)}),dXe=()=>"Setup needs attention.",hXe=()=>"设置需要处理。",pXe=()=>"راه‌اندازی نیاز به بررسی دارد.",mXe=()=>"تعذّر إكمال الإعداد.",gXe=()=>"La configuración requiere atención.",vXe=()=>"सेटअप पर ध्यान देने की ज़रूरत है।",jL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hXe():t==="fa"?pXe():t==="ar"?mXe():t==="es"?gXe():t==="hi"?vXe():dXe()}),bXe=()=>"Install",yXe=()=>"安装",xXe=()=>"نصب",wXe=()=>"تثبيت",kXe=()=>"Instalar",SXe=()=>"इंस्टॉल करें",CXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yXe():t==="fa"?xXe():t==="ar"?wXe():t==="es"?kXe():t==="hi"?SXe():bXe()}),EXe=e=>`Approve the command below to download and install ${e==null?void 0:e.agent} on your computer.`,NXe=e=>`批准以下命令以在您的电脑上下载并安装 ${e==null?void 0:e.agent}。`,zXe=e=>`برای دانلود و نصب ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,jXe=e=>`سيؤدي هذا إلى تنزيل ${e==null?void 0:e.agent} وتثبيته على جهازك. وافق لتشغيل الأمر أدناه.`,AXe=e=>`Aprueba el siguiente comando para descargar e instalar ${e==null?void 0:e.agent} en tu equipo.`,TXe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} डाउनलोड और इंस्टॉल करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,RXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NXe(e):t==="fa"?zXe(e):t==="ar"?jXe(e):t==="es"?AXe(e):t==="hi"?TXe(e):EXe(e)}),MXe=()=>"Could not load setup commands.",OXe=()=>"无法加载设置命令。",DXe=()=>"بارگیری دستورهای راه‌اندازی ناموفق بود.",LXe=()=>"تعذّر تحميل أوامر الإعداد.",IXe=()=>"No se pudieron cargar los comandos de configuración.",$Xe=()=>"सेटअप कमांड लोड नहीं हो सके।",BXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OXe():t==="fa"?DXe():t==="ar"?LXe():t==="es"?IXe():t==="hi"?$Xe():MXe()}),PXe=()=>"Sign in",FXe=()=>"登录",HXe=()=>"ورود",qXe=()=>"تسجيل الدخول",UXe=()=>"Iniciar sesión",GXe=()=>"साइन इन करें",AL=((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()}),KXe=()=>"The agent is not ready yet. Re-check or retry sign-in.",VXe=()=>"代理尚未就绪。请重新检查或重试登录。",WXe=()=>"عامل هنوز آماده نیست. دوباره بررسی کنید یا ورود را تکرار کنید.",QXe=()=>"وكيل البرمجة غير جاهز بعد. أعد التحقق ثم حاول مجددًا.",XXe=()=>"El agente aún no está listo. Vuelve a comprobarlo o intenta iniciar sesión de nuevo.",YXe=()=>"एजेंट अभी तैयार नहीं है। फिर से जाँचें या साइन-इन फिर से कोशिश करें।",TL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VXe():t==="fa"?WXe():t==="ar"?QXe():t==="es"?XXe():t==="hi"?YXe():KXe()}),ZXe=()=>"Install, update, and sign-in buttons open a terminal here in OpenResearch.",JXe=()=>"安装、更新和登录按钮会在 OpenResearch 内打开终端。",eYe=()=>"دکمه‌های نصب، به‌روزرسانی و ورود، ترمینالی در همین OpenResearch باز می‌کنند.",tYe=()=>"يفتح طرفية هنا",nYe=()=>"Los botones de instalación, actualización e inicio de sesión abren un terminal aquí, en OpenResearch.",rYe=()=>"इंस्टॉल, अपडेट और साइन-इन बटन OpenResearch में यहीं एक टर्मिनल खोलते हैं।",sYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JXe():t==="fa"?eYe():t==="ar"?tYe():t==="es"?nYe():t==="hi"?rYe():ZXe()}),iYe=()=>"This install command requires Node.js and npm.",aYe=()=>"此安装命令需要 Node.js 和 npm。",oYe=()=>"این دستور نصب به Node.js و npm نیاز دارد.",cYe=()=>"يلزم تثبيت Node.js وnpm لتشغيل هذا الأمر.",lYe=()=>"Este comando de instalación requiere Node.js y npm.",uYe=()=>"इस इंस्टॉल कमांड के लिए Node.js और npm ज़रूरी हैं।",_Ye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aYe():t==="fa"?oYe():t==="ar"?cYe():t==="es"?lYe():t==="hi"?uYe():iYe()}),fYe=e=>`Running \`${e==null?void 0:e.command}\` in the terminal:`,dYe=e=>`正在终端中运行 \`${e==null?void 0:e.command}\`:`,hYe=e=>`در حال اجرای \`${e==null?void 0:e.command}\` در ترمینال:`,pYe=e=>`جارٍ تشغيل \`${e==null?void 0:e.command}\` في الطرفية:`,mYe=e=>`Ejecutando \`${e==null?void 0:e.command}\` en el terminal:`,gYe=e=>`टर्मिनल में \`${e==null?void 0:e.command}\` चलाया जा रहा है:`,vYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dYe(e):t==="fa"?hYe(e):t==="ar"?pYe(e):t==="es"?mYe(e):t==="hi"?gYe(e):fYe(e)}),bYe=e=>`Set up ${e==null?void 0:e.agent}`,yYe=e=>`设置 ${e==null?void 0:e.agent}`,xYe=e=>`راه‌اندازی ${e==null?void 0:e.agent}`,wYe=e=>`إعداد ${e==null?void 0:e.agent}`,kYe=e=>`Configurar ${e==null?void 0:e.agent}`,SYe=e=>`${e==null?void 0:e.agent} सेट अप करें`,xz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yYe(e):t==="fa"?xYe(e):t==="ar"?wYe(e):t==="es"?kYe(e):t==="hi"?SYe(e):bYe(e)}),CYe=()=>"Update",EYe=()=>"更新",NYe=()=>"به‌روزرسانی",zYe=()=>"تحديث",jYe=()=>"Actualizar",AYe=()=>"अपडेट करें",TYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EYe():t==="fa"?NYe():t==="ar"?zYe():t==="es"?jYe():t==="hi"?AYe():CYe()}),RYe=e=>`Approve the command below to update ${e==null?void 0:e.agent} on your computer.`,MYe=e=>`批准以下命令以在您的电脑上更新 ${e==null?void 0:e.agent}。`,OYe=e=>`برای به‌روزرسانی ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,DYe=e=>`سيؤدي هذا إلى تحديث ${e==null?void 0:e.agent} على جهازك. وافق لتشغيل الأمر أدناه.`,LYe=e=>`Aprueba el siguiente comando para actualizar ${e==null?void 0:e.agent} en tu equipo.`,IYe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} अपडेट करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,$Ye=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?MYe(e):t==="fa"?OYe(e):t==="ar"?DYe(e):t==="es"?LYe(e):t==="hi"?IYe(e):RYe(e)}),BYe=()=>"All projects",PYe=()=>"所有项目",FYe=()=>"همهٔ پروژه‌ها",HYe=()=>"كل المشاريع",qYe=()=>"Todos los proyectos",UYe=()=>"सभी प्रोजेक्ट",wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PYe():t==="fa"?FYe():t==="ar"?HYe():t==="es"?qYe():t==="hi"?UYe():BYe()}),GYe=()=>"Configure Repository",KYe=()=>"配置仓库",VYe=()=>"پیکربندی مخزن",WYe=()=>"إعداد المستودع",QYe=()=>"Configurar repositorio",XYe=()=>"रिपॉज़िटरी कॉन्फ़िगर करें",YYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KYe():t==="fa"?VYe():t==="ar"?WYe():t==="es"?QYe():t==="hi"?XYe():GYe()}),ZYe=()=>"Create a new project",JYe=()=>"新建项目",eZe=()=>"ایجاد پروژهٔ جدید",tZe=()=>"إنشاء مشروع جديد",nZe=()=>"Crear un proyecto nuevo",rZe=()=>"नया प्रोजेक्ट बनाएं",sZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JYe():t==="fa"?eZe():t==="ar"?tZe():t==="es"?nZe():t==="hi"?rZe():ZYe()}),iZe=()=>"Hide sidebar",aZe=()=>"隐藏侧边栏",oZe=()=>"پنهان کردن نوار کناری",cZe=()=>"إخفاء الشريط الجانبي",lZe=()=>"Ocultar barra lateral",uZe=()=>"साइडबार छिपाएं",kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aZe():t==="fa"?oZe():t==="ar"?cZe():t==="es"?lZe():t==="hi"?uZe():iZe()}),_Ze=()=>"Project",fZe=()=>"项目",dZe=()=>"پروژه",hZe=()=>"المشروع",pZe=()=>"Proyecto",mZe=()=>"प्रोजेक्ट",RL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fZe():t==="fa"?dZe():t==="ar"?hZe():t==="es"?pZe():t==="hi"?mZe():_Ze()}),gZe=e=>`${e==null?void 0:e.count} cancelled`,vZe=e=>`${e==null?void 0:e.count} 次取消`,bZe=e=>`${e==null?void 0:e.count} لغوشده`,yZe=e=>`الملغاة: ${e==null?void 0:e.count}`,xZe=e=>`${e==null?void 0:e.count} canceladas`,wZe=e=>`${e==null?void 0:e.count} रद्द`,kZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vZe(e):t==="fa"?bZe(e):t==="ar"?yZe(e):t==="es"?xZe(e):t==="hi"?wZe(e):gZe(e)}),SZe=e=>`${e==null?void 0:e.count} done`,CZe=e=>`${e==null?void 0:e.count} 次完成`,EZe=e=>`${e==null?void 0:e.count} تمام‌شده`,NZe=e=>`المكتملة: ${e==null?void 0:e.count}`,zZe=e=>`${e==null?void 0:e.count} completadas`,jZe=e=>`${e==null?void 0:e.count} पूरे`,AZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CZe(e):t==="fa"?EZe(e):t==="ar"?NZe(e):t==="es"?zZe(e):t==="hi"?jZe(e):SZe(e)}),TZe=e=>`${e==null?void 0:e.count} failed`,RZe=e=>`${e==null?void 0:e.count} 次失败`,MZe=e=>`${e==null?void 0:e.count} ناموفق`,OZe=e=>`الفاشلة: ${e==null?void 0:e.count}`,DZe=e=>`${e==null?void 0:e.count} con error`,LZe=e=>`${e==null?void 0:e.count} विफल`,IZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RZe(e):t==="fa"?MZe(e):t==="ar"?OZe(e):t==="es"?DZe(e):t==="hi"?LZe(e):TZe(e)}),$Ze=e=>`${e==null?void 0:e.count} files`,BZe=e=>`${e==null?void 0:e.count} 个文件`,PZe=e=>`${e==null?void 0:e.count} فایل`,FZe=e=>`الملفات: ${e==null?void 0:e.count}`,HZe=e=>`${e==null?void 0:e.count} archivos`,qZe=e=>`${e==null?void 0:e.count} फ़ाइलें`,UZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BZe(e):t==="fa"?PZe(e):t==="ar"?FZe(e):t==="es"?HZe(e):t==="hi"?qZe(e):$Ze(e)}),GZe=e=>`${e==null?void 0:e.count}+ files`,KZe=e=>`至少 ${e==null?void 0:e.count} 个文件`,VZe=e=>`بیش از ${e==null?void 0:e.count} فایل`,WZe=e=>`الملفات: ${e==null?void 0:e.count} على الأقل`,QZe=e=>`${e==null?void 0:e.count}+ archivos`,XZe=e=>`${e==null?void 0:e.count}+ फ़ाइलें`,YZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?KZe(e):t==="fa"?VZe(e):t==="ar"?WZe(e):t==="es"?QZe(e):t==="hi"?XZe(e):GZe(e)}),ZZe=e=>`${e==null?void 0:e.count} live`,JZe=e=>`${e==null?void 0:e.count} 次进行中`,eJe=e=>`${e==null?void 0:e.count} فعال`,tJe=e=>`النشطة: ${e==null?void 0:e.count}`,nJe=e=>`${e==null?void 0:e.count} en curso`,rJe=e=>`${e==null?void 0:e.count} लाइव`,sJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JZe(e):t==="fa"?eJe(e):t==="ar"?tJe(e):t==="es"?nJe(e):t==="hi"?rJe(e):ZZe(e)}),iJe=()=>"1 file",aJe=()=>"1 个文件",oJe=()=>"۱ فایل",cJe=()=>"ملف واحد",lJe=()=>"1 archivo",uJe=()=>"1 फ़ाइल",_Je=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aJe():t==="fa"?oJe():t==="ar"?cJe():t==="es"?lJe():t==="hi"?uJe():iJe()}),fJe=()=>"1 run",dJe=()=>"1 次运行",hJe=()=>"۱ اجرا",pJe=()=>"تشغيل واحد",mJe=()=>"1 ejecución",gJe=()=>"1 रन",vJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dJe():t==="fa"?hJe():t==="ar"?pJe():t==="es"?mJe():t==="hi"?gJe():fJe()}),bJe=e=>`${e==null?void 0:e.count} runs`,yJe=e=>`${e==null?void 0:e.count} 次运行`,xJe=e=>`${e==null?void 0:e.count} اجرا`,wJe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,kJe=e=>`${e==null?void 0:e.count} ejecuciones`,SJe=e=>`${e==null?void 0:e.count} रन`,CJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yJe(e):t==="fa"?xJe(e):t==="ar"?wJe(e):t==="es"?kJe(e):t==="hi"?SJe(e):bJe(e)}),EJe=()=>"Zoom in",NJe=()=>"放大",zJe=()=>"بزرگ‌نمایی",jJe=()=>"تكبير",AJe=()=>"Acercar",TJe=()=>"ज़ूम इन",Sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NJe():t==="fa"?zJe():t==="ar"?jJe():t==="es"?AJe():t==="hi"?TJe():EJe()}),RJe=()=>"Zoom out",MJe=()=>"缩小",OJe=()=>"کوچک‌نمایی",DJe=()=>"تصغير",LJe=()=>"Alejar",IJe=()=>"ज़ूम आउट",Cz=((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=()=>"Reset zoom to fit",BJe=()=>"重置为适合窗口",PJe=()=>"بازنشانی بزرگ‌نمایی برای جا شدن",FJe=()=>"إعادة ضبط التكبير للملاءمة",HJe=()=>"Restablecer zoom para ajustar",qJe=()=>"फ़िट करने के लिए ज़ूम रीसेट करें",Ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BJe():t==="fa"?PJe():t==="ar"?FJe():t==="es"?HJe():t==="hi"?qJe():$Je()}),UJe=()=>"No instances yet.",GJe=()=>"还没有实例。",KJe=()=>"هنوز نمونه‌ای وجود ندارد.",VJe=()=>"لا توجد مثيلات بعد.",WJe=()=>"Aún no hay instancias.",QJe=()=>"अभी तक कोई इंस्टेंस नहीं।",XJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GJe():t==="fa"?KJe():t==="ar"?VJe():t==="es"?WJe():t==="hi"?QJe():UJe()}),YJe=()=>"Nothing running right now.",ZJe=()=>"当前没有运行中的实例。",JJe=()=>"اکنون چیزی در حال اجرا نیست.",eet=()=>"لا شيء قيد التشغيل الآن.",tet=()=>"No hay nada en ejecución ahora mismo.",net=()=>"अभी कुछ नहीं चल रहा।",ret=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZJe():t==="fa"?JJe():t==="ar"?eet():t==="es"?tet():t==="hi"?net():YJe()}),set=()=>"Select a project to see its history.",iet=()=>"请选择一个项目以查看其历史记录。",aet=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",oet=()=>"اختر مشروعًا لرؤية سجله.",cet=()=>"Selecciona un proyecto para ver su historial.",uet=()=>"इसका इतिहास देखने के लिए एक प्रोजेक्ट चुनें।",_et=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iet():t==="fa"?aet():t==="ar"?oet():t==="es"?cet():t==="hi"?uet():set()}),fet=()=>"Select a project to see its runs.",det=()=>"请选择一个项目以查看其运行。",het=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",pet=()=>"اختر مشروعًا لرؤية عمليات تشغيله.",met=()=>"Selecciona un proyecto para ver sus ejecuciones.",get=()=>"इसके रन देखने के लिए एक प्रोजेक्ट चुनें।",vet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?det():t==="fa"?het():t==="ar"?pet():t==="es"?met():t==="hi"?get():fet()}),bet=()=>"View history",yet=()=>"查看历史记录",xet=()=>"مشاهدهٔ تاریخچه",wet=()=>"عرض السجل",ket=()=>"Ver historial",Cet=()=>"इतिहास देखें",Eet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yet():t==="fa"?xet():t==="ar"?wet():t==="es"?ket():t==="hi"?Cet():bet()}),Net=e=>`View history (${e==null?void 0:e.count})`,zet=e=>`查看历史记录(${e==null?void 0:e.count})`,jet=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,Aet=e=>`عرض السجل (${e==null?void 0:e.count})`,Tet=e=>`Ver historial (${e==null?void 0:e.count})`,Ret=e=>`इतिहास देखें (${e==null?void 0:e.count})`,Met=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zet(e):t==="fa"?jet(e):t==="ar"?Aet(e):t==="es"?Tet(e):t==="hi"?Ret(e):Net(e)}),Oet=()=>"The engine exited without producing a PDF or a log.",Det=()=>"引擎已退出,但没有生成 PDF 或日志。",Let=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",Iet=()=>"خرج المحرك دون إنتاج ملف PDF أو سجل.",$et=()=>"El motor terminó sin generar un PDF ni un log.",Bet=()=>"इंजन बिना PDF या लॉग बनाए बाहर निकल गया।",Pet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Det():t==="fa"?Let():t==="ar"?Iet():t==="es"?$et():t==="hi"?Bet():Oet()}),Fet=()=>"Loading…",Het=()=>"正在加载…",qet=()=>"در حال بارگیری…",Uet=()=>"جارٍ التحميل…",Get=()=>"Cargando…",Ket=()=>"लोड हो रहा है…",Vet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Het():t==="fa"?qet():t==="ar"?Uet():t==="es"?Get():t==="hi"?Ket():Fet()}),Wet=()=>"Add local model",Qet=()=>"添加本地模型",Xet=()=>"افزودن مدل محلی",Yet=()=>"إضافة نموذج محلي",Zet=()=>"Añadir modelo local",Jet=()=>"लोकल मॉडल जोड़ें",ML=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qet():t==="fa"?Xet():t==="ar"?Yet():t==="es"?Zet():t==="hi"?Jet():Wet()}),ett=()=>"Local server address",ttt=()=>"本地服务器地址",ntt=()=>"نشانی سرور محلی",rtt=()=>"عنوان الخادم المحلي",stt=()=>"Dirección del servidor local",itt=()=>"लोकल सर्वर पता",att=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ttt():t==="fa"?ntt():t==="ar"?rtt():t==="es"?stt():t==="hi"?itt():ett()}),ott=()=>"Find models",ctt=()=>"查找模型",ltt=()=>"یافتن مدل‌ها",utt=()=>"العثور على النماذج",_tt=()=>"Buscar modelos",ftt=()=>"मॉडल खोजें",dtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ctt():t==="fa"?ltt():t==="ar"?utt():t==="es"?_tt():t==="hi"?ftt():ott()}),htt=()=>"(OpenAI compatible)",ptt=()=>"(兼容 OpenAI)",mtt=()=>"(سازگار با OpenAI)",gtt=()=>"(متوافق مع OpenAI)",vtt=()=>"(compatible con OpenAI)",btt=()=>"(OpenAI संगत)",OL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ptt():t==="fa"?mtt():t==="ar"?gtt():t==="es"?vtt():t==="hi"?btt():htt()}),ytt=()=>"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.",xtt=()=>"已保存,但 OpenCode 未列出该模型。请重新检查已安装的智能体。如果 OpenCode 配置限制了启用的提供商,请先允许此连接。",wtt=()=>"ذخیره شد، اما OpenCode این مدل را فهرست نکرد. عامل‌های نصب‌شده را دوباره بررسی کنید. اگر پیکربندی OpenCode ارائه‌دهندگان فعال را محدود کرده، ابتدا این اتصال را مجاز کنید.",ktt=()=>"تم الحفظ، لكن OpenCode لم يُدرج هذا النموذج. تحقق من الوكلاء المثبّتين مجددًا. إذا كان إعداد OpenCode يقيّد المزوّدين المفعّلين، فاسمح بهذا الاتصال قبل استخدامه.",Stt=()=>"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.",Ctt=()=>"सेव हो गया, पर OpenCode ने इस मॉडल की सूची नहीं दी। इंस्टॉल किए गए एजेंट फिर से जाँचें। अगर आपका OpenCode कॉन्फ़िग चालू प्रोवाइडर सीमित करता है, तो इस्तेमाल से पहले इस कनेक्शन की अनुमति दें।",Ett=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xtt():t==="fa"?wtt():t==="ar"?ktt():t==="es"?Stt():t==="hi"?Ctt():ytt()}),Ntt=()=>"Connected",ztt=()=>"已连接",jtt=()=>"متصل شد",Att=()=>"متصل",Ttt=()=>"Conectado",Rtt=()=>"कनेक्टेड",Mtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ztt():t==="fa"?jtt():t==="ar"?Att():t==="es"?Ttt():t==="hi"?Rtt():Ntt()}),Ott=()=>"Context window",Dtt=()=>"上下文窗口",Ltt=()=>"پنجرهٔ زمینه",Itt=()=>"نافذة السياق",$tt=()=>"Ventana de contexto",Btt=()=>"कॉन्टेक्स्ट विंडो",Ptt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dtt():t==="fa"?Ltt():t==="ar"?Itt():t==="es"?$tt():t==="hi"?Btt():Ott()}),Ftt=()=>"Match the context window loaded in your model app. 32K is a useful starting point for tools; larger contexts use more memory.",Htt=()=>"请与模型应用中加载的上下文窗口保持一致。使用工具时可从 32K 开始;更大的上下文需要更多内存。",qtt=()=>"اندازهٔ زمینه را با تنظیم بارگذاری‌شده در برنامهٔ مدل هماهنگ کنید. ۳۲هزار توکن نقطهٔ شروع مناسبی برای ابزارهاست؛ زمینهٔ بزرگ‌تر حافظهٔ بیشتری مصرف می‌کند.",Utt=()=>"استخدم حجم نافذة السياق نفسه المحدد في تطبيق النموذج. يُعدّ 32 ألف رمز نقطة بداية مناسبة لاستخدام الأدوات؛ وتستهلك النوافذ الأكبر ذاكرة أكثر.",Gtt=()=>"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.",Ktt=()=>"अपने मॉडल ऐप में लोड कॉन्टेक्स्ट विंडो से मेल खाएं। टूल के लिए 32K एक अच्छा शुरुआती बिंदु है; बड़े कॉन्टेक्स्ट ज़्यादा मेमोरी इस्तेमाल करते हैं।",Vtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Htt():t==="fa"?qtt():t==="ar"?Utt():t==="es"?Gtt():t==="hi"?Ktt():Ftt()}),Wtt=()=>"Custom Endpoint",Qtt=()=>"自定义端点",Xtt=()=>"نقطهٔ اتصال سفارشی",Ytt=()=>"نقطة نهاية مخصصة",Ztt=()=>"Endpoint personalizado",Jtt=()=>"कस्टम एंडपॉइंट",kS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qtt():t==="fa"?Xtt():t==="ar"?Ytt():t==="es"?Ztt():t==="hi"?Jtt():Wtt()}),ent=e=>`Disconnect ${e==null?void 0:e.name}`,tnt=e=>`断开 ${e==null?void 0:e.name}`,nnt=e=>`قطع اتصال ${e==null?void 0:e.name}`,rnt=e=>`قطع اتصال ${e==null?void 0:e.name}`,snt=e=>`Desconectar ${e==null?void 0:e.name}`,int=e=>`${e==null?void 0:e.name} डिस्कनेक्ट करें`,ant=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tnt(e):t==="fa"?nnt(e):t==="ar"?rnt(e):t==="es"?snt(e):t==="hi"?int(e):ent(e)}),ont=()=>"Get OpenCode",cnt=()=>"获取 OpenCode",lnt=()=>"دریافت OpenCode",unt=()=>"الحصول على OpenCode",_nt=()=>"Obtener OpenCode",fnt=()=>"OpenCode लें",dnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cnt():t==="fa"?lnt():t==="ar"?unt():t==="es"?_nt():t==="hi"?fnt():ont()}),hnt=()=>"Install OpenCode to run tools with your local model, then re-check installed agents. No cloud account is required.",pnt=()=>"安装 OpenCode 以使用本地模型执行工具,然后重新检查已安装的智能体。无需云端账户。",mnt=()=>"برای اجرای ابزارها با مدل محلی، OpenCode را نصب کنید و عامل‌های نصب‌شده را دوباره بررسی کنید. حساب ابری لازم نیست.",gnt=()=>"ثبّت OpenCode لتشغيل الأدوات مع نموذجك المحلي، ثم أعد فحص الوكلاء المثبّتين. لا يلزم حساب سحابي.",vnt=()=>"Instala OpenCode para usar herramientas con tu modelo local y vuelve a comprobar los agentes instalados. No necesitas una cuenta en la nube.",bnt=()=>"अपने लोकल मॉडल से टूल चलाने के लिए OpenCode इंस्टॉल करें, फिर इंस्टॉल किए गए एजेंट फिर से जाँचें। किसी क्लाउड खाते की ज़रूरत नहीं है।",ynt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pnt():t==="fa"?mnt():t==="ar"?gnt():t==="es"?vnt():t==="hi"?bnt():hnt()}),xnt=()=>"API key (optional)",wnt=()=>"API 密钥(可选)",knt=()=>"کلید API (اختیاری)",Snt=()=>"مفتاح API (اختياري)",Cnt=()=>"Clave de API (opcional)",Ent=()=>"API की (वैकल्पिक)",Nnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wnt():t==="fa"?knt():t==="ar"?Snt():t==="es"?Cnt():t==="hi"?Ent():xnt()}),znt=()=>"Save model",jnt=()=>"保存模型",Ant=()=>"ذخیرهٔ مدل",Tnt=()=>"حفظ النموذج",Rnt=()=>"Guardar modelo",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=()=>"Model server",Lnt=()=>"模型服务器",Int=()=>"سرور مدل",$nt=()=>"خادم النموذج",Bnt=()=>"Servidor del modelo",Pnt=()=>"मॉडल सर्वर",Nz=((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()}),Fnt=()=>"Local models",Hnt=()=>"本地模型",qnt=()=>"مدل‌های محلی",Unt=()=>"النماذج المحلية",Gnt=()=>"Modelos locales",Knt=()=>"लोकल मॉडल",zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hnt():t==="fa"?qnt():t==="ar"?Unt():t==="es"?Gnt():t==="hi"?Knt():Fnt()}),Vnt=()=>"API token (optional)",Wnt=()=>"API 令牌(可选)",Qnt=()=>"توکن API (اختیاری)",Xnt=()=>"رمز API (اختياري)",Ynt=()=>"Token de API (opcional)",Znt=()=>"API टोकन (वैकल्पिक)",Jnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wnt():t==="fa"?Qnt():t==="ar"?Xnt():t==="es"?Ynt():t==="hi"?Znt():Vnt()}),ert=()=>"Copy",trt=()=>"复制",nrt=()=>"کپی",rrt=()=>"نسخ",srt=()=>"Copiar",irt=()=>"कॉपी करें",SS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?trt():t==="fa"?nrt():t==="ar"?rrt():t==="es"?srt():t==="hi"?irt():ert()}),art=()=>"Copy code",ort=()=>"复制代码",crt=()=>"کپی کد",lrt=()=>"نسخ الشيفرة",urt=()=>"Copiar código",_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=()=>"Download",hrt=()=>"下载",prt=()=>"بارگیری",mrt=()=>"تنزيل",grt=()=>"Descargar",vrt=()=>"डाउनलोड करें",M3=((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()}),brt=()=>"This browser can’t preview this media format.",yrt=()=>"此浏览器无法预览该媒体格式。",xrt=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",wrt=()=>"لا يستطيع هذا المتصفح معاينة صيغة الوسائط هذه.",krt=()=>"Este navegador no puede mostrar este formato multimedia.",Srt=()=>"यह ब्राउज़र इस मीडिया फ़ॉर्मैट का प्रीव्यू नहीं दिखा सकता।",Crt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yrt():t==="fa"?xrt():t==="ar"?wrt():t==="es"?krt():t==="hi"?Srt():brt()}),Ert=()=>"Choose the model for this chat",Nrt=()=>"选择此聊天的模型",zrt=()=>"انتخاب مدل این گفت‌وگو",jrt=()=>"اختيار نموذج هذه المحادثة",Art=()=>"Elige el modelo de este chat",Trt=()=>"इस चैट के लिए मॉडल चुनें",Rrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nrt():t==="fa"?zrt():t==="ar"?jrt():t==="es"?Art():t==="hi"?Trt():Ert()}),Mrt=()=>"Add Local Model",Ort=()=>"添加本地模型",Drt=()=>"افزودن مدل محلی",Lrt=()=>"إضافة نموذج محلي",Irt=()=>"Añadir modelo local",$rt=()=>"लोकल मॉडल जोड़ें",Brt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ort():t==="fa"?Drt():t==="ar"?Lrt():t==="es"?Irt():t==="hi"?$rt():Mrt()}),Prt=()=>"Autonomy",Frt=()=>"自主程度",Hrt=()=>"خودمختاری",qrt=()=>"الاستقلالية",Urt=()=>"Autonomía",Grt=()=>"स्वायत्तता",jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Frt():t==="fa"?Hrt():t==="ar"?qrt():t==="es"?Urt():t==="hi"?Grt():Prt()}),Krt=()=>"Agentic",Vrt=()=>"自主",Wrt=()=>"خودکار",Qrt=()=>"وكيل مستقل",Xrt=()=>"Agéntico",Yrt=()=>"एजेंटिक",Zrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vrt():t==="fa"?Wrt():t==="ar"?Qrt():t==="es"?Xrt():t==="hi"?Yrt():Krt()}),Jrt=()=>"Runs the research on its own and checks in when needed.",est=()=>"独立推进研究,必要时再与你确认。",tst=()=>"پژوهش را خودش پیش می‌برد و در صورت نیاز با شما هماهنگ می‌کند.",nst=()=>"يدير البحث بنفسه ويراجعك عند الحاجة.",rst=()=>"Dirige la investigación por su cuenta y consulta cuando hace falta.",sst=()=>"शोध खुद चलाता है और ज़रूरत पड़ने पर पूछता है।",ist=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?est():t==="fa"?tst():t==="ar"?nst():t==="es"?rst():t==="hi"?sst():Jrt()}),ast=()=>"Copilot",ost=()=>"副驾驶",cst=()=>"کمک‌خلبان",lst=()=>"مساعد",ust=()=>"Copiloto",_st=()=>"कोपायलट",fst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ost():t==="fa"?cst():t==="ar"?lst():t==="es"?ust():t==="hi"?_st():ast()}),dst=()=>"Explains its reasoning and asks before acting.",hst=()=>"解释思路,行动前先征得你的同意。",pst=()=>"استدلالش را توضیح می‌دهد و پیش از اقدام اجازه می‌گیرد.",mst=()=>"يشرح منطقه ويطلب موافقتك قبل التنفيذ.",gst=()=>"Explica su razonamiento y pide aprobación antes de actuar.",vst=()=>"अपना तर्क समझाता है और कार्य करने से पहले अनुमति लेता है।",bst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hst():t==="fa"?pst():t==="ar"?mst():t==="es"?gst():t==="hi"?vst():dst()}),yst=()=>" · CLI configuration",xst=()=>" · CLI 配置",wst=()=>" · پیکربندی CLI",kst=()=>" · إعداد واجهة سطر الأوامر",Sst=()=>" · Configuración de la CLI",Cst=()=>" · CLI कॉन्फ़िगरेशन",Est=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xst():t==="fa"?wst():t==="ar"?kst():t==="es"?Sst():t==="hi"?Cst():yst()}),Nst=()=>"· Default",zst=()=>"· 默认",jst=()=>"· پیش‌فرض",Ast=()=>"· الافتراضي",Tst=()=>"· Predeterminado",Rst=()=>"· डिफ़ॉल्ट",DL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zst():t==="fa"?jst():t==="ar"?Ast():t==="es"?Tst():t==="hi"?Rst():Nst()}),Mst=()=>"Default model",Ost=()=>"默认模型",Dst=()=>"مدل پیش‌فرض",Lst=()=>"النموذج الافتراضي",Ist=()=>"Modelo predeterminado",$st=()=>"डिफ़ॉल्ट मॉडल",O3=((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=()=>"Detecting harnesses…",Pst=()=>"正在检测智能体工具…",Fst=()=>"در حال شناسایی ابزارهای عامل…",Hst=()=>"جارٍ اكتشاف أدوات البرمجة…",qst=()=>"Detectando agentes…",Ust=()=>"हार्नेस पहचाने जा रहे हैं…",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()}),Kst=()=>"Effort",Vst=()=>"推理强度",Wst=()=>"میزان استدلال",Qst=()=>"الجهد",Xst=()=>"Esfuerzo",Yst=()=>"प्रयास स्तर",Zst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vst():t==="fa"?Wst():t==="ar"?Qst():t==="es"?Xst():t==="hi"?Yst():Kst()}),Jst=()=>"Fast speed ·",eit=()=>"快速 ·",tit=()=>"سرعت بالا ·",nit=()=>"سرعة عالية ·",rit=()=>"Modo rápido ·",sit=()=>"तेज़ गति ·",iit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eit():t==="fa"?tit():t==="ar"?nit():t==="es"?rit():t==="hi"?sit():Jst()}),ait=()=>"Mode",oit=()=>"模式",cit=()=>"حالت",lit=()=>"الوضع",uit=()=>"Modo",_it=()=>"मोड",Az=((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()}),fit=()=>"Model",dit=()=>"模型",hit=()=>"مدل",pit=()=>"النموذج",mit=()=>"Modelo",git=()=>"मॉडल",b0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dit():t==="fa"?hit():t==="ar"?pit():t==="es"?mit():t==="hi"?git():fit()}),vit=e=>`${e==null?void 0:e.count} more — search to find`,bit=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,yit=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,xit=e=>`نماذج إضافية: ${e==null?void 0:e.count} — ابحث للعثور عليها`,wit=e=>`${e==null?void 0:e.count} más — busca para encontrarlos`,kit=e=>`${e==null?void 0:e.count} और — खोजने के लिए टाइप करें`,Sit=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bit(e):t==="fa"?yit(e):t==="ar"?xit(e):t==="es"?wit(e):t==="hi"?kit(e):vit(e)}),Cit=()=>"Not available",Eit=()=>"不可用",Nit=()=>"در دسترس نیست",zit=()=>"غير متاح",jit=()=>"No disponible",Ait=()=>"उपलब्ध नहीं",Tit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eit():t==="fa"?Nit():t==="ar"?zit():t==="es"?jit():t==="hi"?Ait():Cit()}),Rit=()=>"Search models…",Mit=()=>"搜索模型…",Oit=()=>"جست‌وجوی مدل‌ها…",Dit=()=>"البحث في النماذج…",Lit=()=>"Buscar modelos…",Iit=()=>"मॉडल खोजें…",$it=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mit():t==="fa"?Oit():t==="ar"?Dit():t==="es"?Lit():t==="hi"?Iit():Rit()}),Bit=()=>"Search or enter model ID…",Pit=()=>"搜索或输入模型 ID…",Fit=()=>"جست‌وجو یا ورود شناسه مدل…",Hit=()=>"ابحث أو أدخل معرّف النموذج…",qit=()=>"Buscar o introducir ID…",Uit=()=>"खोजें या मॉडल ID डालें…",Git=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pit():t==="fa"?Fit():t==="ar"?Hit():t==="es"?qit():t==="hi"?Uit():Bit()}),Kit=()=>"Sessions keep their harness. Start a new chat to switch.",Vit=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",Wit=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",Qit=()=>"تحتفظ كل جلسة بأداة البرمجة الخاصة بها. ابدأ محادثة جديدة للتبديل.",Xit=()=>"Cada sesión mantiene su agente. Inicia un chat nuevo para cambiarlo.",Yit=()=>"सेशन अपना हार्नेस बनाए रखते हैं। बदलने के लिए नई चैट शुरू करें।",Zit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vit():t==="fa"?Wit():t==="ar"?Qit():t==="es"?Xit():t==="hi"?Yit():Kit()}),Jit=()=>"Speed",eat=()=>"速度",tat=()=>"سرعت",nat=()=>"السرعة",rat=()=>"Velocidad",sat=()=>"गति",Tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eat():t==="fa"?tat():t==="ar"?nat():t==="es"?rat():t==="hi"?sat():Jit()}),iat=()=>"Unavailable",aat=()=>"不可用",oat=()=>"در دسترس نیست",cat=()=>"غير متاح",lat=()=>"No disponible",uat=()=>"उपलब्ध नहीं",fo=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aat():t==="fa"?oat():t==="ar"?cat():t==="es"?lat():t==="hi"?uat():iat()}),_at=()=>"Unverified",fat=()=>"未经验证",dat=()=>"تأییدنشده",hat=()=>"غير مُتحقَّق منه",pat=()=>"Sin verificar",mat=()=>"सत्यापित नहीं",Rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fat():t==="fa"?dat():t==="ar"?hat():t==="es"?pat():t==="hi"?mat():_at()}),gat=e=>`Use “${e==null?void 0:e.id}” as the model ID`,vat=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,bat=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,yat=e=>`استخدام «${e==null?void 0:e.id}» معرّفًا للنموذج`,xat=e=>`Usar “${e==null?void 0:e.id}” como ID del modelo`,wat=e=>`मॉडल ID के रूप में “${e==null?void 0:e.id}” इस्तेमाल करें`,kat=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vat(e):t==="fa"?bat(e):t==="ar"?yat(e):t==="es"?xat(e):t==="hi"?wat(e):gat(e)}),Sat=()=>"Variant",Cat=()=>"变体",Eat=()=>"گونه",Nat=()=>"الصنف",zat=()=>"Variante",jat=()=>"वेरिएंट",Aat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cat():t==="fa"?Eat():t==="ar"?Nat():t==="es"?zat():t==="hi"?jat():Sat()}),Tat=()=>"Start a new chat",Rat=()=>"开始新聊天",Mat=()=>"شروع گفت‌وگوی جدید",Oat=()=>"بدء محادثة جديدة",Dat=()=>"Inicia un chat nuevo",Lat=()=>"नई चैट शुरू करें",Iat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rat():t==="fa"?Mat():t==="ar"?Oat():t==="es"?Dat():t==="hi"?Lat():Tat()}),$at=()=>"Advanced",Bat=()=>"高级",Pat=()=>"پیشرفته",Fat=()=>"متقدم",Hat=()=>"Avanzado",qat=()=>"उन्नत",LL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bat():t==="fa"?Pat():t==="ar"?Fat():t==="es"?Hat():t==="hi"?qat():$at()}),Uat=()=>"Advanced · Connect GitHub",Gat=()=>"高级 · 连接 GitHub",Kat=()=>"پیشرفته · اتصال GitHub",Vat=()=>"متقدم · ربط GitHub",Wat=()=>"Avanzado · Conectar GitHub",Qat=()=>"उन्नत · GitHub कनेक्ट करें",Xat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gat():t==="fa"?Kat():t==="ar"?Vat():t==="es"?Wat():t==="hi"?Qat():Uat()}),Yat=()=>"Advanced · GitHub sync on",Zat=()=>"高级 · GitHub 同步已开启",Jat=()=>"پیشرفته · همگام‌سازی GitHub روشن است",eot=()=>"متقدم · مزامنة GitHub مفعّلة",tot=()=>"Avanzado · Sincronización con GitHub activada",not=()=>"उन्नत · GitHub सिंक चालू",rot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zat():t==="fa"?Jat():t==="ar"?eot():t==="es"?tot():t==="hi"?not():Yat()}),sot=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",iot=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",aot=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",oot=()=>"اختر وجهة مختلفة. يحتاج مشروع الورقة إلى مجلد جديد أو فارغ خاص به.",cot=()=>"Elige otro destino. Un proyecto de paper necesita su propia carpeta nueva o vacía.",lot=()=>"अलग गंतव्य चुनें। पेपर प्रोजेक्ट को अपना एक नया या खाली फ़ोल्डर चाहिए।",uot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iot():t==="fa"?aot():t==="ar"?oot():t==="es"?cot():t==="hi"?lot():sot()}),_ot=e=>`Change project folder; current folder: ${e==null?void 0:e.path}`,fot=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,dot=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,hot=e=>`تغيير مجلد المشروع؛ المجلد الحالي: ${e==null?void 0:e.path}`,pot=e=>`Cambiar la carpeta del proyecto; carpeta actual: ${e==null?void 0:e.path}`,mot=e=>`प्रोजेक्ट फ़ोल्डर बदलें; मौजूदा फ़ोल्डर: ${e==null?void 0:e.path}`,got=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fot(e):t==="fa"?dot(e):t==="ar"?hot(e):t==="es"?pot(e):t==="hi"?mot(e):_ot(e)}),vot=()=>"Choose an existing project folder",bot=()=>"选择现有项目文件夹",yot=()=>"انتخاب پوشهٔ موجود پروژه",xot=()=>"اختر مجلد مشروع موجود",wot=()=>"Elige una carpeta de proyecto existente",kot=()=>"एक मौजूदा प्रोजेक्ट फ़ोल्डर चुनें",Mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bot():t==="fa"?yot():t==="ar"?xot():t==="es"?wot():t==="hi"?kot():vot()}),Sot=()=>"Choosing…",Cot=()=>"正在选择…",Eot=()=>"در حال انتخاب…",Not=()=>"جارٍ الاختيار…",zot=()=>"Eligiendo…",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=()=>"Clone destination",Rot=()=>"克隆位置",Mot=()=>"مقصد کلون",Oot=()=>"وجهة الاستنساخ",Dot=()=>"Destino del clon",Lot=()=>"क्लोन गंतव्य",Iot=((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()}),$ot=()=>"Clone paper project",Bot=()=>"克隆论文项目",Pot=()=>"کلون پروژهٔ مقاله",Fot=()=>"استنساخ مشروع الورقة",Hot=()=>"Clonar proyecto del paper",qot=()=>"पेपर प्रोजेक्ट क्लोन करें",Uot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bot():t==="fa"?Pot():t==="ar"?Fot():t==="es"?Hot():t==="hi"?qot():$ot()}),Got=()=>"Create project",Kot=()=>"创建项目",Vot=()=>"ایجاد پروژه",Wot=()=>"إنشاء المشروع",Qot=()=>"Crear proyecto",Xot=()=>"प्रोजेक्ट बनाएं",Oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kot():t==="fa"?Vot():t==="ar"?Wot():t==="es"?Qot():t==="hi"?Xot():Got()}),Yot=()=>"Creating…",Zot=()=>"正在创建…",Jot=()=>"در حال ایجاد…",ect=()=>"جارٍ الإنشاء…",tct=()=>"Creando…",nct=()=>"बनाया जा रहा है…",rct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zot():t==="fa"?Jot():t==="ar"?ect():t==="es"?tct():t==="hi"?nct():Yot()}),sct=()=>"Choose a different destination. This path is a file, not a folder.",ict=()=>"请选择其他位置。此路径是文件,不是文件夹。",act=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",oct=()=>"اختر وجهة مختلفة. هذا المسار ملف وليس مجلدًا.",cct=()=>"Elige otro destino. Esta ruta es un archivo, no una carpeta.",lct=()=>"अलग गंतव्य चुनें। यह पथ एक फ़ाइल है, फ़ोल्डर नहीं।",dw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ict():t==="fa"?act():t==="ar"?oct():t==="es"?cct():t==="hi"?lct():sct()}),uct=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",_ct=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",fct=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",dct=()=>"يوجد مجلد هنا بالفعل. اختر اسمًا أو موقعًا مختلفًا، أو استخدم «مجلد موجود».",hct=()=>"Ya existe una carpeta aquí. Elige otro nombre u otra ubicación, o usa Carpeta existente.",pct=()=>"यहाँ पहले से एक फ़ोल्डर मौजूद है। अलग नाम या स्थान चुनें, या मौजूदा फ़ोल्डर का इस्तेमाल करें।",Dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ct():t==="fa"?fct():t==="ar"?dct():t==="es"?hct():t==="hi"?pct():uct()}),mct=()=>"Blank project",gct=()=>"空白项目",vct=()=>"پروژهٔ خالی",bct=()=>"مشروع فارغ",yct=()=>"Proyecto en blanco",xct=()=>"खाली प्रोजेक्ट",wct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gct():t==="fa"?vct():t==="ar"?bct():t==="es"?yct():t==="hi"?xct():mct()}),kct=()=>"Cancel",Sct=()=>"取消",Cct=()=>"لغو",Ect=()=>"إلغاء",Nct=()=>"Cancelar",zct=()=>"रद्द करें",jct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sct():t==="fa"?Cct():t==="ar"?Ect():t==="es"?Nct():t==="hi"?zct():kct()}),Act=()=>"Change",Tct=()=>"更改",Rct=()=>"تغییر",Mct=()=>"تغيير",Oct=()=>"Cambiar",Dct=()=>"बदलें",Lct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tct():t==="fa"?Rct():t==="ar"?Mct():t==="es"?Oct():t==="hi"?Dct():Act()}),Ict=()=>"Change selected paper",$ct=()=>"更改所选论文",Bct=()=>"تغییر مقالهٔ انتخاب‌شده",Pct=()=>"تغيير الورقة المحددة",Fct=()=>"Cambiar el paper seleccionado",Hct=()=>"चयनित पेपर बदलें",qct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ct():t==="fa"?Bct():t==="ar"?Pct():t==="es"?Fct():t==="hi"?Hct():Ict()}),Uct=()=>"Check out a Git branch before using this folder.",Gct=()=>"使用此文件夹前,请先检出一个 Git 分支。",Kct=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",Vct=()=>"انتقل إلى فرع Git قبل استخدام هذا المجلد.",Wct=()=>"Haz checkout de una rama de Git antes de usar esta carpeta.",Qct=()=>"इस फ़ोल्डर का उपयोग करने से पहले एक Git ब्रांच चेक आउट करें।",Xct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gct():t==="fa"?Kct():t==="ar"?Vct():t==="es"?Wct():t==="hi"?Qct():Uct()}),Yct=()=>"Checking project location.",Zct=()=>"正在检查项目位置。",Jct=()=>"در حال بررسی محل پروژه.",elt=()=>"جارٍ التحقق من موقع المشروع.",tlt=()=>"Comprobando la ubicación del proyecto.",nlt=()=>"प्रोजेक्ट स्थान जाँचा जा रहा है।",Lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zct():t==="fa"?Jct():t==="ar"?elt():t==="es"?tlt():t==="hi"?nlt():Yct()}),rlt=()=>"Existing folder",slt=()=>"现有文件夹",ilt=()=>"پوشهٔ موجود",alt=()=>"مجلد موجود",olt=()=>"Carpeta existente",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=()=>"Experiment branches will be pushed to the remote GitHub repository.",_lt=()=>"实验分支将推送到远程 GitHub 仓库。",flt=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",dlt=()=>"ستُرفع فروع التجارب إلى مستودع GitHub البعيد.",hlt=()=>"Las ramas de los experimentos se subirán al repositorio remoto de GitHub.",plt=()=>"प्रयोग ब्रांच रिमोट GitHub रिपॉज़िटरी पर पुश की जाएंगी।",mlt=((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()}),glt=()=>"From a paper",vlt=()=>"从论文创建",blt=()=>"از یک مقاله",ylt=()=>"من ورقة بحثية",xlt=()=>"A partir de un paper",wlt=()=>"एक पेपर से",klt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vlt():t==="fa"?blt():t==="ar"?ylt():t==="es"?xlt():t==="hi"?wlt():glt()}),Slt=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",Clt=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",Elt=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",Nlt=()=>"‏Git مطلوب للتجارب لكنه غير مثبّت. ثبّت Git ثم أعد تشغيل OpenResearch.",zlt=()=>"Git es necesario para los experimentos, pero no está instalado. Instala Git y reinicia OpenResearch.",jlt=()=>"प्रयोगों के लिए Git ज़रूरी है पर इंस्टॉल नहीं है। Git इंस्टॉल करें, फिर OpenResearch फिर से शुरू करें।",Alt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Clt():t==="fa"?Elt():t==="ar"?Nlt():t==="es"?zlt():t==="hi"?jlt():Slt()}),Tlt=()=>"my-research",Rlt=()=>"my-research",Mlt=()=>"my-research",Olt=()=>"my-research",Dlt=()=>"mi-investigacion",Llt=()=>"मेरा-शोध",Iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rlt():t==="fa"?Mlt():t==="ar"?Olt():t==="es"?Dlt():t==="hi"?Llt():Tlt()}),Ilt=()=>"No papers found. Try an arXiv ID, URL, or a different title.",$lt=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",Blt=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",Plt=()=>"لم يُعثر على أوراق. جرّب معرّف arXiv أو رابطًا أو عنوانًا مختلفًا.",Flt=()=>"No se encontraron papers. Prueba con un ID de arXiv, una URL u otro título.",Hlt=()=>"कोई पेपर नहीं मिला। एक arXiv ID, URL, या अलग शीर्षक आज़माएं।",qlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$lt():t==="fa"?Blt():t==="ar"?Plt():t==="es"?Flt():t==="hi"?Hlt():Ilt()}),Ult=()=>"No public repository found on alphaXiv",Glt=()=>"在 alphaXiv 上未找到公开仓库",Klt=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",Vlt=()=>"لم يُعثر على مستودع عام على alphaXiv",Wlt=()=>"No se encontró ningún repositorio público en alphaXiv",Qlt=()=>"alphaXiv पर कोई सार्वजनिक रिपॉज़िटरी नहीं मिली",Xlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Glt():t==="fa"?Klt():t==="ar"?Vlt():t==="es"?Wlt():t==="hi"?Qlt():Ult()}),Ylt=()=>"OpenResearch will start a blank project with this paper's PDF.",Zlt=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",Jlt=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",eut=()=>"سيبدأ OpenResearch مشروعًا فارغًا مع ملف PDF لهذه الورقة.",tut=()=>"OpenResearch creará un proyecto en blanco con el PDF de este paper.",nut=()=>"OpenResearch इस पेपर की PDF के साथ एक खाली प्रोजेक्ट शुरू करेगा।",rut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zlt():t==="fa"?Jlt():t==="ar"?eut():t==="es"?tut():t==="hi"?nut():Ylt()}),sut=()=>"Paper",iut=()=>"论文",aut=()=>"مقاله",out=()=>"ورقة بحثية",cut=()=>"Paper",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=()=>"Project location",fut=()=>"项目位置",dut=()=>"محل پروژه",hut=()=>"موقع المشروع",put=()=>"Ubicación del proyecto",mut=()=>"प्रोजेक्ट स्थान",hw=((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()}),gut=()=>"Project name",vut=()=>"项目名称",but=()=>"نام پروژه",yut=()=>"اسم المشروع",xut=()=>"Nombre del proyecto",wut=()=>"प्रोजेक्ट नाम",$z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vut():t==="fa"?but():t==="ar"?yut():t==="es"?xut():t==="hi"?wut():gut()}),kut=()=>"Search for a paper by arXiv ID, URL, or title",Sut=()=>"按 arXiv ID、网址或标题搜索论文",Cut=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",Eut=()=>"ابحث عن ورقة بمعرّف arXiv أو رابط أو عنوان",Nut=()=>"Busca un paper por ID de arXiv, URL o título",zut=()=>"arXiv ID, URL, या शीर्षक से पेपर खोजें",jut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sut():t==="fa"?Cut():t==="ar"?Eut():t==="es"?Nut():t==="hi"?zut():kut()}),Aut=()=>"Sync experiments to GitHub",Tut=()=>"将实验同步到 GitHub",Rut=()=>"همگام‌سازی آزمایش‌ها با GitHub",Mut=()=>"مزامنة التجارب مع GitHub",Out=()=>"Sincronizar experimentos con GitHub",Dut=()=>"प्रयोग GitHub पर सिंक करें",Lut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tut():t==="fa"?Rut():t==="ar"?Mut():t==="es"?Out():t==="hi"?Dut():Aut()}),Iut=()=>"That folder no longer exists. Choose it again.",$ut=()=>"该文件夹已不存在。请重新选择。",But=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",Put=()=>"لم يعد ذلك المجلد موجودًا. اختره مجددًا.",Fut=()=>"Esa carpeta ya no existe. Vuelve a elegirla.",Hut=()=>"वह फ़ोल्डर अब मौजूद नहीं है। इसे फिर से चुनें।",qut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ut():t==="fa"?But():t==="ar"?Put():t==="es"?Fut():t==="hi"?Hut():Iut()}),Uut=()=>"The selected folder contains an invalid Git repository.",Gut=()=>"所选文件夹包含无效的 Git 仓库。",Kut=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",Vut=()=>"يحتوي المجلد المحدد على مستودع Git غير صالح.",Wut=()=>"La carpeta seleccionada contiene un repositorio de Git no válido.",Qut=()=>"चयनित फ़ोल्डर में एक अमान्य Git रिपॉज़िटरी है।",Xut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gut():t==="fa"?Kut():t==="ar"?Vut():t==="es"?Wut():t==="hi"?Qut():Uut()}),Yut=()=>"The selected path is not a folder.",Zut=()=>"所选路径不是文件夹。",Jut=()=>"مسیر انتخاب‌شده پوشه نیست.",e_t=()=>"المسار المحدد ليس مجلدًا.",t_t=()=>"La ruta seleccionada no es una carpeta.",n_t=()=>"चयनित पथ एक फ़ोल्डर नहीं है।",r_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zut():t==="fa"?Jut():t==="ar"?e_t():t==="es"?t_t():t==="hi"?n_t():Yut()}),s_t=e=>`Checking ${e==null?void 0:e.repository}.`,i_t=e=>`正在检查 ${e==null?void 0:e.repository}。`,a_t=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,o_t=e=>`جارٍ التحقق من ${e==null?void 0:e.repository}.`,c_t=e=>`Comprobando ${e==null?void 0:e.repository}.`,l_t=e=>`${e==null?void 0:e.repository} जाँची जा रही है।`,u_t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?i_t(e):t==="fa"?a_t(e):t==="ar"?o_t(e):t==="es"?c_t(e):t==="hi"?l_t(e):s_t(e)}),__t=e=>`Creates ${e==null?void 0:e.repository}.`,f_t=e=>`将创建 ${e==null?void 0:e.repository}。`,d_t=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,h_t=e=>`ينشئ ${e==null?void 0:e.repository}.`,p_t=e=>`Crea ${e==null?void 0:e.repository}.`,m_t=e=>`${e==null?void 0:e.repository} बनाता है।`,g_t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f_t(e):t==="fa"?d_t(e):t==="ar"?h_t(e):t==="es"?p_t(e):t==="hi"?m_t(e):__t(e)}),v_t=e=>`Pushes to ${e==null?void 0:e.repository}.`,b_t=e=>`将推送到 ${e==null?void 0:e.repository}。`,y_t=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,x_t=e=>`يرفع التغييرات إلى ${e==null?void 0:e.repository}.`,w_t=e=>`Sube los cambios a ${e==null?void 0:e.repository}.`,k_t=e=>`${e==null?void 0:e.repository} पर पुश करता है।`,S_t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b_t(e):t==="fa"?y_t(e):t==="ar"?x_t(e):t==="es"?w_t(e):t==="hi"?k_t(e):v_t(e)}),C_t=()=>"Project location is required.",E_t=()=>"必须填写项目位置。",N_t=()=>"محل پروژه الزامی است.",z_t=()=>"موقع المشروع مطلوب.",j_t=()=>"La ubicación del proyecto es obligatoria.",A_t=()=>"प्रोजेक्ट स्थान ज़रूरी है।",Bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E_t():t==="fa"?N_t():t==="ar"?z_t():t==="es"?j_t():t==="hi"?A_t():C_t()}),T_t=()=>"Choose a different destination. The paper repository needs a new or empty folder.",R_t=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",M_t=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",O_t=()=>"اختر وجهة مختلفة. يحتاج مستودع الورقة إلى مجلد جديد أو فارغ.",D_t=()=>"Elige otro destino. El repositorio del paper necesita una carpeta nueva o vacía.",L_t=()=>"अलग गंतव्य चुनें। पेपर रिपॉज़िटरी को एक नए या खाली फ़ोल्डर की ज़रूरत है।",Pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R_t():t==="fa"?M_t():t==="ar"?O_t():t==="es"?D_t():t==="hi"?L_t():T_t()}),I_t=()=>"A linked public code repository is cloned without credentials.",$_t=()=>"关联的公开代码仓库无需凭据即可克隆。",B_t=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",P_t=()=>"يُستنسخ مستودع شيفرة عام مرتبط دون بيانات اعتماد.",F_t=()=>"El repositorio de código público vinculado se clona sin credenciales.",H_t=()=>"एक लिंक की गई सार्वजनिक कोड रिपॉज़िटरी बिना क्रेडेंशियल के क्लोन की जाती है।",q_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$_t():t==="fa"?B_t():t==="ar"?P_t():t==="es"?F_t():t==="hi"?H_t():I_t()}),U_t=e=>`Run ${e==null?void 0:e.command} before creating the project.`,G_t=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,K_t=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,V_t=e=>`نفّذ ${e==null?void 0:e.command} قبل إنشاء المشروع.`,W_t=e=>`Ejecuta ${e==null?void 0:e.command} antes de crear el proyecto.`,Q_t=e=>`प्रोजेक्ट बनाने से पहले ${e==null?void 0:e.command} चलाएं।`,X_t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?G_t(e):t==="fa"?K_t(e):t==="ar"?V_t(e):t==="es"?W_t(e):t==="hi"?Q_t(e):U_t(e)}),Y_t=()=>"Searching alphaXiv…",Z_t=()=>"正在搜索 alphaXiv…",J_t=()=>"در حال جست‌وجوی alphaXiv…",eft=()=>"جارٍ البحث في alphaXiv…",tft=()=>"Buscando en alphaXiv…",nft=()=>"alphaXiv खोजा जा रहा है…",rft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z_t():t==="fa"?J_t():t==="ar"?eft():t==="es"?tft():t==="hi"?nft():Y_t()}),sft=()=>"Use folder",ift=()=>"使用文件夹",aft=()=>"استفاده از پوشه",oft=()=>"استخدام المجلد",cft=()=>"Usar carpeta",lft=()=>"फ़ोल्डर इस्तेमाल करें",uft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ift():t==="fa"?aft():t==="ar"?oft():t==="es"?cft():t==="hi"?lft():sft()}),_ft=()=>"Can’t reach OpenResearch. This page is no longer live.",fft=()=>"无法连接 OpenResearch。此页面已不再实时同步。",dft=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",hft=()=>"تعذّر الاتصال بـ OpenResearch. لم تعد هذه الصفحة تُحدَّث تلقائيًا.",pft=()=>"No se puede conectar con OpenResearch. Esta página ya no se actualiza.",mft=()=>"OpenResearch तक नहीं पहुँच सके। यह पेज अब लाइव नहीं है।",D3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fft():t==="fa"?dft():t==="ar"?hft():t==="es"?pft():t==="hi"?mft():_ft()}),gft=()=>"A workspace for your research agents",vft=()=>"面向研究智能体的工作空间",bft=()=>"فضای کاری برای عامل‌های پژوهشی شما",yft=()=>"مساحة عمل لوكلاء بحثك",xft=()=>"Un espacio de trabajo para tus agentes de investigación",wft=()=>"आपके शोध एजेंटों के लिए एक वर्कस्पेस",kft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vft():t==="fa"?bft():t==="ar"?yft():t==="es"?xft():t==="hi"?wft():gft()}),Sft=()=>"Add papers that represent your research interests, including papers by other authors.",Cft=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",Eft=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",Nft=()=>"أضِف أوراقًا تمثّل اهتماماتك البحثية، بما في ذلك أوراق لمؤلفين آخرين.",zft=()=>"Añade papers que representen tus intereses de investigación, incluidos papers de otros autores.",jft=()=>"ऐसे पेपर जोड़ें जो आपकी शोध रुचियों को दर्शाते हों, चाहे वे किसी और लेखक के ही क्यों न हों।",Aft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cft():t==="fa"?Eft():t==="ar"?Nft():t==="es"?zft():t==="hi"?jft():Sft()}),Tft=()=>"API key",Rft=()=>"API 密钥",Mft=()=>"کلید API",Oft=()=>"مفتاح API",Dft=()=>"Clave de API",Lft=()=>"API की",CS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rft():t==="fa"?Mft():t==="ar"?Oft():t==="es"?Dft():t==="hi"?Lft():Tft()}),Ift=()=>"AI/ML",$ft=()=>"人工智能与机器学习",Bft=()=>"هوش مصنوعی و یادگیری ماشین",Pft=()=>"الذكاء الاصطناعي/تعلّم الآلة",Fft=()=>"IA/ML",Hft=()=>"AI/ML",qft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$ft():t==="fa"?Bft():t==="ar"?Pft():t==="es"?Fft():t==="hi"?Hft():Ift()}),Uft=()=>"Biology",Gft=()=>"生物学",Kft=()=>"زیست‌شناسی",Vft=()=>"الأحياء",Wft=()=>"Biología",Qft=()=>"जीव विज्ञान",Xft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gft():t==="fa"?Kft():t==="ar"?Vft():t==="es"?Wft():t==="hi"?Qft():Uft()}),Yft=()=>"Other",Zft=()=>"其他",Jft=()=>"سایر",edt=()=>"أخرى",tdt=()=>"Otra",ndt=()=>"अन्य",rdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zft():t==="fa"?Jft():t==="ar"?edt():t==="es"?tdt():t==="hi"?ndt():Yft()}),sdt=()=>"Physics",idt=()=>"物理学",adt=()=>"فیزیک",odt=()=>"الفيزياء",cdt=()=>"Física",ldt=()=>"भौतिकी",udt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?idt():t==="fa"?adt():t==="ar"?odt():t==="es"?cdt():t==="hi"?ldt():sdt()}),_dt=()=>"Back",fdt=()=>"返回",ddt=()=>"بازگشت",hdt=()=>"رجوع",pdt=()=>"Atrás",mdt=()=>"वापस",Fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fdt():t==="fa"?ddt():t==="ar"?hdt():t==="es"?pdt():t==="hi"?mdt():_dt()}),gdt=()=>"Check failed",vdt=()=>"检查失败",bdt=()=>"بررسی ناموفق بود",ydt=()=>"فشل الفحص",xdt=()=>"Error en la comprobación",wdt=()=>"जाँच विफल",kdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vdt():t==="fa"?bdt():t==="ar"?ydt():t==="es"?xdt():t==="hi"?wdt():gdt()}),Sdt=()=>"Checking",Cdt=()=>"正在检查",Edt=()=>"در حال بررسی",Ndt=()=>"جارٍ الفحص",zdt=()=>"Comprobando",jdt=()=>"जाँचा जा रहा है",_f=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cdt():t==="fa"?Edt():t==="ar"?Ndt():t==="es"?zdt():t==="hi"?jdt():Sdt()}),Adt=()=>"Checking Git…",Tdt=()=>"正在检查 Git…",Rdt=()=>"در حال بررسی Git…",Mdt=()=>"جارٍ فحص Git…",Odt=()=>"Comprobando Git…",Ddt=()=>"Git जाँचा जा रहा है…",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=()=>"Choose a coding agent",$dt=()=>"选择编程智能体",Bdt=()=>"یک عامل کدنویسی انتخاب کنید",Pdt=()=>"اختر وكيل برمجة",Fdt=()=>"Elige un agente de programación",Hdt=()=>"एक कोडिंग एजेंट चुनें",qdt=((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()}),Udt=()=>"Choose a coding agent to continue.",Gdt=()=>"选择一个编程智能体以继续。",Kdt=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",Vdt=()=>"اختر وكيل برمجة للمتابعة.",Wdt=()=>"Elige un agente de programación para continuar.",Qdt=()=>"जारी रखने के लिए एक कोडिंग एजेंट चुनें।",Xdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gdt():t==="fa"?Kdt():t==="ar"?Vdt():t==="es"?Wdt():t==="hi"?Qdt():Udt()}),Ydt=()=>"Choose another coding agent",Zdt=()=>"选择其他编程智能体",Jdt=()=>"انتخاب یک عامل برنامه‌نویسی دیگر",eht=()=>"اختيار وكيل برمجة آخر",tht=()=>"Elegir otro agente de programación",nht=()=>"दूसरा कोडिंग एजेंट चुनें",rht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zdt():t==="fa"?Jdt():t==="ar"?eht():t==="es"?tht():t==="hi"?nht():Ydt()}),sht=()=>"Choose at least one research area to continue.",iht=()=>"请至少选择一个研究领域后再继续。",aht=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",oht=()=>"اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.",cht=()=>"Elige al menos un área de investigación para continuar.",lht=()=>"जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।",uht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iht():t==="fa"?aht():t==="ar"?oht():t==="es"?cht():t==="hi"?lht():sht()}),_ht=()=>"Choose one or more.",fht=()=>"请选择一项或多项。",dht=()=>"یک یا چند مورد را انتخاب کنید.",hht=()=>"اختر واحدًا أو أكثر.",pht=()=>"Elige una o varias.",mht=()=>"एक या अधिक चुनें।",ght=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fht():t==="fa"?dht():t==="ar"?hht():t==="es"?pht():t==="hi"?mht():_ht()}),vht=()=>"Choose your preferred coding agent",bht=()=>"请选择首选编程智能体",yht=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",xht=()=>"اختر وكيل البرمجة المفضّل لديك",wht=()=>"Elige tu agente de programación preferido",kht=()=>"अपना पसंदीदा कोडिंग एजेंट चुनें",Sht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bht():t==="fa"?yht():t==="ar"?xht():t==="es"?wht():t==="hi"?kht():vht()}),Cht=()=>"Consolidate your research",Eht=()=>"集中管理研究",Nht=()=>"پژوهش خود را یکپارچه کنید",zht=()=>"وحّد أبحاثك",jht=()=>"Consolida tu investigación",Aht=()=>"अपने शोध को एक जगह लाएं",Tht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eht():t==="fa"?Nht():t==="ar"?zht():t==="es"?jht():t==="hi"?Aht():Cht()}),Rht=()=>"Continue",Mht=()=>"继续",Oht=()=>"ادامه",Dht=()=>"متابعة",Lht=()=>"Continuar",Iht=()=>"जारी रखें",Hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mht():t==="fa"?Oht():t==="ar"?Dht():t==="es"?Lht():t==="hi"?Iht():Rht()}),$ht=()=>"Describe your research area to continue.",Bht=()=>"请描述你的研究领域后再继续。",Pht=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",Fht=()=>"صِف مجالك البحثي للمتابعة.",Hht=()=>"Describe tu área de investigación para continuar.",qht=()=>"जारी रखने के लिए अपना शोध क्षेत्र बताएं।",Uht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bht():t==="fa"?Pht():t==="ar"?Fht():t==="es"?Hht():t==="hi"?qht():$ht()}),Ght=()=>"Detecting Claude Code, Codex, OpenCode, Cursor, Antigravity…",Kht=()=>"正在检测 Claude Code、Codex、OpenCode、Cursor、Antigravity…",Vht=()=>"در حال شناسایی Claude Code، Codex، OpenCode و Cursor و Antigravity…",Wht=()=>"جارٍ اكتشاف Claude Code وCodex وOpenCode وCursor وAntigravity…",Qht=()=>"Detectando Claude Code, Codex, OpenCode, Cursor, Google Antigravity…",Xht=()=>"Claude Code, Codex, OpenCode, Cursor, Google Antigravity पहचाने जा रहे हैं…",Yht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kht():t==="fa"?Vht():t==="ar"?Wht():t==="es"?Qht():t==="hi"?Xht():Ght()}),Zht=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",Jht=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",ept=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",tpt=()=>"مثال: أعمل على تعلّم معزّز عالي الكفاءة في العيّنات لِما بعد تدريب نماذج اللغة الكبيرة، مع التركيز على الطرق التي لا تعتمد على نماذج المكافأة.",npt=()=>"p. ej., trabajo en RL eficiente en muestras para el post-entrenamiento de LLM, centrado en métodos sin modelo de recompensa.",rpt=()=>"जैसे: मैं LLM पोस्ट-ट्रेनिंग के लिए सैंपल-एफ़िशिएंट RL पर काम करता/करती हूँ, रिवॉर्ड-मॉडल-फ्री तरीकों पर ध्यान केंद्रित करते हुए।",spt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jht():t==="fa"?ept():t==="ar"?tpt():t==="es"?npt():t==="hi"?rpt():Zht()}),ipt=()=>"Error details",apt=()=>"错误详情",opt=()=>"جزئیات خطا",cpt=()=>"تفاصيل الخطأ",lpt=()=>"Detalles del error",upt=()=>"त्रुटि विवरण",_pt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?apt():t==="fa"?opt():t==="ar"?cpt():t==="es"?lpt():t==="hi"?upt():ipt()}),fpt=()=>"Everything stays local",dpt=()=>"一切都保留在本地",hpt=()=>"همه‌چیز محلی می‌ماند",ppt=()=>"كل شيء يبقى محليًا",mpt=()=>"Todo se queda en local",gpt=()=>"सब कुछ लोकल ही रहता है",vpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dpt():t==="fa"?hpt():t==="ar"?ppt():t==="es"?mpt():t==="hi"?gpt():fpt()}),bpt=()=>"Get started",ypt=()=>"开始使用",xpt=()=>"شروع",wpt=()=>"ابدأ الآن",kpt=()=>"Empezar",Spt=()=>"शुरू करें",Cpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ypt():t==="fa"?xpt():t==="ar"?wpt():t==="es"?kpt():t==="hi"?Spt():bpt()}),Ept=()=>"Git is required for local experiments. Install Git, then re-check.",Npt=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",zpt=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",jpt=()=>"‏Git مطلوب للتجارب المحلية. ثبّت Git ثم أعد الفحص.",Apt=()=>"Git es necesario para los experimentos locales. Instala Git y vuelve a comprobarlo.",Tpt=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। Git इंस्टॉल करें, फिर फिर से जाँचें।",qz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Npt():t==="fa"?zpt():t==="ar"?jpt():t==="es"?Apt():t==="hi"?Tpt():Ept()}),Rpt=()=>"Ground your agents",Mpt=()=>"为智能体提供可靠依据",Opt=()=>"عامل‌هایتان را به منابع متصل کنید",Dpt=()=>"زوّد وكلاءك بأساس بحثي",Lpt=()=>"Dale contexto a tus agentes",Ipt=()=>"अपने एजेंटों को आधार दें",$pt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mpt():t==="fa"?Opt():t==="ar"?Dpt():t==="es"?Lpt():t==="hi"?Ipt():Rpt()}),Bpt=()=>"Install broken",Ppt=()=>"安装损坏",Fpt=()=>"نصب خراب است",Hpt=()=>"التثبيت معطوب",qpt=()=>"Instalación dañada",Upt=()=>"इंस्टॉल खराब है",Gpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ppt():t==="fa"?Fpt():t==="ar"?Hpt():t==="es"?qpt():t==="hi"?Upt():Bpt()}),Kpt=()=>"Install Git to continue",Vpt=()=>"请安装 Git 后再继续",Wpt=()=>"برای ادامه Git را نصب کنید",Qpt=()=>"ثبّت Git للمتابعة",Xpt=()=>"Instala Git para continuar",Ypt=()=>"जारी रखने के लिए Git इंस्टॉल करें",Zpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vpt():t==="fa"?Wpt():t==="ar"?Qpt():t==="es"?Xpt():t==="hi"?Ypt():Kpt()}),Jpt=()=>"Loading account details…",e0t=()=>"正在加载账户信息…",t0t=()=>"در حال بارگذاری اطلاعات حساب…",n0t=()=>"جارٍ تحميل تفاصيل الحساب…",r0t=()=>"Cargando los datos de la cuenta…",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=()=>"Local Git",o0t=()=>"本地 Git",c0t=()=>"Git محلی",l0t=()=>"Git محلي",u0t=()=>"Git local",_0t=()=>"लोकल Git",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=()=>"Install needed",h0t=()=>"需要安装",p0t=()=>"نیاز به نصب",m0t=()=>"التثبيت مطلوب",g0t=()=>"No detectado",v0t=()=>"इंस्टॉल ज़रूरी है",Uz=((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=()=>"Not found",y0t=()=>"未找到",x0t=()=>"پیدا نشد",w0t=()=>"غير موجود",k0t=()=>"No encontrado",S0t=()=>"नहीं मिला",IL=((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()}),C0t=()=>"Signed out",E0t=()=>"未登录",N0t=()=>"وارد نشده",z0t=()=>"غير مسجل الدخول",j0t=()=>"Sin iniciar sesión",A0t=()=>"साइन आउट",$L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E0t():t==="fa"?N0t():t==="ar"?z0t():t==="es"?j0t():t==="hi"?A0t():C0t()}),T0t=()=>"OpenResearch uses a coding agent already installed on this machine.",R0t=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",M0t=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",O0t=()=>"يستخدم OpenResearch وكيل برمجة مثبّتًا مسبقًا على هذا الجهاز.",D0t=()=>"OpenResearch usa un agente de programación que ya esté instalado en este equipo.",L0t=()=>"OpenResearch इस मशीन पर पहले से इंस्टॉल किसी कोडिंग एजेंट का उपयोग करता है।",I0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R0t():t==="fa"?M0t():t==="ar"?O0t():t==="es"?D0t():t==="hi"?L0t():T0t()}),$0t=()=>"Couldn’t verify OpenCode is ready. Retry to check its installation and models.",B0t=()=>"无法确认 OpenCode 已就绪。请重试以检查安装和模型。",P0t=()=>"آماده بودن OpenCode تأیید نشد. برای بررسی نصب و مدل‌ها دوباره تلاش کنید.",F0t=()=>"تعذّر التحقق من جاهزية OpenCode. أعد المحاولة للتحقق من التثبيت والنماذج.",H0t=()=>"No se pudo verificar que OpenCode esté listo. Vuelve a intentarlo para comprobar su instalación y sus modelos.",q0t=()=>"यह सत्यापित नहीं हो सका कि OpenCode तैयार है। इसके इंस्टॉलेशन और मॉडल जाँचने के लिए फिर से कोशिश करें।",U0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B0t():t==="fa"?P0t():t==="ar"?F0t():t==="es"?H0t():t==="hi"?q0t():$0t()}),G0t=()=>"Other research area",K0t=()=>"其他研究领域",V0t=()=>"حوزهٔ پژوهشی دیگر",W0t=()=>"مجال بحثي آخر",Q0t=()=>"Otra área de investigación",X0t=()=>"अन्य शोध क्षेत्र",Y0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K0t():t==="fa"?V0t():t==="ar"?W0t():t==="es"?Q0t():t==="hi"?X0t():G0t()}),Z0t=()=>"Re-check",J0t=()=>"重新检查",emt=()=>"بررسی دوباره",tmt=()=>"إعادة الفحص",nmt=()=>"Volver a comprobar",rmt=()=>"फिर से जाँचें",Iv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J0t():t==="fa"?emt():t==="ar"?tmt():t==="es"?nmt():t==="hi"?rmt():Z0t()}),smt=()=>"Ready",imt=()=>"已就绪",amt=()=>"آماده",omt=()=>"جاهز",cmt=()=>"Listo",lmt=()=>"तैयार",ES=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?imt():t==="fa"?amt():t==="ar"?omt():t==="es"?cmt():t==="hi"?lmt():smt()}),umt=()=>"Re-check Git before continuing",_mt=()=>"请重新检查 Git 后再继续",fmt=()=>"پیش از ادامه Git را دوباره بررسی کنید",dmt=()=>"أعد فحص Git قبل المتابعة",hmt=()=>"Vuelve a comprobar Git antes de continuar",pmt=()=>"जारी रखने से पहले Git फिर से जाँचें",mmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_mt():t==="fa"?fmt():t==="ar"?dmt():t==="es"?hmt():t==="hi"?pmt():umt()}),gmt=()=>"Representative papers",vmt=()=>"代表性论文",bmt=()=>"مقاله‌های شاخص",ymt=()=>"أوراق تمثّل اهتماماتك البحثية",xmt=()=>"Papers representativos",wmt=()=>"प्रतिनिधि पेपर",kmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vmt():t==="fa"?bmt():t==="ar"?ymt():t==="es"?xmt():t==="hi"?wmt():gmt()}),Smt=()=>"Research background",Cmt=()=>"研究背景",Emt=()=>"پیشینهٔ پژوهشی",Nmt=()=>"الخلفية البحثية",zmt=()=>"Trayectoria de investigación",jmt=()=>"शोध पृष्ठभूमि",Amt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cmt():t==="fa"?Emt():t==="ar"?Nmt():t==="es"?zmt():t==="hi"?jmt():Smt()}),Tmt=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",Rmt=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",Mmt=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",Omt=()=>"تعذّر الوصول إلى orx. تأكد من أنه لا يزال يعمل، ثم أعد الفحص.",Dmt=()=>"No se pudo conectar con orx. Comprueba que sigue en ejecución y vuelve a comprobarlo.",Lmt=()=>"orx तक नहीं पहुँच सके। जाँचें कि यह अभी भी चल रहा है, फिर फिर से जाँचें।",pw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rmt():t==="fa"?Mmt():t==="ar"?Omt():t==="es"?Dmt():t==="hi"?Lmt():Tmt()}),Imt=()=>"Search alphaXiv by title to link a paper…",$mt=()=>"按标题搜索 alphaXiv 以关联论文…",Bmt=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",Pmt=()=>"ابحث في alphaXiv بالعنوان لربط ورقة…",Fmt=()=>"Busca en alphaXiv por título para vincular un paper…",Hmt=()=>"एक पेपर लिंक करने के लिए शीर्षक से alphaXiv खोजें…",qmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$mt():t==="fa"?Bmt():t==="ar"?Pmt():t==="es"?Fmt():t==="hi"?Hmt():Imt()}),Umt=()=>"Searching alphaXiv…",Gmt=()=>"正在搜索 alphaXiv…",Kmt=()=>"در حال جست‌وجوی alphaXiv…",Vmt=()=>"جارٍ البحث في alphaXiv…",Wmt=()=>"Buscando en alphaXiv…",Qmt=()=>"alphaXiv खोजा जा रहा है…",Xmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gmt():t==="fa"?Kmt():t==="ar"?Vmt():t==="es"?Wmt():t==="hi"?Qmt():Umt()}),Ymt=()=>"Selected",Zmt=()=>"已选择",Jmt=()=>"انتخاب‌شده",egt=()=>"محدد",tgt=()=>"Seleccionado",ngt=()=>"चयनित",rgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zmt():t==="fa"?Jmt():t==="ar"?egt():t==="es"?tgt():t==="hi"?ngt():Ymt()}),sgt=()=>"Local model unavailable",igt=()=>"本地模型不可用",agt=()=>"مدل محلی در دسترس نیست",ogt=()=>"النموذج المحلي غير متاح",cgt=()=>"Modelo local no disponible",lgt=()=>"लोकल मॉडल उपलब्ध नहीं",BL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?igt():t==="fa"?agt():t==="ar"?ogt():t==="es"?cgt():t==="hi"?lgt():sgt()}),ugt=()=>"Setting things up…",_gt=()=>"正在设置…",fgt=()=>"در حال راه‌اندازی…",dgt=()=>"جارٍ التهيئة…",hgt=()=>"Preparando todo…",pgt=()=>"सेट अप किया जा रहा है…",mgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_gt():t==="fa"?fgt():t==="ar"?dgt():t==="es"?hgt():t==="hi"?pgt():ugt()}),ggt=()=>"Connect a local model or sign in to a coding agent to continue",vgt=()=>"连接本地模型或登录编码智能体以继续",bgt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل کدنویسی وارد شوید",ygt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل برمجة للمتابعة",xgt=()=>"Conecta un modelo local o inicia sesión en un agente de programación para continuar",wgt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी कोडिंग एजेंट में साइन इन करें",kgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vgt():t==="fa"?bgt():t==="ar"?ygt():t==="es"?xgt():t==="hi"?wgt():ggt()}),Sgt=()=>"Connect a local model or sign in to an agent to continue.",Cgt=()=>"连接本地模型或登录一个智能体以继续。",Egt=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل وارد شوید.",Ngt=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل للمتابعة.",zgt=()=>"Conecta un modelo local o inicia sesión en un agente para continuar.",jgt=()=>"जारी रखने के लिए एक लोकल मॉडल कनेक्ट करें या किसी एजेंट में साइन इन करें।",Agt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cgt():t==="fa"?Egt():t==="ar"?Ngt():t==="es"?zgt():t==="hi"?jgt():Sgt()}),Tgt=()=>"Signed in",Rgt=()=>"已登录",Mgt=()=>"وارد شده",Ogt=()=>"تم تسجيل الدخول",Dgt=()=>"Sesión iniciada",Lgt=()=>"साइन इन",Igt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rgt():t==="fa"?Mgt():t==="ar"?Ogt():t==="es"?Dgt():t==="hi"?Lgt():Tgt()}),$gt=()=>"Connected to alphaXiv, bioRxiv, OpenAlex, and PubMed to ground your agents in the latest research.",Bgt=()=>"已连接 alphaXiv、bioRxiv、OpenAlex 和 PubMed,让智能体以最新研究为依据。",Pgt=()=>"به alphaXiv، bioRxiv، OpenAlex و PubMed متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",Fgt=()=>"متصل بـ alphaXiv وbioRxiv وOpenAlex وPubMed ليستند وكلاؤك إلى أحدث الأبحاث.",Hgt=()=>"Conectado a alphaXiv, bioRxiv, OpenAlex y PubMed para que tus agentes trabajen con la investigación más reciente.",qgt=()=>"आपके एजेंटों को नवीनतम शोध पर आधारित रखने के लिए alphaXiv, bioRxiv, OpenAlex और PubMed से कनेक्ट किया गया।",Ugt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bgt():t==="fa"?Pgt():t==="ar"?Fgt():t==="es"?Hgt():t==="hi"?qgt():$gt()}),Ggt=()=>"· Step 1 of 2",Kgt=()=>"· 第 1 步,共 2 步",Vgt=()=>"· مرحلهٔ ۱ از ۲",Wgt=()=>"· الخطوة 1 من 2",Qgt=()=>"· Paso 1 de 2",Xgt=()=>"· चरण 1 / 2",Ygt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kgt():t==="fa"?Vgt():t==="ar"?Wgt():t==="es"?Qgt():t==="hi"?Xgt():Ggt()}),Zgt=()=>"· Step 2 of 2",Jgt=()=>"· 第 2 步,共 2 步",e1t=()=>"· مرحلهٔ ۲ از ۲",t1t=()=>"· الخطوة 2 من 2",n1t=()=>"· Paso 2 de 2",r1t=()=>"· चरण 2 / 2",s1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jgt():t==="fa"?e1t():t==="ar"?t1t():t==="es"?n1t():t==="hi"?r1t():Zgt()}),i1t=()=>"Tell us about your research",a1t=()=>"介绍一下你的研究",o1t=()=>"از پژوهش خود بگویید",c1t=()=>"أخبرنا عن بحثك",l1t=()=>"Cuéntanos sobre tu investigación",u1t=()=>"हमें अपने शोध के बारे में बताएं",_1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a1t():t==="fa"?o1t():t==="ar"?c1t():t==="es"?l1t():t==="hi"?u1t():i1t()}),f1t=()=>"Tell us your other research area",d1t=()=>"告诉我们你的其他研究领域",h1t=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",p1t=()=>"أخبرنا عن مجالك البحثي الآخر",m1t=()=>"Cuéntanos cuál es tu otra área de investigación",g1t=()=>"हमें अपना अन्य शोध क्षेत्र बताएं",v1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d1t():t==="fa"?h1t():t==="ar"?p1t():t==="es"?m1t():t==="hi"?g1t():f1t()}),b1t=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",y1t=()=>"在一处跟踪实验、产物、算力、技能和代码。",x1t=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",w1t=()=>"تتبّع التجارب والمُخرَجات والحوسبة والمهارات والشيفرة في مكان واحد.",k1t=()=>"Gestiona experimentos, artefactos, cómputo, skills y código en un solo lugar.",S1t=()=>"प्रयोग, आर्टिफ़ैक्ट, कंप्यूट, स्किल और कोड — सब एक ही जगह ट्रैक करें।",C1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y1t():t==="fa"?x1t():t==="ar"?w1t():t==="es"?k1t():t==="hi"?S1t():b1t()}),E1t=()=>"Unable to verify",N1t=()=>"无法验证",z1t=()=>"تأیید ممکن نیست",j1t=()=>"تعذّر التحقق",A1t=()=>"No se pudo verificar",T1t=()=>"सत्यापित नहीं हो सका",mw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N1t():t==="fa"?z1t():t==="ar"?j1t():t==="es"?A1t():t==="hi"?T1t():E1t()}),R1t=()=>"Update required",M1t=()=>"需要更新",O1t=()=>"نیازمند به‌روزرسانی",D1t=()=>"مطلوب تحديث",L1t=()=>"Actualización necesaria",I1t=()=>"अपडेट ज़रूरी है",$1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M1t():t==="fa"?O1t():t==="ar"?D1t():t==="es"?L1t():t==="hi"?I1t():R1t()}),B1t=()=>"Waiting for the Git check",P1t=()=>"正在等待 Git 检查",F1t=()=>"در انتظار بررسی Git",H1t=()=>"في انتظار فحص Git",q1t=()=>"Esperando la comprobación de Git",U1t=()=>"Git जाँच का इंतज़ार है",G1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P1t():t==="fa"?F1t():t==="ar"?H1t():t==="es"?q1t():t==="hi"?U1t():B1t()}),K1t=()=>"Waiting for the local tool checks",V1t=()=>"正在等待本地工具检查",W1t=()=>"در انتظار بررسی ابزارهای محلی",Q1t=()=>"في انتظار فحوص الأدوات المحلية",X1t=()=>"Esperando las comprobaciones de las herramientas locales",Y1t=()=>"लोकल टूल जाँच का इंतज़ार है",Z1t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V1t():t==="fa"?W1t():t==="ar"?Q1t():t==="es"?X1t():t==="hi"?Y1t():K1t()}),J1t=()=>"What areas are you interested in?",evt=()=>"你对哪些领域感兴趣?",tvt=()=>"به چه حوزه‌هایی علاقه دارید؟",nvt=()=>"ما المجالات التي تهتم بها؟",rvt=()=>"¿Qué áreas te interesan?",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():J1t()}),avt=()=>"Your code, data, and experiment history stay on your machine.",ovt=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",cvt=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",lvt=()=>"تبقى شيفرتك وبياناتك وسجل تجاربك على جهازك.",uvt=()=>"Tu código, tus datos y tu historial de experimentos se quedan en tu equipo.",_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=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",hvt=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",pvt=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",mvt=()=>"لم يعد الوكيل الذي اخترته جاهزًا. ارجع إلى الخطوة 1 واختر غيره.",gvt=()=>"El agente que elegiste ya no está listo. Vuelve al paso 1 y elige otro.",vvt=()=>"आपका चुना हुआ एजेंट अब तैयार नहीं है। चरण 1 पर वापस जाएं और दूसरा चुनें।",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=()=>"Add cookie",xvt=()=>"添加 cookie",wvt=()=>"افزودن کوکی",kvt=()=>"إضافة ملف تعريف الارتباط",Svt=()=>"Añadir cookie",Cvt=()=>"कुकी जोड़ें",Evt=((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()}),Nvt=()=>"Changed here and on Overleaf — choose which copy to keep",zvt=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",jvt=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",Avt=()=>"تغيّر هنا وعلى Overleaf — اختر أي نسخة تحتفظ بها",Tvt=()=>"Cambió aquí y en Overleaf — elige qué copia conservar",Rvt=()=>"यहाँ और Overleaf दोनों जगह बदला गया — चुनें कि कौन सी कॉपी रखनी है",Mvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zvt():t==="fa"?jvt():t==="ar"?Avt():t==="es"?Tvt():t==="hi"?Rvt():Nvt()}),Ovt=()=>"Create a token ↗",Dvt=()=>"创建令牌 ↗",Lvt=()=>"ساخت توکن ↗",Ivt=()=>"إنشاء رمز ↗",$vt=()=>"Crear un token ↗",Bvt=()=>"एक टोकन बनाएं ↗",Pvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dvt():t==="fa"?Lvt():t==="ar"?Ivt():t==="es"?$vt():t==="hi"?Bvt():Ovt()}),Fvt=()=>"Overleaf Git token",Hvt=()=>"Overleaf Git 令牌",qvt=()=>"توکن Git در Overleaf",Uvt=()=>"رمز Git لـ Overleaf",Gvt=()=>"Token de Git de Overleaf",Kvt=()=>"Overleaf Git टोकन",Gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hvt():t==="fa"?qvt():t==="ar"?Uvt():t==="es"?Gvt():t==="hi"?Kvt():Fvt()}),Vvt=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",Wvt=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",Qvt=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",Xvt=()=>"تابِع Overleaf أثناء كتابة الآخرين بإضافة ملف تعريف ارتباط جلسة Overleaf.",Yvt=()=>"Sigue los cambios de Overleaf mientras se escribe añadiendo tu cookie de sesión de Overleaf.",Zvt=()=>"अपनी Overleaf सेशन कुकी जोड़कर लोगों के टाइप करते ही Overleaf को फ़ॉलो करें।",Jvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wvt():t==="fa"?Qvt():t==="ar"?Xvt():t==="es"?Yvt():t==="hi"?Zvt():Vvt()}),ebt=()=>"Import from browser",tbt=()=>"从浏览器导入",nbt=()=>"وارد کردن از مرورگر",rbt=()=>"الاستيراد من المتصفح",sbt=()=>"Importar desde el navegador",ibt=()=>"ब्राउज़र से इंपोर्ट करें",abt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tbt():t==="fa"?nbt():t==="ar"?rbt():t==="es"?sbt():t==="hi"?ibt():ebt()}),obt=()=>"In step with Overleaf",cbt=()=>"已与 Overleaf 同步",lbt=()=>"با Overleaf همگام است",ubt=()=>"متزامن مع Overleaf",_bt=()=>"Sincronizado con Overleaf",fbt=()=>"Overleaf के साथ मेल में",PL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cbt():t==="fa"?lbt():t==="ar"?ubt():t==="es"?_bt():t==="hi"?fbt():obt()}),dbt=()=>"The last sync did not finish.",hbt=()=>"上次同步未完成。",pbt=()=>"آخرین همگام‌سازی کامل نشد.",mbt=()=>"لم تكتمل آخر مزامنة.",gbt=()=>"La última sincronización no terminó.",vbt=()=>"पिछला सिंक पूरा नहीं हुआ।",bbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hbt():t==="fa"?pbt():t==="ar"?mbt():t==="es"?gbt():t==="hi"?vbt():dbt()}),ybt=()=>"Link and sync",xbt=()=>"关联并同步",wbt=()=>"پیوند و همگام‌سازی",kbt=()=>"الربط والمزامنة",Sbt=()=>"Vincular y sincronizar",Cbt=()=>"लिंक करें और सिंक करें",Ebt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xbt():t==="fa"?wbt():t==="ar"?kbt():t==="es"?Sbt():t==="hi"?Cbt():ybt()}),Nbt=()=>"Connecting to Overleaf…",zbt=()=>"正在连接 Overleaf…",jbt=()=>"در حال اتصال به Overleaf…",Abt=()=>"جارٍ الاتصال بـ Overleaf…",Tbt=()=>"Conectando con Overleaf…",Rbt=()=>"Overleaf से कनेक्ट हो रहा है…",Mbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zbt():t==="fa"?jbt():t==="ar"?Abt():t==="es"?Tbt():t==="hi"?Rbt():Nbt()}),Obt=()=>"Edits are live on Overleaf",Dbt=()=>"编辑已在 Overleaf 实时同步",Lbt=()=>"ویرایش‌ها روی Overleaf زنده‌اند",Ibt=()=>"تظهر التعديلات فورًا على Overleaf",$bt=()=>"Los cambios se sincronizan en directo con Overleaf",Bbt=()=>"बदलाव Overleaf पर लाइव हैं",Pbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dbt():t==="fa"?Lbt():t==="ar"?Ibt():t==="es"?$bt():t==="hi"?Bbt():Obt()}),Fbt=()=>"Retry",Hbt=()=>"重试",qbt=()=>"تلاش دوباره",Ubt=()=>"إعادة المحاولة",Gbt=()=>"Reintentar",Kbt=()=>"फिर से कोशिश करें",Vbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hbt():t==="fa"?qbt():t==="ar"?Ubt():t==="es"?Gbt():t==="hi"?Kbt():Fbt()}),Wbt=()=>"Live sync stopped.",Qbt=()=>"实时同步已停止。",Xbt=()=>"همگام‌سازی زنده متوقف شد.",Ybt=()=>"توقفت المزامنة المباشرة.",Zbt=()=>"Sincronización en directo detenida.",Jbt=()=>"लाइव सिंक रुक गया।",eyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qbt():t==="fa"?Xbt():t==="ar"?Ybt():t==="es"?Zbt():t==="hi"?Jbt():Wbt()}),tyt=()=>"Live sync starts once the paper is in step with Overleaf.",nyt=()=>"论文与 Overleaf 同步后,实时同步即会开始。",ryt=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",syt=()=>"تبدأ المزامنة المباشرة بمجرد أن تتزامن الورقة مع Overleaf.",iyt=()=>"La sincronización en directo empieza cuando el paper esté sincronizado con Overleaf.",ayt=()=>"पेपर Overleaf के साथ मेल में आते ही लाइव सिंक शुरू होगा।",oyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nyt():t==="fa"?ryt():t==="ar"?syt():t==="es"?iyt():t==="hi"?ayt():tyt()}),cyt=()=>"My projects ↗",lyt=()=>"我的项目 ↗",uyt=()=>"پروژه‌های من ↗",_yt=()=>"مشاريعي ↗",fyt=()=>"Mis proyectos ↗",dyt=()=>"मेरे प्रोजेक्ट ↗",Kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lyt():t==="fa"?uyt():t==="ar"?_yt():t==="es"?fyt():t==="hi"?dyt():cyt()}),hyt=()=>"Nothing could be synced.",pyt=()=>"没有内容可以同步。",myt=()=>"هیچ موردی قابل همگام‌سازی نبود.",gyt=()=>"تعذّرت مزامنة أي شيء.",vyt=()=>"No se pudo sincronizar nada.",byt=()=>"कुछ भी सिंक नहीं हो सका।",yyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pyt():t==="fa"?myt():t==="ar"?gyt():t==="es"?vyt():t==="hi"?byt():hyt()}),xyt=()=>"Open Overleaf ↗",wyt=()=>"打开 Overleaf ↗",kyt=()=>"باز کردن Overleaf ↗",Syt=()=>"فتح Overleaf ↗",Cyt=()=>"Abrir Overleaf ↗",Eyt=()=>"Overleaf खोलें ↗",Nyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wyt():t==="fa"?kyt():t==="ar"?Syt():t==="es"?Cyt():t==="hi"?Eyt():xyt()}),zyt=()=>"Cancel",jyt=()=>"取消",Ayt=()=>"لغو",Tyt=()=>"إلغاء",Ryt=()=>"Cancelar",Myt=()=>"रद्द करें",FL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jyt():t==="fa"?Ayt():t==="ar"?Tyt():t==="es"?Ryt():t==="hi"?Myt():zyt()}),Oyt=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",Dyt=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",Lyt=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",Iyt=()=>"تغيّر هنا وعلى Overleaf. كلا النسختين لم تُمسّا — اختر أيّهما تحتفظ به.",$yt=()=>"cambió aquí y en Overleaf. No se ha tocado ninguna de las dos copias — elige cuál conservar.",Byt=()=>"यहाँ और Overleaf दोनों जगह बदला गया। दोनों कॉपी सुरक्षित हैं — चुनें कि कौन सी रखनी है।",Pyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dyt():t==="fa"?Lyt():t==="ar"?Iyt():t==="es"?$yt():t==="hi"?Byt():Oyt()}),Fyt=()=>"Keep this copy",Hyt=()=>"保留此副本",qyt=()=>"نگه داشتن این نسخه",Uyt=()=>"الاحتفاظ بهذه النسخة",Gyt=()=>"Conservar esta copia",Kyt=()=>"यह कॉपी रखें",Vyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hyt():t==="fa"?qyt():t==="ar"?Uyt():t==="es"?Gyt():t==="hi"?Kyt():Fyt()}),Wyt=()=>"Open in Overleaf",Qyt=()=>"在 Overleaf 中打开",Xyt=()=>"باز کردن در Overleaf",Yyt=()=>"فتح في Overleaf",Zyt=()=>"Abrir en Overleaf",Jyt=()=>"Overleaf में खोलें",ext=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qyt():t==="fa"?Xyt():t==="ar"?Yyt():t==="es"?Zyt():t==="hi"?Jyt():Wyt()}),txt=()=>"Replace the Overleaf token",nxt=()=>"替换 Overleaf 令牌",rxt=()=>"جایگزینی توکن Overleaf",sxt=()=>"استبدال رمز Overleaf",ixt=()=>"Reemplazar el token de Overleaf",axt=()=>"Overleaf टोकन बदलें",Vz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nxt():t==="fa"?rxt():t==="ar"?sxt():t==="es"?ixt():t==="hi"?axt():txt()}),oxt=()=>"Sync files",cxt=()=>"同步文件",lxt=()=>"همگام‌سازی فایل‌ها",uxt=()=>"مزامنة الملفات",_xt=()=>"Sincronizar archivos",fxt=()=>"फ़ाइलें सिंक करें",dxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cxt():t==="fa"?lxt():t==="ar"?uxt():t==="es"?_xt():t==="hi"?fxt():oxt()}),hxt=()=>"Unlink",pxt=()=>"取消关联",mxt=()=>"قطع پیوند",gxt=()=>"إلغاء الربط",vxt=()=>"Desvincular",bxt=()=>"लिंक हटाएं",yxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pxt():t==="fa"?mxt():t==="ar"?gxt():t==="es"?vxt():t==="hi"?bxt():hxt()}),xxt=()=>"Upload a copy as a new project ↗",wxt=()=>"上传副本作为新项目 ↗",kxt=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",Sxt=()=>"رفع نسخة كمشروع جديد ↗",Cxt=()=>"Subir una copia como proyecto nuevo ↗",Ext=()=>"नए प्रोजेक्ट के रूप में एक कॉपी अपलोड करें ↗",HL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wxt():t==="fa"?kxt():t==="ar"?Sxt():t==="es"?Cxt():t==="hi"?Ext():xxt()}),Nxt=()=>"Use Overleaf's",zxt=()=>"使用 Overleaf 的副本",jxt=()=>"استفاده از نسخهٔ Overleaf",Axt=()=>"استخدام نسخة Overleaf",Txt=()=>"Usar la de Overleaf",Rxt=()=>"Overleaf का इस्तेमाल करें",Mxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zxt():t==="fa"?jxt():t==="ar"?Axt():t==="es"?Txt():t==="hi"?Rxt():Nxt()}),Oxt=()=>"This paper stays in step with Overleaf.",Dxt=()=>"此论文将与 Overleaf 保持同步。",Lxt=()=>"این مقاله با Overleaf همگام می‌ماند.",Ixt=()=>"تبقى هذه الورقة متزامنة مع Overleaf.",$xt=()=>"Este paper se mantiene sincronizado con Overleaf.",Bxt=()=>"यह पेपर Overleaf के साथ मेल में रहता है।",Pxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dxt():t==="fa"?Lxt():t==="ar"?Ixt():t==="es"?$xt():t==="hi"?Bxt():Oxt()}),Fxt=()=>"Paste it instead",Hxt=()=>"改为粘贴",qxt=()=>"به‌جایش بچسبانید",Uxt=()=>"الصقه بدلًا من ذلك",Gxt=()=>"Pegarla manualmente",Kxt=()=>"इसके बजाय पेस्ट करें",Vxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hxt():t==="fa"?qxt():t==="ar"?Uxt():t==="es"?Gxt():t==="hi"?Kxt():Fxt()}),Wxt=e=>`Pulled ${e==null?void 0:e.paths}.`,Qxt=e=>`已拉取 ${e==null?void 0:e.paths}。`,Xxt=e=>`${e==null?void 0:e.paths} دریافت شد.`,Yxt=e=>`سُحب ${e==null?void 0:e.paths}.`,Zxt=e=>`Descargado: ${e==null?void 0:e.paths}.`,Jxt=e=>`${e==null?void 0:e.paths} पुल किया।`,e2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qxt(e):t==="fa"?Xxt(e):t==="ar"?Yxt(e):t==="es"?Zxt(e):t==="hi"?Jxt(e):Wxt(e)}),t2t=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,n2t=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,r2t=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,s2t=e=>`سُحب ${e==null?void 0:e.pulled}؛ ورُفع ${e==null?void 0:e.pushed}.`,i2t=e=>`Descargado: ${e==null?void 0:e.pulled}; subido: ${e==null?void 0:e.pushed}.`,a2t=e=>`${e==null?void 0:e.pulled} पुल किया; ${e==null?void 0:e.pushed} पुश किया।`,o2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?n2t(e):t==="fa"?r2t(e):t==="ar"?s2t(e):t==="es"?i2t(e):t==="hi"?a2t(e):t2t(e)}),c2t=e=>`Pushed ${e==null?void 0:e.paths}.`,l2t=e=>`已推送 ${e==null?void 0:e.paths}。`,u2t=e=>`${e==null?void 0:e.paths} ارسال شد.`,_2t=e=>`رُفع ${e==null?void 0:e.paths}.`,f2t=e=>`Subido: ${e==null?void 0:e.paths}.`,d2t=e=>`${e==null?void 0:e.paths} पुश किया।`,h2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?l2t(e):t==="fa"?u2t(e):t==="ar"?_2t(e):t==="es"?f2t(e):t==="hi"?d2t(e):c2t(e)}),p2t=()=>"Add a fresh Overleaf session cookie to start following again.",m2t=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",g2t=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",v2t=()=>"أضِف ملف تعريف ارتباط جلسة Overleaf جديدًا لبدء المتابعة مجددًا.",b2t=()=>"Añade una nueva cookie de sesión de Overleaf para volver a seguir los cambios.",y2t=()=>"फिर से फ़ॉलो करना शुरू करने के लिए एक नई Overleaf सेशन कुकी जोड़ें।",x2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m2t():t==="fa"?g2t():t==="ar"?v2t():t==="es"?b2t():t==="hi"?y2t():p2t()}),w2t=()=>"Save the file first",k2t=()=>"请先保存文件",S2t=()=>"ابتدا فایل را ذخیره کنید",C2t=()=>"احفظ الملف أولًا",E2t=()=>"Guarda el archivo primero",N2t=()=>"पहले फ़ाइल सेव करें",z2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k2t():t==="fa"?S2t():t==="ar"?C2t():t==="es"?E2t():t==="hi"?N2t():w2t()}),j2t=()=>"Save this file to sync it with Overleaf",A2t=()=>"保存此文件以与 Overleaf 同步",T2t=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",R2t=()=>"احفظ هذا الملف لمزامنته مع Overleaf",M2t=()=>"Guarda este archivo para sincronizarlo con Overleaf",O2t=()=>"Overleaf के साथ सिंक करने के लिए इस फ़ाइल को सेव करें",qL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A2t():t==="fa"?T2t():t==="ar"?R2t():t==="es"?M2t():t==="hi"?O2t():j2t()}),D2t=()=>"Save token",L2t=()=>"保存令牌",I2t=()=>"ذخیرهٔ توکن",$2t=()=>"حفظ الرمز",B2t=()=>"Guardar token",P2t=()=>"टोकन सेव करें",F2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L2t():t==="fa"?I2t():t==="ar"?$2t():t==="es"?B2t():t==="hi"?P2t():D2t()}),H2t=()=>"Send this paper to Overleaf",q2t=()=>"将此论文发送到 Overleaf",U2t=()=>"ارسال مقاله به Overleaf",G2t=()=>"أرسل هذه الورقة إلى Overleaf",K2t=()=>"Enviar este paper a Overleaf",V2t=()=>"यह पेपर Overleaf को भेजें",W2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q2t():t==="fa"?U2t():t==="ar"?G2t():t==="es"?K2t():t==="hi"?V2t():H2t()}),Q2t=()=>"Overleaf session cookie",X2t=()=>"Overleaf 会话 cookie",Y2t=()=>"کوکی نشست Overleaf",Z2t=()=>"ملف تعريف ارتباط جلسة Overleaf",J2t=()=>"Cookie de sesión de Overleaf",ewt=()=>"Overleaf सेशन कुकी",L3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X2t():t==="fa"?Y2t():t==="ar"?Z2t():t==="es"?J2t():t==="hi"?ewt():Q2t()}),twt=()=>"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.",nwt=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",rwt=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",swt=()=>"لمتابعة Overleaf أثناء كتابة الآخرين، الصق ملف تعريف ارتباط جلسة Overleaf: في متصفح مسجّل الدخول إلى Overleaf، افتح أدوات المطوّر، وابحث عن ملف تعريف الارتباط overleaf_session2، وانسخ قيمته. يبقى على هذا الجهاز.",iwt=()=>"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.",awt=()=>"लोगों के टाइप करते ही Overleaf को फ़ॉलो करने के लिए, अपनी Overleaf सेशन कुकी पेस्ट करें: Overleaf में साइन इन ब्राउज़र में, डेवलपर टूल खोलें, overleaf_session2 कुकी खोजें, और उसकी वैल्यू कॉपी करें। यह इसी मशीन पर रहती है।",owt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nwt():t==="fa"?rwt():t==="ar"?swt():t==="es"?iwt():t==="hi"?awt():twt()}),cwt=()=>"Overleaf sync failed",lwt=()=>"Overleaf 同步失败",uwt=()=>"همگام‌سازی با Overleaf ناموفق بود",_wt=()=>"فشلت مزامنة Overleaf",fwt=()=>"Error al sincronizar con Overleaf",dwt=()=>"Overleaf सिंक विफल",I3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lwt():t==="fa"?uwt():t==="ar"?_wt():t==="es"?fwt():t==="hi"?dwt():cwt()}),hwt=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",pwt=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",mwt=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",gwt=()=>"يتزامن النص مباشرةً. ينقل هذا الأشكال والملفات الأخرى، ويحسم التعارضات.",vwt=()=>"El texto se sincroniza en directo. Esto mueve las figuras y otros archivos, y resuelve conflictos.",bwt=()=>"टेक्स्ट लाइव सिंक होता है। यह फ़िगर और अन्य फ़ाइलें ले जाता है, और टकराव सुलझाता है।",ywt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pwt():t==="fa"?mwt():t==="ar"?gwt():t==="es"?vwt():t==="hi"?bwt():hwt()}),xwt=()=>"Syncing with Overleaf…",wwt=()=>"正在与 Overleaf 同步…",kwt=()=>"در حال همگام‌سازی با Overleaf…",Swt=()=>"جارٍ المزامنة مع Overleaf…",Cwt=()=>"Sincronizando con Overleaf…",Ewt=()=>"Overleaf के साथ सिंक हो रहा है…",UL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wwt():t==="fa"?kwt():t==="ar"?Swt():t==="es"?Cwt():t==="hi"?Ewt():xwt()}),Nwt=()=>"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.",zwt=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",jwt=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",Awt=()=>"الصق رمز مصادقة Git لـ Overleaf لإبقاء هذه الورقة متزامنة مع مشروع Overleaf. أنشئ واحدًا في Overleaf ضمن إعدادات الحساب — يأتي تكامل Git مع خطة Overleaf مدفوعة.",Twt=()=>"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.",Rwt=()=>"इस पेपर को किसी Overleaf प्रोजेक्ट के साथ मेल में रखने के लिए एक Overleaf Git प्रमाणीकरण टोकन पेस्ट करें। इसे Overleaf में Account Settings के तहत बनाएं — Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है।",Mwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zwt():t==="fa"?jwt():t==="ar"?Awt():t==="es"?Twt():t==="hi"?Rwt():Nwt()}),Owt=()=>"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.",Dwt=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",Lwt=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",Iwt=()=>"الصق رابط مشروع Overleaf الذي تنتمي إليه هذه الورقة. لا يستطيع Overleaf إنشاء مشروع عبر Git، لذا افتح المشروع أو أنشئه هناك أولًا.",$wt=()=>"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.",Bwt=()=>"उस Overleaf प्रोजेक्ट का URL पेस्ट करें जिससे यह पेपर संबंधित है। Overleaf Git के ज़रिए एक नहीं बना सकता, इसलिए पहले वहाँ प्रोजेक्ट खोलें या बनाएं।",Pwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dwt():t==="fa"?Lwt():t==="ar"?Iwt():t==="es"?$wt():t==="hi"?Bwt():Owt()}),Fwt=()=>"Toggle Plan mode for this chat",Hwt=()=>"切换此聊天的计划模式",qwt=()=>"تغییر حالت طرح این گفت‌وگو",Uwt=()=>"تبديل وضع التخطيط لهذه المحادثة",Gwt=()=>"Activa o desactiva el modo Plan en este chat",Kwt=()=>"इस चैट के लिए प्लान मोड टॉगल करें",Vwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hwt():t==="fa"?qwt():t==="ar"?Uwt():t==="es"?Gwt():t==="hi"?Kwt():Fwt()}),Wwt=()=>"Accept and auto mode",Qwt=()=>"接受并使用自动模式",Xwt=()=>"پذیرش و حالت خودکار",Ywt=()=>"قبول وتفعيل الوضع التلقائي",Zwt=()=>"Aceptar en modo automático",Jwt=()=>"स्वीकार करें और ऑटो मोड",e4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qwt():t==="fa"?Xwt():t==="ar"?Ywt():t==="es"?Zwt():t==="hi"?Jwt():Wwt()}),t4t=()=>"Accept and bypass all",n4t=()=>"接受并跳过所有审批",r4t=()=>"پذیرش و عبور از همهٔ تأییدها",s4t=()=>"القبول وتجاوز الكل",i4t=()=>"Aceptar y omitir permisos",a4t=()=>"स्वीकार करें और सब बायपास करें",o4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n4t():t==="fa"?r4t():t==="ar"?s4t():t==="es"?i4t():t==="hi"?a4t():t4t()}),c4t=()=>"Accept plan",l4t=()=>"接受计划",u4t=()=>"پذیرش طرح",_4t=()=>"قبول الخطة",f4t=()=>"Aceptar plan",d4t=()=>"प्लान स्वीकार करें",h4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l4t():t==="fa"?u4t():t==="ar"?_4t():t==="es"?f4t():t==="hi"?d4t():c4t()}),p4t=e=>`${e==null?void 0:e.agent} proposed a plan`,m4t=e=>`${e==null?void 0:e.agent} 提出了一个计划`,g4t=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,v4t=e=>`${e==null?void 0:e.agent} اقترح خطة`,b4t=e=>`${e==null?void 0:e.agent} propuso un plan`,y4t=e=>`${e==null?void 0:e.agent} ने एक प्लान प्रस्तावित किया`,x4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?m4t(e):t==="fa"?g4t(e):t==="ar"?v4t(e):t==="es"?b4t(e):t==="hi"?y4t(e):p4t(e)}),w4t=e=>`${e==null?void 0:e.agent} is ready to proceed`,k4t=e=>`${e==null?void 0:e.agent} 已准备好继续`,S4t=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,C4t=e=>`${e==null?void 0:e.agent} جاهز للمتابعة`,E4t=e=>`${e==null?void 0:e.agent} está listo para continuar`,N4t=e=>`${e==null?void 0:e.agent} आगे बढ़ने के लिए तैयार है`,z4t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?k4t(e):t==="fa"?S4t(e):t==="ar"?C4t(e):t==="es"?E4t(e):t==="hi"?N4t(e):w4t(e)}),j4t=()=>"Back",A4t=()=>"返回",T4t=()=>"بازگشت",R4t=()=>"رجوع",M4t=()=>"Atrás",O4t=()=>"वापस",GL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A4t():t==="fa"?T4t():t==="ar"?R4t():t==="es"?M4t():t==="hi"?O4t():j4t()}),D4t=()=>"More approval options",L4t=()=>"更多批准选项",I4t=()=>"گزینه‌های تأیید بیشتر",$4t=()=>"خيارات موافقة إضافية",B4t=()=>"Más opciones de aprobación",P4t=()=>"और स्वीकृति विकल्प",F4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L4t():t==="fa"?I4t():t==="ar"?$4t():t==="es"?B4t():t==="hi"?P4t():D4t()}),H4t=()=>"Open plan",q4t=()=>"打开计划",U4t=()=>"باز کردن طرح",G4t=()=>"فتح الخطة",K4t=()=>"Abrir plan",V4t=()=>"प्लान खोलें",W4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q4t():t==="fa"?U4t():t==="ar"?G4t():t==="es"?K4t():t==="hi"?V4t():H4t()}),Q4t=()=>"Reject",X4t=()=>"拒绝",Y4t=()=>"رد کردن",Z4t=()=>"رفض",J4t=()=>"Rechazar",e3t=()=>"अस्वीकार करें",t3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X4t():t==="fa"?Y4t():t==="ar"?Z4t():t==="es"?J4t():t==="hi"?e3t():Q4t()}),n3t=()=>"Revise",r3t=()=>"修改",s3t=()=>"بازنگری",i3t=()=>"طلب تعديل",a3t=()=>"Pedir cambios",o3t=()=>"संशोधित करें",c3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r3t():t==="fa"?s3t():t==="ar"?i3t():t==="es"?a3t():t==="hi"?o3t():n3t()}),l3t=()=>"Revise…",u3t=()=>"修改…",_3t=()=>"بازنگری…",f3t=()=>"طلب تعديل…",d3t=()=>"Pedir cambios…",h3t=()=>"संशोधित करें…",p3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u3t():t==="fa"?_3t():t==="ar"?f3t():t==="es"?d3t():t==="hi"?h3t():l3t()}),m3t=()=>"What should change? (optional)",g3t=()=>"需要更改什么?(可选)",v3t=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",b3t=()=>"ما الذي ينبغي تغييره؟ (اختياري)",y3t=()=>"¿Qué debería cambiar? (opcional)",x3t=()=>"क्या बदलना चाहिए? (वैकल्पिक)",w3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g3t():t==="fa"?v3t():t==="ar"?b3t():t==="es"?y3t():t==="hi"?x3t():m3t()}),k3t=e=>`${e==null?void 0:e.count} active`,S3t=e=>`${e==null?void 0:e.count} 个活跃`,C3t=e=>`${e==null?void 0:e.count} فعال`,E3t=e=>`الوكلاء النشطون: ${e==null?void 0:e.count}`,N3t=e=>`${e==null?void 0:e.count} activos`,z3t=e=>`${e==null?void 0:e.count} सक्रिय`,j3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?S3t(e):t==="fa"?C3t(e):t==="ar"?E3t(e):t==="es"?N3t(e):t==="hi"?z3t(e):k3t(e)}),A3t=e=>`${e==null?void 0:e.count} total agents`,T3t=e=>`共 ${e==null?void 0:e.count} 个智能体`,R3t=e=>`در مجموع ${e==null?void 0:e.count} عامل`,M3t=e=>`إجمالي الوكلاء: ${e==null?void 0:e.count}`,O3t=e=>`${e==null?void 0:e.count} agentes en total`,D3t=e=>`${e==null?void 0:e.count} कुल एजेंट`,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=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,$3t=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,B3t=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,P3t=e=>`حذف ${e==null?void 0:e.name} من OpenResearch؟ ستُزال تجاربه وعمليات تشغيله ومحادثاته نهائيًا.`,F3t=e=>`¿Eliminar ${e==null?void 0:e.name} de OpenResearch? Sus experimentos, ejecuciones y chats se eliminarán de forma permanente.`,H3t=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं? इसके प्रयोग, रन और चैट स्थायी रूप से हट जाएंगे।`,q3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$3t(e):t==="fa"?B3t(e):t==="ar"?P3t(e):t==="es"?F3t(e):t==="hi"?H3t(e):I3t(e)}),U3t=()=>"Agents",G3t=()=>"智能体",K3t=()=>"عامل‌ها",V3t=()=>"الوكلاء",W3t=()=>"Agentes",Q3t=()=>"एजेंट",Wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G3t():t==="fa"?K3t():t==="ar"?V3t():t==="es"?W3t():t==="hi"?Q3t():U3t()}),X3t=()=>"arXiv paper ID:",Y3t=()=>"arXiv 论文 ID:",Z3t=()=>"شناسهٔ مقالهٔ arXiv:",J3t=()=>"معرّف ورقة arXiv:",e5t=()=>"ID del paper en arXiv:",t5t=()=>"arXiv पेपर ID:",n5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y3t():t==="fa"?Z3t():t==="ar"?J3t():t==="es"?e5t():t==="hi"?t5t():X3t()}),r5t=()=>"Cancel",s5t=()=>"取消",i5t=()=>"لغو",a5t=()=>"إلغاء",o5t=()=>"Cancelar",c5t=()=>"रद्द करें",l5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s5t():t==="fa"?i5t():t==="ar"?a5t():t==="es"?o5t():t==="hi"?c5t():r5t()}),u5t=()=>"Created",_5t=()=>"创建时间",f5t=()=>"ایجادشده",d5t=()=>"أُنشئ",h5t=()=>"Creado",p5t=()=>"बनाया गया",m5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_5t():t==="fa"?f5t():t==="ar"?d5t():t==="es"?h5t():t==="hi"?p5t():u5t()}),g5t=()=>"Delete project?",v5t=()=>"删除项目?",b5t=()=>"پروژه حذف شود؟",y5t=()=>"حذف المشروع؟",x5t=()=>"¿Eliminar el proyecto?",w5t=()=>"प्रोजेक्ट हटाएं?",k5t=((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()}),S5t=()=>"Delete project",C5t=()=>"删除项目",E5t=()=>"حذف پروژه",N5t=()=>"حذف المشروع",z5t=()=>"Eliminar proyecto",j5t=()=>"प्रोजेक्ट हटाएं",A5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C5t():t==="fa"?E5t():t==="ar"?N5t():t==="es"?z5t():t==="hi"?j5t():S5t()}),T5t=()=>"Deleting…",R5t=()=>"正在删除…",M5t=()=>"در حال حذف…",O5t=()=>"جارٍ الحذف…",D5t=()=>"Eliminando…",L5t=()=>"हटाया जा रहा है…",I5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R5t():t==="fa"?M5t():t==="ar"?O5t():t==="es"?D5t():t==="hi"?L5t():T5t()}),$5t=()=>"Experiments",B5t=()=>"实验",P5t=()=>"آزمایش‌ها",F5t=()=>"التجارب",H5t=()=>"Experimentos",q5t=()=>"प्रयोग",Qz=((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=()=>"The local folder and linked GitHub repository are kept.",G5t=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",K5t=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",V5t=()=>"يُحتفظ بالمجلد المحلي ومستودع GitHub المرتبط.",W5t=()=>"Se conservan la carpeta local y el repositorio de GitHub vinculado.",Q5t=()=>"लोकल फ़ोल्डर और लिंक की गई GitHub रिपॉज़िटरी दोनों सुरक्षित रहती हैं।",X5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G5t():t==="fa"?K5t():t==="ar"?V5t():t==="es"?W5t():t==="hi"?Q5t():U5t()}),Y5t=()=>"The local folder is kept.",Z5t=()=>"本地文件夹会保留。",J5t=()=>"پوشهٔ محلی نگه داشته می‌شود.",ekt=()=>"يُحتفظ بالمجلد المحلي.",tkt=()=>"La carpeta local se conserva.",nkt=()=>"लोकल फ़ोल्डर सुरक्षित रहता है।",rkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z5t():t==="fa"?J5t():t==="ar"?ekt():t==="es"?tkt():t==="hi"?nkt():Y5t()}),skt=()=>"New project",ikt=()=>"新建项目",akt=()=>"پروژهٔ جدید",okt=()=>"مشروع جديد",ckt=()=>"Nuevo proyecto",lkt=()=>"नया प्रोजेक्ट",KL=((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()}),ukt=()=>"No projects yet — create one to get started.",_kt=()=>"尚无项目——新建一个即可开始。",fkt=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",dkt=()=>"لا توجد مشاريع بعد — أنشئ واحدًا للبدء.",hkt=()=>"Aún no hay proyectos — crea uno para empezar.",pkt=()=>"अभी तक कोई प्रोजेक्ट नहीं — शुरू करने के लिए एक बनाएं।",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=()=>"Project",vkt=()=>"项目",bkt=()=>"پروژه",ykt=()=>"المشروع",xkt=()=>"Proyecto",wkt=()=>"प्रोजेक्ट",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=()=>"Projects",Ckt=()=>"项目",Ekt=()=>"پروژه‌ها",Nkt=()=>"المشاريع",zkt=()=>"Proyectos",jkt=()=>"प्रोजेक्ट",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=()=>"Repository",Rkt=()=>"仓库",Mkt=()=>"مخزن",Okt=()=>"المستودع",Dkt=()=>"Repositorio",Lkt=()=>"रिपॉज़िटरी",Xz=((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()}),Ikt=()=>"Idle",$kt=()=>"空闲",Bkt=()=>"بیکار",Pkt=()=>"خامل",Fkt=()=>"Inactivo",Hkt=()=>"निष्क्रिय",qkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$kt():t==="fa"?Bkt():t==="ar"?Pkt():t==="es"?Fkt():t==="hi"?Hkt():Ikt()}),Ukt=()=>"Local",Gkt=()=>"本地",Kkt=()=>"محلی",Vkt=()=>"محلي",Wkt=()=>"Local",Qkt=()=>"लोकल",$v=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gkt():t==="fa"?Kkt():t==="ar"?Vkt():t==="es"?Wkt():t==="hi"?Qkt():Ukt()}),Xkt=()=>"1 total agent",Ykt=()=>"共 1 个智能体",Zkt=()=>"در مجموع ۱ عامل",Jkt=()=>"وكيل واحد إجمالًا",eSt=()=>"1 agente en total",tSt=()=>"1 कुल एजेंट",nSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ykt():t==="fa"?Zkt():t==="ar"?Jkt():t==="es"?eSt():t==="hi"?tSt():Xkt()}),rSt=e=>`${e==null?void 0:e.count} running`,sSt=e=>`${e==null?void 0:e.count} 个运行中`,iSt=e=>`${e==null?void 0:e.count} در حال اجرا`,aSt=e=>`${e==null?void 0:e.count} قيد التشغيل`,oSt=e=>`${e==null?void 0:e.count} en ejecución`,cSt=e=>`${e==null?void 0:e.count} चल रहे`,lSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sSt(e):t==="fa"?iSt(e):t==="ar"?aSt(e):t==="es"?oSt(e):t==="hi"?cSt(e):rSt(e)}),uSt=e=>`${e==null?void 0:e.count} total`,_St=e=>`共 ${e==null?void 0:e.count} 个`,fSt=e=>`در مجموع ${e==null?void 0:e.count}`,dSt=e=>`${e==null?void 0:e.count} إجمالًا`,hSt=e=>`${e==null?void 0:e.count} en total`,pSt=e=>`${e==null?void 0:e.count} कुल`,Yz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_St(e):t==="fa"?fSt(e):t==="ar"?dSt(e):t==="es"?hSt(e):t==="hi"?pSt(e):uSt(e)}),mSt=()=>"Installing the compatible binary. This may take a few minutes.",gSt=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",vSt=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",bSt=()=>"جارٍ تثبيت الملف التنفيذي المتوافق. قد يستغرق هذا بضع دقائق.",ySt=()=>"Instalando el binario compatible. Puede tardar unos minutos.",xSt=()=>"संगत बाइनरी इंस्टॉल हो रही है। इसमें कुछ मिनट लग सकते हैं।",wSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gSt():t==="fa"?vSt():t==="ar"?bSt():t==="es"?ySt():t==="hi"?xSt():mSt()}),kSt=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,SSt=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,CSt=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,ESt=e=>`جارٍ إعداد OpenResearch على ${e==null?void 0:e.host}`,NSt=e=>`Configurando OpenResearch en ${e==null?void 0:e.host}`,zSt=e=>`${e==null?void 0:e.host} पर OpenResearch सेट अप हो रहा है`,jSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SSt(e):t==="fa"?CSt(e):t==="ar"?ESt(e):t==="es"?NSt(e):t==="hi"?zSt(e):kSt(e)}),ASt=()=>"Check again",TSt=()=>"再次检查",RSt=()=>"بررسی دوباره",MSt=()=>"تحقق مجددًا",OSt=()=>"Volver a comprobar",DSt=()=>"फिर से जाँचें",Zz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TSt():t==="fa"?RSt():t==="ar"?MSt():t==="es"?OSt():t==="hi"?DSt():ASt()}),LSt=()=>"Closing…",ISt=()=>"正在关闭…",$St=()=>"در حال بستن…",BSt=()=>"جارٍ الإغلاق…",PSt=()=>"Cerrando…",FSt=()=>"बंद हो रहा है…",HSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ISt():t==="fa"?$St():t==="ar"?BSt():t==="es"?PSt():t==="hi"?FSt():LSt()}),qSt=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,USt=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,GSt=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,KSt=e=>`متصل بـ ${e==null?void 0:e.host} باسم ${e==null?void 0:e.user}`,VSt=e=>`Conectado a ${e==null?void 0:e.host} como ${e==null?void 0:e.user}`,WSt=e=>`${e==null?void 0:e.host} से ${e==null?void 0:e.user} के रूप में कनेक्टेड`,QSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?USt(e):t==="fa"?GSt(e):t==="ar"?KSt(e):t==="es"?VSt(e):t==="hi"?WSt(e):qSt(e)}),XSt=()=>"Preparing your remote workspace…",YSt=()=>"正在准备远程工作区…",ZSt=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",JSt=()=>"جارٍ تحضير مساحة عملك البعيدة…",e6t=()=>"Preparando tu espacio de trabajo remoto…",t6t=()=>"आपका रिमोट वर्कस्पेस तैयार किया जा रहा है…",n6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YSt():t==="fa"?ZSt():t==="ar"?JSt():t==="es"?e6t():t==="hi"?t6t():XSt()}),r6t=e=>`Connecting to ${e==null?void 0:e.host}`,s6t=e=>`正在连接到 ${e==null?void 0:e.host}`,i6t=e=>`در حال اتصال به ${e==null?void 0:e.host}`,a6t=e=>`جارٍ الاتصال بـ ${e==null?void 0:e.host}`,o6t=e=>`Conectando a ${e==null?void 0:e.host}`,c6t=e=>`${e==null?void 0:e.host} से कनेक्ट हो रहा है`,l6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?s6t(e):t==="fa"?i6t(e):t==="ar"?a6t(e):t==="es"?o6t(e):t==="hi"?c6t(e):r6t(e)}),u6t=()=>"Close remote host picker",_6t=()=>"关闭远程主机选择器",f6t=()=>"بستن انتخاب‌گر میزبان راه‌دور",d6t=()=>"إغلاق مُنتقي المضيف البعيد",h6t=()=>"Cerrar el selector de hosts remotos",p6t=()=>"रिमोट होस्ट पिकर बंद करें",m6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_6t():t==="fa"?f6t():t==="ar"?d6t():t==="es"?h6t():t==="hi"?p6t():u6t()}),g6t=()=>"Choose a configured SSH host.",v6t=()=>"选择已配置的 SSH 主机。",b6t=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",y6t=()=>"اختر مضيف SSH مُعدًّا.",x6t=()=>"Elige un host SSH configurado.",w6t=()=>"एक कॉन्फ़िगर किया गया SSH होस्ट चुनें।",k6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v6t():t==="fa"?b6t():t==="ar"?y6t():t==="es"?x6t():t==="hi"?w6t():g6t()}),S6t=()=>"Connect to remote",C6t=()=>"连接到远程主机",E6t=()=>"اتصال به میزبان راه‌دور",N6t=()=>"الاتصال بجهاز بعيد",z6t=()=>"Conectar a un host remoto",j6t=()=>"रिमोट से कनेक्ट करें",$3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C6t():t==="fa"?E6t():t==="ar"?N6t():t==="es"?z6t():t==="hi"?j6t():S6t()}),A6t=()=>"Disconnect",T6t=()=>"断开连接",R6t=()=>"قطع اتصال",M6t=()=>"قطع الاتصال",O6t=()=>"Desconectar",D6t=()=>"डिस्कनेक्ट करें",B3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T6t():t==="fa"?R6t():t==="ar"?M6t():t==="es"?O6t():t==="hi"?D6t():A6t()}),L6t=()=>"Your remote work is still running. Reconnect when you’re ready.",I6t=()=>"你的远程工作仍在运行。准备好后可以重新连接。",$6t=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",B6t=()=>"لا يزال عملك البعيد قيد التشغيل. أعد الاتصال عندما تكون جاهزًا.",P6t=()=>"Tu trabajo remoto sigue en ejecución. Vuelve a conectarte cuando quieras.",F6t=()=>"आपका रिमोट काम अभी भी चल रहा है। तैयार होने पर फिर से कनेक्ट करें।",H6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I6t():t==="fa"?$6t():t==="ar"?B6t():t==="es"?P6t():t==="hi"?F6t():L6t()}),q6t=e=>`Disconnected from ${e==null?void 0:e.host}`,U6t=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,G6t=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,K6t=e=>`انقطع الاتصال بـ ${e==null?void 0:e.host}`,V6t=e=>`Desconectado de ${e==null?void 0:e.host}`,W6t=e=>`${e==null?void 0:e.host} से डिस्कनेक्ट हो गया`,VL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?U6t(e):t==="fa"?G6t(e):t==="ar"?K6t(e):t==="es"?V6t(e):t==="hi"?W6t(e):q6t(e)}),Q6t=e=>`Could not connect to ${e==null?void 0:e.host}`,X6t=e=>`无法连接到 ${e==null?void 0:e.host}`,Y6t=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,Z6t=e=>`تعذّر الاتصال بـ ${e==null?void 0:e.host}`,J6t=e=>`No se pudo conectar a ${e==null?void 0:e.host}`,eCt=e=>`${e==null?void 0:e.host} से कनेक्ट नहीं हो सका`,tCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?X6t(e):t==="fa"?Y6t(e):t==="ar"?Z6t(e):t==="es"?J6t(e):t==="hi"?eCt(e):Q6t(e)}),nCt=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",rCt=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",sCt=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",iCt=()=>"أعد تشغيل OpenResearch المحلي واختر مضيف SSH هذا مجددًا. يستمر العمل على المضيف البعيد.",aCt=()=>"Reinicia OpenResearch en local y vuelve a seleccionar este host SSH. El trabajo en el host remoto continúa.",oCt=()=>"लोकल OpenResearch फिर से शुरू करें और इस SSH होस्ट को फिर से चुनें। रिमोट होस्ट पर काम जारी रहता है।",cCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rCt():t==="fa"?sCt():t==="ar"?iCt():t==="es"?aCt():t==="hi"?oCt():nCt()}),lCt=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",uCt=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",_Ct=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",fCt=()=>"توقّف وكلاء OpenResearch. قد تظل التجارب المُرسَلة قيد التشغيل.",dCt=()=>"Los agentes de OpenResearch se han detenido. Puede que los experimentos enviados sigan en ejecución.",hCt=()=>"OpenResearch एजेंट रुक गए हैं। सबमिट किए गए प्रयोग अभी भी चल सकते हैं।",pCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uCt():t==="fa"?_Ct():t==="ar"?fCt():t==="es"?dCt():t==="hi"?hCt():lCt()}),mCt=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,gCt=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,vCt=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,bCt=e=>`‏OpenResearch لا يعمل على ${e==null?void 0:e.host}`,yCt=e=>`OpenResearch no se está ejecutando en ${e==null?void 0:e.host}`,xCt=e=>`${e==null?void 0:e.host} पर OpenResearch नहीं चल रहा`,wCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gCt(e):t==="fa"?vCt(e):t==="ar"?bCt(e):t==="es"?yCt(e):t==="hi"?xCt(e):mCt(e)}),kCt=()=>"OpenResearch binary",SCt=()=>"OpenResearch 二进制文件",CCt=()=>"فایل اجرایی OpenResearch",ECt=()=>"الملف التنفيذي لـ OpenResearch",NCt=()=>"Binario de OpenResearch",zCt=()=>"OpenResearch बाइनरी",jCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SCt():t==="fa"?CCt():t==="ar"?ECt():t==="es"?NCt():t==="hi"?zCt():kCt()}),ACt=()=>"OpenResearch Database",TCt=()=>"OpenResearch 数据库",RCt=()=>"پایگاه دادهٔ OpenResearch",MCt=()=>"قاعدة بيانات OpenResearch",OCt=()=>"Base de datos de OpenResearch",DCt=()=>"OpenResearch डेटाबेस",LCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TCt():t==="fa"?RCt():t==="ar"?MCt():t==="es"?OCt():t==="hi"?DCt():ACt()}),ICt=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",$Ct=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",BCt=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",PCt=()=>"سيستخدم OpenResearch هذه المواقع لمستخدم SSH البعيد ولا يتطلب sudo.",FCt=()=>"OpenResearch usará estas ubicaciones para tu usuario SSH remoto y no necesita sudo.",HCt=()=>"OpenResearch आपके रिमोट SSH यूज़र के लिए इन स्थानों का इस्तेमाल करेगा और sudo की ज़रूरत नहीं है।",qCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ct():t==="fa"?BCt():t==="ar"?PCt():t==="es"?FCt():t==="hi"?HCt():ICt()}),UCt=()=>"Install OpenResearch?",GCt=()=>"安装 OpenResearch?",KCt=()=>"OpenResearch نصب شود؟",VCt=()=>"تثبيت OpenResearch؟",WCt=()=>"¿Instalar OpenResearch?",QCt=()=>"OpenResearch इंस्टॉल करें?",XCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GCt():t==="fa"?KCt():t==="ar"?VCt():t==="es"?WCt():t==="hi"?QCt():UCt()}),YCt=()=>"Installing…",ZCt=()=>"正在安装…",JCt=()=>"در حال نصب…",e7t=()=>"جارٍ التثبيت…",t7t=()=>"Instalando…",n7t=()=>"इंस्टॉल हो रहा है…",r7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZCt():t==="fa"?JCt():t==="ar"?e7t():t==="es"?t7t():t==="hi"?n7t():YCt()}),s7t=()=>"No matching SSH hosts",i7t=()=>"没有匹配的 SSH 主机",a7t=()=>"میزبان SSH منطبقی پیدا نشد",o7t=()=>"لا توجد مضيفات SSH مطابقة",c7t=()=>"No hay hosts SSH que coincidan",l7t=()=>"कोई मेल खाता SSH होस्ट नहीं",u7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i7t():t==="fa"?a7t():t==="ar"?o7t():t==="es"?c7t():t==="hi"?l7t():s7t()}),_7t=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,f7t=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,d7t=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,h7t=e=>`‏OpenResearch غير مثبّت للمستخدم ${e==null?void 0:e.user} على ${e==null?void 0:e.host}. هل تريد تثبيته الآن؟`,p7t=e=>`OpenResearch no está instalado para ${e==null?void 0:e.user} en ${e==null?void 0:e.host}. ¿Instalarlo ahora?`,m7t=e=>`${e==null?void 0:e.host} पर ${e==null?void 0:e.user} के लिए OpenResearch इंस्टॉल नहीं है। अभी इंस्टॉल करें?`,g7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f7t(e):t==="fa"?d7t(e):t==="ar"?h7t(e):t==="es"?p7t(e):t==="hi"?m7t(e):_7t(e)}),v7t=()=>"Open remote",b7t=()=>"打开远程工作区",y7t=()=>"باز کردن راه‌دور",x7t=()=>"فتح مساحة العمل البعيدة",w7t=()=>"Abrir remoto",k7t=()=>"रिमोट खोलें",S7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b7t():t==="fa"?y7t():t==="ar"?x7t():t==="es"?w7t():t==="hi"?k7t():v7t()}),C7t=()=>"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.",E7t=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",N7t=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",z7t=()=>"إغلاق هذا التبويب أو قطع الاتصال يُبقي الوكلاء والتجارب قيد التشغيل. تبقى طلبات الموافقة معلّقة لمدة تصل إلى 55 دقيقة. قد تتسبب إعادة تشغيل المضيف أو سياسة المسؤول في إيقاف OpenResearch.",j7t=()=>"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.",A7t=()=>"यह टैब बंद करने या डिस्कनेक्ट करने पर भी एजेंट और प्रयोग चलते रहते हैं। स्वीकृति अनुरोध 55 मिनट तक लंबित रहते हैं। होस्ट रीस्टार्ट या एडमिन नीति OpenResearch को रोक सकती है।",T7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E7t():t==="fa"?N7t():t==="ar"?z7t():t==="es"?j7t():t==="hi"?A7t():C7t()}),R7t=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",M7t=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",O7t=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",D7t=()=>"حجب متصفحك تبويب مساحة العمل البعيدة. اسمح بالنوافذ المنبثقة وحاول مجددًا.",L7t=()=>"Tu navegador bloqueó la pestaña del espacio de trabajo remoto. Permite las ventanas emergentes y vuelve a intentarlo.",I7t=()=>"आपके ब्राउज़र ने रिमोट वर्कस्पेस टैब को ब्लॉक कर दिया। पॉप-अप की अनुमति दें और फिर से कोशिश करें।",$7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M7t():t==="fa"?O7t():t==="ar"?D7t():t==="es"?L7t():t==="hi"?I7t():R7t()}),B7t=()=>"Preparing remote workspace…",P7t=()=>"正在准备远程工作区…",F7t=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",H7t=()=>"جارٍ تحضير مساحة العمل البعيدة…",q7t=()=>"Preparando el espacio de trabajo remoto…",U7t=()=>"रिमोट वर्कस्पेस तैयार हो रहा है…",G7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P7t():t==="fa"?F7t():t==="ar"?H7t():t==="es"?q7t():t==="hi"?U7t():B7t()}),K7t=()=>"Reconnect",V7t=()=>"重新连接",W7t=()=>"اتصال دوباره",Q7t=()=>"إعادة الاتصال",X7t=()=>"Reconectar",Y7t=()=>"फिर से कनेक्ट करें",Jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V7t():t==="fa"?W7t():t==="ar"?Q7t():t==="es"?X7t():t==="hi"?Y7t():K7t()}),Z7t=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",J7t=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",e8t=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",t8t=()=>"انقطع الاتصال. يبقى عملك البعيد قيد التشغيل بينما يعيد OpenResearch الاتصال.",n8t=()=>"Se perdió la conexión. Tu trabajo remoto sigue en ejecución mientras OpenResearch se reconecta.",r8t=()=>"कनेक्शन टूट गया। OpenResearch के फिर से कनेक्ट होने के दौरान आपका रिमोट काम चलता रहता है।",s8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J7t():t==="fa"?e8t():t==="ar"?t8t():t==="es"?n8t():t==="hi"?r8t():Z7t()}),i8t=e=>`Reconnecting to ${e==null?void 0:e.host}`,a8t=e=>`正在重新连接到 ${e==null?void 0:e.host}`,o8t=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,c8t=e=>`جارٍ إعادة الاتصال بـ ${e==null?void 0:e.host}`,l8t=e=>`Reconectando a ${e==null?void 0:e.host}`,u8t=e=>`${e==null?void 0:e.host} से फिर से कनेक्ट हो रहा है`,_8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?a8t(e):t==="fa"?o8t(e):t==="ar"?c8t(e):t==="es"?l8t(e):t==="hi"?u8t(e):i8t(e)}),f8t=()=>"Search SSH hosts",d8t=()=>"搜索 SSH 主机",h8t=()=>"جستجوی میزبان‌های SSH",p8t=()=>"البحث في مضيفات SSH",m8t=()=>"Buscar hosts SSH",g8t=()=>"SSH होस्ट खोजें",ej=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d8t():t==="fa"?h8t():t==="ar"?p8t():t==="es"?m8t():t==="hi"?g8t():f8t()}),v8t=e=>`SSH: ${e==null?void 0:e.host}`,b8t=e=>`SSH:${e==null?void 0:e.host}`,y8t=e=>`SSH: ${e==null?void 0:e.host}`,x8t=e=>`SSH: ${e==null?void 0:e.host}`,w8t=e=>`SSH: ${e==null?void 0:e.host}`,k8t=e=>`SSH: ${e==null?void 0:e.host}`,gw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?b8t(e):t==="fa"?y8t(e):t==="ar"?x8t(e):t==="es"?w8t(e):t==="hi"?k8t(e):v8t(e)}),S8t=()=>"Start a new OpenResearch host",C8t=()=>"启动新的 OpenResearch 主机",E8t=()=>"راه‌اندازی میزبان جدید OpenResearch",N8t=()=>"بدء مضيف OpenResearch جديد",z8t=()=>"Iniciar un nuevo host de OpenResearch",j8t=()=>"एक नया OpenResearch होस्ट शुरू करें",A8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C8t():t==="fa"?E8t():t==="ar"?N8t():t==="es"?z8t():t==="hi"?j8t():S8t()}),T8t=e=>`End ${e==null?void 0:e.count} pending approvals.`,R8t=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,M8t=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,O8t=e=>`إنهاء طلبات الموافقة المعلّقة (${e==null?void 0:e.count}).`,D8t=e=>`Cancelará ${e==null?void 0:e.count} aprobaciones pendientes.`,L8t=e=>`${e==null?void 0:e.count} लंबित स्वीकृतियाँ खत्म होंगी।`,I8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?R8t(e):t==="fa"?M8t(e):t==="ar"?O8t(e):t==="es"?D8t(e):t==="hi"?L8t(e):T8t(e)}),$8t=()=>"Stop OpenResearch",B8t=()=>"停止 OpenResearch",P8t=()=>"توقف OpenResearch",F8t=()=>"إيقاف OpenResearch",H8t=()=>"Detener OpenResearch",q8t=()=>"OpenResearch रोकें",U8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B8t():t==="fa"?P8t():t==="ar"?F8t():t==="es"?H8t():t==="hi"?q8t():$8t()}),G8t=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,K8t=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,V8t=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,W8t=e=>`إيقاف OpenResearch على ${e==null?void 0:e.host}؟`,Q8t=e=>`¿Detener OpenResearch en ${e==null?void 0:e.host}?`,X8t=e=>`${e==null?void 0:e.host} पर OpenResearch रोकें?`,Y8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?K8t(e):t==="fa"?V8t(e):t==="ar"?W8t(e):t==="es"?Q8t(e):t==="hi"?X8t(e):G8t(e)}),Z8t=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,J8t=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,e9t=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,t9t=e=>`إبقاء التجارب المُرسَلة قيد التشغيل (${e==null?void 0:e.count}).`,n9t=e=>`Dejará ${e==null?void 0:e.count} experimentos enviados en ejecución.`,r9t=e=>`${e==null?void 0:e.count} सबमिट किए गए प्रयोग चलते रहेंगे।`,s9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?J8t(e):t==="fa"?e9t(e):t==="ar"?t9t(e):t==="es"?n9t(e):t==="hi"?r9t(e):Z8t(e)}),i9t=()=>"Stop OpenResearch on host",a9t=()=>"停止主机上的 OpenResearch",o9t=()=>"توقف OpenResearch روی میزبان",c9t=()=>"إيقاف OpenResearch على المضيف",l9t=()=>"Detener OpenResearch en el host",u9t=()=>"होस्ट पर OpenResearch रोकें",WL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a9t():t==="fa"?o9t():t==="ar"?c9t():t==="es"?l9t():t==="hi"?u9t():i9t()}),_9t=()=>"This will also:",f9t=()=>"这还将:",d9t=()=>"این کار همچنین:",h9t=()=>"سيؤدي هذا أيضًا إلى:",p9t=()=>"Esto también:",m9t=()=>"इससे यह भी होगा:",g9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f9t():t==="fa"?d9t():t==="ar"?h9t():t==="es"?p9t():t==="hi"?m9t():_9t()}),v9t=()=>"End 1 pending approval.",b9t=()=>"结束 1 个待审批请求。",y9t=()=>"۱ تأیید در انتظار را پایان می‌دهد.",x9t=()=>"إنهاء طلب موافقة معلّق واحد.",w9t=()=>"Cancelará 1 aprobación pendiente.",k9t=()=>"1 लंबित स्वीकृति खत्म होगी।",S9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b9t():t==="fa"?y9t():t==="ar"?x9t():t==="es"?w9t():t==="hi"?k9t():v9t()}),C9t=()=>"Leave 1 submitted experiment running.",E9t=()=>"让 1 个已提交实验继续运行。",N9t=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",z9t=()=>"ترك تجربة مُرسَلة واحدة قيد التشغيل.",j9t=()=>"Dejará 1 experimento enviado en ejecución.",A9t=()=>"1 सबमिट किया गया प्रयोग चलता रहेगा।",T9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E9t():t==="fa"?N9t():t==="ar"?z9t():t==="es"?j9t():t==="hi"?A9t():C9t()}),R9t=()=>"Disconnect 1 other client.",M9t=()=>"断开 1 个其他客户端。",O9t=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",D9t=()=>"قطع اتصال عميل آخر واحد.",L9t=()=>"Desconectará a otro cliente.",I9t=()=>"1 अन्य क्लाइंट डिस्कनेक्ट होगा।",$9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M9t():t==="fa"?O9t():t==="ar"?D9t():t==="es"?L9t():t==="hi"?I9t():R9t()}),B9t=()=>"Keep 1 queued message saved.",P9t=()=>"保留 1 条排队消息。",F9t=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",H9t=()=>"إبقاء رسالة واحدة محفوظة في قائمة الانتظار.",q9t=()=>"Conservará 1 mensaje en cola.",U9t=()=>"1 कतार में लगा संदेश सुरक्षित रहेगा।",G9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P9t():t==="fa"?F9t():t==="ar"?H9t():t==="es"?q9t():t==="hi"?U9t():B9t()}),K9t=()=>"Interrupt 1 active agent turn.",V9t=()=>"中断 1 个活动代理任务。",W9t=()=>"۱ نوبت فعال عامل را قطع می‌کند.",Q9t=()=>"مقاطعة جولة وكيل نشطة واحدة.",X9t=()=>"Interrumpirá 1 turno activo de un agente.",Y9t=()=>"1 सक्रिय एजेंट टर्न बाधित होगा।",Z9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V9t():t==="fa"?W9t():t==="ar"?Q9t():t==="es"?X9t():t==="hi"?Y9t():K9t()}),J9t=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,eEt=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,tEt=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,nEt=e=>`قطع اتصال العملاء الآخرين (${e==null?void 0:e.count}).`,rEt=e=>`Desconectará otros ${e==null?void 0:e.count} clientes.`,sEt=e=>`${e==null?void 0:e.count} अन्य क्लाइंट डिस्कनेक्ट होंगे।`,iEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eEt(e):t==="fa"?tEt(e):t==="ar"?nEt(e):t==="es"?rEt(e):t==="hi"?sEt(e):J9t(e)}),aEt=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,oEt=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,cEt=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,lEt=e=>`إبقاء الرسائل في قائمة الانتظار محفوظة (${e==null?void 0:e.count}).`,uEt=e=>`Conservará ${e==null?void 0:e.count} mensajes en cola.`,_Et=e=>`${e==null?void 0:e.count} कतार में लगे संदेश सुरक्षित रहेंगे।`,fEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oEt(e):t==="fa"?cEt(e):t==="ar"?lEt(e):t==="es"?uEt(e):t==="hi"?_Et(e):aEt(e)}),dEt=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,hEt=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,pEt=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,mEt=e=>`مقاطعة جولات الوكلاء النشطة (${e==null?void 0:e.count}).`,gEt=e=>`Interrumpirá ${e==null?void 0:e.count} turnos activos de agentes.`,vEt=e=>`${e==null?void 0:e.count} सक्रिय एजेंट टर्न बाधित होंगे।`,bEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hEt(e):t==="fa"?pEt(e):t==="ar"?mEt(e):t==="es"?gEt(e):t==="hi"?vEt(e):dEt(e)}),yEt=()=>"Stopping host…",xEt=()=>"正在停止主机…",wEt=()=>"در حال توقف میزبان…",kEt=()=>"جارٍ إيقاف المضيف…",SEt=()=>"Deteniendo el host…",CEt=()=>"होस्ट रोका जा रहा है…",EEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xEt():t==="fa"?wEt():t==="ar"?kEt():t==="es"?SEt():t==="hi"?CEt():yEt()}),NEt=()=>"Update",zEt=()=>"更新",jEt=()=>"به‌روزرسانی",AEt=()=>"تحديث",TEt=()=>"Actualizar",REt=()=>"अपडेट करें",tj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zEt():t==="fa"?jEt():t==="ar"?AEt():t==="es"?TEt():t==="hi"?REt():NEt()}),MEt=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,OEt=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,DEt=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,LEt=e=>`نسخة OpenResearch المثبّتة على ${e==null?void 0:e.host} غير متوافقة مع هذه اللوحة. هل تريد تحديثها الآن؟`,IEt=e=>`La instalación de OpenResearch en ${e==null?void 0:e.host} no es compatible con este dashboard. ¿Actualizarla ahora?`,$Et=e=>`${e==null?void 0:e.host} पर OpenResearch इंस्टॉलेशन इस डैशबोर्ड के साथ संगत नहीं है। अभी अपडेट करें?`,BEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?OEt(e):t==="fa"?DEt(e):t==="ar"?LEt(e):t==="es"?IEt(e):t==="hi"?$Et(e):MEt(e)}),PEt=()=>"Update OpenResearch?",FEt=()=>"更新 OpenResearch?",HEt=()=>"OpenResearch به‌روزرسانی شود؟",qEt=()=>"تحديث OpenResearch؟",UEt=()=>"¿Actualizar OpenResearch?",GEt=()=>"OpenResearch अपडेट करें?",KEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FEt():t==="fa"?HEt():t==="ar"?qEt():t==="es"?UEt():t==="hi"?GEt():PEt()}),VEt=()=>"Updating…",WEt=()=>"正在更新…",QEt=()=>"در حال به‌روزرسانی…",XEt=()=>"جارٍ التحديث…",YEt=()=>"Actualizando…",ZEt=()=>"अपडेट हो रहा है…",JEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WEt():t==="fa"?QEt():t==="ar"?XEt():t==="es"?YEt():t==="hi"?ZEt():VEt()}),eNt=()=>"Disable syncing",tNt=()=>"关闭同步",nNt=()=>"غیرفعال کردن همگام‌سازی",rNt=()=>"تعطيل المزامنة",sNt=()=>"Desactivar sincronización",iNt=()=>"सिंकिंग बंद करें",aNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tNt():t==="fa"?nNt():t==="ar"?rNt():t==="es"?sNt():t==="hi"?iNt():eNt()}),oNt=()=>"Enable GitHub syncing",cNt=()=>"启用 GitHub 同步",lNt=()=>"فعال‌سازی همگام‌سازی GitHub",uNt=()=>"تفعيل مزامنة GitHub",_Nt=()=>"Activar sincronización con GitHub",fNt=()=>"GitHub सिंकिंग चालू करें",dNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cNt():t==="fa"?lNt():t==="ar"?uNt():t==="es"?_Nt():t==="hi"?fNt():oNt()}),hNt=()=>"Enabling…",pNt=()=>"正在启用…",mNt=()=>"در حال فعال‌سازی…",gNt=()=>"جارٍ التفعيل…",vNt=()=>"Activando…",bNt=()=>"चालू हो रहा है…",yNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pNt():t==="fa"?mNt():t==="ar"?gNt():t==="es"?vNt():t==="hi"?bNt():hNt()}),xNt=()=>"Updating…",wNt=()=>"正在更新…",kNt=()=>"در حال به‌روزرسانی…",SNt=()=>"جارٍ التحديث…",CNt=()=>"Actualizando…",ENt=()=>"अपडेट हो रहा है…",NNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wNt():t==="fa"?kNt():t==="ar"?SNt():t==="es"?CNt():t==="hi"?ENt():xNt()}),zNt=()=>"Reopen a previous chat",jNt=()=>"重新打开之前的聊天",ANt=()=>"بازکردن دوبارهٔ گفت‌وگوی قبلی",TNt=()=>"إعادة فتح محادثة سابقة",RNt=()=>"Vuelve a abrir un chat anterior",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=()=>"No chats to resume",LNt=()=>"没有可恢复的聊天",INt=()=>"گفت‌وگویی برای ادامه وجود ندارد",$Nt=()=>"لا توجد محادثات لاستئنافها",BNt=()=>"No hay chats que reanudar",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=()=>"From your terminal — adopting copies the transcript, and new turns continue there",qNt=()=>"来自你的终端 — 采用会复制记录,新的回合将在那里继续",UNt=()=>"از ترمینال شما — با پذیرفتن، رونوشت گفت‌وگو کپی می‌شود و نوبت‌های جدید همان‌جا ادامه می‌یابند",GNt=()=>"من طرفيتك — التبنّي ينسخ النص، والجولات الجديدة تتابع هناك",KNt=()=>"Desde tu terminal — al adoptarlo se copia la transcripción y los turnos nuevos continúan allí",VNt=()=>"आपके टर्मिनल से — अपनाने पर ट्रांसक्रिप्ट कॉपी होती है और नए टर्न वहीं जारी रहते हैं",nj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qNt():t==="fa"?UNt():t==="ar"?GNt():t==="es"?KNt():t==="hi"?VNt():HNt()}),WNt=()=>"Search chats",QNt=()=>"搜索聊天",XNt=()=>"جست‌وجوی گفت‌وگوها",YNt=()=>"البحث في المحادثات",ZNt=()=>"Buscar chats",JNt=()=>"चैट खोजें",rj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QNt():t==="fa"?XNt():t==="ar"?YNt():t==="es"?ZNt():t==="hi"?JNt():WNt()}),ezt=()=>"Resume a chat",tzt=()=>"恢复聊天",nzt=()=>"ادامهٔ یک گفت‌وگو",rzt=()=>"استئناف محادثة",szt=()=>"Reanudar un chat",izt=()=>"चैट फिर से शुरू करें",sj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tzt():t==="fa"?nzt():t==="ar"?rzt():t==="es"?szt():t==="hi"?izt():ezt()}),azt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,ozt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,czt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,lzt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}`,uzt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}`,_zt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}`,fzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ozt(e):t==="fa"?czt(e):t==="ar"?lzt(e):t==="es"?uzt(e):t==="hi"?_zt(e):azt(e)}),dzt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,hzt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,pzt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,mzt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,gzt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,vzt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,bzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hzt(e):t==="fa"?pzt(e):t==="ar"?mzt(e):t==="es"?gzt(e):t==="hi"?vzt(e):dzt(e)}),yzt=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`,xzt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,wzt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,kzt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,Szt=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`,Czt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,Ezt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xzt(e):t==="fa"?wzt(e):t==="ar"?kzt(e):t==="es"?Szt(e):t==="hi"?Czt(e):yzt(e)}),Nzt=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,zzt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,jzt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,Azt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,Tzt=e=>`Reintentando · intento ${e==null?void 0:e.attempt} · siguiente intento en ${e==null?void 0:e.seconds} s`,Rzt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,Mzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zzt(e):t==="fa"?jzt(e):t==="ar"?Azt(e):t==="es"?Tzt(e):t==="hi"?Rzt(e):Nzt(e)}),Ozt=()=>"CLI is retrying…",Dzt=()=>"CLI 正在重试…",Lzt=()=>"CLI در حال تلاش دوباره است…",Izt=()=>"تعيد واجهة سطر الأوامر المحاولة…",$zt=()=>"La CLI está reintentando…",Bzt=()=>"CLI फिर से कोशिश कर रहा है…",Pzt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dzt():t==="fa"?Lzt():t==="ar"?Izt():t==="es"?$zt():t==="hi"?Bzt():Ozt()}),Fzt=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,Hzt=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,qzt=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,Uzt=e=>`إعادة المحاولة · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,Gzt=e=>`Reintentando · siguiente intento en ${e==null?void 0:e.seconds} s`,Kzt=e=>`फिर से कोशिश · अगला प्रयास ${e==null?void 0:e.seconds}से में`,Vzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hzt(e):t==="fa"?qzt(e):t==="ar"?Uzt(e):t==="es"?Gzt(e):t==="hi"?Kzt(e):Fzt(e)}),Wzt=()=>"Sending again…",Qzt=()=>"正在重新发送…",Xzt=()=>"در حال ارسال دوباره…",Yzt=()=>"جارٍ إعادة الإرسال…",Zzt=()=>"Reenviando…",Jzt=()=>"फिर से भेजा जा रहा है…",ejt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qzt():t==="fa"?Xzt():t==="ar"?Yzt():t==="es"?Zzt():t==="hi"?Jzt():Wzt()}),tjt=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,njt=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,rjt=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,sjt=e=>`إعادة الإرسال بعد ${e==null?void 0:e.seconds}ث…`,ijt=e=>`Reenviando en ${e==null?void 0:e.seconds} s…`,ajt=e=>`${e==null?void 0:e.seconds}से में फिर से भेजा जाएगा…`,ojt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?njt(e):t==="fa"?rjt(e):t==="ar"?sjt(e):t==="es"?ijt(e):t==="hi"?ajt(e):tjt(e)}),cjt=()=>"Retrying…",ljt=()=>"正在重试…",ujt=()=>"در حال تلاش دوباره…",_jt=()=>"جارٍ إعادة المحاولة…",fjt=()=>"Reintentando…",djt=()=>"फिर से कोशिश हो रही है…",QL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ljt():t==="fa"?ujt():t==="ar"?_jt():t==="es"?fjt():t==="hi"?djt():cjt()}),hjt=()=>"Default speed",pjt=()=>"默认速度",mjt=()=>"سرعت پیش‌فرض",gjt=()=>"السرعة الافتراضية",vjt=()=>"Velocidad predeterminada",bjt=()=>"डिफ़ॉल्ट गति",yjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pjt():t==="fa"?mjt():t==="ar"?gjt():t==="es"?vjt():t==="hi"?bjt():hjt()}),xjt=()=>"Standard",wjt=()=>"标准",kjt=()=>"استاندارد",Sjt=()=>"قياسي",Cjt=()=>"Estándar",Ejt=()=>"स्टैंडर्ड",Njt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wjt():t==="fa"?kjt():t==="ar"?Sjt():t==="es"?Cjt():t==="hi"?Ejt():xjt()}),zjt=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,jjt=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,Ajt=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,Tjt=e=>` أضِف ${e==null?void 0:e.directory} إلى PATH لاستخدامه.`,Rjt=e=>` Añade ${e==null?void 0:e.directory} a tu PATH para usarlo.`,Mjt=e=>` इसे इस्तेमाल करने के लिए ${e==null?void 0:e.directory} को अपने PATH में जोड़ें।`,Ojt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jjt(e):t==="fa"?Ajt(e):t==="ar"?Tjt(e):t==="es"?Rjt(e):t==="hi"?Mjt(e):zjt(e)}),Djt=()=>"Appearance",Ljt=()=>"外观",Ijt=()=>"ظاهر",$jt=()=>"المظهر",Bjt=()=>"Apariencia",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=()=>"Check",qjt=()=>"检查",Ujt=()=>"بررسی",Gjt=()=>"فحص",Kjt=()=>"Comprobar",Vjt=()=>"जाँचें",Wjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qjt():t==="fa"?Ujt():t==="ar"?Gjt():t==="es"?Kjt():t==="hi"?Vjt():Hjt()}),Qjt=()=>"Check again",Xjt=()=>"再次检查",Yjt=()=>"بررسی دوباره",Zjt=()=>"تحقق مجددًا",Jjt=()=>"Volver a comprobar",eAt=()=>"फिर से जाँचें",Am=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xjt():t==="fa"?Yjt():t==="ar"?Zjt():t==="es"?Jjt():t==="hi"?eAt():Qjt()}),tAt=()=>"Check for updates",nAt=()=>"检查更新",rAt=()=>"بررسی به‌روزرسانی",sAt=()=>"التحقق من التحديثات",iAt=()=>"Buscar actualizaciones",aAt=()=>"अपडेट के लिए जाँचें",oAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nAt():t==="fa"?rAt():t==="ar"?sAt():t==="es"?iAt():t==="hi"?aAt():tAt()}),cAt=()=>"Check now",lAt=()=>"立即检查",uAt=()=>"اکنون بررسی کن",_At=()=>"التحقق الآن",fAt=()=>"Comprobar ahora",dAt=()=>"अभी जाँचें",hAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lAt():t==="fa"?uAt():t==="ar"?_At():t==="es"?fAt():t==="hi"?dAt():cAt()}),pAt=()=>"Check setup",mAt=()=>"检查设置",gAt=()=>"بررسی راه‌اندازی",vAt=()=>"فحص الإعداد",bAt=()=>"Comprobar configuración",yAt=()=>"सेटअप जाँचें",xAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mAt():t==="fa"?gAt():t==="ar"?vAt():t==="es"?bAt():t==="hi"?yAt():pAt()}),wAt=()=>"orx checks a few times a day on its own.",kAt=()=>"orx 每天会自动检查几次。",SAt=()=>"orx روزی چند بار خودکار بررسی می‌کند.",CAt=()=>"يتحقق orx بضع مرات يوميًا تلقائيًا.",EAt=()=>"orx lo comprueba por sí solo varias veces al día.",NAt=()=>"orx खुद दिन में कुछ बार जाँच करता है।",zAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kAt():t==="fa"?SAt():t==="ar"?CAt():t==="es"?EAt():t==="hi"?NAt():wAt()}),jAt=()=>"Choose a flavor",AAt=()=>"选择配置",TAt=()=>"انتخاب پیکربندی",RAt=()=>"اختر تكوين الموارد",MAt=()=>"Elige una opción",OAt=()=>"एक फ़्लेवर चुनें",DAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AAt():t==="fa"?TAt():t==="ar"?RAt():t==="es"?MAt():t==="hi"?OAt():jAt()}),LAt=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,IAt=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,$At=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,BAt=e=>`اختر تكوين الموارد لاستخدام ${e==null?void 0:e.destination} في عمليات التشغيل الجديدة.`,PAt=e=>`Elige una opción para usar ${e==null?void 0:e.destination} en las nuevas ejecuciones.`,FAt=e=>`नए रन के लिए ${e==null?void 0:e.destination} इस्तेमाल करने के लिए एक फ़्लेवर चुनें।`,HAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IAt(e):t==="fa"?$At(e):t==="ar"?BAt(e):t==="es"?PAt(e):t==="hi"?FAt(e):LAt(e)}),qAt=()=>"clean",UAt=()=>"无更改",GAt=()=>"بدون تغییر",KAt=()=>"نظيف",VAt=()=>"sin cambios",WAt=()=>"साफ़",QAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UAt():t==="fa"?GAt():t==="ar"?KAt():t==="es"?VAt():t==="hi"?WAt():qAt()}),XAt=e=>`Already linked at ${e==null?void 0:e.link}.`,YAt=e=>`已链接到 ${e==null?void 0:e.link}。`,ZAt=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,JAt=e=>`مرتبط بالفعل في ${e==null?void 0:e.link}.`,eTt=e=>`Ya está enlazado en ${e==null?void 0:e.link}.`,tTt=e=>`पहले से ${e==null?void 0:e.link} पर लिंक है।`,nTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YAt(e):t==="fa"?ZAt(e):t==="ar"?JAt(e):t==="es"?eTt(e):t==="hi"?tTt(e):XAt(e)}),rTt=e=>`Linked ${e==null?void 0:e.link}.`,sTt=e=>`已链接 ${e==null?void 0:e.link}。`,iTt=e=>`${e==null?void 0:e.link} پیوند شد.`,aTt=e=>`تم إنشاء الرابط ${e==null?void 0:e.link}.`,oTt=e=>`Enlazado en ${e==null?void 0:e.link}.`,cTt=e=>`${e==null?void 0:e.link} लिंक किया गया।`,lTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sTt(e):t==="fa"?iTt(e):t==="ar"?aTt(e):t==="es"?oTt(e):t==="hi"?cTt(e):rTt(e)}),uTt=()=>"Close terminal",_Tt=()=>"关闭终端",fTt=()=>"بستن ترمینال",dTt=()=>"إغلاق الطرفية",hTt=()=>"Cerrar la terminal",pTt=()=>"टर्मिनल बंद करें",ij=((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()}),mTt=()=>"Terminal closed",gTt=()=>"终端已关闭",vTt=()=>"ترمینال بسته شد",bTt=()=>"أُغلقت الطرفية",yTt=()=>"Terminal cerrada",xTt=()=>"टर्मिनल बंद हो गया",wTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gTt():t==="fa"?vTt():t==="ar"?bTt():t==="es"?yTt():t==="hi"?xTt():mTt()}),kTt=()=>"Finished",STt=()=>"已完成",CTt=()=>"انجام شد",ETt=()=>"اكتمل",NTt=()=>"Finalizado",zTt=()=>"पूर्ण",jTt=((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()}),ATt=()=>"Command failed",TTt=()=>"命令失败",RTt=()=>"دستور ناموفق بود",MTt=()=>"فشل الأمر",OTt=()=>"El comando falló",DTt=()=>"कमांड विफल रही",LTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TTt():t==="fa"?RTt():t==="ar"?MTt():t==="es"?OTt():t==="hi"?DTt():ATt()}),ITt=()=>"Running…",$Tt=()=>"运行中…",BTt=()=>"در حال اجرا…",PTt=()=>"قيد التشغيل…",FTt=()=>"Ejecutando…",HTt=()=>"चल रहा है…",qTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Tt():t==="fa"?BTt():t==="ar"?PTt():t==="es"?FTt():t==="hi"?HTt():ITt()}),UTt=()=>"Connect",GTt=()=>"连接",KTt=()=>"اتصال",VTt=()=>"اتصال",WTt=()=>"Conectar",QTt=()=>"कनेक्ट करें",NS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GTt():t==="fa"?KTt():t==="ar"?VTt():t==="es"?WTt():t==="hi"?QTt():UTt()}),XTt=()=>"Connected via GitHub CLI",YTt=()=>"已通过 GitHub CLI 连接",ZTt=()=>"از طریق GitHub CLI متصل است",JTt=()=>"متصل عبر واجهة GitHub لسطر الأوامر",eRt=()=>"Conectado mediante GitHub CLI",tRt=()=>"GitHub CLI के ज़रिए कनेक्टेड",XL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YTt():t==="fa"?ZTt():t==="ar"?JTt():t==="es"?eRt():t==="hi"?tRt():XTt()}),nRt=()=>"Connecting…",rRt=()=>"正在连接…",sRt=()=>"در حال اتصال…",iRt=()=>"جارٍ الاتصال…",aRt=()=>"Conectando…",oRt=()=>"कनेक्ट हो रहा है…",YL=((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()}),cRt=e=>`CPU cores: ${e==null?void 0:e.count}`,lRt=e=>`${e==null?void 0:e.count} 个 CPU 核心`,uRt=e=>`${e==null?void 0:e.count} هستهٔ CPU`,_Rt=e=>`أنوية المعالج: ${e==null?void 0:e.count}`,fRt=e=>`Núcleos de CPU: ${e==null?void 0:e.count}`,dRt=e=>`CPU कोर: ${e==null?void 0:e.count}`,hRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lRt(e):t==="fa"?uRt(e):t==="ar"?_Rt(e):t==="es"?fRt(e):t==="hi"?dRt(e):cRt(e)}),pRt=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",mRt=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",gRt=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",vRt=()=>"أنشئ مستودعًا خاصًا وارفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون.",bRt=()=>"Crear un repositorio privado y subir automáticamente las ramas de los experimentos para que las vean tus colaboradores.",yRt=()=>"एक निजी रिपॉज़िटरी बनाएं और सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश करें।",xRt=((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()}),wRt=()=>"the current project",kRt=()=>"当前项目",SRt=()=>"پروژهٔ فعلی",CRt=()=>"المشروع الحالي",ERt=()=>"el proyecto actual",NRt=()=>"मौजूदा प्रोजेक्ट",zRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kRt():t==="fa"?SRt():t==="ar"?CRt():t==="es"?ERt():t==="hi"?NRt():wRt()}),jRt=e=>`${e==null?void 0:e.value} (custom)`,ARt=e=>`${e==null?void 0:e.value}(自定义)`,TRt=e=>`${e==null?void 0:e.value} (سفارشی)`,RRt=e=>`${e==null?void 0:e.value} (مخصص)`,MRt=e=>`${e==null?void 0:e.value} (personalizado)`,ORt=e=>`${e==null?void 0:e.value} (कस्टम)`,DRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ARt(e):t==="fa"?TRt(e):t==="ar"?RRt(e):t==="es"?MRt(e):t==="hi"?ORt(e):jRt(e)}),LRt=()=>"detached",IRt=()=>"分离头指针",$Rt=()=>"جدا از شاخه",BRt=()=>"منفصل",PRt=()=>"desacoplado",FRt=()=>"डिटैच्ड",zS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IRt():t==="fa"?$Rt():t==="ar"?BRt():t==="es"?PRt():t==="hi"?FRt():LRt()}),HRt=()=>"Disconnected",qRt=()=>"已断开连接",URt=()=>"قطع اتصال",GRt=()=>"غير متصل",KRt=()=>"Desconectado",VRt=()=>"डिस्कनेक्ट हो गया",ZL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qRt():t==="fa"?URt():t==="ar"?GRt():t==="es"?KRt():t==="hi"?VRt():HRt()}),WRt=()=>"Environment tab",QRt=()=>"环境标签页",XRt=()=>"زبانهٔ محیط",YRt=()=>"تبويب البيئة",ZRt=()=>"pestaña Entorno",JRt=()=>"एनवायरनमेंट टैब",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=()=>"Free models · No sign-in required",nMt=()=>"免费模型 · 无需登录",rMt=()=>"مدل‌های رایگان · بدون نیاز به ورود",sMt=()=>"نماذج مجانية · لا يلزم تسجيل الدخول",iMt=()=>"Modelos gratuitos · No es necesario iniciar sesión",aMt=()=>"मुफ़्त मॉडल · साइन-इन ज़रूरी नहीं",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=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,lMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,uMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,_Mt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,fMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,dMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,hMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lMt(e):t==="fa"?uMt(e):t==="ar"?_Mt(e):t==="es"?fMt(e):t==="hi"?dMt(e):cMt(e)}),pMt=()=>"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.",mMt=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",gMt=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",vMt=()=>"رفض GitHub رفع التغييرات لأن هذا المستودع مؤرشف وللقراءة فقط. لا يزال المشروع المحلي متاحًا. ألغِ أرشفة المستودع على GitHub، ثم فعّل المزامنة هنا.",bMt=()=>"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í.",yMt=()=>"GitHub ने पुश अस्वीकार कर दिया क्योंकि यह रिपॉज़िटरी आर्काइव और रीड-ओनली है। लोकल प्रोजेक्ट अब भी उपलब्ध है। GitHub पर रिपॉज़िटरी को अनआर्काइव करें, फिर यहाँ सिंकिंग चालू करें।",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=()=>"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.",kMt=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",SMt=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",CMt=()=>"يحتوي GitHub على تغييرات ليست في هذا المشروع المحلي. اسحب أحدث تغييرات GitHub وحُلّ أي تعارضات في Git، ثم أعد محاولة تفعيل المزامنة.",EMt=()=>"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.",NMt=()=>"GitHub में ऐसे बदलाव हैं जो इस लोकल प्रोजेक्ट में नहीं हैं। नवीनतम GitHub बदलाव पुल करें और Git में किसी भी टकराव को सुलझाएं, फिर सिंकिंग फिर से चालू करने की कोशिश करें।",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=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",AMt=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",TMt=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",RMt=()=>"رفض GitHub رفع التغييرات. تأكد من أن حسابك المتصل يملك صلاحية الكتابة على هذا المستودع، ثم حاول مجددًا.",MMt=()=>"GitHub rechazó el push. Asegúrate de que tu cuenta conectada tiene permiso de escritura en este repositorio y vuelve a intentarlo.",OMt=()=>"GitHub ने पुश अस्वीकार कर दिया। सुनिश्चित करें कि आपके कनेक्टेड खाते के पास इस रिपॉज़िटरी में राइट एक्सेस है, फिर फिर से कोशिश करें।",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=>`GPU × ${e==null?void 0:e.count}`,IMt=e=>`${e==null?void 0:e.count} 个 GPU`,$Mt=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,BMt=e=>`معالج رسومات × ${e==null?void 0:e.count}`,PMt=e=>`GPU × ${e==null?void 0:e.count}`,FMt=e=>`GPU × ${e==null?void 0:e.count}`,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=()=>"has changes",UMt=()=>"有更改",GMt=()=>"دارای تغییر",KMt=()=>"به تغييرات",VMt=()=>"con cambios",WMt=()=>"बदलाव हैं",QMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UMt():t==="fa"?GMt():t==="ar"?KMt():t==="es"?VMt():t==="hi"?WMt():qMt()}),XMt=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}.`,YMt=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,ZMt=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,JMt=e=>`هذا الرمز صالح لكنه لا يبيّن ما إن كان قادرًا على إطلاق المهام؛ ورموز OAuth من ${e==null?void 0:e.login} لا تبيّن ذلك أبدًا. قد ينجح الإطلاق رغم ذلك. للتحقق القاطع، احفظ رمزًا بصلاحية الكتابة من ${e==null?void 0:e.url}.`,eOt=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}.`,tOt=e=>`यह टोकन मान्य है पर यह नहीं बताता कि यह Jobs लॉन्च कर सकता है या नहीं; ${e==null?void 0:e.login} से मिले OAuth टोकन कभी नहीं बताते। लॉन्च फिर भी काम कर सकता है। निश्चित जाँच के लिए, ${e==null?void 0:e.url} से एक राइट-स्कोप्ड टोकन सेव करें।`,nOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YMt(e):t==="fa"?ZMt(e):t==="ar"?JMt(e):t==="es"?eOt(e):t==="hi"?tOt(e):XMt(e)}),rOt=()=>"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.",sOt=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",iOt=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",aOt=()=>"هذا الرمز صالح لكنه لا يستطيع إرسال مهام Hugging Face. أنشئ رمزًا بصلاحية كتابة المهام في إعدادات رموز Hugging Face، ثم استبدله هنا.",oOt=()=>"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í.",cOt=()=>"यह टोकन मान्य है, पर Hugging Face Jobs सबमिट नहीं कर सकता। Hugging Face टोकन सेटिंग्स में Jobs राइट अनुमति वाला टोकन बनाएं, फिर इसे यहाँ बदलें।",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=()=>"Install",_Ot=()=>"安装",fOt=()=>"نصب",dOt=()=>"تثبيت",hOt=()=>"Instalar",pOt=()=>"इंस्टॉल करें",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=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.`,vOt=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,bOt=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,yOt=e=>`يضيف ${e==null?void 0:e.command} إلى طرفيتك موجّهًا إلى هذا التطبيق، بحيث تكون واجهة سطر الأوامر والتطبيق دائمًا بالإصدار نفسه.`,xOt=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.`,wOt=e=>`आपके टर्मिनल में ${e==null?void 0:e.command} जोड़ता है, जो इसी ऐप की ओर इशारा करता है, ताकि CLI और ऐप हमेशा एक ही वर्शन के रहें।`,kOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vOt(e):t==="fa"?bOt(e):t==="ar"?yOt(e):t==="es"?xOt(e):t==="hi"?wOt(e):gOt(e)}),SOt=e=>`Install the ${e==null?void 0:e.command} command`,COt=e=>`安装 ${e==null?void 0:e.command} 命令`,EOt=e=>`نصب فرمان ${e==null?void 0:e.command}`,NOt=e=>`تثبيت أمر ${e==null?void 0:e.command}`,zOt=e=>`Instalar el comando ${e==null?void 0:e.command}`,jOt=e=>`${e==null?void 0:e.command} कमांड इंस्टॉल करें`,AOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?COt(e):t==="fa"?EOt(e):t==="ar"?NOt(e):t==="es"?zOt(e):t==="hi"?jOt(e):SOt(e)}),TOt=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",ROt=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",MOt=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",OOt=()=>"ثبّت واجهة GitHub لسطر الأوامر، ثم نفّذ `gh auth login` في طرفيتك.",DOt=()=>"Instala GitHub CLI y ejecuta `gh auth login` en tu terminal.",LOt=()=>"GitHub CLI इंस्टॉल करें, फिर अपने टर्मिनल में `gh auth login` चलाएं।",IOt=((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()}),$Ot=()=>"Install the new release now instead of waiting for the background update.",BOt=()=>"立即安装新版本,无需等待后台更新。",POt=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",FOt=()=>"ثبّت الإصدار الجديد الآن بدلًا من انتظار التحديث في الخلفية.",HOt=()=>"Instala la nueva versión ahora en lugar de esperar a la actualización en segundo plano.",qOt=()=>"बैकग्राउंड अपडेट का इंतज़ार करने की बजाय अभी नया रिलीज़ इंस्टॉल करें।",UOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BOt():t==="fa"?POt():t==="ar"?FOt():t==="es"?HOt():t==="hi"?qOt():$Ot()}),GOt=()=>"Discard your unsaved Kubernetes changes?",KOt=()=>"要放弃未保存的 Kubernetes 更改吗?",VOt=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",WOt=()=>"تجاهل تغييرات Kubernetes غير المحفوظة؟",QOt=()=>"¿Descartar los cambios sin guardar de Kubernetes?",XOt=()=>"आपके सेव न किए गए Kubernetes बदलाव छोड़ें?",YOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KOt():t==="fa"?VOt():t==="ar"?WOt():t==="es"?QOt():t==="hi"?XOt():GOt()}),ZOt=()=>"Key from",JOt=()=>"密钥来自",eDt=()=>"کلید از",tDt=()=>"المفتاح من",nDt=()=>"Clave tomada de la",rDt=()=>"की स्रोत",sDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JOt():t==="fa"?eDt():t==="ar"?tDt():t==="es"?nDt():t==="hi"?rDt():ZOt()}),iDt=()=>"Use current kubectl context",aDt=()=>"使用当前 kubectl 上下文",oDt=()=>"استفاده از کانتکست فعلی kubectl",cDt=()=>"استخدام سياق kubectl الحالي",lDt=()=>"Usar el contexto actual de kubectl",uDt=()=>"मौजूदा kubectl कॉन्टेक्स्ट इस्तेमाल करें",_Dt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aDt():t==="fa"?oDt():t==="ar"?cDt():t==="es"?lDt():t==="hi"?uDt():iDt()}),fDt=e=>`Use current context (${e==null?void 0:e.context})`,dDt=e=>`使用当前上下文(${e==null?void 0:e.context})`,hDt=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,pDt=e=>`استخدام السياق الحالي (${e==null?void 0:e.context})`,mDt=e=>`Usar el contexto actual (${e==null?void 0:e.context})`,gDt=e=>`मौजूदा कॉन्टेक्स्ट इस्तेमाल करें (${e==null?void 0:e.context})`,vDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dDt(e):t==="fa"?hDt(e):t==="ar"?pDt(e):t==="es"?mDt(e):t==="hi"?gDt(e):fDt(e)}),bDt=()=>"Language",yDt=()=>"语言",xDt=()=>"زبان",wDt=()=>"اللغة",kDt=()=>"Idioma",SDt=()=>"भाषा",CDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yDt():t==="fa"?xDt():t==="ar"?wDt():t==="es"?kDt():t==="hi"?SDt():bDt()}),EDt=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,NDt=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,zDt=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,jDt=e=>`نفّذ ${e==null?void 0:e.command} في الطرفية لتسجيل الدخول.`,ADt=e=>`Ejecuta ${e==null?void 0:e.command} en una terminal para iniciar sesión.`,TDt=e=>`साइन इन करने के लिए टर्मिनल में ${e==null?void 0:e.command} चलाएं।`,RDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?NDt(e):t==="fa"?zDt(e):t==="ar"?jDt(e):t==="es"?ADt(e):t==="hi"?TDt(e):EDt(e)}),MDt=()=>"Make default",ODt=()=>"设为默认值",DDt=()=>"پیش‌فرض شود",LDt=()=>"جعله افتراضيًا",IDt=()=>"Establecer como predeterminado",$Dt=()=>"डिफ़ॉल्ट बनाएं",BDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ODt():t==="fa"?DDt():t==="ar"?LDt():t==="es"?IDt():t==="hi"?$Dt():MDt()}),PDt=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",FDt=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",HDt=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",qDt=()=>"بيانات اعتماد Modal مضبوطة في بيئة العملية. أزِل تلك التجاوزات قبل استبدال الرمز هنا.",UDt=()=>"Las credenciales de Modal están definidas en el entorno del proceso. Elimínalas antes de reemplazar el token aquí.",GDt=()=>"Modal क्रेडेंशियल प्रोसेस एनवायरनमेंट में सेट हैं। यहाँ सेव टोकन बदलने से पहले उन ओवरराइड को हटाएं।",KDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FDt():t==="fa"?HDt():t==="ar"?qDt():t==="es"?UDt():t==="hi"?GDt():PDt()}),VDt=()=>"Replace token ID",WDt=()=>"替换令牌 ID",QDt=()=>"جایگزینی شناسهٔ توکن",XDt=()=>"استبدال معرّف الرمز",YDt=()=>"Reemplazar ID del token",ZDt=()=>"टोकन ID बदलें",JDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WDt():t==="fa"?QDt():t==="ar"?XDt():t==="es"?YDt():t==="hi"?ZDt():VDt()}),eLt=()=>"Replace token secret",tLt=()=>"替换令牌密钥",nLt=()=>"جایگزینی رمز توکن",rLt=()=>"استبدال سرّ الرمز",sLt=()=>"Reemplazar secreto del token",iLt=()=>"टोकन सीक्रेट बदलें",aLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tLt():t==="fa"?nLt():t==="ar"?rLt():t==="es"?sLt():t==="hi"?iLt():eLt()}),oLt=()=>"How to get a Modal token",cLt=()=>"如何获取 Modal 令牌",lLt=()=>"روش دریافت توکن Modal",uLt=()=>"كيفية الحصول على رمز Modal",_Lt=()=>"Cómo obtener un token de Modal",fLt=()=>"Modal टोकन कैसे लें",dLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cLt():t==="fa"?lLt():t==="ar"?uLt():t==="es"?_Lt():t==="hi"?fLt():oLt()}),hLt=()=>"Token ID",pLt=()=>"令牌 ID",mLt=()=>"شناسهٔ توکن",gLt=()=>"معرّف الرمز",vLt=()=>"ID del token",bLt=()=>"टोकन ID",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=()=>"Token secret",wLt=()=>"令牌密钥",kLt=()=>"رمز توکن",SLt=()=>"سرّ الرمز",CLt=()=>"Secreto del token",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=e=>`${e==null?void 0:e.count} models available — ${e==null?void 0:e.models}`,jLt=e=>`${e==null?void 0:e.count} 个模型可用 — ${e==null?void 0:e.models}`,ALt=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,TLt=e=>`النماذج المتاحة: ${e==null?void 0:e.count} — ${e==null?void 0:e.models}`,RLt=e=>`Modelos disponibles (${e==null?void 0:e.count}): ${e==null?void 0:e.models}`,MLt=e=>`${e==null?void 0:e.count} मॉडल उपलब्ध — ${e==null?void 0:e.models}`,OLt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jLt(e):t==="fa"?ALt(e):t==="ar"?TLt(e):t==="es"?RLt(e):t==="hi"?MLt(e):zLt(e)}),DLt=e=>`Needs ${e==null?void 0:e.tool}`,LLt=e=>`需要 ${e==null?void 0:e.tool}`,ILt=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,$Lt=e=>`يحتاج إلى ${e==null?void 0:e.tool}`,BLt=e=>`Requiere ${e==null?void 0:e.tool}`,PLt=e=>`${e==null?void 0:e.tool} की ज़रूरत है`,FLt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LLt(e):t==="fa"?ILt(e):t==="ar"?$Lt(e):t==="es"?BLt(e):t==="hi"?PLt(e):DLt(e)}),HLt=()=>"Needs tools",qLt=()=>"缺少工具",ULt=()=>"به ابزارها نیاز دارد",GLt=()=>"يحتاج إلى أدوات",KLt=()=>"Requiere herramientas",VLt=()=>"टूल की ज़रूरत है",WLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qLt():t==="fa"?ULt():t==="ar"?GLt():t==="es"?KLt():t==="hi"?VLt():HLt()}),QLt=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,XLt=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,YLt=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,ZLt=e=>`تستخدم عمليات التشغيل الجديدة ${e==null?void 0:e.destination} ما لم تُحدَّد بيئة تنفيذ أخرى.`,JLt=e=>`Las nuevas ejecuciones usan ${e==null?void 0:e.destination}, salvo que se indique otro backend.`,eIt=e=>`जब तक कोई और बैकएंड न बताया जाए, नए रन ${e==null?void 0:e.destination} इस्तेमाल करते हैं।`,tIt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XLt(e):t==="fa"?YLt(e):t==="ar"?ZLt(e):t==="es"?JLt(e):t==="hi"?eIt(e):QLt(e)}),nIt=()=>"New runs use SSH; choose a host when launching.",rIt=()=>"新运行将使用 SSH;启动时请选择主机。",sIt=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",iIt=()=>"تستخدم عمليات التشغيل الجديدة SSH؛ اختر مضيفًا عند الإطلاق.",aIt=()=>"Las nuevas ejecuciones usan SSH; elige un host al lanzarlas.",oIt=()=>"नए रन SSH इस्तेमाल करते हैं; लॉन्च करते समय एक होस्ट चुनें।",cIt=((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()}),lIt=()=>"New token",uIt=()=>"新令牌",_It=()=>"توکن جدید",fIt=()=>"رمز جديد",dIt=()=>"Nuevo token",hIt=()=>"नया टोकन",pIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uIt():t==="fa"?_It():t==="ar"?fIt():t==="es"?dIt():t==="hi"?hIt():lIt()}),mIt=()=>"No default flavor",gIt=()=>"不设默认配置",vIt=()=>"بدون پیکربندی پیش‌فرض",bIt=()=>"لا يوجد تكوين افتراضي للموارد",yIt=()=>"Sin opción predeterminada",xIt=()=>"कोई डिफ़ॉल्ट फ़्लेवर नहीं",wIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gIt():t==="fa"?vIt():t==="ar"?bIt():t==="es"?yIt():t==="hi"?xIt():mIt()}),kIt=()=>"none",SIt=()=>"无",CIt=()=>"هیچ‌کدام",EIt=()=>"لا شيء",NIt=()=>"ninguno",zIt=()=>"कोई नहीं",jS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SIt():t==="fa"?CIt():t==="ar"?EIt():t==="es"?NIt():t==="hi"?zIt():kIt()}),jIt=()=>"Not connected",AIt=()=>"未连接",TIt=()=>"متصل نیست",RIt=()=>"غير متصل",MIt=()=>"No conectado",OIt=()=>"कनेक्टेड नहीं",JL=((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()}),DIt=()=>"not found on PATH",LIt=()=>"在 PATH 中未找到",IIt=()=>"در PATH پیدا نشد",$It=()=>"غير موجود في PATH",BIt=()=>"no se encontró en el PATH",PIt=()=>"PATH पर नहीं मिला",FIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LIt():t==="fa"?IIt():t==="ar"?$It():t==="es"?BIt():t==="hi"?PIt():DIt()}),HIt=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,qIt=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,UIt=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,GIt=e=>`${e==null?void 0:e.context} (ليس في kubeconfig)`,KIt=e=>`${e==null?void 0:e.context} (no está en kubeconfig)`,VIt=e=>`${e==null?void 0:e.context} (kubeconfig में नहीं)`,WIt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qIt(e):t==="fa"?UIt(e):t==="ar"?GIt(e):t==="es"?KIt(e):t==="hi"?VIt(e):HIt(e)}),QIt=()=>"not initialized",XIt=()=>"尚未初始化",YIt=()=>"راه‌اندازی نشده",ZIt=()=>"غير مهيّأ",JIt=()=>"sin inicializar",e$t=()=>"शुरू नहीं किया गया",t$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XIt():t==="fa"?YIt():t==="ar"?ZIt():t==="es"?JIt():t==="hi"?e$t():QIt()}),n$t=()=>"Not set",r$t=()=>"未设置",s$t=()=>"تنظیم نشده",i$t=()=>"غير مضبوط",a$t=()=>"Sin definir",o$t=()=>"सेट नहीं",P3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r$t():t==="fa"?s$t():t==="ar"?i$t():t==="es"?a$t():t==="hi"?o$t():n$t()}),c$t=()=>"OAuth (subscription login)",l$t=()=>"OAuth(订阅登录)",u$t=()=>"OAuth (ورود با اشتراک)",_$t=()=>"OAuth (تسجيل دخول الاشتراك)",f$t=()=>"OAuth (inicio de sesión con suscripción)",d$t=()=>"OAuth (सब्सक्रिप्शन लॉगिन)",h$t=((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()}),p$t=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.`,m$t=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,g$t=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,v$t=e=>`تُركت النسخة القديمة في ${e==null?void 0:e.path} على قرص مختلف. يمكنك حذفها بعد التأكد من أن كل شيء يعمل.`,b$t=e=>`La copia anterior se dejó en ${e==null?void 0:e.path}, en otro disco. Puedes eliminarla cuando confirmes que todo funciona.`,y$t=e=>`पुरानी कॉपी एक अलग डिस्क पर ${e==null?void 0:e.path} पर छोड़ दी गई थी। सब कुछ ठीक होने की पुष्टि के बाद आप इसे हटा सकते हैं।`,x$t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?m$t(e):t==="fa"?g$t(e):t==="ar"?v$t(e):t==="es"?b$t(e):t==="hi"?y$t(e):p$t(e)}),w$t=()=>"Setting up…",k$t=()=>"正在设置…",S$t=()=>"در حال راه‌اندازی…",C$t=()=>"جارٍ الإعداد…",E$t=()=>"Configurando…",N$t=()=>"सेट अप हो रहा है…",z$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k$t():t==="fa"?S$t():t==="ar"?C$t():t==="es"?E$t():t==="hi"?N$t():w$t()}),j$t=()=>"Account",A$t=()=>"账户",T$t=()=>"حساب",R$t=()=>"الحساب",M$t=()=>"Cuenta",O$t=()=>"खाता",AS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A$t():t==="fa"?T$t():t==="ar"?R$t():t==="es"?M$t():t==="hi"?O$t():j$t()}),D$t=()=>"Add one with",L$t=()=>"使用以下命令添加:",I$t=()=>"یکی با این فرمان اضافه کنید:",$$t=()=>"أضِف واحدًا عبر",B$t=()=>"Añade una con",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=()=>"Add variable",q$t=()=>"添加变量",U$t=()=>"افزودن متغیر",G$t=()=>"إضافة متغيّر",K$t=()=>"Añadir variable",V$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"?K$t():t==="hi"?V$t():H$t()}),Q$t=()=>"Agent models",X$t=()=>"智能体模型",Y$t=()=>"مدل‌های عامل",Z$t=()=>"نماذج الوكيل",J$t=()=>"Modelos de los agentes",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=()=>"Anonymous usage analytics",rBt=()=>"匿名使用情况分析",sBt=()=>"تحلیل ناشناس استفاده",iBt=()=>"تحليلات استخدام مجهولة الهوية",aBt=()=>"Estadísticas de uso anónimas",oBt=()=>"अनाम उपयोग एनालिटिक्स",aj=((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=()=>"Auth",lBt=()=>"身份验证",uBt=()=>"احراز هویت",_Bt=()=>"المصادقة",fBt=()=>"Autenticación",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=()=>"Authentication",mBt=()=>"身份验证",gBt=()=>"احراز هویت",vBt=()=>"المصادقة",bBt=()=>"Autenticación",yBt=()=>"प्रमाणीकरण",eI=((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()}),xBt=()=>"Back to Compute",wBt=()=>"返回算力设置",kBt=()=>"بازگشت به رایانش",SBt=()=>"العودة إلى الحوسبة",CBt=()=>"Volver a Cómputo",EBt=()=>"कंप्यूट पर वापस जाएं",tI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wBt():t==="fa"?kBt():t==="ar"?SBt():t==="es"?CBt():t==="hi"?EBt():xBt()}),NBt=()=>"Backend",zBt=()=>"后端",jBt=()=>"بک‌اند",ABt=()=>"بيئة التنفيذ",TBt=()=>"Backend",RBt=()=>"बैकएंड",MBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zBt():t==="fa"?jBt():t==="ar"?ABt():t==="es"?TBt():t==="hi"?RBt():NBt()}),OBt=()=>"Baseline",DBt=()=>"基线",LBt=()=>"خط مبنا",IBt=()=>"الأساس المرجعي",$Bt=()=>"Rama base",BBt=()=>"बेसलाइन",PBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DBt():t==="fa"?LBt():t==="ar"?IBt():t==="es"?$Bt():t==="hi"?BBt():OBt()}),FBt=()=>"Binary",HBt=()=>"可执行文件",qBt=()=>"فایل اجرایی",UBt=()=>"الملف التنفيذي",GBt=()=>"Binario",KBt=()=>"बाइनरी",VBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HBt():t==="fa"?qBt():t==="ar"?UBt():t==="es"?GBt():t==="hi"?KBt():FBt()}),WBt=()=>"Cancel",QBt=()=>"取消",XBt=()=>"لغو",YBt=()=>"إلغاء",ZBt=()=>"Cancelar",JBt=()=>"रद्द करें",ff=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QBt():t==="fa"?XBt():t==="ar"?YBt():t==="es"?ZBt():t==="hi"?JBt():WBt()}),ePt=()=>"Cancel new variable",tPt=()=>"取消新变量",nPt=()=>"لغو متغیر جدید",rPt=()=>"إلغاء المتغيّر الجديد",sPt=()=>"Cancelar nueva variable",iPt=()=>"नया वेरिएबल रद्द करें",aPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tPt():t==="fa"?nPt():t==="ar"?rPt():t==="es"?sPt():t==="hi"?iPt():ePt()}),oPt=()=>"Checking compute targets…",cPt=()=>"正在检查算力目标…",lPt=()=>"در حال بررسی مقصدهای رایانشی…",uPt=()=>"جارٍ التحقق من أهداف الحوسبة…",_Pt=()=>"Comprobando destinos de cómputo…",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=()=>"Checking kubectl…",pPt=()=>"正在检查 kubectl…",mPt=()=>"در حال بررسی kubectl…",gPt=()=>"جارٍ التحقق من kubectl…",vPt=()=>"Comprobando kubectl…",bPt=()=>"kubectl जाँचा जा रहा है…",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=()=>"Checking Modal…",wPt=()=>"正在检查 Modal…",kPt=()=>"در حال بررسی Modal…",SPt=()=>"جارٍ التحقق من Modal…",CPt=()=>"Comprobando Modal…",EPt=()=>"Modal जाँचा जा रहा है…",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=()=>"Choose a preset flavor",jPt=()=>"选择预设规格",APt=()=>"یک پیکربندی آماده انتخاب کنید",TPt=()=>"اختر تكوينًا محددًا مسبقًا للموارد",RPt=()=>"Elige una opción predefinida",MPt=()=>"एक प्रीसेट फ़्लेवर चुनें",oj=((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=()=>"cluster default",DPt=()=>"集群默认值",LPt=()=>"پیش‌فرض خوشه",IPt=()=>"افتراضي العنقود",$Pt=()=>"valor predeterminado del clúster",BPt=()=>"क्लस्टर डिफ़ॉल्ट",cj=((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=()=>"cluster default (e.g. 4h, 30m)",FPt=()=>"集群默认值(例如 4h、30m)",HPt=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",qPt=()=>"افتراضي العنقود (مثل 4h أو 30m)",UPt=()=>"valor predeterminado del clúster (p. ej., 4h, 30m)",GPt=()=>"क्लस्टर डिफ़ॉल्ट (जैसे 4h, 30m)",KPt=((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=()=>"Cluster unreachable",WPt=()=>"无法连接集群",QPt=()=>"خوشه در دسترس نیست",XPt=()=>"تعذّر الوصول إلى العنقود",YPt=()=>"Clúster inaccesible",ZPt=()=>"क्लस्टर तक नहीं पहुँचा जा सका",JPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WPt():t==="fa"?QPt():t==="ar"?XPt():t==="es"?YPt():t==="hi"?ZPt():VPt()}),eFt=()=>"Compute",tFt=()=>"算力",nFt=()=>"رایانش",rFt=()=>"الحوسبة",sFt=()=>"Cómputo",iFt=()=>"कंप्यूट",nI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tFt():t==="fa"?nFt():t==="ar"?rFt():t==="es"?sFt():t==="hi"?iFt():eFt()}),aFt=()=>"Connect compute backends and choose where new runs execute.",oFt=()=>"连接算力后端,并选择新运行的执行位置。",cFt=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",lFt=()=>"اربط بيئات التنفيذ واختر أين تُنفَّذ عمليات التشغيل الجديدة.",uFt=()=>"Conecta backends de cómputo y elige dónde se lanzan las nuevas ejecuciones.",_Ft=()=>"कंप्यूट बैकएंड कनेक्ट करें और चुनें कि नए रन कहाँ चलेंगे।",fFt=((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()}),dFt=()=>"Connected",hFt=()=>"已连接",pFt=()=>"متصل",mFt=()=>"متصل",gFt=()=>"Conectado",vFt=()=>"कनेक्टेड",bFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hFt():t==="fa"?pFt():t==="ar"?mFt():t==="es"?gFt():t==="hi"?vFt():dFt()}),yFt=()=>"Context",xFt=()=>"上下文",wFt=()=>"زمینه",kFt=()=>"السياق",SFt=()=>"Contexto",CFt=()=>"कॉन्टेक्स्ट",EFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xFt():t==="fa"?wFt():t==="ar"?kFt():t==="es"?SFt():t==="hi"?CFt():yFt()}),NFt=()=>"Current",zFt=()=>"当前",jFt=()=>"فعلی",AFt=()=>"الحالي",TFt=()=>"Actual",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=()=>"Currently off:",DFt=()=>"当前已关闭:",LFt=()=>"اکنون خاموش است:",IFt=()=>"معطّل حاليًا:",$Ft=()=>"Desactivado actualmente:",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=()=>"Custom flavor",HFt=()=>"自定义规格",qFt=()=>"پیکربندی سفارشی",UFt=()=>"تكوين موارد مخصّص",GFt=()=>"Opción personalizada",KFt=()=>"कस्टम फ़्लेवर",VFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HFt():t==="fa"?qFt():t==="ar"?UFt():t==="es"?GFt():t==="hi"?KFt():FFt()}),WFt=()=>"Custom flavor…",QFt=()=>"自定义规格…",XFt=()=>"پیکربندی سفارشی…",YFt=()=>"تكوين موارد مخصّص…",ZFt=()=>"Opción personalizada…",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=()=>"Data directory",nHt=()=>"数据目录",rHt=()=>"پوشهٔ داده",sHt=()=>"دليل البيانات",iHt=()=>"Directorio de datos",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=()=>"default",lHt=()=>"默认",uHt=()=>"پیش‌فرض",_Ht=()=>"افتراضي",fHt=()=>"predeterminado",dHt=()=>"डिफ़ॉल्ट",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=()=>"Default",mHt=()=>"默认",gHt=()=>"پیش‌فرض",vHt=()=>"الافتراضي",bHt=()=>"Predeterminado",yHt=()=>"डिफ़ॉल्ट",rI=((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()}),xHt=()=>"Default destination",wHt=()=>"默认目标",kHt=()=>"مقصد پیش‌فرض",SHt=()=>"الوجهة الافتراضية",CHt=()=>"Destino predeterminado",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=()=>"Detecting hardware…",jHt=()=>"正在检测硬件…",AHt=()=>"در حال شناسایی سخت‌افزار…",THt=()=>"جارٍ اكتشاف العتاد…",RHt=()=>"Detectando hardware…",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=()=>"Detecting harnesses…",LHt=()=>"正在检测智能体工具…",IHt=()=>"در حال شناسایی ابزارهای عامل…",$Ht=()=>"جارٍ اكتشاف أدوات البرمجة…",BHt=()=>"Detectando agentes…",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=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",qHt=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",UHt=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",GHt=()=>"يوقف تعطيل المزامنة عمليات الرفع التلقائية. تواصل الحوسبة استخدام لقطات المصدر المباشرة. لا يحذف هذا مستودع GitHub أو الشيفرة التي رُفعت إليه مسبقًا.",KHt=()=>"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ó.",VHt=()=>"सिंकिंग बंद करने से ऑटोमैटिक पुश रुक जाते हैं। कंप्यूट सीधे सोर्स स्नैपशॉट का इस्तेमाल करता रहेगा। इससे GitHub रिपॉज़िटरी या पहले से पुश किया गया कोड नहीं मिटता।",WHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qHt():t==="fa"?UHt():t==="ar"?GHt():t==="es"?KHt():t==="hi"?VHt():HHt()}),QHt=()=>"Effective URL",XHt=()=>"实际使用的网址",YHt=()=>"نشانی مؤثر",ZHt=()=>"الرابط الفعّال",JHt=()=>"URL efectiva",eqt=()=>"प्रभावी URL",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=()=>"Enable GitHub syncing for new projects",rqt=()=>"为新项目启用 GitHub 同步",sqt=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",iqt=()=>"تفعيل مزامنة GitHub للمشاريع الجديدة",aqt=()=>"Activar la sincronización con GitHub en proyectos nuevos",oqt=()=>"नए प्रोजेक्ट के लिए GitHub सिंकिंग चालू करें",lj=((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()}),cqt=()=>"Environment",lqt=()=>"环境",uqt=()=>"محیط",_qt=()=>"البيئة",fqt=()=>"Entorno",dqt=()=>"एनवायरनमेंट",sI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lqt():t==="fa"?uqt():t==="ar"?_qt():t==="es"?fqt():t==="hi"?dqt():cqt()}),hqt=()=>"Failed",pqt=()=>"失败",mqt=()=>"ناموفق",gqt=()=>"فشل",vqt=()=>"Error",bqt=()=>"विफल",TS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pqt():t==="fa"?mqt():t==="ar"?gqt():t==="es"?vqt():t==="hi"?bqt():hqt()}),yqt=()=>"General",xqt=()=>"常规",wqt=()=>"عمومی",kqt=()=>"عام",Sqt=()=>"General",Cqt=()=>"सामान्य",Eqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xqt():t==="fa"?wqt():t==="ar"?kqt():t==="es"?Sqt():t==="hi"?Cqt():yqt()}),Nqt=()=>"GitHub publishing",zqt=()=>"GitHub 发布",jqt=()=>"انتشار در GitHub",Aqt=()=>"النشر على GitHub",Tqt=()=>"Publicación en GitHub",Rqt=()=>"GitHub प्रकाशन",Mqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zqt():t==="fa"?jqt():t==="ar"?Aqt():t==="es"?Tqt():t==="hi"?Rqt():Nqt()}),Oqt=()=>"Git token",Dqt=()=>"Git 令牌",Lqt=()=>"توکن Git",Iqt=()=>"رمز Git",$qt=()=>"Token de Git",Bqt=()=>"Git टोकन",Pqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dqt():t==="fa"?Lqt():t==="ar"?Iqt():t==="es"?$qt():t==="hi"?Bqt():Oqt()}),Fqt=()=>"Harnesses",Hqt=()=>"智能体工具",qqt=()=>"ابزارهای عامل",Uqt=()=>"أدوات البرمجة",Gqt=()=>"Agentes",Kqt=()=>"हार्नेस",F3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hqt():t==="fa"?qqt():t==="ar"?Uqt():t==="es"?Gqt():t==="hi"?Kqt():Fqt()}),Vqt=()=>"hf_…",Wqt=()=>"hf_…",Qqt=()=>"hf_…",Xqt=()=>"hf_…",Yqt=()=>"hf_…",Zqt=()=>"hf_…",Jqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wqt():t==="fa"?Qqt():t==="ar"?Xqt():t==="es"?Yqt():t==="hi"?Zqt():Vqt()}),eUt=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",tUt=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",nUt=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",rUt=()=>"‏HF_TOKEN مضبوط في البيئة ويتجاوز أي رمز محفوظ هنا.",sUt=()=>"HF_TOKEN está definido en el entorno y tiene prioridad sobre cualquier token guardado aquí.",iUt=()=>"HF_TOKEN एनवायरनमेंट में सेट है और यहाँ सेव किसी भी टोकन को ओवरराइड करता है।",aUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tUt():t==="fa"?nUt():t==="ar"?rUt():t==="es"?sUt():t==="hi"?iUt():eUt()}),oUt=()=>"Initialize Git",cUt=()=>"初始化 Git",lUt=()=>"راه‌اندازی Git",uUt=()=>"تهيئة Git",_Ut=()=>"Inicializar Git",fUt=()=>"Git शुरू करें",dUt=((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()}),hUt=()=>"Install",pUt=()=>"安装",mUt=()=>"نصب",gUt=()=>"تثبيت",vUt=()=>"Instalar",bUt=()=>"इंस्टॉल करें",iI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pUt():t==="fa"?mUt():t==="ar"?gUt():t==="es"?vUt():t==="hi"?bUt():hUt()}),yUt=()=>"Install broken",xUt=()=>"安装损坏",wUt=()=>"نصب خراب است",kUt=()=>"التثبيت معطوب",SUt=()=>"Instalación dañada",CUt=()=>"इंस्टॉल खराब है",EUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xUt():t==="fa"?wUt():t==="ar"?kUt():t==="es"?SUt():t==="hi"?CUt():yUt()}),NUt=()=>"Install GitHub CLI",zUt=()=>"安装 GitHub CLI",jUt=()=>"نصب GitHub CLI",AUt=()=>"تثبيت واجهة GitHub لسطر الأوامر",TUt=()=>"Instalar GitHub CLI",RUt=()=>"GitHub CLI इंस्टॉल करें",MUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zUt():t==="fa"?jUt():t==="ar"?AUt():t==="es"?TUt():t==="hi"?RUt():NUt()}),OUt=()=>"Install updates automatically",DUt=()=>"自动安装更新",LUt=()=>"نصب خودکار به‌روزرسانی‌ها",IUt=()=>"تثبيت التحديثات تلقائيًا",$Ut=()=>"Instalar actualizaciones automáticamente",BUt=()=>"अपडेट अपने आप इंस्टॉल करें",uj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DUt():t==="fa"?LUt():t==="ar"?IUt():t==="es"?$Ut():t==="hi"?BUt():OUt()}),PUt=()=>"Instance history",FUt=()=>"实例历史",HUt=()=>"تاریخچهٔ نمونه‌ها",qUt=()=>"سجل المثيلات",UUt=()=>"Historial de instancias",GUt=()=>"इंस्टेंस इतिहास",KUt=((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()}),VUt=()=>"Invalid Token",WUt=()=>"令牌无效",QUt=()=>"توکن نامعتبر",XUt=()=>"رمز غير صالح",YUt=()=>"Token no válido",ZUt=()=>"अमान्य टोकन",JUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WUt():t==="fa"?QUt():t==="ar"?XUt():t==="es"?YUt():t==="hi"?ZUt():VUt()}),eGt=()=>"Jobs / Dashboard URL",tGt=()=>"Jobs / 控制台网址",nGt=()=>"نشانی Jobs / داشبورد",rGt=()=>"رابط المهام / لوحة التحكم",sGt=()=>"URL de jobs / dashboard",iGt=()=>"Jobs / डैशबोर्ड URL",aGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tGt():t==="fa"?nGt():t==="ar"?rGt():t==="es"?sGt():t==="hi"?iGt():eGt()}),oGt=()=>"kubectl not found",cGt=()=>"未找到 kubectl",lGt=()=>"kubectl پیدا نشد",uGt=()=>"لم يُعثر على kubectl",_Gt=()=>"No se encontró kubectl",fGt=()=>"kubectl नहीं मिला",dGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cGt():t==="fa"?lGt():t==="ar"?uGt():t==="es"?_Gt():t==="hi"?fGt():oGt()}),hGt=()=>"Latest",pGt=()=>"最新版本",mGt=()=>"جدیدترین",gGt=()=>"الأحدث",vGt=()=>"Última",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=()=>"Loading…",wGt=()=>"正在加载…",kGt=()=>"در حال بارگیری…",SGt=()=>"جارٍ التحميل…",CGt=()=>"Cargando…",EGt=()=>"लोड हो रहा है…",Wu=((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()}),NGt=()=>"Loading Ray settings…",zGt=()=>"正在加载 Ray 设置…",jGt=()=>"در حال بارگیری تنظیمات Ray…",AGt=()=>"جارٍ تحميل إعدادات Ray…",TGt=()=>"Cargando configuración de Ray…",RGt=()=>"Ray सेटिंग्स लोड हो रही हैं…",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=()=>"Loading slurm settings…",DGt=()=>"正在加载 Slurm 设置…",LGt=()=>"در حال بارگیری تنظیمات Slurm…",IGt=()=>"جارٍ تحميل إعدادات slurm…",$Gt=()=>"Cargando configuración de Slurm…",BGt=()=>"Slurm सेटिंग्स लोड हो रही हैं…",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=()=>"Loading status…",HGt=()=>"正在加载状态…",qGt=()=>"در حال بارگیری وضعیت…",UGt=()=>"جارٍ تحميل الحالة…",GGt=()=>"Cargando estado…",KGt=()=>"स्थिति लोड हो रही है…",VGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HGt():t==="fa"?qGt():t==="ar"?UGt():t==="es"?GGt():t==="hi"?KGt():FGt()}),WGt=()=>"Local only",QGt=()=>"仅本地",XGt=()=>"فقط محلی",YGt=()=>"محلي فقط",ZGt=()=>"Solo local",JGt=()=>"केवल लोकल",eKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QGt():t==="fa"?XGt():t==="ar"?YGt():t==="es"?ZGt():t==="hi"?JGt():WGt()}),tKt=()=>"Local repository",nKt=()=>"本地仓库",rKt=()=>"مخزن محلی",sKt=()=>"مستودع محلي",iKt=()=>"Repositorio local",aKt=()=>"लोकल रिपॉज़िटरी",oKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nKt():t==="fa"?rKt():t==="ar"?sKt():t==="es"?iKt():t==="hi"?aKt():tKt()}),cKt=()=>"Login node",lKt=()=>"登录节点",uKt=()=>"گرهٔ ورود",_Kt=()=>"عقدة الدخول",fKt=()=>"Nodo de acceso",dKt=()=>"लॉगिन नोड",hKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lKt():t==="fa"?uKt():t==="ar"?_Kt():t==="es"?fKt():t==="hi"?dKt():cKt()}),pKt=()=>"Make GitHub syncing the default?",mKt=()=>"将 GitHub 同步设为默认值?",gKt=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",vKt=()=>"جعل مزامنة GitHub افتراضية؟",bKt=()=>"¿Activar la sincronización con GitHub de forma predeterminada?",yKt=()=>"GitHub सिंकिंग को डिफ़ॉल्ट बनाएं?",xKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mKt():t==="fa"?gKt():t==="ar"?vKt():t==="es"?bKt():t==="hi"?yKt():pKt()}),wKt=()=>"Missing bash/tar",kKt=()=>"缺少 bash/tar",SKt=()=>"bash/tar موجود نیست",CKt=()=>"‏bash/tar مفقودان",EKt=()=>"Falta bash/tar",NKt=()=>"bash/tar गुम है",zKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kKt():t==="fa"?SKt():t==="ar"?CKt():t==="es"?EKt():t==="hi"?NKt():wKt()}),jKt=()=>"More compute options",AKt=()=>"更多算力选项",TKt=()=>"گزینه‌های رایانشی بیشتر",RKt=()=>"خيارات حوسبة إضافية",MKt=()=>"Más opciones de cómputo",OKt=()=>"और कंप्यूट विकल्प",DKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AKt():t==="fa"?TKt():t==="ar"?RKt():t==="es"?MKt():t==="hi"?OKt():jKt()}),LKt=()=>"Move failed:",IKt=()=>"移动失败:",$Kt=()=>"انتقال ناموفق بود:",BKt=()=>"فشل النقل:",PKt=()=>"Error al mover:",FKt=()=>"स्थानांतरण विफल:",HKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IKt():t==="fa"?$Kt():t==="ar"?BKt():t==="es"?PKt():t==="hi"?FKt():LKt()}),qKt=()=>"Moved. orx is now using the new location.",UKt=()=>"已移动。orx 现在使用新位置。",GKt=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",KKt=()=>"تم النقل. يستخدم orx الآن الموقع الجديد.",VKt=()=>"Movido. orx ya usa la nueva ubicación.",WKt=()=>"स्थानांतरित हो गया। orx अब नए स्थान का उपयोग कर रहा है।",QKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UKt():t==="fa"?GKt():t==="ar"?KKt():t==="es"?VKt():t==="hi"?WKt():qKt()}),XKt=()=>"Namespace",YKt=()=>"命名空间",ZKt=()=>"فضای نام",JKt=()=>"مساحة الأسماء",eVt=()=>"Namespace",tVt=()=>"नेमस्पेस",nVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YKt():t==="fa"?ZKt():t==="ar"?JKt():t==="es"?eVt():t==="hi"?tVt():XKt()}),rVt=()=>"New location",sVt=()=>"新位置",iVt=()=>"محل جدید",aVt=()=>"الموقع الجديد",oVt=()=>"Nueva ubicación",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=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",_Vt=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",fVt=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",dVt=()=>"تُنزَّل الإصدارات الجديدة وتُثبَّت في الخلفية. إيقاف هذا يبقي الإشعار لكنه يترك التثبيت لك.",hVt=()=>"Las nuevas versiones se descargan e instalan en segundo plano. Si lo desactivas, verás el aviso, pero tendrás que instalarlas tú.",pVt=()=>"नए रिलीज़ बैकग्राउंड में डाउनलोड और इंस्टॉल होते हैं। इसे बंद करने पर सूचना बनी रहेगी, पर इंस्टॉल करना आप पर निर्भर होगा।",mVt=((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()}),gVt=()=>"New variable key",vVt=()=>"新变量键名",bVt=()=>"کلید متغیر جدید",yVt=()=>"مفتاح المتغيّر الجديد",xVt=()=>"Nombre de la nueva variable",wVt=()=>"नई वेरिएबल की",kVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vVt():t==="fa"?bVt():t==="ar"?yVt():t==="es"?xVt():t==="hi"?wVt():gVt()}),SVt=()=>"New variable value",CVt=()=>"新变量值",EVt=()=>"مقدار متغیر جدید",NVt=()=>"قيمة المتغيّر الجديد",zVt=()=>"Valor de la nueva variable",jVt=()=>"नई वेरिएबल वैल्यू",AVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CVt():t==="fa"?EVt():t==="ar"?NVt():t==="es"?zVt():t==="hi"?jVt():SVt()}),TVt=()=>"No code, prompts, file contents, or account identifiers are sent.",RVt=()=>"不会发送代码、提示词、文件内容或账户标识符。",MVt=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",OVt=()=>"لا تُرسَل أي شيفرة أو طلبات أو محتويات ملفات أو معرّفات حسابات.",DVt=()=>"No se envía código, prompts, contenido de archivos ni identificadores de cuenta.",LVt=()=>"कोई कोड, प्रॉम्प्ट, फ़ाइल सामग्री, या खाता पहचानकर्ता नहीं भेजे जाते।",IVt=((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()}),$Vt=()=>"No hosts found in ~/.ssh/config.",BVt=()=>"在 ~/.ssh/config 中未找到主机。",PVt=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",FVt=()=>"لم يُعثر على مضيفين في ‎~/.ssh/config.",HVt=()=>"No se encontraron hosts en ~/.ssh/config.",qVt=()=>"~/.ssh/config में कोई होस्ट नहीं मिला।",UVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BVt():t==="fa"?PVt():t==="ar"?FVt():t==="es"?HVt():t==="hi"?qVt():$Vt()}),GVt=()=>"No job-create permission",KVt=()=>"没有创建 Job 的权限",VVt=()=>"مجوز ساخت Job وجود ندارد",WVt=()=>"لا صلاحية لإنشاء المهام",QVt=()=>"Sin permiso para crear jobs",XVt=()=>"जॉब बनाने की अनुमति नहीं",YVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KVt():t==="fa"?VVt():t==="ar"?WVt():t==="es"?QVt():t==="hi"?XVt():GVt()}),ZVt=()=>"No Write Permissions",JVt=()=>"无写入权限",eWt=()=>"بدون مجوز نوشتن",tWt=()=>"لا صلاحيات كتابة",nWt=()=>"Sin permisos de escritura",rWt=()=>"लिखने की अनुमति नहीं",sWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JVt():t==="fa"?eWt():t==="ar"?tWt():t==="es"?nWt():t==="hi"?rWt():ZVt()}),iWt=()=>"No key on this computer to register — load a registered key with",aWt=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",oWt=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",cWt=()=>"لا مفتاح على هذا الحاسوب لتسجيله — حمّل مفتاحًا مسجّلًا عبر",lWt=()=>"No hay ninguna clave en este equipo para registrar — carga una clave registrada con",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=()=>"No key on this computer yet — create one with",dWt=()=>"此计算机上还没有密钥——使用以下命令创建:",hWt=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",pWt=()=>"لا مفتاح على هذا الحاسوب بعد — أنشئ واحدًا عبر",mWt=()=>"Aún no hay ninguna clave en este equipo — crea una con",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=()=>"No Slurm CLI",yWt=()=>"无 Slurm CLI",xWt=()=>"بدون CLI اسلورم",wWt=()=>"لا توجد واجهة Slurm لسطر الأوامر",kWt=()=>"Sin CLI de Slurm",SWt=()=>"कोई Slurm CLI नहीं",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=()=>"None registered",NWt=()=>"未注册任何密钥",zWt=()=>"هیچ‌کدام ثبت نشده",jWt=()=>"لا شيء مسجّل",AWt=()=>"Ninguna registrada",TWt=()=>"कोई रजिस्टर्ड नहीं",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=()=>"Not checked",OWt=()=>"未检查",DWt=()=>"بررسی نشده",LWt=()=>"لم يُفحص",IWt=()=>"Sin comprobar",$Wt=()=>"जाँचा नहीं गया",aI=((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()}),BWt=()=>"Not configured",PWt=()=>"未配置",FWt=()=>"پیکربندی نشده",HWt=()=>"غير مُعَد",qWt=()=>"Sin configurar",UWt=()=>"कॉन्फ़िगर नहीं किया गया",Hb=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PWt():t==="fa"?FWt():t==="ar"?HWt():t==="es"?qWt():t==="hi"?UWt():BWt()}),GWt=()=>"Not installed",KWt=()=>"未安装",VWt=()=>"نصب نیست",WWt=()=>"غير مثبّت",QWt=()=>"No instalado",XWt=()=>"इंस्टॉल नहीं है",YWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KWt():t==="fa"?VWt():t==="ar"?WWt():t==="es"?QWt():t==="hi"?XWt():GWt()}),ZWt=()=>"Not now",JWt=()=>"暂不",eQt=()=>"اکنون نه",tQt=()=>"ليس الآن",nQt=()=>"Ahora no",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=()=>"Not on this computer",aQt=()=>"不在此计算机上",oQt=()=>"روی این رایانه نیست",cQt=()=>"ليس على هذا الحاسوب",lQt=()=>"No en este equipo",uQt=()=>"इस कंप्यूटर पर नहीं",_Qt=((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()}),fQt=()=>"Not set (pass --host per launch)",dQt=()=>"未设置(每次启动时传入 --host)",hQt=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",pQt=()=>"غير مضبوط (مرّر ‎--host‎ عند كل تشغيل)",mQt=()=>"Sin definir (pasa --host en cada lanzamiento)",gQt=()=>"सेट नहीं (हर लॉन्च पर --host दें)",oI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dQt():t==="fa"?hQt():t==="ar"?pQt():t==="es"?mQt():t==="hi"?gQt():fQt()}),vQt=()=>"Not signed in",bQt=()=>"未登录",yQt=()=>"وارد نشده",xQt=()=>"لم يتم تسجيل الدخول",wQt=()=>"Sin iniciar sesión",kQt=()=>"साइन इन नहीं है",cI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bQt():t==="fa"?yQt():t==="ar"?xQt():t==="es"?wQt():t==="hi"?kQt():vQt()}),SQt=()=>"On this computer",CQt=()=>"在此计算机上",EQt=()=>"روی این رایانه",NQt=()=>"على هذا الحاسوب",zQt=()=>"En este equipo",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=()=>"Open a project to inspect its repository and GitHub publication state.",RQt=()=>"打开项目以查看其仓库和 GitHub 发布状态。",MQt=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",OQt=()=>"افتح مشروعًا لفحص مستودعه وحالة نشره على GitHub.",DQt=()=>"Abre un proyecto para ver su repositorio y su estado de publicación en GitHub.",LQt=()=>"इसकी रिपॉज़िटरी और GitHub प्रकाशन स्थिति देखने के लिए एक प्रोजेक्ट खोलें।",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=()=>"Open job page",BQt=()=>"打开作业页面",PQt=()=>"باز کردن صفحهٔ کار",FQt=()=>"فتح صفحة المهمة",HQt=()=>"Abrir página del job",qQt=()=>"जॉब पेज खोलें",_j=((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()}),UQt=()=>"Open on GitHub",GQt=()=>"在 GitHub 上打开",KQt=()=>"باز کردن در GitHub",VQt=()=>"فتح على GitHub",WQt=()=>"Abrir en GitHub",QQt=()=>"GitHub पर खोलें",fj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GQt():t==="fa"?KQt():t==="ar"?VQt():t==="es"?WQt():t==="hi"?QQt():UQt()}),XQt=()=>", or create one with",YQt=()=>",或使用以下命令创建:",ZQt=()=>"، یا با این فرمان یکی بسازید:",JQt=()=>"، أو أنشئ واحدًا عبر",eXt=()=>", o crea una con",tXt=()=>", या इसके साथ एक बनाएं",nXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YQt():t==="fa"?ZQt():t==="ar"?JQt():t==="es"?eXt():t==="hi"?tXt():XQt()}),rXt=()=>"Org",sXt=()=>"组织",iXt=()=>"سازمان",aXt=()=>"المؤسسة",oXt=()=>"Org.",cXt=()=>"संगठन",lXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sXt():t==="fa"?iXt():t==="ar"?aXt():t==="es"?oXt():t==="hi"?cXt():rXt()}),uXt=()=>"Orgs",_Xt=()=>"组织",fXt=()=>"سازمان‌ها",dXt=()=>"المؤسسات",hXt=()=>"Orgs.",pXt=()=>"संगठन",mXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Xt():t==="fa"?fXt():t==="ar"?dXt():t==="es"?hXt():t==="hi"?pXt():uXt()}),gXt=()=>"orx can't update this install",vXt=()=>"orx 无法更新此安装",bXt=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",yXt=()=>"لا يستطيع orx تحديث هذا التثبيت",xXt=()=>"orx no puede actualizar esta instalación",wXt=()=>"orx इस इंस्टॉल को अपडेट नहीं कर सकता",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=()=>"Overleaf",CXt=()=>"Overleaf",EXt=()=>"Overleaf",NXt=()=>"Overleaf",zXt=()=>"Overleaf",jXt=()=>"Overleaf",lI=((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()}),AXt=()=>"Overleaf Git authentication token",TXt=()=>"Overleaf Git 身份验证令牌",RXt=()=>"توکن احراز هویت Git در Overleaf",MXt=()=>"رمز مصادقة Git لـ Overleaf",OXt=()=>"Token de autenticación de Git de Overleaf",DXt=()=>"Overleaf Git प्रमाणीकरण टोकन",LXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TXt():t==="fa"?RXt():t==="ar"?MXt():t==="es"?OXt():t==="hi"?DXt():AXt()}),IXt=()=>"Overridden by env",$Xt=()=>"已被环境变量覆盖",BXt=()=>"بازنویسی‌شده توسط محیط",PXt=()=>"متجاوَز عبر متغيّر البيئة",FXt=()=>"Sobrescrito por el entorno",HXt=()=>"env द्वारा ओवरराइड किया गया",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=()=>"Partition",GXt=()=>"分区",KXt=()=>"پارتیشن",VXt=()=>"القسم",WXt=()=>"Partición",QXt=()=>"पार्टीशन",XXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GXt():t==="fa"?KXt():t==="ar"?VXt():t==="es"?WXt():t==="hi"?QXt():UXt()}),YXt=()=>"Path",ZXt=()=>"路径",JXt=()=>"مسیر",eYt=()=>"المسار",tYt=()=>"Ruta",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=()=>"Plan",iYt=()=>"方案",aYt=()=>"سطح اشتراک",oYt=()=>"الخطة",cYt=()=>"Plan",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=()=>"Project",fYt=()=>"项目",dYt=()=>"پروژه",hYt=()=>"المشروع",pYt=()=>"Proyecto",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=()=>"Ray version",bYt=()=>"Ray 版本",yYt=()=>"نسخهٔ Ray",xYt=()=>"إصدار Ray",wYt=()=>"Versión de Ray",kYt=()=>"Ray वर्शन",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=()=>"Reachable",EYt=()=>"可访问",NYt=()=>"در دسترس",zYt=()=>"يمكن الوصول إليه",jYt=()=>"Accesible",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=()=>"Reading ~/.ssh/config…",MYt=()=>"正在读取 ~/.ssh/config…",OYt=()=>"در حال خواندن ‎~/.ssh/config…",DYt=()=>"جارٍ قراءة ‎~/.ssh/config…",LYt=()=>"Leyendo ~/.ssh/config…",IYt=()=>"~/.ssh/config पढ़ा जा रहा है…",uI=((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()}),$Yt=()=>"Ready",BYt=()=>"就绪",PYt=()=>"آماده",FYt=()=>"جاهز",HYt=()=>"Listo",qYt=()=>"तैयार",Tm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BYt():t==="fa"?PYt():t==="ar"?FYt():t==="es"?HYt():t==="hi"?qYt():$Yt()}),UYt=()=>"Ready to move",GYt=()=>"可以移动",KYt=()=>"آمادهٔ انتقال",VYt=()=>"جاهز للنقل",WYt=()=>"Listo para mover",QYt=()=>"स्थानांतरण के लिए तैयार",XYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GYt():t==="fa"?KYt():t==="ar"?VYt():t==="es"?WYt():t==="hi"?QYt():UYt()}),YYt=()=>"Configured",ZYt=()=>"已配置",JYt=()=>"پیکربندی‌شده",eZt=()=>"مُعَد",tZt=()=>"Configurado",nZt=()=>"कॉन्फ़िगर किया गया",Rm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZYt():t==="fa"?JYt():t==="ar"?eZt():t==="es"?tZt():t==="hi"?nZt():YYt()}),rZt=()=>"Refresh",sZt=()=>"刷新",iZt=()=>"تازه‌سازی",aZt=()=>"تحديث",oZt=()=>"Actualizar",cZt=()=>"रीफ़्रेश करें",Mm=((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()}),lZt=()=>"Remotes",uZt=()=>"远程仓库",_Zt=()=>"مخزن‌های دوردست",fZt=()=>"المستودعات البعيدة",dZt=()=>"Remotos",hZt=()=>"रिमोट",pZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uZt():t==="fa"?_Zt():t==="ar"?fZt():t==="es"?dZt():t==="hi"?hZt():lZt()}),mZt=()=>"Repository",gZt=()=>"仓库",vZt=()=>"مخزن",bZt=()=>"المستودع",yZt=()=>"Repositorio",xZt=()=>"रिपॉज़िटरी",wZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gZt():t==="fa"?vZt():t==="ar"?bZt():t==="es"?yZt():t==="hi"?xZt():mZt()}),kZt=()=>"Restart to finish updating",SZt=()=>"重新启动以完成更新",CZt=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",EZt=()=>"أعد التشغيل لإكمال التحديث",NZt=()=>"Reinicia para terminar la actualización",zZt=()=>"अपडेट पूरा करने के लिए फिर से शुरू करें",jZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SZt():t==="fa"?CZt():t==="ar"?EZt():t==="es"?NZt():t==="hi"?zZt():kZt()}),AZt=()=>"Running instances",TZt=()=>"正在运行的实例",RZt=()=>"نمونه‌های در حال اجرا",MZt=()=>"المثيلات قيد التشغيل",OZt=()=>"Instancias en ejecución",DZt=()=>"चल रहे इंस्टेंस",LZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TZt():t==="fa"?RZt():t==="ar"?MZt():t==="es"?OZt():t==="hi"?DZt():AZt()}),IZt=()=>"Runtime",$Zt=()=>"运行时间",BZt=()=>"زمان اجرا",PZt=()=>"مدة التشغيل",FZt=()=>"Runtime",HZt=()=>"रनटाइम",qZt=((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()}),UZt=()=>". Save it under that key if it's meant for HF Jobs.",GZt=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",KZt=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",VZt=()=>"‏. احفظه تحت ذلك المفتاح إن كان مخصصًا لمهام HF.",WZt=()=>". Guárdalo con ese nombre si es para HF Jobs.",QZt=()=>"। यदि यह HF Jobs के लिए है तो इसे उस की के तहत सेव करें।",XZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GZt():t==="fa"?KZt():t==="ar"?VZt():t==="es"?WZt():t==="hi"?QZt():UZt()}),YZt=()=>"Session cookie",ZZt=()=>"会话 cookie",JZt=()=>"کوکی نشست",eJt=()=>"ملف تعريف ارتباط الجلسة",tJt=()=>"Cookie de sesión",nJt=()=>"सेशन कुकी",rJt=((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()}),sJt=()=>"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.",iJt=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",aJt=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",oJt=()=>"مع حفظ ملف تعريف ارتباط الجلسة، تتابع الورقة المرتبطة Overleaf أثناء كتابة الآخرين وترسل عمليات الحفظ مباشرةً. لا تزال الأشكال تُنقَل عبر مزامنة Git الأبطأ. انسخ ملف تعريف الارتباط overleaf_session2 من متصفح مسجّل الدخول إلى Overleaf؛ ويتوقف عن العمل عند انتهاء ذلك الدخول.",cJt=()=>"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.",lJt=()=>"सेशन कुकी सेव होने पर, एक लिंक किया गया पेपर लोगों के टाइप करते ही Overleaf को फ़ॉलो करता है और सेव सीधे वापस भेजता है। फ़िगर अभी भी धीमे Git सिंक पर चलती हैं। Overleaf में साइन इन ब्राउज़र से overleaf_session2 कुकी कॉपी करें; वह साइन-इन खत्म होने पर काम करना बंद कर देती है।",uJt=((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()}),_Jt=()=>"Settings",fJt=()=>"设置",dJt=()=>"تنظیمات",hJt=()=>"الإعدادات",pJt=()=>"Configuración",mJt=()=>"सेटिंग्स",RS=((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()}),gJt=()=>"Signed in",vJt=()=>"已登录",bJt=()=>"وارد شده",yJt=()=>"تم تسجيل الدخول",xJt=()=>"Sesión iniciada",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=()=>"Source",CJt=()=>"来源",EJt=()=>"منبع",NJt=()=>"المصدر",zJt=()=>"Origen",jJt=()=>"स्रोत",_I=((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=()=>"SSH Key",TJt=()=>"SSH 密钥",RJt=()=>"کلید SSH",MJt=()=>"مفتاح SSH",OJt=()=>"Clave SSH",DJt=()=>"SSH की",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=()=>"Started",$Jt=()=>"开始时间",BJt=()=>"آغاز",PJt=()=>"بدأ",FJt=()=>"Inicio",HJt=()=>"शुरू हुआ",qJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Jt():t==="fa"?BJt():t==="ar"?PJt():t==="es"?FJt():t==="hi"?HJt():IJt()}),UJt=()=>"State",GJt=()=>"状态",KJt=()=>"وضعیت",VJt=()=>"الحالة",WJt=()=>"Estado",QJt=()=>"स्थिति",XJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GJt():t==="fa"?KJt():t==="ar"?VJt():t==="es"?WJt():t==="hi"?QJt():UJt()}),YJt=()=>"Status",ZJt=()=>"状态",JJt=()=>"وضعیت",een=()=>"الحالة",ten=()=>"Estado",nen=()=>"स्थिति",Vh=((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=()=>"Storage",sen=()=>"存储",ien=()=>"ذخیره‌سازی",aen=()=>"التخزين",oen=()=>"Almacenamiento",cen=()=>"स्टोरेज",len=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sen():t==="fa"?ien():t==="ar"?aen():t==="es"?oen():t==="hi"?cen():ren()}),uen=()=>"Sync",_en=()=>"同步",fen=()=>"همگام‌سازی",den=()=>"مزامنة",hen=()=>"Sincronización",pen=()=>"सिंक",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=()=>"Syncing off",ven=()=>"同步已关闭",ben=()=>"همگام‌سازی خاموش",yen=()=>"المزامنة معطّلة",xen=()=>"Sincronización desactivada",wen=()=>"सिंकिंग बंद है",ken=((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()}),Sen=()=>"Test connection",Cen=()=>"测试连接",Een=()=>"آزمایش اتصال",Nen=()=>"اختبار الاتصال",zen=()=>"Probar conexión",jen=()=>"कनेक्शन जाँचें",Aen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cen():t==="fa"?Een():t==="ar"?Nen():t==="es"?zen():t==="hi"?jen():Sen()}),Ten=()=>"Testing…",Ren=()=>"正在测试…",Men=()=>"در حال آزمایش…",Oen=()=>"جارٍ الاختبار…",Den=()=>"Probando…",Len=()=>"जाँचा जा रहा है…",Ien=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ren():t==="fa"?Men():t==="ar"?Oen():t==="es"?Den():t==="hi"?Len():Ten()}),$en=()=>", then add it with",Ben=()=>",然后使用以下命令添加:",Pen=()=>"، سپس با این فرمان اضافه‌اش کنید:",Fen=()=>"، ثم أضِفه عبر",Hen=()=>" y luego añádela con",qen=()=>", फिर इसे इसके साथ जोड़ें",Uen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ben():t==="fa"?Pen():t==="ar"?Fen():t==="es"?Hen():t==="hi"?qen():$en()}),Gen=()=>"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.",Ken=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",Ven=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",Wen=()=>"هذا مفيد عندما يتابع المتعاونون تغييرات المشروع على GitHub. ستفعّل المشاريع الجديدة المزامنة تلقائيًا، مع إنشاء مستودع خاص عند الحاجة ورفع فروع التجارب لإتاحة الاطلاع عليها.",Qen=()=>"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.",Xen=()=>"यह तब उपयोगी है जब सहयोगी GitHub पर प्रोजेक्ट के बदलावों को फ़ॉलो करते हों। नए प्रोजेक्ट में सिंकिंग अपने आप चालू हो जाएगी, ज़रूरत पड़ने पर एक निजी रिपॉज़िटरी बनेगी और प्रयोग ब्रांच दृश्यता के लिए पुश की जाएंगी।",Yen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ken():t==="fa"?Ven():t==="ar"?Wen():t==="es"?Qen():t==="hi"?Xen():Gen()}),Zen=()=>"This saved destination is not configured. Set it up below or choose another backend.",Jen=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",etn=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",ttn=()=>"هذه الوجهة المحفوظة غير مُعدّة. أعِدّها أدناه أو اختر بيئة تنفيذ أخرى.",ntn=()=>"Este destino guardado no está configurado. Configúralo abajo o elige otro backend.",rtn=()=>"यह सेव किया गया गंतव्य कॉन्फ़िगर नहीं है। इसे नीचे सेट अप करें या कोई और बैकएंड चुनें।",stn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jen():t==="fa"?etn():t==="ar"?ttn():t==="es"?ntn():t==="hi"?rtn():Zen()}),itn=()=>"This value looks like a Hugging Face token — compute runs only read it from",atn=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",otn=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",ctn=()=>"تبدو هذه القيمة كرمز Hugging Face — لا تقرؤه عمليات التشغيل الحوسبية إلا من",ltn=()=>"Este valor parece un token de Hugging Face — las ejecuciones de cómputo solo lo leen de",utn=()=>"यह वैल्यू एक Hugging Face टोकन जैसी लगती है — कंप्यूट रन इसे केवल यहाँ से पढ़ते हैं",_tn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?atn():t==="fa"?otn():t==="ar"?ctn():t==="es"?ltn():t==="hi"?utn():itn()}),ftn=()=>"Time limit",dtn=()=>"时间限制",htn=()=>"محدودیت زمانی",ptn=()=>"الحد الزمني",mtn=()=>"Límite de tiempo",gtn=()=>"समय सीमा",vtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dtn():t==="fa"?htn():t==="ar"?ptn():t==="es"?mtn():t==="hi"?gtn():ftn()}),btn=()=>"Unable to verify",ytn=()=>"无法验证",xtn=()=>"تأیید ممکن نیست",wtn=()=>"تعذّر التحقق",ktn=()=>"No se pudo verificar",Stn=()=>"सत्यापित नहीं हो सका",Bv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ytn():t==="fa"?xtn():t==="ar"?wtn():t==="es"?ktn():t==="hi"?Stn():btn()}),Ctn=()=>"Unknown",Etn=()=>"未知",Ntn=()=>"نامشخص",ztn=()=>"غير معروف",jtn=()=>"Desconocido",Atn=()=>"अज्ञात",fI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Etn():t==="fa"?Ntn():t==="ar"?ztn():t==="es"?jtn():t==="hi"?Atn():Ctn()}),Ttn=()=>"Update required",Rtn=()=>"需要更新",Mtn=()=>"نیازمند به‌روزرسانی",Otn=()=>"مطلوب تحديث",Dtn=()=>"Actualización necesaria",Ltn=()=>"अपडेट ज़रूरी है",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=()=>"Updates",Btn=()=>"更新",Ptn=()=>"به‌روزرسانی‌ها",Ftn=()=>"التحديثات",Htn=()=>"Actualizaciones",qtn=()=>"अपडेट",dj=((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=()=>"Usage analytics",Gtn=()=>"使用情况分析",Ktn=()=>"تحلیل استفاده",Vtn=()=>"تحليلات الاستخدام",Wtn=()=>"Estadísticas de uso",Qtn=()=>"उपयोग एनालिटिक्स",Xtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gtn():t==="fa"?Ktn():t==="ar"?Vtn():t==="es"?Wtn():t==="hi"?Qtn():Utn()}),Ytn=()=>"value",Ztn=()=>"值",Jtn=()=>"مقدار",enn=()=>"القيمة",tnn=()=>"valor",nnn=()=>"वैल्यू",dI=((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()}),rnn=()=>"Variables available to runs and the research agent (API keys, tokens).",snn=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",inn=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",ann=()=>"متغيّرات متاحة لعمليات التشغيل ولوكيل البحث (مفاتيح API والرموز).",onn=()=>"Variables disponibles para las ejecuciones y el agente de investigación (claves de API, tokens).",cnn=()=>"रन और शोध एजेंट के लिए उपलब्ध वेरिएबल (API की, टोकन)।",lnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?snn():t==="fa"?inn():t==="ar"?ann():t==="es"?onn():t==="hi"?cnn():rnn()}),unn=()=>"Version",_nn=()=>"版本",fnn=()=>"نسخه",dnn=()=>"الإصدار",hnn=()=>"Versión",pnn=()=>"वर्शन",hI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_nn():t==="fa"?fnn():t==="ar"?dnn():t==="es"?hnn():t==="hi"?pnn():unn()}),mnn=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",gnn=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",vnn=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",bnn=()=>"عند التفعيل، يحصل كل مشروع جديد على مستودع GitHub خاص. تُرفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون. تستخدم الحوسبة دائمًا لقطات المصدر المباشرة.",ynn=()=>"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.",xnn=()=>"चालू होने पर, हर नए प्रोजेक्ट को एक निजी GitHub रिपॉज़िटरी मिलती है। सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश होती हैं। कंप्यूट हमेशा सीधे सोर्स स्नैपशॉट का उपयोग करता है।",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=()=>"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.",Snn=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",Cnn=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",Enn=()=>"مع حفظ رمز، يمكن إبقاء ورقة مفتوحة في لوحة التحكم متزامنة مع مشروع Overleaf في الاتجاهين. يأتي تكامل Git في Overleaf مع خطة Overleaf مدفوعة؛ وبدونها لا يزال بالإمكان رفع ورقة إلى Overleaf كمشروع جديد. يبقى الرمز على هذا الجهاز ولا يُرسَل إلى بيئات التنفيذ.",Nnn=()=>"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.",znn=()=>"टोकन सेव होने पर, डैशबोर्ड में खुला कोई पेपर दोनों दिशाओं में Overleaf प्रोजेक्ट के साथ मेल खाता रहता है। Overleaf का Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है; उसके बिना, एक पेपर को अब भी नए प्रोजेक्ट के रूप में Overleaf पर अपलोड किया जा सकता है। टोकन इसी मशीन पर रहता है और कंप्यूट बैकएंड को नहीं भेजा जाता।",jnn=((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()}),Ann=()=>"Pick a login node first",Tnn=()=>"请先选择登录节点",Rnn=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",Mnn=()=>"اختر عقدة دخول أولًا",Onn=()=>"Elige primero un nodo de acceso",Dnn=()=>"पहले एक लॉगिन नोड चुनें",Lnn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tnn():t==="fa"?Rnn():t==="ar"?Mnn():t==="es"?Onn():t==="hi"?Dnn():Ann()}),Inn=()=>"Providers",$nn=()=>"提供商",Bnn=()=>"ارائه‌دهندگان",Pnn=()=>"المزوّدون",Fnn=()=>"Proveedores",Hnn=()=>"प्रोवाइडर",pI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$nn():t==="fa"?Bnn():t==="ar"?Pnn():t==="es"?Fnn():t==="hi"?Hnn():Inn()}),qnn=()=>"Reconnect",Unn=()=>"重新连接",Gnn=()=>"اتصال دوباره",Knn=()=>"إعادة الاتصال",Vnn=()=>"Reconectar",Wnn=()=>"फिर से कनेक्ट करें",mI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Unn():t==="fa"?Gnn():t==="ar"?Knn():t==="es"?Vnn():t==="hi"?Wnn():qnn()}),Qnn=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,Xnn=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,Ynn=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,Znn=e=>`سجّل هذا الحاسوب عبر ${e==null?void 0:e.register}، أو حمّل مفتاحًا مسجّلًا عبر ${e==null?void 0:e.load}.`,Jnn=e=>`Registra este equipo con ${e==null?void 0:e.register} o carga una clave registrada con ${e==null?void 0:e.load}.`,ern=e=>`इस कंप्यूटर को ${e==null?void 0:e.register} से रजिस्टर करें, या ${e==null?void 0:e.load} से एक रजिस्टर्ड की लोड करें।`,trn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Xnn(e):t==="fa"?Ynn(e):t==="ar"?Znn(e):t==="es"?Jnn(e):t==="hi"?ern(e):Qnn(e)}),nrn=()=>"Reinstall with the orx installer to get automatic updates.",rrn=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",srn=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",irn=()=>"أعد التثبيت عبر مُثبّت orx للحصول على التحديثات التلقائية.",arn=()=>"Reinstala con el instalador de orx para recibir actualizaciones automáticas.",orn=()=>"ऑटोमैटिक अपडेट पाने के लिए orx इंस्टॉलर से फिर से इंस्टॉल करें।",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=()=>"Release notes",urn=()=>"版本说明",_rn=()=>"یادداشت‌های انتشار",frn=()=>"ملاحظات الإصدار",drn=()=>"Notas de la versión",hrn=()=>"रिलीज़ नोट्स",gI=((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()}),prn=()=>"Re-link",mrn=()=>"重新链接",grn=()=>"پیوند دوباره",vrn=()=>"إعادة الربط",brn=()=>"Volver a enlazar",yrn=()=>"फिर से लिंक करें",xrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mrn():t==="fa"?grn():t==="ar"?vrn():t==="es"?brn():t==="hi"?yrn():prn()}),wrn=()=>"Remove cookie",krn=()=>"移除 cookie",Srn=()=>"حذف کوکی",Crn=()=>"إزالة ملف تعريف الارتباط",Ern=()=>"Quitar cookie",Nrn=()=>"कुकी हटाएं",zrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?krn():t==="fa"?Srn():t==="ar"?Crn():t==="es"?Ern():t==="hi"?Nrn():wrn()}),jrn=()=>"Remove token",Arn=()=>"移除令牌",Trn=()=>"حذف توکن",Rrn=()=>"إزالة الرمز",Mrn=()=>"Quitar token",Orn=()=>"टोकन हटाएं",Drn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Arn():t==="fa"?Trn():t==="ar"?Rrn():t==="es"?Mrn():t==="hi"?Orn():jrn()}),Lrn=()=>"Removing…",Irn=()=>"正在移除…",$rn=()=>"در حال حذف…",Brn=()=>"جارٍ الإزالة…",Prn=()=>"Quitando…",Frn=()=>"हटाया जा रहा है…",hj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Irn():t==="fa"?$rn():t==="ar"?Brn():t==="es"?Prn():t==="hi"?Frn():Lrn()}),Hrn=()=>"Replace anyway",qrn=()=>"仍要替换",Urn=()=>"به‌هرحال جایگزین کن",Grn=()=>"الاستبدال على أي حال",Krn=()=>"Reemplazar de todos modos",Vrn=()=>"फिर भी बदलें",Wrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qrn():t==="fa"?Urn():t==="ar"?Grn():t==="es"?Krn():t==="hi"?Vrn():Hrn()}),Qrn=()=>"Replace key",Xrn=()=>"替换密钥",Yrn=()=>"جایگزینی کلید",Zrn=()=>"استبدال المفتاح",Jrn=()=>"Reemplazar clave",esn=()=>"की बदलें",tsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xrn():t==="fa"?Yrn():t==="ar"?Zrn():t==="es"?Jrn():t==="hi"?esn():Qrn()}),nsn=()=>"Replace token",rsn=()=>"替换令牌",ssn=()=>"جایگزینی توکن",isn=()=>"استبدال الرمز",asn=()=>"Reemplazar token",osn=()=>"टोकन बदलें",csn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rsn():t==="fa"?ssn():t==="ar"?isn():t==="es"?asn():t==="hi"?osn():nsn()}),lsn=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,usn=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,_sn=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,fsn=e=>`إعدادات Git وGitHub لـ ${e==null?void 0:e.project}. تعتمد التجارب على Git المحلي؛ والنشر اختياري.`,dsn=e=>`Configuración de Git y GitHub de ${e==null?void 0:e.project}. Git local hace posibles los experimentos; publicar es opcional.`,hsn=e=>`${e==null?void 0:e.project} के लिए Git और GitHub सेटिंग्स। लोकल Git प्रयोगों को चलाता है; प्रकाशन वैकल्पिक है।`,psn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?usn(e):t==="fa"?_sn(e):t==="ar"?fsn(e):t==="es"?dsn(e):t==="hi"?hsn(e):lsn(e)}),msn=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,gsn=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,vsn=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,bsn=e=>`الإصدار ${e==null?void 0:e.installed} مثبّت. لا تزال هذه النافذة تعمل بالإصدار ${e==null?void 0:e.current}.`,ysn=e=>`La versión ${e==null?void 0:e.installed} está instalada. Esta ventana sigue ejecutando la ${e==null?void 0:e.current}.`,xsn=e=>`वर्शन ${e==null?void 0:e.installed} इंस्टॉल है। यह विंडो अभी भी ${e==null?void 0:e.current} चला रही है।`,wsn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gsn(e):t==="fa"?vsn(e):t==="ar"?bsn(e):t==="es"?ysn(e):t==="hi"?xsn(e):msn(e)}),ksn=()=>"Run `gh auth login` in your terminal.",Ssn=()=>"请在终端中运行 `gh auth login`。",Csn=()=>"در پایانه `gh auth login` را اجرا کنید.",Esn=()=>"نفّذ `gh auth login` في طرفيتك.",Nsn=()=>"Ejecuta `gh auth login` en tu terminal.",zsn=()=>"अपने टर्मिनल में `gh auth login` चलाएं।",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=()=>"Saved",Tsn=()=>"已保存",Rsn=()=>"ذخیره شده",Msn=()=>"تم الحفظ",Osn=()=>"Guardado",Dsn=()=>"सेव हो गया",pj=((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()}),Lsn=()=>"Set up",Isn=()=>"设置",$sn=()=>"راه‌اندازی",Bsn=()=>"إعداد",Psn=()=>"Configurar",Fsn=()=>"सेट अप करें",Hsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Isn():t==="fa"?$sn():t==="ar"?Bsn():t==="es"?Psn():t==="hi"?Fsn():Lsn()}),qsn=()=>"Set up SSH key",Usn=()=>"设置 SSH 密钥",Gsn=()=>"راه‌اندازی کلید SSH",Ksn=()=>"إعداد مفتاح SSH",Vsn=()=>"Configurar clave SSH",Wsn=()=>"SSH की सेट अप करें",Qsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Usn():t==="fa"?Gsn():t==="ar"?Ksn():t==="es"?Vsn():t==="hi"?Wsn():qsn()}),Xsn=()=>"Sign in",Ysn=()=>"登录",Zsn=()=>"ورود",Jsn=()=>"تسجيل الدخول",ein=()=>"Iniciar sesión",tin=()=>"साइन इन करें",vI=((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()}),nin=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,rin=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,sin=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,iin=e=>`طرفية اتصال SSH لـ ${e==null?void 0:e.host}`,ain=e=>`Terminal de conexión SSH para ${e==null?void 0:e.host}`,oin=e=>`${e==null?void 0:e.host} के लिए SSH कनेक्शन टर्मिनल`,bI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rin(e):t==="fa"?sin(e):t==="ar"?iin(e):t==="es"?ain(e):t==="hi"?oin(e):nin(e)}),cin=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",lin=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",uin=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",_in=()=>"قاعدة البيانات المحلية وسجلات التشغيل والمُخرَجات ومرفقات المحادثة. نقل هذا الدليل ينسخ المخزن بالكامل.",fin=()=>"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.",din=()=>"लोकल डेटाबेस, रन लॉग, आर्टिफ़ैक्ट और चैट अटैचमेंट। इस डायरेक्टरी को स्थानांतरित करने पर पूरा स्टोर कॉपी होता है।",hin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lin():t==="fa"?uin():t==="ar"?_in():t==="es"?fin():t==="hi"?din():cin()}),pin=()=>"The terminal disconnected before setup completed. Try again.",min=()=>"设置完成前终端连接已断开。请重试。",gin=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",vin=()=>"انقطعت الطرفية قبل اكتمال الإعداد. حاول مجددًا.",bin=()=>"La terminal se desconectó antes de completar la configuración. Inténtalo de nuevo.",yin=()=>"सेटअप पूरा होने से पहले टर्मिनल डिस्कनेक्ट हो गया। फिर से कोशिश करें।",Pv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?min():t==="fa"?gin():t==="ar"?vin():t==="es"?bin():t==="hi"?yin():pin()}),xin=()=>"Dark",win=()=>"深色",kin=()=>"تیره",Sin=()=>"داكن",Cin=()=>"Oscuro",Ein=()=>"डार्क",Nin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?win():t==="fa"?kin():t==="ar"?Sin():t==="es"?Cin():t==="hi"?Ein():xin()}),zin=()=>"Theme",jin=()=>"主题",Ain=()=>"پوسته",Tin=()=>"السمة",Rin=()=>"Tema",Min=()=>"थीम",mj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jin():t==="fa"?Ain():t==="ar"?Tin():t==="es"?Rin():t==="hi"?Min():zin()}),Oin=()=>"Light",Din=()=>"浅色",Lin=()=>"روشن",Iin=()=>"فاتح",$in=()=>"Claro",Bin=()=>"लाइट",Pin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Din():t==="fa"?Lin():t==="ar"?Iin():t==="es"?$in():t==="hi"?Bin():Oin()}),Fin=()=>"System",Hin=()=>"系统",qin=()=>"سیستم",Uin=()=>"النظام",Gin=()=>"Sistema",Kin=()=>"सिस्टम",Vin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hin():t==="fa"?qin():t==="ar"?Uin():t==="es"?Gin():t==="hi"?Kin():Fin()}),Win=()=>"Set up billing in the Tinker console",Qin=()=>"在 Tinker 控制台设置账单",Xin=()=>"تنظیم پرداخت در کنسول Tinker",Yin=()=>"أعِدّ الفوترة في وحدة تحكم Tinker",Zin=()=>"Configura la facturación en la consola de Tinker",Jin=()=>"Tinker कंसोल में बिलिंग सेट अप करें",ean=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qin():t==="fa"?Xin():t==="ar"?Yin():t==="es"?Zin():t==="hi"?Jin():Win()}),tan=()=>"Billing setup required",nan=()=>"需要设置账单",ran=()=>"تنظیم پرداخت لازم است",san=()=>"مطلوب إعداد الفوترة",ian=()=>"Hay que configurar la facturación",aan=()=>"बिलिंग सेटअप ज़रूरी है",oan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nan():t==="fa"?ran():t==="ar"?san():t==="es"?ian():t==="hi"?aan():tan()}),can=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",lan=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",uan=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",_an=()=>"‏TINKER_API_KEY مضبوط في بيئة العملية ويتجاوز المفاتيح المحفوظة هنا. تعكس الحالة ذلك المفتاح.",fan=()=>"TINKER_API_KEY está definida en el entorno del proceso y tiene prioridad sobre las claves guardadas aquí. El estado corresponde a esa clave.",dan=()=>"TINKER_API_KEY प्रोसेस एनवायरनमेंट में सेट है और यहाँ सेव की को ओवरराइड करता है। स्थिति उसी की को दर्शाती है।",han=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lan():t==="fa"?uan():t==="ar"?_an():t==="es"?fan():t==="hi"?dan():can()}),pan=()=>"Invalid Key",man=()=>"密钥无效",gan=()=>"کلید نامعتبر",van=()=>"مفتاح غير صالح",ban=()=>"Clave no válida",yan=()=>"अमान्य की",xan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?man():t==="fa"?gan():t==="ar"?van():t==="es"?ban():t==="hi"?yan():pan()}),wan=()=>"Token from",kan=()=>"令牌来自",San=()=>"توکن از",Can=()=>"الرمز من",Ean=()=>"Token tomado de la",Nan=()=>"टोकन स्रोत",zan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kan():t==="fa"?San():t==="ar"?Can():t==="es"?Ean():t==="hi"?Nan():wan()}),jan=()=>"Update now",Aan=()=>"立即更新",Tan=()=>"اکنون به‌روزرسانی کن",Ran=()=>"التحديث الآن",Man=()=>"Actualizar ahora",Oan=()=>"अभी अपडेट करें",Dan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aan():t==="fa"?Tan():t==="ar"?Ran():t==="es"?Man():t==="hi"?Oan():jan()}),Lan=e=>`Update to ${e==null?void 0:e.version}`,Ian=e=>`更新到 ${e==null?void 0:e.version}`,$an=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,Ban=e=>`التحديث إلى ${e==null?void 0:e.version}`,Pan=e=>`Actualizar a ${e==null?void 0:e.version}`,Fan=e=>`वर्शन ${e==null?void 0:e.version} पर अपडेट करें`,Han=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ian(e):t==="fa"?$an(e):t==="ar"?Ban(e):t==="es"?Pan(e):t==="hi"?Fan(e):Lan(e)}),qan=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",Uan=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",Gan=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",Kan=()=>" التحديثات معطّلة لهذه البيئة عبر ORX_NO_UPDATE_CHECK، لذا ليس لهذا الإعداد أثر.",Van=()=>" ORX_NO_UPDATE_CHECK desactiva las actualizaciones en este entorno, así que este ajuste no tiene efecto.",Wan=()=>" इस एनवायरनमेंट के लिए ORX_NO_UPDATE_CHECK द्वारा अपडेट बंद कर दिए गए हैं, इसलिए इस सेटिंग का कोई असर नहीं है।",Qan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uan():t==="fa"?Gan():t==="ar"?Kan():t==="es"?Van():t==="hi"?Wan():qan()}),Xan=()=>"Updating default destination…",Yan=()=>"正在更新默认运行位置…",Zan=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",Jan=()=>"جارٍ تحديث الوجهة الافتراضية…",eon=()=>"Actualizando el destino predeterminado…",ton=()=>"डिफ़ॉल्ट गंतव्य अपडेट हो रहा है…",non=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yan():t==="fa"?Zan():t==="ar"?Jan():t==="es"?eon():t==="hi"?ton():Xan()}),ron=()=>"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.",son=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",ion=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",aon=()=>"استخدم هذا المستودع لرفع فروع التجارب تلقائيًا عندما يملك حسابك المتصل صلاحية الكتابة فيه. وإلا، ينشئ OpenResearch مستودعًا خاصًا منفصلًا للتعاون.",oon=()=>"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.",con=()=>"जब आपका कनेक्टेड खाता इसमें लिख सकता है तो ऑटोमैटिक प्रयोग-ब्रांच पुश के लिए इस रिपॉज़िटरी का इस्तेमाल करें। नहीं तो, OpenResearch सहयोग के लिए एक अलग निजी रिपॉज़िटरी बनाता है।",lon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?son():t==="fa"?ion():t==="ar"?aon():t==="es"?oon():t==="hi"?con():ron()}),uon=()=>"Validating…",_on=()=>"正在验证…",fon=()=>"در حال اعتبارسنجی…",don=()=>"جارٍ التحقق…",hon=()=>"Validando…",pon=()=>"सत्यापित हो रहा है…",yI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_on():t==="fa"?fon():t==="ar"?don():t==="es"?hon():t==="hi"?pon():uon()}),mon=()=>"View settings",gon=()=>"查看设置",von=()=>"مشاهدهٔ تنظیمات",bon=()=>"عرض الإعدادات",yon=()=>"Ver configuración",xon=()=>"सेटिंग्स देखें",won=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gon():t==="fa"?von():t==="ar"?bon():t==="es"?yon():t==="hi"?xon():mon()}),kon=e=>`Couldn't delete the side chat: ${e==null?void 0:e.error}`,Son=e=>`无法删除侧边对话:${e==null?void 0:e.error}`,Con=e=>`حذف گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,Eon=e=>`تعذّر حذف المحادثة الجانبية: ${e==null?void 0:e.error}`,Non=e=>`No se pudo eliminar el chat lateral: ${e==null?void 0:e.error}`,zon=e=>`साइड चैट हटाई नहीं जा सकी: ${e==null?void 0:e.error}`,gj=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Son(e):t==="fa"?Con(e):t==="ar"?Eon(e):t==="es"?Non(e):t==="hi"?zon(e):kon(e)}),jon=()=>"Side chats are deleted when you close them or quit the app.",Aon=()=>"关闭侧边对话或退出应用后,侧边对话会被删除。",Ton=()=>"گفت‌وگوهای جانبی با بستن آن‌ها یا خروج از برنامه حذف می‌شوند.",Ron=()=>"تُحذف المحادثات الجانبية عند إغلاقها أو الخروج من التطبيق.",Mon=()=>"Los chats laterales se eliminan cuando los cierras o sales de la app.",Oon=()=>"साइड चैट उन्हें बंद करने या ऐप से बाहर निकलने पर हटा दी जाती हैं।",Don=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aon():t==="fa"?Ton():t==="ar"?Ron():t==="es"?Mon():t==="hi"?Oon():jon()}),Lon=()=>"Open a chat first, then start a side chat from it.",Ion=()=>"请先打开一个对话,再从中开启侧边对话。",$on=()=>"ابتدا یک گفت‌وگو باز کنید، سپس از آن گفت‌وگوی جانبی شروع کنید.",Bon=()=>"افتح محادثة أولًا، ثم ابدأ منها محادثة جانبية.",Pon=()=>"Abre primero un chat y luego inicia un chat lateral desde él.",Fon=()=>"पहले कोई चैट खोलें, फिर उससे साइड चैट शुरू करें।",Hon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ion():t==="fa"?$on():t==="ar"?Bon():t==="es"?Pon():t==="hi"?Fon():Lon()}),qon=()=>"A side chat can't open its own side chat.",Uon=()=>"侧边对话不能再开启自己的侧边对话。",Gon=()=>"گفت‌وگوی جانبی نمی‌تواند گفت‌وگوی جانبی خودش را باز کند.",Kon=()=>"لا يمكن للمحادثة الجانبية فتح محادثة جانبية خاصة بها.",Von=()=>"Un chat lateral no puede abrir su propio chat lateral.",Won=()=>"साइड चैट अपनी खुद की साइड चैट नहीं खोल सकती।",Qon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uon():t==="fa"?Gon():t==="ar"?Kon():t==="es"?Von():t==="hi"?Won():qon()}),Xon=()=>"Side chat",Yon=()=>"侧边对话",Zon=()=>"گفت‌وگوی جانبی",Jon=()=>"محادثة جانبية",ecn=()=>"Chat lateral",tcn=()=>"साइड चैट",H3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yon():t==="fa"?Zon():t==="ar"?Jon():t==="es"?ecn():t==="hi"?tcn():Xon()}),ncn=e=>`Couldn't open a side chat: ${e==null?void 0:e.error}`,rcn=e=>`无法打开侧边对话:${e==null?void 0:e.error}`,scn=e=>`باز کردن گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,icn=e=>`تعذّر فتح محادثة جانبية: ${e==null?void 0:e.error}`,acn=e=>`No se pudo abrir un chat lateral: ${e==null?void 0:e.error}`,ocn=e=>`साइड चैट नहीं खुल सकी: ${e==null?void 0:e.error}`,ccn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rcn(e):t==="fa"?scn(e):t==="ar"?icn(e):t==="es"?acn(e):t==="hi"?ocn(e):ncn(e)}),lcn=()=>"Ask a quick question in a temporary side chat",ucn=()=>"在临时侧边对话中快速提问",_cn=()=>"یک پرسش کوتاه را در گفت‌وگوی جانبی موقت بپرسید",fcn=()=>"اطرح سؤالًا سريعًا في محادثة جانبية مؤقتة",dcn=()=>"Haz una pregunta rápida en un chat lateral temporal",hcn=()=>"अस्थायी साइड चैट में एक छोटा सवाल पूछें",pcn=((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()}),mcn=()=>"Skill",gcn=()=>"技能",vcn=()=>"مهارت",bcn=()=>"مهارة",ycn=()=>"Skill",xcn=()=>"स्किल",wcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gcn():t==="fa"?vcn():t==="ar"?bcn():t==="es"?ycn():t==="hi"?xcn():mcn()}),kcn=()=>"Loading skill…",Scn=()=>"正在加载技能…",Ccn=()=>"در حال بارگیری مهارت…",Ecn=()=>"جارٍ تحميل المهارة…",Ncn=()=>"Cargando skill…",zcn=()=>"स्किल लोड हो रही है…",jcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Scn():t==="fa"?Ccn():t==="ar"?Ecn():t==="es"?Ncn():t==="hi"?zcn():kcn()}),Acn=()=>"Personal",Tcn=()=>"个人",Rcn=()=>"شخصی",Mcn=()=>"شخصي",Ocn=()=>"Personal",Dcn=()=>"व्यक्तिगत",Lcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tcn():t==="fa"?Rcn():t==="ar"?Mcn():t==="es"?Ocn():t==="hi"?Dcn():Acn()}),Icn=()=>"Alternatively, tell your agent to save a reusable skill for you.",$cn=()=>"或者,请你的智能体为你保存可重复使用的技能。",Bcn=()=>"یا از عامل خود بخواهید یک مهارت قابل استفادهٔ مجدد برایتان ذخیره کند.",Pcn=()=>"أو بدلًا من ذلك، اطلب من وكيلك حفظ مهارة قابلة لإعادة الاستخدام لك.",Fcn=()=>"También puedes pedirle a tu agente que guarde una skill reutilizable por ti.",Hcn=()=>"या अपने एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल सेव करने को कहें।",qcn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$cn():t==="fa"?Bcn():t==="ar"?Pcn():t==="es"?Fcn():t==="hi"?Hcn():Icn()}),Ucn=e=>`Delete the “${e==null?void 0:e.name}” skill?`,Gcn=e=>`删除技能“${e==null?void 0:e.name}”?`,Kcn=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,Vcn=e=>`حذف مهارة «${e==null?void 0:e.name}»؟`,Wcn=e=>`¿Eliminar la skill “${e==null?void 0:e.name}”?`,Qcn=e=>`“${e==null?void 0:e.name}” स्किल हटाएं?`,Xcn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Gcn(e):t==="fa"?Kcn(e):t==="ar"?Vcn(e):t==="es"?Wcn(e):t==="hi"?Qcn(e):Ucn(e)}),Ycn=e=>`Delete skill ${e==null?void 0:e.name}`,Zcn=e=>`删除技能 ${e==null?void 0:e.name}`,Jcn=e=>`حذف مهارت ${e==null?void 0:e.name}`,eln=e=>`حذف المهارة ${e==null?void 0:e.name}`,tln=e=>`Eliminar la skill ${e==null?void 0:e.name}`,nln=e=>`${e==null?void 0:e.name} स्किल हटाएं`,rln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zcn(e):t==="fa"?Jcn(e):t==="ar"?eln(e):t==="es"?tln(e):t==="hi"?nln(e):Ycn(e)}),sln=e=>`Delete the “${e==null?void 0:e.name}” template?`,iln=e=>`删除模板“${e==null?void 0:e.name}”?`,aln=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,oln=e=>`حذف قالب «${e==null?void 0:e.name}»؟`,cln=e=>`¿Eliminar la plantilla “${e==null?void 0:e.name}”?`,lln=e=>`“${e==null?void 0:e.name}” टेम्पलेट हटाएं?`,uln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iln(e):t==="fa"?aln(e):t==="ar"?oln(e):t==="es"?cln(e):t==="hi"?lln(e):sln(e)}),_ln=e=>`Delete template ${e==null?void 0:e.name}`,fln=e=>`删除模板 ${e==null?void 0:e.name}`,dln=e=>`حذف قالب ${e==null?void 0:e.name}`,hln=e=>`حذف القالب ${e==null?void 0:e.name}`,pln=e=>`Eliminar la plantilla ${e==null?void 0:e.name}`,mln=e=>`${e==null?void 0:e.name} टेम्पलेट हटाएं`,gln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fln(e):t==="fa"?dln(e):t==="ar"?hln(e):t==="es"?pln(e):t==="hi"?mln(e):_ln(e)}),vln=()=>"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.",bln=()=>"在聊天中使用 /name 调用技能。来自编程代理的技能会先经过研究相关性筛选,再导入。您也可以自行上传技能,或让 OpenResearch 代理为您创建并添加可复用技能。",yln=()=>"مهارت‌ها را با /name در گفتگو فراخوانی کنید. مهارت‌های عامل‌های برنامه‌نویسی پیش از وارد شدن از نظر ارتباط با پژوهش بررسی می‌شوند. می‌توانید مهارت را خودتان بارگذاری کنید یا از عامل OpenResearch بخواهید یک مهارت قابل استفادهٔ مجدد بسازد و اضافه کند.",xln=()=>"استدعِ المهارات عبر ‎/name‎ في المحادثة. تُفحَص مهارات وكلاء البرمجة لديك للتأكد من صلتها بالبحث قبل استيرادها. ارفع مهارة لتضمينها بنفسك. أو بدلًا من ذلك، اطلب من وكيل OpenResearch إنشاء مهارة قابلة لإعادة الاستخدام وإضافتها لك.",wln=()=>"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.",kln=()=>"चैट में /नाम से स्किल इस्तेमाल करें। आपके कोडिंग एजेंटों की स्किल इंपोर्ट करने से पहले शोध प्रासंगिकता के लिए जाँची जाती हैं। खुद स्किल शामिल करने के लिए एक अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल बनाने और जोड़ने को कहें।",Sln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bln():t==="fa"?yln():t==="ar"?xln():t==="es"?wln():t==="hi"?kln():vln()}),Cln=()=>"Drop a SKILL.md or .zip here, or click to choose",Eln=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",Nln=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",zln=()=>"أفلِت ملف ‎SKILL.md‎ أو ‎.zip‎ هنا، أو انقر للاختيار",jln=()=>"Suelta aquí un SKILL.md o un .zip, o haz clic para elegirlo",Aln=()=>"यहाँ एक SKILL.md या .zip छोड़ें, या चुनने के लिए क्लिक करें",Tln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eln():t==="fa"?Nln():t==="ar"?zln():t==="es"?jln():t==="hi"?Aln():Cln()}),Rln=()=>"Drop a .tex or .zip here, or click to choose",Mln=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",Oln=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",Dln=()=>"أفلِت ملف ‎.tex‎ أو ‎.zip‎ هنا، أو انقر للاختيار",Lln=()=>"Suelta aquí un .tex o un .zip, o haz clic para elegirlo",Iln=()=>"यहाँ एक .tex या .zip छोड़ें, या चुनने के लिए क्लिक करें",$ln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mln():t==="fa"?Oln():t==="ar"?Dln():t==="es"?Lln():t==="hi"?Iln():Rln()}),Bln=()=>"File too large (max 20 MB).",Pln=()=>"文件过大(最大 20 MB)。",Fln=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",Hln=()=>"الملف كبير جدًا (بحد أقصى 20 ميغابايت).",qln=()=>"Archivo demasiado grande (máx. 20 MB).",Uln=()=>"फ़ाइल बहुत बड़ी है (अधिकतम 20 MB)।",xI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pln():t==="fa"?Fln():t==="ar"?Hln():t==="es"?qln():t==="hi"?Uln():Bln()}),Gln=()=>" + 1 file",Kln=()=>" + 1 个文件",Vln=()=>" + ۱ فایل",Wln=()=>" + ملف واحد",Qln=()=>" + 1 archivo",Xln=()=>" + 1 फ़ाइल",Yln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kln():t==="fa"?Vln():t==="ar"?Wln():t==="es"?Qln():t==="hi"?Xln():Gln()}),Zln=()=>"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.",Jln=()=>"自定义所有项目中可用的技能和 LaTeX 模板。在此上传,或让 OpenResearch 代理为您创建并添加。",eun=()=>"مهارت‌ها و قالب‌های LaTeX قابل استفاده در همهٔ پروژه‌ها را سفارشی کنید. آن‌ها را اینجا بارگذاری کنید یا از عامل OpenResearch بخواهید برایتان بسازد و اضافه کند.",tun=()=>"خصّص المهارات وقوالب LaTeX المتاحة عبر مشاريعك. ارفعها هنا، أو اطلب من وكيل OpenResearch إنشاءها وإضافتها لك.",nun=()=>"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.",run=()=>"अपने प्रोजेक्ट में उपलब्ध स्किल और LaTeX टेम्पलेट कस्टमाइज़ करें। उन्हें यहाँ अपलोड करें, या किसी OpenResearch एजेंट से आपके लिए उन्हें बनाने और जोड़ने को कहें।",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=()=>"Remove from OpenResearch",aun=()=>"从 OpenResearch 移除",oun=()=>"حذف از OpenResearch",cun=()=>"إزالة من OpenResearch",lun=()=>"Quitar de OpenResearch",uun=()=>"OpenResearch से हटाएं",_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=e=>`Remove “${e==null?void 0:e.name}” from OpenResearch? Its source files will remain in your coding agent.`,dun=e=>`从 OpenResearch 移除“${e==null?void 0:e.name}”?源文件将保留在你的编程智能体中。`,hun=e=>`«${e==null?void 0:e.name}» از OpenResearch حذف شود؟ فایل‌های اصلی در عامل برنامه‌نویسی شما باقی می‌مانند.`,pun=e=>`إزالة «${e==null?void 0:e.name}» من OpenResearch؟ ستبقى ملفاتها المصدرية في وكيل البرمجة الخاص بك.`,mun=e=>`¿Quitar “${e==null?void 0:e.name}” de OpenResearch? Sus archivos originales se conservarán en tu agente de programación.`,gun=e=>`“${e==null?void 0:e.name}” को OpenResearch से हटाएं? इसकी सोर्स फ़ाइलें आपके कोडिंग एजेंट में बनी रहेंगी।`,vun=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dun(e):t==="fa"?hun(e):t==="ar"?pun(e):t==="es"?mun(e):t==="hi"?gun(e):fun(e)}),bun=e=>`Remove ${e==null?void 0:e.name} from OpenResearch`,yun=e=>`从 OpenResearch 移除 ${e==null?void 0:e.name}`,xun=e=>`حذف ${e==null?void 0:e.name} از OpenResearch`,wun=e=>`إزالة ${e==null?void 0:e.name} من OpenResearch`,kun=e=>`Quitar ${e==null?void 0:e.name} de OpenResearch`,Sun=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं`,Cun=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?yun(e):t==="fa"?xun(e):t==="ar"?wun(e):t==="es"?kun(e):t==="hi"?Sun(e):bun(e)}),Eun=e=>` + ${e==null?void 0:e.count} files`,Nun=e=>` + ${e==null?void 0:e.count} 个文件`,zun=e=>` + ${e==null?void 0:e.count} فایل`,jun=e=>` + ملفات (${e==null?void 0:e.count})`,Aun=e=>` + ${e==null?void 0:e.count} archivos`,Tun=e=>` + ${e==null?void 0:e.count} फ़ाइलें`,Run=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nun(e):t==="fa"?zun(e):t==="ar"?jun(e):t==="es"?Aun(e):t==="hi"?Tun(e):Eun(e)}),Mun=()=>"Could not load skills:",Oun=()=>"无法加载技能:",Dun=()=>"بارگیری مهارت‌ها ممکن نشد:",Lun=()=>"تعذّر تحميل المهارات:",Iun=()=>"No se pudieron cargar las skills:",$un=()=>"स्किल लोड नहीं हो सकीं:",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=()=>"Could not load templates:",Fun=()=>"无法加载模板:",Hun=()=>"بارگیری قالب‌ها ممکن نشد:",qun=()=>"تعذّر تحميل القوالب:",Uun=()=>"No se pudieron cargar las plantillas:",Gun=()=>"टेम्पलेट लोड नहीं हो सके:",Kun=((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()}),Vun=()=>"Customize",Wun=()=>"自定义",Qun=()=>"سفارشی‌سازی",Xun=()=>"تخصيص",Yun=()=>"Personalizar",Zun=()=>"कस्टमाइज़ करें",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():Vun()}),e_n=()=>"Delete skill",t_n=()=>"删除技能",n_n=()=>"حذف مهارت",r_n=()=>"حذف المهارة",s_n=()=>"Eliminar skill",i_n=()=>"स्किल हटाएं",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=()=>"Delete template",c_n=()=>"删除模板",l_n=()=>"حذف قالب",u_n=()=>"حذف القالب",__n=()=>"Eliminar plantilla",f_n=()=>"टेम्पलेट हटाएं",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=()=>"LaTeX templates",p_n=()=>"LaTeX 模板",m_n=()=>"قالب‌های LaTeX",g_n=()=>"قوالب LaTeX",v_n=()=>"Plantillas de LaTeX",b_n=()=>"LaTeX टेम्पलेट",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=()=>"Loading skills…",w_n=()=>"正在加载技能…",k_n=()=>"در حال بارگیری مهارت‌ها…",S_n=()=>"جارٍ تحميل المهارات…",C_n=()=>"Cargando skills…",E_n=()=>"स्किल लोड हो रही हैं…",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=()=>"Loading templates…",j_n=()=>"正在加载模板…",A_n=()=>"در حال بارگیری قالب‌ها…",T_n=()=>"جارٍ تحميل القوالب…",R_n=()=>"Cargando plantillas…",M_n=()=>"टेम्पलेट लोड हो रहे हैं…",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=()=>"No skills yet.",L_n=()=>"尚无技能。",I_n=()=>"هنوز مهارتی وجود ندارد.",$_n=()=>"لا توجد مهارات بعد.",B_n=()=>"Aún no hay skills.",P_n=()=>"अभी तक कोई स्किल नहीं।",F_n=((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()}),H_n=()=>"No templates yet.",q_n=()=>"尚无模板。",U_n=()=>"هنوز قالبی وجود ندارد.",G_n=()=>"لا توجد قوالب بعد.",K_n=()=>"Aún no hay plantillas.",V_n=()=>"अभी तक कोई टेम्पलेट नहीं।",W_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q_n():t==="fa"?U_n():t==="ar"?G_n():t==="es"?K_n():t==="hi"?V_n():H_n()}),Q_n=()=>"Skills",X_n=()=>"技能",Y_n=()=>"مهارت‌ها",Z_n=()=>"المهارات",J_n=()=>"Skills",efn=()=>"स्किल",tfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X_n():t==="fa"?Y_n():t==="ar"?Z_n():t==="es"?J_n():t==="hi"?efn():Q_n()}),nfn=()=>"Uploading…",rfn=()=>"正在上传…",sfn=()=>"در حال بارگذاری…",ifn=()=>"جارٍ الرفع…",afn=()=>"Subiendo…",ofn=()=>"अपलोड हो रहा है…",cfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rfn():t==="fa"?sfn():t==="ar"?ifn():t==="es"?afn():t==="hi"?ofn():nfn()}),lfn=()=>"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.",ufn=()=>"代理撰写论文时使用的会议格式或自定义样式,用于替代默认导言区。上传 .tex 文件或包含 .cls 和 .sty 文件的 .zip 压缩包,也可以让 OpenResearch 代理为您创建并添加 LaTeX 模板。只有一个模板可用时,代理会直接使用,无需询问。",_fn=()=>"قالب کنفرانس یا سبک اختصاصی که عامل به‌جای پیش‌گفتار پیش‌فرض برای نوشتن مقاله استفاده می‌کند. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید، یا از عامل OpenResearch بخواهید قالب LaTeX بسازد و اضافه کند. اگر تنها یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",ffn=()=>"قالب مؤتمر أو تنسيق خاص بالمؤسسة يستخدمه الوكيل لكتابة الأوراق بدلًا من إعدادات LaTeX الافتراضية. ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ يحتوي على ملفات ‎.cls‎ و‎.sty‎ الخاصة به. أو اطلب من وكيل OpenResearch إنشاء قالب LaTeX وإضافته لك. عند توفّر قالب واحد فقط، يستخدمه الوكيل دون سؤال.",dfn=()=>"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.",hfn=()=>"एक कॉन्फ़्रेंस क्लास या हाउस स्टाइल जिसमें एजेंट अपने डिफ़ॉल्ट प्रीएंबल की बजाय पेपर लिखता है। एक .tex फ़ाइल या उसकी .cls और .sty फ़ाइलों वाली .zip अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक LaTeX टेम्पलेट बनाने और जोड़ने को कहें। ठीक एक टेम्पलेट उपलब्ध होने पर, एजेंट बिना पूछे उसी का इस्तेमाल करता है।",pfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ufn():t==="fa"?_fn():t==="ar"?ffn():t==="es"?dfn():t==="hi"?hfn():lfn()}),mfn=()=>"Upload a SKILL.md file or a .zip of a skill folder.",gfn=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",vfn=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",bfn=()=>"ارفع ملف ‎SKILL.md‎ أو ملف ‎.zip‎ لمجلد مهارة.",yfn=()=>"Sube un archivo SKILL.md o un .zip con la carpeta de la skill.",xfn=()=>"एक SKILL.md फ़ाइल या स्किल फ़ोल्डर की .zip अपलोड करें।",wfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gfn():t==="fa"?vfn():t==="ar"?bfn():t==="es"?yfn():t==="hi"?xfn():mfn()}),kfn=()=>"Upload a .tex file or a .zip of a template folder.",Sfn=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",Cfn=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",Efn=()=>"ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ لمجلد قالب.",Nfn=()=>"Sube un archivo .tex o un .zip con la carpeta de la plantilla.",zfn=()=>"एक .tex फ़ाइल या टेम्पलेट फ़ोल्डर की .zip अपलोड करें।",jfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sfn():t==="fa"?Cfn():t==="ar"?Efn():t==="es"?Nfn():t==="hi"?zfn():kfn()}),Afn=()=>"Close SSH config",Tfn=()=>"关闭 SSH 配置",Rfn=()=>"بستن پیکربندی SSH",Mfn=()=>"إغلاق إعداد SSH",Ofn=()=>"Cerrar la configuración SSH",Dfn=()=>"SSH कॉन्फ़िग बंद करें",Lfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tfn():t==="fa"?Rfn():t==="ar"?Mfn():t==="es"?Ofn():t==="hi"?Dfn():Afn()}),Ifn=()=>"Discard your unsaved SSH config changes?",$fn=()=>"要放弃未保存的 SSH 配置更改吗?",Bfn=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",Pfn=()=>"تجاهل تغييرات إعداد SSH غير المحفوظة؟",Ffn=()=>"¿Descartar los cambios sin guardar en la configuración SSH?",Hfn=()=>"आपके सेव न किए गए SSH कॉन्फ़िग बदलाव छोड़ें?",qfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$fn():t==="fa"?Bfn():t==="ar"?Pfn():t==="es"?Ffn():t==="hi"?Hfn():Ifn()}),Ufn=()=>"Loading SSH config…",Gfn=()=>"正在加载 SSH 配置…",Kfn=()=>"در حال بارگیری پیکربندی SSH…",Vfn=()=>"جارٍ تحميل إعداد SSH…",Wfn=()=>"Cargando la configuración SSH…",Qfn=()=>"SSH कॉन्फ़िग लोड हो रहा है…",Xfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gfn():t==="fa"?Kfn():t==="ar"?Vfn():t==="es"?Wfn():t==="hi"?Qfn():Ufn()}),Yfn=()=>"SSH config saved",Zfn=()=>"SSH 配置已保存",Jfn=()=>"پیکربندی SSH ذخیره شد",edn=()=>"تم حفظ إعداد SSH",tdn=()=>"Configuración SSH guardada",ndn=()=>"SSH कॉन्फ़िग सेव हो गया",rdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zfn():t==="fa"?Jfn():t==="ar"?edn():t==="es"?tdn():t==="hi"?ndn():Yfn()}),sdn=()=>"SSH config",idn=()=>"SSH 配置",adn=()=>"پیکربندی SSH",odn=()=>"إعداد SSH",cdn=()=>"Configuración SSH",ldn=()=>"SSH कॉन्फ़िग",udn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?idn():t==="fa"?adn():t==="ar"?odn():t==="es"?cdn():t==="hi"?ldn():sdn()}),_dn=()=>"Configure SSH hosts…",fdn=()=>"配置 SSH 主机…",ddn=()=>"پیکربندی میزبان‌های SSH…",hdn=()=>"إعداد مضيفات SSH…",pdn=()=>"Configurar hosts SSH…",mdn=()=>"SSH होस्ट कॉन्फ़िगर करें…",wI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fdn():t==="fa"?ddn():t==="ar"?hdn():t==="es"?pdn():t==="hi"?mdn():_dn()}),gdn=()=>"Container name or ID",vdn=()=>"容器名称或 ID",bdn=()=>"نام یا شناسهٔ کانتینر",ydn=()=>"اسم الحاوية أو معرّفها",xdn=()=>"Nombre o ID del contenedor",wdn=()=>"कंटेनर का नाम या ID",kdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vdn():t==="fa"?bdn():t==="ar"?ydn():t==="es"?xdn():t==="hi"?wdn():gdn()}),Sdn=()=>"Default SSH host",Cdn=()=>"默认 SSH 主机",Edn=()=>"میزبان پیش‌فرض SSH",Ndn=()=>"مضيف SSH الافتراضي",zdn=()=>"Servidor SSH predeterminado",jdn=()=>"डिफ़ॉल्ट SSH होस्ट",Adn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cdn():t==="fa"?Edn():t==="ar"?Ndn():t==="es"?zdn():t==="hi"?jdn():Sdn()}),Tdn=()=>"Direct host",Rdn=()=>"直接在主机上",Mdn=()=>"مستقیماً روی میزبان",Odn=()=>"المضيف مباشرة",Ddn=()=>"Servidor directamente",Ldn=()=>"सीधे होस्ट पर",Idn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rdn():t==="fa"?Mdn():t==="ar"?Odn():t==="es"?Ddn():t==="hi"?Ldn():Tdn()}),$dn=()=>"Existing container",Bdn=()=>"现有容器",Pdn=()=>"کانتینر موجود",Fdn=()=>"حاوية موجودة",Hdn=()=>"Contenedor existente",qdn=()=>"मौजूदा कंटेनर",Udn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bdn():t==="fa"?Pdn():t==="ar"?Fdn():t==="es"?Hdn():t==="hi"?qdn():$dn()}),Gdn=()=>"Run in",Kdn=()=>"运行位置",Vdn=()=>"اجرا در",Wdn=()=>"التشغيل في",Qdn=()=>"Ejecutar en",Xdn=()=>"यहाँ चलाएँ",Ydn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kdn():t==="fa"?Vdn():t==="ar"?Wdn():t==="es"?Qdn():t==="hi"?Xdn():Gdn()}),Zdn=()=>"Cancelled",Jdn=()=>"已取消",ehn=()=>"لغوشده",thn=()=>"ملغى",nhn=()=>"Cancelado",rhn=()=>"रद्द किया गया",shn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jdn():t==="fa"?ehn():t==="ar"?thn():t==="es"?nhn():t==="hi"?rhn():Zdn()}),ihn=()=>"Cancelling",ahn=()=>"正在取消",ohn=()=>"در حال لغو",chn=()=>"جارٍ الإلغاء",lhn=()=>"Cancelando",uhn=()=>"रद्द हो रहा है",_hn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ahn():t==="fa"?ohn():t==="ar"?chn():t==="es"?lhn():t==="hi"?uhn():ihn()}),fhn=()=>"Done",dhn=()=>"已完成",hhn=()=>"انجام‌شده",phn=()=>"تم",mhn=()=>"Completado",ghn=()=>"पूरा हुआ",kI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dhn():t==="fa"?hhn():t==="ar"?phn():t==="es"?mhn():t==="hi"?ghn():fhn()}),vhn=()=>"Editing",bhn=()=>"正在编辑",yhn=()=>"در حال ویرایش",xhn=()=>"قيد التعديل",whn=()=>"Editando",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=()=>"Failed",Ehn=()=>"失败",Nhn=()=>"ناموفق",zhn=()=>"فشل",jhn=()=>"Error",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=()=>"Idle",Mhn=()=>"空闲",Ohn=()=>"بی‌کار",Dhn=()=>"خامل",Lhn=()=>"Inactivo",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=()=>"Running",Phn=()=>"运行中",Fhn=()=>"در حال اجرا",Hhn=()=>"قيد التشغيل",qhn=()=>"En ejecución",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()}),Khn=()=>"Starting",Vhn=()=>"正在启动",Whn=()=>"در حال آغاز",Qhn=()=>"جارٍ البدء",Xhn=()=>"Iniciando",Yhn=()=>"शुरू हो रहा है",Zhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vhn():t==="fa"?Whn():t==="ar"?Qhn():t==="es"?Xhn():t==="hi"?Yhn():Khn()}),Jhn=()=>"Copying…",epn=()=>"正在复制…",tpn=()=>"در حال کپی…",npn=()=>"جارٍ النسخ…",rpn=()=>"Copiando…",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=()=>"Finalizing…",opn=()=>"正在完成…",cpn=()=>"در حال نهایی‌سازی…",lpn=()=>"جارٍ الإنهاء…",upn=()=>"Finalizando…",_pn=()=>"अंतिम रूप दिया जा रहा है…",fpn=((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()}),dpn=e=>`${e==null?void 0:e.size} free at target`,hpn=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,ppn=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,mpn=e=>`${e==null?void 0:e.size} متاح في الوجهة`,gpn=e=>`${e==null?void 0:e.size} libres en el destino`,vpn=e=>`गंतव्य पर ${e==null?void 0:e.size} खाली`,bpn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hpn(e):t==="fa"?ppn(e):t==="ar"?mpn(e):t==="es"?gpn(e):t==="hi"?vpn(e):dpn(e)}),ypn=e=>`Move all orx data to: +इसका ट्रांसक्रिप्ट स्थायी रूप से हट जाएगा।`,I1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?R1e(e):t==="fa"?M1e(e):t==="ar"?O1e(e):t==="es"?D1e(e):t==="hi"?L1e(e):T1e(e)}),$1e=e=>`Failed to delete “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,B1e=e=>`删除“${e==null?void 0:e.title}”失败:${e==null?void 0:e.error}`,P1e=e=>`حذف «${e==null?void 0:e.title}» ناموفق بود: ${e==null?void 0:e.error}`,F1e=e=>`تعذّر حذف «${e==null?void 0:e.title}»: ${e==null?void 0:e.error}`,H1e=e=>`No se pudo eliminar “${e==null?void 0:e.title}”: ${e==null?void 0:e.error}`,q1e=e=>`“${e==null?void 0:e.title}” हटाने में विफल: ${e==null?void 0:e.error}`,U1e=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?B1e(e):t==="fa"?P1e(e):t==="ar"?F1e(e):t==="es"?H1e(e):t==="hi"?q1e(e):$1e(e)}),G1e=()=>"Could not exit Plan mode. Try again.",V1e=()=>"无法退出计划模式。请重试。",K1e=()=>"خروج از حالت طرح ممکن نشد. دوباره تلاش کنید.",W1e=()=>"تعذّر الخروج من وضع التخطيط. حاول مجددًا.",Q1e=()=>"No se pudo salir del modo Plan. Inténtalo de nuevo.",X1e=()=>"प्लान मोड से बाहर नहीं निकला जा सका। फिर से कोशिश करें।",Y1e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V1e():t==="fa"?K1e():t==="ar"?W1e():t==="es"?Q1e():t==="hi"?X1e():G1e()}),Z1e=()=>"Expand tool activity",J1e=()=>"展开工具活动",eve=()=>"باز کردن فعالیت ابزارها",tve=()=>"توسيع نشاط الأداة",nve=()=>"Expandir actividad de herramientas",rve=()=>"टूल गतिविधि फैलाएं",sve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J1e():t==="fa"?eve():t==="ar"?tve():t==="es"?nve():t==="hi"?rve():Z1e()}),ive=()=>"experiments",ave=()=>"实验",ove=()=>"آزمایش‌ها",cve=()=>"التجارب",lve=()=>"experimentos",uve=()=>"प्रयोग",_ve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ave():t==="fa"?ove():t==="ar"?cve():t==="es"?lve():t==="hi"?uve():ive()}),fve=()=>"You",dve=()=>"你",hve=()=>"شما",pve=()=>"أنت",mve=()=>"Tú",gve=()=>"आप",vve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dve():t==="fa"?hve():t==="ar"?pve():t==="es"?mve():t==="hi"?gve():fve()}),bve=()=>"Goal cleared",yve=()=>"已清除目标",xve=()=>"هدف پاک شد",wve=()=>"تم مسح الهدف",kve=()=>"Objetivo borrado",Sve=()=>"लक्ष्य हटाया गया",Cve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yve():t==="fa"?xve():t==="ar"?wve():t==="es"?kve():t==="hi"?Sve():bve()}),Eve=e=>`Current goal: ${e==null?void 0:e.goal}`,Nve=e=>`当前目标:${e==null?void 0:e.goal}`,zve=e=>`هدف فعلی: ${e==null?void 0:e.goal}`,jve=e=>`الهدف الحالي: ${e==null?void 0:e.goal}`,Ave=e=>`Objetivo actual: ${e==null?void 0:e.goal}`,Tve=e=>`मौजूदा लक्ष्य: ${e==null?void 0:e.goal}`,Rve=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nve(e):t==="fa"?zve(e):t==="ar"?jve(e):t==="es"?Ave(e):t==="hi"?Tve(e):Eve(e)}),Mve=e=>`Setting the goal failed: ${e==null?void 0:e.error}`,Ove=e=>`设置目标失败:${e==null?void 0:e.error}`,Dve=e=>`تنظیم هدف ناموفق بود: ${e==null?void 0:e.error}`,Lve=e=>`فشل تعيين الهدف: ${e==null?void 0:e.error}`,Ive=e=>`Error al definir el objetivo: ${e==null?void 0:e.error}`,$ve=e=>`लक्ष्य सेट करना विफल: ${e==null?void 0:e.error}`,DN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Ove(e):t==="fa"?Dve(e):t==="ar"?Lve(e):t==="es"?Ive(e):t==="hi"?$ve(e):Mve(e)}),Bve=()=>"No goal set — add one after /goal",Pve=()=>"尚未设置目标 — 在 /goal 后面写一个",Fve=()=>"هدفی تنظیم نشده — یکی را بعد از /goal بنویسید",Hve=()=>"لا يوجد هدف — أضف واحدًا بعد /goal",qve=()=>"Sin objetivo — añade uno después de /goal",Uve=()=>"कोई लक्ष्य नहीं — /goal के बाद एक जोड़ें",Gve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pve():t==="fa"?Fve():t==="ar"?Hve():t==="es"?qve():t==="hi"?Uve():Bve()}),Vve=()=>"Goal set",Kve=()=>"已设置目标",Wve=()=>"هدف تنظیم شد",Qve=()=>"تم تعيين الهدف",Xve=()=>"Objetivo definido",Yve=()=>"लक्ष्य सेट किया गया",Zve=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kve():t==="fa"?Wve():t==="ar"?Qve():t==="es"?Xve():t==="hi"?Yve():Vve()}),Jve=e=>`${e==null?void 0:e.harness} is unavailable — open the model picker`,ebe=e=>`${e==null?void 0:e.harness} 不可用 — 请打开模型选择器`,tbe=e=>`در حال حاضر ${e==null?void 0:e.harness} در دسترس نیست — انتخاب‌گر مدل را باز کنید`,nbe=e=>`${e==null?void 0:e.harness} غير متاح — افتح مُنتقي النماذج`,rbe=e=>`${e==null?void 0:e.harness} no está disponible — abre el selector de modelos`,sbe=e=>`${e==null?void 0:e.harness} उपलब्ध नहीं है — मॉडल पिकर खोलें`,ibe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ebe(e):t==="fa"?tbe(e):t==="ar"?nbe(e):t==="es"?rbe(e):t==="hi"?sbe(e):Jve(e)}),abe=e=>`Importing that chat failed: ${e==null?void 0:e.error}`,obe=e=>`导入该聊天失败:${e==null?void 0:e.error}`,cbe=e=>`وارد کردن آن گفت‌وگو ناموفق بود: ${e==null?void 0:e.error}`,lbe=e=>`فشل استيراد تلك المحادثة: ${e==null?void 0:e.error}`,ube=e=>`Error al importar ese chat: ${e==null?void 0:e.error}`,_be=e=>`उस चैट को इम्पोर्ट करना विफल: ${e==null?void 0:e.error}`,fbe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?obe(e):t==="fa"?cbe(e):t==="ar"?lbe(e):t==="es"?ube(e):t==="hi"?_be(e):abe(e)}),dbe=e=>`Message ${e==null?void 0:e.harness}… (/ for commands and skills, ! for shell)`,hbe=e=>`给 ${e==null?void 0:e.harness} 发消息…(输入 / 使用命令和技能,输入 ! 运行 shell)`,pbe=e=>`پیام به ${e==null?void 0:e.harness}… (/ برای فرمان‌ها و مهارت‌ها، ! برای شل)`,mbe=e=>`راسِل ${e==null?void 0:e.harness}… (/ للأوامر والمهارات، ! للطرفية)`,gbe=e=>`Escribe a ${e==null?void 0:e.harness}… (/ para comandos y skills, ! para la shell)`,vbe=e=>`${e==null?void 0:e.harness} को संदेश भेजें… (कमांड और स्किल के लिए /, शेल के लिए !)`,bbe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hbe(e):t==="fa"?pbe(e):t==="ar"?mbe(e):t==="es"?gbe(e):t==="hi"?vbe(e):dbe(e)}),ybe=e=>`Message not sent: ${e==null?void 0:e.error}`,xbe=e=>`消息未发送:${e==null?void 0:e.error}`,wbe=e=>`پیام ارسال نشد: ${e==null?void 0:e.error}`,kbe=e=>`لم تُرسل الرسالة: ${e==null?void 0:e.error}`,Sbe=e=>`Mensaje no enviado: ${e==null?void 0:e.error}`,Cbe=e=>`संदेश नहीं भेजा गया: ${e==null?void 0:e.error}`,Ebe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xbe(e):t==="fa"?wbe(e):t==="ar"?kbe(e):t==="es"?Sbe(e):t==="hi"?Cbe(e):ybe(e)}),Nbe=()=>"Model unavailable",zbe=()=>"模型不可用",jbe=()=>"مدل در دسترس نیست",Abe=()=>"النموذج غير متاح",Tbe=()=>"Modelo no disponible",Rbe=()=>"मॉडल उपलब्ध नहीं",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=()=>"New session",Dbe=()=>"新会话",Lbe=()=>"نشست جدید",Ibe=()=>"جلسة جديدة",$be=()=>"Nueva sesión",Bbe=()=>"नया सेशन",LN=((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=()=>"No active sessions",Fbe=()=>"没有活跃会话",Hbe=()=>"نشست فعالی وجود ندارد",qbe=()=>"لا توجد جلسات نشطة",Ube=()=>"No hay sesiones activas",Gbe=()=>"कोई सक्रिय सेशन नहीं",Vbe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fbe():t==="fa"?Hbe():t==="ar"?qbe():t==="es"?Ube():t==="hi"?Gbe():Pbe()}),Kbe=()=>"No activity",Wbe=()=>"无活动",Qbe=()=>"بدون فعالیت",Xbe=()=>"لا يوجد نشاط",Ybe=()=>"Sin actividad",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()}),eye=()=>"No archived sessions",tye=()=>"没有已归档的会话",nye=()=>"نشست بایگانی‌شده‌ای وجود ندارد",rye=()=>"لا توجد جلسات مؤرشفة",sye=()=>"No hay sesiones archivadas",iye=()=>"कोई आर्काइव किया गया सेशन नहीं",aye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tye():t==="fa"?nye():t==="ar"?rye():t==="es"?sye():t==="hi"?iye():eye()}),oye=()=>"No sessions yet",cye=()=>"还没有会话",lye=()=>"هنوز نشستی وجود ندارد",uye=()=>"لا توجد جلسات بعد",_ye=()=>"Aún no hay sesiones",fye=()=>"अभी तक कोई सेशन नहीं",dye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cye():t==="fa"?lye():t==="ar"?uye():t==="es"?_ye():t==="hi"?fye():oye()}),hye=()=>"There is nothing to compact yet",pye=()=>"还没有可压缩的内容",mye=()=>"هنوز چیزی برای فشرده‌سازی وجود ندارد",gye=()=>"لا يوجد شيء لضغطه بعد",vye=()=>"Aún no hay nada que comprimir",bye=()=>"छोटा करने के लिए अभी कुछ नहीं है",yye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pye():t==="fa"?mye():t==="ar"?gye():t==="es"?vye():t==="hi"?bye():hye()}),xye=()=>"No response to copy yet",wye=()=>"还没有可复制的回复",kye=()=>"هنوز پاسخی برای کپی وجود ندارد",Sye=()=>"لا يوجد رد لنسخه بعد",Cye=()=>"Aún no hay ninguna respuesta que copiar",Eye=()=>"कॉपी करने के लिए अभी कोई जवाब नहीं है",Nye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wye():t==="fa"?kye():t==="ar"?Sye():t==="es"?Cye():t==="hi"?Eye():xye()}),zye=()=>"Nothing to export yet",jye=()=>"还没有可导出的内容",Aye=()=>"هنوز چیزی برای خروجی گرفتن وجود ندارد",Tye=()=>"لا يوجد شيء لتصديره بعد",Rye=()=>"Aún no hay nada que exportar",Mye=()=>"एक्सपोर्ट करने के लिए अभी कुछ नहीं है",Oye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jye():t==="fa"?Aye():t==="ar"?Tye():t==="es"?Rye():t==="hi"?Mye():zye()}),Dye=()=>"1 annotation",Lye=()=>"1 条批注",Iye=()=>"۱ یادداشت",$ye=()=>"تعليق واحد",Bye=()=>"1 anotación",Pye=()=>"1 एनोटेशन",Fye=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lye():t==="fa"?Iye():t==="ar"?$ye():t==="es"?Bye():t==="hi"?Pye():Dye()}),Hye=()=>"Open sub-agent transcript",qye=()=>"打开子智能体记录",Uye=()=>"باز کردن متن گفت‌وگوی عامل فرعی",Gye=()=>"فتح سجل محادثة الوكيل الفرعي",Vye=()=>"Abrir la transcripción del subagente",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=()=>"About this demo",Xye=()=>"关于此演示",Yye=()=>"دربارهٔ این نسخهٔ نمایشی",Zye=()=>"حول هذا العرض التوضيحي",Jye=()=>"Acerca de esta demo",exe=()=>"इस डेमो के बारे में",IN=((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()}),txe=()=>"Accept and auto mode",nxe=()=>"接受并使用自动模式",rxe=()=>"پذیرش و حالت خودکار",sxe=()=>"قبول وتفعيل الوضع التلقائي",ixe=()=>"Aceptar en modo automático",axe=()=>"स्वीकार करें और ऑटो मोड",oxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nxe():t==="fa"?rxe():t==="ar"?sxe():t==="es"?ixe():t==="hi"?axe():txe()}),cxe=()=>"Accept and bypass all",lxe=()=>"接受并跳过所有审批",uxe=()=>"پذیرش و عبور از همهٔ تأییدها",_xe=()=>"القبول وتجاوز الكل",fxe=()=>"Aceptar y omitir permisos",dxe=()=>"स्वीकार करें और सब बायपास करें",hxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lxe():t==="fa"?uxe():t==="ar"?_xe():t==="es"?fxe():t==="hi"?dxe():cxe()}),pxe=()=>"Active",mxe=()=>"活跃",gxe=()=>"فعال",vxe=()=>"نشط",bxe=()=>"Activas",yxe=()=>"सक्रिय",xxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mxe():t==="fa"?gxe():t==="ar"?vxe():t==="es"?bxe():t==="hi"?yxe():pxe()}),wxe=()=>"All",kxe=()=>"全部",Sxe=()=>"همه",Cxe=()=>"الكل",Exe=()=>"Todas",Nxe=()=>"सभी",zxe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kxe():t==="fa"?Sxe():t==="ar"?Cxe():t==="es"?Exe():t==="hi"?Nxe():wxe()}),jxe=()=>"Allow",Axe=()=>"允许",Txe=()=>"اجازه دادن",Rxe=()=>"السماح",Mxe=()=>"Permitir",Oxe=()=>"अनुमति दें",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=()=>"Approval required",Ixe=()=>"需要批准",$xe=()=>"نیازمند تأیید",Bxe=()=>"الموافقة مطلوبة",Pxe=()=>"Aprobación necesaria",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=()=>"Archived",Uxe=()=>"已归档",Gxe=()=>"بایگانی‌شده",Vxe=()=>"مؤرشف",Kxe=()=>"Archivadas",Wxe=()=>"आर्काइव किया गया",$N=((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()}),Qxe=()=>"Ask about this",Xxe=()=>"询问此内容",Yxe=()=>"دربارهٔ این بپرسید",Zxe=()=>"اسأل عن هذا",Jxe=()=>"Preguntar sobre esto",e2e=()=>"इसके बारे में पूछें",t2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xxe():t==="fa"?Yxe():t==="ar"?Zxe():t==="es"?Jxe():t==="hi"?e2e():Qxe()}),n2e=()=>"Attach a PDF or image",r2e=()=>"附加 PDF 或图片",s2e=()=>"پیوست PDF یا تصویر",i2e=()=>"إرفاق ملف PDF أو صورة",a2e=()=>"Adjuntar un PDF o una imagen",o2e=()=>"PDF या इमेज अटैच करें",BN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r2e():t==="fa"?s2e():t==="ar"?i2e():t==="es"?a2e():t==="hi"?o2e():n2e()}),c2e=()=>"Bash",l2e=()=>"Bash",u2e=()=>"Bash",_2e=()=>"Bash",f2e=()=>"Bash",d2e=()=>"Bash",uL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l2e():t==="fa"?u2e():t==="ar"?_2e():t==="es"?f2e():t==="hi"?d2e():c2e()}),h2e=()=>"Browsed the web",p2e=()=>"已浏览网页",m2e=()=>"وب مرور شد",g2e=()=>"تصفّح الويب",v2e=()=>"Navegó por la web",b2e=()=>"वेब ब्राउज़ किया",PN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p2e():t==="fa"?m2e():t==="ar"?g2e():t==="es"?v2e():t==="hi"?b2e():h2e()}),y2e=()=>"Built the project",x2e=()=>"已构建项目",w2e=()=>"پروژه ساخته شد",k2e=()=>"بنى المشروع",S2e=()=>"Compiló el proyecto",C2e=()=>"प्रोजेक्ट बिल्ड किया",E2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x2e():t==="fa"?w2e():t==="ar"?k2e():t==="es"?S2e():t==="hi"?C2e():y2e()}),N2e=()=>"Cancel",z2e=()=>"取消",j2e=()=>"لغو",A2e=()=>"إلغاء",T2e=()=>"Cancelar",R2e=()=>"रद्द करें",M2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z2e():t==="fa"?j2e():t==="ar"?A2e():t==="es"?T2e():t==="hi"?R2e():N2e()}),O2e=()=>"Cancelled an experiment run",D2e=()=>"已取消实验运行",L2e=()=>"اجرای آزمایش لغو شد",I2e=()=>"ألغى تشغيل تجربة",$2e=()=>"Canceló una ejecución de experimento",B2e=()=>"एक प्रयोग रन रद्द किया",P2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D2e():t==="fa"?L2e():t==="ar"?I2e():t==="es"?$2e():t==="hi"?B2e():O2e()}),F2e=()=>"Checked code style",H2e=()=>"已检查代码风格",q2e=()=>"سبک کد بررسی شد",U2e=()=>"فحص نمط الشيفرة",G2e=()=>"Revisó el estilo del código",V2e=()=>"कोड स्टाइल जाँची",K2e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H2e():t==="fa"?q2e():t==="ar"?U2e():t==="es"?G2e():t==="hi"?V2e():F2e()}),W2e=()=>"Checked compute options",Q2e=()=>"已检查算力选项",X2e=()=>"گزینه‌های رایانشی بررسی شد",Y2e=()=>"فحص خيارات الحوسبة",Z2e=()=>"Consultó las opciones de cómputo",J2e=()=>"कंप्यूट विकल्प जाँचे",ewe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q2e():t==="fa"?X2e():t==="ar"?Y2e():t==="es"?Z2e():t==="hi"?J2e():W2e()}),twe=()=>"Checked experiment status",nwe=()=>"已检查实验状态",rwe=()=>"وضعیت آزمایش بررسی شد",swe=()=>"فحص حالة التجربة",iwe=()=>"Consultó el estado del experimento",awe=()=>"प्रयोग की स्थिति जाँची",FN=((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()}),owe=()=>"Checked Git status",cwe=()=>"已检查 Git 状态",lwe=()=>"وضعیت Git بررسی شد",uwe=()=>"فحص حالة Git",_we=()=>"Consultó el estado de Git",fwe=()=>"Git स्थिति जाँची",dwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cwe():t==="fa"?lwe():t==="ar"?uwe():t==="es"?_we():t==="hi"?fwe():owe()}),hwe=()=>"Checked local times",pwe=()=>"已查询当地时间",mwe=()=>"زمان‌های محلی بررسی شد",gwe=()=>"فحص التوقيتات المحلية",vwe=()=>"Consultó horas locales",bwe=()=>"स्थानीय समय जाँचे",ywe=((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()}),xwe=()=>"Checked market data",wwe=()=>"已查询市场数据",kwe=()=>"داده‌های بازار بررسی شد",Swe=()=>"فحص بيانات السوق",Cwe=()=>"Consultó datos de mercado",Ewe=()=>"बाज़ार डेटा जाँचा",Nwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wwe():t==="fa"?kwe():t==="ar"?Swe():t==="es"?Cwe():t==="hi"?Ewe():xwe()}),zwe=()=>"Checked sports data",jwe=()=>"已查询体育数据",Awe=()=>"داده‌های ورزشی بررسی شد",Twe=()=>"فحص البيانات الرياضية",Rwe=()=>"Consultó datos deportivos",Mwe=()=>"खेल डेटा जाँचा",Owe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jwe():t==="fa"?Awe():t==="ar"?Twe():t==="es"?Rwe():t==="hi"?Mwe():zwe()}),Dwe=()=>"Checked the weather",Lwe=()=>"已查询天气",Iwe=()=>"آب‌وهوا بررسی شد",$we=()=>"فحص حالة الطقس",Bwe=()=>"Consultó el tiempo",Pwe=()=>"मौसम जाँचा",Fwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lwe():t==="fa"?Iwe():t==="ar"?$we():t==="es"?Bwe():t==="hi"?Pwe():Dwe()}),Hwe=()=>"Checked types",qwe=()=>"已检查类型",Uwe=()=>"نوع‌ها بررسی شد",Gwe=()=>"فحص الأنواع",Vwe=()=>"Comprobó los tipos",Kwe=()=>"टाइप जाँचे",Wwe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qwe():t==="fa"?Uwe():t==="ar"?Gwe():t==="es"?Vwe():t==="hi"?Kwe():Hwe()}),Qwe=()=>"Clear annotations",Xwe=()=>"清除批注",Ywe=()=>"پاک کردن یادداشت‌ها",Zwe=()=>"مسح التعليقات",Jwe=()=>"Borrar anotaciones",e4e=()=>"एनोटेशन साफ़ करें",HN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xwe():t==="fa"?Ywe():t==="ar"?Zwe():t==="es"?Jwe():t==="hi"?e4e():Qwe()}),t4e=e=>`Clear the goal: ${e==null?void 0:e.goal}`,n4e=e=>`清除目标:${e==null?void 0:e.goal}`,r4e=e=>`پاک‌کردن هدف: ${e==null?void 0:e.goal}`,s4e=e=>`مسح الهدف: ${e==null?void 0:e.goal}`,i4e=e=>`Borrar el objetivo: ${e==null?void 0:e.goal}`,a4e=e=>`लक्ष्य हटाएँ: ${e==null?void 0:e.goal}`,qN=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?n4e(e):t==="fa"?r4e(e):t==="ar"?s4e(e):t==="es"?i4e(e):t==="hi"?a4e(e):t4e(e)}),o4e=()=>"Customize",c4e=()=>"自定义",l4e=()=>"سفارشی‌سازی",u4e=()=>"تخصيص",_4e=()=>"Personalizar",f4e=()=>"कस्टमाइज़ करें",d4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c4e():t==="fa"?l4e():t==="ar"?u4e():t==="es"?_4e():t==="hi"?f4e():o4e()}),h4e=()=>"Data sources",p4e=()=>"数据源",m4e=()=>"منابع داده",g4e=()=>"مصادر البيانات",v4e=()=>"Fuentes de datos",b4e=()=>"डेटा स्रोत",_w=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p4e():t==="fa"?m4e():t==="ar"?g4e():t==="es"?v4e():t==="hi"?b4e():h4e()}),y4e=()=>"Delegated a task to a new agent",x4e=()=>"已将任务委派给新智能体",w4e=()=>"وظیفه به عامل جدید واگذار شد",k4e=()=>"فوّض مهمة إلى وكيل جديد",S4e=()=>"Delegó una tarea a un nuevo agente",C4e=()=>"एक नए एजेंट को टास्क सौंपा",E4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x4e():t==="fa"?w4e():t==="ar"?k4e():t==="es"?S4e():t==="hi"?C4e():y4e()}),N4e=()=>"Delete",z4e=()=>"删除",j4e=()=>"حذف",A4e=()=>"حذف",T4e=()=>"Eliminar",R4e=()=>"हटाएं",_L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z4e():t==="fa"?j4e():t==="ar"?A4e():t==="es"?T4e():t==="hi"?R4e():N4e()}),M4e=()=>"This prompt runs a small 200-step training probe on your machine. Hit enter to get started.",O4e=()=>"这条提示会在你的机器上运行一个小型 200 步训练探测。按 Enter 开始。",D4e=()=>"این پیام یک کاوش آموزشی کوچک ۲۰۰ مرحله‌ای روی دستگاه شما اجرا می‌کند. برای شروع Enter را بزنید.",L4e=()=>"يشغّل هذا الطلب اختبار تدريب صغيرًا من 200 خطوة على جهازك. اضغط Enter للبدء.",I4e=()=>"Este prompt ejecuta en tu equipo una pequeña prueba de entrenamiento de 200 pasos. Pulsa Intro para empezar.",$4e=()=>"यह प्रॉम्प्ट आपकी मशीन पर एक छोटा 200-स्टेप ट्रेनिंग परीक्षण चलाता है। शुरू करने के लिए एंटर दबाएं।",B4e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O4e():t==="fa"?D4e():t==="ar"?L4e():t==="es"?I4e():t==="hi"?$4e():M4e()}),P4e=()=>"to monitor it.",F4e=()=>"以查看进度。",H4e=()=>"بزنید.",q4e=()=>"لمتابعتها.",U4e=()=>"para seguirlo.",G4e=()=>"इस पर नज़र रखने के लिए।",UN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F4e():t==="fa"?H4e():t==="ar"?q4e():t==="es"?U4e():t==="hi"?G4e():P4e()}),V4e=()=>"The experiment is now running. Tap",K4e=()=>"实验正在运行。点按",W4e=()=>"آزمایش اکنون در حال اجراست. برای پیگیری روی",Q4e=()=>"التجربة قيد التشغيل الآن. اضغط على",X4e=()=>"El experimento ya se está ejecutando. Pulsa",Y4e=()=>"प्रयोग अब चल रहा है। टैप करें",GN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K4e():t==="fa"?W4e():t==="ar"?Q4e():t==="es"?X4e():t==="hi"?Y4e():V4e()}),Z4e=()=>"Deny",J4e=()=>"拒绝",e3e=()=>"رد کردن",t3e=()=>"رفض",n3e=()=>"Denegar",r3e=()=>"अस्वीकार करें",s3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J4e():t==="fa"?e3e():t==="ar"?t3e():t==="es"?n3e():t==="hi"?r3e():Z4e()}),i3e=()=>"Dismiss",a3e=()=>"关闭",o3e=()=>"بستن",c3e=()=>"إغلاق",l3e=()=>"Cerrar",u3e=()=>"खारिज करें",s1=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?a3e():t==="fa"?o3e():t==="ar"?c3e():t==="es"?l3e():t==="hi"?u3e():i3e()}),_3e=()=>"Edit and re-send",f3e=()=>"编辑并重新发送",d3e=()=>"ویرایش و ارسال دوباره",h3e=()=>"تعديل وإعادة الإرسال",p3e=()=>"Editar y reenviar",m3e=()=>"संपादित करें और फिर भेजें",VN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f3e():t==="fa"?d3e():t==="ar"?h3e():t==="es"?p3e():t==="hi"?m3e():_3e()}),g3e=()=>"Edit message",v3e=()=>"编辑消息",b3e=()=>"ویرایش پیام",y3e=()=>"تعديل الرسالة",x3e=()=>"Editar mensaje",w3e=()=>"संदेश संपादित करें",k3e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v3e():t==="fa"?b3e():t==="ar"?y3e():t==="es"?x3e():t==="hi"?w3e():g3e()}),S3e=()=>"Edited a file",C3e=()=>"已编辑文件",E3e=()=>"فایل ویرایش شد",N3e=()=>"عدّل ملفًا",z3e=()=>"Editó un archivo",j3e=()=>"एक फ़ाइल संपादित की",KN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C3e():t==="fa"?E3e():t==="ar"?N3e():t==="es"?z3e():t==="hi"?j3e():S3e()}),A3e=()=>"Exit Bash mode",T3e=()=>"退出 Bash 模式",R3e=()=>"خروج از حالت Bash",M3e=()=>"الخروج من وضع Bash",O3e=()=>"Salir del modo Bash",D3e=()=>"Bash मोड से बाहर निकलें",WN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T3e():t==="fa"?R3e():t==="ar"?M3e():t==="es"?O3e():t==="hi"?D3e():A3e()}),L3e=()=>"Exit Plan mode",I3e=()=>"退出计划模式",$3e=()=>"خروج از حالت طرح",B3e=()=>"الخروج من وضع التخطيط",P3e=()=>"Salir del modo Plan",F3e=()=>"प्लान मोड से बाहर निकलें",QN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I3e():t==="fa"?$3e():t==="ar"?B3e():t==="es"?P3e():t==="hi"?F3e():L3e()}),H3e=()=>"Failed:",q3e=()=>"失败:",U3e=()=>"ناموفق:",G3e=()=>"فشل:",V3e=()=>"Error:",K3e=()=>"विफल:",vS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q3e():t==="fa"?U3e():t==="ar"?G3e():t==="es"?V3e():t==="hi"?K3e():H3e()}),W3e=()=>"Filter sessions",Q3e=()=>"筛选会话",X3e=()=>"فیلتر نشست‌ها",Y3e=()=>"تصفية الجلسات",Z3e=()=>"Filtrar sesiones",J3e=()=>"सेशन फ़िल्टर करें",XN=((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()}),e5e=()=>"Goal",t5e=()=>"目标",n5e=()=>"هدف",r5e=()=>"الهدف",s5e=()=>"Objetivo",i5e=()=>"लक्ष्य",a5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t5e():t==="fa"?n5e():t==="ar"?r5e():t==="es"?s5e():t==="hi"?i5e():e5e()}),o5e=()=>"is unavailable.",c5e=()=>"不可用。",l5e=()=>"در دسترس نیست.",u5e=()=>"غير متاح.",_5e=()=>"no está disponible.",f5e=()=>"उपलब्ध नहीं है।",d5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c5e():t==="fa"?l5e():t==="ar"?u5e():t==="es"?_5e():t==="hi"?f5e():o5e()}),h5e=()=>"Later queued messages will wait until this is retried or removed.",p5e=()=>"后续排队的消息会等待此消息重试或移除。",m5e=()=>"پیام‌های بعدی صف تا تلاش دوباره یا حذف این پیام منتظر می‌مانند.",g5e=()=>"ستنتظر الرسائل التالية في قائمة الانتظار حتى تُعاد المحاولة أو تُزال هذه الرسالة.",v5e=()=>"Los mensajes que están después en la cola esperarán hasta que este se reintente o se quite.",b5e=()=>"बाद में कतार में लगे संदेश तब तक रुके रहेंगे जब तक इसे फिर से कोशिश न किया जाए या हटाया न जाए।",y5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p5e():t==="fa"?m5e():t==="ar"?g5e():t==="es"?v5e():t==="hi"?b5e():h5e()}),x5e=()=>"Listed files",w5e=()=>"已列出文件",k5e=()=>"فایل‌ها فهرست شد",S5e=()=>"سرد الملفات",C5e=()=>"Listó archivos",E5e=()=>"फ़ाइलों की सूची बनाई",YN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w5e():t==="fa"?k5e():t==="ar"?S5e():t==="es"?C5e():t==="hi"?E5e():x5e()}),N5e=()=>"Listed project runs",z5e=()=>"已列出项目运行",j5e=()=>"اجراهای پروژه فهرست شد",A5e=()=>"سرد عمليات تشغيل المشروع",T5e=()=>"Listó las ejecuciones del proyecto",R5e=()=>"प्रोजेक्ट रन की सूची बनाई",M5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z5e():t==="fa"?j5e():t==="ar"?A5e():t==="es"?T5e():t==="hi"?R5e():N5e()}),O5e=()=>"Listed projects",D5e=()=>"已列出项目",L5e=()=>"پروژه‌ها فهرست شد",I5e=()=>"سرد المشاريع",$5e=()=>"Listó proyectos",B5e=()=>"प्रोजेक्ट की सूची बनाई",P5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D5e():t==="fa"?L5e():t==="ar"?I5e():t==="es"?$5e():t==="hi"?B5e():O5e()}),F5e=()=>"Loading conversation…",H5e=()=>"正在加载对话…",q5e=()=>"در حال بارگیری گفتگو…",U5e=()=>"جارٍ تحميل المحادثة…",G5e=()=>"Cargando conversación…",V5e=()=>"बातचीत लोड हो रही है…",K5e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H5e():t==="fa"?q5e():t==="ar"?U5e():t==="es"?G5e():t==="hi"?V5e():F5e()}),W5e=()=>"New Chat",Q5e=()=>"新对话",X5e=()=>"گفتگوی جدید",Y5e=()=>"محادثة جديدة",Z5e=()=>"Nuevo chat",J5e=()=>"नई चैट",eke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q5e():t==="fa"?X5e():t==="ar"?Y5e():t==="es"?Z5e():t==="hi"?J5e():W5e()}),tke=()=>"Next version",nke=()=>"下一版本",rke=()=>"نسخهٔ بعدی",ske=()=>"النسخة التالية",ike=()=>"Siguiente versión",ake=()=>"अगला वर्शन",ZN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nke():t==="fa"?rke():t==="ar"?ske():t==="es"?ike():t==="hi"?ake():tke()}),oke=()=>"Open the session this agent spawned",cke=()=>"打开此智能体创建的会话",lke=()=>"باز کردن نشست ساخته‌شده توسط این عامل",uke=()=>"فتح الجلسة التي أنشأها هذا الوكيل",_ke=()=>"Abrir la sesión que creó este agente",fke=()=>"इस एजेंट द्वारा शुरू किया गया सेशन खोलें",dke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cke():t==="fa"?lke():t==="ar"?uke():t==="es"?_ke():t==="hi"?fke():oke()}),hke=()=>"Opened web pages",pke=()=>"已打开网页",mke=()=>"صفحه‌های وب باز شد",gke=()=>"فتح صفحات ويب",vke=()=>"Abrió páginas web",bke=()=>"वेब पेज खोले",yke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pke():t==="fa"?mke():t==="ar"?gke():t==="es"?vke():t==="hi"?bke():hke()}),xke=()=>"Plan",wke=()=>"计划",kke=()=>"طرح",Ske=()=>"خطة",Cke=()=>"Plan",Eke=()=>"प्लान",Nke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wke():t==="fa"?kke():t==="ar"?Ske():t==="es"?Cke():t==="hi"?Eke():xke()}),zke=()=>"Plan approved",jke=()=>"计划已批准",Ake=()=>"طرح تأیید شد",Tke=()=>"تمت الموافقة على الخطة",Rke=()=>"Plan aprobado",Mke=()=>"प्लान स्वीकृत",Oke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jke():t==="fa"?Ake():t==="ar"?Tke():t==="es"?Rke():t==="hi"?Mke():zke()}),Dke=()=>"Plan rejected",Lke=()=>"计划已拒绝",Ike=()=>"طرح رد شد",$ke=()=>"رُفضت الخطة",Bke=()=>"Plan rechazado",Pke=()=>"प्लान अस्वीकृत",Fke=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lke():t==="fa"?Ike():t==="ar"?$ke():t==="es"?Bke():t==="hi"?Pke():Dke()}),Hke=()=>"Plan resolved",qke=()=>"计划已处理",Uke=()=>"طرح تعیین تکلیف شد",Gke=()=>"تمت معالجة الخطة",Vke=()=>"Plan resuelto",Kke=()=>"प्लान सुलझाया गया",Wke=((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()}),Qke=()=>"Plan revision requested",Xke=()=>"已请求修改计划",Yke=()=>"درخواست بازنگری طرح ثبت شد",Zke=()=>"طُلب تعديل الخطة",Jke=()=>"Cambios en el plan solicitados",eSe=()=>"प्लान में बदलाव का अनुरोध",tSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xke():t==="fa"?Yke():t==="ar"?Zke():t==="es"?Jke():t==="hi"?eSe():Qke()}),nSe=()=>"Previous version",rSe=()=>"上一版本",sSe=()=>"نسخهٔ قبلی",iSe=()=>"النسخة السابقة",aSe=()=>"Versión anterior",oSe=()=>"पिछला वर्शन",JN=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rSe():t==="fa"?sSe():t==="ar"?iSe():t==="es"?aSe():t==="hi"?oSe():nSe()}),cSe=()=>"Ran a command",lSe=()=>"已运行命令",uSe=()=>"فرمان اجرا شد",_Se=()=>"نفّذ أمرًا",fSe=()=>"Ejecutó un comando",dSe=()=>"एक कमांड चलाई",hSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lSe():t==="fa"?uSe():t==="ar"?_Se():t==="es"?fSe():t==="hi"?dSe():cSe()}),pSe=()=>"Ran tests",mSe=()=>"已运行测试",gSe=()=>"آزمون‌ها اجرا شد",vSe=()=>"شغّل الاختبارات",bSe=()=>"Ejecutó tests",ySe=()=>"टेस्ट चलाए",xSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mSe():t==="fa"?gSe():t==="ar"?vSe():t==="es"?bSe():t==="hi"?ySe():pSe()}),wSe=()=>"Read a file",kSe=()=>"已读取文件",SSe=()=>"فایل خوانده شد",CSe=()=>"قرأ ملفًا",ESe=()=>"Leyó un archivo",NSe=()=>"एक फ़ाइल पढ़ी",zSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kSe():t==="fa"?SSe():t==="ar"?CSe():t==="es"?ESe():t==="hi"?NSe():wSe()}),jSe=()=>"Read Git history",ASe=()=>"已读取 Git 历史",TSe=()=>"تاریخچهٔ Git خوانده شد",RSe=()=>"قرأ سجل Git",MSe=()=>"Leyó el historial de Git",OSe=()=>"Git इतिहास पढ़ा",DSe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ASe():t==="fa"?TSe():t==="ar"?RSe():t==="es"?MSe():t==="hi"?OSe():jSe()}),LSe=()=>"Read project details",ISe=()=>"已读取项目详情",$Se=()=>"جزئیات پروژه خوانده شد",BSe=()=>"قرأ تفاصيل المشروع",PSe=()=>"Leyó los detalles del proyecto",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=()=>"Reject",USe=()=>"拒绝",GSe=()=>"رد کردن",VSe=()=>"رفض",KSe=()=>"Rechazar",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=()=>"Remove",YSe=()=>"移除",ZSe=()=>"حذف",JSe=()=>"إزالة",e6e=()=>"Quitar",t6e=()=>"हटाएं",n6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YSe():t==="fa"?ZSe():t==="ar"?JSe():t==="es"?e6e():t==="hi"?t6e():XSe()}),r6e=()=>"Remove annotation",s6e=()=>"移除批注",i6e=()=>"حذف یادداشت",a6e=()=>"إزالة التعليق",o6e=()=>"Quitar anotación",c6e=()=>"एनोटेशन हटाएं",l6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s6e():t==="fa"?i6e():t==="ar"?a6e():t==="es"?o6e():t==="hi"?c6e():r6e()}),u6e=()=>"Remove file",_6e=()=>"移除文件",f6e=()=>"حذف فایل",d6e=()=>"إزالة الملف",h6e=()=>"Quitar archivo",p6e=()=>"फ़ाइल हटाएं",ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_6e():t==="fa"?f6e():t==="ar"?d6e():t==="es"?h6e():t==="hi"?p6e():u6e()}),m6e=()=>"Remove image",g6e=()=>"移除图片",v6e=()=>"حذف تصویر",b6e=()=>"إزالة الصورة",y6e=()=>"Quitar imagen",x6e=()=>"इमेज हटाएं",tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g6e():t==="fa"?v6e():t==="ar"?b6e():t==="es"?y6e():t==="hi"?x6e():m6e()}),w6e=()=>"Remove queued message",k6e=()=>"移除排队消息",S6e=()=>"حذف پیام صف",C6e=()=>"إزالة الرسالة من قائمة الانتظار",E6e=()=>"Quitar mensaje en cola",N6e=()=>"कतार में लगा संदेश हटाएं",nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k6e():t==="fa"?S6e():t==="ar"?C6e():t==="es"?E6e():t==="hi"?N6e():w6e()}),z6e=()=>"Rename",j6e=()=>"重命名",A6e=()=>"تغییر نام",T6e=()=>"إعادة تسمية",R6e=()=>"Renombrar",M6e=()=>"नाम बदलें",fL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j6e():t==="fa"?A6e():t==="ar"?T6e():t==="es"?R6e():t==="hi"?M6e():z6e()}),O6e=()=>"Reviewed code changes",D6e=()=>"已审查代码更改",L6e=()=>"تغییرات کد بازبینی شد",I6e=()=>"راجع تغييرات الشيفرة",$6e=()=>"Revisó cambios en el código",B6e=()=>"कोड में बदलावों की समीक्षा की",P6e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D6e():t==="fa"?L6e():t==="ar"?I6e():t==="es"?$6e():t==="hi"?B6e():O6e()}),F6e=()=>"Run",H6e=()=>"运行",q6e=()=>"اجرا",U6e=()=>"تشغيل",G6e=()=>"Ejecutar",V6e=()=>"रन",rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H6e():t==="fa"?q6e():t==="ar"?U6e():t==="es"?G6e():t==="hi"?V6e():F6e()}),K6e=()=>"Selected chat text",W6e=()=>"已选聊天文本",Q6e=()=>"متن انتخاب‌شدهٔ گفتگو",X6e=()=>"النص المحدد من المحادثة",Y6e=()=>"Texto seleccionado del chat",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=()=>"Selected text:",tCe=()=>"已选文本:",nCe=()=>"متن انتخاب‌شده:",rCe=()=>"النص المحدد:",sCe=()=>"Texto seleccionado:",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=()=>"Send",cCe=()=>"发送",lCe=()=>"ارسال",uCe=()=>"إرسال رسالة",_Ce=()=>"Enviar",fCe=()=>"भेजें",z3=((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()}),dCe=()=>"Session options",hCe=()=>"会话选项",pCe=()=>"گزینه‌های نشست",mCe=()=>"خيارات الجلسة",gCe=()=>"Opciones de la sesión",vCe=()=>"सेशन विकल्प",sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hCe():t==="fa"?pCe():t==="ar"?mCe():t==="es"?gCe():t==="hi"?vCe():dCe()}),bCe=()=>"Session title",yCe=()=>"会话标题",xCe=()=>"عنوان نشست",wCe=()=>"عنوان الجلسة",kCe=()=>"Título de la sesión",SCe=()=>"सेशन शीर्षक",CCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yCe():t==="fa"?xCe():t==="ar"?wCe():t==="es"?kCe():t==="hi"?SCe():bCe()}),ECe=()=>"Show sidebar",NCe=()=>"显示侧边栏",zCe=()=>"نمایش نوار کناری",jCe=()=>"إظهار الشريط الجانبي",ACe=()=>"Mostrar barra lateral",TCe=()=>"साइडबार दिखाएं",iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NCe():t==="fa"?zCe():t==="ar"?jCe():t==="es"?ACe():t==="hi"?TCe():ECe()}),RCe=()=>"Started an experiment run",MCe=()=>"已启动实验运行",OCe=()=>"اجرای آزمایش آغاز شد",DCe=()=>"بدأ تشغيل تجربة",LCe=()=>"Inició una ejecución de experimento",ICe=()=>"एक प्रयोग रन शुरू किया",$Ce=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MCe():t==="fa"?OCe():t==="ar"?DCe():t==="es"?LCe():t==="hi"?ICe():RCe()}),BCe=()=>"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.",PCe=()=>"我有一个想探索的粗略想法。请不断向我提问,直到我们得到一个具体、可检验的研究问题和第一个实验的计划。",FCe=()=>"یک ایدهٔ خام دارم که می‌خواهم بررسی کنم. از من سؤال بپرس تا به یک پرسش پژوهشی مشخص و قابل آزمون و یک برنامه برای اولین آزمایش برسیم.",HCe=()=>"لديّ فكرة أولية أريد استكشافها. اطرح عليّ أسئلة حتى نصل إلى سؤال بحثي محدد وقابل للاختبار وخطة للتجربة الأولى.",qCe=()=>"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.",UCe=()=>"मेरे पास एक अस्पष्ट विचार है जिसे मैं खोजना चाहता/चाहती हूँ। तब तक मुझसे सवाल पूछें जब तक हमारे पास एक ठोस, जाँचने-योग्य शोध प्रश्न और पहले प्रयोग की योजना न बन जाए।",GCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PCe():t==="fa"?FCe():t==="ar"?HCe():t==="es"?qCe():t==="hi"?UCe():BCe()}),VCe=()=>"Shape a research question",KCe=()=>"明确研究问题",WCe=()=>"شکل دادن به پرسش پژوهشی",QCe=()=>"صياغة سؤال بحثي",XCe=()=>"Definir una pregunta de investigación",YCe=()=>"एक शोध प्रश्न तैयार करें",ZCe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KCe():t==="fa"?WCe():t==="ar"?QCe():t==="es"?XCe():t==="hi"?YCe():VCe()}),JCe=()=>"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.",e7e=()=>"先问我要研究的主题,然后检索相关文献,总结最强的基线方法和尚未解决的问题,并建议一个小实验可以在哪里做出贡献。",t7e=()=>"اول موضوع را از من بپرس، سپس ادبیات آن را جست‌وجو کن، قوی‌ترین خط‌های مبنا و مسائل باز را خلاصه کن و پیشنهاد بده یک آزمایش کوچک کجا می‌تواند مفید باشد.",n7e=()=>"اسألني عن الموضوع أولًا، ثم ابحث في الأدبيات حوله، ولخّص أقوى خطوط الأساس والمسائل المفتوحة، واقترح أين يمكن لتجربة صغيرة أن تسهم.",r7e=()=>"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.",s7e=()=>"पहले मुझसे एक विषय पूछें, फिर उस पर साहित्य खोजें, सबसे मज़बूत बेसलाइन और खुली समस्याओं का सार दें, और सुझाएं कि एक छोटा प्रयोग कहाँ योगदान दे सकता है।",i7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e7e():t==="fa"?t7e():t==="ar"?n7e():t==="es"?r7e():t==="hi"?s7e():JCe()}),a7e=()=>"Survey related work",o7e=()=>"调研相关工作",c7e=()=>"مرور کارهای مرتبط",l7e=()=>"استعراض الأعمال ذات الصلة",u7e=()=>"Revisar trabajos relacionados",_7e=()=>"संबंधित कार्य का सर्वेक्षण करें",f7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o7e():t==="fa"?c7e():t==="ar"?l7e():t==="es"?u7e():t==="hi"?_7e():a7e()}),d7e=()=>"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.",h7e=()=>"搭建一个最小的训练脚本,包含配置、依赖和运行命令,能在单张 GPU 上几分钟内端到端训练一个小模型。",p7e=()=>"یک اسکریپت آموزش حداقلی با پیکربندی، وابستگی‌ها و دستور اجرا آماده کن که یک مدل کوچک را در چند دقیقه روی یک GPU به‌طور کامل آموزش دهد.",m7e=()=>"أنشئ أصغر سكربت تدريب ممكن مع إعدادات واعتماديات وأمر تشغيل يدرّب نموذجًا صغيرًا من البداية إلى النهاية في دقائق على وحدة GPU واحدة.",g7e=()=>"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.",v7e=()=>"एक न्यूनतम ट्रेनिंग स्क्रिप्ट सेट अप करें, जिसमें एक कॉन्फ़िग, डिपेंडेंसी और एक रन कमांड हो, जो एक GPU पर कुछ ही मिनटों में एक छोटे मॉडल को पूरी तरह ट्रेन कर दे।",b7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h7e():t==="fa"?p7e():t==="ar"?m7e():t==="es"?g7e():t==="hi"?v7e():d7e()}),y7e=()=>"Scaffold a baseline",x7e=()=>"搭建基线",w7e=()=>"ساخت خط مبنا",k7e=()=>"بناء خط أساس",S7e=()=>"Crear un modelo de referencia",C7e=()=>"एक बेसलाइन तैयार करें",E7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x7e():t==="fa"?w7e():t==="ar"?k7e():t==="es"?S7e():t==="hi"?C7e():y7e()}),N7e=()=>"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.",z7e=()=>"从我们的计划中选一个成本低、定义明确的假设,把它实现为基线的一个变体,并启动第一次运行来比较两者。",j7e=()=>"یک فرضیهٔ کم‌هزینه و مشخص از برنامه‌مان انتخاب کن، آن را به‌صورت یک نسخهٔ تغییریافته از خط مبنا پیاده کن و اولین اجرا را برای مقایسهٔ این دو شروع کن.",A7e=()=>"اختر فرضية واحدة منخفضة التكلفة ومحددة جيدًا من خطتنا، ونفّذها كنسخة معدّلة من خط الأساس، وابدأ أول تشغيل لمقارنة الاثنين.",T7e=()=>"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.",R7e=()=>"हमारी योजना से एक सस्ती, स्पष्ट रूप से परिभाषित परिकल्पना चुनें, इसे बेसलाइन के एक वेरिएंट के रूप में लागू करें, और दोनों की तुलना के लिए पहला रन शुरू करें।",M7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z7e():t==="fa"?j7e():t==="ar"?A7e():t==="es"?T7e():t==="hi"?R7e():N7e()}),O7e=()=>"Run a first experiment",D7e=()=>"运行第一个实验",L7e=()=>"اجرای اولین آزمایش",I7e=()=>"تشغيل التجربة الأولى",$7e=()=>"Ejecutar un primer experimento",B7e=()=>"पहला प्रयोग चलाएं",P7e=((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()}),F7e=()=>"Reading the project to suggest where to start…",H7e=()=>"正在阅读项目以建议从哪里开始…",q7e=()=>"در حال خواندن پروژه برای پیشنهاد نقطهٔ شروع…",U7e=()=>"جارٍ قراءة المشروع لاقتراح نقطة البدء…",G7e=()=>"Leyendo el proyecto para sugerir por dónde empezar…",V7e=()=>"कहाँ से शुरू करें यह सुझाने के लिए प्रोजेक्ट पढ़ा जा रहा है…",K7e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H7e():t==="fa"?q7e():t==="ar"?U7e():t==="es"?G7e():t==="hi"?V7e():F7e()}),W7e=()=>"Starter prompts",Q7e=()=>"入门提示",X7e=()=>"پیشنهادهای شروع",Y7e=()=>"اقتراحات للبدء",Z7e=()=>"Prompts para empezar",J7e=()=>"शुरुआती प्रॉम्प्ट",e8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q7e():t==="fa"?X7e():t==="ar"?Y7e():t==="es"?Z7e():t==="hi"?J7e():W7e()}),t8e=()=>"Stop",n8e=()=>"停止",r8e=()=>"توقف",s8e=()=>"إيقاف",i8e=()=>"Detener",a8e=()=>"रोकें",az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n8e():t==="fa"?r8e():t==="ar"?s8e():t==="es"?i8e():t==="hi"?a8e():t8e()}),o8e=()=>"Submit",c8e=()=>"提交",l8e=()=>"ارسال",u8e=()=>"إرسال",_8e=()=>"Enviar",f8e=()=>"सबमिट करें",d8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c8e():t==="fa"?l8e():t==="ar"?u8e():t==="es"?_8e():t==="hi"?f8e():o8e()}),h8e=()=>"Tool failed",p8e=()=>"工具失败",m8e=()=>"ابزار ناموفق بود",g8e=()=>"فشلت الأداة",v8e=()=>"Error en la herramienta",b8e=()=>"टूल विफल",y8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p8e():t==="fa"?m8e():t==="ar"?g8e():t==="es"?v8e():t==="hi"?b8e():h8e()}),x8e=()=>"Used tools",w8e=()=>"已使用工具",k8e=()=>"ابزارها استفاده شد",S8e=()=>"استخدم الأدوات",C8e=()=>"Usó herramientas",E8e=()=>"टूल इस्तेमाल किए",dL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w8e():t==="fa"?k8e():t==="ar"?S8e():t==="es"?C8e():t==="hi"?E8e():x8e()}),N8e=()=>"View full plan",z8e=()=>"查看完整计划",j8e=()=>"مشاهدهٔ طرح کامل",A8e=()=>"عرض الخطة كاملة",T8e=()=>"Ver plan completo",R8e=()=>"पूरा प्लान देखें",M8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z8e():t==="fa"?j8e():t==="ar"?A8e():t==="es"?T8e():t==="hi"?R8e():N8e()}),O8e=()=>"Waited for an experiment run",D8e=()=>"已等待实验运行",L8e=()=>"برای اجرای آزمایش صبر شد",I8e=()=>"انتظر تشغيل تجربة",$8e=()=>"Esperó a una ejecución de experimento",B8e=()=>"एक प्रयोग रन का इंतज़ार किया",P8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D8e():t==="fa"?L8e():t==="ar"?I8e():t==="es"?$8e():t==="hi"?B8e():O8e()}),F8e=()=>"Waiting for your input…",H8e=()=>"正在等待你的输入…",q8e=()=>"منتظر ورودی شما…",U8e=()=>"في انتظار إدخالك…",G8e=()=>"Esperando tu respuesta…",V8e=()=>"आपके इनपुट का इंतज़ार है…",K8e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H8e():t==="fa"?q8e():t==="ar"?U8e():t==="es"?G8e():t==="hi"?V8e():F8e()}),W8e=()=>"What should we research?",Q8e=()=>"我们应该研究什么?",X8e=()=>"چه چیزی را پژوهش کنیم؟",Y8e=()=>"ما الذي نبحثه؟",Z8e=()=>"¿Qué investigamos?",J8e=()=>"हमें क्या शोध करना चाहिए?",e9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q8e():t==="fa"?X8e():t==="ar"?Y8e():t==="es"?Z8e():t==="hi"?J8e():W8e()}),t9e=()=>"You, mid-task",n9e=()=>"你(任务进行中)",r9e=()=>"شما، هنگام انجام وظیفه",s9e=()=>"أنت، أثناء المهمة",i9e=()=>"Tú, durante la tarea",a9e=()=>"आप, टास्क के बीच में",o9e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n9e():t==="fa"?r9e():t==="ar"?s9e():t==="es"?i9e():t==="hi"?a9e():t9e()}),c9e=()=>"Pasted image",l9e=()=>"粘贴的图片",u9e=()=>"تصویر جای‌گذاری‌شده",_9e=()=>"صورة ملصقة",f9e=()=>"Imagen pegada",d9e=()=>"पेस्ट की गई इमेज",hL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l9e():t==="fa"?u9e():t==="ar"?_9e():t==="es"?f9e():t==="hi"?d9e():c9e()}),h9e=()=>"Plan",p9e=()=>"计划",m9e=()=>"طرح",g9e=()=>"خطة",v9e=()=>"Plan",b9e=()=>"प्लान",pL=((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=()=>"Plan mode — ready to proceed?",x9e=()=>"计划模式 — 准备好继续了吗?",w9e=()=>"حالت طرح — آماده‌اید ادامه دهید؟",k9e=()=>"وضع التخطيط — جاهز للمتابعة؟",S9e=()=>"Modo Plan — ¿listo para continuar?",C9e=()=>"प्लान मोड — आगे बढ़ने के लिए तैयार?",E9e=((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()}),N9e=()=>"Proposed plan",z9e=()=>"提议的计划",j9e=()=>"طرح پیشنهادی",A9e=()=>"خطة مقترحة",T9e=()=>"Plan propuesto",R9e=()=>"प्रस्तावित प्लान",oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z9e():t==="fa"?j9e():t==="ar"?A9e():t==="es"?T9e():t==="hi"?R9e():N9e()}),M9e=()=>"Question",O9e=()=>"问题",D9e=()=>"پرسش",L9e=()=>"سؤال",I9e=()=>"Pregunta",$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=()=>"Queued",F9e=()=>"已排队",H9e=()=>"در صف",q9e=()=>"في قائمة الانتظار",U9e=()=>"En cola",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=()=>"Recents",W9e=()=>"最近",Q9e=()=>"اخیر",X9e=()=>"الأخيرة",Y9e=()=>"Recientes",Z9e=()=>"हाल की",mL=((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()}),J9e=()=>"Re-check its setup.",eEe=()=>"请重新检查其设置。",tEe=()=>"راه‌اندازی آن را دوباره بررسی کنید.",nEe=()=>"أعد فحص إعداده.",rEe=()=>"Vuelve a comprobar su configuración.",sEe=()=>"इसका सेटअप फिर से जाँचें।",iEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eEe():t==="fa"?tEe():t==="ar"?nEe():t==="es"?rEe():t==="hi"?sEe():J9e()}),aEe=()=>"Could not recover this turn. Try again.",oEe=()=>"无法恢复本轮。请重试。",cEe=()=>"بازیابی این نوبت ممکن نشد. دوباره تلاش کنید.",lEe=()=>"تعذّرت استعادة هذه الجولة. حاول مجددًا.",uEe=()=>"No se pudo recuperar este turno. Inténtalo de nuevo.",_Ee=()=>"यह टर्न रिकवर नहीं हो सका। फिर से कोशिश करें।",fEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oEe():t==="fa"?cEe():t==="ar"?lEe():t==="es"?uEe():t==="hi"?_Ee():aEe()}),dEe=()=>"Could not remove the queued message. Try again.",hEe=()=>"无法移除排队消息。请重试。",pEe=()=>"حذف پیام در صف ممکن نشد. دوباره تلاش کنید.",mEe=()=>"تعذّرت إزالة الرسالة من قائمة الانتظار. حاول مجددًا.",gEe=()=>"No se pudo quitar el mensaje en cola. Inténtalo de nuevo.",vEe=()=>"कतार में लगा संदेश हटाया नहीं जा सका। फिर से कोशिश करें।",bEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hEe():t==="fa"?pEe():t==="ar"?mEe():t==="es"?gEe():t==="hi"?vEe():dEe()}),yEe=e=>`Could not re-send: ${e==null?void 0:e.error}`,xEe=e=>`无法重新发送:${e==null?void 0:e.error}`,wEe=e=>`ارسال دوباره ممکن نشد: ${e==null?void 0:e.error}`,kEe=e=>`تعذّرت إعادة الإرسال: ${e==null?void 0:e.error}`,SEe=e=>`No se pudo reenviar: ${e==null?void 0:e.error}`,CEe=e=>`फिर से नहीं भेजा जा सका: ${e==null?void 0:e.error}`,EEe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xEe(e):t==="fa"?wEe(e):t==="ar"?kEe(e):t==="es"?SEe(e):t==="hi"?CEe(e):yEe(e)}),NEe=()=>"Resolved",zEe=()=>"已处理",jEe=()=>"رسیدگی شد",AEe=()=>"مُعالَج",TEe=()=>"Resuelto",REe=()=>"सुलझाया गया",MEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zEe():t==="fa"?jEe():t==="ar"?AEe():t==="es"?TEe():t==="hi"?REe():NEe()}),OEe=()=>"Could not retry the queued message. Try again.",DEe=()=>"无法重试排队消息。请重试。",LEe=()=>"تلاش دوباره برای پیام در صف ممکن نشد. دوباره تلاش کنید.",IEe=()=>"تعذّرت إعادة محاولة إرسال الرسالة في قائمة الانتظار. حاول مجددًا.",$Ee=()=>"No se pudo reintentar el mensaje en cola. Inténtalo de nuevo.",BEe=()=>"कतार में लगा संदेश फिर से नहीं भेजा जा सका। फिर से कोशिश करें।",PEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DEe():t==="fa"?LEe():t==="ar"?IEe():t==="es"?$Ee():t==="hi"?BEe():OEe()}),FEe=()=>"run logs",HEe=()=>"运行日志",qEe=()=>"گزارش‌های اجرا",UEe=()=>"سجلات التشغيل",GEe=()=>"logs de ejecución",VEe=()=>"रन लॉग",KEe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HEe():t==="fa"?qEe():t==="ar"?UEe():t==="es"?GEe():t==="hi"?VEe():FEe()}),WEe=()=>"Scroll to bottom",QEe=()=>"滚动到底部",XEe=()=>"رفتن به پایین گفتگو",YEe=()=>"التمرير إلى الأسفل",ZEe=()=>"Ir al final",JEe=()=>"नीचे तक स्क्रॉल करें",cz=((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=()=>"The selected harness is unavailable",tNe=()=>"所选智能体工具不可用",nNe=()=>"ابزار عامل انتخاب‌شده در دسترس نیست",rNe=()=>"أداة البرمجة المحددة غير متاحة",sNe=()=>"El agente seleccionado no está disponible",iNe=()=>"चुना गया हार्नेस उपलब्ध नहीं है",i1=((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()}),aNe=()=>"Session limit reached",oNe=()=>"已达到会话使用限额",cNe=()=>"به سقف مصرف نشست رسیده‌اید",lNe=()=>"تم بلوغ حد الاستخدام",uNe=()=>"Límite de la sesión alcanzado",_Ne=()=>"सेशन सीमा पूरी हो गई",fNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oNe():t==="fa"?cNe():t==="ar"?lNe():t==="es"?uNe():t==="hi"?_Ne():aNe()}),dNe=()=>"The chat session was not created",hNe=()=>"未能创建聊天会话",pNe=()=>"نشست گفت‌وگو ایجاد نشد",mNe=()=>"لم تُنشأ جلسة المحادثة",gNe=()=>"No se creó la sesión de chat",vNe=()=>"चैट सेशन नहीं बनाया गया",bNe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hNe():t==="fa"?pNe():t==="ar"?mNe():t==="es"?gNe():t==="hi"?vNe():dNe()}),yNe=()=>"Show full conversation",xNe=()=>"显示完整对话",wNe=()=>"نمایش کامل گفتگو",kNe=()=>"عرض المحادثة كاملة",SNe=()=>"Mostrar la conversación completa",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=()=>" · Spawned by another agent",zNe=()=>" · 由另一个智能体创建",jNe=()=>" · ساخته‌شده به‌دست عامل دیگر",ANe=()=>" · أنشأه وكيل آخر",TNe=()=>" · Creada por otro agente",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=()=>"Starting…",DNe=()=>"正在启动…",LNe=()=>"در حال شروع…",INe=()=>"جارٍ البدء…",$Ne=()=>"Iniciando…",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=>`Steer ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} to queue)`,HNe=e=>`向 ${e==null?void 0:e.harness} 补充指示…(按 ${e==null?void 0:e.shortcut} 排队)`,qNe=e=>`راهنمایی ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} برای افزودن به صف)`,UNe=e=>`وجّه ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} للإضافة إلى قائمة الانتظار)`,GNe=e=>`Guía a ${e==null?void 0:e.harness}… (${e==null?void 0:e.shortcut} para poner en cola)`,VNe=e=>`${e==null?void 0:e.harness} को दिशा दें… (कतार में लगाने के लिए ${e==null?void 0:e.shortcut})`,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=()=>"Could not stop the turn. Try again.",QNe=()=>"无法停止本轮。请重试。",XNe=()=>"توقف این نوبت ممکن نشد. دوباره تلاش کنید.",YNe=()=>"تعذّر إيقاف الجولة. حاول مجددًا.",ZNe=()=>"No se pudo detener el turno. Inténtalo de nuevo.",JNe=()=>"टर्न रोका नहीं जा सका। फिर से कोशिश करें।",eze=((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()}),tze=e=>`Could not switch fork: ${e==null?void 0:e.error}`,nze=e=>`无法切换分支:${e==null?void 0:e.error}`,rze=e=>`تغییر شاخه ممکن نشد: ${e==null?void 0:e.error}`,sze=e=>`تعذّر تبديل التفرّع: ${e==null?void 0:e.error}`,ize=e=>`No se pudo cambiar de bifurcación: ${e==null?void 0:e.error}`,aze=e=>`फ़ोर्क नहीं बदला जा सका: ${e==null?void 0:e.error}`,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=()=>"The agent",lze=()=>"智能体",uze=()=>"عامل",_ze=()=>"الوكيل",fze=()=>"El agente",dze=()=>"एजेंट",hze=((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()}),pze=()=>"Thinking",mze=()=>"正在思考",gze=()=>"در حال فکر کردن",vze=()=>"جارٍ التفكير",bze=()=>"Pensando",yze=()=>"सोच रहा है",xze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mze():t==="fa"?gze():t==="ar"?vze():t==="es"?bze():t==="hi"?yze():pze()}),wze=()=>"Could not toggle Plan mode. Try again.",kze=()=>"无法切换计划模式。请重试。",Sze=()=>"تغییر حالت طرح ممکن نشد. دوباره تلاش کنید.",Cze=()=>"تعذّر تبديل وضع التخطيط. حاول مجددًا.",Eze=()=>"No se pudo cambiar el modo Plan. Inténtalo de nuevo.",Nze=()=>"प्लान मोड टॉगल नहीं हो सका। फिर से कोशिश करें।",lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kze():t==="fa"?Sze():t==="ar"?Cze():t==="es"?Eze():t==="hi"?Nze():wze()}),zze=()=>"This turn did not finish.",jze=()=>"本轮未完成。",Aze=()=>"این نوبت کامل نشد.",Tze=()=>"لم تكتمل هذه الجولة.",Rze=()=>"Este turno no terminó.",Mze=()=>"यह टर्न पूरा नहीं हुआ।",uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jze():t==="fa"?Aze():t==="ar"?Tze():t==="es"?Rze():t==="hi"?Mze():zze()}),Oze=()=>"Type a custom answer…",Dze=()=>"输入自定义回答…",Lze=()=>"پاسخ دلخواه را بنویسید…",Ize=()=>"اكتب إجابة مخصصة…",$ze=()=>"Escribe una respuesta personalizada…",Bze=()=>"अपना जवाब टाइप करें…",Pze=((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()}),Fze=()=>"Unarchive",Hze=()=>"取消归档",qze=()=>"خارج کردن از بایگانی",Uze=()=>"إلغاء الأرشفة",Gze=()=>"Desarchivar",Vze=()=>"आर्काइव से निकालें",Kze=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hze():t==="fa"?qze():t==="ar"?Uze():t==="es"?Gze():t==="hi"?Vze():Fze()}),Wze=()=>"Untitled",Qze=()=>"未命名",Xze=()=>"بدون عنوان",Yze=()=>"بدون عنوان",Zze=()=>"Sin título",Jze=()=>"बिना शीर्षक",Md=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qze():t==="fa"?Xze():t==="ar"?Yze():t==="es"?Zze():t==="hi"?Jze():Wze()}),eje=()=>"Could not update autonomy. Try again.",tje=()=>"无法更新自主程度。请重试。",nje=()=>"به‌روزرسانی خودمختاری انجام نشد. دوباره تلاش کنید.",rje=()=>"تعذّر تحديث الاستقلالية. حاول مجددًا.",sje=()=>"No se pudo actualizar la autonomía. Inténtalo de nuevo.",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=()=>"Could not update permissions. Try again.",cje=()=>"无法更新权限。请重试。",lje=()=>"به‌روزرسانی مجوزها انجام نشد. دوباره تلاش کنید.",uje=()=>"تعذّر تحديث الأذونات. حاول مجددًا.",_je=()=>"No se pudieron actualizar los permisos. Inténtalo de nuevo.",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=()=>"Work details",pje=()=>"工作详情",mje=()=>"جزئیات کار",gje=()=>"تفاصيل العمل",vje=()=>"Detalles del trabajo",bje=()=>"काम का विवरण",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=e=>`${e==null?void 0:e.minutes}m ${e==null?void 0:e.seconds}s`,wje=e=>`${e==null?void 0:e.minutes}分${e==null?void 0:e.seconds}秒`,kje=e=>`${e==null?void 0:e.minutes} دقیقه ${e==null?void 0:e.seconds} ثانیه`,Sje=e=>`${e==null?void 0:e.minutes}د ${e==null?void 0:e.seconds}ث`,Cje=e=>`${e==null?void 0:e.minutes} min ${e==null?void 0:e.seconds} s`,Eje=e=>`${e==null?void 0:e.minutes}मि ${e==null?void 0:e.seconds}से`,Nje=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wje(e):t==="fa"?kje(e):t==="ar"?Sje(e):t==="es"?Cje(e):t==="hi"?Eje(e):xje(e)}),zje=e=>`Worked for ${e==null?void 0:e.duration}`,jje=e=>`已工作 ${e==null?void 0:e.duration}`,Aje=e=>`به‌مدت ${e==null?void 0:e.duration} کار کرد`,Tje=e=>`عمل لمدة ${e==null?void 0:e.duration}`,Rje=e=>`Trabajó durante ${e==null?void 0:e.duration}`,Mje=e=>`${e==null?void 0:e.duration} तक काम किया`,Oje=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jje(e):t==="fa"?Aje(e):t==="ar"?Tje(e):t==="es"?Rje(e):t==="hi"?Mje(e):zje(e)}),Dje=()=>"Working…",Lje=()=>"正在工作…",Ije=()=>"در حال کار…",$je=()=>"جارٍ العمل…",Bje=()=>"Trabajando…",Pje=()=>"काम हो रहा है…",bS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lje():t==="fa"?Ije():t==="ar"?$je():t==="es"?Bje():t==="hi"?Pje():Dje()}),Fje=()=>"Close tab",Hje=()=>"关闭标签页",qje=()=>"بستن زبانه",Uje=()=>"إغلاق التبويب",Gje=()=>"Cerrar pestaña",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=()=>"Changes",Qje=()=>"更改",Xje=()=>"تغییرات",Yje=()=>"التغييرات",Zje=()=>"Cambios",Jje=()=>"बदलाव",gL=((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()}),eAe=()=>"Code browser view",tAe=()=>"代码浏览器视图",nAe=()=>"نمای مرورگر کد",rAe=()=>"عرض متصفح الشيفرة",sAe=()=>"Vista del explorador de código",iAe=()=>"कोड ब्राउज़र व्यू",aAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tAe():t==="fa"?nAe():t==="ar"?rAe():t==="es"?sAe():t==="hi"?iAe():eAe()}),oAe=()=>"Files",cAe=()=>"文件",lAe=()=>"فایل‌ها",uAe=()=>"الملفات",_Ae=()=>"Archivos",fAe=()=>"फ़ाइलें",dAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cAe():t==="fa"?lAe():t==="ar"?uAe():t==="es"?_Ae():t==="hi"?fAe():oAe()}),hAe=()=>"Refresh",pAe=()=>"刷新",mAe=()=>"تازه‌سازی",gAe=()=>"تحديث",vAe=()=>"Actualizar",bAe=()=>"रीफ़्रेश करें",_z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pAe():t==="fa"?mAe():t==="ar"?gAe():t==="es"?vAe():t==="hi"?bAe():hAe()}),yAe=()=>"listing truncated",xAe=()=>"列表已截断",wAe=()=>"فهرست کوتاه شده است",kAe=()=>"القائمة مقتطعة",SAe=()=>"listado truncado",CAe=()=>"सूची छोटी की गई",EAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xAe():t==="fa"?wAe():t==="ar"?kAe():t==="es"?SAe():t==="hi"?CAe():yAe()}),NAe=()=>"No files.",zAe=()=>"没有文件。",jAe=()=>"فایلی وجود ندارد.",AAe=()=>"لا توجد ملفات.",TAe=()=>"No hay archivos.",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=()=>"Refresh failed:",DAe=()=>"刷新失败:",LAe=()=>"تازه‌سازی ناموفق بود:",IAe=()=>"فشل التحديث:",$Ae=()=>"Error al actualizar:",BAe=()=>"रीफ़्रेश विफल:",PAe=((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()}),FAe=()=>"Cancelling…",HAe=()=>"正在取消…",qAe=()=>"در حال لغو…",UAe=()=>"جارٍ الإلغاء…",GAe=()=>"Cancelando…",VAe=()=>"रद्द हो रहा है…",KAe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HAe():t==="fa"?qAe():t==="ar"?UAe():t==="es"?GAe():t==="hi"?VAe():FAe()}),WAe=()=>"Checking…",QAe=()=>"正在检查…",XAe=()=>"در حال بررسی…",YAe=()=>"جارٍ التحقق…",ZAe=()=>"Comprobando…",JAe=()=>"जाँचा जा रहा है…",ya=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QAe():t==="fa"?XAe():t==="ar"?YAe():t==="es"?ZAe():t==="hi"?JAe():WAe()}),eTe=()=>"Copied",tTe=()=>"已复制",nTe=()=>"کپی شد",rTe=()=>"تم النسخ",sTe=()=>"Copiado",iTe=()=>"कॉपी हो गया",_f=((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()}),aTe=e=>`Failed to load: ${e==null?void 0:e.error}`,oTe=e=>`加载失败:${e==null?void 0:e.error}`,cTe=e=>`بارگذاری ناموفق بود: ${e==null?void 0:e.error}`,lTe=e=>`تعذّر التحميل: ${e==null?void 0:e.error}`,uTe=e=>`Error al cargar: ${e==null?void 0:e.error}`,_Te=e=>`लोड नहीं हो सका: ${e==null?void 0:e.error}`,yS=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oTe(e):t==="fa"?cTe(e):t==="ar"?lTe(e):t==="es"?uTe(e):t==="hi"?_Te(e):aTe(e)}),fTe=()=>"Loading…",dTe=()=>"正在加载…",hTe=()=>"در حال بارگیری…",pTe=()=>"جارٍ التحميل…",mTe=()=>"Cargando…",gTe=()=>"लोड हो रहा है…",xS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dTe():t==="fa"?hTe():t==="ar"?pTe():t==="es"?mTe():t==="hi"?gTe():fTe()}),vTe=e=>`+ ${e==null?void 0:e.count} more`,bTe=e=>`另有 ${e==null?void 0:e.count} 项`,yTe=e=>`${e==null?void 0:e.count}+ مورد دیگر`,xTe=e=>`المزيد (+${e==null?void 0:e.count})`,wTe=e=>`+ ${e==null?void 0:e.count} más`,kTe=e=>`+ ${e==null?void 0:e.count} और`,STe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bTe(e):t==="fa"?yTe(e):t==="ar"?xTe(e):t==="es"?wTe(e):t==="hi"?kTe(e):vTe(e)}),CTe=()=>"Rendered view",ETe=()=>"渲染视图",NTe=()=>"نمای رندرشده",zTe=()=>"العرض المُنسَّق",jTe=()=>"Vista renderizada",ATe=()=>"रेंडर किया गया व्यू",Dv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ETe():t==="fa"?NTe():t==="ar"?zTe():t==="es"?jTe():t==="hi"?ATe():CTe()}),TTe=()=>"Save",RTe=()=>"保存",MTe=()=>"ذخیره",OTe=()=>"حفظ",DTe=()=>"Guardar",LTe=()=>"सेव करें",pc=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RTe():t==="fa"?MTe():t==="ar"?OTe():t==="es"?DTe():t==="hi"?LTe():TTe()}),ITe=()=>"Saving…",$Te=()=>"正在保存…",BTe=()=>"در حال ذخیره…",PTe=()=>"جارٍ الحفظ…",FTe=()=>"Guardando…",HTe=()=>"सेव हो रहा है…",Sa=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Te():t==="fa"?BTe():t==="ar"?PTe():t==="es"?FTe():t==="hi"?HTe():ITe()}),qTe=()=>"Show less",UTe=()=>"收起",GTe=()=>"نمایش کمتر",VTe=()=>"عرض أقل",KTe=()=>"Mostrar menos",WTe=()=>"कम दिखाएं",vL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UTe():t==="fa"?GTe():t==="ar"?VTe():t==="es"?KTe():t==="hi"?WTe():qTe()}),QTe=()=>"Show more",XTe=()=>"展开",YTe=()=>"نمایش بیشتر",ZTe=()=>"عرض المزيد",JTe=()=>"Mostrar más",eRe=()=>"और दिखाएं",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=()=>"Stop",rRe=()=>"停止",sRe=()=>"توقف",iRe=()=>"إيقاف",aRe=()=>"Detener",oRe=()=>"रोकें",bL=((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()}),cRe=()=>"Stopping…",lRe=()=>"正在停止…",uRe=()=>"در حال توقف…",_Re=()=>"جارٍ الإيقاف…",fRe=()=>"Deteniendo…",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=()=>"View source",mRe=()=>"查看源代码",gRe=()=>"نمایش متن منبع",vRe=()=>"عرض المصدر",bRe=()=>"Ver código fuente",yRe=()=>"स्रोत देखें",Pd=((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()}),xRe=()=>"Shorten this chat's context",wRe=()=>"压缩此聊天的上下文",kRe=()=>"کوتاه‌کردن زمینهٔ این گفت‌وگو",SRe=()=>"اختصار سياق هذه المحادثة",CRe=()=>"Comprime el contexto de este chat",ERe=()=>"इस चैट का कॉन्टेक्स्ट छोटा करें",NRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wRe():t==="fa"?kRe():t==="ar"?SRe():t==="es"?CRe():t==="hi"?ERe():xRe()}),zRe=()=>"Runs as a remote Hugging Face Job",jRe=()=>"作为远程 Hugging Face Job 运行",ARe=()=>"به‌صورت Hugging Face Job دوردست اجرا می‌شود",TRe=()=>"يعمل كمهمة Hugging Face بعيدة",RRe=()=>"Se ejecuta como un Job remoto de Hugging Face",MRe=()=>"एक रिमोट Hugging Face Job के रूप में चलता है",ORe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jRe():t==="fa"?ARe():t==="ar"?TRe():t==="es"?RRe():t==="hi"?MRe():zRe()}),DRe=()=>"Runs as a Job on your Kubernetes cluster",LRe=()=>"作为 Kubernetes 集群上的 Job 运行",IRe=()=>"به‌صورت Job روی خوشهٔ Kubernetes اجرا می‌شود",$Re=()=>"يعمل كمهمة على عنقود Kubernetes الخاص بك",BRe=()=>"Se ejecuta como un Job en tu clúster de Kubernetes",PRe=()=>"आपके Kubernetes क्लस्टर पर एक Job के रूप में चलता है",FRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LRe():t==="fa"?IRe():t==="ar"?$Re():t==="es"?BRe():t==="hi"?PRe():DRe()}),HRe=()=>"Runs directly on this computer",qRe=()=>"直接在此计算机上运行",URe=()=>"مستقیماً روی این رایانه اجرا می‌شود",GRe=()=>"يعمل مباشرة على هذا الحاسوب",VRe=()=>"Se ejecuta directamente en este equipo",KRe=()=>"सीधे इस कंप्यूटर पर चलता है",WRe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qRe():t==="fa"?URe():t==="ar"?GRe():t==="es"?VRe():t==="hi"?KRe():HRe()}),QRe=()=>"Runs in a remote Modal sandbox",XRe=()=>"在远程 Modal 沙箱中运行",YRe=()=>"در sandbox دوردست Modal اجرا می‌شود",ZRe=()=>"يعمل في بيئة Modal معزولة عن بُعد",JRe=()=>"Se ejecuta en un sandbox remoto de Modal",eMe=()=>"एक रिमोट Modal सैंडबॉक्स में चलता है",tMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XRe():t==="fa"?YRe():t==="ar"?ZRe():t==="es"?JRe():t==="hi"?eMe():QRe()}),nMe=()=>"Runs on an ephemeral OpenResearch box",rMe=()=>"在临时 OpenResearch 主机上运行",sMe=()=>"روی میزبان موقت OpenResearch اجرا می‌شود",iMe=()=>"يعمل على صندوق OpenResearch مؤقت",aMe=()=>"Se ejecuta en una máquina efímera de OpenResearch",oMe=()=>"एक अस्थायी OpenResearch बॉक्स पर चलता है",cMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rMe():t==="fa"?sMe():t==="ar"?iMe():t==="es"?aMe():t==="hi"?oMe():nMe()}),lMe=()=>"Runs on the connected Ray cluster",uMe=()=>"在已连接的 Ray 集群上运行",_Me=()=>"روی خوشهٔ متصل Ray اجرا می‌شود",fMe=()=>"يعمل على عنقود Ray المتصل",dMe=()=>"Se ejecuta en el clúster de Ray conectado",hMe=()=>"कनेक्टेड Ray क्लस्टर पर चलता है",pMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uMe():t==="fa"?_Me():t==="ar"?fMe():t==="es"?dMe():t==="hi"?hMe():lMe()}),mMe=()=>"Runs as a scheduled job on your Slurm cluster",gMe=()=>"作为 Slurm 集群上的调度作业运行",vMe=()=>"به‌صورت کار زمان‌بندی‌شده روی خوشهٔ Slurm اجرا می‌شود",bMe=()=>"يعمل كمهمة مجدولة على عنقود Slurm الخاص بك",yMe=()=>"Se ejecuta como un job programado en tu clúster de Slurm",xMe=()=>"आपके Slurm क्लस्टर पर एक शेड्यूल्ड जॉब के रूप में चलता है",wMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gMe():t==="fa"?vMe():t==="ar"?bMe():t==="es"?yMe():t==="hi"?xMe():mMe()}),kMe=()=>"Runs on a host from your SSH config",SMe=()=>"在 SSH 配置中的主机上运行",CMe=()=>"روی میزبانی از پیکربندی SSH اجرا می‌شود",EMe=()=>"يعمل على مضيف من إعداد SSH الخاص بك",NMe=()=>"Se ejecuta en un host de tu configuración SSH",zMe=()=>"आपके SSH कॉन्फ़िग के किसी होस्ट पर चलता है",jMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SMe():t==="fa"?CMe():t==="ar"?EMe():t==="es"?NMe():t==="hi"?zMe():kMe()}),AMe=()=>"Runs through Tinker’s remote compute",TMe=()=>"通过 Tinker 远程算力运行",RMe=()=>"از طریق رایانش دوردست Tinker اجرا می‌شود",MMe=()=>"يعمل عبر حوسبة Tinker البعيدة",OMe=()=>"Se ejecuta en el cómputo remoto de Tinker",DMe=()=>"Tinker के रिमोट कंप्यूट के ज़रिए चलता है",LMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TMe():t==="fa"?RMe():t==="ar"?MMe():t==="es"?OMe():t==="hi"?DMe():AMe()}),IMe=()=>"HF Jobs",$Me=()=>"HF Jobs",BMe=()=>"HF Jobs",PMe=()=>"HF Jobs",FMe=()=>"HF Jobs",HMe=()=>"HF Jobs",qMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Me():t==="fa"?BMe():t==="ar"?PMe():t==="es"?FMe():t==="hi"?HMe():IMe()}),UMe=()=>"Kubernetes",GMe=()=>"Kubernetes",VMe=()=>"Kubernetes",KMe=()=>"Kubernetes",WMe=()=>"Kubernetes",QMe=()=>"Kubernetes",XMe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GMe():t==="fa"?VMe():t==="ar"?KMe():t==="es"?WMe():t==="hi"?QMe():UMe()}),YMe=()=>"This machine",ZMe=()=>"此计算机",JMe=()=>"این رایانه",eOe=()=>"هذا الجهاز",tOe=()=>"Este equipo",nOe=()=>"यह मशीन",yL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZMe():t==="fa"?JMe():t==="ar"?eOe():t==="es"?tOe():t==="hi"?nOe():YMe()}),rOe=()=>"Modal",sOe=()=>"Modal",iOe=()=>"Modal",aOe=()=>"Modal",oOe=()=>"Modal",cOe=()=>"Modal",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=()=>"OpenResearch",_Oe=()=>"OpenResearch",fOe=()=>"OpenResearch",dOe=()=>"OpenResearch",hOe=()=>"OpenResearch",pOe=()=>"OpenResearch",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=()=>"Ray",vOe=()=>"Ray",bOe=()=>"Ray",yOe=()=>"Ray",xOe=()=>"Ray",wOe=()=>"Ray",kOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vOe():t==="fa"?bOe():t==="ar"?yOe():t==="es"?xOe():t==="hi"?wOe():gOe()}),SOe=()=>"Slurm",COe=()=>"Slurm",EOe=()=>"Slurm",NOe=()=>"Slurm",zOe=()=>"Slurm",jOe=()=>"Slurm",AOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?COe():t==="fa"?EOe():t==="ar"?NOe():t==="es"?zOe():t==="hi"?jOe():SOe()}),TOe=()=>"SSH",ROe=()=>"SSH",MOe=()=>"SSH",OOe=()=>"SSH",DOe=()=>"SSH",LOe=()=>"SSH",IOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ROe():t==="fa"?MOe():t==="ar"?OOe():t==="es"?DOe():t==="hi"?LOe():TOe()}),$Oe=()=>"Tinker",BOe=()=>"Tinker",POe=()=>"Tinker",FOe=()=>"Tinker",HOe=()=>"Tinker",qOe=()=>"Tinker",UOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BOe():t==="fa"?POe():t==="ar"?FOe():t==="es"?HOe():t==="hi"?qOe():$Oe()}),GOe=()=>"A Hugging Face Job runs remotely in your account using the selected hardware. Usage is billed by Hugging Face.",VOe=()=>"Hugging Face Job 使用所选硬件在你的账户中远程运行。费用由 Hugging Face 收取。",KOe=()=>"یک Hugging Face Job با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود. هزینه را Hugging Face دریافت می‌کند.",WOe=()=>"تعمل مهمة Hugging Face عن بُعد في حسابك باستخدام العتاد المحدد. تتولى Hugging Face احتساب رسوم الاستخدام.",QOe=()=>"Un Hugging Face Job se ejecuta de forma remota en tu cuenta con el hardware seleccionado. Hugging Face factura el uso.",XOe=()=>"एक Hugging Face Job चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है। इस्तेमाल का बिल Hugging Face करता है।",YOe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VOe():t==="fa"?KOe():t==="ar"?WOe():t==="es"?QOe():t==="hi"?XOe():GOe()}),ZOe=()=>"A Modal sandbox runs remotely in your account using the selected hardware and scales to zero after the run.",JOe=()=>"Modal 沙箱使用所选硬件在你的账户中远程运行,并在运行结束后缩容到零。",eDe=()=>"یک sandbox از Modal با سخت‌افزار انتخاب‌شده در حساب شما از راه دور اجرا می‌شود و پس از اجرا به صفر مقیاس می‌یابد.",tDe=()=>"تعمل بيئة Modal معزولة عن بُعد في حسابك باستخدام العتاد المحدد، وتُخفَّض مواردها إلى الصفر بعد انتهاء التشغيل.",nDe=()=>"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.",rDe=()=>"एक Modal सैंडबॉक्स चुने गए हार्डवेयर का इस्तेमाल करते हुए आपके खाते में रिमोट रूप से चलता है और रन के बाद शून्य पर स्केल हो जाता है।",sDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JOe():t==="fa"?eDe():t==="ar"?tDe():t==="es"?nDe():t==="hi"?rDe():ZOe()}),iDe=()=>"An ephemeral OpenResearch box runs the experiment, is billed to your organization, and is deleted when the run ends.",aDe=()=>"临时 OpenResearch 主机运行实验,费用计入你的组织,并在运行结束后删除。",oDe=()=>"یک میزبان موقت OpenResearch آزمایش را اجرا می‌کند، هزینه به سازمان شما منظور می‌شود و میزبان پس از پایان حذف می‌گردد.",cDe=()=>"تعمل التجربة على جهاز OpenResearch مؤقت، وتتحمل مؤسستك تكلفته، ويُحذف الجهاز عند انتهاء التشغيل.",lDe=()=>"Una máquina efímera de OpenResearch ejecuta el experimento, se factura a tu organización y se elimina al terminar la ejecución.",uDe=()=>"एक अस्थायी OpenResearch बॉक्स प्रयोग चलाता है, आपके संगठन को बिल किया जाता है, और रन खत्म होने पर हटा दिया जाता है।",_De=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aDe():t==="fa"?oDe():t==="ar"?cDe():t==="es"?lDe():t==="hi"?uDe():iDe()}),fDe=()=>"This computer must stay awake and online while Tinker runs.",dDe=()=>"Tinker 运行时,此计算机必须保持唤醒和联网。",hDe=()=>"هنگام اجرای Tinker، این رایانه باید روشن و آنلاین بماند.",pDe=()=>"يجب أن يبقى هذا الحاسوب مستيقظًا ومتصلًا أثناء تشغيل Tinker.",mDe=()=>"Este equipo debe permanecer encendido y conectado mientras Tinker se ejecuta.",gDe=()=>"जब तक Tinker चल रहा है, इस कंप्यूटर को जागते और ऑनलाइन रहना होगा।",vDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dDe():t==="fa"?hDe():t==="ar"?pDe():t==="es"?mDe():t==="hi"?gDe():fDe()}),bDe=()=>"Context window",yDe=()=>"上下文窗口",xDe=()=>"پنجرهٔ زمینه",wDe=()=>"نافذة السياق",kDe=()=>"Ventana de contexto",SDe=()=>"कॉन्टेक्स्ट विंडो",CDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yDe():t==="fa"?xDe():t==="ar"?wDe():t==="es"?kDe():t==="hi"?SDe():bDe()}),EDe=()=>"Context window used",NDe=()=>"已使用的上下文窗口",zDe=()=>"پنجرهٔ زمینهٔ استفاده‌شده",jDe=()=>"المستخدَم من نافذة السياق",ADe=()=>"Ventana de contexto usada",TDe=()=>"इस्तेमाल हुई कॉन्टेक्स्ट विंडो",RDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NDe():t==="fa"?zDe():t==="ar"?jDe():t==="es"?ADe():t==="hi"?TDe():EDe()}),MDe=e=>`${e==null?void 0:e.value} tokens`,ODe=e=>`${e==null?void 0:e.value} 个 token`,DDe=e=>`${e==null?void 0:e.value} توکن`,LDe=e=>`${e==null?void 0:e.value} رمز`,IDe=e=>`${e==null?void 0:e.value} tokens`,$De=e=>`${e==null?void 0:e.value} टोकन`,BDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ODe(e):t==="fa"?DDe(e):t==="ar"?LDe(e):t==="es"?IDe(e):t==="hi"?$De(e):MDe(e)}),PDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,FDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total}(${e==null?void 0:e.percent})`,HDe=e=>`${e==null?void 0:e.used} از ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,qDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,UDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,GDe=e=>`${e==null?void 0:e.used} / ${e==null?void 0:e.total} (${e==null?void 0:e.percent})`,VDe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?FDe(e):t==="fa"?HDe(e):t==="ar"?qDe(e):t==="es"?UDe(e):t==="hi"?GDe(e):PDe(e)}),KDe=()=>"Copy the last response",WDe=()=>"复制最新回复",QDe=()=>"کپی آخرین پاسخ",XDe=()=>"نسخ آخر رد",YDe=()=>"Copia la última respuesta",ZDe=()=>"आखिरी जवाब कॉपी करें",JDe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WDe():t==="fa"?QDe():t==="ar"?XDe():t==="es"?YDe():t==="hi"?ZDe():KDe()}),eLe=()=>"No runs yet — ask the agent to launch one.",tLe=()=>"尚无运行——让智能体启动一个。",nLe=()=>"هنوز اجرایی وجود ندارد — از عامل بخواهید یکی را آغاز کند.",rLe=()=>"لا توجد عمليات تشغيل بعد — اطلب من الوكيل بدء واحدة.",sLe=()=>"Aún no hay ejecuciones — pídele al agente que lance una.",iLe=()=>"अभी तक कोई रन नहीं — एजेंट से एक शुरू करने को कहें।",aLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tLe():t==="fa"?nLe():t==="ar"?rLe():t==="es"?sLe():t==="hi"?iLe():eLe()}),oLe=()=>"Run",cLe=()=>"运行",lLe=()=>"اجرا",uLe=()=>"تشغيل",_Le=()=>"Ejecución",fLe=()=>"रन",fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cLe():t==="fa"?lLe():t==="ar"?uLe():t==="es"?_Le():t==="hi"?fLe():oLe()}),dLe=()=>"Switch run",hLe=()=>"切换运行",pLe=()=>"تغییر اجرا",mLe=()=>"تبديل التشغيل",gLe=()=>"Cambiar de ejecución",vLe=()=>"रन बदलें",bLe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hLe():t==="fa"?pLe():t==="ar"?mLe():t==="es"?gLe():t==="hi"?vLe():dLe()}),yLe=e=>`${e==null?void 0:e.days}d ${e==null?void 0:e.hours}h`,xLe=e=>`${e==null?void 0:e.days} 天 ${e==null?void 0:e.hours} 小时`,wLe=e=>`${e==null?void 0:e.days} روز و ${e==null?void 0:e.hours} ساعت`,kLe=e=>`${e==null?void 0:e.days}ي ${e==null?void 0:e.hours}س`,SLe=e=>`${e==null?void 0:e.days} d ${e==null?void 0:e.hours} h`,CLe=e=>`${e==null?void 0:e.days}दि ${e==null?void 0:e.hours}घं`,ELe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xLe(e):t==="fa"?wLe(e):t==="ar"?kLe(e):t==="es"?SLe(e):t==="hi"?CLe(e):yLe(e)}),NLe=e=>`${e==null?void 0:e.hours}h ${e==null?void 0:e.minutes}m`,zLe=e=>`${e==null?void 0:e.hours} 小时 ${e==null?void 0:e.minutes} 分钟`,jLe=e=>`${e==null?void 0:e.hours} ساعت و ${e==null?void 0:e.minutes} دقیقه`,ALe=e=>`${e==null?void 0:e.hours}س ${e==null?void 0:e.minutes}د`,TLe=e=>`${e==null?void 0:e.hours} h ${e==null?void 0:e.minutes} min`,RLe=e=>`${e==null?void 0:e.hours}घं ${e==null?void 0:e.minutes}मि`,MLe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?zLe(e):t==="fa"?jLe(e):t==="ar"?ALe(e):t==="es"?TLe(e):t==="hi"?RLe(e):NLe(e)}),OLe=e=>`${e==null?void 0:e.value}m`,DLe=e=>`${e==null?void 0:e.value} 分钟`,LLe=e=>`${e==null?void 0:e.value} دقیقه`,ILe=e=>`${e==null?void 0:e.value}د`,$Le=e=>`${e==null?void 0:e.value} min`,BLe=e=>`${e==null?void 0:e.value}मि`,PLe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DLe(e):t==="fa"?LLe(e):t==="ar"?ILe(e):t==="es"?$Le(e):t==="hi"?BLe(e):OLe(e)}),FLe=e=>`${e==null?void 0:e.value}s`,HLe=e=>`${e==null?void 0:e.value} 秒`,qLe=e=>`${e==null?void 0:e.value} ثانیه`,ULe=e=>`${e==null?void 0:e.value}ث`,GLe=e=>`${e==null?void 0:e.value} s`,VLe=e=>`${e==null?void 0:e.value}से`,KLe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?HLe(e):t==="fa"?qLe(e):t==="ar"?ULe(e):t==="es"?GLe(e):t==="hi"?VLe(e):FLe(e)}),WLe=()=>"Code",QLe=()=>"代码",XLe=()=>"کد",YLe=()=>"الشيفرة",ZLe=()=>"Código",JLe=()=>"कोड",eIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QLe():t==="fa"?XLe():t==="ar"?YLe():t==="es"?ZLe():t==="hi"?JLe():WLe()}),tIe=()=>"created",nIe=()=>"创建于",rIe=()=>"ایجادشده",sIe=()=>"أُنشئ",iIe=()=>"creado",aIe=()=>"बनाया गया",oIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nIe():t==="fa"?rIe():t==="ar"?sIe():t==="es"?iIe():t==="hi"?aIe():tIe()}),cIe=()=>"from",lIe=()=>"来自",uIe=()=>"از",_Ie=()=>"من",fIe=()=>"desde",dIe=()=>"से",hIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lIe():t==="fa"?uIe():t==="ar"?_Ie():t==="es"?fIe():t==="hi"?dIe():cIe()}),pIe=()=>"Logs",mIe=()=>"日志",gIe=()=>"گزارش‌ها",vIe=()=>"السجلات",bIe=()=>"Logs",yIe=()=>"लॉग",xIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mIe():t==="fa"?gIe():t==="ar"?vIe():t==="es"?bIe():t==="hi"?yIe():pIe()}),wIe=()=>"Latest run",kIe=()=>"最新运行",SIe=()=>"آخرین اجرا",CIe=()=>"أحدث تشغيل",EIe=()=>"Última ejecución",NIe=()=>"नवीनतम रन",zIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kIe():t==="fa"?SIe():t==="ar"?CIe():t==="es"?EIe():t==="hi"?NIe():wIe()}),jIe=()=>"Code",AIe=()=>"代码",TIe=()=>"کد",RIe=()=>"الشيفرة",MIe=()=>"Código",OIe=()=>"कोड",DIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AIe():t==="fa"?TIe():t==="ar"?RIe():t==="es"?MIe():t==="hi"?OIe():jIe()}),LIe=()=>"Commit",IIe=()=>"提交",$Ie=()=>"کامیت",BIe=()=>"إيداع",PIe=()=>"Commit",FIe=()=>"कमिट",HIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IIe():t==="fa"?$Ie():t==="ar"?BIe():t==="es"?PIe():t==="hi"?FIe():LIe()}),qIe=()=>"created",UIe=()=>"创建于",GIe=()=>"ایجادشده",VIe=()=>"أُنشئ",KIe=()=>"creado",WIe=()=>"बनाया गया",QIe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UIe():t==="fa"?GIe():t==="ar"?VIe():t==="es"?KIe():t==="hi"?WIe():qIe()}),XIe=()=>"Description",YIe=()=>"说明",ZIe=()=>"توضیحات",JIe=()=>"الوصف",e$e=()=>"Descripción",t$e=()=>"विवरण",n$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YIe():t==="fa"?ZIe():t==="ar"?JIe():t==="es"?e$e():t==="hi"?t$e():XIe()}),r$e=()=>"Duration",s$e=()=>"时长",i$e=()=>"مدت",a$e=()=>"المدة",o$e=()=>"Duración",c$e=()=>"अवधि",l$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s$e():t==="fa"?i$e():t==="ar"?a$e():t==="es"?o$e():t==="hi"?c$e():r$e()}),u$e=()=>"exit",_$e=()=>"退出码",f$e=()=>"خروج",d$e=()=>"رمز الخروج",h$e=()=>"salida",p$e=()=>"एग्ज़िट",m$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_$e():t==="fa"?f$e():t==="ar"?d$e():t==="es"?h$e():t==="hi"?p$e():u$e()}),g$e=()=>"from",v$e=()=>"来自",b$e=()=>"از",y$e=()=>"من",x$e=()=>"desde",w$e=()=>"से",k$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v$e():t==="fa"?b$e():t==="ar"?y$e():t==="es"?x$e():t==="hi"?w$e():g$e()}),S$e=()=>"Logs",C$e=()=>"日志",E$e=()=>"گزارش‌ها",N$e=()=>"السجلات",z$e=()=>"Logs",j$e=()=>"लॉग",A$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C$e():t==="fa"?E$e():t==="ar"?N$e():t==="es"?z$e():t==="hi"?j$e():S$e()}),T$e=()=>"Run",R$e=()=>"运行",M$e=()=>"اجرا",O$e=()=>"تشغيل",D$e=()=>"Ejecución",L$e=()=>"रन",I$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R$e():t==="fa"?M$e():t==="ar"?O$e():t==="es"?D$e():t==="hi"?L$e():T$e()}),$$e=()=>"Run history",B$e=()=>"运行历史",P$e=()=>"تاریخچهٔ اجرا",F$e=()=>"سجل التشغيل",H$e=()=>"Historial de ejecuciones",q$e=()=>"रन इतिहास",U$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B$e():t==="fa"?P$e():t==="ar"?F$e():t==="es"?H$e():t==="hi"?q$e():$$e()}),G$e=()=>"Started",V$e=()=>"开始时间",K$e=()=>"آغاز",W$e=()=>"بدأ",Q$e=()=>"Inicio",X$e=()=>"शुरू हुआ",Y$e=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V$e():t==="fa"?K$e():t==="ar"?W$e():t==="es"?Q$e():t==="hi"?X$e():G$e()}),Z$e=()=>"Runs",J$e=()=>"运行",eBe=()=>"اجراها",tBe=()=>"عمليات التشغيل",nBe=()=>"Ejecuciones",rBe=()=>"रन",sBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J$e():t==="fa"?eBe():t==="ar"?tBe():t==="es"?nBe():t==="hi"?rBe():Z$e()}),iBe=()=>"Experiments and their runs will appear here. Ask the agent to set up an experiment to get started.",aBe=()=>"实验及其运行会显示在这里。让智能体设置一个实验即可开始。",oBe=()=>"آزمایش‌ها و اجراهای آن‌ها اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید آزمایشی راه‌اندازی کند.",cBe=()=>"ستظهر التجارب وعمليات تشغيلها هنا. اطلب من الوكيل إعداد تجربة للبدء.",lBe=()=>"Los experimentos y sus ejecuciones aparecerán aquí. Pídele al agente que configure un experimento para empezar.",uBe=()=>"प्रयोग और उनके रन यहाँ दिखेंगे। शुरू करने के लिए एजेंट से एक प्रयोग सेट अप करने को कहें।",_Be=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aBe():t==="fa"?oBe():t==="ar"?cBe():t==="es"?lBe():t==="hi"?uBe():iBe()}),fBe=()=>"No runs yet",dBe=()=>"还没有运行",hBe=()=>"هنوز اجرایی وجود ندارد",pBe=()=>"لا عمليات تشغيل بعد",mBe=()=>"Aún no hay ejecuciones",gBe=()=>"अभी तक कोई रन नहीं",vBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dBe():t==="fa"?hBe():t==="ar"?pBe():t==="es"?mBe():t==="hi"?gBe():fBe()}),bBe=()=>"No experiments yet.",yBe=()=>"还没有实验。",xBe=()=>"هنوز آزمایشی وجود ندارد.",wBe=()=>"لا توجد تجارب بعد.",kBe=()=>"Aún no hay experimentos.",SBe=()=>"अभी तक कोई प्रयोग नहीं।",CBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yBe():t==="fa"?xBe():t==="ar"?wBe():t==="es"?kBe():t==="hi"?SBe():bBe()}),EBe=()=>"Not run yet",NBe=()=>"尚未运行",zBe=()=>"هنوز اجرا نشده",jBe=()=>"لم تُشغَّل بعد",ABe=()=>"Aún sin ejecutar",TBe=()=>"अभी तक नहीं चलाया गया",RBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NBe():t==="fa"?zBe():t==="ar"?jBe():t==="es"?ABe():t==="hi"?TBe():EBe()}),MBe=()=>"1 run",OBe=()=>"1 次运行",DBe=()=>"۱ اجرا",LBe=()=>"تشغيل واحد",IBe=()=>"1 ejecución",$Be=()=>"1 रन",BBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OBe():t==="fa"?DBe():t==="ar"?LBe():t==="es"?IBe():t==="hi"?$Be():MBe()}),PBe=()=>"Open logs",FBe=()=>"打开日志",HBe=()=>"باز کردن گزارش‌ها",qBe=()=>"فتح السجلات",UBe=()=>"Abrir logs",GBe=()=>"लॉग खोलें",VBe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FBe():t==="fa"?HBe():t==="ar"?qBe():t==="es"?UBe():t==="hi"?GBe():PBe()}),KBe=e=>`${e==null?void 0:e.count} runs`,WBe=e=>`${e==null?void 0:e.count} 次运行`,QBe=e=>`${e==null?void 0:e.count} اجرا`,XBe=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,YBe=e=>`${e==null?void 0:e.count} ejecuciones`,ZBe=e=>`${e==null?void 0:e.count} रन`,JBe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WBe(e):t==="fa"?QBe(e):t==="ar"?XBe(e):t==="es"?YBe(e):t==="hi"?ZBe(e):KBe(e)}),ePe=()=>"Stop requested",tPe=()=>"已请求停止",nPe=()=>"درخواست توقف ثبت شد",rPe=()=>"طُلب الإيقاف",sPe=()=>"Detención solicitada",iPe=()=>"रोकने का अनुरोध किया गया",aPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tPe():t==="fa"?nPe():t==="ar"?rPe():t==="es"?sPe():t==="hi"?iPe():ePe()}),oPe=()=>"Stop run",cPe=()=>"停止运行",lPe=()=>"توقف اجرا",uPe=()=>"إيقاف التشغيل",_Pe=()=>"Detener ejecución",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=()=>"Code",pPe=()=>"代码",mPe=()=>"کد",gPe=()=>"الشيفرة",vPe=()=>"Código",bPe=()=>"कोड",yPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pPe():t==="fa"?mPe():t==="ar"?gPe():t==="es"?vPe():t==="hi"?bPe():hPe()}),xPe=()=>"Experiments",wPe=()=>"实验",kPe=()=>"آزمایش‌ها",SPe=()=>"التجارب",CPe=()=>"Experimentos",EPe=()=>"प्रयोग",NPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wPe():t==="fa"?kPe():t==="ar"?SPe():t==="es"?CPe():t==="hi"?EPe():xPe()}),zPe=()=>"Logs",jPe=()=>"日志",APe=()=>"گزارش‌ها",TPe=()=>"السجلات",RPe=()=>"Logs",MPe=()=>"लॉग",j3=((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()}),OPe=()=>"Stop failed:",DPe=()=>"停止失败:",LPe=()=>"توقف ناموفق بود:",IPe=()=>"فشل الإيقاف:",$Pe=()=>"Error al detener:",BPe=()=>"रोकना विफल:",PPe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DPe():t==="fa"?LPe():t==="ar"?IPe():t==="es"?$Pe():t==="hi"?BPe():OPe()}),FPe=()=>"Download this chat as Markdown",HPe=()=>"将此聊天下载为 Markdown",qPe=()=>"دانلود این گفت‌وگو به‌صورت Markdown",UPe=()=>"تنزيل هذه المحادثة بتنسيق Markdown",GPe=()=>"Descarga este chat en Markdown",VPe=()=>"इस चैट को Markdown के रूप में डाउनलोड करें",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=()=>"Copy absolute path",QPe=()=>"复制绝对路径",XPe=()=>"کپی مسیر مطلق",YPe=()=>"نسخ المسار المطلق",ZPe=()=>"Copiar ruta absoluta",JPe=()=>"पूर्ण पथ कॉपी करें",A3=((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=()=>"Open in right-hand panel",tFe=()=>"在右侧面板打开",nFe=()=>"باز کردن در پنل راست",rFe=()=>"فتح في اللوحة اليمنى",sFe=()=>"Abrir en el panel derecho",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=e=>`Remote path: ${e==null?void 0:e.path}`,cFe=e=>`远程路径:${e==null?void 0:e.path}`,lFe=e=>`مسیر راه دور: ${e==null?void 0:e.path}`,uFe=e=>`المسار البعيد: ${e==null?void 0:e.path}`,_Fe=e=>`Ruta remota: ${e==null?void 0:e.path}`,fFe=e=>`दूरस्थ पथ: ${e==null?void 0:e.path}`,xL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?cFe(e):t==="fa"?lFe(e):t==="ar"?uFe(e):t==="es"?_Fe(e):t==="hi"?fFe(e):oFe(e)}),dFe=()=>"Resolving file location…",hFe=()=>"正在解析文件位置…",pFe=()=>"در حال یافتن محل فایل…",mFe=()=>"جارٍ تحديد موقع الملف…",gFe=()=>"Resolviendo la ubicación del archivo…",vFe=()=>"फ़ाइल का स्थान खोजा जा रहा है…",wL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hFe():t==="fa"?pFe():t==="ar"?mFe():t==="es"?gFe():t==="hi"?vFe():dFe()}),bFe=()=>"Clipboard access is unavailable.",yFe=()=>"无法访问剪贴板。",xFe=()=>"دسترسی به کلیپ‌بورد در دسترس نیست.",wFe=()=>"الوصول إلى الحافظة غير متاح.",kFe=()=>"El acceso al portapapeles no está disponible.",SFe=()=>"क्लिपबोर्ड एक्सेस उपलब्ध नहीं है।",kL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yFe():t==="fa"?xFe():t==="ar"?wFe():t==="es"?kFe():t==="hi"?SFe():bFe()}),CFe=e=>`Delete “${e==null?void 0:e.path}”? This cannot be undone.`,EFe=e=>`删除“${e==null?void 0:e.path}”?此操作无法撤销。`,NFe=e=>`«${e==null?void 0:e.path}» حذف شود؟ این کار قابل بازگشت نیست.`,zFe=e=>`حذف «${e==null?void 0:e.path}»؟ لا يمكن التراجع عن هذا الإجراء.`,jFe=e=>`¿Eliminar “${e==null?void 0:e.path}”? Esta acción no se puede deshacer.`,AFe=e=>`“${e==null?void 0:e.path}” हटाएं? इसे वापस नहीं लाया जा सकता।`,TFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?EFe(e):t==="fa"?NFe(e):t==="ar"?zFe(e):t==="es"?jFe(e):t==="hi"?AFe(e):CFe(e)}),RFe=()=>"Duplicate",MFe=()=>"创建副本",OFe=()=>"ایجاد نسخهٔ تکراری",DFe=()=>"تكرار",LFe=()=>"Duplicar",IFe=()=>"डुप्लिकेट करें",$Fe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MFe():t==="fa"?OFe():t==="ar"?DFe():t==="es"?LFe():t==="hi"?IFe():RFe()}),BFe=e=>`File actions for ${e==null?void 0:e.path}`,PFe=e=>`${e==null?void 0:e.path} 的文件操作`,FFe=e=>`عملیات فایل برای ${e==null?void 0:e.path}`,HFe=e=>`إجراءات الملف لـ ${e==null?void 0:e.path}`,qFe=e=>`Acciones de archivo para ${e==null?void 0:e.path}`,UFe=e=>`${e==null?void 0:e.path} के लिए फ़ाइल क्रियाएं`,GFe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?PFe(e):t==="fa"?FFe(e):t==="ar"?HFe(e):t==="es"?qFe(e):t==="hi"?UFe(e):BFe(e)}),VFe=()=>"Open",KFe=()=>"打开",WFe=()=>"باز کردن",QFe=()=>"فتح",XFe=()=>"Abrir",YFe=()=>"खोलें",ZFe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KFe():t==="fa"?WFe():t==="ar"?QFe():t==="es"?XFe():t==="hi"?YFe():VFe()}),JFe=e=>`Rename ${e==null?void 0:e.path}`,eHe=e=>`重命名 ${e==null?void 0:e.path}`,tHe=e=>`تغییر نام ${e==null?void 0:e.path}`,nHe=e=>`إعادة تسمية ${e==null?void 0:e.path}`,rHe=e=>`Renombrar ${e==null?void 0:e.path}`,sHe=e=>`${e==null?void 0:e.path} का नाम बदलें`,iHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?eHe(e):t==="fa"?tHe(e):t==="ar"?nHe(e):t==="es"?rHe(e):t==="hi"?sHe(e):JFe(e)}),aHe=e=>`Not in the ${e==null?void 0:e.root} — showing the copy from the project’s artifacts.`,oHe=e=>`${e==null?void 0:e.root} 中没有该文件——当前显示项目产物中的副本。`,cHe=e=>`فایل در ${e==null?void 0:e.root} نیست — نسخهٔ موجود در خروجی‌های پروژه نمایش داده می‌شود.`,lHe=e=>`ليس في ${e==null?void 0:e.root} — عرض النسخة من مُخرَجات المشروع.`,uHe=e=>`No está en ${e==null?void 0:e.root} — se muestra la copia de los artefactos del proyecto.`,_He=e=>`${e==null?void 0:e.root} में नहीं — प्रोजेक्ट के आर्टिफ़ैक्ट से कॉपी दिखाई जा रही है।`,fHe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oHe(e):t==="fa"?cHe(e):t==="ar"?lHe(e):t==="es"?uHe(e):t==="hi"?_He(e):aHe(e)}),dHe=()=>"Binary file — no inline preview.",hHe=()=>"二进制文件——无法内嵌预览。",pHe=()=>"فایل دودویی است — پیش‌نمایش درون‌خطی ندارد.",mHe=()=>"ملف ثنائي — لا توجد معاينة مضمّنة.",gHe=()=>"Archivo binario — sin vista previa.",vHe=()=>"बाइनरी फ़ाइल — इनलाइन प्रीव्यू नहीं है।",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=()=>"This file changed on disk. Your edits have not been overwritten.",xHe=()=>"此文件已在磁盘上更改。您的编辑未被覆盖。",wHe=()=>"این فایل روی دیسک تغییر کرده است. ویرایش‌های شما جایگزین نشده‌اند.",kHe=()=>"تغيّر هذا الملف على القرص. لم تُستبدل تعديلاتك.",SHe=()=>"Este archivo cambió en disco. Tus cambios no se han sobrescrito.",CHe=()=>"यह फ़ाइल डिस्क पर बदल गई है। आपके बदलाव अधिलेखित नहीं हुए हैं।",dz=((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=()=>"Compile failed",NHe=()=>"编译失败",zHe=()=>"کامپایل ناموفق بود",jHe=()=>"فشل التجميع",AHe=()=>"Error al compilar",THe=()=>"कंपाइल विफल",RHe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NHe():t==="fa"?zHe():t==="ar"?jHe():t==="es"?AHe():t==="hi"?THe():EHe()}),MHe=()=>"Compile PDF",OHe=()=>"编译 PDF",DHe=()=>"کامپایل PDF",LHe=()=>"تجميع PDF",IHe=()=>"Compilar PDF",$He=()=>"PDF कंपाइल करें",hz=((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=()=>"Compiled, but the engine reported errors — check the output below.",PHe=()=>"编译已完成,但引擎报告了错误 — 请查看下方输出。",FHe=()=>"کامپایل انجام شد، اما موتور خطا گزارش کرد — خروجی پایین را بررسی کنید.",HHe=()=>"اكتمل التجميع، لكن المحرك أبلغ عن أخطاء — راجع المُخرَجات أدناه.",qHe=()=>"Compilado, pero el motor informó de errores — revisa la salida de abajo.",UHe=()=>"कंपाइल हुआ, पर इंजन ने त्रुटियाँ बताईं — नीचे आउटपुट जाँचें।",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=()=>"Copy command",KHe=()=>"复制命令",WHe=()=>"کپی فرمان",QHe=()=>"نسخ الأمر",XHe=()=>"Copiar comando",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=()=>"Copy file contents",eqe=()=>"复制文件内容",tqe=()=>"کپی محتوای فایل",nqe=()=>"نسخ محتوى الملف",rqe=()=>"Copiar contenido del archivo",sqe=()=>"फ़ाइल की सामग्री कॉपी करें",pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eqe():t==="fa"?tqe():t==="ar"?nqe():t==="es"?rqe():t==="hi"?sqe():JHe()}),iqe=()=>"Could not copy file contents",aqe=()=>"无法复制文件内容",oqe=()=>"کپی محتوای فایل ممکن نشد",cqe=()=>"تعذّر نسخ محتوى الملف",lqe=()=>"No se pudo copiar el contenido del archivo",uqe=()=>"फ़ाइल की सामग्री कॉपी नहीं हो सकी",_qe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aqe():t==="fa"?oqe():t==="ar"?cqe():t==="es"?lqe():t==="hi"?uqe():iqe()}),fqe=()=>"Copy install command",dqe=()=>"复制安装命令",hqe=()=>"کپی فرمان نصب",pqe=()=>"نسخ أمر التثبيت",mqe=()=>"Copiar comando de instalación",gqe=()=>"इंस्टॉल कमांड कॉपी करें",vqe=((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()}),bqe=()=>"This file was deleted on disk. Your edits have not been discarded.",yqe=()=>"此文件已从磁盘删除。您的编辑未被丢弃。",xqe=()=>"این فایل از روی دیسک حذف شده است. ویرایش‌های شما حذف نشده‌اند.",wqe=()=>"حُذف هذا الملف من القرص. لم تُتجاهل تعديلاتك.",kqe=()=>"Este archivo se eliminó del disco. Tus cambios no se han descartado.",Sqe=()=>"यह फ़ाइल डिस्क से हटा दी गई थी। आपके बदलाव मिटाए नहीं गए हैं।",mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yqe():t==="fa"?xqe():t==="ar"?wqe():t==="es"?kqe():t==="hi"?Sqe():bqe()}),Cqe=()=>"Discard my edits and reload",Eqe=()=>"放弃我的编辑并重新加载",Nqe=()=>"نادیده گرفتن ویرایش‌های من و بارگیری دوباره",zqe=()=>"تجاهل تعديلاتي وإعادة التحميل",jqe=()=>"Descartar mis cambios y recargar",Aqe=()=>"मेरे बदलाव छोड़ें और फिर से लोड करें",Tqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eqe():t==="fa"?Nqe():t==="ar"?zqe():t==="es"?jqe():t==="hi"?Aqe():Cqe()}),Rqe=()=>"Discard unsaved changes and close this file?",Mqe=()=>"要丢弃未保存的更改并关闭此文件吗?",Oqe=()=>"تغییرات ذخیره‌نشده حذف و فایل بسته شود؟",Dqe=()=>"تجاهل التغييرات غير المحفوظة وإغلاق هذا الملف؟",Lqe=()=>"¿Descartar los cambios sin guardar y cerrar este archivo?",Iqe=()=>"सेव न किए गए बदलाव छोड़ें और यह फ़ाइल बंद करें?",gz=((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()}),$qe=()=>"Dismiss",Bqe=()=>"关闭",Pqe=()=>"بستن",Fqe=()=>"تجاهل",Hqe=()=>"Cerrar",qqe=()=>"खारिज करें",Uqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bqe():t==="fa"?Pqe():t==="ar"?Fqe():t==="es"?Hqe():t==="hi"?qqe():$qe()}),Gqe=()=>"Dismiss compile message",Vqe=()=>"关闭编译消息",Kqe=()=>"بستن پیام کامپایل",Wqe=()=>"تجاهل رسالة التجميع",Qqe=()=>"Cerrar mensaje de compilación",Xqe=()=>"कंपाइल संदेश खारिज करें",Yqe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vqe():t==="fa"?Kqe():t==="ar"?Wqe():t==="es"?Qqe():t==="hi"?Xqe():Gqe()}),Zqe=()=>"Dismiss Overleaf message",Jqe=()=>"关闭 Overleaf 消息",eUe=()=>"بستن پیام Overleaf",tUe=()=>"تجاهل رسالة Overleaf",nUe=()=>"Cerrar mensaje de Overleaf",rUe=()=>"Overleaf संदेश खारिज करें",sUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jqe():t==="fa"?eUe():t==="ar"?tUe():t==="es"?nUe():t==="hi"?rUe():Zqe()}),iUe=()=>"Download",aUe=()=>"下载",oUe=()=>"بارگیری",cUe=()=>"تنزيل",lUe=()=>"Descargar",uUe=()=>"डाउनलोड करें",SL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aUe():t==="fa"?oUe():t==="ar"?cUe():t==="es"?lUe():t==="hi"?uUe():iUe()}),_Ue=e=>`Download ${e==null?void 0:e.name} (out of date — recompile first)`,fUe=e=>`下载 ${e==null?void 0:e.name}(版本过旧 — 请先重新编译)`,dUe=e=>`دانلود ${e==null?void 0:e.name} (قدیمی است — ابتدا دوباره کامپایل کنید)`,hUe=e=>`تنزيل ${e==null?void 0:e.name} (غير محدَّث — أعِد التجميع أولًا)`,pUe=e=>`Descargar ${e==null?void 0:e.name} (desactualizado — vuelve a compilar antes)`,mUe=e=>`${e==null?void 0:e.name} डाउनलोड करें (पुरानी — पहले फिर से कंपाइल करें)`,gUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fUe(e):t==="fa"?dUe(e):t==="ar"?hUe(e):t==="es"?pUe(e):t==="hi"?mUe(e):_Ue(e)}),vUe=()=>"Failed to load file:",bUe=()=>"加载文件失败:",yUe=()=>"بارگیری فایل ناموفق بود:",xUe=()=>"تعذّر تحميل الملف:",wUe=()=>"Error al cargar el archivo:",kUe=()=>"फ़ाइल लोड नहीं हो सकी:",vz=((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=()=>"File truncated — showing the first 512 KB.",CUe=()=>"文件已截断——仅显示前 512 KB。",EUe=()=>"فایل کوتاه شده است — فقط ۵۱۲ کیلوبایت نخست نمایش داده می‌شود.",NUe=()=>"تم اقتطاع الملف — عرض أول 512 كيلوبايت.",zUe=()=>"Archivo truncado — se muestran los primeros 512 KB.",jUe=()=>"फ़ाइल छोटी की गई — पहले 512 KB दिखाए जा रहे हैं।",AUe=((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()}),TUe=()=>"The page below stops partway — the full file could not be loaded.",RUe=()=>"下方页面在中途结束——无法加载完整文件。",MUe=()=>"صفحهٔ زیر در میانه متوقف می‌شود — فایل کامل بارگیری نشد.",OUe=()=>"عرض الصفحة أدناه غير مكتمل — تعذّر تحميل الملف كاملًا.",DUe=()=>"La página se corta a mitad — no se pudo cargar el archivo completo.",LUe=()=>"नीचे का पेज बीच में रुक जाता है — पूरी फ़ाइल लोड नहीं हो सकी।",IUe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RUe():t==="fa"?MUe():t==="ar"?OUe():t==="es"?DUe():t==="hi"?LUe():TUe()}),$Ue=e=>`Rendered HTML: ${e==null?void 0:e.name}`,BUe=e=>`已渲染的 HTML:${e==null?void 0:e.name}`,PUe=e=>`HTML رندرشده: ${e==null?void 0:e.name}`,FUe=e=>`HTML المعروض: ${e==null?void 0:e.name}`,HUe=e=>`HTML renderizado: ${e==null?void 0:e.name}`,qUe=e=>`रेंडर किया गया HTML: ${e==null?void 0:e.name}`,UUe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BUe(e):t==="fa"?PUe(e):t==="ar"?FUe(e):t==="es"?HUe(e):t==="hi"?qUe(e):$Ue(e)}),GUe=()=>"Loading…",VUe=()=>"正在加载…",KUe=()=>"در حال بارگیری…",WUe=()=>"جارٍ التحميل…",QUe=()=>"Cargando…",XUe=()=>"लोड हो रहा है…",CL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VUe():t==="fa"?KUe():t==="ar"?WUe():t==="es"?QUe():t==="hi"?XUe():GUe()}),YUe=()=>"File not found.",ZUe=()=>"找不到文件。",JUe=()=>"فایل پیدا نشد.",eGe=()=>"لم يُعثر على الملف.",tGe=()=>"No se encontró el archivo.",nGe=()=>"फ़ाइल नहीं मिली।",Lv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZUe():t==="fa"?JUe():t==="ar"?eGe():t==="es"?tGe():t==="hi"?nGe():YUe()}),rGe=e=>`File not found in the project’s artifacts or the ${e==null?void 0:e.root}.`,sGe=e=>`在项目产物或${e==null?void 0:e.root}中找不到此文件。`,iGe=e=>`فایل در خروجی‌های پروژه یا ${e==null?void 0:e.root} پیدا نشد.`,aGe=e=>`لم يُعثر على الملف في مُخرَجات المشروع أو في ${e==null?void 0:e.root}.`,oGe=e=>`No se encontró el archivo en los artefactos del proyecto ni en ${e==null?void 0:e.root}.`,cGe=e=>`फ़ाइल प्रोजेक्ट के आर्टिफ़ैक्ट या ${e==null?void 0:e.root} में नहीं मिली।`,lGe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sGe(e):t==="fa"?iGe(e):t==="ar"?aGe(e):t==="es"?oGe(e):t==="hi"?cGe(e):rGe(e)}),uGe=e=>`File not found on branch ${e==null?void 0:e.branch}.`,_Ge=e=>`在分支 ${e==null?void 0:e.branch} 上找不到此文件。`,fGe=e=>`فایل در شاخهٔ ${e==null?void 0:e.branch} پیدا نشد.`,dGe=e=>`لم يُعثر على الملف في الفرع ${e==null?void 0:e.branch}.`,hGe=e=>`No se encontró el archivo en la rama ${e==null?void 0:e.branch}.`,pGe=e=>`फ़ाइल ${e==null?void 0:e.branch} ब्रांच पर नहीं मिली।`,mGe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ge(e):t==="fa"?fGe(e):t==="ar"?dGe(e):t==="es"?hGe(e):t==="hi"?pGe(e):uGe(e)}),gGe=()=>"File not found on disk.",vGe=()=>"磁盘上找不到此文件。",bGe=()=>"فایل روی دیسک پیدا نشد.",yGe=()=>"لم يُعثر على الملف على القرص.",xGe=()=>"No se encontró el archivo en disco.",wGe=()=>"फ़ाइल डिस्क पर नहीं मिली।",kGe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vGe():t==="fa"?bGe():t==="ar"?yGe():t==="es"?xGe():t==="hi"?wGe():gGe()}),SGe=e=>`File not found in the ${e==null?void 0:e.root} or the project’s artifacts.`,CGe=e=>`在${e==null?void 0:e.root}或项目产物中找不到此文件。`,EGe=e=>`فایل در ${e==null?void 0:e.root} یا خروجی‌های پروژه پیدا نشد.`,NGe=e=>`لم يُعثر على الملف في ${e==null?void 0:e.root} ولا في مُخرَجات المشروع.`,zGe=e=>`No se encontró el archivo en ${e==null?void 0:e.root} ni en los artefactos del proyecto.`,jGe=e=>`फ़ाइल ${e==null?void 0:e.root} या प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं मिली।`,AGe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?CGe(e):t==="fa"?EGe(e):t==="ar"?NGe(e):t==="es"?zGe(e):t==="hi"?jGe(e):SGe(e)}),TGe=e=>`Not in the project’s artifacts — showing the copy from the ${e==null?void 0:e.root}.`,RGe=e=>`项目产物中没有此文件 — 正在显示${e==null?void 0:e.root}中的副本。`,MGe=e=>`در خروجی‌های پروژه نیست — نسخهٔ موجود در ${e==null?void 0:e.root} نمایش داده می‌شود.`,OGe=e=>`ليس في مُخرَجات المشروع — عرض النسخة من ${e==null?void 0:e.root}.`,DGe=e=>`No está en los artefactos del proyecto — se muestra la copia que hay en ${e==null?void 0:e.root}.`,LGe=e=>`प्रोजेक्ट के आर्टिफ़ैक्ट में नहीं — ${e==null?void 0:e.root} से कॉपी दिखाई जा रही है।`,IGe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?RGe(e):t==="fa"?MGe(e):t==="ar"?OGe(e):t==="es"?DGe(e):t==="hi"?LGe(e):TGe(e)}),$Ge=()=>"Open in default editor",BGe=()=>"在默认编辑器中打开",PGe=()=>"باز کردن در ویرایشگر پیش‌فرض",FGe=()=>"فتح في المحرر الافتراضي",HGe=()=>"Abrir en el editor predeterminado",qGe=()=>"डिफ़ॉल्ट एडिटर में खोलें",bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BGe():t==="fa"?PGe():t==="ar"?FGe():t==="es"?HGe():t==="hi"?qGe():$Ge()}),UGe=e=>`Committed copy from ${e==null?void 0:e.branch}, not on disk`,GGe=e=>`${e==null?void 0:e.branch} 上已提交的副本,不在磁盘上`,VGe=e=>`نسخهٔ کامیت‌شده از ${e==null?void 0:e.branch}، نه روی دیسک`,KGe=e=>`نسخة مودعة من ${e==null?void 0:e.branch}، ليست على القرص`,WGe=e=>`Copia confirmada de ${e==null?void 0:e.branch}, no en disco`,QGe=e=>`${e==null?void 0:e.branch} की कमिट की गई कॉपी, डिस्क पर नहीं`,wS=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?GGe(e):t==="fa"?VGe(e):t==="ar"?KGe(e):t==="es"?WGe(e):t==="hi"?QGe(e):UGe(e)}),XGe=()=>"Only for projects on this computer",YGe=()=>"仅适用于此电脑上的项目",ZGe=()=>"فقط برای پروژه‌های این رایانه",JGe=()=>"فقط للمشاريع على هذا الكمبيوتر",eVe=()=>"Solo para proyectos en este equipo",tVe=()=>"केवल इस कंप्यूटर के प्रोजेक्ट के लिए",nVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YGe():t==="fa"?ZGe():t==="ar"?JGe():t==="es"?eVe():t==="hi"?tVe():XGe()}),rVe=()=>"Only for files in the project folder",sVe=()=>"仅适用于项目文件夹中的文件",iVe=()=>"فقط برای فایل‌های پوشهٔ پروژه",aVe=()=>"فقط لملفات مجلد المشروع",oVe=()=>"Solo para archivos de la carpeta del proyecto",cVe=()=>"केवल प्रोजेक्ट फ़ोल्डर की फ़ाइलों के लिए",lVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sVe():t==="fa"?iVe():t==="ar"?aVe():t==="es"?oVe():t==="hi"?cVe():rVe()}),uVe=()=>"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.",_Ve=()=>"你有未保存的编辑时,Overleaf 上的文件副本被拉取,因此当前内容已与磁盘不同。现在保存会将此草稿发送到 Overleaf。",fVe=()=>"هنگامی که ویرایش‌های ذخیره‌نشده داشتید، نسخهٔ Overleaf این فایل دریافت شد؛ بنابراین آنچه می‌بینید دیگر با فایل روی دیسک یکی نیست. ذخیره‌سازی اکنون این پیش‌نویس را به Overleaf می‌فرستد.",dVe=()=>"تم سحب نسخة Overleaf من هذا الملف بينما كانت لديك تعديلات غير محفوظة، لذا ما تراه لم يعد مطابقًا لما هو على القرص. الحفظ الآن يرسل هذه المسودة إلى Overleaf بدلًا من ذلك.",hVe=()=>"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.",pVe=()=>"इस फ़ाइल की Overleaf कॉपी तब खींची गई जब आपके पास सेव न किए गए बदलाव थे, इसलिए जो आप देख रहे हैं वह अब डिस्क पर मौजूद चीज़ नहीं है। अभी सेव करने पर यह ड्राफ़्ट सीधे Overleaf को भेज दिया जाएगा।",mVe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ve():t==="fa"?fVe():t==="ar"?dVe():t==="es"?hVe():t==="hi"?pVe():uVe()}),gVe=()=>"Overwrite disk file",vVe=()=>"覆盖磁盘文件",bVe=()=>"بازنویسی فایل روی دیسک",yVe=()=>"استبدال الملف على القرص",xVe=()=>"Sobrescribir el archivo en disco",wVe=()=>"डिस्क फ़ाइल अधिलेखित करें",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=()=>"Compiled PDF is out of date",CVe=()=>"已编译的 PDF 不是最新版本",EVe=()=>"PDF کامپایل‌شده به‌روز نیست",NVe=()=>"ملف PDF المُجمَّع غير محدَّث",zVe=()=>"El PDF compilado está desactualizado",jVe=()=>"कंपाइल की गई PDF पुरानी है",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=()=>"project clone",RVe=()=>"项目克隆",MVe=()=>"کلون پروژه",OVe=()=>"نسخة المشروع المستنسخة",DVe=()=>"el clon del proyecto",LVe=()=>"प्रोजेक्ट क्लोन",a1=((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()}),IVe=()=>"Recompile PDF",$Ve=()=>"重新编译 PDF",BVe=()=>"کامپایل دوبارهٔ PDF",PVe=()=>"إعادة تجميع PDF",FVe=()=>"Volver a compilar el PDF",HVe=()=>"PDF फिर से कंपाइल करें",yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ve():t==="fa"?BVe():t==="ar"?PVe():t==="es"?FVe():t==="hi"?HVe():IVe()}),qVe=()=>"Reload from disk",UVe=()=>"从磁盘重新加载",GVe=()=>"بارگذاری مجدد از دیسک",VVe=()=>"إعادة التحميل من القرص",KVe=()=>"Recargar desde el disco",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=()=>"Reveal in file manager",YVe=()=>"在文件管理器中显示",ZVe=()=>"نمایش در مدیر فایل",JVe=()=>"إظهار في مدير الملفات",eKe=()=>"Mostrar en el administrador de archivos",tKe=()=>"फ़ाइल मैनेजर में दिखाएँ",T3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YVe():t==="fa"?ZVe():t==="ar"?JVe():t==="es"?eKe():t==="hi"?tKe():XVe()}),nKe=()=>"Save failed",rKe=()=>"保存失败",sKe=()=>"ذخیره ناموفق بود",iKe=()=>"فشل الحفظ",aKe=()=>"Error al guardar",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=()=>"Saving…",uKe=()=>"正在保存…",_Ke=()=>"در حال ذخیره…",fKe=()=>"جارٍ الحفظ…",dKe=()=>"Guardando…",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=()=>"Selected — press ⌘C",gKe=()=>"已选中 — 按 ⌘C 复制",vKe=()=>"انتخاب شد — برای کپی ⌘C را بزنید",bKe=()=>"محدد — اضغط ⌘C",yKe=()=>"Seleccionado — pulsa ⌘C",xKe=()=>"चयनित — ⌘C दबाएं",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=()=>"session’s worktree",SKe=()=>"会话工作树",CKe=()=>"درخت کاری نشست",EKe=()=>"شجرة عمل الجلسة",NKe=()=>"el árbol de trabajo de la sesión",zKe=()=>"सेशन की वर्कट्री",o1=((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()}),jKe=()=>"Show compiled PDF",AKe=()=>"显示已编译的 PDF",TKe=()=>"نمایش PDF کامپایل‌شده",RKe=()=>"عرض ملف PDF المُجمَّع",MKe=()=>"Mostrar el PDF compilado",OKe=()=>"कंपाइल की गई PDF दिखाएं",xz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AKe():t==="fa"?TKe():t==="ar"?RKe():t==="es"?MKe():t==="hi"?OKe():jKe()}),DKe=()=>"This PDF was compiled from an earlier version of the source — recompile to update it.",LKe=()=>"此 PDF 由较早版本的源文件编译而成——请重新编译以更新。",IKe=()=>"این PDF از نسخه‌ای قدیمی‌تر از منبع ساخته شده است — برای به‌روزرسانی دوباره کامپایل کنید.",$Ke=()=>"أُنشئ ملف PDF هذا من نسخة أقدم من المصدر — أعِد تجميعه لتحديثه.",BKe=()=>"Este PDF se compiló a partir de una versión anterior del código fuente — vuelve a compilar para actualizarlo.",PKe=()=>"यह PDF सोर्स के पुराने वर्शन से कंपाइल हुआ था — अपडेट करने के लिए फिर से कंपाइल करें।",FKe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LKe():t==="fa"?IKe():t==="ar"?$Ke():t==="es"?BKe():t==="hi"?PKe():DKe()}),HKe=()=>"This session's worktree isn't available — showing the project clone's copy.",qKe=()=>"此会话的工作树不可用——当前显示项目克隆中的副本。",UKe=()=>"درخت کاری این نشست در دسترس نیست — نسخهٔ کلون پروژه نمایش داده می‌شود.",GKe=()=>"شجرة عمل هذه الجلسة غير متاحة — عرض الملف من نسخة المشروع المستنسخة.",VKe=()=>"El árbol de trabajo de esta sesión no está disponible — se muestra la copia del clon del proyecto.",KKe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है — प्रोजेक्ट क्लोन की कॉपी दिखाई जा रही है।",WKe=((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()}),QKe=()=>"Unsaved",XKe=()=>"未保存",YKe=()=>"ذخیره نشده",ZKe=()=>"غير محفوظ",JKe=()=>"Sin guardar",eWe=()=>"सेव नहीं हुआ",EL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XKe():t==="fa"?YKe():t==="ar"?ZKe():t==="es"?JKe():t==="hi"?eWe():QKe()}),tWe=()=>"Unsaved — ⌘S to save",nWe=()=>"未保存 — 按 ⌘S 保存",rWe=()=>"ذخیره نشده — برای ذخیره ⌘S را بزنید",sWe=()=>"غير محفوظ — ⌘S للحفظ",iWe=()=>"Sin guardar — ⌘S para guardar",aWe=()=>"सेव नहीं हुआ — सेव करने के लिए ⌘S दबाएं",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=()=>"Update orx on the remote machine to edit this file safely.",lWe=()=>"请更新远程计算机上的 orx,以安全编辑此文件。",uWe=()=>"برای ویرایش ایمن این فایل، orx را روی دستگاه ریموت به‌روز کنید.",_We=()=>"حدّث orx على الجهاز البعيد لتعديل هذا الملف بأمان.",fWe=()=>"Actualiza orx en la máquina remota para editar este archivo de forma segura.",dWe=()=>"इस फ़ाइल को सुरक्षित रूप से संपादित करने के लिए रिमोट मशीन पर orx अपडेट करें।",hWe=((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()}),pWe=()=>"This session’s worktree isn’t available, and the file isn’t in the project clone or its artifacts.",mWe=()=>"此会话的工作树不可用,项目克隆和产物中也没有此文件。",gWe=()=>"درخت کاری این نشست در دسترس نیست و فایل در نسخهٔ محلی پروژه یا خروجی‌های آن هم پیدا نشد.",vWe=()=>"شجرة عمل هذه الجلسة غير متاحة، والملف ليس في نسخة المشروع المستنسخة ولا في مُخرَجاته.",bWe=()=>"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.",yWe=()=>"इस सेशन की वर्कट्री उपलब्ध नहीं है, और फ़ाइल प्रोजेक्ट क्लोन या उसके आर्टिफ़ैक्ट में नहीं है।",xWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mWe():t==="fa"?gWe():t==="ar"?vWe():t==="es"?bWe():t==="hi"?yWe():pWe()}),wWe=()=>"Files in this workspace will appear here. Ask the agent to create a file to get started.",kWe=()=>"此工作区中的文件会显示在这里。让智能体创建一个文件即可开始。",SWe=()=>"فایل‌های این فضای کاری اینجا نمایش داده می‌شوند. برای شروع، از عامل بخواهید فایلی ایجاد کند.",CWe=()=>"ستظهر ملفات مساحة العمل هنا. اطلب من الوكيل إنشاء ملف للبدء.",EWe=()=>"Los archivos de este espacio de trabajo aparecerán aquí. Pídele al agente que cree un archivo para empezar.",NWe=()=>"इस वर्कस्पेस की फ़ाइलें यहाँ दिखेंगी। शुरू करने के लिए एजेंट से एक फ़ाइल बनाने को कहें।",zWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kWe():t==="fa"?SWe():t==="ar"?CWe():t==="es"?EWe():t==="hi"?NWe():wWe()}),jWe=()=>"Back to preview",AWe=()=>"返回预览",TWe=()=>"بازگشت به پیش‌نمایش",RWe=()=>"العودة إلى المعاينة",MWe=()=>"Volver a la vista previa",OWe=()=>"प्रीव्यू पर वापस जाएं",DWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AWe():t==="fa"?TWe():t==="ar"?RWe():t==="es"?MWe():t==="hi"?OWe():jWe()}),LWe=e=>`${e==null?void 0:e.count} changed files`,IWe=e=>`${e==null?void 0:e.count} 个已更改文件`,$We=e=>`${e==null?void 0:e.count} فایل تغییرکرده`,BWe=e=>`الملفات المعدَّلة: ${e==null?void 0:e.count}`,PWe=e=>`${e==null?void 0:e.count} archivos modificados`,FWe=e=>`${e==null?void 0:e.count} बदली गई फ़ाइलें`,NL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?IWe(e):t==="fa"?$We(e):t==="ar"?BWe(e):t==="es"?PWe(e):t==="hi"?FWe(e):LWe(e)}),HWe=()=>"Changed files",qWe=()=>"已更改文件",UWe=()=>"فایل‌های تغییرکرده",GWe=()=>"الملفات المتغيّرة",VWe=()=>"Archivos modificados",KWe=()=>"बदली गई फ़ाइलें",WWe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qWe():t==="fa"?UWe():t==="ar"?GWe():t==="es"?VWe():t==="hi"?KWe():HWe()}),QWe=()=>"Diff preview truncated",XWe=()=>"差异预览已截断",YWe=()=>"پیش‌نمایش تفاوت کوتاه شده است",ZWe=()=>"معاينة الفروق مقتطعة",JWe=()=>"Vista previa del diff truncada",eQe=()=>"डिफ़ प्रीव्यू छोटा किया गया",tQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XWe():t==="fa"?YWe():t==="ar"?ZWe():t==="es"?JWe():t==="hi"?eQe():QWe()}),nQe=e=>`${e==null?void 0:e.count} files shown (partial)`,rQe=e=>`显示 ${e==null?void 0:e.count} 个文件(部分)`,sQe=e=>`${e==null?void 0:e.count} فایل نمایش داده شده (ناقص)`,iQe=e=>`الملفات المعروضة: ${e==null?void 0:e.count} (عرض جزئي)`,aQe=e=>`${e==null?void 0:e.count} archivos mostrados (parcial)`,oQe=e=>`${e==null?void 0:e.count} फ़ाइलें दिखाई गईं (आंशिक)`,cQe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rQe(e):t==="fa"?sQe(e):t==="ar"?iQe(e):t==="es"?aQe(e):t==="hi"?oQe(e):nQe(e)}),lQe=()=>"No changes.",uQe=()=>"没有更改。",_Qe=()=>"تغییری وجود ندارد.",fQe=()=>"لا توجد تغييرات.",dQe=()=>"No hay cambios.",hQe=()=>"कोई बदलाव नहीं।",pQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uQe():t==="fa"?_Qe():t==="ar"?fQe():t==="es"?dQe():t==="hi"?hQe():lQe()}),mQe=()=>"No complete file preview was available before the cutoff.",gQe=()=>"在截断位置之前没有完整的文件预览。",vQe=()=>"پیش از نقطهٔ برش، پیش‌نمایش کاملی از هیچ فایلی موجود نبود.",bQe=()=>"لم تتوفر معاينة كاملة للملف قبل الحد الأقصى.",yQe=()=>"No se pudo previsualizar ningún archivo completo antes del límite.",xQe=()=>"कटऑफ़ से पहले कोई पूरा फ़ाइल प्रीव्यू उपलब्ध नहीं था।",wQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gQe():t==="fa"?vQe():t==="ar"?bQe():t==="es"?yQe():t==="hi"?xQe():mQe()}),kQe=()=>"No textual diff for this file.",SQe=()=>"此文件没有文本差异。",CQe=()=>"برای این فایل تفاوت متنی وجود ندارد.",EQe=()=>"لا يوجد فرق نصّي لهذا الملف.",NQe=()=>"No hay diff de texto para este archivo.",zQe=()=>"इस फ़ाइल के लिए कोई टेक्स्ट डिफ़ नहीं है।",jQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SQe():t==="fa"?CQe():t==="ar"?EQe():t==="es"?NQe():t==="hi"?zQe():kQe()}),AQe=()=>"1 changed file",TQe=()=>"1 个已更改文件",RQe=()=>"۱ فایل تغییرکرده",MQe=()=>"ملف واحد معدَّل",OQe=()=>"1 archivo modificado",DQe=()=>"1 बदली गई फ़ाइल",zL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TQe():t==="fa"?RQe():t==="ar"?MQe():t==="es"?OQe():t==="hi"?DQe():AQe()}),LQe=()=>"1 file shown (partial)",IQe=()=>"显示 1 个文件(部分)",$Qe=()=>"۱ فایل نمایش داده شده (ناقص)",BQe=()=>"عُرض ملف واحد (جزئيًا)",PQe=()=>"1 archivo mostrado (parcial)",FQe=()=>"1 फ़ाइल दिखाई गई (आंशिक)",HQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IQe():t==="fa"?$Qe():t==="ar"?BQe():t==="es"?PQe():t==="hi"?FQe():LQe()}),qQe=()=>"Unable to parse this diff.",UQe=()=>"无法解析此差异。",GQe=()=>"خواندن این تفاوت ممکن نبود.",VQe=()=>"تعذّر تحليل هذا الفرق.",KQe=()=>"No se pudo interpretar este diff.",WQe=()=>"यह डिफ़ पार्स नहीं हो सका।",QQe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UQe():t==="fa"?GQe():t==="ar"?VQe():t==="es"?KQe():t==="hi"?WQe():qQe()}),XQe=e=>`Showing the first ${e==null?void 0:e.limit} (${e==null?void 0:e.read} read). View the complete diff locally with git.`,YQe=e=>`正在显示前 ${e==null?void 0:e.limit}(已读取 ${e==null?void 0:e.read})。请在本地使用 git 查看完整差异。`,ZQe=e=>`نخستین ${e==null?void 0:e.limit} نمایش داده می‌شود (${e==null?void 0:e.read} خوانده شد). تفاوت کامل را با git به‌صورت محلی ببینید.`,JQe=e=>`عرض أول ${e==null?void 0:e.limit} (قُرئ ${e==null?void 0:e.read}). اطّلع على الفرق الكامل محليًا عبر git.`,eXe=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.`,tXe=e=>`पहले ${e==null?void 0:e.limit} दिखाए जा रहे हैं (${e==null?void 0:e.read} पढ़े गए)। git के साथ लोकल रूप से पूरा डिफ़ देखें।`,nXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?YQe(e):t==="fa"?ZQe(e):t==="ar"?JQe(e):t==="es"?eXe(e):t==="hi"?tXe(e):XQe(e)}),rXe=()=>"View full diff",sXe=()=>"查看完整差异",iXe=()=>"نمایش تفاوت کامل",aXe=()=>"عرض الفرق الكامل",oXe=()=>"Ver diff completo",cXe=()=>"पूरा डिफ़ देखें",lXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sXe():t==="fa"?iXe():t==="ar"?aXe():t==="es"?oXe():t==="hi"?cXe():rXe()}),uXe=()=>"Create a token ↗",_Xe=()=>"创建令牌 ↗",fXe=()=>"ساخت توکن ↗",dXe=()=>"إنشاء رمز ↗",hXe=()=>"Crear un token ↗",pXe=()=>"एक टोकन बनाएं ↗",mXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Xe():t==="fa"?fXe():t==="ar"?dXe():t==="es"?hXe():t==="hi"?pXe():uXe()}),gXe=()=>"Keep the agent working toward a goal",vXe=()=>"让智能体持续朝目标推进",bXe=()=>"عامل را در مسیر یک هدف نگه دارید",yXe=()=>"اجعل الوكيل يعمل نحو هدف",xXe=()=>"Mantén al agente trabajando hacia un objetivo",wXe=()=>"एजेंट को एक लक्ष्य की ओर काम पर रखें",kXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vXe():t==="fa"?bXe():t==="ar"?yXe():t==="es"?xXe():t==="hi"?wXe():gXe()}),SXe=()=>"Approve and run",CXe=()=>"批准并运行",EXe=()=>"تأیید و اجرا",NXe=()=>"الموافقة والتشغيل",zXe=()=>"Aprobar y ejecutar",jXe=()=>"स्वीकार करें और चलाएं",AXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CXe():t==="fa"?EXe():t==="ar"?NXe():t==="es"?zXe():t==="hi"?jXe():SXe()}),TXe=()=>"Cancel setup",RXe=()=>"取消设置",MXe=()=>"لغو راه‌اندازی",OXe=()=>"إلغاء الإعداد",DXe=()=>"Cancelar configuración",LXe=()=>"सेटअप रद्द करें",IXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RXe():t==="fa"?MXe():t==="ar"?OXe():t==="es"?DXe():t==="hi"?LXe():TXe()}),$Xe=()=>"Checking connection…",BXe=()=>"正在检查连接…",PXe=()=>"در حال بررسی اتصال…",FXe=()=>"جارٍ التحقق من الإعداد…",HXe=()=>"Comprobando conexión…",qXe=()=>"कनेक्शन जाँचा जा रहा है…",UXe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?BXe():t==="fa"?PXe():t==="ar"?FXe():t==="es"?HXe():t==="hi"?qXe():$Xe()}),GXe=e=>`${e==null?void 0:e.agent} is connected.`,VXe=e=>`${e==null?void 0:e.agent} 已连接。`,KXe=e=>`${e==null?void 0:e.agent} متصل است.`,WXe=e=>`أصبح ${e==null?void 0:e.agent} جاهزًا.`,QXe=e=>`${e==null?void 0:e.agent} está conectado.`,XXe=e=>`${e==null?void 0:e.agent} कनेक्टेड है।`,YXe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VXe(e):t==="fa"?KXe(e):t==="ar"?WXe(e):t==="es"?QXe(e):t==="hi"?XXe(e):GXe(e)}),ZXe=()=>"Setup needs attention.",JXe=()=>"设置需要处理。",eYe=()=>"راه‌اندازی نیاز به بررسی دارد.",tYe=()=>"تعذّر إكمال الإعداد.",nYe=()=>"La configuración requiere atención.",rYe=()=>"सेटअप पर ध्यान देने की ज़रूरत है।",jL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JXe():t==="fa"?eYe():t==="ar"?tYe():t==="es"?nYe():t==="hi"?rYe():ZXe()}),sYe=()=>"Install",iYe=()=>"安装",aYe=()=>"نصب",oYe=()=>"تثبيت",cYe=()=>"Instalar",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=e=>`Approve the command below to download and install ${e==null?void 0:e.agent} on your computer.`,fYe=e=>`批准以下命令以在您的电脑上下载并安装 ${e==null?void 0:e.agent}。`,dYe=e=>`برای دانلود و نصب ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,hYe=e=>`سيؤدي هذا إلى تنزيل ${e==null?void 0:e.agent} وتثبيته على جهازك. وافق لتشغيل الأمر أدناه.`,pYe=e=>`Aprueba el siguiente comando para descargar e instalar ${e==null?void 0:e.agent} en tu equipo.`,mYe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} डाउनलोड और इंस्टॉल करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,gYe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fYe(e):t==="fa"?dYe(e):t==="ar"?hYe(e):t==="es"?pYe(e):t==="hi"?mYe(e):_Ye(e)}),vYe=()=>"Could not load setup commands.",bYe=()=>"无法加载设置命令。",yYe=()=>"بارگیری دستورهای راه‌اندازی ناموفق بود.",xYe=()=>"تعذّر تحميل أوامر الإعداد.",wYe=()=>"No se pudieron cargar los comandos de configuración.",kYe=()=>"सेटअप कमांड लोड नहीं हो सके।",SYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bYe():t==="fa"?yYe():t==="ar"?xYe():t==="es"?wYe():t==="hi"?kYe():vYe()}),CYe=()=>"Sign in",EYe=()=>"登录",NYe=()=>"ورود",zYe=()=>"تسجيل الدخول",jYe=()=>"Iniciar sesión",AYe=()=>"साइन इन करें",AL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EYe():t==="fa"?NYe():t==="ar"?zYe():t==="es"?jYe():t==="hi"?AYe():CYe()}),TYe=()=>"The agent is not ready yet. Re-check or retry sign-in.",RYe=()=>"代理尚未就绪。请重新检查或重试登录。",MYe=()=>"عامل هنوز آماده نیست. دوباره بررسی کنید یا ورود را تکرار کنید.",OYe=()=>"وكيل البرمجة غير جاهز بعد. أعد التحقق ثم حاول مجددًا.",DYe=()=>"El agente aún no está listo. Vuelve a comprobarlo o intenta iniciar sesión de nuevo.",LYe=()=>"एजेंट अभी तैयार नहीं है। फिर से जाँचें या साइन-इन फिर से कोशिश करें।",TL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?RYe():t==="fa"?MYe():t==="ar"?OYe():t==="es"?DYe():t==="hi"?LYe():TYe()}),IYe=()=>"Install, update, and sign-in buttons open a terminal here in OpenResearch.",$Ye=()=>"安装、更新和登录按钮会在 OpenResearch 内打开终端。",BYe=()=>"دکمه‌های نصب، به‌روزرسانی و ورود، ترمینالی در همین OpenResearch باز می‌کنند.",PYe=()=>"يفتح طرفية هنا",FYe=()=>"Los botones de instalación, actualización e inicio de sesión abren un terminal aquí, en OpenResearch.",HYe=()=>"इंस्टॉल, अपडेट और साइन-इन बटन OpenResearch में यहीं एक टर्मिनल खोलते हैं।",qYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ye():t==="fa"?BYe():t==="ar"?PYe():t==="es"?FYe():t==="hi"?HYe():IYe()}),UYe=()=>"This install command requires Node.js and npm.",GYe=()=>"此安装命令需要 Node.js 和 npm。",VYe=()=>"این دستور نصب به Node.js و npm نیاز دارد.",KYe=()=>"يلزم تثبيت Node.js وnpm لتشغيل هذا الأمر.",WYe=()=>"Este comando de instalación requiere Node.js y npm.",QYe=()=>"इस इंस्टॉल कमांड के लिए Node.js और npm ज़रूरी हैं।",XYe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GYe():t==="fa"?VYe():t==="ar"?KYe():t==="es"?WYe():t==="hi"?QYe():UYe()}),YYe=e=>`Running \`${e==null?void 0:e.command}\` in the terminal:`,ZYe=e=>`正在终端中运行 \`${e==null?void 0:e.command}\`:`,JYe=e=>`در حال اجرای \`${e==null?void 0:e.command}\` در ترمینال:`,eZe=e=>`جارٍ تشغيل \`${e==null?void 0:e.command}\` في الطرفية:`,tZe=e=>`Ejecutando \`${e==null?void 0:e.command}\` en el terminal:`,nZe=e=>`टर्मिनल में \`${e==null?void 0:e.command}\` चलाया जा रहा है:`,rZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZYe(e):t==="fa"?JYe(e):t==="ar"?eZe(e):t==="es"?tZe(e):t==="hi"?nZe(e):YYe(e)}),sZe=e=>`Set up ${e==null?void 0:e.agent}`,iZe=e=>`设置 ${e==null?void 0:e.agent}`,aZe=e=>`راه‌اندازی ${e==null?void 0:e.agent}`,oZe=e=>`إعداد ${e==null?void 0:e.agent}`,cZe=e=>`Configurar ${e==null?void 0:e.agent}`,lZe=e=>`${e==null?void 0:e.agent} सेट अप करें`,wz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iZe(e):t==="fa"?aZe(e):t==="ar"?oZe(e):t==="es"?cZe(e):t==="hi"?lZe(e):sZe(e)}),uZe=()=>"Update",_Ze=()=>"更新",fZe=()=>"به‌روزرسانی",dZe=()=>"تحديث",hZe=()=>"Actualizar",pZe=()=>"अपडेट करें",mZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Ze():t==="fa"?fZe():t==="ar"?dZe():t==="es"?hZe():t==="hi"?pZe():uZe()}),gZe=e=>`Approve the command below to update ${e==null?void 0:e.agent} on your computer.`,vZe=e=>`批准以下命令以在您的电脑上更新 ${e==null?void 0:e.agent}。`,bZe=e=>`برای به‌روزرسانی ${e==null?void 0:e.agent} روی رایانه خود، دستور زیر را تأیید کنید.`,yZe=e=>`سيؤدي هذا إلى تحديث ${e==null?void 0:e.agent} على جهازك. وافق لتشغيل الأمر أدناه.`,xZe=e=>`Aprueba el siguiente comando para actualizar ${e==null?void 0:e.agent} en tu equipo.`,wZe=e=>`अपने कंप्यूटर पर ${e==null?void 0:e.agent} अपडेट करने के लिए नीचे दी गई कमांड को स्वीकार करें।`,kZe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?vZe(e):t==="fa"?bZe(e):t==="ar"?yZe(e):t==="es"?xZe(e):t==="hi"?wZe(e):gZe(e)}),SZe=()=>"All projects",CZe=()=>"所有项目",EZe=()=>"همهٔ پروژه‌ها",NZe=()=>"كل المشاريع",zZe=()=>"Todos los proyectos",jZe=()=>"सभी प्रोजेक्ट",kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CZe():t==="fa"?EZe():t==="ar"?NZe():t==="es"?zZe():t==="hi"?jZe():SZe()}),AZe=()=>"Configure Repository",TZe=()=>"配置仓库",RZe=()=>"پیکربندی مخزن",MZe=()=>"إعداد المستودع",OZe=()=>"Configurar repositorio",DZe=()=>"रिपॉज़िटरी कॉन्फ़िगर करें",LZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TZe():t==="fa"?RZe():t==="ar"?MZe():t==="es"?OZe():t==="hi"?DZe():AZe()}),IZe=()=>"Create a new project",$Ze=()=>"新建项目",BZe=()=>"ایجاد پروژهٔ جدید",PZe=()=>"إنشاء مشروع جديد",FZe=()=>"Crear un proyecto nuevo",HZe=()=>"नया प्रोजेक्ट बनाएं",qZe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Ze():t==="fa"?BZe():t==="ar"?PZe():t==="es"?FZe():t==="hi"?HZe():IZe()}),UZe=()=>"Hide sidebar",GZe=()=>"隐藏侧边栏",VZe=()=>"پنهان کردن نوار کناری",KZe=()=>"إخفاء الشريط الجانبي",WZe=()=>"Ocultar barra lateral",QZe=()=>"साइडबार छिपाएं",Sz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GZe():t==="fa"?VZe():t==="ar"?KZe():t==="es"?WZe():t==="hi"?QZe():UZe()}),XZe=()=>"Project",YZe=()=>"项目",ZZe=()=>"پروژه",JZe=()=>"المشروع",eJe=()=>"Proyecto",tJe=()=>"प्रोजेक्ट",RL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YZe():t==="fa"?ZZe():t==="ar"?JZe():t==="es"?eJe():t==="hi"?tJe():XZe()}),nJe=e=>`${e==null?void 0:e.count} cancelled`,rJe=e=>`${e==null?void 0:e.count} 次取消`,sJe=e=>`${e==null?void 0:e.count} لغوشده`,iJe=e=>`الملغاة: ${e==null?void 0:e.count}`,aJe=e=>`${e==null?void 0:e.count} canceladas`,oJe=e=>`${e==null?void 0:e.count} रद्द`,cJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rJe(e):t==="fa"?sJe(e):t==="ar"?iJe(e):t==="es"?aJe(e):t==="hi"?oJe(e):nJe(e)}),lJe=e=>`${e==null?void 0:e.count} done`,uJe=e=>`${e==null?void 0:e.count} 次完成`,_Je=e=>`${e==null?void 0:e.count} تمام‌شده`,fJe=e=>`المكتملة: ${e==null?void 0:e.count}`,dJe=e=>`${e==null?void 0:e.count} completadas`,hJe=e=>`${e==null?void 0:e.count} पूरे`,pJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uJe(e):t==="fa"?_Je(e):t==="ar"?fJe(e):t==="es"?dJe(e):t==="hi"?hJe(e):lJe(e)}),mJe=e=>`${e==null?void 0:e.count} failed`,gJe=e=>`${e==null?void 0:e.count} 次失败`,vJe=e=>`${e==null?void 0:e.count} ناموفق`,bJe=e=>`الفاشلة: ${e==null?void 0:e.count}`,yJe=e=>`${e==null?void 0:e.count} con error`,xJe=e=>`${e==null?void 0:e.count} विफल`,wJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?gJe(e):t==="fa"?vJe(e):t==="ar"?bJe(e):t==="es"?yJe(e):t==="hi"?xJe(e):mJe(e)}),kJe=e=>`${e==null?void 0:e.count} files`,SJe=e=>`${e==null?void 0:e.count} 个文件`,CJe=e=>`${e==null?void 0:e.count} فایل`,EJe=e=>`الملفات: ${e==null?void 0:e.count}`,NJe=e=>`${e==null?void 0:e.count} archivos`,zJe=e=>`${e==null?void 0:e.count} फ़ाइलें`,jJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?SJe(e):t==="fa"?CJe(e):t==="ar"?EJe(e):t==="es"?NJe(e):t==="hi"?zJe(e):kJe(e)}),AJe=e=>`${e==null?void 0:e.count}+ files`,TJe=e=>`至少 ${e==null?void 0:e.count} 个文件`,RJe=e=>`بیش از ${e==null?void 0:e.count} فایل`,MJe=e=>`الملفات: ${e==null?void 0:e.count} على الأقل`,OJe=e=>`${e==null?void 0:e.count}+ archivos`,DJe=e=>`${e==null?void 0:e.count}+ फ़ाइलें`,LJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?TJe(e):t==="fa"?RJe(e):t==="ar"?MJe(e):t==="es"?OJe(e):t==="hi"?DJe(e):AJe(e)}),IJe=e=>`${e==null?void 0:e.count} live`,$Je=e=>`${e==null?void 0:e.count} 次进行中`,BJe=e=>`${e==null?void 0:e.count} فعال`,PJe=e=>`النشطة: ${e==null?void 0:e.count}`,FJe=e=>`${e==null?void 0:e.count} en curso`,HJe=e=>`${e==null?void 0:e.count} लाइव`,qJe=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$Je(e):t==="fa"?BJe(e):t==="ar"?PJe(e):t==="es"?FJe(e):t==="hi"?HJe(e):IJe(e)}),UJe=()=>"1 file",GJe=()=>"1 个文件",VJe=()=>"۱ فایل",KJe=()=>"ملف واحد",WJe=()=>"1 archivo",QJe=()=>"1 फ़ाइल",XJe=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GJe():t==="fa"?VJe():t==="ar"?KJe():t==="es"?WJe():t==="hi"?QJe():UJe()}),YJe=()=>"1 run",ZJe=()=>"1 次运行",JJe=()=>"۱ اجرا",eet=()=>"تشغيل واحد",tet=()=>"1 ejecución",net=()=>"1 रन",ret=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZJe():t==="fa"?JJe():t==="ar"?eet():t==="es"?tet():t==="hi"?net():YJe()}),set=e=>`${e==null?void 0:e.count} runs`,iet=e=>`${e==null?void 0:e.count} 次运行`,aet=e=>`${e==null?void 0:e.count} اجرا`,oet=e=>`عمليات التشغيل: ${e==null?void 0:e.count}`,cet=e=>`${e==null?void 0:e.count} ejecuciones`,uet=e=>`${e==null?void 0:e.count} रन`,_et=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?iet(e):t==="fa"?aet(e):t==="ar"?oet(e):t==="es"?cet(e):t==="hi"?uet(e):set(e)}),fet=()=>"Zoom in",det=()=>"放大",het=()=>"بزرگ‌نمایی",pet=()=>"تكبير",met=()=>"Acercar",get=()=>"ज़ूम इन",Cz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?det():t==="fa"?het():t==="ar"?pet():t==="es"?met():t==="hi"?get():fet()}),vet=()=>"Zoom out",bet=()=>"缩小",yet=()=>"کوچک‌نمایی",xet=()=>"تصغير",wet=()=>"Alejar",ket=()=>"ज़ूम आउट",Ez=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bet():t==="fa"?yet():t==="ar"?xet():t==="es"?wet():t==="hi"?ket():vet()}),Cet=()=>"Reset zoom to fit",Eet=()=>"重置为适合窗口",Net=()=>"بازنشانی بزرگ‌نمایی برای جا شدن",zet=()=>"إعادة ضبط التكبير للملاءمة",jet=()=>"Restablecer zoom para ajustar",Aet=()=>"फ़िट करने के लिए ज़ूम रीसेट करें",Nz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Eet():t==="fa"?Net():t==="ar"?zet():t==="es"?jet():t==="hi"?Aet():Cet()}),Tet=()=>"No instances yet.",Ret=()=>"还没有实例。",Met=()=>"هنوز نمونه‌ای وجود ندارد.",Oet=()=>"لا توجد مثيلات بعد.",Det=()=>"Aún no hay instancias.",Let=()=>"अभी तक कोई इंस्टेंस नहीं।",Iet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ret():t==="fa"?Met():t==="ar"?Oet():t==="es"?Det():t==="hi"?Let():Tet()}),$et=()=>"Nothing running right now.",Bet=()=>"当前没有运行中的实例。",Pet=()=>"اکنون چیزی در حال اجرا نیست.",Fet=()=>"لا شيء قيد التشغيل الآن.",Het=()=>"No hay nada en ejecución ahora mismo.",qet=()=>"अभी कुछ नहीं चल रहा।",Uet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bet():t==="fa"?Pet():t==="ar"?Fet():t==="es"?Het():t==="hi"?qet():$et()}),Get=()=>"Select a project to see its history.",Vet=()=>"请选择一个项目以查看其历史记录。",Ket=()=>"برای دیدن تاریخچه یک پروژه انتخاب کنید.",Wet=()=>"اختر مشروعًا لرؤية سجله.",Qet=()=>"Selecciona un proyecto para ver su historial.",Xet=()=>"इसका इतिहास देखने के लिए एक प्रोजेक्ट चुनें।",Yet=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vet():t==="fa"?Ket():t==="ar"?Wet():t==="es"?Qet():t==="hi"?Xet():Get()}),Zet=()=>"Select a project to see its runs.",Jet=()=>"请选择一个项目以查看其运行。",ett=()=>"برای دیدن اجراها یک پروژه انتخاب کنید.",ttt=()=>"اختر مشروعًا لرؤية عمليات تشغيله.",ntt=()=>"Selecciona un proyecto para ver sus ejecuciones.",rtt=()=>"इसके रन देखने के लिए एक प्रोजेक्ट चुनें।",stt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jet():t==="fa"?ett():t==="ar"?ttt():t==="es"?ntt():t==="hi"?rtt():Zet()}),itt=()=>"View history",att=()=>"查看历史记录",ott=()=>"مشاهدهٔ تاریخچه",ctt=()=>"عرض السجل",ltt=()=>"Ver historial",utt=()=>"इतिहास देखें",_tt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?att():t==="fa"?ott():t==="ar"?ctt():t==="es"?ltt():t==="hi"?utt():itt()}),ftt=e=>`View history (${e==null?void 0:e.count})`,dtt=e=>`查看历史记录(${e==null?void 0:e.count})`,htt=e=>`مشاهدهٔ تاریخچه (${e==null?void 0:e.count})`,ptt=e=>`عرض السجل (${e==null?void 0:e.count})`,mtt=e=>`Ver historial (${e==null?void 0:e.count})`,gtt=e=>`इतिहास देखें (${e==null?void 0:e.count})`,vtt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?dtt(e):t==="fa"?htt(e):t==="ar"?ptt(e):t==="es"?mtt(e):t==="hi"?gtt(e):ftt(e)}),btt=()=>"The engine exited without producing a PDF or a log.",ytt=()=>"引擎已退出,但没有生成 PDF 或日志。",xtt=()=>"موتور بدون تولید PDF یا گزارش خارج شد.",wtt=()=>"خرج المحرك دون إنتاج ملف PDF أو سجل.",ktt=()=>"El motor terminó sin generar un PDF ni un log.",Stt=()=>"इंजन बिना PDF या लॉग बनाए बाहर निकल गया।",Ctt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ytt():t==="fa"?xtt():t==="ar"?wtt():t==="es"?ktt():t==="hi"?Stt():btt()}),Ett=()=>"Loading…",Ntt=()=>"正在加载…",ztt=()=>"در حال بارگیری…",jtt=()=>"جارٍ التحميل…",Att=()=>"Cargando…",Ttt=()=>"लोड हो रहा है…",Rtt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ntt():t==="fa"?ztt():t==="ar"?jtt():t==="es"?Att():t==="hi"?Ttt():Ett()}),Mtt=()=>"Add local model",Ott=()=>"添加本地模型",Dtt=()=>"افزودن مدل محلی",Ltt=()=>"إضافة نموذج محلي",Itt=()=>"Añadir modelo local",$tt=()=>"लोकल मॉडल जोड़ें",ML=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ott():t==="fa"?Dtt():t==="ar"?Ltt():t==="es"?Itt():t==="hi"?$tt():Mtt()}),Btt=()=>"Local server address",Ptt=()=>"本地服务器地址",Ftt=()=>"نشانی سرور محلی",Htt=()=>"عنوان الخادم المحلي",qtt=()=>"Dirección del servidor local",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=()=>"Find models",Ktt=()=>"查找模型",Wtt=()=>"یافتن مدل‌ها",Qtt=()=>"العثور على النماذج",Xtt=()=>"Buscar modelos",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=()=>"(OpenAI compatible)",ent=()=>"(兼容 OpenAI)",tnt=()=>"(سازگار با OpenAI)",nnt=()=>"(متوافق مع OpenAI)",rnt=()=>"(compatible con OpenAI)",snt=()=>"(OpenAI संगत)",OL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ent():t==="fa"?tnt():t==="ar"?nnt():t==="es"?rnt():t==="hi"?snt():Jtt()}),int=()=>"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.",ant=()=>"已保存,但 OpenCode 未列出该模型。请重新检查已安装的智能体。如果 OpenCode 配置限制了启用的提供商,请先允许此连接。",ont=()=>"ذخیره شد، اما OpenCode این مدل را فهرست نکرد. عامل‌های نصب‌شده را دوباره بررسی کنید. اگر پیکربندی OpenCode ارائه‌دهندگان فعال را محدود کرده، ابتدا این اتصال را مجاز کنید.",cnt=()=>"تم الحفظ، لكن OpenCode لم يُدرج هذا النموذج. تحقق من الوكلاء المثبّتين مجددًا. إذا كان إعداد OpenCode يقيّد المزوّدين المفعّلين، فاسمح بهذا الاتصال قبل استخدامه.",lnt=()=>"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.",unt=()=>"सेव हो गया, पर OpenCode ने इस मॉडल की सूची नहीं दी। इंस्टॉल किए गए एजेंट फिर से जाँचें। अगर आपका OpenCode कॉन्फ़िग चालू प्रोवाइडर सीमित करता है, तो इस्तेमाल से पहले इस कनेक्शन की अनुमति दें।",_nt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ant():t==="fa"?ont():t==="ar"?cnt():t==="es"?lnt():t==="hi"?unt():int()}),fnt=()=>"Connected",dnt=()=>"已连接",hnt=()=>"متصل شد",pnt=()=>"متصل",mnt=()=>"Conectado",gnt=()=>"कनेक्टेड",vnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dnt():t==="fa"?hnt():t==="ar"?pnt():t==="es"?mnt():t==="hi"?gnt():fnt()}),bnt=()=>"Context window",ynt=()=>"上下文窗口",xnt=()=>"پنجرهٔ زمینه",wnt=()=>"نافذة السياق",knt=()=>"Ventana de contexto",Snt=()=>"कॉन्टेक्स्ट विंडो",Cnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ynt():t==="fa"?xnt():t==="ar"?wnt():t==="es"?knt():t==="hi"?Snt():bnt()}),Ent=()=>"Match the context window loaded in your model app. 32K is a useful starting point for tools; larger contexts use more memory.",Nnt=()=>"请与模型应用中加载的上下文窗口保持一致。使用工具时可从 32K 开始;更大的上下文需要更多内存。",znt=()=>"اندازهٔ زمینه را با تنظیم بارگذاری‌شده در برنامهٔ مدل هماهنگ کنید. ۳۲هزار توکن نقطهٔ شروع مناسبی برای ابزارهاست؛ زمینهٔ بزرگ‌تر حافظهٔ بیشتری مصرف می‌کند.",jnt=()=>"استخدم حجم نافذة السياق نفسه المحدد في تطبيق النموذج. يُعدّ 32 ألف رمز نقطة بداية مناسبة لاستخدام الأدوات؛ وتستهلك النوافذ الأكبر ذاكرة أكثر.",Ant=()=>"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.",Tnt=()=>"अपने मॉडल ऐप में लोड कॉन्टेक्स्ट विंडो से मेल खाएं। टूल के लिए 32K एक अच्छा शुरुआती बिंदु है; बड़े कॉन्टेक्स्ट ज़्यादा मेमोरी इस्तेमाल करते हैं।",Rnt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nnt():t==="fa"?znt():t==="ar"?jnt():t==="es"?Ant():t==="hi"?Tnt():Ent()}),Mnt=()=>"Custom Endpoint",Ont=()=>"自定义端点",Dnt=()=>"نقطهٔ اتصال سفارشی",Lnt=()=>"نقطة نهاية مخصصة",Int=()=>"Endpoint personalizado",$nt=()=>"कस्टम एंडपॉइंट",kS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ont():t==="fa"?Dnt():t==="ar"?Lnt():t==="es"?Int():t==="hi"?$nt():Mnt()}),Bnt=e=>`Disconnect ${e==null?void 0:e.name}`,Pnt=e=>`断开 ${e==null?void 0:e.name}`,Fnt=e=>`قطع اتصال ${e==null?void 0:e.name}`,Hnt=e=>`قطع اتصال ${e==null?void 0:e.name}`,qnt=e=>`Desconectar ${e==null?void 0:e.name}`,Unt=e=>`${e==null?void 0:e.name} डिस्कनेक्ट करें`,Gnt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Pnt(e):t==="fa"?Fnt(e):t==="ar"?Hnt(e):t==="es"?qnt(e):t==="hi"?Unt(e):Bnt(e)}),Vnt=()=>"Get OpenCode",Knt=()=>"获取 OpenCode",Wnt=()=>"دریافت OpenCode",Qnt=()=>"الحصول على OpenCode",Xnt=()=>"Obtener OpenCode",Ynt=()=>"OpenCode लें",Znt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Knt():t==="fa"?Wnt():t==="ar"?Qnt():t==="es"?Xnt():t==="hi"?Ynt():Vnt()}),Jnt=()=>"Install OpenCode to run tools with your local model, then re-check installed agents. No cloud account is required.",ert=()=>"安装 OpenCode 以使用本地模型执行工具,然后重新检查已安装的智能体。无需云端账户。",trt=()=>"برای اجرای ابزارها با مدل محلی، OpenCode را نصب کنید و عامل‌های نصب‌شده را دوباره بررسی کنید. حساب ابری لازم نیست.",nrt=()=>"ثبّت OpenCode لتشغيل الأدوات مع نموذجك المحلي، ثم أعد فحص الوكلاء المثبّتين. لا يلزم حساب سحابي.",rrt=()=>"Instala OpenCode para usar herramientas con tu modelo local y vuelve a comprobar los agentes instalados. No necesitas una cuenta en la nube.",srt=()=>"अपने लोकल मॉडल से टूल चलाने के लिए OpenCode इंस्टॉल करें, फिर इंस्टॉल किए गए एजेंट फिर से जाँचें। किसी क्लाउड खाते की ज़रूरत नहीं है।",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():Jnt()}),art=()=>"API key (optional)",ort=()=>"API 密钥(可选)",crt=()=>"کلید API (اختیاری)",lrt=()=>"مفتاح API (اختياري)",urt=()=>"Clave de API (opcional)",_rt=()=>"API की (वैकल्पिक)",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=()=>"Save model",hrt=()=>"保存模型",prt=()=>"ذخیرهٔ مدل",mrt=()=>"حفظ النموذج",grt=()=>"Guardar modelo",vrt=()=>"मॉडल सेव करें",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=()=>"Model server",xrt=()=>"模型服务器",wrt=()=>"سرور مدل",krt=()=>"خادم النموذج",Srt=()=>"Servidor del modelo",Crt=()=>"मॉडल सर्वर",zz=((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()}),Ert=()=>"Local models",Nrt=()=>"本地模型",zrt=()=>"مدل‌های محلی",jrt=()=>"النماذج المحلية",Art=()=>"Modelos locales",Trt=()=>"लोकल मॉडल",jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nrt():t==="fa"?zrt():t==="ar"?jrt():t==="es"?Art():t==="hi"?Trt():Ert()}),Rrt=()=>"API token (optional)",Mrt=()=>"API 令牌(可选)",Ort=()=>"توکن API (اختیاری)",Drt=()=>"رمز API (اختياري)",Lrt=()=>"Token de API (opcional)",Irt=()=>"API टोकन (वैकल्पिक)",$rt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mrt():t==="fa"?Ort():t==="ar"?Drt():t==="es"?Lrt():t==="hi"?Irt():Rrt()}),Brt=()=>"Copy",Prt=()=>"复制",Frt=()=>"کپی",Hrt=()=>"نسخ",qrt=()=>"Copiar",Urt=()=>"कॉपी करें",SS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Prt():t==="fa"?Frt():t==="ar"?Hrt():t==="es"?qrt():t==="hi"?Urt():Brt()}),Grt=()=>"Copy code",Vrt=()=>"复制代码",Krt=()=>"کپی کد",Wrt=()=>"نسخ الشيفرة",Qrt=()=>"Copiar código",Xrt=()=>"कोड कॉपी करें",Yrt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vrt():t==="fa"?Krt():t==="ar"?Wrt():t==="es"?Qrt():t==="hi"?Xrt():Grt()}),Zrt=()=>"Download",Jrt=()=>"下载",est=()=>"بارگیری",tst=()=>"تنزيل",nst=()=>"Descargar",rst=()=>"डाउनलोड करें",R3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jrt():t==="fa"?est():t==="ar"?tst():t==="es"?nst():t==="hi"?rst():Zrt()}),sst=()=>"This browser can’t preview this media format.",ist=()=>"此浏览器无法预览该媒体格式。",ast=()=>"این مرورگر نمی‌تواند این قالب رسانه را پیش‌نمایش کند.",ost=()=>"لا يستطيع هذا المتصفح معاينة صيغة الوسائط هذه.",cst=()=>"Este navegador no puede mostrar este formato multimedia.",lst=()=>"यह ब्राउज़र इस मीडिया फ़ॉर्मैट का प्रीव्यू नहीं दिखा सकता।",ust=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ist():t==="fa"?ast():t==="ar"?ost():t==="es"?cst():t==="hi"?lst():sst()}),_st=()=>"Choose the model for this chat",fst=()=>"选择此聊天的模型",dst=()=>"انتخاب مدل این گفت‌وگو",hst=()=>"اختيار نموذج هذه المحادثة",pst=()=>"Elige el modelo de este chat",mst=()=>"इस चैट के लिए मॉडल चुनें",gst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fst():t==="fa"?dst():t==="ar"?hst():t==="es"?pst():t==="hi"?mst():_st()}),vst=()=>"Add Local Model",bst=()=>"添加本地模型",yst=()=>"افزودن مدل محلی",xst=()=>"إضافة نموذج محلي",wst=()=>"Añadir modelo local",kst=()=>"लोकल मॉडल जोड़ें",Sst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bst():t==="fa"?yst():t==="ar"?xst():t==="es"?wst():t==="hi"?kst():vst()}),Cst=()=>"Autonomy",Est=()=>"自主程度",Nst=()=>"خودمختاری",zst=()=>"الاستقلالية",jst=()=>"Autonomía",Ast=()=>"स्वायत्तता",Az=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Est():t==="fa"?Nst():t==="ar"?zst():t==="es"?jst():t==="hi"?Ast():Cst()}),Tst=()=>"Agentic",Rst=()=>"自主",Mst=()=>"خودکار",Ost=()=>"وكيل مستقل",Dst=()=>"Agéntico",Lst=()=>"एजेंटिक",Ist=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rst():t==="fa"?Mst():t==="ar"?Ost():t==="es"?Dst():t==="hi"?Lst():Tst()}),$st=()=>"Runs the research on its own and checks in when needed.",Bst=()=>"独立推进研究,必要时再与你确认。",Pst=()=>"پژوهش را خودش پیش می‌برد و در صورت نیاز با شما هماهنگ می‌کند.",Fst=()=>"يدير البحث بنفسه ويراجعك عند الحاجة.",Hst=()=>"Dirige la investigación por su cuenta y consulta cuando hace falta.",qst=()=>"शोध खुद चलाता है और ज़रूरत पड़ने पर पूछता है।",Ust=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bst():t==="fa"?Pst():t==="ar"?Fst():t==="es"?Hst():t==="hi"?qst():$st()}),Gst=()=>"Copilot",Vst=()=>"副驾驶",Kst=()=>"کمک‌خلبان",Wst=()=>"مساعد",Qst=()=>"Copiloto",Xst=()=>"कोपायलट",Yst=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vst():t==="fa"?Kst():t==="ar"?Wst():t==="es"?Qst():t==="hi"?Xst():Gst()}),Zst=()=>"Explains its reasoning and asks before acting.",Jst=()=>"解释思路,行动前先征得你的同意。",eit=()=>"استدلالش را توضیح می‌دهد و پیش از اقدام اجازه می‌گیرد.",tit=()=>"يشرح منطقه ويطلب موافقتك قبل التنفيذ.",nit=()=>"Explica su razonamiento y pide aprobación antes de actuar.",rit=()=>"अपना तर्क समझाता है और कार्य करने से पहले अनुमति लेता है।",sit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jst():t==="fa"?eit():t==="ar"?tit():t==="es"?nit():t==="hi"?rit():Zst()}),iit=()=>" · CLI configuration",ait=()=>" · CLI 配置",oit=()=>" · پیکربندی CLI",cit=()=>" · إعداد واجهة سطر الأوامر",lit=()=>" · Configuración de la CLI",uit=()=>" · CLI कॉन्फ़िगरेशन",_it=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ait():t==="fa"?oit():t==="ar"?cit():t==="es"?lit():t==="hi"?uit():iit()}),fit=()=>"· Default",dit=()=>"· 默认",hit=()=>"· پیش‌فرض",pit=()=>"· الافتراضي",mit=()=>"· Predeterminado",git=()=>"· डिफ़ॉल्ट",DL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dit():t==="fa"?hit():t==="ar"?pit():t==="es"?mit():t==="hi"?git():fit()}),vit=()=>"Default model",bit=()=>"默认模型",yit=()=>"مدل پیش‌فرض",xit=()=>"النموذج الافتراضي",wit=()=>"Modelo predeterminado",kit=()=>"डिफ़ॉल्ट मॉडल",M3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bit():t==="fa"?yit():t==="ar"?xit():t==="es"?wit():t==="hi"?kit():vit()}),Sit=()=>"Detecting harnesses…",Cit=()=>"正在检测智能体工具…",Eit=()=>"در حال شناسایی ابزارهای عامل…",Nit=()=>"جارٍ اكتشاف أدوات البرمجة…",zit=()=>"Detectando agentes…",jit=()=>"हार्नेस पहचाने जा रहे हैं…",Ait=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cit():t==="fa"?Eit():t==="ar"?Nit():t==="es"?zit():t==="hi"?jit():Sit()}),Tit=()=>"Effort",Rit=()=>"推理强度",Mit=()=>"میزان استدلال",Oit=()=>"الجهد",Dit=()=>"Esfuerzo",Lit=()=>"प्रयास स्तर",Iit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rit():t==="fa"?Mit():t==="ar"?Oit():t==="es"?Dit():t==="hi"?Lit():Tit()}),$it=()=>"Fast speed ·",Bit=()=>"快速 ·",Pit=()=>"سرعت بالا ·",Fit=()=>"سرعة عالية ·",Hit=()=>"Modo rápido ·",qit=()=>"तेज़ गति ·",Uit=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bit():t==="fa"?Pit():t==="ar"?Fit():t==="es"?Hit():t==="hi"?qit():$it()}),Git=()=>"Mode",Vit=()=>"模式",Kit=()=>"حالت",Wit=()=>"الوضع",Qit=()=>"Modo",Xit=()=>"मोड",Tz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vit():t==="fa"?Kit():t==="ar"?Wit():t==="es"?Qit():t==="hi"?Xit():Git()}),Yit=()=>"Model",Zit=()=>"模型",Jit=()=>"مدل",eat=()=>"النموذج",tat=()=>"Modelo",nat=()=>"मॉडल",b0=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zit():t==="fa"?Jit():t==="ar"?eat():t==="es"?tat():t==="hi"?nat():Yit()}),rat=e=>`${e==null?void 0:e.count} more — search to find`,sat=e=>`还有 ${e==null?void 0:e.count} 个——搜索即可查找`,iat=e=>`${e==null?void 0:e.count} مورد دیگر — برای یافتن جست‌وجو کنید`,aat=e=>`نماذج إضافية: ${e==null?void 0:e.count} — ابحث للعثور عليها`,oat=e=>`${e==null?void 0:e.count} más — busca para encontrarlos`,cat=e=>`${e==null?void 0:e.count} और — खोजने के लिए टाइप करें`,lat=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sat(e):t==="fa"?iat(e):t==="ar"?aat(e):t==="es"?oat(e):t==="hi"?cat(e):rat(e)}),uat=()=>"Not available",_at=()=>"不可用",fat=()=>"در دسترس نیست",dat=()=>"غير متاح",hat=()=>"No disponible",pat=()=>"उपलब्ध नहीं",mat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_at():t==="fa"?fat():t==="ar"?dat():t==="es"?hat():t==="hi"?pat():uat()}),gat=()=>"Search models…",vat=()=>"搜索模型…",bat=()=>"جست‌وجوی مدل‌ها…",yat=()=>"البحث في النماذج…",xat=()=>"Buscar modelos…",wat=()=>"मॉडल खोजें…",kat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vat():t==="fa"?bat():t==="ar"?yat():t==="es"?xat():t==="hi"?wat():gat()}),Sat=()=>"Search or enter model ID…",Cat=()=>"搜索或输入模型 ID…",Eat=()=>"جست‌وجو یا ورود شناسه مدل…",Nat=()=>"ابحث أو أدخل معرّف النموذج…",zat=()=>"Buscar o introducir ID…",jat=()=>"खोजें या मॉडल ID डालें…",Aat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cat():t==="fa"?Eat():t==="ar"?Nat():t==="es"?zat():t==="hi"?jat():Sat()}),Tat=()=>"Sessions keep their harness. Start a new chat to switch.",Rat=()=>"会话将沿用当前的智能体工具。新建聊天即可切换。",Mat=()=>"نشست‌ها ابزار عامل خود را نگه می‌دارند. برای تغییر، گفتگوی جدیدی بسازید",Oat=()=>"تحتفظ كل جلسة بأداة البرمجة الخاصة بها. ابدأ محادثة جديدة للتبديل.",Dat=()=>"Cada sesión mantiene su agente. Inicia un chat nuevo para cambiarlo.",Lat=()=>"सेशन अपना हार्नेस बनाए रखते हैं। बदलने के लिए नई चैट शुरू करें।",Iat=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rat():t==="fa"?Mat():t==="ar"?Oat():t==="es"?Dat():t==="hi"?Lat():Tat()}),$at=()=>"Speed",Bat=()=>"速度",Pat=()=>"سرعت",Fat=()=>"السرعة",Hat=()=>"Velocidad",qat=()=>"गति",Rz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bat():t==="fa"?Pat():t==="ar"?Fat():t==="es"?Hat():t==="hi"?qat():$at()}),Uat=()=>"Unavailable",Gat=()=>"不可用",Vat=()=>"در دسترس نیست",Kat=()=>"غير متاح",Wat=()=>"No disponible",Qat=()=>"उपलब्ध नहीं",fo=((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()}),Xat=()=>"Unverified",Yat=()=>"未经验证",Zat=()=>"تأییدنشده",Jat=()=>"غير مُتحقَّق منه",eot=()=>"Sin verificar",tot=()=>"सत्यापित नहीं",Mz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yat():t==="fa"?Zat():t==="ar"?Jat():t==="es"?eot():t==="hi"?tot():Xat()}),not=e=>`Use “${e==null?void 0:e.id}” as the model ID`,rot=e=>`使用“${e==null?void 0:e.id}”作为模型 ID`,sot=e=>`از «${e==null?void 0:e.id}» به‌عنوان شناسهٔ مدل استفاده کنید`,iot=e=>`استخدام «${e==null?void 0:e.id}» معرّفًا للنموذج`,aot=e=>`Usar “${e==null?void 0:e.id}” como ID del modelo`,oot=e=>`मॉडल ID के रूप में “${e==null?void 0:e.id}” इस्तेमाल करें`,cot=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rot(e):t==="fa"?sot(e):t==="ar"?iot(e):t==="es"?aot(e):t==="hi"?oot(e):not(e)}),lot=()=>"Variant",uot=()=>"变体",_ot=()=>"گونه",fot=()=>"الصنف",dot=()=>"Variante",hot=()=>"वेरिएंट",pot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uot():t==="fa"?_ot():t==="ar"?fot():t==="es"?dot():t==="hi"?hot():lot()}),mot=()=>"Start a new chat",got=()=>"开始新聊天",vot=()=>"شروع گفت‌وگوی جدید",bot=()=>"بدء محادثة جديدة",yot=()=>"Inicia un chat nuevo",xot=()=>"नई चैट शुरू करें",wot=((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()}),kot=()=>"Advanced",Sot=()=>"高级",Cot=()=>"پیشرفته",Eot=()=>"متقدم",Not=()=>"Avanzado",zot=()=>"उन्नत",LL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sot():t==="fa"?Cot():t==="ar"?Eot():t==="es"?Not():t==="hi"?zot():kot()}),jot=()=>"Advanced · Connect GitHub",Aot=()=>"高级 · 连接 GitHub",Tot=()=>"پیشرفته · اتصال GitHub",Rot=()=>"متقدم · ربط GitHub",Mot=()=>"Avanzado · Conectar GitHub",Oot=()=>"उन्नत · GitHub कनेक्ट करें",Dot=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aot():t==="fa"?Tot():t==="ar"?Rot():t==="es"?Mot():t==="hi"?Oot():jot()}),Lot=()=>"Advanced · GitHub sync on",Iot=()=>"高级 · GitHub 同步已开启",$ot=()=>"پیشرفته · همگام‌سازی GitHub روشن است",Bot=()=>"متقدم · مزامنة GitHub مفعّلة",Pot=()=>"Avanzado · Sincronización con GitHub activada",Fot=()=>"उन्नत · GitHub सिंक चालू",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=()=>"Choose a different destination. A paper project needs a new or empty folder of its own.",Uot=()=>"请选择其他位置。论文项目需要拥有独立的新文件夹或空文件夹。",Got=()=>"مقصد دیگری انتخاب کنید. پروژهٔ مقاله باید پوشهٔ جدید یا خالیِ جداگانه‌ای داشته باشد.",Vot=()=>"اختر وجهة مختلفة. يحتاج مشروع الورقة إلى مجلد جديد أو فارغ خاص به.",Kot=()=>"Elige otro destino. Un proyecto de paper necesita su propia carpeta nueva o vacía.",Wot=()=>"अलग गंतव्य चुनें। पेपर प्रोजेक्ट को अपना एक नया या खाली फ़ोल्डर चाहिए।",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=>`Change project folder; current folder: ${e==null?void 0:e.path}`,Yot=e=>`更改项目文件夹;当前文件夹:${e==null?void 0:e.path}`,Zot=e=>`تغییر پوشهٔ پروژه؛ پوشهٔ کنونی: ${e==null?void 0:e.path}`,Jot=e=>`تغيير مجلد المشروع؛ المجلد الحالي: ${e==null?void 0:e.path}`,ect=e=>`Cambiar la carpeta del proyecto; carpeta actual: ${e==null?void 0:e.path}`,tct=e=>`प्रोजेक्ट फ़ोल्डर बदलें; मौजूदा फ़ोल्डर: ${e==null?void 0:e.path}`,nct=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yot(e):t==="fa"?Zot(e):t==="ar"?Jot(e):t==="es"?ect(e):t==="hi"?tct(e):Xot(e)}),rct=()=>"Choose an existing project folder",sct=()=>"选择现有项目文件夹",ict=()=>"انتخاب پوشهٔ موجود پروژه",act=()=>"اختر مجلد مشروع موجود",oct=()=>"Elige una carpeta de proyecto existente",cct=()=>"एक मौजूदा प्रोजेक्ट फ़ोल्डर चुनें",Oz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sct():t==="fa"?ict():t==="ar"?act():t==="es"?oct():t==="hi"?cct():rct()}),lct=()=>"Choosing…",uct=()=>"正在选择…",_ct=()=>"در حال انتخاب…",fct=()=>"جارٍ الاختيار…",dct=()=>"Eligiendo…",hct=()=>"चुना जा रहा है…",pct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uct():t==="fa"?_ct():t==="ar"?fct():t==="es"?dct():t==="hi"?hct():lct()}),mct=()=>"Clone destination",gct=()=>"克隆位置",vct=()=>"مقصد کلون",bct=()=>"وجهة الاستنساخ",yct=()=>"Destino del clon",xct=()=>"क्लोन गंतव्य",wct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gct():t==="fa"?vct():t==="ar"?bct():t==="es"?yct():t==="hi"?xct():mct()}),kct=()=>"Clone paper project",Sct=()=>"克隆论文项目",Cct=()=>"کلون پروژهٔ مقاله",Ect=()=>"استنساخ مشروع الورقة",Nct=()=>"Clonar proyecto del paper",zct=()=>"पेपर प्रोजेक्ट क्लोन करें",jct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sct():t==="fa"?Cct():t==="ar"?Ect():t==="es"?Nct():t==="hi"?zct():kct()}),Act=()=>"Create project",Tct=()=>"创建项目",Rct=()=>"ایجاد پروژه",Mct=()=>"إنشاء المشروع",Oct=()=>"Crear proyecto",Dct=()=>"प्रोजेक्ट बनाएं",Dz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tct():t==="fa"?Rct():t==="ar"?Mct():t==="es"?Oct():t==="hi"?Dct():Act()}),Lct=()=>"Creating…",Ict=()=>"正在创建…",$ct=()=>"در حال ایجاد…",Bct=()=>"جارٍ الإنشاء…",Pct=()=>"Creando…",Fct=()=>"बनाया जा रहा है…",Hct=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ict():t==="fa"?$ct():t==="ar"?Bct():t==="es"?Pct():t==="hi"?Fct():Lct()}),qct=()=>"Choose a different destination. This path is a file, not a folder.",Uct=()=>"请选择其他位置。此路径是文件,不是文件夹。",Gct=()=>"مقصد دیگری انتخاب کنید. این مسیر فایل است، نه پوشه.",Vct=()=>"اختر وجهة مختلفة. هذا المسار ملف وليس مجلدًا.",Kct=()=>"Elige otro destino. Esta ruta es un archivo, no una carpeta.",Wct=()=>"अलग गंतव्य चुनें। यह पथ एक फ़ाइल है, फ़ोल्डर नहीं।",fw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uct():t==="fa"?Gct():t==="ar"?Vct():t==="es"?Kct():t==="hi"?Wct():qct()}),Qct=()=>"A folder already exists here. Choose a different name or location, or use Existing folder.",Xct=()=>"此处已有文件夹。请选择其他名称或位置,或使用“现有文件夹”。",Yct=()=>"پوشه‌ای در این محل وجود دارد. نام یا محل دیگری انتخاب کنید، یا از «پوشهٔ موجود» استفاده کنید.",Zct=()=>"يوجد مجلد هنا بالفعل. اختر اسمًا أو موقعًا مختلفًا، أو استخدم «مجلد موجود».",Jct=()=>"Ya existe una carpeta aquí. Elige otro nombre u otra ubicación, o usa Carpeta existente.",elt=()=>"यहाँ पहले से एक फ़ोल्डर मौजूद है। अलग नाम या स्थान चुनें, या मौजूदा फ़ोल्डर का इस्तेमाल करें।",Lz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xct():t==="fa"?Yct():t==="ar"?Zct():t==="es"?Jct():t==="hi"?elt():Qct()}),tlt=()=>"Blank project",nlt=()=>"空白项目",rlt=()=>"پروژهٔ خالی",slt=()=>"مشروع فارغ",ilt=()=>"Proyecto en blanco",alt=()=>"खाली प्रोजेक्ट",olt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nlt():t==="fa"?rlt():t==="ar"?slt():t==="es"?ilt():t==="hi"?alt():tlt()}),clt=()=>"Cancel",llt=()=>"取消",ult=()=>"لغو",_lt=()=>"إلغاء",flt=()=>"Cancelar",dlt=()=>"रद्द करें",hlt=((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()}),plt=()=>"Change",mlt=()=>"更改",glt=()=>"تغییر",vlt=()=>"تغيير",blt=()=>"Cambiar",ylt=()=>"बदलें",xlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mlt():t==="fa"?glt():t==="ar"?vlt():t==="es"?blt():t==="hi"?ylt():plt()}),wlt=()=>"Change selected paper",klt=()=>"更改所选论文",Slt=()=>"تغییر مقالهٔ انتخاب‌شده",Clt=()=>"تغيير الورقة المحددة",Elt=()=>"Cambiar el paper seleccionado",Nlt=()=>"चयनित पेपर बदलें",zlt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?klt():t==="fa"?Slt():t==="ar"?Clt():t==="es"?Elt():t==="hi"?Nlt():wlt()}),jlt=()=>"Check out a Git branch before using this folder.",Alt=()=>"使用此文件夹前,请先检出一个 Git 分支。",Tlt=()=>"پیش از استفاده از این پوشه، یک شاخهٔ Git را checkout کنید.",Rlt=()=>"انتقل إلى فرع Git قبل استخدام هذا المجلد.",Mlt=()=>"Haz checkout de una rama de Git antes de usar esta carpeta.",Olt=()=>"इस फ़ोल्डर का उपयोग करने से पहले एक Git ब्रांच चेक आउट करें।",Dlt=((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()}),Llt=()=>"Checking project location.",Ilt=()=>"正在检查项目位置。",$lt=()=>"در حال بررسی محل پروژه.",Blt=()=>"جارٍ التحقق من موقع المشروع.",Plt=()=>"Comprobando la ubicación del proyecto.",Flt=()=>"प्रोजेक्ट स्थान जाँचा जा रहा है।",Iz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ilt():t==="fa"?$lt():t==="ar"?Blt():t==="es"?Plt():t==="hi"?Flt():Llt()}),Hlt=()=>"Existing folder",qlt=()=>"现有文件夹",Ult=()=>"پوشهٔ موجود",Glt=()=>"مجلد موجود",Vlt=()=>"Carpeta existente",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=()=>"Experiment branches will be pushed to the remote GitHub repository.",Xlt=()=>"实验分支将推送到远程 GitHub 仓库。",Ylt=()=>"شاخه‌های آزمایش به مخزن دوردست GitHub فرستاده می‌شوند.",Zlt=()=>"ستُرفع فروع التجارب إلى مستودع GitHub البعيد.",Jlt=()=>"Las ramas de los experimentos se subirán al repositorio remoto de GitHub.",eut=()=>"प्रयोग ब्रांच रिमोट GitHub रिपॉज़िटरी पर पुश की जाएंगी।",tut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xlt():t==="fa"?Ylt():t==="ar"?Zlt():t==="es"?Jlt():t==="hi"?eut():Qlt()}),nut=()=>"From a paper",rut=()=>"从论文创建",sut=()=>"از یک مقاله",iut=()=>"من ورقة بحثية",aut=()=>"A partir de un paper",out=()=>"एक पेपर से",cut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rut():t==="fa"?sut():t==="ar"?iut():t==="es"?aut():t==="hi"?out():nut()}),lut=()=>"Git is required for experiments but is not installed. Install Git, then restart OpenResearch.",uut=()=>"实验需要 Git,但尚未安装。请安装 Git,然后重新启动 OpenResearch。",_ut=()=>"Git برای آزمایش‌ها لازم است اما نصب نیست. Git را نصب و سپس OpenResearch را دوباره راه‌اندازی کنید.",fut=()=>"‏Git مطلوب للتجارب لكنه غير مثبّت. ثبّت Git ثم أعد تشغيل OpenResearch.",dut=()=>"Git es necesario para los experimentos, pero no está instalado. Instala Git y reinicia OpenResearch.",hut=()=>"प्रयोगों के लिए Git ज़रूरी है पर इंस्टॉल नहीं है। Git इंस्टॉल करें, फिर OpenResearch फिर से शुरू करें।",put=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uut():t==="fa"?_ut():t==="ar"?fut():t==="es"?dut():t==="hi"?hut():lut()}),mut=()=>"my-research",gut=()=>"my-research",vut=()=>"my-research",but=()=>"my-research",yut=()=>"mi-investigacion",xut=()=>"मेरा-शोध",$z=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gut():t==="fa"?vut():t==="ar"?but():t==="es"?yut():t==="hi"?xut():mut()}),wut=()=>"No papers found. Try an arXiv ID, URL, or a different title.",kut=()=>"未找到论文。请尝试 arXiv ID、网址或其他标题。",Sut=()=>"مقاله‌ای پیدا نشد. یک شناسهٔ arXiv، نشانی یا عنوان دیگری را امتحان کنید.",Cut=()=>"لم يُعثر على أوراق. جرّب معرّف arXiv أو رابطًا أو عنوانًا مختلفًا.",Eut=()=>"No se encontraron papers. Prueba con un ID de arXiv, una URL u otro título.",Nut=()=>"कोई पेपर नहीं मिला। एक arXiv ID, URL, या अलग शीर्षक आज़माएं।",zut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kut():t==="fa"?Sut():t==="ar"?Cut():t==="es"?Eut():t==="hi"?Nut():wut()}),jut=()=>"No public repository found on alphaXiv",Aut=()=>"在 alphaXiv 上未找到公开仓库",Tut=()=>"مخزن عمومی‌ای در alphaXiv پیدا نشد",Rut=()=>"لم يُعثر على مستودع عام على alphaXiv",Mut=()=>"No se encontró ningún repositorio público en alphaXiv",Out=()=>"alphaXiv पर कोई सार्वजनिक रिपॉज़िटरी नहीं मिली",Dut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Aut():t==="fa"?Tut():t==="ar"?Rut():t==="es"?Mut():t==="hi"?Out():jut()}),Lut=()=>"OpenResearch will start a blank project with this paper's PDF.",Iut=()=>"OpenResearch 将使用此论文的 PDF 创建空白项目。",$ut=()=>"OpenResearch یک پروژهٔ خالی با PDF این مقاله آغاز می‌کند.",But=()=>"سيبدأ OpenResearch مشروعًا فارغًا مع ملف PDF لهذه الورقة.",Put=()=>"OpenResearch creará un proyecto en blanco con el PDF de este paper.",Fut=()=>"OpenResearch इस पेपर की PDF के साथ एक खाली प्रोजेक्ट शुरू करेगा।",Hut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iut():t==="fa"?$ut():t==="ar"?But():t==="es"?Put():t==="hi"?Fut():Lut()}),qut=()=>"Paper",Uut=()=>"论文",Gut=()=>"مقاله",Vut=()=>"ورقة بحثية",Kut=()=>"Paper",Wut=()=>"पेपर",Qut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uut():t==="fa"?Gut():t==="ar"?Vut():t==="es"?Kut():t==="hi"?Wut():qut()}),Xut=()=>"Project location",Yut=()=>"项目位置",Zut=()=>"محل پروژه",Jut=()=>"موقع المشروع",e_t=()=>"Ubicación del proyecto",t_t=()=>"प्रोजेक्ट स्थान",dw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yut():t==="fa"?Zut():t==="ar"?Jut():t==="es"?e_t():t==="hi"?t_t():Xut()}),n_t=()=>"Project name",r_t=()=>"项目名称",s_t=()=>"نام پروژه",i_t=()=>"اسم المشروع",a_t=()=>"Nombre del proyecto",o_t=()=>"प्रोजेक्ट नाम",Bz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?r_t():t==="fa"?s_t():t==="ar"?i_t():t==="es"?a_t():t==="hi"?o_t():n_t()}),c_t=()=>"Search for a paper by arXiv ID, URL, or title",l_t=()=>"按 arXiv ID、网址或标题搜索论文",u_t=()=>"جست‌وجوی مقاله با شناسهٔ arXiv، نشانی یا عنوان",__t=()=>"ابحث عن ورقة بمعرّف arXiv أو رابط أو عنوان",f_t=()=>"Busca un paper por ID de arXiv, URL o título",d_t=()=>"arXiv ID, URL, या शीर्षक से पेपर खोजें",h_t=((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()}),p_t=()=>"Sync experiments to GitHub",m_t=()=>"将实验同步到 GitHub",g_t=()=>"همگام‌سازی آزمایش‌ها با GitHub",v_t=()=>"مزامنة التجارب مع GitHub",b_t=()=>"Sincronizar experimentos con GitHub",y_t=()=>"प्रयोग GitHub पर सिंक करें",x_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m_t():t==="fa"?g_t():t==="ar"?v_t():t==="es"?b_t():t==="hi"?y_t():p_t()}),w_t=()=>"That folder no longer exists. Choose it again.",k_t=()=>"该文件夹已不存在。请重新选择。",S_t=()=>"آن پوشه دیگر وجود ندارد. دوباره انتخابش کنید.",C_t=()=>"لم يعد ذلك المجلد موجودًا. اختره مجددًا.",E_t=()=>"Esa carpeta ya no existe. Vuelve a elegirla.",N_t=()=>"वह फ़ोल्डर अब मौजूद नहीं है। इसे फिर से चुनें।",z_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k_t():t==="fa"?S_t():t==="ar"?C_t():t==="es"?E_t():t==="hi"?N_t():w_t()}),j_t=()=>"The selected folder contains an invalid Git repository.",A_t=()=>"所选文件夹包含无效的 Git 仓库。",T_t=()=>"پوشهٔ انتخاب‌شده یک مخزن Git نامعتبر دارد.",R_t=()=>"يحتوي المجلد المحدد على مستودع Git غير صالح.",M_t=()=>"La carpeta seleccionada contiene un repositorio de Git no válido.",O_t=()=>"चयनित फ़ोल्डर में एक अमान्य Git रिपॉज़िटरी है।",D_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A_t():t==="fa"?T_t():t==="ar"?R_t():t==="es"?M_t():t==="hi"?O_t():j_t()}),L_t=()=>"The selected path is not a folder.",I_t=()=>"所选路径不是文件夹。",$_t=()=>"مسیر انتخاب‌شده پوشه نیست.",B_t=()=>"المسار المحدد ليس مجلدًا.",P_t=()=>"La ruta seleccionada no es una carpeta.",F_t=()=>"चयनित पथ एक फ़ोल्डर नहीं है।",H_t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I_t():t==="fa"?$_t():t==="ar"?B_t():t==="es"?P_t():t==="hi"?F_t():L_t()}),q_t=e=>`Checking ${e==null?void 0:e.repository}.`,U_t=e=>`正在检查 ${e==null?void 0:e.repository}。`,G_t=e=>`در حال بررسی ${e==null?void 0:e.repository}.`,V_t=e=>`جارٍ التحقق من ${e==null?void 0:e.repository}.`,K_t=e=>`Comprobando ${e==null?void 0:e.repository}.`,W_t=e=>`${e==null?void 0:e.repository} जाँची जा रही है।`,Q_t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?U_t(e):t==="fa"?G_t(e):t==="ar"?V_t(e):t==="es"?K_t(e):t==="hi"?W_t(e):q_t(e)}),X_t=e=>`Creates ${e==null?void 0:e.repository}.`,Y_t=e=>`将创建 ${e==null?void 0:e.repository}。`,Z_t=e=>`${e==null?void 0:e.repository} را ایجاد می‌کند.`,J_t=e=>`ينشئ ${e==null?void 0:e.repository}.`,eft=e=>`Crea ${e==null?void 0:e.repository}.`,tft=e=>`${e==null?void 0:e.repository} बनाता है।`,nft=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Y_t(e):t==="fa"?Z_t(e):t==="ar"?J_t(e):t==="es"?eft(e):t==="hi"?tft(e):X_t(e)}),rft=e=>`Pushes to ${e==null?void 0:e.repository}.`,sft=e=>`将推送到 ${e==null?void 0:e.repository}。`,ift=e=>`به ${e==null?void 0:e.repository} پوش می‌کند.`,aft=e=>`يرفع التغييرات إلى ${e==null?void 0:e.repository}.`,oft=e=>`Sube los cambios a ${e==null?void 0:e.repository}.`,cft=e=>`${e==null?void 0:e.repository} पर पुश करता है।`,lft=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sft(e):t==="fa"?ift(e):t==="ar"?aft(e):t==="es"?oft(e):t==="hi"?cft(e):rft(e)}),uft=()=>"Project location is required.",_ft=()=>"必须填写项目位置。",fft=()=>"محل پروژه الزامی است.",dft=()=>"موقع المشروع مطلوب.",hft=()=>"La ubicación del proyecto es obligatoria.",pft=()=>"प्रोजेक्ट स्थान ज़रूरी है।",Pz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_ft():t==="fa"?fft():t==="ar"?dft():t==="es"?hft():t==="hi"?pft():uft()}),mft=()=>"Choose a different destination. The paper repository needs a new or empty folder.",gft=()=>"请选择其他位置。论文仓库需要一个新的或空的文件夹。",vft=()=>"مقصد دیگری انتخاب کنید. مخزن مقاله به پوشه‌ای جدید یا خالی نیاز دارد.",bft=()=>"اختر وجهة مختلفة. يحتاج مستودع الورقة إلى مجلد جديد أو فارغ.",yft=()=>"Elige otro destino. El repositorio del paper necesita una carpeta nueva o vacía.",xft=()=>"अलग गंतव्य चुनें। पेपर रिपॉज़िटरी को एक नए या खाली फ़ोल्डर की ज़रूरत है।",Fz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gft():t==="fa"?vft():t==="ar"?bft():t==="es"?yft():t==="hi"?xft():mft()}),wft=()=>"A linked public code repository is cloned without credentials.",kft=()=>"关联的公开代码仓库无需凭据即可克隆。",Sft=()=>"مخزن عمومی کدِ پیوندشده بدون نیاز به اعتبارنامه کلون می‌شود.",Cft=()=>"يُستنسخ مستودع شيفرة عام مرتبط دون بيانات اعتماد.",Eft=()=>"El repositorio de código público vinculado se clona sin credenciales.",Nft=()=>"एक लिंक की गई सार्वजनिक कोड रिपॉज़िटरी बिना क्रेडेंशियल के क्लोन की जाती है।",zft=((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()}),jft=e=>`Run ${e==null?void 0:e.command} before creating the project.`,Aft=e=>`创建项目前请运行 ${e==null?void 0:e.command}。`,Tft=e=>`پیش از ساخت پروژه، ${e==null?void 0:e.command} را اجرا کنید.`,Rft=e=>`نفّذ ${e==null?void 0:e.command} قبل إنشاء المشروع.`,Mft=e=>`Ejecuta ${e==null?void 0:e.command} antes de crear el proyecto.`,Oft=e=>`प्रोजेक्ट बनाने से पहले ${e==null?void 0:e.command} चलाएं।`,Dft=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Aft(e):t==="fa"?Tft(e):t==="ar"?Rft(e):t==="es"?Mft(e):t==="hi"?Oft(e):jft(e)}),Lft=()=>"Searching alphaXiv…",Ift=()=>"正在搜索 alphaXiv…",$ft=()=>"در حال جست‌وجوی alphaXiv…",Bft=()=>"جارٍ البحث في alphaXiv…",Pft=()=>"Buscando en alphaXiv…",Fft=()=>"alphaXiv खोजा जा रहा है…",Hft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ift():t==="fa"?$ft():t==="ar"?Bft():t==="es"?Pft():t==="hi"?Fft():Lft()}),qft=()=>"Use folder",Uft=()=>"使用文件夹",Gft=()=>"استفاده از پوشه",Vft=()=>"استخدام المجلد",Kft=()=>"Usar carpeta",Wft=()=>"फ़ोल्डर इस्तेमाल करें",Qft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uft():t==="fa"?Gft():t==="ar"?Vft():t==="es"?Kft():t==="hi"?Wft():qft()}),Xft=()=>"Can’t reach OpenResearch. This page is no longer live.",Yft=()=>"无法连接 OpenResearch。此页面已不再实时同步。",Zft=()=>"دسترسی به OpenResearch ممکن نیست. این صفحه دیگر همگام نیست.",Jft=()=>"تعذّر الاتصال بـ OpenResearch. لم تعد هذه الصفحة تُحدَّث تلقائيًا.",edt=()=>"No se puede conectar con OpenResearch. Esta página ya no se actualiza.",tdt=()=>"OpenResearch तक नहीं पहुँच सके। यह पेज अब लाइव नहीं है।",O3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yft():t==="fa"?Zft():t==="ar"?Jft():t==="es"?edt():t==="hi"?tdt():Xft()}),ndt=()=>"A workspace for your research agents",rdt=()=>"面向研究智能体的工作空间",sdt=()=>"فضای کاری برای عامل‌های پژوهشی شما",idt=()=>"مساحة عمل لوكلاء بحثك",adt=()=>"Un espacio de trabajo para tus agentes de investigación",odt=()=>"आपके शोध एजेंटों के लिए एक वर्कस्पेस",cdt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rdt():t==="fa"?sdt():t==="ar"?idt():t==="es"?adt():t==="hi"?odt():ndt()}),ldt=()=>"Add papers that represent your research interests, including papers by other authors.",udt=()=>"添加能够代表你研究兴趣的论文,也可以包括其他作者的论文。",_dt=()=>"مقاله‌هایی را که نمایندهٔ علایق پژوهشی شما هستند، از جمله آثار نویسندگان دیگر، اضافه کنید.",fdt=()=>"أضِف أوراقًا تمثّل اهتماماتك البحثية، بما في ذلك أوراق لمؤلفين آخرين.",ddt=()=>"Añade papers que representen tus intereses de investigación, incluidos papers de otros autores.",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=()=>"API key",gdt=()=>"API 密钥",vdt=()=>"کلید API",bdt=()=>"مفتاح API",ydt=()=>"Clave de API",xdt=()=>"API की",CS=((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=()=>"AI/ML",kdt=()=>"人工智能与机器学习",Sdt=()=>"هوش مصنوعی و یادگیری ماشین",Cdt=()=>"الذكاء الاصطناعي/تعلّم الآلة",Edt=()=>"IA/ML",Ndt=()=>"AI/ML",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=()=>"Biology",Adt=()=>"生物学",Tdt=()=>"زیست‌شناسی",Rdt=()=>"الأحياء",Mdt=()=>"Biología",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=()=>"Other",Idt=()=>"其他",$dt=()=>"سایر",Bdt=()=>"أخرى",Pdt=()=>"Otra",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=()=>"Physics",Udt=()=>"物理学",Gdt=()=>"فیزیک",Vdt=()=>"الفيزياء",Kdt=()=>"Física",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=()=>"Back",Ydt=()=>"返回",Zdt=()=>"بازگشت",Jdt=()=>"رجوع",eht=()=>"Atrás",tht=()=>"वापस",Hz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ydt():t==="fa"?Zdt():t==="ar"?Jdt():t==="es"?eht():t==="hi"?tht():Xdt()}),nht=()=>"Check failed",rht=()=>"检查失败",sht=()=>"بررسی ناموفق بود",iht=()=>"فشل الفحص",aht=()=>"Error en la comprobación",oht=()=>"जाँच विफल",cht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rht():t==="fa"?sht():t==="ar"?iht():t==="es"?aht():t==="hi"?oht():nht()}),lht=()=>"Checking",uht=()=>"正在检查",_ht=()=>"در حال بررسی",fht=()=>"جارٍ الفحص",dht=()=>"Comprobando",hht=()=>"जाँचा जा रहा है",ff=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uht():t==="fa"?_ht():t==="ar"?fht():t==="es"?dht():t==="hi"?hht():lht()}),pht=()=>"Checking Git…",mht=()=>"正在检查 Git…",ght=()=>"در حال بررسی Git…",vht=()=>"جارٍ فحص Git…",bht=()=>"Comprobando Git…",yht=()=>"Git जाँचा जा रहा है…",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=()=>"Choose a coding agent",kht=()=>"选择编程智能体",Sht=()=>"یک عامل کدنویسی انتخاب کنید",Cht=()=>"اختر وكيل برمجة",Eht=()=>"Elige un agente de programación",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=()=>"Choose a coding agent to continue.",Aht=()=>"选择一个编程智能体以继续。",Tht=()=>"برای ادامه یک عامل کدنویسی انتخاب کنید.",Rht=()=>"اختر وكيل برمجة للمتابعة.",Mht=()=>"Elige un agente de programación para continuar.",Oht=()=>"जारी रखने के लिए एक कोडिंग एजेंट चुनें।",Dht=((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()}),Lht=()=>"Choose another coding agent",Iht=()=>"选择其他编程智能体",$ht=()=>"انتخاب یک عامل برنامه‌نویسی دیگر",Bht=()=>"اختيار وكيل برمجة آخر",Pht=()=>"Elegir otro agente de programación",Fht=()=>"दूसरा कोडिंग एजेंट चुनें",Hht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Iht():t==="fa"?$ht():t==="ar"?Bht():t==="es"?Pht():t==="hi"?Fht():Lht()}),qht=()=>"Choose at least one research area to continue.",Uht=()=>"请至少选择一个研究领域后再继续。",Ght=()=>"برای ادامه دست‌کم یک حوزهٔ پژوهشی انتخاب کنید.",Vht=()=>"اختر مجالًا بحثيًا واحدًا على الأقل للمتابعة.",Kht=()=>"Elige al menos un área de investigación para continuar.",Wht=()=>"जारी रखने के लिए कम से कम एक शोध क्षेत्र चुनें।",Qht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uht():t==="fa"?Ght():t==="ar"?Vht():t==="es"?Kht():t==="hi"?Wht():qht()}),Xht=()=>"Choose one or more.",Yht=()=>"请选择一项或多项。",Zht=()=>"یک یا چند مورد را انتخاب کنید.",Jht=()=>"اختر واحدًا أو أكثر.",ept=()=>"Elige una o varias.",tpt=()=>"एक या अधिक चुनें।",npt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yht():t==="fa"?Zht():t==="ar"?Jht():t==="es"?ept():t==="hi"?tpt():Xht()}),rpt=()=>"Choose your preferred coding agent",spt=()=>"请选择首选编程智能体",ipt=()=>"عامل برنامه‌نویسی ترجیحی خود را انتخاب کنید",apt=()=>"اختر وكيل البرمجة المفضّل لديك",opt=()=>"Elige tu agente de programación preferido",cpt=()=>"अपना पसंदीदा कोडिंग एजेंट चुनें",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=()=>"Consolidate your research",_pt=()=>"集中管理研究",fpt=()=>"پژوهش خود را یکپارچه کنید",dpt=()=>"وحّد أبحاثك",hpt=()=>"Consolida tu investigación",ppt=()=>"अपने शोध को एक जगह लाएं",mpt=((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()}),gpt=()=>"Continue",vpt=()=>"继续",bpt=()=>"ادامه",ypt=()=>"متابعة",xpt=()=>"Continuar",wpt=()=>"जारी रखें",qz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vpt():t==="fa"?bpt():t==="ar"?ypt():t==="es"?xpt():t==="hi"?wpt():gpt()}),kpt=()=>"Describe your research area to continue.",Spt=()=>"请描述你的研究领域后再继续。",Cpt=()=>"برای ادامه حوزهٔ پژوهشی خود را شرح دهید.",Ept=()=>"صِف مجالك البحثي للمتابعة.",Npt=()=>"Describe tu área de investigación para continuar.",zpt=()=>"जारी रखने के लिए अपना शोध क्षेत्र बताएं।",jpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Spt():t==="fa"?Cpt():t==="ar"?Ept():t==="es"?Npt():t==="hi"?zpt():kpt()}),Apt=()=>"Detecting Claude Code, Codex, OpenCode, Cursor, Antigravity…",Tpt=()=>"正在检测 Claude Code、Codex、OpenCode、Cursor、Antigravity…",Rpt=()=>"در حال شناسایی Claude Code، Codex، OpenCode و Cursor و Antigravity…",Mpt=()=>"جارٍ اكتشاف Claude Code وCodex وOpenCode وCursor وAntigravity…",Opt=()=>"Detectando Claude Code, Codex, OpenCode, Cursor, Google Antigravity…",Dpt=()=>"Claude Code, Codex, OpenCode, Cursor, Google Antigravity पहचाने जा रहे हैं…",Lpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tpt():t==="fa"?Rpt():t==="ar"?Mpt():t==="es"?Opt():t==="hi"?Dpt():Apt()}),Ipt=()=>"e.g. I work on sample-efficient RL for LLM post-training, focused on reward-model-free methods.",$pt=()=>"例如:我研究用于 LLM 后训练的样本高效强化学习,重点关注无需奖励模型的方法。",Bpt=()=>"مثلاً روی یادگیری تقویتی کم‌نمونه برای پس‌آموزش LLM با تمرکز بر روش‌های بدون مدل پاداش کار می‌کنم.",Ppt=()=>"مثال: أعمل على تعلّم معزّز عالي الكفاءة في العيّنات لِما بعد تدريب نماذج اللغة الكبيرة، مع التركيز على الطرق التي لا تعتمد على نماذج المكافأة.",Fpt=()=>"p. ej., trabajo en RL eficiente en muestras para el post-entrenamiento de LLM, centrado en métodos sin modelo de recompensa.",Hpt=()=>"जैसे: मैं LLM पोस्ट-ट्रेनिंग के लिए सैंपल-एफ़िशिएंट RL पर काम करता/करती हूँ, रिवॉर्ड-मॉडल-फ्री तरीकों पर ध्यान केंद्रित करते हुए।",qpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$pt():t==="fa"?Bpt():t==="ar"?Ppt():t==="es"?Fpt():t==="hi"?Hpt():Ipt()}),Upt=()=>"Error details",Gpt=()=>"错误详情",Vpt=()=>"جزئیات خطا",Kpt=()=>"تفاصيل الخطأ",Wpt=()=>"Detalles del error",Qpt=()=>"त्रुटि विवरण",Xpt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gpt():t==="fa"?Vpt():t==="ar"?Kpt():t==="es"?Wpt():t==="hi"?Qpt():Upt()}),Ypt=()=>"Everything stays local",Zpt=()=>"一切都保留在本地",Jpt=()=>"همه‌چیز محلی می‌ماند",e0t=()=>"كل شيء يبقى محليًا",t0t=()=>"Todo se queda en local",n0t=()=>"सब कुछ लोकल ही रहता है",r0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zpt():t==="fa"?Jpt():t==="ar"?e0t():t==="es"?t0t():t==="hi"?n0t():Ypt()}),s0t=()=>"Get started",i0t=()=>"开始使用",a0t=()=>"شروع",o0t=()=>"ابدأ الآن",c0t=()=>"Empezar",l0t=()=>"शुरू करें",u0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?i0t():t==="fa"?a0t():t==="ar"?o0t():t==="es"?c0t():t==="hi"?l0t():s0t()}),_0t=()=>"Git is required for local experiments. Install Git, then re-check.",f0t=()=>"本地实验需要 Git。请安装 Git,然后重新检查。",d0t=()=>"Git برای آزمایش‌های محلی لازم است. آن را نصب و دوباره بررسی کنید.",h0t=()=>"‏Git مطلوب للتجارب المحلية. ثبّت Git ثم أعد الفحص.",p0t=()=>"Git es necesario para los experimentos locales. Instala Git y vuelve a comprobarlo.",m0t=()=>"स्थानीय प्रयोगों के लिए Git ज़रूरी है। Git इंस्टॉल करें, फिर फिर से जाँचें।",Uz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f0t():t==="fa"?d0t():t==="ar"?h0t():t==="es"?p0t():t==="hi"?m0t():_0t()}),g0t=()=>"Ground your agents",v0t=()=>"为智能体提供可靠依据",b0t=()=>"عامل‌هایتان را به منابع متصل کنید",y0t=()=>"زوّد وكلاءك بأساس بحثي",x0t=()=>"Dale contexto a tus agentes",w0t=()=>"अपने एजेंटों को आधार दें",k0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v0t():t==="fa"?b0t():t==="ar"?y0t():t==="es"?x0t():t==="hi"?w0t():g0t()}),S0t=()=>"Install broken",C0t=()=>"安装损坏",E0t=()=>"نصب خراب است",N0t=()=>"التثبيت معطوب",z0t=()=>"Instalación dañada",j0t=()=>"इंस्टॉल खराब है",A0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C0t():t==="fa"?E0t():t==="ar"?N0t():t==="es"?z0t():t==="hi"?j0t():S0t()}),T0t=()=>"Install Git to continue",R0t=()=>"请安装 Git 后再继续",M0t=()=>"برای ادامه Git را نصب کنید",O0t=()=>"ثبّت Git للمتابعة",D0t=()=>"Instala Git para continuar",L0t=()=>"जारी रखने के लिए Git इंस्टॉल करें",I0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R0t():t==="fa"?M0t():t==="ar"?O0t():t==="es"?D0t():t==="hi"?L0t():T0t()}),$0t=()=>"Loading account details…",B0t=()=>"正在加载账户信息…",P0t=()=>"در حال بارگذاری اطلاعات حساب…",F0t=()=>"جارٍ تحميل تفاصيل الحساب…",H0t=()=>"Cargando los datos de la cuenta…",q0t=()=>"खाता विवरण लोड हो रहा है…",U0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B0t():t==="fa"?P0t():t==="ar"?F0t():t==="es"?H0t():t==="hi"?q0t():$0t()}),G0t=()=>"Local Git",V0t=()=>"本地 Git",K0t=()=>"Git محلی",W0t=()=>"Git محلي",Q0t=()=>"Git local",X0t=()=>"लोकल Git",Y0t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?V0t():t==="fa"?K0t():t==="ar"?W0t():t==="es"?Q0t():t==="hi"?X0t():G0t()}),Z0t=()=>"Install needed",J0t=()=>"需要安装",emt=()=>"نیاز به نصب",tmt=()=>"التثبيت مطلوب",nmt=()=>"No detectado",rmt=()=>"इंस्टॉल ज़रूरी है",Gz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?J0t():t==="fa"?emt():t==="ar"?tmt():t==="es"?nmt():t==="hi"?rmt():Z0t()}),smt=()=>"Not found",imt=()=>"未找到",amt=()=>"پیدا نشد",omt=()=>"غير موجود",cmt=()=>"No encontrado",lmt=()=>"नहीं मिला",IL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?imt():t==="fa"?amt():t==="ar"?omt():t==="es"?cmt():t==="hi"?lmt():smt()}),umt=()=>"Signed out",_mt=()=>"未登录",fmt=()=>"وارد نشده",dmt=()=>"غير مسجل الدخول",hmt=()=>"Sin iniciar sesión",pmt=()=>"साइन आउट",$L=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_mt():t==="fa"?fmt():t==="ar"?dmt():t==="es"?hmt():t==="hi"?pmt():umt()}),mmt=()=>"OpenResearch uses a coding agent already installed on this machine.",gmt=()=>"OpenResearch 使用这台计算机上已安装的编程智能体。",vmt=()=>"OpenResearch از عامل کدنویسی نصب‌شده روی این دستگاه استفاده می‌کند.",bmt=()=>"يستخدم OpenResearch وكيل برمجة مثبّتًا مسبقًا على هذا الجهاز.",ymt=()=>"OpenResearch usa un agente de programación que ya esté instalado en este equipo.",xmt=()=>"OpenResearch इस मशीन पर पहले से इंस्टॉल किसी कोडिंग एजेंट का उपयोग करता है।",wmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gmt():t==="fa"?vmt():t==="ar"?bmt():t==="es"?ymt():t==="hi"?xmt():mmt()}),kmt=()=>"Couldn’t verify OpenCode is ready. Retry to check its installation and models.",Smt=()=>"无法确认 OpenCode 已就绪。请重试以检查安装和模型。",Cmt=()=>"آماده بودن OpenCode تأیید نشد. برای بررسی نصب و مدل‌ها دوباره تلاش کنید.",Emt=()=>"تعذّر التحقق من جاهزية OpenCode. أعد المحاولة للتحقق من التثبيت والنماذج.",Nmt=()=>"No se pudo verificar que OpenCode esté listo. Vuelve a intentarlo para comprobar su instalación y sus modelos.",zmt=()=>"यह सत्यापित नहीं हो सका कि OpenCode तैयार है। इसके इंस्टॉलेशन और मॉडल जाँचने के लिए फिर से कोशिश करें।",jmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Smt():t==="fa"?Cmt():t==="ar"?Emt():t==="es"?Nmt():t==="hi"?zmt():kmt()}),Amt=()=>"Other research area",Tmt=()=>"其他研究领域",Rmt=()=>"حوزهٔ پژوهشی دیگر",Mmt=()=>"مجال بحثي آخر",Omt=()=>"Otra área de investigación",Dmt=()=>"अन्य शोध क्षेत्र",Lmt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tmt():t==="fa"?Rmt():t==="ar"?Mmt():t==="es"?Omt():t==="hi"?Dmt():Amt()}),Imt=()=>"Re-check",$mt=()=>"重新检查",Bmt=()=>"بررسی دوباره",Pmt=()=>"إعادة الفحص",Fmt=()=>"Volver a comprobar",Hmt=()=>"फिर से जाँचें",Iv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$mt():t==="fa"?Bmt():t==="ar"?Pmt():t==="es"?Fmt():t==="hi"?Hmt():Imt()}),qmt=()=>"Ready",Umt=()=>"已就绪",Gmt=()=>"آماده",Vmt=()=>"جاهز",Kmt=()=>"Listo",Wmt=()=>"तैयार",ES=((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()}),Qmt=()=>"Re-check Git before continuing",Xmt=()=>"请重新检查 Git 后再继续",Ymt=()=>"پیش از ادامه Git را دوباره بررسی کنید",Zmt=()=>"أعد فحص Git قبل المتابعة",Jmt=()=>"Vuelve a comprobar Git antes de continuar",egt=()=>"जारी रखने से पहले Git फिर से जाँचें",tgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xmt():t==="fa"?Ymt():t==="ar"?Zmt():t==="es"?Jmt():t==="hi"?egt():Qmt()}),ngt=()=>"Representative papers",rgt=()=>"代表性论文",sgt=()=>"مقاله‌های شاخص",igt=()=>"أوراق تمثّل اهتماماتك البحثية",agt=()=>"Papers representativos",ogt=()=>"प्रतिनिधि पेपर",cgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rgt():t==="fa"?sgt():t==="ar"?igt():t==="es"?agt():t==="hi"?ogt():ngt()}),lgt=()=>"Research background",ugt=()=>"研究背景",_gt=()=>"پیشینهٔ پژوهشی",fgt=()=>"الخلفية البحثية",dgt=()=>"Trayectoria de investigación",hgt=()=>"शोध पृष्ठभूमि",pgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ugt():t==="fa"?_gt():t==="ar"?fgt():t==="es"?dgt():t==="hi"?hgt():lgt()}),mgt=()=>"Couldn’t reach orx. Check that it’s still running, then re-check.",ggt=()=>"无法连接到 orx。请确认它仍在运行,然后重新检查。",vgt=()=>"ارتباط با orx برقرار نشد. مطمئن شوید هنوز در حال اجراست و دوباره بررسی کنید.",bgt=()=>"تعذّر الوصول إلى orx. تأكد من أنه لا يزال يعمل، ثم أعد الفحص.",ygt=()=>"No se pudo conectar con orx. Comprueba que sigue en ejecución y vuelve a comprobarlo.",xgt=()=>"orx तक नहीं पहुँच सके। जाँचें कि यह अभी भी चल रहा है, फिर फिर से जाँचें।",hw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ggt():t==="fa"?vgt():t==="ar"?bgt():t==="es"?ygt():t==="hi"?xgt():mgt()}),wgt=()=>"Search alphaXiv by title to link a paper…",kgt=()=>"按标题搜索 alphaXiv 以关联论文…",Sgt=()=>"برای پیوند مقاله، عنوان را در alphaXiv جست‌وجو کنید…",Cgt=()=>"ابحث في alphaXiv بالعنوان لربط ورقة…",Egt=()=>"Busca en alphaXiv por título para vincular un paper…",Ngt=()=>"एक पेपर लिंक करने के लिए शीर्षक से alphaXiv खोजें…",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=()=>"Searching alphaXiv…",Agt=()=>"正在搜索 alphaXiv…",Tgt=()=>"در حال جست‌وجوی alphaXiv…",Rgt=()=>"جارٍ البحث في alphaXiv…",Mgt=()=>"Buscando en alphaXiv…",Ogt=()=>"alphaXiv खोजा जा रहा है…",Dgt=((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()}),Lgt=()=>"Selected",Igt=()=>"已选择",$gt=()=>"انتخاب‌شده",Bgt=()=>"محدد",Pgt=()=>"Seleccionado",Fgt=()=>"चयनित",Hgt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Igt():t==="fa"?$gt():t==="ar"?Bgt():t==="es"?Pgt():t==="hi"?Fgt():Lgt()}),qgt=()=>"Local model unavailable",Ugt=()=>"本地模型不可用",Ggt=()=>"مدل محلی در دسترس نیست",Vgt=()=>"النموذج المحلي غير متاح",Kgt=()=>"Modelo local no disponible",Wgt=()=>"लोकल मॉडल उपलब्ध नहीं",BL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ugt():t==="fa"?Ggt():t==="ar"?Vgt():t==="es"?Kgt():t==="hi"?Wgt():qgt()}),Qgt=()=>"Setting things up…",Xgt=()=>"正在设置…",Ygt=()=>"در حال راه‌اندازی…",Zgt=()=>"جارٍ التهيئة…",Jgt=()=>"Preparando todo…",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=()=>"Connect a local model or sign in to a coding agent to continue",r1t=()=>"连接本地模型或登录编码智能体以继续",s1t=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل کدنویسی وارد شوید",i1t=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل برمجة للمتابعة",a1t=()=>"Conecta un modelo local o inicia sesión en un agente de programación para continuar",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=()=>"Connect a local model or sign in to an agent to continue.",u1t=()=>"连接本地模型或登录一个智能体以继续。",_1t=()=>"برای ادامه، یک مدل محلی متصل کنید یا به یک عامل وارد شوید.",f1t=()=>"اربط نموذجًا محليًا أو سجّل الدخول إلى وكيل للمتابعة.",d1t=()=>"Conecta un modelo local o inicia sesión en un agente para continuar.",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=()=>"Signed in",g1t=()=>"已登录",v1t=()=>"وارد شده",b1t=()=>"تم تسجيل الدخول",y1t=()=>"Sesión iniciada",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=()=>"Connected to alphaXiv, bioRxiv, OpenAlex, and PubMed to ground your agents in the latest research.",S1t=()=>"已连接 alphaXiv、bioRxiv、OpenAlex 和 PubMed,让智能体以最新研究为依据。",C1t=()=>"به alphaXiv، bioRxiv، OpenAlex و PubMed متصل است تا عامل‌هایتان بر تازه‌ترین پژوهش‌ها تکیه کنند.",E1t=()=>"متصل بـ alphaXiv وbioRxiv وOpenAlex وPubMed ليستند وكلاؤك إلى أحدث الأبحاث.",N1t=()=>"Conectado a alphaXiv, bioRxiv, OpenAlex y PubMed para que tus agentes trabajen con la investigación más reciente.",z1t=()=>"आपके एजेंटों को नवीनतम शोध पर आधारित रखने के लिए alphaXiv, bioRxiv, OpenAlex और PubMed से कनेक्ट किया गया।",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=()=>"· Step 1 of 2",T1t=()=>"· 第 1 步,共 2 步",R1t=()=>"· مرحلهٔ ۱ از ۲",M1t=()=>"· الخطوة 1 من 2",O1t=()=>"· Paso 1 de 2",D1t=()=>"· चरण 1 / 2",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=()=>"· Step 2 of 2",$1t=()=>"· 第 2 步,共 2 步",B1t=()=>"· مرحلهٔ ۲ از ۲",P1t=()=>"· الخطوة 2 من 2",F1t=()=>"· Paso 2 de 2",H1t=()=>"· चरण 2 / 2",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=()=>"Tell us about your research",G1t=()=>"介绍一下你的研究",V1t=()=>"از پژوهش خود بگویید",K1t=()=>"أخبرنا عن بحثك",W1t=()=>"Cuéntanos sobre tu investigación",Q1t=()=>"हमें अपने शोध के बारे में बताएं",X1t=((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()}),Y1t=()=>"Tell us your other research area",Z1t=()=>"告诉我们你的其他研究领域",J1t=()=>"حوزهٔ پژوهشی دیگر خود را بنویسید",evt=()=>"أخبرنا عن مجالك البحثي الآخر",tvt=()=>"Cuéntanos cuál es tu otra área de investigación",nvt=()=>"हमें अपना अन्य शोध क्षेत्र बताएं",rvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z1t():t==="fa"?J1t():t==="ar"?evt():t==="es"?tvt():t==="hi"?nvt():Y1t()}),svt=()=>"Track experiments, artifacts, compute, skills, and code all in one place.",ivt=()=>"在一处跟踪实验、产物、算力、技能和代码。",avt=()=>"آزمایش‌ها، خروجی‌ها، رایانش، مهارت‌ها و کد را یک‌جا دنبال کنید.",ovt=()=>"تتبّع التجارب والمُخرَجات والحوسبة والمهارات والشيفرة في مكان واحد.",cvt=()=>"Gestiona experimentos, artefactos, cómputo, skills y código en un solo lugar.",lvt=()=>"प्रयोग, आर्टिफ़ैक्ट, कंप्यूट, स्किल और कोड — सब एक ही जगह ट्रैक करें।",uvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ivt():t==="fa"?avt():t==="ar"?ovt():t==="es"?cvt():t==="hi"?lvt():svt()}),_vt=()=>"Unable to verify",fvt=()=>"无法验证",dvt=()=>"تأیید ممکن نیست",hvt=()=>"تعذّر التحقق",pvt=()=>"No se pudo verificar",mvt=()=>"सत्यापित नहीं हो सका",pw=((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()}),gvt=()=>"Update required",vvt=()=>"需要更新",bvt=()=>"نیازمند به‌روزرسانی",yvt=()=>"مطلوب تحديث",xvt=()=>"Actualización necesaria",wvt=()=>"अपडेट ज़रूरी है",kvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vvt():t==="fa"?bvt():t==="ar"?yvt():t==="es"?xvt():t==="hi"?wvt():gvt()}),Svt=()=>"Waiting for the Git check",Cvt=()=>"正在等待 Git 检查",Evt=()=>"در انتظار بررسی Git",Nvt=()=>"في انتظار فحص Git",zvt=()=>"Esperando la comprobación de Git",jvt=()=>"Git जाँच का इंतज़ार है",Avt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cvt():t==="fa"?Evt():t==="ar"?Nvt():t==="es"?zvt():t==="hi"?jvt():Svt()}),Tvt=()=>"Waiting for the local tool checks",Rvt=()=>"正在等待本地工具检查",Mvt=()=>"در انتظار بررسی ابزارهای محلی",Ovt=()=>"في انتظار فحوص الأدوات المحلية",Dvt=()=>"Esperando las comprobaciones de las herramientas locales",Lvt=()=>"लोकल टूल जाँच का इंतज़ार है",Ivt=((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()}),$vt=()=>"What areas are you interested in?",Bvt=()=>"你对哪些领域感兴趣?",Pvt=()=>"به چه حوزه‌هایی علاقه دارید؟",Fvt=()=>"ما المجالات التي تهتم بها؟",Hvt=()=>"¿Qué áreas te interesan?",qvt=()=>"आपकी रुचि किन क्षेत्रों में है?",Uvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bvt():t==="fa"?Pvt():t==="ar"?Fvt():t==="es"?Hvt():t==="hi"?qvt():$vt()}),Gvt=()=>"Your code, data, and experiment history stay on your machine.",Vvt=()=>"你的代码、数据和实验历史都保留在自己的计算机上。",Kvt=()=>"کد، داده‌ها و تاریخچهٔ آزمایش شما روی رایانهٔ خودتان می‌ماند.",Wvt=()=>"تبقى شيفرتك وبياناتك وسجل تجاربك على جهازك.",Qvt=()=>"Tu código, tus datos y tu historial de experimentos se quedan en tu equipo.",Xvt=()=>"आपका कोड, डेटा और प्रयोग इतिहास आपकी मशीन पर ही रहता है।",Yvt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vvt():t==="fa"?Kvt():t==="ar"?Wvt():t==="es"?Qvt():t==="hi"?Xvt():Gvt()}),Zvt=()=>"Your selected agent is no longer ready. Go back to Step 1 and choose another.",Jvt=()=>"所选智能体已无法使用。请返回第 1 步并选择其他智能体。",ebt=()=>"عامل انتخاب‌شده دیگر آماده نیست. به مرحلهٔ ۱ برگردید و عامل دیگری را انتخاب کنید.",tbt=()=>"لم يعد الوكيل الذي اخترته جاهزًا. ارجع إلى الخطوة 1 واختر غيره.",nbt=()=>"El agente que elegiste ya no está listo. Vuelve al paso 1 y elige otro.",rbt=()=>"आपका चुना हुआ एजेंट अब तैयार नहीं है। चरण 1 पर वापस जाएं और दूसरा चुनें।",sbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jvt():t==="fa"?ebt():t==="ar"?tbt():t==="es"?nbt():t==="hi"?rbt():Zvt()}),ibt=()=>"Add cookie",abt=()=>"添加 cookie",obt=()=>"افزودن کوکی",cbt=()=>"إضافة ملف تعريف الارتباط",lbt=()=>"Añadir cookie",ubt=()=>"कुकी जोड़ें",_bt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?abt():t==="fa"?obt():t==="ar"?cbt():t==="es"?lbt():t==="hi"?ubt():ibt()}),fbt=()=>"Changed here and on Overleaf — choose which copy to keep",dbt=()=>"此处和 Overleaf 都有更改 — 请选择要保留的版本",hbt=()=>"هم اینجا و هم در Overleaf تغییر کرده است — نسخه‌ای را که می‌خواهید نگه دارید انتخاب کنید",pbt=()=>"تغيّر هنا وعلى Overleaf — اختر أي نسخة تحتفظ بها",mbt=()=>"Cambió aquí y en Overleaf — elige qué copia conservar",gbt=()=>"यहाँ और Overleaf दोनों जगह बदला गया — चुनें कि कौन सी कॉपी रखनी है",vbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dbt():t==="fa"?hbt():t==="ar"?pbt():t==="es"?mbt():t==="hi"?gbt():fbt()}),bbt=()=>"Create a token ↗",ybt=()=>"创建令牌 ↗",xbt=()=>"ساخت توکن ↗",wbt=()=>"إنشاء رمز ↗",kbt=()=>"Crear un token ↗",Sbt=()=>"एक टोकन बनाएं ↗",Cbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ybt():t==="fa"?xbt():t==="ar"?wbt():t==="es"?kbt():t==="hi"?Sbt():bbt()}),Ebt=()=>"Overleaf Git token",Nbt=()=>"Overleaf Git 令牌",zbt=()=>"توکن Git در Overleaf",jbt=()=>"رمز Git لـ Overleaf",Abt=()=>"Token de Git de Overleaf",Tbt=()=>"Overleaf Git टोकन",Vz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nbt():t==="fa"?zbt():t==="ar"?jbt():t==="es"?Abt():t==="hi"?Tbt():Ebt()}),Rbt=()=>"Follow Overleaf as people type by adding your Overleaf session cookie.",Mbt=()=>"添加 Overleaf 会话 cookie,即可在他人输入时实时跟随 Overleaf。",Obt=()=>"با افزودن کوکی نشست Overleaf، هنگام تایپ دیگران Overleaf را زنده دنبال کنید.",Dbt=()=>"تابِع Overleaf أثناء كتابة الآخرين بإضافة ملف تعريف ارتباط جلسة Overleaf.",Lbt=()=>"Sigue los cambios de Overleaf mientras se escribe añadiendo tu cookie de sesión de Overleaf.",Ibt=()=>"अपनी Overleaf सेशन कुकी जोड़कर लोगों के टाइप करते ही Overleaf को फ़ॉलो करें।",$bt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mbt():t==="fa"?Obt():t==="ar"?Dbt():t==="es"?Lbt():t==="hi"?Ibt():Rbt()}),Bbt=()=>"Import from browser",Pbt=()=>"从浏览器导入",Fbt=()=>"وارد کردن از مرورگر",Hbt=()=>"الاستيراد من المتصفح",qbt=()=>"Importar desde el navegador",Ubt=()=>"ब्राउज़र से इंपोर्ट करें",Gbt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pbt():t==="fa"?Fbt():t==="ar"?Hbt():t==="es"?qbt():t==="hi"?Ubt():Bbt()}),Vbt=()=>"In step with Overleaf",Kbt=()=>"已与 Overleaf 同步",Wbt=()=>"با Overleaf همگام است",Qbt=()=>"متزامن مع Overleaf",Xbt=()=>"Sincronizado con Overleaf",Ybt=()=>"Overleaf के साथ मेल में",PL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kbt():t==="fa"?Wbt():t==="ar"?Qbt():t==="es"?Xbt():t==="hi"?Ybt():Vbt()}),Zbt=()=>"The last sync did not finish.",Jbt=()=>"上次同步未完成。",eyt=()=>"آخرین همگام‌سازی کامل نشد.",tyt=()=>"لم تكتمل آخر مزامنة.",nyt=()=>"La última sincronización no terminó.",ryt=()=>"पिछला सिंक पूरा नहीं हुआ।",syt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jbt():t==="fa"?eyt():t==="ar"?tyt():t==="es"?nyt():t==="hi"?ryt():Zbt()}),iyt=()=>"Link and sync",ayt=()=>"关联并同步",oyt=()=>"پیوند و همگام‌سازی",cyt=()=>"الربط والمزامنة",lyt=()=>"Vincular y sincronizar",uyt=()=>"लिंक करें और सिंक करें",_yt=((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()}),fyt=()=>"Connecting to Overleaf…",dyt=()=>"正在连接 Overleaf…",hyt=()=>"در حال اتصال به Overleaf…",pyt=()=>"جارٍ الاتصال بـ Overleaf…",myt=()=>"Conectando con Overleaf…",gyt=()=>"Overleaf से कनेक्ट हो रहा है…",vyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dyt():t==="fa"?hyt():t==="ar"?pyt():t==="es"?myt():t==="hi"?gyt():fyt()}),byt=()=>"Edits are live on Overleaf",yyt=()=>"编辑已在 Overleaf 实时同步",xyt=()=>"ویرایش‌ها روی Overleaf زنده‌اند",wyt=()=>"تظهر التعديلات فورًا على Overleaf",kyt=()=>"Los cambios se sincronizan en directo con Overleaf",Syt=()=>"बदलाव Overleaf पर लाइव हैं",Cyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yyt():t==="fa"?xyt():t==="ar"?wyt():t==="es"?kyt():t==="hi"?Syt():byt()}),Eyt=()=>"Retry",Nyt=()=>"重试",zyt=()=>"تلاش دوباره",jyt=()=>"إعادة المحاولة",Ayt=()=>"Reintentar",Tyt=()=>"फिर से कोशिश करें",Ryt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nyt():t==="fa"?zyt():t==="ar"?jyt():t==="es"?Ayt():t==="hi"?Tyt():Eyt()}),Myt=()=>"Live sync stopped.",Oyt=()=>"实时同步已停止。",Dyt=()=>"همگام‌سازی زنده متوقف شد.",Lyt=()=>"توقفت المزامنة المباشرة.",Iyt=()=>"Sincronización en directo detenida.",$yt=()=>"लाइव सिंक रुक गया।",Byt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oyt():t==="fa"?Dyt():t==="ar"?Lyt():t==="es"?Iyt():t==="hi"?$yt():Myt()}),Pyt=()=>"Live sync starts once the paper is in step with Overleaf.",Fyt=()=>"论文与 Overleaf 同步后,实时同步即会开始。",Hyt=()=>"همگام‌سازی زنده پس از هم‌گام شدن مقاله با Overleaf آغاز می‌شود.",qyt=()=>"تبدأ المزامنة المباشرة بمجرد أن تتزامن الورقة مع Overleaf.",Uyt=()=>"La sincronización en directo empieza cuando el paper esté sincronizado con Overleaf.",Gyt=()=>"पेपर Overleaf के साथ मेल में आते ही लाइव सिंक शुरू होगा।",Vyt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fyt():t==="fa"?Hyt():t==="ar"?qyt():t==="es"?Uyt():t==="hi"?Gyt():Pyt()}),Kyt=()=>"My projects ↗",Wyt=()=>"我的项目 ↗",Qyt=()=>"پروژه‌های من ↗",Xyt=()=>"مشاريعي ↗",Yyt=()=>"Mis proyectos ↗",Zyt=()=>"मेरे प्रोजेक्ट ↗",Kz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wyt():t==="fa"?Qyt():t==="ar"?Xyt():t==="es"?Yyt():t==="hi"?Zyt():Kyt()}),Jyt=()=>"Nothing could be synced.",ext=()=>"没有内容可以同步。",txt=()=>"هیچ موردی قابل همگام‌سازی نبود.",nxt=()=>"تعذّرت مزامنة أي شيء.",rxt=()=>"No se pudo sincronizar nada.",sxt=()=>"कुछ भी सिंक नहीं हो सका।",ixt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ext():t==="fa"?txt():t==="ar"?nxt():t==="es"?rxt():t==="hi"?sxt():Jyt()}),axt=()=>"Open Overleaf ↗",oxt=()=>"打开 Overleaf ↗",cxt=()=>"باز کردن Overleaf ↗",lxt=()=>"فتح Overleaf ↗",uxt=()=>"Abrir Overleaf ↗",_xt=()=>"Overleaf खोलें ↗",fxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oxt():t==="fa"?cxt():t==="ar"?lxt():t==="es"?uxt():t==="hi"?_xt():axt()}),dxt=()=>"Cancel",hxt=()=>"取消",pxt=()=>"لغو",mxt=()=>"إلغاء",gxt=()=>"Cancelar",vxt=()=>"रद्द करें",FL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hxt():t==="fa"?pxt():t==="ar"?mxt():t==="es"?gxt():t==="hi"?vxt():dxt()}),bxt=()=>"changed here and on Overleaf. Both copies are untouched — choose which one to keep.",yxt=()=>"在此处和 Overleaf 上均有更改。两个副本均未被修改——请选择要保留的版本。",xxt=()=>"هم اینجا و هم در Overleaf تغییر کرده است. هر دو نسخه دست‌نخورده‌اند — انتخاب کنید کدام نگه داشته شود.",wxt=()=>"تغيّر هنا وعلى Overleaf. كلا النسختين لم تُمسّا — اختر أيّهما تحتفظ به.",kxt=()=>"cambió aquí y en Overleaf. No se ha tocado ninguna de las dos copias — elige cuál conservar.",Sxt=()=>"यहाँ और Overleaf दोनों जगह बदला गया। दोनों कॉपी सुरक्षित हैं — चुनें कि कौन सी रखनी है।",Cxt=((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()}),Ext=()=>"Keep this copy",Nxt=()=>"保留此副本",zxt=()=>"نگه داشتن این نسخه",jxt=()=>"الاحتفاظ بهذه النسخة",Axt=()=>"Conservar esta copia",Txt=()=>"यह कॉपी रखें",Rxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Nxt():t==="fa"?zxt():t==="ar"?jxt():t==="es"?Axt():t==="hi"?Txt():Ext()}),Mxt=()=>"Open in Overleaf",Oxt=()=>"在 Overleaf 中打开",Dxt=()=>"باز کردن در Overleaf",Lxt=()=>"فتح في Overleaf",Ixt=()=>"Abrir en Overleaf",$xt=()=>"Overleaf में खोलें",Bxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oxt():t==="fa"?Dxt():t==="ar"?Lxt():t==="es"?Ixt():t==="hi"?$xt():Mxt()}),Pxt=()=>"Replace the Overleaf token",Fxt=()=>"替换 Overleaf 令牌",Hxt=()=>"جایگزینی توکن Overleaf",qxt=()=>"استبدال رمز Overleaf",Uxt=()=>"Reemplazar el token de Overleaf",Gxt=()=>"Overleaf टोकन बदलें",Wz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fxt():t==="fa"?Hxt():t==="ar"?qxt():t==="es"?Uxt():t==="hi"?Gxt():Pxt()}),Vxt=()=>"Sync files",Kxt=()=>"同步文件",Wxt=()=>"همگام‌سازی فایل‌ها",Qxt=()=>"مزامنة الملفات",Xxt=()=>"Sincronizar archivos",Yxt=()=>"फ़ाइलें सिंक करें",Zxt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kxt():t==="fa"?Wxt():t==="ar"?Qxt():t==="es"?Xxt():t==="hi"?Yxt():Vxt()}),Jxt=()=>"Unlink",e2t=()=>"取消关联",t2t=()=>"قطع پیوند",n2t=()=>"إلغاء الربط",r2t=()=>"Desvincular",s2t=()=>"लिंक हटाएं",i2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e2t():t==="fa"?t2t():t==="ar"?n2t():t==="es"?r2t():t==="hi"?s2t():Jxt()}),a2t=()=>"Upload a copy as a new project ↗",o2t=()=>"上传副本作为新项目 ↗",c2t=()=>"بارگذاری یک کپی به‌عنوان پروژهٔ جدید ↗",l2t=()=>"رفع نسخة كمشروع جديد ↗",u2t=()=>"Subir una copia como proyecto nuevo ↗",_2t=()=>"नए प्रोजेक्ट के रूप में एक कॉपी अपलोड करें ↗",HL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o2t():t==="fa"?c2t():t==="ar"?l2t():t==="es"?u2t():t==="hi"?_2t():a2t()}),f2t=()=>"Use Overleaf's",d2t=()=>"使用 Overleaf 的副本",h2t=()=>"استفاده از نسخهٔ Overleaf",p2t=()=>"استخدام نسخة Overleaf",m2t=()=>"Usar la de Overleaf",g2t=()=>"Overleaf का इस्तेमाल करें",v2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d2t():t==="fa"?h2t():t==="ar"?p2t():t==="es"?m2t():t==="hi"?g2t():f2t()}),b2t=()=>"This paper stays in step with Overleaf.",y2t=()=>"此论文将与 Overleaf 保持同步。",x2t=()=>"این مقاله با Overleaf همگام می‌ماند.",w2t=()=>"تبقى هذه الورقة متزامنة مع Overleaf.",k2t=()=>"Este paper se mantiene sincronizado con Overleaf.",S2t=()=>"यह पेपर Overleaf के साथ मेल में रहता है।",C2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y2t():t==="fa"?x2t():t==="ar"?w2t():t==="es"?k2t():t==="hi"?S2t():b2t()}),E2t=()=>"Paste it instead",N2t=()=>"改为粘贴",z2t=()=>"به‌جایش بچسبانید",j2t=()=>"الصقه بدلًا من ذلك",A2t=()=>"Pegarla manualmente",T2t=()=>"इसके बजाय पेस्ट करें",R2t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N2t():t==="fa"?z2t():t==="ar"?j2t():t==="es"?A2t():t==="hi"?T2t():E2t()}),M2t=e=>`Pulled ${e==null?void 0:e.paths}.`,O2t=e=>`已拉取 ${e==null?void 0:e.paths}。`,D2t=e=>`${e==null?void 0:e.paths} دریافت شد.`,L2t=e=>`سُحب ${e==null?void 0:e.paths}.`,I2t=e=>`Descargado: ${e==null?void 0:e.paths}.`,$2t=e=>`${e==null?void 0:e.paths} पुल किया।`,B2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?O2t(e):t==="fa"?D2t(e):t==="ar"?L2t(e):t==="es"?I2t(e):t==="hi"?$2t(e):M2t(e)}),P2t=e=>`Pulled ${e==null?void 0:e.pulled}; pushed ${e==null?void 0:e.pushed}.`,F2t=e=>`已拉取 ${e==null?void 0:e.pulled};已推送 ${e==null?void 0:e.pushed}。`,H2t=e=>`${e==null?void 0:e.pulled} دریافت و ${e==null?void 0:e.pushed} ارسال شد.`,q2t=e=>`سُحب ${e==null?void 0:e.pulled}؛ ورُفع ${e==null?void 0:e.pushed}.`,U2t=e=>`Descargado: ${e==null?void 0:e.pulled}; subido: ${e==null?void 0:e.pushed}.`,G2t=e=>`${e==null?void 0:e.pulled} पुल किया; ${e==null?void 0:e.pushed} पुश किया।`,V2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?F2t(e):t==="fa"?H2t(e):t==="ar"?q2t(e):t==="es"?U2t(e):t==="hi"?G2t(e):P2t(e)}),K2t=e=>`Pushed ${e==null?void 0:e.paths}.`,W2t=e=>`已推送 ${e==null?void 0:e.paths}。`,Q2t=e=>`${e==null?void 0:e.paths} ارسال شد.`,X2t=e=>`رُفع ${e==null?void 0:e.paths}.`,Y2t=e=>`Subido: ${e==null?void 0:e.paths}.`,Z2t=e=>`${e==null?void 0:e.paths} पुश किया।`,J2t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?W2t(e):t==="fa"?Q2t(e):t==="ar"?X2t(e):t==="es"?Y2t(e):t==="hi"?Z2t(e):K2t(e)}),ewt=()=>"Add a fresh Overleaf session cookie to start following again.",twt=()=>"添加新的 Overleaf 会话 cookie 即可继续实时跟随。",nwt=()=>"برای ادامهٔ دنبال کردن، کوکی نشست تازه‌ای از Overleaf اضافه کنید.",rwt=()=>"أضِف ملف تعريف ارتباط جلسة Overleaf جديدًا لبدء المتابعة مجددًا.",swt=()=>"Añade una nueva cookie de sesión de Overleaf para volver a seguir los cambios.",iwt=()=>"फिर से फ़ॉलो करना शुरू करने के लिए एक नई Overleaf सेशन कुकी जोड़ें।",awt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?twt():t==="fa"?nwt():t==="ar"?rwt():t==="es"?swt():t==="hi"?iwt():ewt()}),owt=()=>"Save the file first",cwt=()=>"请先保存文件",lwt=()=>"ابتدا فایل را ذخیره کنید",uwt=()=>"احفظ الملف أولًا",_wt=()=>"Guarda el archivo primero",fwt=()=>"पहले फ़ाइल सेव करें",dwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cwt():t==="fa"?lwt():t==="ar"?uwt():t==="es"?_wt():t==="hi"?fwt():owt()}),hwt=()=>"Save this file to sync it with Overleaf",pwt=()=>"保存此文件以与 Overleaf 同步",mwt=()=>"برای همگام‌سازی با Overleaf این فایل را ذخیره کنید",gwt=()=>"احفظ هذا الملف لمزامنته مع Overleaf",vwt=()=>"Guarda este archivo para sincronizarlo con Overleaf",bwt=()=>"Overleaf के साथ सिंक करने के लिए इस फ़ाइल को सेव करें",qL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pwt():t==="fa"?mwt():t==="ar"?gwt():t==="es"?vwt():t==="hi"?bwt():hwt()}),ywt=()=>"Save token",xwt=()=>"保存令牌",wwt=()=>"ذخیرهٔ توکن",kwt=()=>"حفظ الرمز",Swt=()=>"Guardar token",Cwt=()=>"टोकन सेव करें",Ewt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xwt():t==="fa"?wwt():t==="ar"?kwt():t==="es"?Swt():t==="hi"?Cwt():ywt()}),Nwt=()=>"Send this paper to Overleaf",zwt=()=>"将此论文发送到 Overleaf",jwt=()=>"ارسال مقاله به Overleaf",Awt=()=>"أرسل هذه الورقة إلى Overleaf",Twt=()=>"Enviar este paper a Overleaf",Rwt=()=>"यह पेपर Overleaf को भेजें",Mwt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zwt():t==="fa"?jwt():t==="ar"?Awt():t==="es"?Twt():t==="hi"?Rwt():Nwt()}),Owt=()=>"Overleaf session cookie",Dwt=()=>"Overleaf 会话 cookie",Lwt=()=>"کوکی نشست Overleaf",Iwt=()=>"ملف تعريف ارتباط جلسة Overleaf",$wt=()=>"Cookie de sesión de Overleaf",Bwt=()=>"Overleaf सेशन कुकी",D3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dwt():t==="fa"?Lwt():t==="ar"?Iwt():t==="es"?$wt():t==="hi"?Bwt():Owt()}),Pwt=()=>"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.",Fwt=()=>"要在他人输入时实时跟随 Overleaf,请粘贴你的 Overleaf 会话 cookie:在已登录 Overleaf 的浏览器中打开开发者工具,找到 overleaf_session2 cookie 并复制其值。它只保存在这台机器上。",Hwt=()=>"برای دنبال کردن Overleaf هنگام تایپ دیگران، کوکی نشست Overleaf خود را بچسبانید: در مرورگری که به Overleaf وارد شده‌اید، ابزارهای توسعه‌دهنده را باز کنید، کوکی overleaf_session2 را پیدا کنید و مقدار آن را کپی کنید. این مقدار روی همین دستگاه می‌ماند.",qwt=()=>"لمتابعة Overleaf أثناء كتابة الآخرين، الصق ملف تعريف ارتباط جلسة Overleaf: في متصفح مسجّل الدخول إلى Overleaf، افتح أدوات المطوّر، وابحث عن ملف تعريف الارتباط overleaf_session2، وانسخ قيمته. يبقى على هذا الجهاز.",Uwt=()=>"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.",Gwt=()=>"लोगों के टाइप करते ही Overleaf को फ़ॉलो करने के लिए, अपनी Overleaf सेशन कुकी पेस्ट करें: Overleaf में साइन इन ब्राउज़र में, डेवलपर टूल खोलें, overleaf_session2 कुकी खोजें, और उसकी वैल्यू कॉपी करें। यह इसी मशीन पर रहती है।",Vwt=((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()}),Kwt=()=>"Overleaf sync failed",Wwt=()=>"Overleaf 同步失败",Qwt=()=>"همگام‌سازی با Overleaf ناموفق بود",Xwt=()=>"فشلت مزامنة Overleaf",Ywt=()=>"Error al sincronizar con Overleaf",Zwt=()=>"Overleaf सिंक विफल",L3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wwt():t==="fa"?Qwt():t==="ar"?Xwt():t==="es"?Ywt():t==="hi"?Zwt():Kwt()}),Jwt=()=>"Text syncs live. This moves figures and other files, and settles conflicts.",e4t=()=>"文本会实时同步。此操作用于同步图片等其他文件,并解决冲突。",t4t=()=>"متن زنده همگام می‌شود. این کار تصویرها و دیگر فایل‌ها را جابه‌جا می‌کند و تعارض‌ها را حل می‌کند.",n4t=()=>"يتزامن النص مباشرةً. ينقل هذا الأشكال والملفات الأخرى، ويحسم التعارضات.",r4t=()=>"El texto se sincroniza en directo. Esto mueve las figuras y otros archivos, y resuelve conflictos.",s4t=()=>"टेक्स्ट लाइव सिंक होता है। यह फ़िगर और अन्य फ़ाइलें ले जाता है, और टकराव सुलझाता है।",i4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e4t():t==="fa"?t4t():t==="ar"?n4t():t==="es"?r4t():t==="hi"?s4t():Jwt()}),a4t=()=>"Syncing with Overleaf…",o4t=()=>"正在与 Overleaf 同步…",c4t=()=>"در حال همگام‌سازی با Overleaf…",l4t=()=>"جارٍ المزامنة مع Overleaf…",u4t=()=>"Sincronizando con Overleaf…",_4t=()=>"Overleaf के साथ सिंक हो रहा है…",UL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o4t():t==="fa"?c4t():t==="ar"?l4t():t==="es"?u4t():t==="hi"?_4t():a4t()}),f4t=()=>"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.",d4t=()=>"粘贴 Overleaf Git 身份验证令牌,使此论文与 Overleaf 项目保持同步。请在 Overleaf 的“账户设置”中创建令牌 — Git 集成功能需要付费 Overleaf 套餐。",h4t=()=>"برای همگام نگه داشتن این مقاله با یک پروژهٔ Overleaf، توکن احراز هویت Git در Overleaf را جای‌گذاری کنید. آن را در بخش تنظیمات حساب Overleaf بسازید — یکپارچه‌سازی Git به طرح پولی Overleaf نیاز دارد.",p4t=()=>"الصق رمز مصادقة Git لـ Overleaf لإبقاء هذه الورقة متزامنة مع مشروع Overleaf. أنشئ واحدًا في Overleaf ضمن إعدادات الحساب — يأتي تكامل Git مع خطة Overleaf مدفوعة.",m4t=()=>"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.",g4t=()=>"इस पेपर को किसी Overleaf प्रोजेक्ट के साथ मेल में रखने के लिए एक Overleaf Git प्रमाणीकरण टोकन पेस्ट करें। इसे Overleaf में Account Settings के तहत बनाएं — Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है।",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=()=>"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.",y4t=()=>"粘贴此论文所属 Overleaf 项目的 URL。Overleaf 无法通过 Git 创建项目,因此请先在 Overleaf 中打开或创建项目。",x4t=()=>"نشانی پروژهٔ Overleaf مربوط به این مقاله را جای‌گذاری کنید. Overleaf نمی‌تواند پروژه را از طریق Git بسازد؛ پس ابتدا پروژه را در آنجا باز یا ایجاد کنید.",w4t=()=>"الصق رابط مشروع Overleaf الذي تنتمي إليه هذه الورقة. لا يستطيع Overleaf إنشاء مشروع عبر Git، لذا افتح المشروع أو أنشئه هناك أولًا.",k4t=()=>"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.",S4t=()=>"उस Overleaf प्रोजेक्ट का URL पेस्ट करें जिससे यह पेपर संबंधित है। Overleaf Git के ज़रिए एक नहीं बना सकता, इसलिए पहले वहाँ प्रोजेक्ट खोलें या बनाएं।",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=()=>"Toggle Plan mode for this chat",N4t=()=>"切换此聊天的计划模式",z4t=()=>"تغییر حالت طرح این گفت‌وگو",j4t=()=>"تبديل وضع التخطيط لهذه المحادثة",A4t=()=>"Activa o desactiva el modo Plan en este chat",T4t=()=>"इस चैट के लिए प्लान मोड टॉगल करें",R4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N4t():t==="fa"?z4t():t==="ar"?j4t():t==="es"?A4t():t==="hi"?T4t():E4t()}),M4t=()=>"Accept and auto mode",O4t=()=>"接受并使用自动模式",D4t=()=>"پذیرش و حالت خودکار",L4t=()=>"قبول وتفعيل الوضع التلقائي",I4t=()=>"Aceptar en modo automático",$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=()=>"Accept and bypass all",F4t=()=>"接受并跳过所有审批",H4t=()=>"پذیرش و عبور از همهٔ تأییدها",q4t=()=>"القبول وتجاوز الكل",U4t=()=>"Aceptar y omitir permisos",G4t=()=>"स्वीकार करें और सब बायपास करें",V4t=((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()}),K4t=()=>"Accept plan",W4t=()=>"接受计划",Q4t=()=>"پذیرش طرح",X4t=()=>"قبول الخطة",Y4t=()=>"Aceptar plan",Z4t=()=>"प्लान स्वीकार करें",J4t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W4t():t==="fa"?Q4t():t==="ar"?X4t():t==="es"?Y4t():t==="hi"?Z4t():K4t()}),e3t=e=>`${e==null?void 0:e.agent} proposed a plan`,t3t=e=>`${e==null?void 0:e.agent} 提出了一个计划`,n3t=e=>`طرح پیشنهادیِ ${e==null?void 0:e.agent}`,r3t=e=>`${e==null?void 0:e.agent} اقترح خطة`,s3t=e=>`${e==null?void 0:e.agent} propuso un plan`,i3t=e=>`${e==null?void 0:e.agent} ने एक प्लान प्रस्तावित किया`,a3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?t3t(e):t==="fa"?n3t(e):t==="ar"?r3t(e):t==="es"?s3t(e):t==="hi"?i3t(e):e3t(e)}),o3t=e=>`${e==null?void 0:e.agent} is ready to proceed`,c3t=e=>`${e==null?void 0:e.agent} 已准备好继续`,l3t=e=>`طرحِ ${e==null?void 0:e.agent} آمادهٔ ادامه است`,u3t=e=>`${e==null?void 0:e.agent} جاهز للمتابعة`,_3t=e=>`${e==null?void 0:e.agent} está listo para continuar`,f3t=e=>`${e==null?void 0:e.agent} आगे बढ़ने के लिए तैयार है`,d3t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c3t(e):t==="fa"?l3t(e):t==="ar"?u3t(e):t==="es"?_3t(e):t==="hi"?f3t(e):o3t(e)}),h3t=()=>"Back",p3t=()=>"返回",m3t=()=>"بازگشت",g3t=()=>"رجوع",v3t=()=>"Atrás",b3t=()=>"वापस",GL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p3t():t==="fa"?m3t():t==="ar"?g3t():t==="es"?v3t():t==="hi"?b3t():h3t()}),y3t=()=>"More approval options",x3t=()=>"更多批准选项",w3t=()=>"گزینه‌های تأیید بیشتر",k3t=()=>"خيارات موافقة إضافية",S3t=()=>"Más opciones de aprobación",C3t=()=>"और स्वीकृति विकल्प",E3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x3t():t==="fa"?w3t():t==="ar"?k3t():t==="es"?S3t():t==="hi"?C3t():y3t()}),N3t=()=>"Open plan",z3t=()=>"打开计划",j3t=()=>"باز کردن طرح",A3t=()=>"فتح الخطة",T3t=()=>"Abrir plan",R3t=()=>"प्लान खोलें",M3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z3t():t==="fa"?j3t():t==="ar"?A3t():t==="es"?T3t():t==="hi"?R3t():N3t()}),O3t=()=>"Reject",D3t=()=>"拒绝",L3t=()=>"رد کردن",I3t=()=>"رفض",$3t=()=>"Rechazar",B3t=()=>"अस्वीकार करें",P3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D3t():t==="fa"?L3t():t==="ar"?I3t():t==="es"?$3t():t==="hi"?B3t():O3t()}),F3t=()=>"Revise",H3t=()=>"修改",q3t=()=>"بازنگری",U3t=()=>"طلب تعديل",G3t=()=>"Pedir cambios",V3t=()=>"संशोधित करें",K3t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H3t():t==="fa"?q3t():t==="ar"?U3t():t==="es"?G3t():t==="hi"?V3t():F3t()}),W3t=()=>"Revise…",Q3t=()=>"修改…",X3t=()=>"بازنگری…",Y3t=()=>"طلب تعديل…",Z3t=()=>"Pedir cambios…",J3t=()=>"संशोधित करें…",e5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Q3t():t==="fa"?X3t():t==="ar"?Y3t():t==="es"?Z3t():t==="hi"?J3t():W3t()}),t5t=()=>"What should change? (optional)",n5t=()=>"需要更改什么?(可选)",r5t=()=>"چه چیزی باید تغییر کند؟ (اختیاری)",s5t=()=>"ما الذي ينبغي تغييره؟ (اختياري)",i5t=()=>"¿Qué debería cambiar? (opcional)",a5t=()=>"क्या बदलना चाहिए? (वैकल्पिक)",o5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n5t():t==="fa"?r5t():t==="ar"?s5t():t==="es"?i5t():t==="hi"?a5t():t5t()}),c5t=e=>`${e==null?void 0:e.count} active`,l5t=e=>`${e==null?void 0:e.count} 个活跃`,u5t=e=>`${e==null?void 0:e.count} فعال`,_5t=e=>`الوكلاء النشطون: ${e==null?void 0:e.count}`,f5t=e=>`${e==null?void 0:e.count} activos`,d5t=e=>`${e==null?void 0:e.count} सक्रिय`,h5t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?l5t(e):t==="fa"?u5t(e):t==="ar"?_5t(e):t==="es"?f5t(e):t==="hi"?d5t(e):c5t(e)}),p5t=e=>`${e==null?void 0:e.count} total agents`,m5t=e=>`共 ${e==null?void 0:e.count} 个智能体`,g5t=e=>`در مجموع ${e==null?void 0:e.count} عامل`,v5t=e=>`إجمالي الوكلاء: ${e==null?void 0:e.count}`,b5t=e=>`${e==null?void 0:e.count} agentes en total`,y5t=e=>`${e==null?void 0:e.count} कुल एजेंट`,x5t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?m5t(e):t==="fa"?g5t(e):t==="ar"?v5t(e):t==="es"?b5t(e):t==="hi"?y5t(e):p5t(e)}),w5t=e=>`Delete ${e==null?void 0:e.name} from OpenResearch? Its experiments, runs, and chats will be permanently removed.`,k5t=e=>`从 OpenResearch 中删除 ${e==null?void 0:e.name}?其实验、运行和聊天将被永久移除。`,S5t=e=>`${e==null?void 0:e.name} از OpenResearch حذف شود؟ آزمایش‌ها، اجراها و گفتگوهای آن برای همیشه حذف می‌شوند.`,C5t=e=>`حذف ${e==null?void 0:e.name} من OpenResearch؟ ستُزال تجاربه وعمليات تشغيله ومحادثاته نهائيًا.`,E5t=e=>`¿Eliminar ${e==null?void 0:e.name} de OpenResearch? Sus experimentos, ejecuciones y chats se eliminarán de forma permanente.`,N5t=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं? इसके प्रयोग, रन और चैट स्थायी रूप से हट जाएंगे।`,z5t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?k5t(e):t==="fa"?S5t(e):t==="ar"?C5t(e):t==="es"?E5t(e):t==="hi"?N5t(e):w5t(e)}),j5t=()=>"Agents",A5t=()=>"智能体",T5t=()=>"عامل‌ها",R5t=()=>"الوكلاء",M5t=()=>"Agentes",O5t=()=>"एजेंट",Qz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A5t():t==="fa"?T5t():t==="ar"?R5t():t==="es"?M5t():t==="hi"?O5t():j5t()}),D5t=()=>"arXiv paper ID:",L5t=()=>"arXiv 论文 ID:",I5t=()=>"شناسهٔ مقالهٔ arXiv:",$5t=()=>"معرّف ورقة arXiv:",B5t=()=>"ID del paper en arXiv:",P5t=()=>"arXiv पेपर ID:",F5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L5t():t==="fa"?I5t():t==="ar"?$5t():t==="es"?B5t():t==="hi"?P5t():D5t()}),H5t=()=>"Cancel",q5t=()=>"取消",U5t=()=>"لغو",G5t=()=>"إلغاء",V5t=()=>"Cancelar",K5t=()=>"रद्द करें",W5t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q5t():t==="fa"?U5t():t==="ar"?G5t():t==="es"?V5t():t==="hi"?K5t():H5t()}),Q5t=()=>"Created",X5t=()=>"创建时间",Y5t=()=>"ایجادشده",Z5t=()=>"أُنشئ",J5t=()=>"Creado",ekt=()=>"बनाया गया",tkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X5t():t==="fa"?Y5t():t==="ar"?Z5t():t==="es"?J5t():t==="hi"?ekt():Q5t()}),nkt=()=>"Delete project?",rkt=()=>"删除项目?",skt=()=>"پروژه حذف شود؟",ikt=()=>"حذف المشروع؟",akt=()=>"¿Eliminar el proyecto?",okt=()=>"प्रोजेक्ट हटाएं?",ckt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rkt():t==="fa"?skt():t==="ar"?ikt():t==="es"?akt():t==="hi"?okt():nkt()}),lkt=()=>"Delete project",ukt=()=>"删除项目",_kt=()=>"حذف پروژه",fkt=()=>"حذف المشروع",dkt=()=>"Eliminar proyecto",hkt=()=>"प्रोजेक्ट हटाएं",pkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ukt():t==="fa"?_kt():t==="ar"?fkt():t==="es"?dkt():t==="hi"?hkt():lkt()}),mkt=()=>"Deleting…",gkt=()=>"正在删除…",vkt=()=>"در حال حذف…",bkt=()=>"جارٍ الحذف…",ykt=()=>"Eliminando…",xkt=()=>"हटाया जा रहा है…",wkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gkt():t==="fa"?vkt():t==="ar"?bkt():t==="es"?ykt():t==="hi"?xkt():mkt()}),kkt=()=>"Experiments",Skt=()=>"实验",Ckt=()=>"آزمایش‌ها",Ekt=()=>"التجارب",Nkt=()=>"Experimentos",zkt=()=>"प्रयोग",Xz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Skt():t==="fa"?Ckt():t==="ar"?Ekt():t==="es"?Nkt():t==="hi"?zkt():kkt()}),jkt=()=>"The local folder and linked GitHub repository are kept.",Akt=()=>"本地文件夹和已关联的 GitHub 仓库都会保留。",Tkt=()=>"پوشهٔ محلی و مخزن پیوندشدهٔ GitHub نگه داشته می‌شوند.",Rkt=()=>"يُحتفظ بالمجلد المحلي ومستودع GitHub المرتبط.",Mkt=()=>"Se conservan la carpeta local y el repositorio de GitHub vinculado.",Okt=()=>"लोकल फ़ोल्डर और लिंक की गई GitHub रिपॉज़िटरी दोनों सुरक्षित रहती हैं।",Dkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Akt():t==="fa"?Tkt():t==="ar"?Rkt():t==="es"?Mkt():t==="hi"?Okt():jkt()}),Lkt=()=>"The local folder is kept.",Ikt=()=>"本地文件夹会保留。",$kt=()=>"پوشهٔ محلی نگه داشته می‌شود.",Bkt=()=>"يُحتفظ بالمجلد المحلي.",Pkt=()=>"La carpeta local se conserva.",Fkt=()=>"लोकल फ़ोल्डर सुरक्षित रहता है।",Hkt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ikt():t==="fa"?$kt():t==="ar"?Bkt():t==="es"?Pkt():t==="hi"?Fkt():Lkt()}),qkt=()=>"New project",Ukt=()=>"新建项目",Gkt=()=>"پروژهٔ جدید",Vkt=()=>"مشروع جديد",Kkt=()=>"Nuevo proyecto",Wkt=()=>"नया प्रोजेक्ट",VL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ukt():t==="fa"?Gkt():t==="ar"?Vkt():t==="es"?Kkt():t==="hi"?Wkt():qkt()}),Qkt=()=>"No projects yet — create one to get started.",Xkt=()=>"尚无项目——新建一个即可开始。",Ykt=()=>"هنوز پروژه‌ای نیست — برای شروع یکی بسازید.",Zkt=()=>"لا توجد مشاريع بعد — أنشئ واحدًا للبدء.",Jkt=()=>"Aún no hay proyectos — crea uno para empezar.",eSt=()=>"अभी तक कोई प्रोजेक्ट नहीं — शुरू करने के लिए एक बनाएं।",tSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xkt():t==="fa"?Ykt():t==="ar"?Zkt():t==="es"?Jkt():t==="hi"?eSt():Qkt()}),nSt=()=>"Project",rSt=()=>"项目",sSt=()=>"پروژه",iSt=()=>"المشروع",aSt=()=>"Proyecto",oSt=()=>"प्रोजेक्ट",cSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rSt():t==="fa"?sSt():t==="ar"?iSt():t==="es"?aSt():t==="hi"?oSt():nSt()}),lSt=()=>"Projects",uSt=()=>"项目",_St=()=>"پروژه‌ها",fSt=()=>"المشاريع",dSt=()=>"Proyectos",hSt=()=>"प्रोजेक्ट",pSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uSt():t==="fa"?_St():t==="ar"?fSt():t==="es"?dSt():t==="hi"?hSt():lSt()}),mSt=()=>"Repository",gSt=()=>"仓库",vSt=()=>"مخزن",bSt=()=>"المستودع",ySt=()=>"Repositorio",xSt=()=>"रिपॉज़िटरी",Yz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gSt():t==="fa"?vSt():t==="ar"?bSt():t==="es"?ySt():t==="hi"?xSt():mSt()}),wSt=()=>"Idle",kSt=()=>"空闲",SSt=()=>"بیکار",CSt=()=>"خامل",ESt=()=>"Inactivo",NSt=()=>"निष्क्रिय",zSt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kSt():t==="fa"?SSt():t==="ar"?CSt():t==="es"?ESt():t==="hi"?NSt():wSt()}),jSt=()=>"Local",ASt=()=>"本地",TSt=()=>"محلی",RSt=()=>"محلي",MSt=()=>"Local",OSt=()=>"लोकल",$v=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ASt():t==="fa"?TSt():t==="ar"?RSt():t==="es"?MSt():t==="hi"?OSt():jSt()}),DSt=()=>"1 total agent",LSt=()=>"共 1 个智能体",ISt=()=>"در مجموع ۱ عامل",$St=()=>"وكيل واحد إجمالًا",BSt=()=>"1 agente en total",PSt=()=>"1 कुल एजेंट",FSt=((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()}),HSt=e=>`${e==null?void 0:e.count} running`,qSt=e=>`${e==null?void 0:e.count} 个运行中`,USt=e=>`${e==null?void 0:e.count} در حال اجرا`,GSt=e=>`${e==null?void 0:e.count} قيد التشغيل`,VSt=e=>`${e==null?void 0:e.count} en ejecución`,KSt=e=>`${e==null?void 0:e.count} चल रहे`,WSt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qSt(e):t==="fa"?USt(e):t==="ar"?GSt(e):t==="es"?VSt(e):t==="hi"?KSt(e):HSt(e)}),QSt=e=>`${e==null?void 0:e.count} total`,XSt=e=>`共 ${e==null?void 0:e.count} 个`,YSt=e=>`در مجموع ${e==null?void 0:e.count}`,ZSt=e=>`${e==null?void 0:e.count} إجمالًا`,JSt=e=>`${e==null?void 0:e.count} en total`,e6t=e=>`${e==null?void 0:e.count} कुल`,Zz=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?XSt(e):t==="fa"?YSt(e):t==="ar"?ZSt(e):t==="es"?JSt(e):t==="hi"?e6t(e):QSt(e)}),t6t=()=>"Installing the compatible binary. This may take a few minutes.",n6t=()=>"正在安装兼容的二进制文件。这可能需要几分钟。",r6t=()=>"در حال نصب فایل اجرایی سازگار. این کار ممکن است چند دقیقه طول بکشد.",s6t=()=>"جارٍ تثبيت الملف التنفيذي المتوافق. قد يستغرق هذا بضع دقائق.",i6t=()=>"Instalando el binario compatible. Puede tardar unos minutos.",a6t=()=>"संगत बाइनरी इंस्टॉल हो रही है। इसमें कुछ मिनट लग सकते हैं।",o6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n6t():t==="fa"?r6t():t==="ar"?s6t():t==="es"?i6t():t==="hi"?a6t():t6t()}),c6t=e=>`Setting up OpenResearch on ${e==null?void 0:e.host}`,l6t=e=>`正在设置 ${e==null?void 0:e.host} 上的 OpenResearch`,u6t=e=>`در حال راه‌اندازی OpenResearch روی ${e==null?void 0:e.host}`,_6t=e=>`جارٍ إعداد OpenResearch على ${e==null?void 0:e.host}`,f6t=e=>`Configurando OpenResearch en ${e==null?void 0:e.host}`,d6t=e=>`${e==null?void 0:e.host} पर OpenResearch सेट अप हो रहा है`,h6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?l6t(e):t==="fa"?u6t(e):t==="ar"?_6t(e):t==="es"?f6t(e):t==="hi"?d6t(e):c6t(e)}),p6t=()=>"Check again",m6t=()=>"再次检查",g6t=()=>"بررسی دوباره",v6t=()=>"تحقق مجددًا",b6t=()=>"Volver a comprobar",y6t=()=>"फिर से जाँचें",Jz=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m6t():t==="fa"?g6t():t==="ar"?v6t():t==="es"?b6t():t==="hi"?y6t():p6t()}),x6t=()=>"Closing…",w6t=()=>"正在关闭…",k6t=()=>"در حال بستن…",S6t=()=>"جارٍ الإغلاق…",C6t=()=>"Cerrando…",E6t=()=>"बंद हो रहा है…",N6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w6t():t==="fa"?k6t():t==="ar"?S6t():t==="es"?C6t():t==="hi"?E6t():x6t()}),z6t=e=>`Connected to ${e==null?void 0:e.host} as ${e==null?void 0:e.user}`,j6t=e=>`已以 ${e==null?void 0:e.user} 身份连接到 ${e==null?void 0:e.host}`,A6t=e=>`اتصال به ${e==null?void 0:e.host} با کاربر ${e==null?void 0:e.user}`,T6t=e=>`متصل بـ ${e==null?void 0:e.host} باسم ${e==null?void 0:e.user}`,R6t=e=>`Conectado a ${e==null?void 0:e.host} como ${e==null?void 0:e.user}`,M6t=e=>`${e==null?void 0:e.host} से ${e==null?void 0:e.user} के रूप में कनेक्टेड`,O6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?j6t(e):t==="fa"?A6t(e):t==="ar"?T6t(e):t==="es"?R6t(e):t==="hi"?M6t(e):z6t(e)}),D6t=()=>"Preparing your remote workspace…",L6t=()=>"正在准备远程工作区…",I6t=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",$6t=()=>"جارٍ تحضير مساحة عملك البعيدة…",B6t=()=>"Preparando tu espacio de trabajo remoto…",P6t=()=>"आपका रिमोट वर्कस्पेस तैयार किया जा रहा है…",F6t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L6t():t==="fa"?I6t():t==="ar"?$6t():t==="es"?B6t():t==="hi"?P6t():D6t()}),H6t=e=>`Connecting to ${e==null?void 0:e.host}`,q6t=e=>`正在连接到 ${e==null?void 0:e.host}`,U6t=e=>`در حال اتصال به ${e==null?void 0:e.host}`,G6t=e=>`جارٍ الاتصال بـ ${e==null?void 0:e.host}`,V6t=e=>`Conectando a ${e==null?void 0:e.host}`,K6t=e=>`${e==null?void 0:e.host} से कनेक्ट हो रहा है`,W6t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?q6t(e):t==="fa"?U6t(e):t==="ar"?G6t(e):t==="es"?V6t(e):t==="hi"?K6t(e):H6t(e)}),Q6t=()=>"Close remote host picker",X6t=()=>"关闭远程主机选择器",Y6t=()=>"بستن انتخاب‌گر میزبان راه‌دور",Z6t=()=>"إغلاق مُنتقي المضيف البعيد",J6t=()=>"Cerrar el selector de hosts remotos",eCt=()=>"रिमोट होस्ट पिकर बंद करें",tCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X6t():t==="fa"?Y6t():t==="ar"?Z6t():t==="es"?J6t():t==="hi"?eCt():Q6t()}),nCt=()=>"Choose a configured SSH host.",rCt=()=>"选择已配置的 SSH 主机。",sCt=()=>"یک میزبان SSH پیکربندی‌شده انتخاب کنید.",iCt=()=>"اختر مضيف SSH مُعدًّا.",aCt=()=>"Elige un host SSH configurado.",oCt=()=>"एक कॉन्फ़िगर किया गया SSH होस्ट चुनें।",cCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rCt():t==="fa"?sCt():t==="ar"?iCt():t==="es"?aCt():t==="hi"?oCt():nCt()}),lCt=()=>"Connect to remote",uCt=()=>"连接到远程主机",_Ct=()=>"اتصال به میزبان راه‌دور",fCt=()=>"الاتصال بجهاز بعيد",dCt=()=>"Conectar a un host remoto",hCt=()=>"रिमोट से कनेक्ट करें",I3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uCt():t==="fa"?_Ct():t==="ar"?fCt():t==="es"?dCt():t==="hi"?hCt():lCt()}),pCt=()=>"Disconnect",mCt=()=>"断开连接",gCt=()=>"قطع اتصال",vCt=()=>"قطع الاتصال",bCt=()=>"Desconectar",yCt=()=>"डिस्कनेक्ट करें",$3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mCt():t==="fa"?gCt():t==="ar"?vCt():t==="es"?bCt():t==="hi"?yCt():pCt()}),xCt=()=>"Your remote work is still running. Reconnect when you’re ready.",wCt=()=>"你的远程工作仍在运行。准备好后可以重新连接。",kCt=()=>"کار راه‌دور شما همچنان در حال اجرا است. هر زمان آماده بودید دوباره متصل شوید.",SCt=()=>"لا يزال عملك البعيد قيد التشغيل. أعد الاتصال عندما تكون جاهزًا.",CCt=()=>"Tu trabajo remoto sigue en ejecución. Vuelve a conectarte cuando quieras.",ECt=()=>"आपका रिमोट काम अभी भी चल रहा है। तैयार होने पर फिर से कनेक्ट करें।",NCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wCt():t==="fa"?kCt():t==="ar"?SCt():t==="es"?CCt():t==="hi"?ECt():xCt()}),zCt=e=>`Disconnected from ${e==null?void 0:e.host}`,jCt=e=>`已断开与 ${e==null?void 0:e.host} 的连接`,ACt=e=>`اتصال به ${e==null?void 0:e.host} قطع شد`,TCt=e=>`انقطع الاتصال بـ ${e==null?void 0:e.host}`,RCt=e=>`Desconectado de ${e==null?void 0:e.host}`,MCt=e=>`${e==null?void 0:e.host} से डिस्कनेक्ट हो गया`,KL=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?jCt(e):t==="fa"?ACt(e):t==="ar"?TCt(e):t==="es"?RCt(e):t==="hi"?MCt(e):zCt(e)}),OCt=e=>`Could not connect to ${e==null?void 0:e.host}`,DCt=e=>`无法连接到 ${e==null?void 0:e.host}`,LCt=e=>`اتصال به ${e==null?void 0:e.host} ممکن نشد`,ICt=e=>`تعذّر الاتصال بـ ${e==null?void 0:e.host}`,$Ct=e=>`No se pudo conectar a ${e==null?void 0:e.host}`,BCt=e=>`${e==null?void 0:e.host} से कनेक्ट नहीं हो सका`,PCt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DCt(e):t==="fa"?LCt(e):t==="ar"?ICt(e):t==="es"?$Ct(e):t==="hi"?BCt(e):OCt(e)}),FCt=()=>"Restart local OpenResearch and select this SSH host again. Work on the remote host continues.",HCt=()=>"请重新启动本地 OpenResearch 并再次选择此 SSH 主机。远程主机上的工作仍在继续。",qCt=()=>"OpenResearch محلی را دوباره راه‌اندازی کنید و این میزبان SSH را دوباره انتخاب کنید. کار روی میزبان راه‌دور ادامه دارد.",UCt=()=>"أعد تشغيل OpenResearch المحلي واختر مضيف SSH هذا مجددًا. يستمر العمل على المضيف البعيد.",GCt=()=>"Reinicia OpenResearch en local y vuelve a seleccionar este host SSH. El trabajo en el host remoto continúa.",VCt=()=>"लोकल OpenResearch फिर से शुरू करें और इस SSH होस्ट को फिर से चुनें। रिमोट होस्ट पर काम जारी रहता है।",KCt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HCt():t==="fa"?qCt():t==="ar"?UCt():t==="es"?GCt():t==="hi"?VCt():FCt()}),WCt=()=>"OpenResearch agents have stopped. Submitted experiments may still be running.",QCt=()=>"OpenResearch 智能体已停止。已提交的实验可能仍在运行。",XCt=()=>"عامل‌های OpenResearch متوقف شده‌اند. آزمایش‌های ارسال‌شده ممکن است همچنان در حال اجرا باشند.",YCt=()=>"توقّف وكلاء OpenResearch. قد تظل التجارب المُرسَلة قيد التشغيل.",ZCt=()=>"Los agentes de OpenResearch se han detenido. Puede que los experimentos enviados sigan en ejecución.",JCt=()=>"OpenResearch एजेंट रुक गए हैं। सबमिट किए गए प्रयोग अभी भी चल सकते हैं।",e7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QCt():t==="fa"?XCt():t==="ar"?YCt():t==="es"?ZCt():t==="hi"?JCt():WCt()}),t7t=e=>`OpenResearch is not running on ${e==null?void 0:e.host}`,n7t=e=>`OpenResearch 未在 ${e==null?void 0:e.host} 上运行`,r7t=e=>`OpenResearch روی ${e==null?void 0:e.host} در حال اجرا نیست`,s7t=e=>`‏OpenResearch لا يعمل على ${e==null?void 0:e.host}`,i7t=e=>`OpenResearch no se está ejecutando en ${e==null?void 0:e.host}`,a7t=e=>`${e==null?void 0:e.host} पर OpenResearch नहीं चल रहा`,o7t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?n7t(e):t==="fa"?r7t(e):t==="ar"?s7t(e):t==="es"?i7t(e):t==="hi"?a7t(e):t7t(e)}),c7t=()=>"OpenResearch binary",l7t=()=>"OpenResearch 二进制文件",u7t=()=>"فایل اجرایی OpenResearch",_7t=()=>"الملف التنفيذي لـ OpenResearch",f7t=()=>"Binario de OpenResearch",d7t=()=>"OpenResearch बाइनरी",h7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l7t():t==="fa"?u7t():t==="ar"?_7t():t==="es"?f7t():t==="hi"?d7t():c7t()}),p7t=()=>"OpenResearch Database",m7t=()=>"OpenResearch 数据库",g7t=()=>"پایگاه دادهٔ OpenResearch",v7t=()=>"قاعدة بيانات OpenResearch",b7t=()=>"Base de datos de OpenResearch",y7t=()=>"OpenResearch डेटाबेस",x7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m7t():t==="fa"?g7t():t==="ar"?v7t():t==="es"?b7t():t==="hi"?y7t():p7t()}),w7t=()=>"OpenResearch will use these locations for your remote SSH user and does not require sudo.",k7t=()=>"OpenResearch 将为你的远程 SSH 用户使用以下位置,无需 sudo。",S7t=()=>"OpenResearch از این مسیرها برای کاربر SSH راه‌دور شما استفاده می‌کند و به sudo نیاز ندارد.",C7t=()=>"سيستخدم OpenResearch هذه المواقع لمستخدم SSH البعيد ولا يتطلب sudo.",E7t=()=>"OpenResearch usará estas ubicaciones para tu usuario SSH remoto y no necesita sudo.",N7t=()=>"OpenResearch आपके रिमोट SSH यूज़र के लिए इन स्थानों का इस्तेमाल करेगा और sudo की ज़रूरत नहीं है।",z7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k7t():t==="fa"?S7t():t==="ar"?C7t():t==="es"?E7t():t==="hi"?N7t():w7t()}),j7t=()=>"Install OpenResearch?",A7t=()=>"安装 OpenResearch?",T7t=()=>"OpenResearch نصب شود؟",R7t=()=>"تثبيت OpenResearch؟",M7t=()=>"¿Instalar OpenResearch?",O7t=()=>"OpenResearch इंस्टॉल करें?",D7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A7t():t==="fa"?T7t():t==="ar"?R7t():t==="es"?M7t():t==="hi"?O7t():j7t()}),L7t=()=>"Installing…",I7t=()=>"正在安装…",$7t=()=>"در حال نصب…",B7t=()=>"جارٍ التثبيت…",P7t=()=>"Instalando…",F7t=()=>"इंस्टॉल हो रहा है…",H7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I7t():t==="fa"?$7t():t==="ar"?B7t():t==="es"?P7t():t==="hi"?F7t():L7t()}),q7t=()=>"No matching SSH hosts",U7t=()=>"没有匹配的 SSH 主机",G7t=()=>"میزبان SSH منطبقی پیدا نشد",V7t=()=>"لا توجد مضيفات SSH مطابقة",K7t=()=>"No hay hosts SSH que coincidan",W7t=()=>"कोई मेल खाता SSH होस्ट नहीं",Q7t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?U7t():t==="fa"?G7t():t==="ar"?V7t():t==="es"?K7t():t==="hi"?W7t():q7t()}),X7t=e=>`OpenResearch is not installed for ${e==null?void 0:e.user} on ${e==null?void 0:e.host}. Install it now?`,Y7t=e=>`${e==null?void 0:e.user} 尚未在 ${e==null?void 0:e.host} 上安装 OpenResearch。现在安装吗?`,Z7t=e=>`OpenResearch برای ${e==null?void 0:e.user} روی ${e==null?void 0:e.host} نصب نیست. اکنون نصب شود؟`,J7t=e=>`‏OpenResearch غير مثبّت للمستخدم ${e==null?void 0:e.user} على ${e==null?void 0:e.host}. هل تريد تثبيته الآن؟`,e8t=e=>`OpenResearch no está instalado para ${e==null?void 0:e.user} en ${e==null?void 0:e.host}. ¿Instalarlo ahora?`,t8t=e=>`${e==null?void 0:e.host} पर ${e==null?void 0:e.user} के लिए OpenResearch इंस्टॉल नहीं है। अभी इंस्टॉल करें?`,n8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Y7t(e):t==="fa"?Z7t(e):t==="ar"?J7t(e):t==="es"?e8t(e):t==="hi"?t8t(e):X7t(e)}),r8t=()=>"Open remote",s8t=()=>"打开远程工作区",i8t=()=>"باز کردن راه‌دور",a8t=()=>"فتح مساحة العمل البعيدة",o8t=()=>"Abrir remoto",c8t=()=>"रिमोट खोलें",l8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?s8t():t==="fa"?i8t():t==="ar"?a8t():t==="es"?o8t():t==="hi"?c8t():r8t()}),u8t=()=>"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.",_8t=()=>"关闭此标签页或断开连接后,代理和实验仍会继续运行。审批请求最多保持待处理 55 分钟。主机重启或管理员策略可能会停止 OpenResearch。",f8t=()=>"بستن این زبانه یا قطع اتصال، عامل‌ها و آزمایش‌ها را در حال اجرا نگه می‌دارد. درخواست‌های تأیید تا ۵۵ دقیقه در انتظار می‌مانند. راه‌اندازی مجدد میزبان یا سیاست مدیر ممکن است OpenResearch را متوقف کند.",d8t=()=>"إغلاق هذا التبويب أو قطع الاتصال يُبقي الوكلاء والتجارب قيد التشغيل. تبقى طلبات الموافقة معلّقة لمدة تصل إلى 55 دقيقة. قد تتسبب إعادة تشغيل المضيف أو سياسة المسؤول في إيقاف OpenResearch.",h8t=()=>"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.",p8t=()=>"यह टैब बंद करने या डिस्कनेक्ट करने पर भी एजेंट और प्रयोग चलते रहते हैं। स्वीकृति अनुरोध 55 मिनट तक लंबित रहते हैं। होस्ट रीस्टार्ट या एडमिन नीति OpenResearch को रोक सकती है।",m8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_8t():t==="fa"?f8t():t==="ar"?d8t():t==="es"?h8t():t==="hi"?p8t():u8t()}),g8t=()=>"Your browser blocked the remote workspace tab. Allow pop-ups and try again.",v8t=()=>"浏览器阻止了远程工作区标签页。请允许弹出窗口后重试。",b8t=()=>"مرورگر زبانهٔ فضای کاری راه‌دور را مسدود کرد. پنجره‌های بازشو را مجاز کنید و دوباره تلاش کنید.",y8t=()=>"حجب متصفحك تبويب مساحة العمل البعيدة. اسمح بالنوافذ المنبثقة وحاول مجددًا.",x8t=()=>"Tu navegador bloqueó la pestaña del espacio de trabajo remoto. Permite las ventanas emergentes y vuelve a intentarlo.",w8t=()=>"आपके ब्राउज़र ने रिमोट वर्कस्पेस टैब को ब्लॉक कर दिया। पॉप-अप की अनुमति दें और फिर से कोशिश करें।",k8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?v8t():t==="fa"?b8t():t==="ar"?y8t():t==="es"?x8t():t==="hi"?w8t():g8t()}),S8t=()=>"Preparing remote workspace…",C8t=()=>"正在准备远程工作区…",E8t=()=>"در حال آماده‌سازی فضای کاری راه‌دور…",N8t=()=>"جارٍ تحضير مساحة العمل البعيدة…",z8t=()=>"Preparando el espacio de trabajo remoto…",j8t=()=>"रिमोट वर्कस्पेस तैयार हो रहा है…",A8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?C8t():t==="fa"?E8t():t==="ar"?N8t():t==="es"?z8t():t==="hi"?j8t():S8t()}),T8t=()=>"Reconnect",R8t=()=>"重新连接",M8t=()=>"اتصال دوباره",O8t=()=>"إعادة الاتصال",D8t=()=>"Reconectar",L8t=()=>"फिर से कनेक्ट करें",ej=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R8t():t==="fa"?M8t():t==="ar"?O8t():t==="es"?D8t():t==="hi"?L8t():T8t()}),I8t=()=>"The connection dropped. Your remote work remains running while OpenResearch reconnects.",$8t=()=>"连接已中断。OpenResearch 重新连接期间,你的远程工作仍会继续运行。",B8t=()=>"اتصال قطع شد. هنگام اتصال دوبارهٔ OpenResearch، کار راه‌دور شما همچنان اجرا می‌شود.",P8t=()=>"انقطع الاتصال. يبقى عملك البعيد قيد التشغيل بينما يعيد OpenResearch الاتصال.",F8t=()=>"Se perdió la conexión. Tu trabajo remoto sigue en ejecución mientras OpenResearch se reconecta.",H8t=()=>"कनेक्शन टूट गया। OpenResearch के फिर से कनेक्ट होने के दौरान आपका रिमोट काम चलता रहता है।",q8t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$8t():t==="fa"?B8t():t==="ar"?P8t():t==="es"?F8t():t==="hi"?H8t():I8t()}),U8t=e=>`Reconnecting to ${e==null?void 0:e.host}`,G8t=e=>`正在重新连接到 ${e==null?void 0:e.host}`,V8t=e=>`در حال اتصال دوباره به ${e==null?void 0:e.host}`,K8t=e=>`جارٍ إعادة الاتصال بـ ${e==null?void 0:e.host}`,W8t=e=>`Reconectando a ${e==null?void 0:e.host}`,Q8t=e=>`${e==null?void 0:e.host} से फिर से कनेक्ट हो रहा है`,X8t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?G8t(e):t==="fa"?V8t(e):t==="ar"?K8t(e):t==="es"?W8t(e):t==="hi"?Q8t(e):U8t(e)}),Y8t=()=>"Search SSH hosts",Z8t=()=>"搜索 SSH 主机",J8t=()=>"جستجوی میزبان‌های SSH",e9t=()=>"البحث في مضيفات SSH",t9t=()=>"Buscar hosts SSH",n9t=()=>"SSH होस्ट खोजें",tj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z8t():t==="fa"?J8t():t==="ar"?e9t():t==="es"?t9t():t==="hi"?n9t():Y8t()}),r9t=e=>`SSH: ${e==null?void 0:e.host}`,s9t=e=>`SSH:${e==null?void 0:e.host}`,i9t=e=>`SSH: ${e==null?void 0:e.host}`,a9t=e=>`SSH: ${e==null?void 0:e.host}`,o9t=e=>`SSH: ${e==null?void 0:e.host}`,c9t=e=>`SSH: ${e==null?void 0:e.host}`,mw=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?s9t(e):t==="fa"?i9t(e):t==="ar"?a9t(e):t==="es"?o9t(e):t==="hi"?c9t(e):r9t(e)}),l9t=()=>"Start a new OpenResearch host",u9t=()=>"启动新的 OpenResearch 主机",_9t=()=>"راه‌اندازی میزبان جدید OpenResearch",f9t=()=>"بدء مضيف OpenResearch جديد",d9t=()=>"Iniciar un nuevo host de OpenResearch",h9t=()=>"एक नया OpenResearch होस्ट शुरू करें",p9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u9t():t==="fa"?_9t():t==="ar"?f9t():t==="es"?d9t():t==="hi"?h9t():l9t()}),m9t=e=>`End ${e==null?void 0:e.count} pending approvals.`,g9t=e=>`结束 ${e==null?void 0:e.count} 个待审批请求。`,v9t=e=>`${e==null?void 0:e.count} تأیید در انتظار را پایان می‌دهد.`,b9t=e=>`إنهاء طلبات الموافقة المعلّقة (${e==null?void 0:e.count}).`,y9t=e=>`Cancelará ${e==null?void 0:e.count} aprobaciones pendientes.`,x9t=e=>`${e==null?void 0:e.count} लंबित स्वीकृतियाँ खत्म होंगी।`,w9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?g9t(e):t==="fa"?v9t(e):t==="ar"?b9t(e):t==="es"?y9t(e):t==="hi"?x9t(e):m9t(e)}),k9t=()=>"Stop OpenResearch",S9t=()=>"停止 OpenResearch",C9t=()=>"توقف OpenResearch",E9t=()=>"إيقاف OpenResearch",N9t=()=>"Detener OpenResearch",z9t=()=>"OpenResearch रोकें",j9t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S9t():t==="fa"?C9t():t==="ar"?E9t():t==="es"?N9t():t==="hi"?z9t():k9t()}),A9t=e=>`Stop OpenResearch on ${e==null?void 0:e.host}?`,T9t=e=>`停止 ${e==null?void 0:e.host} 上的 OpenResearch?`,R9t=e=>`OpenResearch روی ${e==null?void 0:e.host} متوقف شود؟`,M9t=e=>`إيقاف OpenResearch على ${e==null?void 0:e.host}؟`,O9t=e=>`¿Detener OpenResearch en ${e==null?void 0:e.host}?`,D9t=e=>`${e==null?void 0:e.host} पर OpenResearch रोकें?`,L9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?T9t(e):t==="fa"?R9t(e):t==="ar"?M9t(e):t==="es"?O9t(e):t==="hi"?D9t(e):A9t(e)}),I9t=e=>`Leave ${e==null?void 0:e.count} submitted experiments running.`,$9t=e=>`让 ${e==null?void 0:e.count} 个已提交实验继续运行。`,B9t=e=>`${e==null?void 0:e.count} آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.`,P9t=e=>`إبقاء التجارب المُرسَلة قيد التشغيل (${e==null?void 0:e.count}).`,F9t=e=>`Dejará ${e==null?void 0:e.count} experimentos enviados en ejecución.`,H9t=e=>`${e==null?void 0:e.count} सबमिट किए गए प्रयोग चलते रहेंगे।`,q9t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?$9t(e):t==="fa"?B9t(e):t==="ar"?P9t(e):t==="es"?F9t(e):t==="hi"?H9t(e):I9t(e)}),U9t=()=>"Stop OpenResearch on host",G9t=()=>"停止主机上的 OpenResearch",V9t=()=>"توقف OpenResearch روی میزبان",K9t=()=>"إيقاف OpenResearch على المضيف",W9t=()=>"Detener OpenResearch en el host",Q9t=()=>"होस्ट पर OpenResearch रोकें",WL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?G9t():t==="fa"?V9t():t==="ar"?K9t():t==="es"?W9t():t==="hi"?Q9t():U9t()}),X9t=()=>"This will also:",Y9t=()=>"这还将:",Z9t=()=>"این کار همچنین:",J9t=()=>"سيؤدي هذا أيضًا إلى:",eEt=()=>"Esto también:",tEt=()=>"इससे यह भी होगा:",nEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y9t():t==="fa"?Z9t():t==="ar"?J9t():t==="es"?eEt():t==="hi"?tEt():X9t()}),rEt=()=>"End 1 pending approval.",sEt=()=>"结束 1 个待审批请求。",iEt=()=>"۱ تأیید در انتظار را پایان می‌دهد.",aEt=()=>"إنهاء طلب موافقة معلّق واحد.",oEt=()=>"Cancelará 1 aprobación pendiente.",cEt=()=>"1 लंबित स्वीकृति खत्म होगी।",lEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sEt():t==="fa"?iEt():t==="ar"?aEt():t==="es"?oEt():t==="hi"?cEt():rEt()}),uEt=()=>"Leave 1 submitted experiment running.",_Et=()=>"让 1 个已提交实验继续运行。",fEt=()=>"۱ آزمایش ارسال‌شده را در حال اجرا نگه می‌دارد.",dEt=()=>"ترك تجربة مُرسَلة واحدة قيد التشغيل.",hEt=()=>"Dejará 1 experimento enviado en ejecución.",pEt=()=>"1 सबमिट किया गया प्रयोग चलता रहेगा।",mEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_Et():t==="fa"?fEt():t==="ar"?dEt():t==="es"?hEt():t==="hi"?pEt():uEt()}),gEt=()=>"Disconnect 1 other client.",vEt=()=>"断开 1 个其他客户端。",bEt=()=>"اتصال ۱ کارخواه دیگر را قطع می‌کند.",yEt=()=>"قطع اتصال عميل آخر واحد.",xEt=()=>"Desconectará a otro cliente.",wEt=()=>"1 अन्य क्लाइंट डिस्कनेक्ट होगा।",kEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vEt():t==="fa"?bEt():t==="ar"?yEt():t==="es"?xEt():t==="hi"?wEt():gEt()}),SEt=()=>"Keep 1 queued message saved.",CEt=()=>"保留 1 条排队消息。",EEt=()=>"۱ پیام در صف را ذخیره نگه می‌دارد.",NEt=()=>"إبقاء رسالة واحدة محفوظة في قائمة الانتظار.",zEt=()=>"Conservará 1 mensaje en cola.",jEt=()=>"1 कतार में लगा संदेश सुरक्षित रहेगा।",AEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?CEt():t==="fa"?EEt():t==="ar"?NEt():t==="es"?zEt():t==="hi"?jEt():SEt()}),TEt=()=>"Interrupt 1 active agent turn.",REt=()=>"中断 1 个活动代理任务。",MEt=()=>"۱ نوبت فعال عامل را قطع می‌کند.",OEt=()=>"مقاطعة جولة وكيل نشطة واحدة.",DEt=()=>"Interrumpirá 1 turno activo de un agente.",LEt=()=>"1 सक्रिय एजेंट टर्न बाधित होगा।",IEt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?REt():t==="fa"?MEt():t==="ar"?OEt():t==="es"?DEt():t==="hi"?LEt():TEt()}),$Et=e=>`Disconnect ${e==null?void 0:e.count} other clients.`,BEt=e=>`断开 ${e==null?void 0:e.count} 个其他客户端。`,PEt=e=>`اتصال ${e==null?void 0:e.count} کارخواه دیگر را قطع می‌کند.`,FEt=e=>`قطع اتصال العملاء الآخرين (${e==null?void 0:e.count}).`,HEt=e=>`Desconectará otros ${e==null?void 0:e.count} clientes.`,qEt=e=>`${e==null?void 0:e.count} अन्य क्लाइंट डिस्कनेक्ट होंगे।`,UEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?BEt(e):t==="fa"?PEt(e):t==="ar"?FEt(e):t==="es"?HEt(e):t==="hi"?qEt(e):$Et(e)}),GEt=e=>`Keep ${e==null?void 0:e.count} queued messages saved.`,VEt=e=>`保留 ${e==null?void 0:e.count} 条排队消息。`,KEt=e=>`${e==null?void 0:e.count} پیام در صف را ذخیره نگه می‌دارد.`,WEt=e=>`إبقاء الرسائل في قائمة الانتظار محفوظة (${e==null?void 0:e.count}).`,QEt=e=>`Conservará ${e==null?void 0:e.count} mensajes en cola.`,XEt=e=>`${e==null?void 0:e.count} कतार में लगे संदेश सुरक्षित रहेंगे।`,YEt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?VEt(e):t==="fa"?KEt(e):t==="ar"?WEt(e):t==="es"?QEt(e):t==="hi"?XEt(e):GEt(e)}),ZEt=e=>`Interrupt ${e==null?void 0:e.count} active agent turns.`,JEt=e=>`中断 ${e==null?void 0:e.count} 个活动代理任务。`,eNt=e=>`${e==null?void 0:e.count} نوبت فعال عامل را قطع می‌کند.`,tNt=e=>`مقاطعة جولات الوكلاء النشطة (${e==null?void 0:e.count}).`,nNt=e=>`Interrumpirá ${e==null?void 0:e.count} turnos activos de agentes.`,rNt=e=>`${e==null?void 0:e.count} सक्रिय एजेंट टर्न बाधित होंगे।`,sNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?JEt(e):t==="fa"?eNt(e):t==="ar"?tNt(e):t==="es"?nNt(e):t==="hi"?rNt(e):ZEt(e)}),iNt=()=>"Stopping host…",aNt=()=>"正在停止主机…",oNt=()=>"در حال توقف میزبان…",cNt=()=>"جارٍ إيقاف المضيف…",lNt=()=>"Deteniendo el host…",uNt=()=>"होस्ट रोका जा रहा है…",_Nt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aNt():t==="fa"?oNt():t==="ar"?cNt():t==="es"?lNt():t==="hi"?uNt():iNt()}),fNt=()=>"Update",dNt=()=>"更新",hNt=()=>"به‌روزرسانی",pNt=()=>"تحديث",mNt=()=>"Actualizar",gNt=()=>"अपडेट करें",nj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dNt():t==="fa"?hNt():t==="ar"?pNt():t==="es"?mNt():t==="hi"?gNt():fNt()}),vNt=e=>`The OpenResearch installation on ${e==null?void 0:e.host} is not compatible with this dashboard. Update it now?`,bNt=e=>`${e==null?void 0:e.host} 上的 OpenResearch 与此仪表板不兼容。现在更新吗?`,yNt=e=>`نسخهٔ OpenResearch روی ${e==null?void 0:e.host} با این داشبورد سازگار نیست. اکنون به‌روزرسانی شود؟`,xNt=e=>`نسخة OpenResearch المثبّتة على ${e==null?void 0:e.host} غير متوافقة مع هذه اللوحة. هل تريد تحديثها الآن؟`,wNt=e=>`La instalación de OpenResearch en ${e==null?void 0:e.host} no es compatible con este dashboard. ¿Actualizarla ahora?`,kNt=e=>`${e==null?void 0:e.host} पर OpenResearch इंस्टॉलेशन इस डैशबोर्ड के साथ संगत नहीं है। अभी अपडेट करें?`,SNt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bNt(e):t==="fa"?yNt(e):t==="ar"?xNt(e):t==="es"?wNt(e):t==="hi"?kNt(e):vNt(e)}),CNt=()=>"Update OpenResearch?",ENt=()=>"更新 OpenResearch?",NNt=()=>"OpenResearch به‌روزرسانی شود؟",zNt=()=>"تحديث OpenResearch؟",jNt=()=>"¿Actualizar OpenResearch?",ANt=()=>"OpenResearch अपडेट करें?",TNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ENt():t==="fa"?NNt():t==="ar"?zNt():t==="es"?jNt():t==="hi"?ANt():CNt()}),RNt=()=>"Updating…",MNt=()=>"正在更新…",ONt=()=>"در حال به‌روزرسانی…",DNt=()=>"جارٍ التحديث…",LNt=()=>"Actualizando…",INt=()=>"अपडेट हो रहा है…",$Nt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MNt():t==="fa"?ONt():t==="ar"?DNt():t==="es"?LNt():t==="hi"?INt():RNt()}),BNt=()=>"Disable syncing",PNt=()=>"关闭同步",FNt=()=>"غیرفعال کردن همگام‌سازی",HNt=()=>"تعطيل المزامنة",qNt=()=>"Desactivar sincronización",UNt=()=>"सिंकिंग बंद करें",GNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PNt():t==="fa"?FNt():t==="ar"?HNt():t==="es"?qNt():t==="hi"?UNt():BNt()}),VNt=()=>"Enable GitHub syncing",KNt=()=>"启用 GitHub 同步",WNt=()=>"فعال‌سازی همگام‌سازی GitHub",QNt=()=>"تفعيل مزامنة GitHub",XNt=()=>"Activar sincronización con GitHub",YNt=()=>"GitHub सिंकिंग चालू करें",ZNt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KNt():t==="fa"?WNt():t==="ar"?QNt():t==="es"?XNt():t==="hi"?YNt():VNt()}),JNt=()=>"Enabling…",ezt=()=>"正在启用…",tzt=()=>"در حال فعال‌سازی…",nzt=()=>"جارٍ التفعيل…",rzt=()=>"Activando…",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():JNt()}),azt=()=>"Updating…",ozt=()=>"正在更新…",czt=()=>"در حال به‌روزرسانی…",lzt=()=>"جارٍ التحديث…",uzt=()=>"Actualizando…",_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=()=>"Reopen a previous chat",hzt=()=>"重新打开之前的聊天",pzt=()=>"بازکردن دوبارهٔ گفت‌وگوی قبلی",mzt=()=>"إعادة فتح محادثة سابقة",gzt=()=>"Vuelve a abrir un chat anterior",vzt=()=>"पिछली चैट फिर से खोलें",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=()=>"No chats to resume",xzt=()=>"没有可恢复的聊天",wzt=()=>"گفت‌وگویی برای ادامه وجود ندارد",kzt=()=>"لا توجد محادثات لاستئنافها",Szt=()=>"No hay chats que reanudar",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=()=>"From your terminal — adopting copies the transcript, and new turns continue there",zzt=()=>"来自你的终端 — 采用会复制记录,新的回合将在那里继续",jzt=()=>"از ترمینال شما — با پذیرفتن، رونوشت گفت‌وگو کپی می‌شود و نوبت‌های جدید همان‌جا ادامه می‌یابند",Azt=()=>"من طرفيتك — التبنّي ينسخ النص، والجولات الجديدة تتابع هناك",Tzt=()=>"Desde tu terminal — al adoptarlo se copia la transcripción y los turnos nuevos continúan allí",Rzt=()=>"आपके टर्मिनल से — अपनाने पर ट्रांसक्रिप्ट कॉपी होती है और नए टर्न वहीं जारी रहते हैं",rj=((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=()=>"Search chats",Ozt=()=>"搜索聊天",Dzt=()=>"جست‌وجوی گفت‌وگوها",Lzt=()=>"البحث في المحادثات",Izt=()=>"Buscar chats",$zt=()=>"चैट खोजें",sj=((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=()=>"Resume a chat",Pzt=()=>"恢复聊天",Fzt=()=>"ادامهٔ یک گفت‌وگو",Hzt=()=>"استئناف محادثة",qzt=()=>"Reanudar un chat",Uzt=()=>"चैट फिर से शुरू करें",ij=((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()}),Gzt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}`,Vzt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次`,Kzt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt}`,Wzt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}`,Qzt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}`,Xzt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}`,Yzt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vzt(e):t==="fa"?Kzt(e):t==="ar"?Wzt(e):t==="es"?Qzt(e):t==="hi"?Xzt(e):Gzt(e)}),Zzt=e=>`Retrying · attempt ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,Jzt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次`,ejt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum}`,tjt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,njt=e=>`Reintentando · intento ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,rjt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum}`,sjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jzt(e):t==="fa"?ejt(e):t==="ar"?tjt(e):t==="es"?njt(e):t==="hi"?rjt(e):Zzt(e)}),ijt=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`,ajt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,ojt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} از ${e==null?void 0:e.maximum} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,cjt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,ljt=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`,ujt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt}/${e==null?void 0:e.maximum} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,_jt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ajt(e):t==="fa"?ojt(e):t==="ar"?cjt(e):t==="es"?ljt(e):t==="hi"?ujt(e):ijt(e)}),fjt=e=>`Retrying · attempt ${e==null?void 0:e.attempt} · next attempt in ${e==null?void 0:e.seconds}s`,djt=e=>`正在重试 · 第 ${e==null?void 0:e.attempt} 次 · ${e==null?void 0:e.seconds} 秒后再次尝试`,hjt=e=>`در حال تلاش دوباره · تلاش ${e==null?void 0:e.attempt} · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,pjt=e=>`إعادة المحاولة · المحاولة ${e==null?void 0:e.attempt} · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,mjt=e=>`Reintentando · intento ${e==null?void 0:e.attempt} · siguiente intento en ${e==null?void 0:e.seconds} s`,gjt=e=>`फिर से कोशिश · प्रयास ${e==null?void 0:e.attempt} · अगला प्रयास ${e==null?void 0:e.seconds}से में`,vjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?djt(e):t==="fa"?hjt(e):t==="ar"?pjt(e):t==="es"?mjt(e):t==="hi"?gjt(e):fjt(e)}),bjt=()=>"CLI is retrying…",yjt=()=>"CLI 正在重试…",xjt=()=>"CLI در حال تلاش دوباره است…",wjt=()=>"تعيد واجهة سطر الأوامر المحاولة…",kjt=()=>"La CLI está reintentando…",Sjt=()=>"CLI फिर से कोशिश कर रहा है…",Cjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yjt():t==="fa"?xjt():t==="ar"?wjt():t==="es"?kjt():t==="hi"?Sjt():bjt()}),Ejt=e=>`Retrying · next attempt in ${e==null?void 0:e.seconds}s`,Njt=e=>`正在重试 · ${e==null?void 0:e.seconds} 秒后再次尝试`,zjt=e=>`در حال تلاش دوباره · تلاش بعدی تا ${e==null?void 0:e.seconds} ثانیه`,jjt=e=>`إعادة المحاولة · المحاولة التالية بعد ${e==null?void 0:e.seconds}ث`,Ajt=e=>`Reintentando · siguiente intento en ${e==null?void 0:e.seconds} s`,Tjt=e=>`फिर से कोशिश · अगला प्रयास ${e==null?void 0:e.seconds}से में`,Rjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Njt(e):t==="fa"?zjt(e):t==="ar"?jjt(e):t==="es"?Ajt(e):t==="hi"?Tjt(e):Ejt(e)}),Mjt=()=>"Sending again…",Ojt=()=>"正在重新发送…",Djt=()=>"در حال ارسال دوباره…",Ljt=()=>"جارٍ إعادة الإرسال…",Ijt=()=>"Reenviando…",$jt=()=>"फिर से भेजा जा रहा है…",Bjt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ojt():t==="fa"?Djt():t==="ar"?Ljt():t==="es"?Ijt():t==="hi"?$jt():Mjt()}),Pjt=e=>`Sending again in ${e==null?void 0:e.seconds}s…`,Fjt=e=>`将在 ${e==null?void 0:e.seconds} 秒后重新发送…`,Hjt=e=>`ارسال دوباره تا ${e==null?void 0:e.seconds} ثانیه…`,qjt=e=>`إعادة الإرسال بعد ${e==null?void 0:e.seconds}ث…`,Ujt=e=>`Reenviando en ${e==null?void 0:e.seconds} s…`,Gjt=e=>`${e==null?void 0:e.seconds}से में फिर से भेजा जाएगा…`,Vjt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Fjt(e):t==="fa"?Hjt(e):t==="ar"?qjt(e):t==="es"?Ujt(e):t==="hi"?Gjt(e):Pjt(e)}),Kjt=()=>"Retrying…",Wjt=()=>"正在重试…",Qjt=()=>"در حال تلاش دوباره…",Xjt=()=>"جارٍ إعادة المحاولة…",Yjt=()=>"Reintentando…",Zjt=()=>"फिर से कोशिश हो रही है…",QL=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wjt():t==="fa"?Qjt():t==="ar"?Xjt():t==="es"?Yjt():t==="hi"?Zjt():Kjt()}),Jjt=()=>"Default speed",eAt=()=>"默认速度",tAt=()=>"سرعت پیش‌فرض",nAt=()=>"السرعة الافتراضية",rAt=()=>"Velocidad predeterminada",sAt=()=>"डिफ़ॉल्ट गति",iAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eAt():t==="fa"?tAt():t==="ar"?nAt():t==="es"?rAt():t==="hi"?sAt():Jjt()}),aAt=()=>"Standard",oAt=()=>"标准",cAt=()=>"استاندارد",lAt=()=>"قياسي",uAt=()=>"Estándar",_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=e=>` Add ${e==null?void 0:e.directory} to your PATH to use it.`,hAt=e=>` 请将 ${e==null?void 0:e.directory} 添加到 PATH 后使用。`,pAt=e=>` برای استفاده، ${e==null?void 0:e.directory} را به PATH اضافه کنید.`,mAt=e=>` أضِف ${e==null?void 0:e.directory} إلى PATH لاستخدامه.`,gAt=e=>` Añade ${e==null?void 0:e.directory} a tu PATH para usarlo.`,vAt=e=>` इसे इस्तेमाल करने के लिए ${e==null?void 0:e.directory} को अपने PATH में जोड़ें।`,bAt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hAt(e):t==="fa"?pAt(e):t==="ar"?mAt(e):t==="es"?gAt(e):t==="hi"?vAt(e):dAt(e)}),yAt=()=>"Appearance",xAt=()=>"外观",wAt=()=>"ظاهر",kAt=()=>"المظهر",SAt=()=>"Apariencia",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=()=>"Check",zAt=()=>"检查",jAt=()=>"بررسی",AAt=()=>"فحص",TAt=()=>"Comprobar",RAt=()=>"जाँचें",MAt=((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()}),OAt=()=>"Check again",DAt=()=>"再次检查",LAt=()=>"بررسی دوباره",IAt=()=>"تحقق مجددًا",$At=()=>"Volver a comprobar",BAt=()=>"फिर से जाँचें",Am=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DAt():t==="fa"?LAt():t==="ar"?IAt():t==="es"?$At():t==="hi"?BAt():OAt()}),PAt=()=>"Check for updates",FAt=()=>"检查更新",HAt=()=>"بررسی به‌روزرسانی",qAt=()=>"التحقق من التحديثات",UAt=()=>"Buscar actualizaciones",GAt=()=>"अपडेट के लिए जाँचें",VAt=((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()}),KAt=()=>"Check now",WAt=()=>"立即检查",QAt=()=>"اکنون بررسی کن",XAt=()=>"التحقق الآن",YAt=()=>"Comprobar ahora",ZAt=()=>"अभी जाँचें",JAt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WAt():t==="fa"?QAt():t==="ar"?XAt():t==="es"?YAt():t==="hi"?ZAt():KAt()}),eTt=()=>"Check setup",tTt=()=>"检查设置",nTt=()=>"بررسی راه‌اندازی",rTt=()=>"فحص الإعداد",sTt=()=>"Comprobar configuración",iTt=()=>"सेटअप जाँचें",aTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tTt():t==="fa"?nTt():t==="ar"?rTt():t==="es"?sTt():t==="hi"?iTt():eTt()}),oTt=()=>"orx checks a few times a day on its own.",cTt=()=>"orx 每天会自动检查几次。",lTt=()=>"orx روزی چند بار خودکار بررسی می‌کند.",uTt=()=>"يتحقق orx بضع مرات يوميًا تلقائيًا.",_Tt=()=>"orx lo comprueba por sí solo varias veces al día.",fTt=()=>"orx खुद दिन में कुछ बार जाँच करता है।",dTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cTt():t==="fa"?lTt():t==="ar"?uTt():t==="es"?_Tt():t==="hi"?fTt():oTt()}),hTt=()=>"Choose a flavor",pTt=()=>"选择配置",mTt=()=>"انتخاب پیکربندی",gTt=()=>"اختر تكوين الموارد",vTt=()=>"Elige una opción",bTt=()=>"एक फ़्लेवर चुनें",yTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pTt():t==="fa"?mTt():t==="ar"?gTt():t==="es"?vTt():t==="hi"?bTt():hTt()}),xTt=e=>`Choose a flavor to use ${e==null?void 0:e.destination} for new runs.`,wTt=e=>`请选择一个配置,以便新运行使用${e==null?void 0:e.destination}。`,kTt=e=>`برای اجرای کارهای جدید روی ${e==null?void 0:e.destination} یک پیکربندی انتخاب کنید.`,STt=e=>`اختر تكوين الموارد لاستخدام ${e==null?void 0:e.destination} في عمليات التشغيل الجديدة.`,CTt=e=>`Elige una opción para usar ${e==null?void 0:e.destination} en las nuevas ejecuciones.`,ETt=e=>`नए रन के लिए ${e==null?void 0:e.destination} इस्तेमाल करने के लिए एक फ़्लेवर चुनें।`,NTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wTt(e):t==="fa"?kTt(e):t==="ar"?STt(e):t==="es"?CTt(e):t==="hi"?ETt(e):xTt(e)}),zTt=()=>"clean",jTt=()=>"无更改",ATt=()=>"بدون تغییر",TTt=()=>"نظيف",RTt=()=>"sin cambios",MTt=()=>"साफ़",OTt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jTt():t==="fa"?ATt():t==="ar"?TTt():t==="es"?RTt():t==="hi"?MTt():zTt()}),DTt=e=>`Already linked at ${e==null?void 0:e.link}.`,LTt=e=>`已链接到 ${e==null?void 0:e.link}。`,ITt=e=>`از قبل در ${e==null?void 0:e.link} پیوند شده است.`,$Tt=e=>`مرتبط بالفعل في ${e==null?void 0:e.link}.`,BTt=e=>`Ya está enlazado en ${e==null?void 0:e.link}.`,PTt=e=>`पहले से ${e==null?void 0:e.link} पर लिंक है।`,FTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LTt(e):t==="fa"?ITt(e):t==="ar"?$Tt(e):t==="es"?BTt(e):t==="hi"?PTt(e):DTt(e)}),HTt=e=>`Linked ${e==null?void 0:e.link}.`,qTt=e=>`已链接 ${e==null?void 0:e.link}。`,UTt=e=>`${e==null?void 0:e.link} پیوند شد.`,GTt=e=>`تم إنشاء الرابط ${e==null?void 0:e.link}.`,VTt=e=>`Enlazado en ${e==null?void 0:e.link}.`,KTt=e=>`${e==null?void 0:e.link} लिंक किया गया।`,WTt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?qTt(e):t==="fa"?UTt(e):t==="ar"?GTt(e):t==="es"?VTt(e):t==="hi"?KTt(e):HTt(e)}),QTt=()=>"Close terminal",XTt=()=>"关闭终端",YTt=()=>"بستن ترمینال",ZTt=()=>"إغلاق الطرفية",JTt=()=>"Cerrar la terminal",eRt=()=>"टर्मिनल बंद करें",aj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XTt():t==="fa"?YTt():t==="ar"?ZTt():t==="es"?JTt():t==="hi"?eRt():QTt()}),tRt=()=>"Terminal closed",nRt=()=>"终端已关闭",rRt=()=>"ترمینال بسته شد",sRt=()=>"أُغلقت الطرفية",iRt=()=>"Terminal cerrada",aRt=()=>"टर्मिनल बंद हो गया",oRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nRt():t==="fa"?rRt():t==="ar"?sRt():t==="es"?iRt():t==="hi"?aRt():tRt()}),cRt=()=>"Finished",lRt=()=>"已完成",uRt=()=>"انجام شد",_Rt=()=>"اكتمل",fRt=()=>"Finalizado",dRt=()=>"पूर्ण",hRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lRt():t==="fa"?uRt():t==="ar"?_Rt():t==="es"?fRt():t==="hi"?dRt():cRt()}),pRt=()=>"Command failed",mRt=()=>"命令失败",gRt=()=>"دستور ناموفق بود",vRt=()=>"فشل الأمر",bRt=()=>"El comando falló",yRt=()=>"कमांड विफल रही",xRt=((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()}),wRt=()=>"Running…",kRt=()=>"运行中…",SRt=()=>"در حال اجرا…",CRt=()=>"قيد التشغيل…",ERt=()=>"Ejecutando…",NRt=()=>"चल रहा है…",zRt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kRt():t==="fa"?SRt():t==="ar"?CRt():t==="es"?ERt():t==="hi"?NRt():wRt()}),jRt=()=>"Connect",ARt=()=>"连接",TRt=()=>"اتصال",RRt=()=>"اتصال",MRt=()=>"Conectar",ORt=()=>"कनेक्ट करें",NS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ARt():t==="fa"?TRt():t==="ar"?RRt():t==="es"?MRt():t==="hi"?ORt():jRt()}),DRt=()=>"Connected via GitHub CLI",LRt=()=>"已通过 GitHub CLI 连接",IRt=()=>"از طریق GitHub CLI متصل است",$Rt=()=>"متصل عبر واجهة GitHub لسطر الأوامر",BRt=()=>"Conectado mediante GitHub CLI",PRt=()=>"GitHub CLI के ज़रिए कनेक्टेड",XL=((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()}),FRt=()=>"Connecting…",HRt=()=>"正在连接…",qRt=()=>"در حال اتصال…",URt=()=>"جارٍ الاتصال…",GRt=()=>"Conectando…",VRt=()=>"कनेक्ट हो रहा है…",YL=((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()}),KRt=e=>`CPU cores: ${e==null?void 0:e.count}`,WRt=e=>`${e==null?void 0:e.count} 个 CPU 核心`,QRt=e=>`${e==null?void 0:e.count} هستهٔ CPU`,XRt=e=>`أنوية المعالج: ${e==null?void 0:e.count}`,YRt=e=>`Núcleos de CPU: ${e==null?void 0:e.count}`,ZRt=e=>`CPU कोर: ${e==null?void 0:e.count}`,JRt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WRt(e):t==="fa"?QRt(e):t==="ar"?XRt(e):t==="es"?YRt(e):t==="hi"?ZRt(e):KRt(e)}),eMt=()=>"Create a private repository and automatically push experiment branches for collaborator visibility.",tMt=()=>"创建私有仓库,并自动推送实验分支以便协作者查看。",nMt=()=>"یک مخزن خصوصی بسازید و شاخه‌های آزمایش را برای مشاهدهٔ همکاران به‌طور خودکار پوش کنید.",rMt=()=>"أنشئ مستودعًا خاصًا وارفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون.",sMt=()=>"Crear un repositorio privado y subir automáticamente las ramas de los experimentos para que las vean tus colaboradores.",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=()=>"the current project",cMt=()=>"当前项目",lMt=()=>"پروژهٔ فعلی",uMt=()=>"المشروع الحالي",_Mt=()=>"el proyecto actual",fMt=()=>"मौजूदा प्रोजेक्ट",dMt=((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()}),hMt=e=>`${e==null?void 0:e.value} (custom)`,pMt=e=>`${e==null?void 0:e.value}(自定义)`,mMt=e=>`${e==null?void 0:e.value} (سفارشی)`,gMt=e=>`${e==null?void 0:e.value} (مخصص)`,vMt=e=>`${e==null?void 0:e.value} (personalizado)`,bMt=e=>`${e==null?void 0:e.value} (कस्टम)`,yMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?pMt(e):t==="fa"?mMt(e):t==="ar"?gMt(e):t==="es"?vMt(e):t==="hi"?bMt(e):hMt(e)}),xMt=()=>"detached",wMt=()=>"分离头指针",kMt=()=>"جدا از شاخه",SMt=()=>"منفصل",CMt=()=>"desacoplado",EMt=()=>"डिटैच्ड",zS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wMt():t==="fa"?kMt():t==="ar"?SMt():t==="es"?CMt():t==="hi"?EMt():xMt()}),NMt=()=>"Disconnected",zMt=()=>"已断开连接",jMt=()=>"قطع اتصال",AMt=()=>"غير متصل",TMt=()=>"Desconectado",RMt=()=>"डिस्कनेक्ट हो गया",ZL=((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()}),MMt=()=>"Environment tab",OMt=()=>"环境标签页",DMt=()=>"زبانهٔ محیط",LMt=()=>"تبويب البيئة",IMt=()=>"pestaña Entorno",$Mt=()=>"एनवायरनमेंट टैब",BMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OMt():t==="fa"?DMt():t==="ar"?LMt():t==="es"?IMt():t==="hi"?$Mt():MMt()}),PMt=()=>"Free models · No sign-in required",FMt=()=>"免费模型 · 无需登录",HMt=()=>"مدل‌های رایگان · بدون نیاز به ورود",qMt=()=>"نماذج مجانية · لا يلزم تسجيل الدخول",UMt=()=>"Modelos gratuitos · No es necesario iniciar sesión",GMt=()=>"मुफ़्त मॉडल · साइन-इन ज़रूरी नहीं",VMt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FMt():t==="fa"?HMt():t==="ar"?qMt():t==="es"?UMt():t==="hi"?GMt():PMt()}),KMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,WMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,QMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,XMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,YMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,ZMt=e=>`${e==null?void 0:e.branch} · ${e==null?void 0:e.state}`,JMt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?WMt(e):t==="fa"?QMt(e):t==="ar"?XMt(e):t==="es"?YMt(e):t==="hi"?ZMt(e):KMt(e)}),eOt=()=>"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.",tOt=()=>"GitHub 拒绝了推送,因为此仓库已归档且为只读。你的本地项目仍然可用。请在 GitHub 上取消归档该仓库,然后在此处启用同步。",nOt=()=>"GitHub پوش را نپذیرفت، چون این مخزن بایگانی‌شده و فقط‌خواندنی است. پروژهٔ محلی همچنان در دسترس است. مخزن را در GitHub از بایگانی خارج کنید و سپس همگام‌سازی را اینجا فعال کنید.",rOt=()=>"رفض GitHub رفع التغييرات لأن هذا المستودع مؤرشف وللقراءة فقط. لا يزال المشروع المحلي متاحًا. ألغِ أرشفة المستودع على GitHub، ثم فعّل المزامنة هنا.",sOt=()=>"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í.",iOt=()=>"GitHub ने पुश अस्वीकार कर दिया क्योंकि यह रिपॉज़िटरी आर्काइव और रीड-ओनली है। लोकल प्रोजेक्ट अब भी उपलब्ध है। GitHub पर रिपॉज़िटरी को अनआर्काइव करें, फिर यहाँ सिंकिंग चालू करें।",aOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tOt():t==="fa"?nOt():t==="ar"?rOt():t==="es"?sOt():t==="hi"?iOt():eOt()}),oOt=()=>"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.",cOt=()=>"GitHub 上有本地项目中不存在的更改。请拉取 GitHub 上的最新更改,在 Git 中解决冲突,然后再次尝试启用同步。",lOt=()=>"GitHub تغییراتی دارد که در پروژهٔ محلی نیست. تازه‌ترین تغییرات GitHub را دریافت و تعارض‌ها را در Git حل کنید، سپس دوباره همگام‌سازی را فعال کنید.",uOt=()=>"يحتوي GitHub على تغييرات ليست في هذا المشروع المحلي. اسحب أحدث تغييرات GitHub وحُلّ أي تعارضات في Git، ثم أعد محاولة تفعيل المزامنة.",_Ot=()=>"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.",fOt=()=>"GitHub में ऐसे बदलाव हैं जो इस लोकल प्रोजेक्ट में नहीं हैं। नवीनतम GitHub बदलाव पुल करें और Git में किसी भी टकराव को सुलझाएं, फिर सिंकिंग फिर से चालू करने की कोशिश करें।",dOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cOt():t==="fa"?lOt():t==="ar"?uOt():t==="es"?_Ot():t==="hi"?fOt():oOt()}),hOt=()=>"GitHub rejected the push. Make sure your connected account has write access to this repository, then try again.",pOt=()=>"GitHub 拒绝了推送。请确认已连接的账户对此仓库有写入权限,然后重试。",mOt=()=>"GitHub پوش را نپذیرفت. مطمئن شوید حساب متصل اجازهٔ نوشتن در این مخزن را دارد و دوباره تلاش کنید.",gOt=()=>"رفض GitHub رفع التغييرات. تأكد من أن حسابك المتصل يملك صلاحية الكتابة على هذا المستودع، ثم حاول مجددًا.",vOt=()=>"GitHub rechazó el push. Asegúrate de que tu cuenta conectada tiene permiso de escritura en este repositorio y vuelve a intentarlo.",bOt=()=>"GitHub ने पुश अस्वीकार कर दिया। सुनिश्चित करें कि आपके कनेक्टेड खाते के पास इस रिपॉज़िटरी में राइट एक्सेस है, फिर फिर से कोशिश करें।",yOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pOt():t==="fa"?mOt():t==="ar"?gOt():t==="es"?vOt():t==="hi"?bOt():hOt()}),xOt=e=>`GPU × ${e==null?void 0:e.count}`,wOt=e=>`${e==null?void 0:e.count} 个 GPU`,kOt=e=>`${e==null?void 0:e.count} پردازندهٔ گرافیکی`,SOt=e=>`معالج رسومات × ${e==null?void 0:e.count}`,COt=e=>`GPU × ${e==null?void 0:e.count}`,EOt=e=>`GPU × ${e==null?void 0:e.count}`,NOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?wOt(e):t==="fa"?kOt(e):t==="ar"?SOt(e):t==="es"?COt(e):t==="hi"?EOt(e):xOt(e)}),zOt=()=>"has changes",jOt=()=>"有更改",AOt=()=>"دارای تغییر",TOt=()=>"به تغييرات",ROt=()=>"con cambios",MOt=()=>"बदलाव हैं",OOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jOt():t==="fa"?AOt():t==="ar"?TOt():t==="es"?ROt():t==="hi"?MOt():zOt()}),DOt=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}.`,LOt=e=>`此令牌有效,但不会报告能否启动 Jobs;来自 ${e==null?void 0:e.login} 的 OAuth 令牌从不提供该信息。启动仍可能成功。如需最终确认,请从 ${e==null?void 0:e.url} 保存具有写入权限的令牌。`,IOt=e=>`این توکن معتبر است، اما مشخص نمی‌کند که می‌تواند Jobs را اجرا کند؛ توکن‌های OAuth از ${e==null?void 0:e.login} هرگز چنین اطلاعاتی نمی‌دهند. اجراها ممکن است کار کنند. برای بررسی قطعی، یک توکن دارای مجوز نوشتن از ${e==null?void 0:e.url} ذخیره کنید.`,$Ot=e=>`هذا الرمز صالح لكنه لا يبيّن ما إن كان قادرًا على إطلاق المهام؛ ورموز OAuth من ${e==null?void 0:e.login} لا تبيّن ذلك أبدًا. قد ينجح الإطلاق رغم ذلك. للتحقق القاطع، احفظ رمزًا بصلاحية الكتابة من ${e==null?void 0:e.url}.`,BOt=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}.`,POt=e=>`यह टोकन मान्य है पर यह नहीं बताता कि यह Jobs लॉन्च कर सकता है या नहीं; ${e==null?void 0:e.login} से मिले OAuth टोकन कभी नहीं बताते। लॉन्च फिर भी काम कर सकता है। निश्चित जाँच के लिए, ${e==null?void 0:e.url} से एक राइट-स्कोप्ड टोकन सेव करें।`,FOt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?LOt(e):t==="fa"?IOt(e):t==="ar"?$Ot(e):t==="es"?BOt(e):t==="hi"?POt(e):DOt(e)}),HOt=()=>"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.",qOt=()=>"此令牌有效,但无法提交 Hugging Face 任务。请在 Hugging Face 令牌设置中创建具有 Jobs 写入权限的令牌,然后在此处替换。",UOt=()=>"این توکن معتبر است، اما اجازهٔ ارسال کار به Hugging Face را ندارد. در تنظیمات توکن Hugging Face، توکنی با مجوز نوشتن Jobs بسازید و آن را اینجا جایگزین کنید.",GOt=()=>"هذا الرمز صالح لكنه لا يستطيع إرسال مهام Hugging Face. أنشئ رمزًا بصلاحية كتابة المهام في إعدادات رموز Hugging Face، ثم استبدله هنا.",VOt=()=>"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í.",KOt=()=>"यह टोकन मान्य है, पर Hugging Face Jobs सबमिट नहीं कर सकता। Hugging Face टोकन सेटिंग्स में Jobs राइट अनुमति वाला टोकन बनाएं, फिर इसे यहाँ बदलें।",WOt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qOt():t==="fa"?UOt():t==="ar"?GOt():t==="es"?VOt():t==="hi"?KOt():HOt()}),QOt=()=>"Install",XOt=()=>"安装",YOt=()=>"نصب",ZOt=()=>"تثبيت",JOt=()=>"Instalar",eDt=()=>"इंस्टॉल करें",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=>`Adds ${e==null?void 0:e.command} to your terminal, pointing at this app, so the CLI and app are always the same version.`,rDt=e=>`将 ${e==null?void 0:e.command} 添加到终端并指向此应用,使 CLI 和应用始终使用同一版本。`,sDt=e=>`فرمان ${e==null?void 0:e.command} را به ترمینال شما و با اشاره به این برنامه اضافه می‌کند تا CLI و برنامه همیشه یک نسخه باشند.`,iDt=e=>`يضيف ${e==null?void 0:e.command} إلى طرفيتك موجّهًا إلى هذا التطبيق، بحيث تكون واجهة سطر الأوامر والتطبيق دائمًا بالإصدار نفسه.`,aDt=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.`,oDt=e=>`आपके टर्मिनल में ${e==null?void 0:e.command} जोड़ता है, जो इसी ऐप की ओर इशारा करता है, ताकि CLI और ऐप हमेशा एक ही वर्शन के रहें।`,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=e=>`Install the ${e==null?void 0:e.command} command`,uDt=e=>`安装 ${e==null?void 0:e.command} 命令`,_Dt=e=>`نصب فرمان ${e==null?void 0:e.command}`,fDt=e=>`تثبيت أمر ${e==null?void 0:e.command}`,dDt=e=>`Instalar el comando ${e==null?void 0:e.command}`,hDt=e=>`${e==null?void 0:e.command} कमांड इंस्टॉल करें`,pDt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?uDt(e):t==="fa"?_Dt(e):t==="ar"?fDt(e):t==="es"?dDt(e):t==="hi"?hDt(e):lDt(e)}),mDt=()=>"Install GitHub CLI, then run `gh auth login` in your terminal.",gDt=()=>"请安装 GitHub CLI,然后在终端中运行 `gh auth login`。",vDt=()=>"GitHub CLI را نصب کنید و سپس در پایانه `gh auth login` را اجرا کنید.",bDt=()=>"ثبّت واجهة GitHub لسطر الأوامر، ثم نفّذ `gh auth login` في طرفيتك.",yDt=()=>"Instala GitHub CLI y ejecuta `gh auth login` en tu terminal.",xDt=()=>"GitHub CLI इंस्टॉल करें, फिर अपने टर्मिनल में `gh auth login` चलाएं।",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=()=>"Install the new release now instead of waiting for the background update.",SDt=()=>"立即安装新版本,无需等待后台更新。",CDt=()=>"نسخهٔ جدید را اکنون نصب کنید و منتظر به‌روزرسانی پس‌زمینه نمانید.",EDt=()=>"ثبّت الإصدار الجديد الآن بدلًا من انتظار التحديث في الخلفية.",NDt=()=>"Instala la nueva versión ahora en lugar de esperar a la actualización en segundo plano.",zDt=()=>"बैकग्राउंड अपडेट का इंतज़ार करने की बजाय अभी नया रिलीज़ इंस्टॉल करें।",jDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SDt():t==="fa"?CDt():t==="ar"?EDt():t==="es"?NDt():t==="hi"?zDt():kDt()}),ADt=()=>"Discard your unsaved Kubernetes changes?",TDt=()=>"要放弃未保存的 Kubernetes 更改吗?",RDt=()=>"تغییرات ذخیره‌نشدهٔ Kubernetes کنار گذاشته شود؟",MDt=()=>"تجاهل تغييرات Kubernetes غير المحفوظة؟",ODt=()=>"¿Descartar los cambios sin guardar de Kubernetes?",DDt=()=>"आपके सेव न किए गए Kubernetes बदलाव छोड़ें?",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=()=>"Key from",$Dt=()=>"密钥来自",BDt=()=>"کلید از",PDt=()=>"المفتاح من",FDt=()=>"Clave tomada de la",HDt=()=>"की स्रोत",qDt=((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()}),UDt=()=>"Use current kubectl context",GDt=()=>"使用当前 kubectl 上下文",VDt=()=>"استفاده از کانتکست فعلی kubectl",KDt=()=>"استخدام سياق kubectl الحالي",WDt=()=>"Usar el contexto actual de kubectl",QDt=()=>"मौजूदा kubectl कॉन्टेक्स्ट इस्तेमाल करें",XDt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?GDt():t==="fa"?VDt():t==="ar"?KDt():t==="es"?WDt():t==="hi"?QDt():UDt()}),YDt=e=>`Use current context (${e==null?void 0:e.context})`,ZDt=e=>`使用当前上下文(${e==null?void 0:e.context})`,JDt=e=>`استفاده از کانتکست فعلی (${e==null?void 0:e.context})`,eLt=e=>`استخدام السياق الحالي (${e==null?void 0:e.context})`,tLt=e=>`Usar el contexto actual (${e==null?void 0:e.context})`,nLt=e=>`मौजूदा कॉन्टेक्स्ट इस्तेमाल करें (${e==null?void 0:e.context})`,rLt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?ZDt(e):t==="fa"?JDt(e):t==="ar"?eLt(e):t==="es"?tLt(e):t==="hi"?nLt(e):YDt(e)}),sLt=()=>"Language",iLt=()=>"语言",aLt=()=>"زبان",oLt=()=>"اللغة",cLt=()=>"Idioma",lLt=()=>"भाषा",uLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iLt():t==="fa"?aLt():t==="ar"?oLt():t==="es"?cLt():t==="hi"?lLt():sLt()}),_Lt=e=>`Run ${e==null?void 0:e.command} in a terminal to sign in.`,fLt=e=>`在终端中运行 ${e==null?void 0:e.command} 以登录。`,dLt=e=>`برای ورود، ${e==null?void 0:e.command} را در ترمینال اجرا کنید.`,hLt=e=>`نفّذ ${e==null?void 0:e.command} في الطرفية لتسجيل الدخول.`,pLt=e=>`Ejecuta ${e==null?void 0:e.command} en una terminal para iniciar sesión.`,mLt=e=>`साइन इन करने के लिए टर्मिनल में ${e==null?void 0:e.command} चलाएं।`,gLt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fLt(e):t==="fa"?dLt(e):t==="ar"?hLt(e):t==="es"?pLt(e):t==="hi"?mLt(e):_Lt(e)}),vLt=()=>"Make default",bLt=()=>"设为默认值",yLt=()=>"پیش‌فرض شود",xLt=()=>"جعله افتراضيًا",wLt=()=>"Establecer como predeterminado",kLt=()=>"डिफ़ॉल्ट बनाएं",SLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bLt():t==="fa"?yLt():t==="ar"?xLt():t==="es"?wLt():t==="hi"?kLt():vLt()}),CLt=()=>"Modal credentials are set in the process environment. Remove those overrides before replacing the token here.",ELt=()=>"Modal 凭据已在进程环境中设置。请先移除这些覆盖设置,再在此处替换令牌。",NLt=()=>"اعتبارنامه‌های Modal در محیط فرایند تنظیم شده‌اند. پیش از جایگزینی توکن در اینجا، این تنظیمات را حذف کنید.",zLt=()=>"بيانات اعتماد Modal مضبوطة في بيئة العملية. أزِل تلك التجاوزات قبل استبدال الرمز هنا.",jLt=()=>"Las credenciales de Modal están definidas en el entorno del proceso. Elimínalas antes de reemplazar el token aquí.",ALt=()=>"Modal क्रेडेंशियल प्रोसेस एनवायरनमेंट में सेट हैं। यहाँ सेव टोकन बदलने से पहले उन ओवरराइड को हटाएं।",TLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ELt():t==="fa"?NLt():t==="ar"?zLt():t==="es"?jLt():t==="hi"?ALt():CLt()}),RLt=()=>"Replace token ID",MLt=()=>"替换令牌 ID",OLt=()=>"جایگزینی شناسهٔ توکن",DLt=()=>"استبدال معرّف الرمز",LLt=()=>"Reemplazar ID del token",ILt=()=>"टोकन ID बदलें",$Lt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MLt():t==="fa"?OLt():t==="ar"?DLt():t==="es"?LLt():t==="hi"?ILt():RLt()}),BLt=()=>"Replace token secret",PLt=()=>"替换令牌密钥",FLt=()=>"جایگزینی رمز توکن",HLt=()=>"استبدال سرّ الرمز",qLt=()=>"Reemplazar secreto del token",ULt=()=>"टोकन सीक्रेट बदलें",GLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PLt():t==="fa"?FLt():t==="ar"?HLt():t==="es"?qLt():t==="hi"?ULt():BLt()}),VLt=()=>"How to get a Modal token",KLt=()=>"如何获取 Modal 令牌",WLt=()=>"روش دریافت توکن Modal",QLt=()=>"كيفية الحصول على رمز Modal",XLt=()=>"Cómo obtener un token de Modal",YLt=()=>"Modal टोकन कैसे लें",ZLt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?KLt():t==="fa"?WLt():t==="ar"?QLt():t==="es"?XLt():t==="hi"?YLt():VLt()}),JLt=()=>"Token ID",eIt=()=>"令牌 ID",tIt=()=>"شناسهٔ توکن",nIt=()=>"معرّف الرمز",rIt=()=>"ID del token",sIt=()=>"टोकन ID",iIt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eIt():t==="fa"?tIt():t==="ar"?nIt():t==="es"?rIt():t==="hi"?sIt():JLt()}),aIt=()=>"Token secret",oIt=()=>"令牌密钥",cIt=()=>"رمز توکن",lIt=()=>"سرّ الرمز",uIt=()=>"Secreto del token",_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=e=>`${e==null?void 0:e.count} models available — ${e==null?void 0:e.models}`,hIt=e=>`${e==null?void 0:e.count} 个模型可用 — ${e==null?void 0:e.models}`,pIt=e=>`${e==null?void 0:e.count} مدل در دسترس — ${e==null?void 0:e.models}`,mIt=e=>`النماذج المتاحة: ${e==null?void 0:e.count} — ${e==null?void 0:e.models}`,gIt=e=>`Modelos disponibles (${e==null?void 0:e.count}): ${e==null?void 0:e.models}`,vIt=e=>`${e==null?void 0:e.count} मॉडल उपलब्ध — ${e==null?void 0:e.models}`,bIt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?hIt(e):t==="fa"?pIt(e):t==="ar"?mIt(e):t==="es"?gIt(e):t==="hi"?vIt(e):dIt(e)}),yIt=e=>`Needs ${e==null?void 0:e.tool}`,xIt=e=>`需要 ${e==null?void 0:e.tool}`,wIt=e=>`به ${e==null?void 0:e.tool} نیاز دارد`,kIt=e=>`يحتاج إلى ${e==null?void 0:e.tool}`,SIt=e=>`Requiere ${e==null?void 0:e.tool}`,CIt=e=>`${e==null?void 0:e.tool} की ज़रूरत है`,EIt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xIt(e):t==="fa"?wIt(e):t==="ar"?kIt(e):t==="es"?SIt(e):t==="hi"?CIt(e):yIt(e)}),NIt=()=>"Needs tools",zIt=()=>"缺少工具",jIt=()=>"به ابزارها نیاز دارد",AIt=()=>"يحتاج إلى أدوات",TIt=()=>"Requiere herramientas",RIt=()=>"टूल की ज़रूरत है",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=e=>`New runs use ${e==null?void 0:e.destination} unless another backend is specified.`,DIt=e=>`除非另行指定后端,否则新运行将使用${e==null?void 0:e.destination}。`,LIt=e=>`اجراهای جدید از ${e==null?void 0:e.destination} استفاده می‌کنند، مگر اینکه سامانهٔ دیگری مشخص شود.`,IIt=e=>`تستخدم عمليات التشغيل الجديدة ${e==null?void 0:e.destination} ما لم تُحدَّد بيئة تنفيذ أخرى.`,$It=e=>`Las nuevas ejecuciones usan ${e==null?void 0:e.destination}, salvo que se indique otro backend.`,BIt=e=>`जब तक कोई और बैकएंड न बताया जाए, नए रन ${e==null?void 0:e.destination} इस्तेमाल करते हैं।`,PIt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?DIt(e):t==="fa"?LIt(e):t==="ar"?IIt(e):t==="es"?$It(e):t==="hi"?BIt(e):OIt(e)}),FIt=()=>"New runs use SSH; choose a host when launching.",HIt=()=>"新运行将使用 SSH;启动时请选择主机。",qIt=()=>"اجراهای جدید از SSH استفاده می‌کنند؛ هنگام اجرا یک میزبان انتخاب کنید.",UIt=()=>"تستخدم عمليات التشغيل الجديدة SSH؛ اختر مضيفًا عند الإطلاق.",GIt=()=>"Las nuevas ejecuciones usan SSH; elige un host al lanzarlas.",VIt=()=>"नए रन SSH इस्तेमाल करते हैं; लॉन्च करते समय एक होस्ट चुनें।",KIt=((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()}),WIt=()=>"New token",QIt=()=>"新令牌",XIt=()=>"توکن جدید",YIt=()=>"رمز جديد",ZIt=()=>"Nuevo token",JIt=()=>"नया टोकन",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=()=>"No default flavor",n$t=()=>"不设默认配置",r$t=()=>"بدون پیکربندی پیش‌فرض",s$t=()=>"لا يوجد تكوين افتراضي للموارد",i$t=()=>"Sin opción predeterminada",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=()=>"none",l$t=()=>"无",u$t=()=>"هیچ‌کدام",_$t=()=>"لا شيء",f$t=()=>"ninguno",d$t=()=>"कोई नहीं",jS=((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=()=>"Not connected",p$t=()=>"未连接",m$t=()=>"متصل نیست",g$t=()=>"غير متصل",v$t=()=>"No conectado",b$t=()=>"कनेक्टेड नहीं",JL=((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()}),y$t=()=>"not found on PATH",x$t=()=>"在 PATH 中未找到",w$t=()=>"در PATH پیدا نشد",k$t=()=>"غير موجود في PATH",S$t=()=>"no se encontró en el PATH",C$t=()=>"PATH पर नहीं मिला",E$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x$t():t==="fa"?w$t():t==="ar"?k$t():t==="es"?S$t():t==="hi"?C$t():y$t()}),N$t=e=>`${e==null?void 0:e.context} (not in kubeconfig)`,z$t=e=>`${e==null?void 0:e.context}(不在 kubeconfig 中)`,j$t=e=>`${e==null?void 0:e.context} (در kubeconfig نیست)`,A$t=e=>`${e==null?void 0:e.context} (ليس في kubeconfig)`,T$t=e=>`${e==null?void 0:e.context} (no está en kubeconfig)`,R$t=e=>`${e==null?void 0:e.context} (kubeconfig में नहीं)`,M$t=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?z$t(e):t==="fa"?j$t(e):t==="ar"?A$t(e):t==="es"?T$t(e):t==="hi"?R$t(e):N$t(e)}),O$t=()=>"not initialized",D$t=()=>"尚未初始化",L$t=()=>"راه‌اندازی نشده",I$t=()=>"غير مهيّأ",$$t=()=>"sin inicializar",B$t=()=>"शुरू नहीं किया गया",P$t=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?D$t():t==="fa"?L$t():t==="ar"?I$t():t==="es"?$$t():t==="hi"?B$t():O$t()}),F$t=()=>"Not set",H$t=()=>"未设置",q$t=()=>"تنظیم نشده",U$t=()=>"غير مضبوط",G$t=()=>"Sin definir",V$t=()=>"सेट नहीं",B3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?H$t():t==="fa"?q$t():t==="ar"?U$t():t==="es"?G$t():t==="hi"?V$t():F$t()}),K$t=()=>"OAuth (subscription login)",W$t=()=>"OAuth(订阅登录)",Q$t=()=>"OAuth (ورود با اشتراک)",X$t=()=>"OAuth (تسجيل دخول الاشتراك)",Y$t=()=>"OAuth (inicio de sesión con suscripción)",Z$t=()=>"OAuth (सब्सक्रिप्शन लॉगिन)",J$t=((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()}),eBt=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.`,tBt=e=>`旧副本保留在另一磁盘的 ${e==null?void 0:e.path}。确认一切正常后即可删除。`,nBt=e=>`نسخهٔ قدیمی در ${e==null?void 0:e.path} روی دیسکی دیگر باقی ماند. پس از اطمینان از درست کار کردن همه‌چیز می‌توانید آن را حذف کنید.`,rBt=e=>`تُركت النسخة القديمة في ${e==null?void 0:e.path} على قرص مختلف. يمكنك حذفها بعد التأكد من أن كل شيء يعمل.`,sBt=e=>`La copia anterior se dejó en ${e==null?void 0:e.path}, en otro disco. Puedes eliminarla cuando confirmes que todo funciona.`,iBt=e=>`पुरानी कॉपी एक अलग डिस्क पर ${e==null?void 0:e.path} पर छोड़ दी गई थी। सब कुछ ठीक होने की पुष्टि के बाद आप इसे हटा सकते हैं।`,aBt=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?tBt(e):t==="fa"?nBt(e):t==="ar"?rBt(e):t==="es"?sBt(e):t==="hi"?iBt(e):eBt(e)}),oBt=()=>"Setting up…",cBt=()=>"正在设置…",lBt=()=>"در حال راه‌اندازی…",uBt=()=>"جارٍ الإعداد…",_Bt=()=>"Configurando…",fBt=()=>"सेट अप हो रहा है…",dBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cBt():t==="fa"?lBt():t==="ar"?uBt():t==="es"?_Bt():t==="hi"?fBt():oBt()}),hBt=()=>"Account",pBt=()=>"账户",mBt=()=>"حساب",gBt=()=>"الحساب",vBt=()=>"Cuenta",bBt=()=>"खाता",AS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pBt():t==="fa"?mBt():t==="ar"?gBt():t==="es"?vBt():t==="hi"?bBt():hBt()}),yBt=()=>"Add one with",xBt=()=>"使用以下命令添加:",wBt=()=>"یکی با این فرمان اضافه کنید:",kBt=()=>"أضِف واحدًا عبر",SBt=()=>"Añade una con",CBt=()=>"इसके साथ एक जोड़ें",EBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xBt():t==="fa"?wBt():t==="ar"?kBt():t==="es"?SBt():t==="hi"?CBt():yBt()}),NBt=()=>"Add variable",zBt=()=>"添加变量",jBt=()=>"افزودن متغیر",ABt=()=>"إضافة متغيّر",TBt=()=>"Añadir variable",RBt=()=>"वेरिएबल जोड़ें",MBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zBt():t==="fa"?jBt():t==="ar"?ABt():t==="es"?TBt():t==="hi"?RBt():NBt()}),OBt=()=>"Agent models",DBt=()=>"智能体模型",LBt=()=>"مدل‌های عامل",IBt=()=>"نماذج الوكيل",$Bt=()=>"Modelos de los agentes",BBt=()=>"एजेंट मॉडल",PBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?DBt():t==="fa"?LBt():t==="ar"?IBt():t==="es"?$Bt():t==="hi"?BBt():OBt()}),FBt=()=>"Anonymous usage analytics",HBt=()=>"匿名使用情况分析",qBt=()=>"تحلیل ناشناس استفاده",UBt=()=>"تحليلات استخدام مجهولة الهوية",GBt=()=>"Estadísticas de uso anónimas",VBt=()=>"अनाम उपयोग एनालिटिक्स",oj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?HBt():t==="fa"?qBt():t==="ar"?UBt():t==="es"?GBt():t==="hi"?VBt():FBt()}),KBt=()=>"Auth",WBt=()=>"身份验证",QBt=()=>"احراز هویت",XBt=()=>"المصادقة",YBt=()=>"Autenticación",ZBt=()=>"ऑथ",JBt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WBt():t==="fa"?QBt():t==="ar"?XBt():t==="es"?YBt():t==="hi"?ZBt():KBt()}),ePt=()=>"Authentication",tPt=()=>"身份验证",nPt=()=>"احراز هویت",rPt=()=>"المصادقة",sPt=()=>"Autenticación",iPt=()=>"प्रमाणीकरण",eI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tPt():t==="fa"?nPt():t==="ar"?rPt():t==="es"?sPt():t==="hi"?iPt():ePt()}),aPt=()=>"Back to Compute",oPt=()=>"返回算力设置",cPt=()=>"بازگشت به رایانش",lPt=()=>"العودة إلى الحوسبة",uPt=()=>"Volver a Cómputo",_Pt=()=>"कंप्यूट पर वापस जाएं",tI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oPt():t==="fa"?cPt():t==="ar"?lPt():t==="es"?uPt():t==="hi"?_Pt():aPt()}),fPt=()=>"Backend",dPt=()=>"后端",hPt=()=>"بک‌اند",pPt=()=>"بيئة التنفيذ",mPt=()=>"Backend",gPt=()=>"बैकएंड",vPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dPt():t==="fa"?hPt():t==="ar"?pPt():t==="es"?mPt():t==="hi"?gPt():fPt()}),bPt=()=>"Baseline",yPt=()=>"基线",xPt=()=>"خط مبنا",wPt=()=>"الأساس المرجعي",kPt=()=>"Rama base",SPt=()=>"बेसलाइन",CPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yPt():t==="fa"?xPt():t==="ar"?wPt():t==="es"?kPt():t==="hi"?SPt():bPt()}),EPt=()=>"Binary",NPt=()=>"可执行文件",zPt=()=>"فایل اجرایی",jPt=()=>"الملف التنفيذي",APt=()=>"Binario",TPt=()=>"बाइनरी",RPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NPt():t==="fa"?zPt():t==="ar"?jPt():t==="es"?APt():t==="hi"?TPt():EPt()}),MPt=()=>"Cancel",OPt=()=>"取消",DPt=()=>"لغو",LPt=()=>"إلغاء",IPt=()=>"Cancelar",$Pt=()=>"रद्द करें",df=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OPt():t==="fa"?DPt():t==="ar"?LPt():t==="es"?IPt():t==="hi"?$Pt():MPt()}),BPt=()=>"Cancel new variable",PPt=()=>"取消新变量",FPt=()=>"لغو متغیر جدید",HPt=()=>"إلغاء المتغيّر الجديد",qPt=()=>"Cancelar nueva variable",UPt=()=>"नया वेरिएबल रद्द करें",GPt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PPt():t==="fa"?FPt():t==="ar"?HPt():t==="es"?qPt():t==="hi"?UPt():BPt()}),VPt=()=>"Checking compute targets…",KPt=()=>"正在检查算力目标…",WPt=()=>"در حال بررسی مقصدهای رایانشی…",QPt=()=>"جارٍ التحقق من أهداف الحوسبة…",XPt=()=>"Comprobando destinos de cómputo…",YPt=()=>"कंप्यूट टारगेट जाँचे जा रहे हैं…",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=()=>"Checking kubectl…",eFt=()=>"正在检查 kubectl…",tFt=()=>"در حال بررسی kubectl…",nFt=()=>"جارٍ التحقق من kubectl…",rFt=()=>"Comprobando kubectl…",sFt=()=>"kubectl जाँचा जा रहा है…",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():JPt()}),aFt=()=>"Checking Modal…",oFt=()=>"正在检查 Modal…",cFt=()=>"در حال بررسی Modal…",lFt=()=>"جارٍ التحقق من Modal…",uFt=()=>"Comprobando Modal…",_Ft=()=>"Modal जाँचा जा रहा है…",fFt=((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()}),dFt=()=>"Choose a preset flavor",hFt=()=>"选择预设规格",pFt=()=>"یک پیکربندی آماده انتخاب کنید",mFt=()=>"اختر تكوينًا محددًا مسبقًا للموارد",gFt=()=>"Elige una opción predefinida",vFt=()=>"एक प्रीसेट फ़्लेवर चुनें",cj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hFt():t==="fa"?pFt():t==="ar"?mFt():t==="es"?gFt():t==="hi"?vFt():dFt()}),bFt=()=>"cluster default",yFt=()=>"集群默认值",xFt=()=>"پیش‌فرض خوشه",wFt=()=>"افتراضي العنقود",kFt=()=>"valor predeterminado del clúster",SFt=()=>"क्लस्टर डिफ़ॉल्ट",lj=((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()}),CFt=()=>"cluster default (e.g. 4h, 30m)",EFt=()=>"集群默认值(例如 4h、30m)",NFt=()=>"پیش‌فرض خوشه (مثلاً 4h یا 30m)",zFt=()=>"افتراضي العنقود (مثل 4h أو 30m)",jFt=()=>"valor predeterminado del clúster (p. ej., 4h, 30m)",AFt=()=>"क्लस्टर डिफ़ॉल्ट (जैसे 4h, 30m)",TFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EFt():t==="fa"?NFt():t==="ar"?zFt():t==="es"?jFt():t==="hi"?AFt():CFt()}),RFt=()=>"Cluster unreachable",MFt=()=>"无法连接集群",OFt=()=>"خوشه در دسترس نیست",DFt=()=>"تعذّر الوصول إلى العنقود",LFt=()=>"Clúster inaccesible",IFt=()=>"क्लस्टर तक नहीं पहुँचा जा सका",$Ft=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?MFt():t==="fa"?OFt():t==="ar"?DFt():t==="es"?LFt():t==="hi"?IFt():RFt()}),BFt=()=>"Compute",PFt=()=>"算力",FFt=()=>"رایانش",HFt=()=>"الحوسبة",qFt=()=>"Cómputo",UFt=()=>"कंप्यूट",nI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?PFt():t==="fa"?FFt():t==="ar"?HFt():t==="es"?qFt():t==="hi"?UFt():BFt()}),GFt=()=>"Connect compute backends and choose where new runs execute.",VFt=()=>"连接算力后端,并选择新运行的执行位置。",KFt=()=>"backendهای رایانشی را متصل و محل اجرای کارهای جدید را انتخاب کنید.",WFt=()=>"اربط بيئات التنفيذ واختر أين تُنفَّذ عمليات التشغيل الجديدة.",QFt=()=>"Conecta backends de cómputo y elige dónde se lanzan las nuevas ejecuciones.",XFt=()=>"कंप्यूट बैकएंड कनेक्ट करें और चुनें कि नए रन कहाँ चलेंगे।",YFt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?VFt():t==="fa"?KFt():t==="ar"?WFt():t==="es"?QFt():t==="hi"?XFt():GFt()}),ZFt=()=>"Connected",JFt=()=>"已连接",eHt=()=>"متصل",tHt=()=>"متصل",nHt=()=>"Conectado",rHt=()=>"कनेक्टेड",sHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?JFt():t==="fa"?eHt():t==="ar"?tHt():t==="es"?nHt():t==="hi"?rHt():ZFt()}),iHt=()=>"Context",aHt=()=>"上下文",oHt=()=>"زمینه",cHt=()=>"السياق",lHt=()=>"Contexto",uHt=()=>"कॉन्टेक्स्ट",_Ht=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aHt():t==="fa"?oHt():t==="ar"?cHt():t==="es"?lHt():t==="hi"?uHt():iHt()}),fHt=()=>"Current",dHt=()=>"当前",hHt=()=>"فعلی",pHt=()=>"الحالي",mHt=()=>"Actual",gHt=()=>"मौजूदा",vHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dHt():t==="fa"?hHt():t==="ar"?pHt():t==="es"?mHt():t==="hi"?gHt():fHt()}),bHt=()=>"Currently off:",yHt=()=>"当前已关闭:",xHt=()=>"اکنون خاموش است:",wHt=()=>"معطّل حاليًا:",kHt=()=>"Desactivado actualmente:",SHt=()=>"फ़िलहाल बंद:",CHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yHt():t==="fa"?xHt():t==="ar"?wHt():t==="es"?kHt():t==="hi"?SHt():bHt()}),EHt=()=>"Custom flavor",NHt=()=>"自定义规格",zHt=()=>"پیکربندی سفارشی",jHt=()=>"تكوين موارد مخصّص",AHt=()=>"Opción personalizada",THt=()=>"कस्टम फ़्लेवर",RHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NHt():t==="fa"?zHt():t==="ar"?jHt():t==="es"?AHt():t==="hi"?THt():EHt()}),MHt=()=>"Custom flavor…",OHt=()=>"自定义规格…",DHt=()=>"پیکربندی سفارشی…",LHt=()=>"تكوين موارد مخصّص…",IHt=()=>"Opción personalizada…",$Ht=()=>"कस्टम फ़्लेवर…",BHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OHt():t==="fa"?DHt():t==="ar"?LHt():t==="es"?IHt():t==="hi"?$Ht():MHt()}),PHt=()=>"Data directory",FHt=()=>"数据目录",HHt=()=>"پوشهٔ داده",qHt=()=>"دليل البيانات",UHt=()=>"Directorio de datos",GHt=()=>"डेटा डायरेक्टरी",VHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FHt():t==="fa"?HHt():t==="ar"?qHt():t==="es"?UHt():t==="hi"?GHt():PHt()}),KHt=()=>"default",WHt=()=>"默认",QHt=()=>"پیش‌فرض",XHt=()=>"افتراضي",YHt=()=>"predeterminado",ZHt=()=>"डिफ़ॉल्ट",JHt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WHt():t==="fa"?QHt():t==="ar"?XHt():t==="es"?YHt():t==="hi"?ZHt():KHt()}),eqt=()=>"Default",tqt=()=>"默认",nqt=()=>"پیش‌فرض",rqt=()=>"الافتراضي",sqt=()=>"Predeterminado",iqt=()=>"डिफ़ॉल्ट",rI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tqt():t==="fa"?nqt():t==="ar"?rqt():t==="es"?sqt():t==="hi"?iqt():eqt()}),aqt=()=>"Default destination",oqt=()=>"默认目标",cqt=()=>"مقصد پیش‌فرض",lqt=()=>"الوجهة الافتراضية",uqt=()=>"Destino predeterminado",_qt=()=>"डिफ़ॉल्ट गंतव्य",fqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oqt():t==="fa"?cqt():t==="ar"?lqt():t==="es"?uqt():t==="hi"?_qt():aqt()}),dqt=()=>"Detecting hardware…",hqt=()=>"正在检测硬件…",pqt=()=>"در حال شناسایی سخت‌افزار…",mqt=()=>"جارٍ اكتشاف العتاد…",gqt=()=>"Detectando hardware…",vqt=()=>"हार्डवेयर पहचाना जा रहा है…",bqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hqt():t==="fa"?pqt():t==="ar"?mqt():t==="es"?gqt():t==="hi"?vqt():dqt()}),yqt=()=>"Detecting harnesses…",xqt=()=>"正在检测智能体工具…",wqt=()=>"در حال شناسایی ابزارهای عامل…",kqt=()=>"جارٍ اكتشاف أدوات البرمجة…",Sqt=()=>"Detectando agentes…",Cqt=()=>"हार्नेस पहचाने जा रहे हैं…",Eqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xqt():t==="fa"?wqt():t==="ar"?kqt():t==="es"?Sqt():t==="hi"?Cqt():yqt()}),Nqt=()=>"Disabling syncing stops automatic pushes. Compute continues to use direct source snapshots. This does not delete the GitHub repository or code already pushed.",zqt=()=>"关闭同步会停止自动推送。算力执行仍使用直接的源代码快照。此操作不会删除 GitHub 仓库或已推送的代码。",jqt=()=>"خاموش کردن همگام‌سازی، push خودکار را متوقف می‌کند. رایانش همچنان از snapshot مستقیم منبع استفاده می‌کند. این کار مخزن GitHub یا کدهای ازپیش pushشده را حذف نمی‌کند.",Aqt=()=>"يوقف تعطيل المزامنة عمليات الرفع التلقائية. تواصل الحوسبة استخدام لقطات المصدر المباشرة. لا يحذف هذا مستودع GitHub أو الشيفرة التي رُفعت إليه مسبقًا.",Tqt=()=>"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ó.",Rqt=()=>"सिंकिंग बंद करने से ऑटोमैटिक पुश रुक जाते हैं। कंप्यूट सीधे सोर्स स्नैपशॉट का इस्तेमाल करता रहेगा। इससे GitHub रिपॉज़िटरी या पहले से पुश किया गया कोड नहीं मिटता।",Mqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zqt():t==="fa"?jqt():t==="ar"?Aqt():t==="es"?Tqt():t==="hi"?Rqt():Nqt()}),Oqt=()=>"Effective URL",Dqt=()=>"实际使用的网址",Lqt=()=>"نشانی مؤثر",Iqt=()=>"الرابط الفعّال",$qt=()=>"URL efectiva",Bqt=()=>"प्रभावी URL",Pqt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dqt():t==="fa"?Lqt():t==="ar"?Iqt():t==="es"?$qt():t==="hi"?Bqt():Oqt()}),Fqt=()=>"Enable GitHub syncing for new projects",Hqt=()=>"为新项目启用 GitHub 同步",qqt=()=>"فعال‌سازی همگام‌سازی GitHub برای پروژه‌های جدید",Uqt=()=>"تفعيل مزامنة GitHub للمشاريع الجديدة",Gqt=()=>"Activar la sincronización con GitHub en proyectos nuevos",Vqt=()=>"नए प्रोजेक्ट के लिए GitHub सिंकिंग चालू करें",uj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hqt():t==="fa"?qqt():t==="ar"?Uqt():t==="es"?Gqt():t==="hi"?Vqt():Fqt()}),Kqt=()=>"Environment",Wqt=()=>"环境",Qqt=()=>"محیط",Xqt=()=>"البيئة",Yqt=()=>"Entorno",Zqt=()=>"एनवायरनमेंट",sI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wqt():t==="fa"?Qqt():t==="ar"?Xqt():t==="es"?Yqt():t==="hi"?Zqt():Kqt()}),Jqt=()=>"Failed",eUt=()=>"失败",tUt=()=>"ناموفق",nUt=()=>"فشل",rUt=()=>"Error",sUt=()=>"विफल",TS=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eUt():t==="fa"?tUt():t==="ar"?nUt():t==="es"?rUt():t==="hi"?sUt():Jqt()}),iUt=()=>"General",aUt=()=>"常规",oUt=()=>"عمومی",cUt=()=>"عام",lUt=()=>"General",uUt=()=>"सामान्य",_Ut=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aUt():t==="fa"?oUt():t==="ar"?cUt():t==="es"?lUt():t==="hi"?uUt():iUt()}),fUt=()=>"GitHub publishing",dUt=()=>"GitHub 发布",hUt=()=>"انتشار در GitHub",pUt=()=>"النشر على GitHub",mUt=()=>"Publicación en GitHub",gUt=()=>"GitHub प्रकाशन",vUt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dUt():t==="fa"?hUt():t==="ar"?pUt():t==="es"?mUt():t==="hi"?gUt():fUt()}),bUt=()=>"Git token",yUt=()=>"Git 令牌",xUt=()=>"توکن Git",wUt=()=>"رمز Git",kUt=()=>"Token de Git",SUt=()=>"Git टोकन",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=()=>"Harnesses",NUt=()=>"智能体工具",zUt=()=>"ابزارهای عامل",jUt=()=>"أدوات البرمجة",AUt=()=>"Agentes",TUt=()=>"हार्नेस",P3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?NUt():t==="fa"?zUt():t==="ar"?jUt():t==="es"?AUt():t==="hi"?TUt():EUt()}),RUt=()=>"hf_…",MUt=()=>"hf_…",OUt=()=>"hf_…",DUt=()=>"hf_…",LUt=()=>"hf_…",IUt=()=>"hf_…",$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=()=>"HF_TOKEN is set in the environment and overrides any token saved here.",PUt=()=>"环境中已设置 HF_TOKEN,它会覆盖此处保存的令牌。",FUt=()=>"مقدار HF_TOKEN در محیط تنظیم شده و هر توکن ذخیره‌شده در اینجا را بازنویسی می‌کند.",HUt=()=>"‏HF_TOKEN مضبوط في البيئة ويتجاوز أي رمز محفوظ هنا.",qUt=()=>"HF_TOKEN está definido en el entorno y tiene prioridad sobre cualquier token guardado aquí.",UUt=()=>"HF_TOKEN एनवायरनमेंट में सेट है और यहाँ सेव किसी भी टोकन को ओवरराइड करता है।",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=()=>"Initialize Git",KUt=()=>"初始化 Git",WUt=()=>"راه‌اندازی Git",QUt=()=>"تهيئة Git",XUt=()=>"Inicializar Git",YUt=()=>"Git शुरू करें",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=()=>"Install",eGt=()=>"安装",tGt=()=>"نصب",nGt=()=>"تثبيت",rGt=()=>"Instalar",sGt=()=>"इंस्टॉल करें",iI=((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()}),iGt=()=>"Install broken",aGt=()=>"安装损坏",oGt=()=>"نصب خراب است",cGt=()=>"التثبيت معطوب",lGt=()=>"Instalación dañada",uGt=()=>"इंस्टॉल खराब है",_Gt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?aGt():t==="fa"?oGt():t==="ar"?cGt():t==="es"?lGt():t==="hi"?uGt():iGt()}),fGt=()=>"Install GitHub CLI",dGt=()=>"安装 GitHub CLI",hGt=()=>"نصب GitHub CLI",pGt=()=>"تثبيت واجهة GitHub لسطر الأوامر",mGt=()=>"Instalar GitHub CLI",gGt=()=>"GitHub CLI इंस्टॉल करें",vGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dGt():t==="fa"?hGt():t==="ar"?pGt():t==="es"?mGt():t==="hi"?gGt():fGt()}),bGt=()=>"Install updates automatically",yGt=()=>"自动安装更新",xGt=()=>"نصب خودکار به‌روزرسانی‌ها",wGt=()=>"تثبيت التحديثات تلقائيًا",kGt=()=>"Instalar actualizaciones automáticamente",SGt=()=>"अपडेट अपने आप इंस्टॉल करें",_j=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yGt():t==="fa"?xGt():t==="ar"?wGt():t==="es"?kGt():t==="hi"?SGt():bGt()}),CGt=()=>"Instance history",EGt=()=>"实例历史",NGt=()=>"تاریخچهٔ نمونه‌ها",zGt=()=>"سجل المثيلات",jGt=()=>"Historial de instancias",AGt=()=>"इंस्टेंस इतिहास",TGt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?EGt():t==="fa"?NGt():t==="ar"?zGt():t==="es"?jGt():t==="hi"?AGt():CGt()}),RGt=()=>"Invalid Token",MGt=()=>"令牌无效",OGt=()=>"توکن نامعتبر",DGt=()=>"رمز غير صالح",LGt=()=>"Token no válido",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=()=>"Jobs / Dashboard URL",PGt=()=>"Jobs / 控制台网址",FGt=()=>"نشانی Jobs / داشبورد",HGt=()=>"رابط المهام / لوحة التحكم",qGt=()=>"URL de jobs / dashboard",UGt=()=>"Jobs / डैशबोर्ड URL",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=()=>"kubectl not found",KGt=()=>"未找到 kubectl",WGt=()=>"kubectl پیدا نشد",QGt=()=>"لم يُعثر على kubectl",XGt=()=>"No se encontró kubectl",YGt=()=>"kubectl नहीं मिला",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=()=>"Latest",eVt=()=>"最新版本",tVt=()=>"جدیدترین",nVt=()=>"الأحدث",rVt=()=>"Última",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=()=>"Loading…",oVt=()=>"正在加载…",cVt=()=>"در حال بارگیری…",lVt=()=>"جارٍ التحميل…",uVt=()=>"Cargando…",_Vt=()=>"लोड हो रहा है…",Qu=((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()}),fVt=()=>"Loading Ray settings…",dVt=()=>"正在加载 Ray 设置…",hVt=()=>"در حال بارگیری تنظیمات Ray…",pVt=()=>"جارٍ تحميل إعدادات Ray…",mVt=()=>"Cargando configuración de Ray…",gVt=()=>"Ray सेटिंग्स लोड हो रही हैं…",vVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dVt():t==="fa"?hVt():t==="ar"?pVt():t==="es"?mVt():t==="hi"?gVt():fVt()}),bVt=()=>"Loading slurm settings…",yVt=()=>"正在加载 Slurm 设置…",xVt=()=>"در حال بارگیری تنظیمات Slurm…",wVt=()=>"جارٍ تحميل إعدادات slurm…",kVt=()=>"Cargando configuración de Slurm…",SVt=()=>"Slurm सेटिंग्स लोड हो रही हैं…",CVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?yVt():t==="fa"?xVt():t==="ar"?wVt():t==="es"?kVt():t==="hi"?SVt():bVt()}),EVt=()=>"Loading status…",NVt=()=>"正在加载状态…",zVt=()=>"در حال بارگیری وضعیت…",jVt=()=>"جارٍ تحميل الحالة…",AVt=()=>"Cargando estado…",TVt=()=>"स्थिति लोड हो रही है…",RVt=((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()}),MVt=()=>"Local only",OVt=()=>"仅本地",DVt=()=>"فقط محلی",LVt=()=>"محلي فقط",IVt=()=>"Solo local",$Vt=()=>"केवल लोकल",BVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?OVt():t==="fa"?DVt():t==="ar"?LVt():t==="es"?IVt():t==="hi"?$Vt():MVt()}),PVt=()=>"Local repository",FVt=()=>"本地仓库",HVt=()=>"مخزن محلی",qVt=()=>"مستودع محلي",UVt=()=>"Repositorio local",GVt=()=>"लोकल रिपॉज़िटरी",VVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?FVt():t==="fa"?HVt():t==="ar"?qVt():t==="es"?UVt():t==="hi"?GVt():PVt()}),KVt=()=>"Login node",WVt=()=>"登录节点",QVt=()=>"گرهٔ ورود",XVt=()=>"عقدة الدخول",YVt=()=>"Nodo de acceso",ZVt=()=>"लॉगिन नोड",JVt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?WVt():t==="fa"?QVt():t==="ar"?XVt():t==="es"?YVt():t==="hi"?ZVt():KVt()}),eKt=()=>"Make GitHub syncing the default?",tKt=()=>"将 GitHub 同步设为默认值?",nKt=()=>"همگام‌سازی GitHub پیش‌فرض شود؟",rKt=()=>"جعل مزامنة GitHub افتراضية؟",sKt=()=>"¿Activar la sincronización con GitHub de forma predeterminada?",iKt=()=>"GitHub सिंकिंग को डिफ़ॉल्ट बनाएं?",aKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tKt():t==="fa"?nKt():t==="ar"?rKt():t==="es"?sKt():t==="hi"?iKt():eKt()}),oKt=()=>"Missing bash/tar",cKt=()=>"缺少 bash/tar",lKt=()=>"bash/tar موجود نیست",uKt=()=>"‏bash/tar مفقودان",_Kt=()=>"Falta bash/tar",fKt=()=>"bash/tar गुम है",dKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cKt():t==="fa"?lKt():t==="ar"?uKt():t==="es"?_Kt():t==="hi"?fKt():oKt()}),hKt=()=>"More compute options",pKt=()=>"更多算力选项",mKt=()=>"گزینه‌های رایانشی بیشتر",gKt=()=>"خيارات حوسبة إضافية",vKt=()=>"Más opciones de cómputo",bKt=()=>"और कंप्यूट विकल्प",yKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pKt():t==="fa"?mKt():t==="ar"?gKt():t==="es"?vKt():t==="hi"?bKt():hKt()}),xKt=()=>"Move failed:",wKt=()=>"移动失败:",kKt=()=>"انتقال ناموفق بود:",SKt=()=>"فشل النقل:",CKt=()=>"Error al mover:",EKt=()=>"स्थानांतरण विफल:",NKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wKt():t==="fa"?kKt():t==="ar"?SKt():t==="es"?CKt():t==="hi"?EKt():xKt()}),zKt=()=>"Moved. orx is now using the new location.",jKt=()=>"已移动。orx 现在使用新位置。",AKt=()=>"منتقل شد. orx اکنون از محل جدید استفاده می‌کند.",TKt=()=>"تم النقل. يستخدم orx الآن الموقع الجديد.",RKt=()=>"Movido. orx ya usa la nueva ubicación.",MKt=()=>"स्थानांतरित हो गया। orx अब नए स्थान का उपयोग कर रहा है।",OKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jKt():t==="fa"?AKt():t==="ar"?TKt():t==="es"?RKt():t==="hi"?MKt():zKt()}),DKt=()=>"Namespace",LKt=()=>"命名空间",IKt=()=>"فضای نام",$Kt=()=>"مساحة الأسماء",BKt=()=>"Namespace",PKt=()=>"नेमस्पेस",FKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LKt():t==="fa"?IKt():t==="ar"?$Kt():t==="es"?BKt():t==="hi"?PKt():DKt()}),HKt=()=>"New location",qKt=()=>"新位置",UKt=()=>"محل جدید",GKt=()=>"الموقع الجديد",VKt=()=>"Nueva ubicación",KKt=()=>"नया स्थान",WKt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qKt():t==="fa"?UKt():t==="ar"?GKt():t==="es"?VKt():t==="hi"?KKt():HKt()}),QKt=()=>"New releases are downloaded and installed in the background. Turning this off keeps the notice but leaves the install to you.",XKt=()=>"新版本会在后台下载并安装。关闭后仍会显示通知,但需要手动安装。",YKt=()=>"نسخه‌های جدید در پس‌زمینه دریافت و نصب می‌شوند. خاموش کردن این گزینه اعلان را نگه می‌دارد، اما نصب را به شما می‌سپارد.",ZKt=()=>"تُنزَّل الإصدارات الجديدة وتُثبَّت في الخلفية. إيقاف هذا يبقي الإشعار لكنه يترك التثبيت لك.",JKt=()=>"Las nuevas versiones se descargan e instalan en segundo plano. Si lo desactivas, verás el aviso, pero tendrás que instalarlas tú.",eWt=()=>"नए रिलीज़ बैकग्राउंड में डाउनलोड और इंस्टॉल होते हैं। इसे बंद करने पर सूचना बनी रहेगी, पर इंस्टॉल करना आप पर निर्भर होगा।",tWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XKt():t==="fa"?YKt():t==="ar"?ZKt():t==="es"?JKt():t==="hi"?eWt():QKt()}),nWt=()=>"New variable key",rWt=()=>"新变量键名",sWt=()=>"کلید متغیر جدید",iWt=()=>"مفتاح المتغيّر الجديد",aWt=()=>"Nombre de la nueva variable",oWt=()=>"नई वेरिएबल की",cWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rWt():t==="fa"?sWt():t==="ar"?iWt():t==="es"?aWt():t==="hi"?oWt():nWt()}),lWt=()=>"New variable value",uWt=()=>"新变量值",_Wt=()=>"مقدار متغیر جدید",fWt=()=>"قيمة المتغيّر الجديد",dWt=()=>"Valor de la nueva variable",hWt=()=>"नई वेरिएबल वैल्यू",pWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uWt():t==="fa"?_Wt():t==="ar"?fWt():t==="es"?dWt():t==="hi"?hWt():lWt()}),mWt=()=>"No code, prompts, file contents, or account identifiers are sent.",gWt=()=>"不会发送代码、提示词、文件内容或账户标识符。",vWt=()=>"هیچ کد، پرامپت، محتوای فایل یا شناسهٔ حسابی ارسال نمی‌شود.",bWt=()=>"لا تُرسَل أي شيفرة أو طلبات أو محتويات ملفات أو معرّفات حسابات.",yWt=()=>"No se envía código, prompts, contenido de archivos ni identificadores de cuenta.",xWt=()=>"कोई कोड, प्रॉम्प्ट, फ़ाइल सामग्री, या खाता पहचानकर्ता नहीं भेजे जाते।",wWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gWt():t==="fa"?vWt():t==="ar"?bWt():t==="es"?yWt():t==="hi"?xWt():mWt()}),kWt=()=>"No hosts found in ~/.ssh/config.",SWt=()=>"在 ~/.ssh/config 中未找到主机。",CWt=()=>"میزبانی در ‎~/.ssh/config پیدا نشد.",EWt=()=>"لم يُعثر على مضيفين في ‎~/.ssh/config.",NWt=()=>"No se encontraron hosts en ~/.ssh/config.",zWt=()=>"~/.ssh/config में कोई होस्ट नहीं मिला।",jWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SWt():t==="fa"?CWt():t==="ar"?EWt():t==="es"?NWt():t==="hi"?zWt():kWt()}),AWt=()=>"No job-create permission",TWt=()=>"没有创建 Job 的权限",RWt=()=>"مجوز ساخت Job وجود ندارد",MWt=()=>"لا صلاحية لإنشاء المهام",OWt=()=>"Sin permiso para crear jobs",DWt=()=>"जॉब बनाने की अनुमति नहीं",LWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?TWt():t==="fa"?RWt():t==="ar"?MWt():t==="es"?OWt():t==="hi"?DWt():AWt()}),IWt=()=>"No Write Permissions",$Wt=()=>"无写入权限",BWt=()=>"بدون مجوز نوشتن",PWt=()=>"لا صلاحيات كتابة",FWt=()=>"Sin permisos de escritura",HWt=()=>"लिखने की अनुमति नहीं",qWt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$Wt():t==="fa"?BWt():t==="ar"?PWt():t==="es"?FWt():t==="hi"?HWt():IWt()}),UWt=()=>"No key on this computer to register — load a registered key with",GWt=()=>"此计算机上没有可注册的密钥——使用以下命令加载已注册的密钥:",VWt=()=>"کلیدی برای ثبت روی این رایانه نیست — کلید ثبت‌شده را با این فرمان بار کنید:",KWt=()=>"لا مفتاح على هذا الحاسوب لتسجيله — حمّل مفتاحًا مسجّلًا عبر",WWt=()=>"No hay ninguna clave en este equipo para registrar — carga una clave registrada con",QWt=()=>"इस कंप्यूटर पर रजिस्टर करने के लिए कोई की नहीं है — इसके साथ एक रजिस्टर्ड की लोड करें",XWt=((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()}),YWt=()=>"No key on this computer yet — create one with",ZWt=()=>"此计算机上还没有密钥——使用以下命令创建:",JWt=()=>"هنوز کلیدی روی این رایانه نیست — با این فرمان یکی بسازید:",eQt=()=>"لا مفتاح على هذا الحاسوب بعد — أنشئ واحدًا عبر",tQt=()=>"Aún no hay ninguna clave en este equipo — crea una con",nQt=()=>"इस कंप्यूटर पर अभी तक कोई की नहीं है — इसके साथ एक बनाएं",rQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZWt():t==="fa"?JWt():t==="ar"?eQt():t==="es"?tQt():t==="hi"?nQt():YWt()}),sQt=()=>"No Slurm CLI",iQt=()=>"无 Slurm CLI",aQt=()=>"بدون CLI اسلورم",oQt=()=>"لا توجد واجهة Slurm لسطر الأوامر",cQt=()=>"Sin CLI de Slurm",lQt=()=>"कोई Slurm CLI नहीं",uQt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?iQt():t==="fa"?aQt():t==="ar"?oQt():t==="es"?cQt():t==="hi"?lQt():sQt()}),_Qt=()=>"None registered",fQt=()=>"未注册任何密钥",dQt=()=>"هیچ‌کدام ثبت نشده",hQt=()=>"لا شيء مسجّل",pQt=()=>"Ninguna registrada",mQt=()=>"कोई रजिस्टर्ड नहीं",gQt=((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()}),vQt=()=>"Not checked",bQt=()=>"未检查",yQt=()=>"بررسی نشده",xQt=()=>"لم يُفحص",wQt=()=>"Sin comprobar",kQt=()=>"जाँचा नहीं गया",aI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bQt():t==="fa"?yQt():t==="ar"?xQt():t==="es"?wQt():t==="hi"?kQt():vQt()}),SQt=()=>"Not configured",CQt=()=>"未配置",EQt=()=>"پیکربندی نشده",NQt=()=>"غير مُعَد",zQt=()=>"Sin configurar",jQt=()=>"कॉन्फ़िगर नहीं किया गया",Fb=((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()}),AQt=()=>"Not installed",TQt=()=>"未安装",RQt=()=>"نصب نیست",MQt=()=>"غير مثبّت",OQt=()=>"No instalado",DQt=()=>"इंस्टॉल नहीं है",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=()=>"Not now",$Qt=()=>"暂不",BQt=()=>"اکنون نه",PQt=()=>"ليس الآن",FQt=()=>"Ahora no",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=()=>"Not on this computer",GQt=()=>"不在此计算机上",VQt=()=>"روی این رایانه نیست",KQt=()=>"ليس على هذا الحاسوب",WQt=()=>"No en este equipo",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=()=>"Not set (pass --host per launch)",ZQt=()=>"未设置(每次启动时传入 --host)",JQt=()=>"تنظیم نشده (در هر اجرا ‎--host بدهید)",eXt=()=>"غير مضبوط (مرّر ‎--host‎ عند كل تشغيل)",tXt=()=>"Sin definir (pasa --host en cada lanzamiento)",nXt=()=>"सेट नहीं (हर लॉन्च पर --host दें)",oI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ZQt():t==="fa"?JQt():t==="ar"?eXt():t==="es"?tXt():t==="hi"?nXt():YQt()}),rXt=()=>"Not signed in",sXt=()=>"未登录",iXt=()=>"وارد نشده",aXt=()=>"لم يتم تسجيل الدخول",oXt=()=>"Sin iniciar sesión",cXt=()=>"साइन इन नहीं है",cI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sXt():t==="fa"?iXt():t==="ar"?aXt():t==="es"?oXt():t==="hi"?cXt():rXt()}),lXt=()=>"On this computer",uXt=()=>"在此计算机上",_Xt=()=>"روی این رایانه",fXt=()=>"على هذا الحاسوب",dXt=()=>"En este equipo",hXt=()=>"इस कंप्यूटर पर",pXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uXt():t==="fa"?_Xt():t==="ar"?fXt():t==="es"?dXt():t==="hi"?hXt():lXt()}),mXt=()=>"Open a project to inspect its repository and GitHub publication state.",gXt=()=>"打开项目以查看其仓库和 GitHub 发布状态。",vXt=()=>"پروژه‌ای را باز کنید تا مخزن و وضعیت انتشار GitHub آن را ببینید.",bXt=()=>"افتح مشروعًا لفحص مستودعه وحالة نشره على GitHub.",yXt=()=>"Abre un proyecto para ver su repositorio y su estado de publicación en GitHub.",xXt=()=>"इसकी रिपॉज़िटरी और GitHub प्रकाशन स्थिति देखने के लिए एक प्रोजेक्ट खोलें।",wXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gXt():t==="fa"?vXt():t==="ar"?bXt():t==="es"?yXt():t==="hi"?xXt():mXt()}),kXt=()=>"Open job page",SXt=()=>"打开作业页面",CXt=()=>"باز کردن صفحهٔ کار",EXt=()=>"فتح صفحة المهمة",NXt=()=>"Abrir página del job",zXt=()=>"जॉब पेज खोलें",fj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SXt():t==="fa"?CXt():t==="ar"?EXt():t==="es"?NXt():t==="hi"?zXt():kXt()}),jXt=()=>"Open on GitHub",AXt=()=>"在 GitHub 上打开",TXt=()=>"باز کردن در GitHub",RXt=()=>"فتح على GitHub",MXt=()=>"Abrir en GitHub",OXt=()=>"GitHub पर खोलें",dj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AXt():t==="fa"?TXt():t==="ar"?RXt():t==="es"?MXt():t==="hi"?OXt():jXt()}),DXt=()=>", or create one with",LXt=()=>",或使用以下命令创建:",IXt=()=>"، یا با این فرمان یکی بسازید:",$Xt=()=>"، أو أنشئ واحدًا عبر",BXt=()=>", o crea una con",PXt=()=>", या इसके साथ एक बनाएं",FXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?LXt():t==="fa"?IXt():t==="ar"?$Xt():t==="es"?BXt():t==="hi"?PXt():DXt()}),HXt=()=>"Org",qXt=()=>"组织",UXt=()=>"سازمان",GXt=()=>"المؤسسة",VXt=()=>"Org.",KXt=()=>"संगठन",WXt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qXt():t==="fa"?UXt():t==="ar"?GXt():t==="es"?VXt():t==="hi"?KXt():HXt()}),QXt=()=>"Orgs",XXt=()=>"组织",YXt=()=>"سازمان‌ها",ZXt=()=>"المؤسسات",JXt=()=>"Orgs.",eYt=()=>"संगठन",tYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?XXt():t==="fa"?YXt():t==="ar"?ZXt():t==="es"?JXt():t==="hi"?eYt():QXt()}),nYt=()=>"orx can't update this install",rYt=()=>"orx 无法更新此安装",sYt=()=>"orx نمی‌تواند این نصب را به‌روزرسانی کند",iYt=()=>"لا يستطيع orx تحديث هذا التثبيت",aYt=()=>"orx no puede actualizar esta instalación",oYt=()=>"orx इस इंस्टॉल को अपडेट नहीं कर सकता",cYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rYt():t==="fa"?sYt():t==="ar"?iYt():t==="es"?aYt():t==="hi"?oYt():nYt()}),lYt=()=>"Overleaf",uYt=()=>"Overleaf",_Yt=()=>"Overleaf",fYt=()=>"Overleaf",dYt=()=>"Overleaf",hYt=()=>"Overleaf",lI=((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()}),pYt=()=>"Overleaf Git authentication token",mYt=()=>"Overleaf Git 身份验证令牌",gYt=()=>"توکن احراز هویت Git در Overleaf",vYt=()=>"رمز مصادقة Git لـ Overleaf",bYt=()=>"Token de autenticación de Git de Overleaf",yYt=()=>"Overleaf Git प्रमाणीकरण टोकन",xYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mYt():t==="fa"?gYt():t==="ar"?vYt():t==="es"?bYt():t==="hi"?yYt():pYt()}),wYt=()=>"Overridden by env",kYt=()=>"已被环境变量覆盖",SYt=()=>"بازنویسی‌شده توسط محیط",CYt=()=>"متجاوَز عبر متغيّر البيئة",EYt=()=>"Sobrescrito por el entorno",NYt=()=>"env द्वारा ओवरराइड किया गया",zYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kYt():t==="fa"?SYt():t==="ar"?CYt():t==="es"?EYt():t==="hi"?NYt():wYt()}),jYt=()=>"Partition",AYt=()=>"分区",TYt=()=>"پارتیشن",RYt=()=>"القسم",MYt=()=>"Partición",OYt=()=>"पार्टीशन",DYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AYt():t==="fa"?TYt():t==="ar"?RYt():t==="es"?MYt():t==="hi"?OYt():jYt()}),LYt=()=>"Path",IYt=()=>"路径",$Yt=()=>"مسیر",BYt=()=>"المسار",PYt=()=>"Ruta",FYt=()=>"पथ",HYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IYt():t==="fa"?$Yt():t==="ar"?BYt():t==="es"?PYt():t==="hi"?FYt():LYt()}),qYt=()=>"Plan",UYt=()=>"方案",GYt=()=>"سطح اشتراک",VYt=()=>"الخطة",KYt=()=>"Plan",WYt=()=>"प्लान",QYt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?UYt():t==="fa"?GYt():t==="ar"?VYt():t==="es"?KYt():t==="hi"?WYt():qYt()}),XYt=()=>"Project",YYt=()=>"项目",ZYt=()=>"پروژه",JYt=()=>"المشروع",eZt=()=>"Proyecto",tZt=()=>"प्रोजेक्ट",nZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?YYt():t==="fa"?ZYt():t==="ar"?JYt():t==="es"?eZt():t==="hi"?tZt():XYt()}),rZt=()=>"Ray version",sZt=()=>"Ray 版本",iZt=()=>"نسخهٔ Ray",aZt=()=>"إصدار Ray",oZt=()=>"Versión de Ray",cZt=()=>"Ray वर्शन",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=()=>"Reachable",_Zt=()=>"可访问",fZt=()=>"در دسترس",dZt=()=>"يمكن الوصول إليه",hZt=()=>"Accesible",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=()=>"Reading ~/.ssh/config…",vZt=()=>"正在读取 ~/.ssh/config…",bZt=()=>"در حال خواندن ‎~/.ssh/config…",yZt=()=>"جارٍ قراءة ‎~/.ssh/config…",xZt=()=>"Leyendo ~/.ssh/config…",wZt=()=>"~/.ssh/config पढ़ा जा रहा है…",uI=((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()}),kZt=()=>"Ready",SZt=()=>"就绪",CZt=()=>"آماده",EZt=()=>"جاهز",NZt=()=>"Listo",zZt=()=>"तैयार",Tm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?SZt():t==="fa"?CZt():t==="ar"?EZt():t==="es"?NZt():t==="hi"?zZt():kZt()}),jZt=()=>"Ready to move",AZt=()=>"可以移动",TZt=()=>"آمادهٔ انتقال",RZt=()=>"جاهز للنقل",MZt=()=>"Listo para mover",OZt=()=>"स्थानांतरण के लिए तैयार",DZt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?AZt():t==="fa"?TZt():t==="ar"?RZt():t==="es"?MZt():t==="hi"?OZt():jZt()}),LZt=()=>"Configured",IZt=()=>"已配置",$Zt=()=>"پیکربندی‌شده",BZt=()=>"مُعَد",PZt=()=>"Configurado",FZt=()=>"कॉन्फ़िगर किया गया",Rm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IZt():t==="fa"?$Zt():t==="ar"?BZt():t==="es"?PZt():t==="hi"?FZt():LZt()}),HZt=()=>"Refresh",qZt=()=>"刷新",UZt=()=>"تازه‌سازی",GZt=()=>"تحديث",VZt=()=>"Actualizar",KZt=()=>"रीफ़्रेश करें",Mm=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qZt():t==="fa"?UZt():t==="ar"?GZt():t==="es"?VZt():t==="hi"?KZt():HZt()}),WZt=()=>"Remotes",QZt=()=>"远程仓库",XZt=()=>"مخزن‌های دوردست",YZt=()=>"المستودعات البعيدة",ZZt=()=>"Remotos",JZt=()=>"रिमोट",eJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?QZt():t==="fa"?XZt():t==="ar"?YZt():t==="es"?ZZt():t==="hi"?JZt():WZt()}),tJt=()=>"Repository",nJt=()=>"仓库",rJt=()=>"مخزن",sJt=()=>"المستودع",iJt=()=>"Repositorio",aJt=()=>"रिपॉज़िटरी",oJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nJt():t==="fa"?rJt():t==="ar"?sJt():t==="es"?iJt():t==="hi"?aJt():tJt()}),cJt=()=>"Restart to finish updating",lJt=()=>"重新启动以完成更新",uJt=()=>"برای تکمیل به‌روزرسانی، دوباره راه‌اندازی کنید",_Jt=()=>"أعد التشغيل لإكمال التحديث",fJt=()=>"Reinicia para terminar la actualización",dJt=()=>"अपडेट पूरा करने के लिए फिर से शुरू करें",hJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lJt():t==="fa"?uJt():t==="ar"?_Jt():t==="es"?fJt():t==="hi"?dJt():cJt()}),pJt=()=>"Running instances",mJt=()=>"正在运行的实例",gJt=()=>"نمونه‌های در حال اجرا",vJt=()=>"المثيلات قيد التشغيل",bJt=()=>"Instancias en ejecución",yJt=()=>"चल रहे इंस्टेंस",xJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mJt():t==="fa"?gJt():t==="ar"?vJt():t==="es"?bJt():t==="hi"?yJt():pJt()}),wJt=()=>"Runtime",kJt=()=>"运行时间",SJt=()=>"زمان اجرا",CJt=()=>"مدة التشغيل",EJt=()=>"Runtime",NJt=()=>"रनटाइम",zJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kJt():t==="fa"?SJt():t==="ar"?CJt():t==="es"?EJt():t==="hi"?NJt():wJt()}),jJt=()=>". Save it under that key if it's meant for HF Jobs.",AJt=()=>"读取它。如果它用于 HF Jobs,请以该键名保存。",TJt=()=>"می‌خوانند. اگر برای HF Jobs است، آن را با همان کلید ذخیره کنید.",RJt=()=>"‏. احفظه تحت ذلك المفتاح إن كان مخصصًا لمهام HF.",MJt=()=>". Guárdalo con ese nombre si es para HF Jobs.",OJt=()=>"। यदि यह HF Jobs के लिए है तो इसे उस की के तहत सेव करें।",DJt=((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()}),LJt=()=>"Session cookie",IJt=()=>"会话 cookie",$Jt=()=>"کوکی نشست",BJt=()=>"ملف تعريف ارتباط الجلسة",PJt=()=>"Cookie de sesión",FJt=()=>"सेशन कुकी",HJt=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?IJt():t==="fa"?$Jt():t==="ar"?BJt():t==="es"?PJt():t==="hi"?FJt():LJt()}),qJt=()=>"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.",UJt=()=>"保存会话 cookie 后,已关联的论文会在他人输入时实时跟随 Overleaf,并立即回传保存;图片仍通过较慢的 Git 同步传输。请从已登录 Overleaf 的浏览器复制 overleaf_session2 cookie;该登录失效后它也会失效。",GJt=()=>"با ذخیرهٔ کوکی نشست، مقالهٔ پیوندشده هنگام تایپ دیگران Overleaf را زنده دنبال می‌کند و ذخیره‌ها را مستقیماً برمی‌گرداند؛ تصویرها همچنان با همگام‌سازی کندتر Git جابه‌جا می‌شوند. کوکی overleaf_session2 را از مرورگری که به Overleaf وارد شده کپی کنید؛ با پایان آن ورود، کوکی هم از کار می‌افتد.",VJt=()=>"مع حفظ ملف تعريف ارتباط الجلسة، تتابع الورقة المرتبطة Overleaf أثناء كتابة الآخرين وترسل عمليات الحفظ مباشرةً. لا تزال الأشكال تُنقَل عبر مزامنة Git الأبطأ. انسخ ملف تعريف الارتباط overleaf_session2 من متصفح مسجّل الدخول إلى Overleaf؛ ويتوقف عن العمل عند انتهاء ذلك الدخول.",KJt=()=>"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.",WJt=()=>"सेशन कुकी सेव होने पर, एक लिंक किया गया पेपर लोगों के टाइप करते ही Overleaf को फ़ॉलो करता है और सेव सीधे वापस भेजता है। फ़िगर अभी भी धीमे Git सिंक पर चलती हैं। Overleaf में साइन इन ब्राउज़र से overleaf_session2 कुकी कॉपी करें; वह साइन-इन खत्म होने पर काम करना बंद कर देती है।",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=()=>"Settings",YJt=()=>"设置",ZJt=()=>"تنظیمات",JJt=()=>"الإعدادات",een=()=>"Configuración",ten=()=>"सेटिंग्स",RS=((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=()=>"Signed in",ren=()=>"已登录",sen=()=>"وارد شده",ien=()=>"تم تسجيل الدخول",aen=()=>"Sesión iniciada",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=()=>"Source",uen=()=>"来源",_en=()=>"منبع",fen=()=>"المصدر",den=()=>"Origen",hen=()=>"स्रोत",_I=((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()}),pen=()=>"SSH Key",men=()=>"SSH 密钥",gen=()=>"کلید SSH",ven=()=>"مفتاح SSH",ben=()=>"Clave SSH",yen=()=>"SSH की",xen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?men():t==="fa"?gen():t==="ar"?ven():t==="es"?ben():t==="hi"?yen():pen()}),wen=()=>"Started",ken=()=>"开始时间",Sen=()=>"آغاز",Cen=()=>"بدأ",Een=()=>"Inicio",Nen=()=>"शुरू हुआ",zen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ken():t==="fa"?Sen():t==="ar"?Cen():t==="es"?Een():t==="hi"?Nen():wen()}),jen=()=>"State",Aen=()=>"状态",Ten=()=>"وضعیت",Ren=()=>"الحالة",Men=()=>"Estado",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=()=>"Status",Ien=()=>"状态",$en=()=>"وضعیت",Ben=()=>"الحالة",Pen=()=>"Estado",Fen=()=>"स्थिति",Kh=((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()}),Hen=()=>"Storage",qen=()=>"存储",Uen=()=>"ذخیره‌سازی",Gen=()=>"التخزين",Ven=()=>"Almacenamiento",Ken=()=>"स्टोरेज",Wen=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qen():t==="fa"?Uen():t==="ar"?Gen():t==="es"?Ven():t==="hi"?Ken():Hen()}),Qen=()=>"Sync",Xen=()=>"同步",Yen=()=>"همگام‌سازی",Zen=()=>"مزامنة",Jen=()=>"Sincronización",etn=()=>"सिंक",ttn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Xen():t==="fa"?Yen():t==="ar"?Zen():t==="es"?Jen():t==="hi"?etn():Qen()}),ntn=()=>"Syncing off",rtn=()=>"同步已关闭",stn=()=>"همگام‌سازی خاموش",itn=()=>"المزامنة معطّلة",atn=()=>"Sincronización desactivada",otn=()=>"सिंकिंग बंद है",ctn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rtn():t==="fa"?stn():t==="ar"?itn():t==="es"?atn():t==="hi"?otn():ntn()}),ltn=()=>"Test connection",utn=()=>"测试连接",_tn=()=>"آزمایش اتصال",ftn=()=>"اختبار الاتصال",dtn=()=>"Probar conexión",htn=()=>"कनेक्शन जाँचें",ptn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?utn():t==="fa"?_tn():t==="ar"?ftn():t==="es"?dtn():t==="hi"?htn():ltn()}),mtn=()=>"Testing…",gtn=()=>"正在测试…",vtn=()=>"در حال آزمایش…",btn=()=>"جارٍ الاختبار…",ytn=()=>"Probando…",xtn=()=>"जाँचा जा रहा है…",wtn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gtn():t==="fa"?vtn():t==="ar"?btn():t==="es"?ytn():t==="hi"?xtn():mtn()}),ktn=()=>", then add it with",Stn=()=>",然后使用以下命令添加:",Ctn=()=>"، سپس با این فرمان اضافه‌اش کنید:",Etn=()=>"، ثم أضِفه عبر",Ntn=()=>" y luego añádela con",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=()=>"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.",Ttn=()=>"当协作者在 GitHub 上关注项目更改时,此功能很有用。新项目将自动启用同步,在需要时创建私有仓库,并推送实验分支以便查看。",Rtn=()=>"وقتی همکاران تغییرات پروژه را در GitHub دنبال می‌کنند، این گزینه مفید است. پروژه‌های جدید همگام‌سازی را خودکار فعال می‌کنند، در صورت نیاز مخزن خصوصی می‌سازند و شاخه‌های آزمایش را برای دیده‌شدن push می‌کنند.",Mtn=()=>"هذا مفيد عندما يتابع المتعاونون تغييرات المشروع على GitHub. ستفعّل المشاريع الجديدة المزامنة تلقائيًا، مع إنشاء مستودع خاص عند الحاجة ورفع فروع التجارب لإتاحة الاطلاع عليها.",Otn=()=>"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.",Dtn=()=>"यह तब उपयोगी है जब सहयोगी GitHub पर प्रोजेक्ट के बदलावों को फ़ॉलो करते हों। नए प्रोजेक्ट में सिंकिंग अपने आप चालू हो जाएगी, ज़रूरत पड़ने पर एक निजी रिपॉज़िटरी बनेगी और प्रयोग ब्रांच दृश्यता के लिए पुश की जाएंगी।",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=()=>"This saved destination is not configured. Set it up below or choose another backend.",$tn=()=>"已保存的目标尚未配置。请在下方完成设置或选择其他后端。",Btn=()=>"این مقصد ذخیره‌شده پیکربندی نشده است. آن را در پایین راه‌اندازی یا backend دیگری انتخاب کنید.",Ptn=()=>"هذه الوجهة المحفوظة غير مُعدّة. أعِدّها أدناه أو اختر بيئة تنفيذ أخرى.",Ftn=()=>"Este destino guardado no está configurado. Configúralo abajo o elige otro backend.",Htn=()=>"यह सेव किया गया गंतव्य कॉन्फ़िगर नहीं है। इसे नीचे सेट अप करें या कोई और बैकएंड चुनें।",qtn=((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()}),Utn=()=>"This value looks like a Hugging Face token — compute runs only read it from",Gtn=()=>"此值看起来像 Hugging Face 令牌——算力运行只会从",Vtn=()=>"این مقدار شبیه توکن Hugging Face است — اجراهای رایانشی آن را فقط از",Ktn=()=>"تبدو هذه القيمة كرمز Hugging Face — لا تقرؤه عمليات التشغيل الحوسبية إلا من",Wtn=()=>"Este valor parece un token de Hugging Face — las ejecuciones de cómputo solo lo leen de",Qtn=()=>"यह वैल्यू एक Hugging Face टोकन जैसी लगती है — कंप्यूट रन इसे केवल यहाँ से पढ़ते हैं",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=()=>"Time limit",Ztn=()=>"时间限制",Jtn=()=>"محدودیت زمانی",enn=()=>"الحد الزمني",tnn=()=>"Límite de tiempo",nnn=()=>"समय सीमा",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=()=>"Unable to verify",inn=()=>"无法验证",ann=()=>"تأیید ممکن نیست",onn=()=>"تعذّر التحقق",cnn=()=>"No se pudo verificar",lnn=()=>"सत्यापित नहीं हो सका",Bv=((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=()=>"Unknown",_nn=()=>"未知",fnn=()=>"نامشخص",dnn=()=>"غير معروف",hnn=()=>"Desconocido",pnn=()=>"अज्ञात",fI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_nn():t==="fa"?fnn():t==="ar"?dnn():t==="es"?hnn():t==="hi"?pnn():unn()}),mnn=()=>"Update required",gnn=()=>"需要更新",vnn=()=>"نیازمند به‌روزرسانی",bnn=()=>"مطلوب تحديث",ynn=()=>"Actualización necesaria",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=()=>"Updates",Snn=()=>"更新",Cnn=()=>"به‌روزرسانی‌ها",Enn=()=>"التحديثات",Nnn=()=>"Actualizaciones",znn=()=>"अपडेट",hj=((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=()=>"Usage analytics",Ann=()=>"使用情况分析",Tnn=()=>"تحلیل استفاده",Rnn=()=>"تحليلات الاستخدام",Mnn=()=>"Estadísticas de uso",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=()=>"value",Inn=()=>"值",$nn=()=>"مقدار",Bnn=()=>"القيمة",Pnn=()=>"valor",Fnn=()=>"वैल्यू",dI=((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=()=>"Variables available to runs and the research agent (API keys, tokens).",qnn=()=>"可供运行和研究智能体使用的变量(API 密钥、令牌)。",Unn=()=>"متغیرهای در دسترس اجراها و عامل پژوهشی (کلیدهای API، توکن‌ها).",Gnn=()=>"متغيّرات متاحة لعمليات التشغيل ولوكيل البحث (مفاتيح API والرموز).",Vnn=()=>"Variables disponibles para las ejecuciones y el agente de investigación (claves de API, tokens).",Knn=()=>"रन और शोध एजेंट के लिए उपलब्ध वेरिएबल (API की, टोकन)।",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=()=>"Version",Xnn=()=>"版本",Ynn=()=>"نسخه",Znn=()=>"الإصدار",Jnn=()=>"Versión",ern=()=>"वर्शन",hI=((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()}),trn=()=>"When enabled, each new project gets a private GitHub repository. Experiment branches are pushed automatically for collaborator visibility. Compute always uses direct source snapshots.",nrn=()=>"启用后,每个新项目都会获得一个私有 GitHub 仓库。实验分支会自动推送,便于协作者查看。算力执行始终使用直接的源代码快照。",rrn=()=>"با فعال شدن، هر پروژهٔ جدید یک مخزن خصوصی GitHub می‌گیرد. شاخه‌های آزمایش برای دیده‌شدن توسط همکاران خودکار push می‌شوند. رایانش همیشه از snapshot مستقیم منبع استفاده می‌کند.",srn=()=>"عند التفعيل، يحصل كل مشروع جديد على مستودع GitHub خاص. تُرفع فروع التجارب تلقائيًا ليطّلع عليها المتعاونون. تستخدم الحوسبة دائمًا لقطات المصدر المباشرة.",irn=()=>"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.",arn=()=>"चालू होने पर, हर नए प्रोजेक्ट को एक निजी GitHub रिपॉज़िटरी मिलती है। सहयोगी दृश्यता के लिए प्रयोग ब्रांच अपने आप पुश होती हैं। कंप्यूट हमेशा सीधे सोर्स स्नैपशॉट का उपयोग करता है।",orn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nrn():t==="fa"?rrn():t==="ar"?srn():t==="es"?irn():t==="hi"?arn():trn()}),crn=()=>"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.",lrn=()=>"保存令牌后,可让控制台中打开的论文与 Overleaf 项目双向保持同步。Overleaf 的 Git 集成需要付费方案;没有付费方案时,仍可将论文作为新项目上传到 Overleaf。令牌仅保存在此计算机上,不会发送到算力后端。",urn=()=>"با ذخیرهٔ توکن، مقاله‌ای که در داشبورد باز شده می‌تواند در هر دو جهت با یک پروژهٔ Overleaf همگام بماند. یکپارچه‌سازی Git در Overleaf به طرح پولی نیاز دارد؛ بدون آن هم می‌توان مقاله را به‌عنوان پروژه‌ای جدید در Overleaf بارگذاری کرد. توکن روی همین دستگاه می‌ماند و به backendهای رایانشی فرستاده نمی‌شود.",_rn=()=>"مع حفظ رمز، يمكن إبقاء ورقة مفتوحة في لوحة التحكم متزامنة مع مشروع Overleaf في الاتجاهين. يأتي تكامل Git في Overleaf مع خطة Overleaf مدفوعة؛ وبدونها لا يزال بالإمكان رفع ورقة إلى Overleaf كمشروع جديد. يبقى الرمز على هذا الجهاز ولا يُرسَل إلى بيئات التنفيذ.",frn=()=>"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.",drn=()=>"टोकन सेव होने पर, डैशबोर्ड में खुला कोई पेपर दोनों दिशाओं में Overleaf प्रोजेक्ट के साथ मेल खाता रहता है। Overleaf का Git इंटीग्रेशन एक पेड Overleaf प्लान के साथ आता है; उसके बिना, एक पेपर को अब भी नए प्रोजेक्ट के रूप में Overleaf पर अपलोड किया जा सकता है। टोकन इसी मशीन पर रहता है और कंप्यूट बैकएंड को नहीं भेजा जाता।",hrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lrn():t==="fa"?urn():t==="ar"?_rn():t==="es"?frn():t==="hi"?drn():crn()}),prn=()=>"Pick a login node first",mrn=()=>"请先选择登录节点",grn=()=>"ابتدا یک گرهٔ ورود انتخاب کنید",vrn=()=>"اختر عقدة دخول أولًا",brn=()=>"Elige primero un nodo de acceso",yrn=()=>"पहले एक लॉगिन नोड चुनें",xrn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mrn():t==="fa"?grn():t==="ar"?vrn():t==="es"?brn():t==="hi"?yrn():prn()}),wrn=()=>"Providers",krn=()=>"提供商",Srn=()=>"ارائه‌دهندگان",Crn=()=>"المزوّدون",Ern=()=>"Proveedores",Nrn=()=>"प्रोवाइडर",pI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?krn():t==="fa"?Srn():t==="ar"?Crn():t==="es"?Ern():t==="hi"?Nrn():wrn()}),zrn=()=>"Reconnect",jrn=()=>"重新连接",Arn=()=>"اتصال دوباره",Trn=()=>"إعادة الاتصال",Rrn=()=>"Reconectar",Mrn=()=>"फिर से कनेक्ट करें",mI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jrn():t==="fa"?Arn():t==="ar"?Trn():t==="es"?Rrn():t==="hi"?Mrn():zrn()}),Orn=e=>`Register this computer with ${e==null?void 0:e.register}, or load a registered key with ${e==null?void 0:e.load}.`,Drn=e=>`使用 ${e==null?void 0:e.register} 注册此计算机,或使用 ${e==null?void 0:e.load} 加载已注册的密钥。`,Lrn=e=>`این رایانه را با ${e==null?void 0:e.register} ثبت کنید، یا کلید ثبت‌شده را با ${e==null?void 0:e.load} بار کنید.`,Irn=e=>`سجّل هذا الحاسوب عبر ${e==null?void 0:e.register}، أو حمّل مفتاحًا مسجّلًا عبر ${e==null?void 0:e.load}.`,$rn=e=>`Registra este equipo con ${e==null?void 0:e.register} o carga una clave registrada con ${e==null?void 0:e.load}.`,Brn=e=>`इस कंप्यूटर को ${e==null?void 0:e.register} से रजिस्टर करें, या ${e==null?void 0:e.load} से एक रजिस्टर्ड की लोड करें।`,Prn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Drn(e):t==="fa"?Lrn(e):t==="ar"?Irn(e):t==="es"?$rn(e):t==="hi"?Brn(e):Orn(e)}),Frn=()=>"Reinstall with the orx installer to get automatic updates.",Hrn=()=>"请使用 orx 安装程序重新安装,以获得自动更新。",qrn=()=>"برای دریافت به‌روزرسانی خودکار، با نصب‌کنندهٔ orx دوباره نصب کنید.",Urn=()=>"أعد التثبيت عبر مُثبّت orx للحصول على التحديثات التلقائية.",Grn=()=>"Reinstala con el instalador de orx para recibir actualizaciones automáticas.",Vrn=()=>"ऑटोमैटिक अपडेट पाने के लिए orx इंस्टॉलर से फिर से इंस्टॉल करें।",Krn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hrn():t==="fa"?qrn():t==="ar"?Urn():t==="es"?Grn():t==="hi"?Vrn():Frn()}),Wrn=()=>"Release notes",Qrn=()=>"版本说明",Xrn=()=>"یادداشت‌های انتشار",Yrn=()=>"ملاحظات الإصدار",Zrn=()=>"Notas de la versión",Jrn=()=>"रिलीज़ नोट्स",gI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qrn():t==="fa"?Xrn():t==="ar"?Yrn():t==="es"?Zrn():t==="hi"?Jrn():Wrn()}),esn=()=>"Re-link",tsn=()=>"重新链接",nsn=()=>"پیوند دوباره",rsn=()=>"إعادة الربط",ssn=()=>"Volver a enlazar",isn=()=>"फिर से लिंक करें",asn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tsn():t==="fa"?nsn():t==="ar"?rsn():t==="es"?ssn():t==="hi"?isn():esn()}),osn=()=>"Remove cookie",csn=()=>"移除 cookie",lsn=()=>"حذف کوکی",usn=()=>"إزالة ملف تعريف الارتباط",_sn=()=>"Quitar cookie",fsn=()=>"कुकी हटाएं",dsn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?csn():t==="fa"?lsn():t==="ar"?usn():t==="es"?_sn():t==="hi"?fsn():osn()}),hsn=()=>"Remove token",psn=()=>"移除令牌",msn=()=>"حذف توکن",gsn=()=>"إزالة الرمز",vsn=()=>"Quitar token",bsn=()=>"टोकन हटाएं",ysn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?psn():t==="fa"?msn():t==="ar"?gsn():t==="es"?vsn():t==="hi"?bsn():hsn()}),xsn=()=>"Removing…",wsn=()=>"正在移除…",ksn=()=>"در حال حذف…",Ssn=()=>"جارٍ الإزالة…",Csn=()=>"Quitando…",Esn=()=>"हटाया जा रहा है…",pj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wsn():t==="fa"?ksn():t==="ar"?Ssn():t==="es"?Csn():t==="hi"?Esn():xsn()}),Nsn=()=>"Replace anyway",zsn=()=>"仍要替换",jsn=()=>"به‌هرحال جایگزین کن",Asn=()=>"الاستبدال على أي حال",Tsn=()=>"Reemplazar de todos modos",Rsn=()=>"फिर भी बदलें",Msn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zsn():t==="fa"?jsn():t==="ar"?Asn():t==="es"?Tsn():t==="hi"?Rsn():Nsn()}),Osn=()=>"Replace key",Dsn=()=>"替换密钥",Lsn=()=>"جایگزینی کلید",Isn=()=>"استبدال المفتاح",$sn=()=>"Reemplazar clave",Bsn=()=>"की बदलें",Psn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dsn():t==="fa"?Lsn():t==="ar"?Isn():t==="es"?$sn():t==="hi"?Bsn():Osn()}),Fsn=()=>"Replace token",Hsn=()=>"替换令牌",qsn=()=>"جایگزینی توکن",Usn=()=>"استبدال الرمز",Gsn=()=>"Reemplazar token",Vsn=()=>"टोकन बदलें",Ksn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hsn():t==="fa"?qsn():t==="ar"?Usn():t==="es"?Gsn():t==="hi"?Vsn():Fsn()}),Wsn=e=>`Git and GitHub settings for ${e==null?void 0:e.project}. Local Git powers experiments; publishing is optional.`,Qsn=e=>`${e==null?void 0:e.project} 的 Git 和 GitHub 设置。本地 Git 为实验提供支持;发布是可选的。`,Xsn=e=>`تنظیمات Git و GitHub برای ${e==null?void 0:e.project}. Git محلی آزمایش‌ها را ممکن می‌کند؛ انتشار اختیاری است.`,Ysn=e=>`إعدادات Git وGitHub لـ ${e==null?void 0:e.project}. تعتمد التجارب على Git المحلي؛ والنشر اختياري.`,Zsn=e=>`Configuración de Git y GitHub de ${e==null?void 0:e.project}. Git local hace posibles los experimentos; publicar es opcional.`,Jsn=e=>`${e==null?void 0:e.project} के लिए Git और GitHub सेटिंग्स। लोकल Git प्रयोगों को चलाता है; प्रकाशन वैकल्पिक है।`,ein=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Qsn(e):t==="fa"?Xsn(e):t==="ar"?Ysn(e):t==="es"?Zsn(e):t==="hi"?Jsn(e):Wsn(e)}),tin=e=>`Version ${e==null?void 0:e.installed} is installed. This window is still running ${e==null?void 0:e.current}.`,nin=e=>`已安装版本 ${e==null?void 0:e.installed}。此窗口仍在运行 ${e==null?void 0:e.current}。`,rin=e=>`نسخهٔ ${e==null?void 0:e.installed} نصب شده است. این پنجره هنوز نسخهٔ ${e==null?void 0:e.current} را اجرا می‌کند.`,sin=e=>`الإصدار ${e==null?void 0:e.installed} مثبّت. لا تزال هذه النافذة تعمل بالإصدار ${e==null?void 0:e.current}.`,iin=e=>`La versión ${e==null?void 0:e.installed} está instalada. Esta ventana sigue ejecutando la ${e==null?void 0:e.current}.`,ain=e=>`वर्शन ${e==null?void 0:e.installed} इंस्टॉल है। यह विंडो अभी भी ${e==null?void 0:e.current} चला रही है।`,oin=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?nin(e):t==="fa"?rin(e):t==="ar"?sin(e):t==="es"?iin(e):t==="hi"?ain(e):tin(e)}),cin=()=>"Run `gh auth login` in your terminal.",lin=()=>"请在终端中运行 `gh auth login`。",uin=()=>"در پایانه `gh auth login` را اجرا کنید.",_in=()=>"نفّذ `gh auth login` في طرفيتك.",fin=()=>"Ejecuta `gh auth login` en tu terminal.",din=()=>"अपने टर्मिनल में `gh auth login` चलाएं।",hin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lin():t==="fa"?uin():t==="ar"?_in():t==="es"?fin():t==="hi"?din():cin()}),pin=()=>"Saved",min=()=>"已保存",gin=()=>"ذخیره شده",vin=()=>"تم الحفظ",bin=()=>"Guardado",yin=()=>"सेव हो गया",mj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?min():t==="fa"?gin():t==="ar"?vin():t==="es"?bin():t==="hi"?yin():pin()}),xin=()=>"Set up",win=()=>"设置",kin=()=>"راه‌اندازی",Sin=()=>"إعداد",Cin=()=>"Configurar",Ein=()=>"सेट अप करें",Nin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?win():t==="fa"?kin():t==="ar"?Sin():t==="es"?Cin():t==="hi"?Ein():xin()}),zin=()=>"Set up SSH key",jin=()=>"设置 SSH 密钥",Ain=()=>"راه‌اندازی کلید SSH",Tin=()=>"إعداد مفتاح SSH",Rin=()=>"Configurar clave SSH",Min=()=>"SSH की सेट अप करें",Oin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jin():t==="fa"?Ain():t==="ar"?Tin():t==="es"?Rin():t==="hi"?Min():zin()}),Din=()=>"Sign in",Lin=()=>"登录",Iin=()=>"ورود",$in=()=>"تسجيل الدخول",Bin=()=>"Iniciar sesión",Pin=()=>"साइन इन करें",vI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lin():t==="fa"?Iin():t==="ar"?$in():t==="es"?Bin():t==="hi"?Pin():Din()}),Fin=e=>`SSH connection terminal for ${e==null?void 0:e.host}`,Hin=e=>`${e==null?void 0:e.host} 的 SSH 连接终端`,qin=e=>`پایانهٔ اتصال SSH برای ${e==null?void 0:e.host}`,Uin=e=>`طرفية اتصال SSH لـ ${e==null?void 0:e.host}`,Gin=e=>`Terminal de conexión SSH para ${e==null?void 0:e.host}`,Vin=e=>`${e==null?void 0:e.host} के लिए SSH कनेक्शन टर्मिनल`,bI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hin(e):t==="fa"?qin(e):t==="ar"?Uin(e):t==="es"?Gin(e):t==="hi"?Vin(e):Fin(e)}),Kin=()=>"The local database, run logs, artifacts, and chat attachments. Moving this directory copies the entire store.",Win=()=>"本地数据库、运行日志、产物和聊天附件。移动此目录会复制整个存储。",Qin=()=>"پایگاه دادهٔ محلی، گزارش اجراها، خروجی‌ها و پیوست‌های گفتگو. انتقال این پوشه، کل مخزن داده را کپی می‌کند.",Xin=()=>"قاعدة البيانات المحلية وسجلات التشغيل والمُخرَجات ومرفقات المحادثة. نقل هذا الدليل ينسخ المخزن بالكامل.",Yin=()=>"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.",Zin=()=>"लोकल डेटाबेस, रन लॉग, आर्टिफ़ैक्ट और चैट अटैचमेंट। इस डायरेक्टरी को स्थानांतरित करने पर पूरा स्टोर कॉपी होता है।",Jin=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Win():t==="fa"?Qin():t==="ar"?Xin():t==="es"?Yin():t==="hi"?Zin():Kin()}),ean=()=>"The terminal disconnected before setup completed. Try again.",tan=()=>"设置完成前终端连接已断开。请重试。",nan=()=>"ارتباط ترمینال پیش از تکمیل راه‌اندازی قطع شد. دوباره تلاش کنید.",ran=()=>"انقطعت الطرفية قبل اكتمال الإعداد. حاول مجددًا.",san=()=>"La terminal se desconectó antes de completar la configuración. Inténtalo de nuevo.",ian=()=>"सेटअप पूरा होने से पहले टर्मिनल डिस्कनेक्ट हो गया। फिर से कोशिश करें।",Pv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tan():t==="fa"?nan():t==="ar"?ran():t==="es"?san():t==="hi"?ian():ean()}),aan=()=>"Dark",oan=()=>"深色",can=()=>"تیره",lan=()=>"داكن",uan=()=>"Oscuro",_an=()=>"डार्क",fan=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?oan():t==="fa"?can():t==="ar"?lan():t==="es"?uan():t==="hi"?_an():aan()}),dan=()=>"Theme",han=()=>"主题",pan=()=>"پوسته",man=()=>"السمة",gan=()=>"Tema",van=()=>"थीम",gj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?han():t==="fa"?pan():t==="ar"?man():t==="es"?gan():t==="hi"?van():dan()}),ban=()=>"Light",yan=()=>"浅色",xan=()=>"روشن",wan=()=>"فاتح",kan=()=>"Claro",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=()=>"System",Nan=()=>"系统",zan=()=>"سیستم",jan=()=>"النظام",Aan=()=>"Sistema",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=()=>"Set up billing in the Tinker console",Oan=()=>"在 Tinker 控制台设置账单",Dan=()=>"تنظیم پرداخت در کنسول Tinker",Lan=()=>"أعِدّ الفوترة في وحدة تحكم Tinker",Ian=()=>"Configura la facturación en la consola de Tinker",$an=()=>"Tinker कंसोल में बिलिंग सेट अप करें",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=()=>"Billing setup required",Fan=()=>"需要设置账单",Han=()=>"تنظیم پرداخت لازم است",qan=()=>"مطلوب إعداد الفوترة",Uan=()=>"Hay que configurar la facturación",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=()=>"TINKER_API_KEY is set in the process environment and overrides keys saved here. The status reflects that key.",Wan=()=>"进程环境中已设置 TINKER_API_KEY,它会覆盖此处保存的密钥。状态显示的是该密钥的检查结果。",Qan=()=>"متغیر TINKER_API_KEY در محیط فرایند تنظیم شده و بر کلیدهای ذخیره‌شده در اینجا اولویت دارد. وضعیت مربوط به همان کلید است.",Xan=()=>"‏TINKER_API_KEY مضبوط في بيئة العملية ويتجاوز المفاتيح المحفوظة هنا. تعكس الحالة ذلك المفتاح.",Yan=()=>"TINKER_API_KEY está definida en el entorno del proceso y tiene prioridad sobre las claves guardadas aquí. El estado corresponde a esa clave.",Zan=()=>"TINKER_API_KEY प्रोसेस एनवायरनमेंट में सेट है और यहाँ सेव की को ओवरराइड करता है। स्थिति उसी की को दर्शाती है।",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=()=>"Invalid Key",ton=()=>"密钥无效",non=()=>"کلید نامعتبر",ron=()=>"مفتاح غير صالح",son=()=>"Clave no válida",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=()=>"Token from",con=()=>"令牌来自",lon=()=>"توکن از",uon=()=>"الرمز من",_on=()=>"Token tomado de la",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=()=>"Update now",pon=()=>"立即更新",mon=()=>"اکنون به‌روزرسانی کن",gon=()=>"التحديث الآن",von=()=>"Actualizar ahora",bon=()=>"अभी अपडेट करें",yon=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pon():t==="fa"?mon():t==="ar"?gon():t==="es"?von():t==="hi"?bon():hon()}),xon=e=>`Update to ${e==null?void 0:e.version}`,won=e=>`更新到 ${e==null?void 0:e.version}`,kon=e=>`به‌روزرسانی به ${e==null?void 0:e.version}`,Son=e=>`التحديث إلى ${e==null?void 0:e.version}`,Con=e=>`Actualizar a ${e==null?void 0:e.version}`,Eon=e=>`वर्शन ${e==null?void 0:e.version} पर अपडेट करें`,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=()=>" Updates are switched off for this environment by ORX_NO_UPDATE_CHECK, so this setting has no effect.",jon=()=>" 此环境已通过 ORX_NO_UPDATE_CHECK 关闭更新,因此此设置不会生效。",Aon=()=>" به‌روزرسانی در این محیط با ORX_NO_UPDATE_CHECK خاموش شده است؛ بنابراین این تنظیم اثری ندارد.",Ton=()=>" التحديثات معطّلة لهذه البيئة عبر ORX_NO_UPDATE_CHECK، لذا ليس لهذا الإعداد أثر.",Ron=()=>" ORX_NO_UPDATE_CHECK desactiva las actualizaciones en este entorno, así que este ajuste no tiene efecto.",Mon=()=>" इस एनवायरनमेंट के लिए ORX_NO_UPDATE_CHECK द्वारा अपडेट बंद कर दिए गए हैं, इसलिए इस सेटिंग का कोई असर नहीं है।",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=()=>"Updating default destination…",Lon=()=>"正在更新默认运行位置…",Ion=()=>"در حال به‌روزرسانی مقصد پیش‌فرض…",$on=()=>"جارٍ تحديث الوجهة الافتراضية…",Bon=()=>"Actualizando el destino predeterminado…",Pon=()=>"डिफ़ॉल्ट गंतव्य अपडेट हो रहा है…",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=()=>"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.",qon=()=>"当已连接的账户有写入权限时,使用此仓库自动推送实验分支。否则,OpenResearch 会另建一个私有仓库用于协作。",Uon=()=>"اگر حساب متصل اجازهٔ نوشتن داشته باشد، شاخه‌های آزمایش خودکار به این مخزن پوش می‌شوند. در غیر این صورت OpenResearch یک مخزن خصوصی جداگانه برای همکاری می‌سازد.",Gon=()=>"استخدم هذا المستودع لرفع فروع التجارب تلقائيًا عندما يملك حسابك المتصل صلاحية الكتابة فيه. وإلا، ينشئ OpenResearch مستودعًا خاصًا منفصلًا للتعاون.",Von=()=>"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.",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=()=>"Validating…",Xon=()=>"正在验证…",Yon=()=>"در حال اعتبارسنجی…",Zon=()=>"جارٍ التحقق…",Jon=()=>"Validando…",ecn=()=>"सत्यापित हो रहा है…",yI=((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()}),tcn=()=>"View settings",ncn=()=>"查看设置",rcn=()=>"مشاهدهٔ تنظیمات",scn=()=>"عرض الإعدادات",icn=()=>"Ver configuración",acn=()=>"सेटिंग्स देखें",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=e=>`Couldn't delete the side chat: ${e==null?void 0:e.error}`,lcn=e=>`无法删除侧边对话:${e==null?void 0:e.error}`,ucn=e=>`حذف گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,_cn=e=>`تعذّر حذف المحادثة الجانبية: ${e==null?void 0:e.error}`,fcn=e=>`No se pudo eliminar el chat lateral: ${e==null?void 0:e.error}`,dcn=e=>`साइड चैट हटाई नहीं जा सकी: ${e==null?void 0:e.error}`,vj=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?lcn(e):t==="fa"?ucn(e):t==="ar"?_cn(e):t==="es"?fcn(e):t==="hi"?dcn(e):ccn(e)}),hcn=()=>"Side chats are deleted when you close them or quit the app.",pcn=()=>"关闭侧边对话或退出应用后,侧边对话会被删除。",mcn=()=>"گفت‌وگوهای جانبی با بستن آن‌ها یا خروج از برنامه حذف می‌شوند.",gcn=()=>"تُحذف المحادثات الجانبية عند إغلاقها أو الخروج من التطبيق.",vcn=()=>"Los chats laterales se eliminan cuando los cierras o sales de la app.",bcn=()=>"साइड चैट उन्हें बंद करने या ऐप से बाहर निकलने पर हटा दी जाती हैं।",ycn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pcn():t==="fa"?mcn():t==="ar"?gcn():t==="es"?vcn():t==="hi"?bcn():hcn()}),xcn=()=>"Open a chat first, then start a side chat from it.",wcn=()=>"请先打开一个对话,再从中开启侧边对话。",kcn=()=>"ابتدا یک گفت‌وگو باز کنید، سپس از آن گفت‌وگوی جانبی شروع کنید.",Scn=()=>"افتح محادثة أولًا، ثم ابدأ منها محادثة جانبية.",Ccn=()=>"Abre primero un chat y luego inicia un chat lateral desde él.",Ecn=()=>"पहले कोई चैट खोलें, फिर उससे साइड चैट शुरू करें।",Ncn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?wcn():t==="fa"?kcn():t==="ar"?Scn():t==="es"?Ccn():t==="hi"?Ecn():xcn()}),zcn=()=>"A side chat can't open its own side chat.",jcn=()=>"侧边对话不能再开启自己的侧边对话。",Acn=()=>"گفت‌وگوی جانبی نمی‌تواند گفت‌وگوی جانبی خودش را باز کند.",Tcn=()=>"لا يمكن للمحادثة الجانبية فتح محادثة جانبية خاصة بها.",Rcn=()=>"Un chat lateral no puede abrir su propio chat lateral.",Mcn=()=>"साइड चैट अपनी खुद की साइड चैट नहीं खोल सकती।",Ocn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?jcn():t==="fa"?Acn():t==="ar"?Tcn():t==="es"?Rcn():t==="hi"?Mcn():zcn()}),Dcn=()=>"Side chat",Lcn=()=>"侧边对话",Icn=()=>"گفت‌وگوی جانبی",$cn=()=>"محادثة جانبية",Bcn=()=>"Chat lateral",Pcn=()=>"साइड चैट",F3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Lcn():t==="fa"?Icn():t==="ar"?$cn():t==="es"?Bcn():t==="hi"?Pcn():Dcn()}),Fcn=e=>`Couldn't open a side chat: ${e==null?void 0:e.error}`,Hcn=e=>`无法打开侧边对话:${e==null?void 0:e.error}`,qcn=e=>`باز کردن گفت‌وگوی جانبی ممکن نشد: ${e==null?void 0:e.error}`,Ucn=e=>`تعذّر فتح محادثة جانبية: ${e==null?void 0:e.error}`,Gcn=e=>`No se pudo abrir un chat lateral: ${e==null?void 0:e.error}`,Vcn=e=>`साइड चैट नहीं खुल सकी: ${e==null?void 0:e.error}`,Kcn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hcn(e):t==="fa"?qcn(e):t==="ar"?Ucn(e):t==="es"?Gcn(e):t==="hi"?Vcn(e):Fcn(e)}),Wcn=()=>"Ask a quick question in a temporary side chat",Qcn=()=>"在临时侧边对话中快速提问",Xcn=()=>"یک پرسش کوتاه را در گفت‌وگوی جانبی موقت بپرسید",Ycn=()=>"اطرح سؤالًا سريعًا في محادثة جانبية مؤقتة",Zcn=()=>"Haz una pregunta rápida en un chat lateral temporal",Jcn=()=>"अस्थायी साइड चैट में एक छोटा सवाल पूछें",eln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qcn():t==="fa"?Xcn():t==="ar"?Ycn():t==="es"?Zcn():t==="hi"?Jcn():Wcn()}),tln=()=>"Skill",nln=()=>"技能",rln=()=>"مهارت",sln=()=>"مهارة",iln=()=>"Skill",aln=()=>"स्किल",oln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?nln():t==="fa"?rln():t==="ar"?sln():t==="es"?iln():t==="hi"?aln():tln()}),cln=()=>"Loading skill…",lln=()=>"正在加载技能…",uln=()=>"در حال بارگیری مهارت…",_ln=()=>"جارٍ تحميل المهارة…",fln=()=>"Cargando skill…",dln=()=>"स्किल लोड हो रही है…",hln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lln():t==="fa"?uln():t==="ar"?_ln():t==="es"?fln():t==="hi"?dln():cln()}),pln=()=>"Personal",mln=()=>"个人",gln=()=>"شخصی",vln=()=>"شخصي",bln=()=>"Personal",yln=()=>"व्यक्तिगत",xln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mln():t==="fa"?gln():t==="ar"?vln():t==="es"?bln():t==="hi"?yln():pln()}),wln=()=>"Alternatively, tell your agent to save a reusable skill for you.",kln=()=>"或者,请你的智能体为你保存可重复使用的技能。",Sln=()=>"یا از عامل خود بخواهید یک مهارت قابل استفادهٔ مجدد برایتان ذخیره کند.",Cln=()=>"أو بدلًا من ذلك، اطلب من وكيلك حفظ مهارة قابلة لإعادة الاستخدام لك.",Eln=()=>"También puedes pedirle a tu agente que guarde una skill reutilizable por ti.",Nln=()=>"या अपने एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल सेव करने को कहें।",zln=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kln():t==="fa"?Sln():t==="ar"?Cln():t==="es"?Eln():t==="hi"?Nln():wln()}),jln=e=>`Delete the “${e==null?void 0:e.name}” skill?`,Aln=e=>`删除技能“${e==null?void 0:e.name}”?`,Tln=e=>`مهارت «${e==null?void 0:e.name}» حذف شود؟`,Rln=e=>`حذف مهارة «${e==null?void 0:e.name}»؟`,Mln=e=>`¿Eliminar la skill “${e==null?void 0:e.name}”?`,Oln=e=>`“${e==null?void 0:e.name}” स्किल हटाएं?`,Dln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Aln(e):t==="fa"?Tln(e):t==="ar"?Rln(e):t==="es"?Mln(e):t==="hi"?Oln(e):jln(e)}),Lln=e=>`Delete skill ${e==null?void 0:e.name}`,Iln=e=>`删除技能 ${e==null?void 0:e.name}`,$ln=e=>`حذف مهارت ${e==null?void 0:e.name}`,Bln=e=>`حذف المهارة ${e==null?void 0:e.name}`,Pln=e=>`Eliminar la skill ${e==null?void 0:e.name}`,Fln=e=>`${e==null?void 0:e.name} स्किल हटाएं`,Hln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Iln(e):t==="fa"?$ln(e):t==="ar"?Bln(e):t==="es"?Pln(e):t==="hi"?Fln(e):Lln(e)}),qln=e=>`Delete the “${e==null?void 0:e.name}” template?`,Uln=e=>`删除模板“${e==null?void 0:e.name}”?`,Gln=e=>`قالب «${e==null?void 0:e.name}» حذف شود؟`,Vln=e=>`حذف قالب «${e==null?void 0:e.name}»؟`,Kln=e=>`¿Eliminar la plantilla “${e==null?void 0:e.name}”?`,Wln=e=>`“${e==null?void 0:e.name}” टेम्पलेट हटाएं?`,Qln=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Uln(e):t==="fa"?Gln(e):t==="ar"?Vln(e):t==="es"?Kln(e):t==="hi"?Wln(e):qln(e)}),Xln=e=>`Delete template ${e==null?void 0:e.name}`,Yln=e=>`删除模板 ${e==null?void 0:e.name}`,Zln=e=>`حذف قالب ${e==null?void 0:e.name}`,Jln=e=>`حذف القالب ${e==null?void 0:e.name}`,eun=e=>`Eliminar la plantilla ${e==null?void 0:e.name}`,tun=e=>`${e==null?void 0:e.name} टेम्पलेट हटाएं`,nun=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Yln(e):t==="fa"?Zln(e):t==="ar"?Jln(e):t==="es"?eun(e):t==="hi"?tun(e):Xln(e)}),run=()=>"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.",sun=()=>"在聊天中使用 /name 调用技能。来自编程代理的技能会先经过研究相关性筛选,再导入。您也可以自行上传技能,或让 OpenResearch 代理为您创建并添加可复用技能。",iun=()=>"مهارت‌ها را با /name در گفتگو فراخوانی کنید. مهارت‌های عامل‌های برنامه‌نویسی پیش از وارد شدن از نظر ارتباط با پژوهش بررسی می‌شوند. می‌توانید مهارت را خودتان بارگذاری کنید یا از عامل OpenResearch بخواهید یک مهارت قابل استفادهٔ مجدد بسازد و اضافه کند.",aun=()=>"استدعِ المهارات عبر ‎/name‎ في المحادثة. تُفحَص مهارات وكلاء البرمجة لديك للتأكد من صلتها بالبحث قبل استيرادها. ارفع مهارة لتضمينها بنفسك. أو بدلًا من ذلك، اطلب من وكيل OpenResearch إنشاء مهارة قابلة لإعادة الاستخدام وإضافتها لك.",oun=()=>"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.",cun=()=>"चैट में /नाम से स्किल इस्तेमाल करें। आपके कोडिंग एजेंटों की स्किल इंपोर्ट करने से पहले शोध प्रासंगिकता के लिए जाँची जाती हैं। खुद स्किल शामिल करने के लिए एक अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक पुनः-प्रयोग करने योग्य स्किल बनाने और जोड़ने को कहें।",lun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sun():t==="fa"?iun():t==="ar"?aun():t==="es"?oun():t==="hi"?cun():run()}),uun=()=>"Drop a SKILL.md or .zip here, or click to choose",_un=()=>"将 SKILL.md 或 .zip 拖放到此处,或点击选择",fun=()=>"یک فایل SKILL.md یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",dun=()=>"أفلِت ملف ‎SKILL.md‎ أو ‎.zip‎ هنا، أو انقر للاختيار",hun=()=>"Suelta aquí un SKILL.md o un .zip, o haz clic para elegirlo",pun=()=>"यहाँ एक SKILL.md या .zip छोड़ें, या चुनने के लिए क्लिक करें",mun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_un():t==="fa"?fun():t==="ar"?dun():t==="es"?hun():t==="hi"?pun():uun()}),gun=()=>"Drop a .tex or .zip here, or click to choose",vun=()=>"将 .tex 或 .zip 拖放到此处,或点击选择",bun=()=>"یک فایل .tex یا .zip را اینجا رها کنید، یا برای انتخاب کلیک کنید",yun=()=>"أفلِت ملف ‎.tex‎ أو ‎.zip‎ هنا، أو انقر للاختيار",xun=()=>"Suelta aquí un .tex o un .zip, o haz clic para elegirlo",wun=()=>"यहाँ एक .tex या .zip छोड़ें, या चुनने के लिए क्लिक करें",kun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vun():t==="fa"?bun():t==="ar"?yun():t==="es"?xun():t==="hi"?wun():gun()}),Sun=()=>"File too large (max 20 MB).",Cun=()=>"文件过大(最大 20 MB)。",Eun=()=>"فایل بیش از حد بزرگ است (حداکثر ۲۰ مگابایت).",Nun=()=>"الملف كبير جدًا (بحد أقصى 20 ميغابايت).",zun=()=>"Archivo demasiado grande (máx. 20 MB).",jun=()=>"फ़ाइल बहुत बड़ी है (अधिकतम 20 MB)।",xI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cun():t==="fa"?Eun():t==="ar"?Nun():t==="es"?zun():t==="hi"?jun():Sun()}),Aun=()=>" + 1 file",Tun=()=>" + 1 个文件",Run=()=>" + ۱ فایل",Mun=()=>" + ملف واحد",Oun=()=>" + 1 archivo",Dun=()=>" + 1 फ़ाइल",Lun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tun():t==="fa"?Run():t==="ar"?Mun():t==="es"?Oun():t==="hi"?Dun():Aun()}),Iun=()=>"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.",$un=()=>"自定义所有项目中可用的技能和 LaTeX 模板。在此上传,或让 OpenResearch 代理为您创建并添加。",Bun=()=>"مهارت‌ها و قالب‌های LaTeX قابل استفاده در همهٔ پروژه‌ها را سفارشی کنید. آن‌ها را اینجا بارگذاری کنید یا از عامل OpenResearch بخواهید برایتان بسازد و اضافه کند.",Pun=()=>"خصّص المهارات وقوالب LaTeX المتاحة عبر مشاريعك. ارفعها هنا، أو اطلب من وكيل OpenResearch إنشاءها وإضافتها لك.",Fun=()=>"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.",Hun=()=>"अपने प्रोजेक्ट में उपलब्ध स्किल और LaTeX टेम्पलेट कस्टमाइज़ करें। उन्हें यहाँ अपलोड करें, या किसी OpenResearch एजेंट से आपके लिए उन्हें बनाने और जोड़ने को कहें।",qun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$un():t==="fa"?Bun():t==="ar"?Pun():t==="es"?Fun():t==="hi"?Hun():Iun()}),Uun=()=>"Remove from OpenResearch",Gun=()=>"从 OpenResearch 移除",Vun=()=>"حذف از OpenResearch",Kun=()=>"إزالة من OpenResearch",Wun=()=>"Quitar de OpenResearch",Qun=()=>"OpenResearch से हटाएं",Xun=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gun():t==="fa"?Vun():t==="ar"?Kun():t==="es"?Wun():t==="hi"?Qun():Uun()}),Yun=e=>`Remove “${e==null?void 0:e.name}” from OpenResearch? Its source files will remain in your coding agent.`,Zun=e=>`从 OpenResearch 移除“${e==null?void 0:e.name}”?源文件将保留在你的编程智能体中。`,Jun=e=>`«${e==null?void 0:e.name}» از OpenResearch حذف شود؟ فایل‌های اصلی در عامل برنامه‌نویسی شما باقی می‌مانند.`,e_n=e=>`إزالة «${e==null?void 0:e.name}» من OpenResearch؟ ستبقى ملفاتها المصدرية في وكيل البرمجة الخاص بك.`,t_n=e=>`¿Quitar “${e==null?void 0:e.name}” de OpenResearch? Sus archivos originales se conservarán en tu agente de programación.`,n_n=e=>`“${e==null?void 0:e.name}” को OpenResearch से हटाएं? इसकी सोर्स फ़ाइलें आपके कोडिंग एजेंट में बनी रहेंगी।`,r_n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Zun(e):t==="fa"?Jun(e):t==="ar"?e_n(e):t==="es"?t_n(e):t==="hi"?n_n(e):Yun(e)}),s_n=e=>`Remove ${e==null?void 0:e.name} from OpenResearch`,i_n=e=>`从 OpenResearch 移除 ${e==null?void 0:e.name}`,a_n=e=>`حذف ${e==null?void 0:e.name} از OpenResearch`,o_n=e=>`إزالة ${e==null?void 0:e.name} من OpenResearch`,c_n=e=>`Quitar ${e==null?void 0:e.name} de OpenResearch`,l_n=e=>`${e==null?void 0:e.name} को OpenResearch से हटाएं`,u_n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?i_n(e):t==="fa"?a_n(e):t==="ar"?o_n(e):t==="es"?c_n(e):t==="hi"?l_n(e):s_n(e)}),__n=e=>` + ${e==null?void 0:e.count} files`,f_n=e=>` + ${e==null?void 0:e.count} 个文件`,d_n=e=>` + ${e==null?void 0:e.count} فایل`,h_n=e=>` + ملفات (${e==null?void 0:e.count})`,p_n=e=>` + ${e==null?void 0:e.count} archivos`,m_n=e=>` + ${e==null?void 0:e.count} फ़ाइलें`,g_n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?f_n(e):t==="fa"?d_n(e):t==="ar"?h_n(e):t==="es"?p_n(e):t==="hi"?m_n(e):__n(e)}),v_n=()=>"Could not load skills:",b_n=()=>"无法加载技能:",y_n=()=>"بارگیری مهارت‌ها ممکن نشد:",x_n=()=>"تعذّر تحميل المهارات:",w_n=()=>"No se pudieron cargar las skills:",k_n=()=>"स्किल लोड नहीं हो सकीं:",S_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b_n():t==="fa"?y_n():t==="ar"?x_n():t==="es"?w_n():t==="hi"?k_n():v_n()}),C_n=()=>"Could not load templates:",E_n=()=>"无法加载模板:",N_n=()=>"بارگیری قالب‌ها ممکن نشد:",z_n=()=>"تعذّر تحميل القوالب:",j_n=()=>"No se pudieron cargar las plantillas:",A_n=()=>"टेम्पलेट लोड नहीं हो सके:",T_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E_n():t==="fa"?N_n():t==="ar"?z_n():t==="es"?j_n():t==="hi"?A_n():C_n()}),R_n=()=>"Customize",M_n=()=>"自定义",O_n=()=>"سفارشی‌سازی",D_n=()=>"تخصيص",L_n=()=>"Personalizar",I_n=()=>"कस्टमाइज़ करें",$_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M_n():t==="fa"?O_n():t==="ar"?D_n():t==="es"?L_n():t==="hi"?I_n():R_n()}),B_n=()=>"Delete skill",P_n=()=>"删除技能",F_n=()=>"حذف مهارت",H_n=()=>"حذف المهارة",q_n=()=>"Eliminar skill",U_n=()=>"स्किल हटाएं",G_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P_n():t==="fa"?F_n():t==="ar"?H_n():t==="es"?q_n():t==="hi"?U_n():B_n()}),V_n=()=>"Delete template",K_n=()=>"删除模板",W_n=()=>"حذف قالب",Q_n=()=>"حذف القالب",X_n=()=>"Eliminar plantilla",Y_n=()=>"टेम्पलेट हटाएं",Z_n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K_n():t==="fa"?W_n():t==="ar"?Q_n():t==="es"?X_n():t==="hi"?Y_n():V_n()}),J_n=()=>"LaTeX templates",efn=()=>"LaTeX 模板",tfn=()=>"قالب‌های LaTeX",nfn=()=>"قوالب LaTeX",rfn=()=>"Plantillas de LaTeX",sfn=()=>"LaTeX टेम्पलेट",ifn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?efn():t==="fa"?tfn():t==="ar"?nfn():t==="es"?rfn():t==="hi"?sfn():J_n()}),afn=()=>"Loading skills…",ofn=()=>"正在加载技能…",cfn=()=>"در حال بارگیری مهارت‌ها…",lfn=()=>"جارٍ تحميل المهارات…",ufn=()=>"Cargando skills…",_fn=()=>"स्किल लोड हो रही हैं…",ffn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ofn():t==="fa"?cfn():t==="ar"?lfn():t==="es"?ufn():t==="hi"?_fn():afn()}),dfn=()=>"Loading templates…",hfn=()=>"正在加载模板…",pfn=()=>"در حال بارگیری قالب‌ها…",mfn=()=>"جارٍ تحميل القوالب…",gfn=()=>"Cargando plantillas…",vfn=()=>"टेम्पलेट लोड हो रहे हैं…",bfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hfn():t==="fa"?pfn():t==="ar"?mfn():t==="es"?gfn():t==="hi"?vfn():dfn()}),yfn=()=>"No skills yet.",xfn=()=>"尚无技能。",wfn=()=>"هنوز مهارتی وجود ندارد.",kfn=()=>"لا توجد مهارات بعد.",Sfn=()=>"Aún no hay skills.",Cfn=()=>"अभी तक कोई स्किल नहीं।",Efn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xfn():t==="fa"?wfn():t==="ar"?kfn():t==="es"?Sfn():t==="hi"?Cfn():yfn()}),Nfn=()=>"No templates yet.",zfn=()=>"尚无模板。",jfn=()=>"هنوز قالبی وجود ندارد.",Afn=()=>"لا توجد قوالب بعد.",Tfn=()=>"Aún no hay plantillas.",Rfn=()=>"अभी तक कोई टेम्पलेट नहीं।",Mfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zfn():t==="fa"?jfn():t==="ar"?Afn():t==="es"?Tfn():t==="hi"?Rfn():Nfn()}),Ofn=()=>"Skills",Dfn=()=>"技能",Lfn=()=>"مهارت‌ها",Ifn=()=>"المهارات",$fn=()=>"Skills",Bfn=()=>"स्किल",Pfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dfn():t==="fa"?Lfn():t==="ar"?Ifn():t==="es"?$fn():t==="hi"?Bfn():Ofn()}),Ffn=()=>"Uploading…",Hfn=()=>"正在上传…",qfn=()=>"در حال بارگذاری…",Ufn=()=>"جارٍ الرفع…",Gfn=()=>"Subiendo…",Vfn=()=>"अपलोड हो रहा है…",Kfn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hfn():t==="fa"?qfn():t==="ar"?Ufn():t==="es"?Gfn():t==="hi"?Vfn():Ffn()}),Wfn=()=>"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.",Qfn=()=>"代理撰写论文时使用的会议格式或自定义样式,用于替代默认导言区。上传 .tex 文件或包含 .cls 和 .sty 文件的 .zip 压缩包,也可以让 OpenResearch 代理为您创建并添加 LaTeX 模板。只有一个模板可用时,代理会直接使用,无需询问。",Xfn=()=>"قالب کنفرانس یا سبک اختصاصی که عامل به‌جای پیش‌گفتار پیش‌فرض برای نوشتن مقاله استفاده می‌کند. یک فایل .tex یا فایل .zip شامل فایل‌های .cls و .sty بارگذاری کنید، یا از عامل OpenResearch بخواهید قالب LaTeX بسازد و اضافه کند. اگر تنها یک قالب موجود باشد، عامل بدون پرسش از آن استفاده می‌کند.",Yfn=()=>"قالب مؤتمر أو تنسيق خاص بالمؤسسة يستخدمه الوكيل لكتابة الأوراق بدلًا من إعدادات LaTeX الافتراضية. ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ يحتوي على ملفات ‎.cls‎ و‎.sty‎ الخاصة به. أو اطلب من وكيل OpenResearch إنشاء قالب LaTeX وإضافته لك. عند توفّر قالب واحد فقط، يستخدمه الوكيل دون سؤال.",Zfn=()=>"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.",Jfn=()=>"एक कॉन्फ़्रेंस क्लास या हाउस स्टाइल जिसमें एजेंट अपने डिफ़ॉल्ट प्रीएंबल की बजाय पेपर लिखता है। एक .tex फ़ाइल या उसकी .cls और .sty फ़ाइलों वाली .zip अपलोड करें। या अपने OpenResearch एजेंट से आपके लिए एक LaTeX टेम्पलेट बनाने और जोड़ने को कहें। ठीक एक टेम्पलेट उपलब्ध होने पर, एजेंट बिना पूछे उसी का इस्तेमाल करता है।",edn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qfn():t==="fa"?Xfn():t==="ar"?Yfn():t==="es"?Zfn():t==="hi"?Jfn():Wfn()}),tdn=()=>"Upload a SKILL.md file or a .zip of a skill folder.",ndn=()=>"请上传 SKILL.md 文件或技能文件夹的 .zip 压缩包。",rdn=()=>"یک فایل SKILL.md یا فایل .zip از پوشهٔ مهارت بارگذاری کنید.",sdn=()=>"ارفع ملف ‎SKILL.md‎ أو ملف ‎.zip‎ لمجلد مهارة.",idn=()=>"Sube un archivo SKILL.md o un .zip con la carpeta de la skill.",adn=()=>"एक SKILL.md फ़ाइल या स्किल फ़ोल्डर की .zip अपलोड करें।",odn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ndn():t==="fa"?rdn():t==="ar"?sdn():t==="es"?idn():t==="hi"?adn():tdn()}),cdn=()=>"Upload a .tex file or a .zip of a template folder.",ldn=()=>"请上传 .tex 文件或模板文件夹的 .zip 压缩包。",udn=()=>"یک فایل .tex یا فایل .zip از پوشهٔ قالب بارگذاری کنید.",_dn=()=>"ارفع ملف ‎.tex‎ أو ملف ‎.zip‎ لمجلد قالب.",fdn=()=>"Sube un archivo .tex o un .zip con la carpeta de la plantilla.",ddn=()=>"एक .tex फ़ाइल या टेम्पलेट फ़ोल्डर की .zip अपलोड करें।",hdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ldn():t==="fa"?udn():t==="ar"?_dn():t==="es"?fdn():t==="hi"?ddn():cdn()}),pdn=()=>"Close SSH config",mdn=()=>"关闭 SSH 配置",gdn=()=>"بستن پیکربندی SSH",vdn=()=>"إغلاق إعداد SSH",bdn=()=>"Cerrar la configuración SSH",ydn=()=>"SSH कॉन्फ़िग बंद करें",xdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?mdn():t==="fa"?gdn():t==="ar"?vdn():t==="es"?bdn():t==="hi"?ydn():pdn()}),wdn=()=>"Discard your unsaved SSH config changes?",kdn=()=>"要放弃未保存的 SSH 配置更改吗?",Sdn=()=>"تغییرات ذخیره‌نشدهٔ پیکربندی SSH کنار گذاشته شود؟",Cdn=()=>"تجاهل تغييرات إعداد SSH غير المحفوظة؟",Edn=()=>"¿Descartar los cambios sin guardar en la configuración SSH?",Ndn=()=>"आपके सेव न किए गए SSH कॉन्फ़िग बदलाव छोड़ें?",zdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?kdn():t==="fa"?Sdn():t==="ar"?Cdn():t==="es"?Edn():t==="hi"?Ndn():wdn()}),jdn=()=>"Loading SSH config…",Adn=()=>"正在加载 SSH 配置…",Tdn=()=>"در حال بارگیری پیکربندی SSH…",Rdn=()=>"جارٍ تحميل إعداد SSH…",Mdn=()=>"Cargando la configuración SSH…",Odn=()=>"SSH कॉन्फ़िग लोड हो रहा है…",Ddn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Adn():t==="fa"?Tdn():t==="ar"?Rdn():t==="es"?Mdn():t==="hi"?Odn():jdn()}),Ldn=()=>"SSH config saved",Idn=()=>"SSH 配置已保存",$dn=()=>"پیکربندی SSH ذخیره شد",Bdn=()=>"تم حفظ إعداد SSH",Pdn=()=>"Configuración SSH guardada",Fdn=()=>"SSH कॉन्फ़िग सेव हो गया",Hdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Idn():t==="fa"?$dn():t==="ar"?Bdn():t==="es"?Pdn():t==="hi"?Fdn():Ldn()}),qdn=()=>"SSH config",Udn=()=>"SSH 配置",Gdn=()=>"پیکربندی SSH",Vdn=()=>"إعداد SSH",Kdn=()=>"Configuración SSH",Wdn=()=>"SSH कॉन्फ़िग",Qdn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Udn():t==="fa"?Gdn():t==="ar"?Vdn():t==="es"?Kdn():t==="hi"?Wdn():qdn()}),Xdn=()=>"Configure SSH hosts…",Ydn=()=>"配置 SSH 主机…",Zdn=()=>"پیکربندی میزبان‌های SSH…",Jdn=()=>"إعداد مضيفات SSH…",ehn=()=>"Configurar hosts SSH…",thn=()=>"SSH होस्ट कॉन्फ़िगर करें…",wI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ydn():t==="fa"?Zdn():t==="ar"?Jdn():t==="es"?ehn():t==="hi"?thn():Xdn()}),nhn=()=>"Container name or ID",rhn=()=>"容器名称或 ID",shn=()=>"نام یا شناسهٔ کانتینر",ihn=()=>"اسم الحاوية أو معرّفها",ahn=()=>"Nombre o ID del contenedor",ohn=()=>"कंटेनर का नाम या ID",chn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rhn():t==="fa"?shn():t==="ar"?ihn():t==="es"?ahn():t==="hi"?ohn():nhn()}),lhn=()=>"Default SSH host",uhn=()=>"默认 SSH 主机",_hn=()=>"میزبان پیش‌فرض SSH",fhn=()=>"مضيف SSH الافتراضي",dhn=()=>"Servidor SSH predeterminado",hhn=()=>"डिफ़ॉल्ट SSH होस्ट",phn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?uhn():t==="fa"?_hn():t==="ar"?fhn():t==="es"?dhn():t==="hi"?hhn():lhn()}),mhn=()=>"Direct host",ghn=()=>"直接在主机上",vhn=()=>"مستقیماً روی میزبان",bhn=()=>"المضيف مباشرة",yhn=()=>"Servidor directamente",xhn=()=>"सीधे होस्ट पर",whn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ghn():t==="fa"?vhn():t==="ar"?bhn():t==="es"?yhn():t==="hi"?xhn():mhn()}),khn=()=>"Existing container",Shn=()=>"现有容器",Chn=()=>"کانتینر موجود",Ehn=()=>"حاوية موجودة",Nhn=()=>"Contenedor existente",zhn=()=>"मौजूदा कंटेनर",jhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Shn():t==="fa"?Chn():t==="ar"?Ehn():t==="es"?Nhn():t==="hi"?zhn():khn()}),Ahn=()=>"Run in",Thn=()=>"运行位置",Rhn=()=>"اجرا در",Mhn=()=>"التشغيل في",Ohn=()=>"Ejecutar en",Dhn=()=>"यहाँ चलाएँ",Lhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Thn():t==="fa"?Rhn():t==="ar"?Mhn():t==="es"?Ohn():t==="hi"?Dhn():Ahn()}),Ihn=()=>"Cancelled",$hn=()=>"已取消",Bhn=()=>"لغوشده",Phn=()=>"ملغى",Fhn=()=>"Cancelado",Hhn=()=>"रद्द किया गया",qhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$hn():t==="fa"?Bhn():t==="ar"?Phn():t==="es"?Fhn():t==="hi"?Hhn():Ihn()}),Uhn=()=>"Cancelling",Ghn=()=>"正在取消",Vhn=()=>"در حال لغو",Khn=()=>"جارٍ الإلغاء",Whn=()=>"Cancelando",Qhn=()=>"रद्द हो रहा है",Xhn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ghn():t==="fa"?Vhn():t==="ar"?Khn():t==="es"?Whn():t==="hi"?Qhn():Uhn()}),Yhn=()=>"Done",Zhn=()=>"已完成",Jhn=()=>"انجام‌شده",epn=()=>"تم",tpn=()=>"Completado",npn=()=>"पूरा हुआ",kI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zhn():t==="fa"?Jhn():t==="ar"?epn():t==="es"?tpn():t==="hi"?npn():Yhn()}),rpn=()=>"Editing",spn=()=>"正在编辑",ipn=()=>"در حال ویرایش",apn=()=>"قيد التعديل",opn=()=>"Editando",cpn=()=>"संपादित हो रहा है",lpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?spn():t==="fa"?ipn():t==="ar"?apn():t==="es"?opn():t==="hi"?cpn():rpn()}),upn=()=>"Failed",_pn=()=>"失败",fpn=()=>"ناموفق",dpn=()=>"فشل",hpn=()=>"Error",ppn=()=>"विफल",mpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_pn():t==="fa"?fpn():t==="ar"?dpn():t==="es"?hpn():t==="hi"?ppn():upn()}),gpn=()=>"Idle",vpn=()=>"空闲",bpn=()=>"بی‌کار",ypn=()=>"خامل",xpn=()=>"Inactivo",wpn=()=>"निष्क्रिय",kpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vpn():t==="fa"?bpn():t==="ar"?ypn():t==="es"?xpn():t==="hi"?wpn():gpn()}),Spn=()=>"Running",Cpn=()=>"运行中",Epn=()=>"در حال اجرا",Npn=()=>"قيد التشغيل",zpn=()=>"En ejecución",jpn=()=>"चल रहा है",Apn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cpn():t==="fa"?Epn():t==="ar"?Npn():t==="es"?zpn():t==="hi"?jpn():Spn()}),Tpn=()=>"Starting",Rpn=()=>"正在启动",Mpn=()=>"در حال آغاز",Opn=()=>"جارٍ البدء",Dpn=()=>"Iniciando",Lpn=()=>"शुरू हो रहा है",Ipn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rpn():t==="fa"?Mpn():t==="ar"?Opn():t==="es"?Dpn():t==="hi"?Lpn():Tpn()}),$pn=()=>"Copying…",Bpn=()=>"正在复制…",Ppn=()=>"در حال کپی…",Fpn=()=>"جارٍ النسخ…",Hpn=()=>"Copiando…",qpn=()=>"कॉपी हो रहा है…",Upn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bpn():t==="fa"?Ppn():t==="ar"?Fpn():t==="es"?Hpn():t==="hi"?qpn():$pn()}),Gpn=()=>"Finalizing…",Vpn=()=>"正在完成…",Kpn=()=>"در حال نهایی‌سازی…",Wpn=()=>"جارٍ الإنهاء…",Qpn=()=>"Finalizando…",Xpn=()=>"अंतिम रूप दिया जा रहा है…",Ypn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vpn():t==="fa"?Kpn():t==="ar"?Wpn():t==="es"?Qpn():t==="hi"?Xpn():Gpn()}),Zpn=e=>`${e==null?void 0:e.size} free at target`,Jpn=e=>`目标位置可用空间 ${e==null?void 0:e.size}`,e0n=e=>`${e==null?void 0:e.size} فضای آزاد در مقصد`,t0n=e=>`${e==null?void 0:e.size} متاح في الوجهة`,n0n=e=>`${e==null?void 0:e.size} libres en el destino`,r0n=e=>`गंतव्य पर ${e==null?void 0:e.size} खाली`,s0n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Jpn(e):t==="fa"?e0n(e):t==="ar"?t0n(e):t==="es"?n0n(e):t==="hi"?r0n(e):Zpn(e)}),i0n=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.`,xpn=e=>`将所有 orx 数据移动到: +The store is copied to the new location and activated there. Active runs or chats will block the move.`,a0n=e=>`将所有 orx 数据移动到: ${e==null?void 0:e.path} -存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,wpn=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ +存储内容会复制到新位置并在那里启用。活跃的运行或聊天会阻止移动。`,o0n=e=>`همهٔ داده‌های orx به این محل منتقل شوند؟ ${e==null?void 0:e.path} -مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,kpn=e=>`نقل كل بيانات orx إلى: +مخزن داده به محل جدید کپی و همان‌جا فعال می‌شود. اجراها یا گفتگوهای فعال مانع انتقال خواهند شد.`,c0n=e=>`نقل كل بيانات orx إلى: ${e==null?void 0:e.path} -يُنسَخ المخزن إلى الموقع الجديد ويُفعَّل هناك. ستمنع عمليات التشغيل أو المحادثات النشطة النقل.`,Spn=e=>`¿Mover todos los datos de orx a esta ubicación? +يُنسَخ المخزن إلى الموقع الجديد ويُفعَّل هناك. ستمنع عمليات التشغيل أو المحادثات النشطة النقل.`,l0n=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.`,Cpn=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.`,u0n=e=>`सारा orx डेटा यहाँ ले जाएं: ${e==null?void 0:e.path} -स्टोर की एक कॉपी नए स्थान पर बनाई जाएगी और वहीं सक्रिय की जाएगी। सक्रिय रन या चैट स्थानांतरण को रोक सकते हैं।`,Epn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xpn(e):t==="fa"?wpn(e):t==="ar"?kpn(e):t==="es"?Spn(e):t==="hi"?Cpn(e):ypn(e)}),Npn=()=>"Move data here",zpn=()=>"将数据移动到此处",jpn=()=>"انتقال داده به اینجا",Apn=()=>"نقل البيانات إلى هنا",Tpn=()=>"Mover los datos aquí",Rpn=()=>"डेटा यहाँ ले जाएं",Mpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zpn():t==="fa"?jpn():t==="ar"?Apn():t==="es"?Tpn():t==="hi"?Rpn():Npn()}),Opn=()=>"Moving…",Dpn=()=>"正在移动…",Lpn=()=>"در حال جابه‌جایی…",Ipn=()=>"جارٍ النقل…",$pn=()=>"Moviendo…",Bpn=()=>"स्थानांतरित हो रहा है…",Ppn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dpn():t==="fa"?Lpn():t==="ar"?Ipn():t==="es"?$pn():t==="hi"?Bpn():Opn()}),Fpn=()=>"Preparing…",Hpn=()=>"正在准备…",qpn=()=>"در حال آماده‌سازی…",Upn=()=>"جارٍ التحضير…",Gpn=()=>"Preparando…",Kpn=()=>"तैयार हो रहा है…",Vpn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hpn():t==="fa"?qpn():t==="ar"?Upn():t==="es"?Gpn():t==="hi"?Kpn():Fpn()}),Wpn=()=>" (same disk, instant)",Qpn=()=>"(同一磁盘,可立即完成)",Xpn=()=>" (روی همان دیسک، فوری)",Ypn=()=>" (القرص نفسه، فوري)",Zpn=()=>" (mismo disco, instantáneo)",Jpn=()=>" (उसी डिस्क पर, तुरंत)",e0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qpn():t==="fa"?Xpn():t==="ar"?Ypn():t==="es"?Zpn():t==="hi"?Jpn():Wpn()}),t0n=()=>"default location",n0n=()=>"默认位置",r0n=()=>"محل پیش‌فرض",s0n=()=>"الموقع الافتراضي",i0n=()=>"ubicación predeterminada",a0n=()=>"डिफ़ॉल्ट स्थान",o0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?n0n():t==="fa"?r0n():t==="ar"?s0n():t==="es"?i0n():t==="hi"?a0n():t0n()}),c0n=()=>"ORX_DATA_DIR environment variable",l0n=()=>"ORX_DATA_DIR 环境变量",u0n=()=>"متغیر محیطی ORX_DATA_DIR",_0n=()=>"متغيّر البيئة ORX_DATA_DIR",f0n=()=>"variable de entorno ORX_DATA_DIR",d0n=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",h0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?l0n():t==="fa"?u0n():t==="ar"?_0n():t==="es"?f0n():t==="hi"?d0n():c0n()}),p0n=()=>"your saved setting",m0n=()=>"已保存的设置",g0n=()=>"تنظیم ذخیره‌شدهٔ شما",v0n=()=>"إعدادك المحفوظ",b0n=()=>"tu ajuste guardado",y0n=()=>"आपकी सेव की गई सेटिंग",x0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?m0n():t==="fa"?g0n():t==="ar"?v0n():t==="es"?b0n():t==="hi"?y0n():p0n()}),w0n=()=>"XDG_DATA_HOME",k0n=()=>"XDG_DATA_HOME",S0n=()=>"XDG_DATA_HOME",C0n=()=>"XDG_DATA_HOME",E0n=()=>"XDG_DATA_HOME",N0n=()=>"XDG_DATA_HOME",z0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?k0n():t==="fa"?S0n():t==="ar"?C0n():t==="es"?E0n():t==="hi"?N0n():w0n()}),j0n=()=>"Verifying…",A0n=()=>"正在验证…",T0n=()=>"در حال بررسی…",R0n=()=>"جارٍ التحقق…",M0n=()=>"Verificando…",O0n=()=>"सत्यापित हो रहा है…",D0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?A0n():t==="fa"?T0n():t==="ar"?R0n():t==="es"?M0n():t==="hi"?O0n():j0n()}),L0n=()=>"Loading…",I0n=()=>"正在加载…",$0n=()=>"در حال بارگیری…",B0n=()=>"جارٍ التحميل…",P0n=()=>"Cargando…",F0n=()=>"लोड हो रहा है…",SI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?I0n():t==="fa"?$0n():t==="ar"?B0n():t==="es"?P0n():t==="hi"?F0n():L0n()}),H0n=()=>"This sub-agent is no longer available.",q0n=()=>"此子智能体已不可用。",U0n=()=>"این عامل فرعی دیگر در دسترس نیست.",G0n=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",K0n=()=>"Este subagente ya no está disponible.",V0n=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",W0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q0n():t==="fa"?U0n():t==="ar"?G0n():t==="es"?K0n():t==="hi"?V0n():H0n()}),Q0n=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,X0n=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,Y0n=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,Z0n=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,J0n=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,emn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,tmn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?X0n(e):t==="fa"?Y0n(e):t==="ar"?Z0n(e):t==="es"?J0n(e):t==="hi"?emn(e):Q0n(e)}),nmn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,rmn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,smn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,imn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,amn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,omn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,cmn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?rmn(e):t==="fa"?smn(e):t==="ar"?imn(e):t==="es"?amn(e):t==="hi"?omn(e):nmn(e)}),lmn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",umn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",_mn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",fmn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",dmn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",hmn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",pmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?umn():t==="fa"?_mn():t==="ar"?fmn():t==="es"?dmn():t==="hi"?hmn():lmn()}),mmn=()=>", a repo for training a mini-GPT from scratch.",gmn=()=>",一个从零训练迷你 GPT 的仓库。",vmn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",bmn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",ymn=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",xmn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",wmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?gmn():t==="fa"?vmn():t==="ar"?bmn():t==="es"?ymn():t==="hi"?xmn():mmn()}),kmn=()=>"Close",Smn=()=>"关闭",Cmn=()=>"بستن",Emn=()=>"إغلاق",Nmn=()=>"Cerrar",zmn=()=>"बंद करें",q3=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Smn():t==="fa"?Cmn():t==="ar"?Emn():t==="es"?Nmn():t==="hi"?zmn():kmn()}),jmn=()=>"Create a new project",Amn=()=>"新建项目",Tmn=()=>"ایجاد پروژهٔ جدید",Rmn=()=>"إنشاء مشروع جديد",Mmn=()=>"Crear un proyecto nuevo",Omn=()=>"नया प्रोजेक्ट बनाएं",Dmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Amn():t==="fa"?Tmn():t==="ar"?Rmn():t==="es"?Mmn():t==="hi"?Omn():jmn()}),Lmn=()=>"Demo project",Imn=()=>"演示项目",$mn=()=>"پروژهٔ نمایشی",Bmn=()=>"مشروع توضيحي",Pmn=()=>"Proyecto de demostración",Fmn=()=>"डेमो प्रोजेक्ट",Hmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Imn():t==="fa"?$mn():t==="ar"?Bmn():t==="es"?Pmn():t==="hi"?Fmn():Lmn()}),qmn=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",Umn=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Gmn=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Kmn=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",Vmn=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Wmn=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",Qmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Umn():t==="fa"?Gmn():t==="ar"?Kmn():t==="es"?Vmn():t==="hi"?Wmn():qmn()}),Xmn=()=>"nanochat",Ymn=()=>"nanochat",Zmn=()=>"nanochat",Jmn=()=>"nanochat",egn=()=>"nanochat",tgn=()=>"nanochat",ngn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ymn():t==="fa"?Zmn():t==="ar"?Jmn():t==="es"?egn():t==="hi"?tgn():Xmn()}),rgn=()=>"Try the demo experiment",sgn=()=>"试试演示实验",ign=()=>"آزمایش نمایشی را امتحان کنید",agn=()=>"جرّب التجربة التوضيحية",ogn=()=>"Probar el experimento de demostración",cgn=()=>"डेमो प्रयोग आज़माएं",lgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?sgn():t==="fa"?ign():t==="ar"?agn():t==="es"?ogn():t==="hi"?cgn():rgn()}),ugn=()=>"Couldn’t save your progress. Try again.",_gn=()=>"无法保存进度。请重试。",fgn=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",dgn=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",hgn=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",pgn=()=>"आपकी प्रगति सेव नहीं हो सकी। फिर से कोशिश करें।",mgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_gn():t==="fa"?fgn():t==="ar"?dgn():t==="es"?hgn():t==="hi"?pgn():ugn()}),ggn=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",vgn=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",bgn=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",ygn=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",xgn=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",wgn=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",kgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vgn():t==="fa"?bgn():t==="ar"?ygn():t==="es"?xgn():t==="hi"?wgn():ggn()}),Sgn=()=>"Welcome to OpenResearch",Cgn=()=>"欢迎使用 OpenResearch",Egn=()=>"به OpenResearch خوش آمدید",Ngn=()=>"مرحبًا بك في OpenResearch",zgn=()=>"Te damos la bienvenida a OpenResearch",jgn=()=>"OpenResearch में आपका स्वागत है",Agn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cgn():t==="fa"?Egn():t==="ar"?Ngn():t==="es"?zgn():t==="hi"?jgn():Sgn()}),Tgn=()=>"All experiments are archived. Turn on Show archived to view them.",Rgn=()=>"所有实验均已归档。开启“显示已归档”即可查看。",Mgn=()=>"همه آزمایش‌ها بایگانی شده‌اند. برای دیدنشان نمایش بایگانی‌شده‌ها را فعال کنید.",Ogn=()=>"جميع التجارب مؤرشفة. فعّل إظهار المؤرشف لعرضها.",Dgn=()=>"Todos los experimentos están archivados. Activa Mostrar archivados para verlos.",Lgn=()=>"सभी प्रयोग संग्रहीत हैं। उन्हें देखने के लिए संग्रहीत दिखाएँ चालू करें।",Ign=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Rgn():t==="fa"?Mgn():t==="ar"?Ogn():t==="es"?Dgn():t==="hi"?Lgn():Tgn()}),$gn=()=>"Archive ancestors",Bgn=()=>"归档祖先节点",Pgn=()=>"بایگانی نیاکان",Fgn=()=>"أرشفة الأسلاف",Hgn=()=>"Archivar antepasados",qgn=()=>"पूर्वजों को संग्रहीत करें",Ugn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bgn():t==="fa"?Pgn():t==="ar"?Fgn():t==="es"?Hgn():t==="hi"?qgn():$gn()}),Ggn=()=>"Archive descendants",Kgn=()=>"归档后代节点",Vgn=()=>"بایگانی نوادگان",Wgn=()=>"أرشفة الفروع التابعة",Qgn=()=>"Archivar descendientes",Xgn=()=>"वंशजों को संग्रहीत करें",Ygn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kgn():t==="fa"?Vgn():t==="ar"?Wgn():t==="es"?Qgn():t==="hi"?Xgn():Ggn()}),Zgn=()=>"Manage",Jgn=()=>"管理",e1n=()=>"مدیریت",t1n=()=>"إدارة",n1n=()=>"Gestionar",r1n=()=>"प्रबंधित करें",s1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jgn():t==="fa"?e1n():t==="ar"?t1n():t==="es"?n1n():t==="hi"?r1n():Zgn()}),i1n=e=>`Manage ${e==null?void 0:e.name}`,a1n=e=>`管理 ${e==null?void 0:e.name}`,o1n=e=>`مدیریت ${e==null?void 0:e.name}`,c1n=e=>`إدارة ${e==null?void 0:e.name}`,l1n=e=>`Gestionar ${e==null?void 0:e.name}`,u1n=e=>`${e==null?void 0:e.name} प्रबंधित करें`,vj=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?a1n(e):t==="fa"?o1n(e):t==="ar"?c1n(e):t==="es"?l1n(e):t==="hi"?u1n(e):i1n(e)}),_1n=()=>"Archive this experiment",f1n=()=>"归档此实验",d1n=()=>"بایگانی این آزمایش",h1n=()=>"أرشفة هذه التجربة",p1n=()=>"Archivar este experimento",m1n=()=>"इस प्रयोग को संग्रहीत करें",g1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?f1n():t==="fa"?d1n():t==="ar"?h1n():t==="es"?p1n():t==="hi"?m1n():_1n()}),v1n=()=>"Archived",b1n=()=>"已归档",y1n=()=>"بایگانی‌شده",x1n=()=>"مؤرشف",w1n=()=>"Archivado",k1n=()=>"संग्रहीत",CI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b1n():t==="fa"?y1n():t==="ar"?x1n():t==="es"?w1n():t==="hi"?k1n():v1n()}),S1n=e=>`${e==null?void 0:e.count} archived`,C1n=e=>`${e==null?void 0:e.count} 个已归档`,E1n=e=>`${e==null?void 0:e.count} بایگانی‌شده`,N1n=e=>`${e==null?void 0:e.count} مؤرشفة`,z1n=e=>`${e==null?void 0:e.count} archivados`,j1n=e=>`${e==null?void 0:e.count} संग्रहीत`,A1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?C1n(e):t==="fa"?E1n(e):t==="ar"?N1n(e):t==="es"?z1n(e):t==="hi"?j1n(e):S1n(e)}),T1n=()=>"Baseline",R1n=()=>"基线",M1n=()=>"مبنا",O1n=()=>"الأساس",D1n=()=>"Base",L1n=()=>"बेसलाइन",I1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?R1n():t==="fa"?M1n():t==="ar"?O1n():t==="es"?D1n():t==="hi"?L1n():T1n()}),$1n=()=>"Experiment",B1n=()=>"实验",P1n=()=>"آزمایش",F1n=()=>"تجربة",H1n=()=>"Experimento",q1n=()=>"प्रयोग",rl=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?B1n():t==="fa"?P1n():t==="ar"?F1n():t==="es"?H1n():t==="hi"?q1n():$1n()}),U1n=e=>`${e==null?void 0:e.count} experiments`,G1n=e=>`${e==null?void 0:e.count} 个实验`,K1n=e=>`${e==null?void 0:e.count} آزمایش`,V1n=e=>`التجارب: ${e==null?void 0:e.count}`,W1n=e=>`${e==null?void 0:e.count} experimentos`,Q1n=e=>`${e==null?void 0:e.count} प्रयोग`,X1n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?G1n(e):t==="fa"?K1n(e):t==="ar"?V1n(e):t==="es"?W1n(e):t==="hi"?Q1n(e):U1n(e)}),Y1n=()=>"hidden",Z1n=()=>"已隐藏",J1n=()=>"پنهان",evn=()=>"مخفية",tvn=()=>"ocultos",nvn=()=>"छिपे हुए",rvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Z1n():t==="fa"?J1n():t==="ar"?evn():t==="es"?tvn():t==="hi"?nvn():Y1n()}),svn=()=>"1 experiment",ivn=()=>"1 个实验",avn=()=>"۱ آزمایش",ovn=()=>"تجربة واحدة",cvn=()=>"1 experimento",lvn=()=>"1 प्रयोग",uvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ivn():t==="fa"?avn():t==="ar"?ovn():t==="es"?cvn():t==="hi"?lvn():svn()}),_vn=()=>"Restore archived ancestors",fvn=()=>"恢复已归档的祖先节点",dvn=()=>"بازیابی نیاکان بایگانی‌شده",hvn=()=>"استعادة الأسلاف المؤرشفين",pvn=()=>"Restaurar antepasados archivados",mvn=()=>"संग्रहीत पूर्वजों को पुनर्स्थापित करें",gvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?fvn():t==="fa"?dvn():t==="ar"?hvn():t==="es"?pvn():t==="hi"?mvn():_vn()}),vvn=e=>`Restore ${e==null?void 0:e.count} archived experiments`,bvn=e=>`恢复 ${e==null?void 0:e.count} 个已归档实验`,yvn=e=>`بازیابی ${e==null?void 0:e.count} آزمایش بایگانی‌شده`,xvn=e=>`استعادة ${e==null?void 0:e.count} تجارب مؤرشفة`,wvn=e=>`Restaurar ${e==null?void 0:e.count} experimentos archivados`,kvn=e=>`${e==null?void 0:e.count} संग्रहीत प्रयोग पुनर्स्थापित करें`,Svn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?bvn(e):t==="fa"?yvn(e):t==="ar"?xvn(e):t==="es"?wvn(e):t==="hi"?kvn(e):vvn(e)}),Cvn=()=>"Restore descendants",Evn=()=>"恢复后代节点",Nvn=()=>"بازیابی نوادگان",zvn=()=>"استعادة الفروع التابعة",jvn=()=>"Restaurar descendientes",Avn=()=>"वंशजों को पुनर्स्थापित करें",Tvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Evn():t==="fa"?Nvn():t==="ar"?zvn():t==="es"?jvn():t==="hi"?Avn():Cvn()}),Rvn=()=>"Restore this experiment",Mvn=()=>"恢复此实验",Ovn=()=>"بازیابی این آزمایش",Dvn=()=>"استعادة هذه التجربة",Lvn=()=>"Restaurar este experimento",Ivn=()=>"इस प्रयोग को पुनर्स्थापित करें",EI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mvn():t==="fa"?Ovn():t==="ar"?Dvn():t==="es"?Lvn():t==="hi"?Ivn():Rvn()}),$vn=()=>"Running",Bvn=()=>"运行中",Pvn=()=>"در حال اجرا",Fvn=()=>"قيد التشغيل",Hvn=()=>"En ejecución",qvn=()=>"चल रहा है",Uvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Bvn():t==="fa"?Pvn():t==="ar"?Fvn():t==="es"?Hvn():t==="hi"?qvn():$vn()}),Gvn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",Kvn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",Vvn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Wvn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",Qvn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",Xvn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",Yvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kvn():t==="fa"?Vvn():t==="ar"?Wvn():t==="es"?Qvn():t==="hi"?Xvn():Gvn()}),Zvn=()=>"Ask the agent in chat to create and run your first experiment.",Jvn=()=>"在聊天中让智能体创建并运行你的第一个实验。",ebn=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",tbn=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",nbn=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",rbn=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",sbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Jvn():t==="fa"?ebn():t==="ar"?tbn():t==="es"?nbn():t==="hi"?rbn():Zvn()}),ibn=()=>"Code",abn=()=>"代码",obn=()=>"کد",cbn=()=>"الشيفرة",lbn=()=>"Código",ubn=()=>"कोड",_bn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?abn():t==="fa"?obn():t==="ar"?cbn():t==="es"?lbn():t==="hi"?ubn():ibn()}),fbn=()=>"Logs",dbn=()=>"日志",hbn=()=>"گزارش‌ها",pbn=()=>"السجلات",mbn=()=>"Logs",gbn=()=>"लॉग",NI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?dbn():t==="fa"?hbn():t==="ar"?pbn():t==="es"?mbn():t==="hi"?gbn():fbn()}),vbn=()=>"No experiments from the current task yet",bbn=()=>"当前任务尚无实验",ybn=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",xbn=()=>"لا توجد تجارب من المهمة الحالية بعد",wbn=()=>"Aún no hay experimentos de la tarea actual",kbn=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",Sbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?bbn():t==="fa"?ybn():t==="ar"?xbn():t==="es"?wbn():t==="hi"?kbn():vbn()}),Cbn=()=>"No experiments yet",Ebn=()=>"尚无实验",Nbn=()=>"هنوز آزمایشی وجود ندارد",zbn=()=>"لا توجد تجارب بعد",jbn=()=>"Aún no hay experimentos",Abn=()=>"अभी तक कोई प्रयोग नहीं",Tbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ebn():t==="fa"?Nbn():t==="ar"?zbn():t==="es"?jbn():t==="hi"?Abn():Cbn()}),Rbn=()=>"no runs",Mbn=()=>"无运行",Obn=()=>"بدون اجرا",Dbn=()=>"لا عمليات تشغيل",Lbn=()=>"sin ejecuciones",Ibn=()=>"कोई रन नहीं",$bn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Mbn():t==="fa"?Obn():t==="ar"?Dbn():t==="es"?Lbn():t==="hi"?Ibn():Rbn()}),Bbn=()=>"Open logs",Pbn=()=>"打开日志",Fbn=()=>"باز کردن گزارش‌ها",Hbn=()=>"فتح السجلات",qbn=()=>"Abrir logs",Ubn=()=>"लॉग खोलें",Gbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pbn():t==="fa"?Fbn():t==="ar"?Hbn():t==="es"?qbn():t==="hi"?Ubn():Bbn()}),Kbn=()=>"Runs",Vbn=()=>"运行",Wbn=()=>"اجراها",Qbn=()=>"عمليات التشغيل",Xbn=()=>"Ejecuciones",Ybn=()=>"रन",Zbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Vbn():t==="fa"?Wbn():t==="ar"?Qbn():t==="es"?Xbn():t==="hi"?Ybn():Kbn()}),Jbn=()=>"Switch to Entire project to see all experiments",eyn=()=>"切换到“整个项目”以查看所有实验",tyn=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",nyn=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",ryn=()=>"Cambia a Todo el proyecto para ver todos los experimentos",syn=()=>"सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें",iyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?eyn():t==="fa"?tyn():t==="ar"?nyn():t==="es"?ryn():t==="hi"?syn():Jbn()}),ayn=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,oyn=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,cyn=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,lyn=e=>`تم التحديث إلى ${e==null?void 0:e.version}. أعد التشغيل لاستخدامه.`,uyn=e=>`Actualizado a la versión ${e==null?void 0:e.version}. Reinicia para usarla.`,_yn=e=>`${e==null?void 0:e.version} पर अपडेट हुआ। इस्तेमाल के लिए फिर से शुरू करें।`,fyn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?oyn(e):t==="fa"?cyn(e):t==="ar"?lyn(e):t==="es"?uyn(e):t==="hi"?_yn(e):ayn(e)}),dyn=()=>"Dismiss",hyn=()=>"关闭",pyn=()=>"بستن",myn=()=>"تجاهل",gyn=()=>"Descartar",vyn=()=>"खारिज करें",byn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hyn():t==="fa"?pyn():t==="ar"?myn():t==="es"?gyn():t==="hi"?vyn():dyn()}),yyn=()=>"Restart now",xyn=()=>"立即重新启动",wyn=()=>"هم‌اکنون دوباره راه‌اندازی کن",kyn=()=>"أعد التشغيل الآن",Syn=()=>"Reiniciar ahora",Cyn=()=>"अभी फिर से शुरू करें",zI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xyn():t==="fa"?wyn():t==="ar"?kyn():t==="es"?Syn():t==="hi"?Cyn():yyn()}),Eyn=e=>`Could not restart: ${e==null?void 0:e.error}`,Nyn=e=>`无法重新启动:${e==null?void 0:e.error}`,zyn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,jyn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,Ayn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,Tyn=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,jI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Nyn(e):t==="fa"?zyn(e):t==="ar"?jyn(e):t==="es"?Ayn(e):t==="hi"?Tyn(e):Eyn(e)}),Ryn=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",Myn=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",Oyn=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",Dyn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",Lyn=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",Iyn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",$yn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Myn():t==="fa"?Oyn():t==="ar"?Dyn():t==="es"?Lyn():t==="hi"?Iyn():Ryn()}),Byn=()=>"Restarting…",Pyn=()=>"正在重新启动…",Fyn=()=>"در حال راه‌اندازی مجدد…",Hyn=()=>"جارٍ إعادة التشغيل…",qyn=()=>"Reiniciando…",Uyn=()=>"फिर से शुरू हो रहा है…",AI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Pyn():t==="fa"?Fyn():t==="ar"?Hyn():t==="es"?qyn():t==="hi"?Uyn():Byn()}),Gyn=()=>"macOS app",Kyn=()=>"macOS 应用",Vyn=()=>"برنامهٔ macOS",Wyn=()=>"تطبيق macOS",Qyn=()=>"App de macOS",Xyn=()=>"macOS ऐप",Yyn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Kyn():t==="fa"?Vyn():t==="ar"?Wyn():t==="es"?Qyn():t==="hi"?Xyn():Gyn()}),Zyn=()=>"Linux app (AppImage)",Jyn=()=>"Linux 应用(AppImage)",exn=()=>"برنامه لینوکس (AppImage)",txn=()=>"تطبيق Linux ‏(AppImage)",nxn=()=>"Aplicación para Linux (AppImage)",rxn=()=>"Linux ऐप (AppImage)",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=()=>"Installed with cargo",axn=()=>"通过 cargo 安装",oxn=()=>"نصب‌شده با cargo",cxn=()=>"مثبّت عبر cargo",lxn=()=>"Instalado con cargo",uxn=()=>"cargo से इंस्टॉल किया गया",_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=()=>"Installed with Homebrew",dxn=()=>"通过 Homebrew 安装",hxn=()=>"نصب‌شده با Homebrew",pxn=()=>"مثبّت عبر Homebrew",mxn=()=>"Instalado con Homebrew",gxn=()=>"Homebrew से इंस्टॉल किया गया",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=()=>"Installed with the orx installer",yxn=()=>"通过 orx 安装程序安装",xxn=()=>"نصب‌شده با نصب‌کنندهٔ orx",wxn=()=>"مثبّت عبر مُثبّت orx",kxn=()=>"Instalado con el instalador de orx",Sxn=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",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=()=>"Managed by Nix",Nxn=()=>"由 Nix 管理",zxn=()=>"مدیریت‌شده با Nix",jxn=()=>"مُدار بواسطة Nix",Axn=()=>"Gestionado por Nix",Txn=()=>"Nix द्वारा प्रबंधित",Rxn=((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()}),Mxn=()=>"Portable orx.exe",Oxn=()=>"便携版 orx.exe",Dxn=()=>"orx.exe قابل‌حمل",Lxn=()=>"‏orx.exe المحمول",Ixn=()=>"orx.exe portable",$xn=()=>"पोर्टेबल orx.exe",Bxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Oxn():t==="fa"?Dxn():t==="ar"?Lxn():t==="es"?Ixn():t==="hi"?$xn():Mxn()}),Pxn=()=>"Unknown install",Fxn=()=>"未知安装方式",Hxn=()=>"روش نصب نامشخص",qxn=()=>"تثبيت غير معروف",Uxn=()=>"Instalación desconocida",Gxn=()=>"अज्ञात इंस्टॉल",Kxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Fxn():t==="fa"?Hxn():t==="ar"?qxn():t==="es"?Uxn():t==="hi"?Gxn():Pxn()}),Vxn=()=>"Re-run your cargo install to update.",Wxn=()=>"重新运行 cargo 安装命令以更新。",Qxn=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",Xxn=()=>"أعِد تنفيذ أمر cargo install للتحديث.",Yxn=()=>"Vuelve a ejecutar cargo install para actualizar.",Zxn=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",Jxn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wxn():t==="fa"?Qxn():t==="ar"?Xxn():t==="es"?Yxn():t==="hi"?Zxn():Vxn()}),e2n=()=>"Run brew upgrade to update.",t2n=()=>"运行 brew upgrade 以更新。",n2n=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",r2n=()=>"نفّذ brew upgrade للتحديث.",s2n=()=>"Ejecuta brew upgrade para actualizar.",i2n=()=>"अपडेट करने के लिए brew upgrade चलाएं।",a2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?t2n():t==="fa"?n2n():t==="ar"?r2n():t==="es"?s2n():t==="hi"?i2n():e2n()}),o2n=()=>"Update it through your Nix configuration.",c2n=()=>"通过 Nix 配置进行更新。",l2n=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",u2n=()=>"حدّثه عبر إعداد Nix الخاص بك.",_2n=()=>"Actualízalo desde tu configuración de Nix.",f2n=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",d2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?c2n():t==="fa"?l2n():t==="ar"?u2n():t==="es"?_2n():t==="hi"?f2n():o2n()}),h2n=()=>"Close",p2n=()=>"关闭",m2n=()=>"بستن",g2n=()=>"إغلاق",v2n=()=>"Cerrar",b2n=()=>"बंद करें",y2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p2n():t==="fa"?m2n():t==="ar"?g2n():t==="es"?v2n():t==="hi"?b2n():h2n()}),x2n=()=>"Maximize",w2n=()=>"最大化",k2n=()=>"بزرگ کردن",S2n=()=>"تكبير",C2n=()=>"Maximizar",E2n=()=>"बड़ा करें",N2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w2n():t==="fa"?k2n():t==="ar"?S2n():t==="es"?C2n():t==="hi"?E2n():x2n()}),z2n=()=>"Minimize",j2n=()=>"最小化",A2n=()=>"کوچک کردن",T2n=()=>"تصغير",R2n=()=>"Minimizar",M2n=()=>"छोटा करें",O2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j2n():t==="fa"?A2n():t==="ar"?T2n():t==="es"?R2n():t==="hi"?M2n():z2n()}),D2n=()=>"Restore",L2n=()=>"还原",I2n=()=>"بازیابی",$2n=()=>"استعادة",B2n=()=>"Restaurar",P2n=()=>"पुनर्स्थापित करें",F2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L2n():t==="fa"?I2n():t==="ar"?$2n():t==="es"?B2n():t==="hi"?P2n():D2n()}),H2n=()=>"Active Experiments",q2n=()=>"活跃实验",U2n=()=>"آزمایش‌های فعال",G2n=()=>"التجارب النشطة",K2n=()=>"Experimentos activos",V2n=()=>"सक्रिय प्रयोग",W2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q2n():t==="fa"?U2n():t==="ar"?G2n():t==="es"?K2n():t==="hi"?V2n():H2n()}),Q2n=()=>"Default compute",X2n=()=>"默认计算目标",Y2n=()=>"محاسبات پیش‌فرض",Z2n=()=>"الحوسبة الافتراضية",J2n=()=>"Cómputo predeterminado",ewn=()=>"डिफ़ॉल्ट कंप्यूट",twn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?X2n():t==="fa"?Y2n():t==="ar"?Z2n():t==="es"?J2n():t==="hi"?ewn():Q2n()}),nwn=()=>"More tools",rwn=()=>"更多工具",swn=()=>"ابزارهای بیشتر",iwn=()=>"مزيد من الأدوات",awn=()=>"Más herramientas",own=()=>"और टूल",bj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?rwn():t==="fa"?swn():t==="ar"?iwn():t==="es"?awn():t==="hi"?own():nwn()}),cwn=()=>"Terminal",lwn=()=>"终端",uwn=()=>"ترمینال",_wn=()=>"الطرفية",fwn=()=>"Terminal",dwn=()=>"टर्मिनल",Fv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?lwn():t==="fa"?uwn():t==="ar"?_wn():t==="es"?fwn():t==="hi"?dwn():cwn()}),hwn=()=>"The terminal disconnected.",pwn=()=>"终端连接已断开。",mwn=()=>"ارتباط ترمینال قطع شد.",gwn=()=>"انقطعت الطرفية.",vwn=()=>"La terminal se desconectó.",bwn=()=>"टर्मिनल डिस्कनेक्ट हो गया।",yj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?pwn():t==="fa"?mwn():t==="ar"?gwn():t==="es"?vwn():t==="hi"?bwn():hwn()}),ywn=e=>`Shell exited with code ${e==null?void 0:e.code}.`,xwn=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,wwn=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,kwn=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,Swn=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,Cwn=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,Ewn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?xwn(e):t==="fa"?wwn(e):t==="ar"?kwn(e):t==="es"?Swn(e):t==="hi"?Cwn(e):ywn(e)}),Nwn=()=>"Restart shell",zwn=()=>"重新启动 Shell",jwn=()=>"راه‌اندازی دوباره پوسته",Awn=()=>"إعادة تشغيل Shell",Twn=()=>"Reiniciar shell",Rwn=()=>"शेल फिर से शुरू करें",Mwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zwn():t==="fa"?jwn():t==="ar"?Awn():t==="es"?Twn():t==="hi"?Rwn():Nwn()}),Own=()=>"This worktree",Dwn=()=>"当前工作树",Lwn=()=>"این درخت کاری",Iwn=()=>"شجرة العمل هذه",$wn=()=>"Este árbol de trabajo",Bwn=()=>"यह वर्कट्री",Pwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dwn():t==="fa"?Lwn():t==="ar"?Iwn():t==="es"?$wn():t==="hi"?Bwn():Own()}),Fwn=()=>"Workspace",Hwn=()=>"工作区",qwn=()=>"فضای کاری",Uwn=()=>"مساحة العمل",Gwn=()=>"Espacio de trabajo",Kwn=()=>"वर्कस्पेस",vw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hwn():t==="fa"?qwn():t==="ar"?Uwn():t==="es"?Gwn():t==="hi"?Kwn():Fwn()}),Vwn=e=>`Current worktree · ${e==null?void 0:e.branch}`,Wwn=e=>`当前工作树 · ${e==null?void 0:e.branch}`,Qwn=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,Xwn=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,Ywn=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,Zwn=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,Jwn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Wwn(e):t==="fa"?Qwn(e):t==="ar"?Xwn(e):t==="es"?Ywn(e):t==="hi"?Zwn(e):Vwn(e)}),e4n=e=>`Default branch · ${e==null?void 0:e.branch}`,t4n=e=>`默认分支 · ${e==null?void 0:e.branch}`,n4n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,r4n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,s4n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,i4n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,a4n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?t4n(e):t==="fa"?n4n(e):t==="ar"?r4n(e):t==="es"?s4n(e):t==="hi"?i4n(e):e4n(e)}),o4n=e=>`detached at ${e==null?void 0:e.branch}`,c4n=e=>`分离于 ${e==null?void 0:e.branch}`,l4n=e=>`جدا در ${e==null?void 0:e.branch}`,u4n=e=>`منفصل عند ${e==null?void 0:e.branch}`,_4n=e=>`desacoplado en ${e==null?void 0:e.branch}`,f4n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,d4n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?c4n(e):t==="fa"?l4n(e):t==="ar"?u4n(e):t==="es"?_4n(e):t==="hi"?f4n(e):o4n(e)}),h4n=()=>"Listing truncated.",p4n=()=>"列表已截断。",m4n=()=>"فهرست کوتاه شده است.",g4n=()=>"القائمة مقتطعة.",v4n=()=>"Listado truncado.",b4n=()=>"सूची छोटी की गई।",y4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?p4n():t==="fa"?m4n():t==="ar"?g4n():t==="es"?v4n():t==="hi"?b4n():h4n()}),x4n=()=>"Loading…",w4n=()=>"正在加载…",k4n=()=>"در حال بارگیری…",S4n=()=>"جارٍ التحميل…",C4n=()=>"Cargando…",E4n=()=>"लोड हो रहा है…",N4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?w4n():t==="fa"?k4n():t==="ar"?S4n():t==="es"?C4n():t==="hi"?E4n():x4n()}),z4n=()=>"No changes yet.",j4n=()=>"尚无更改。",A4n=()=>"هنوز تغییری وجود ندارد.",T4n=()=>"لا توجد تغييرات بعد.",R4n=()=>"Aún no hay cambios.",M4n=()=>"अभी तक कोई बदलाव नहीं।",O4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?j4n():t==="fa"?A4n():t==="ar"?T4n():t==="es"?R4n():t==="hi"?M4n():z4n()}),D4n=()=>"No files.",L4n=()=>"没有文件。",I4n=()=>"فایلی وجود ندارد.",$4n=()=>"لا توجد ملفات.",B4n=()=>"No hay archivos.",P4n=()=>"कोई फ़ाइल नहीं।",F4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?L4n():t==="fa"?I4n():t==="ar"?$4n():t==="es"?B4n():t==="hi"?P4n():D4n()}),H4n=()=>"Refresh failed:",q4n=()=>"刷新失败:",U4n=()=>"تازه‌سازی ناموفق بود:",G4n=()=>"فشل التحديث:",K4n=()=>"Error al actualizar:",V4n=()=>"रीफ़्रेश विफल:",W4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?q4n():t==="fa"?U4n():t==="ar"?G4n():t==="es"?K4n():t==="hi"?V4n():H4n()}),Ce=e=>`⁦${e}⁩`,_a=e=>`⁨${e}⁩`,Jt=e=>new Intl.NumberFormat(E()).format(e),Wp="demo_nanochat_v1",Vo=e=>e.startsWith("demo_"),Xd="chat_demo_nanochat_v1",qb="chat_demo_nanochat_figures_v1",Ub="chat_demo_nanochat_literature_v1",Q4n={[Xd]:"cpu_end_to_end",[qb]:"figures",[Ub]:"literature"},bw="cpu-apple-silicon-pipeline-results.md",X4n={[Xd]:"msg_demo_nanochat_assistant_v1",[qb]:"msg_demo_nanochat_figures_assistant_v1",[Ub]:"msg_demo_nanochat_literature_assistant_v1"},xj="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 U3 extends Error{constructor(t,r,s){super(t);Qs(this,"currentVersion");Qs(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function pa(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}function Y4n(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 TI(e){return[...e].sort((t,r)=>r.createdAt-t.createdAt).map(Y4n).find(t=>t!==null)??null}const RI=new WeakMap;async function wi(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 U3(s,a,i.exists)}}catch(i){if(i instanceof U3)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=RI.get(e);if(t&&!zn(t))throw new DOMException("Workspace changed","AbortError");return n}const zt=(e,n)=>fetch(e,{signal:n}).then(t=>wi(t));async function Ca(e,n){const t=yi(),r=await fetch(e,n);if(!zn(t))throw new DOMException("Workspace changed","AbortError");return RI.set(r,t),r.ok&&uX(e,t),r}const mt=(e,n,t=!1)=>Ca(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>wi(r)),kl=(e,n)=>Ca(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>wi(t)),MI=(e,n)=>Ca(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>wi(t)),Z4n=e=>zt("/api/projects",e).then(n=>n.projects),J4n=e=>zt("/api/projects/activity",e).then(n=>n.activity),G3="agentic",e3n=e=>zt("/api/settings/ui-state",e),t3n=(e,n)=>zt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),n3n=(e,n,t=!1)=>mt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),r3n=(e,n=!1)=>mt("/api/settings/ui-state",{workspace:e},n),s3n=e=>mt("/api/settings/ui-state",e),i3n=(e,n)=>mt("/api/onboarding/complete",{...e,...n}),a3n=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return zt(`/api/project-path/status${t}`,n)},o3n=()=>mt("/api/project-path/pick").then(e=>e.path),c3n=e=>mt("/api/projects",e),l3n=(e,n)=>zt(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),u3n=e=>zt("/api/github/account",e),_3n=(e,n)=>zt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),f3n=(e,n,t)=>zt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),d3n=(e,n)=>zt(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),h3n=e=>mt("/api/projects/starter-prompts/prewarm",e),p3n=(e,n,t,r,s)=>zt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),m3n=e=>mt(`/api/projects/${e}/open`).then(n=>n.project),g3n=e=>Ca(`/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})`)}cX(e)}),v3n=(e,n)=>zt(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),b3n=(e,n,t)=>kl(`/api/experiments/${e}/archive`,{direction:n,archived:t}),y3n=(e,n)=>zt(`/api/projects/${e}/runs`,n).then(t=>t.runs),OI=e=>mt(`/api/runs/${e}/cancel`).then(()=>{}),x3n=(e,n)=>zt(`/api/runs/${e}/log?offset=${n}`),w3n=(e,n)=>zt(`/api/runs/${e}/diff`,n),k3n=(e,n)=>zt(`/api/experiments/${e}/diff`,n),Sl=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),S3n=(e,n,t={},r)=>zt(`/api/projects/${e}/file?${Sl(t,new URLSearchParams({path:n}))}`,r),K3=(e,n,t={})=>`/api/projects/${e}/file/raw?${Sl(t,new URLSearchParams({path:n}))}`,C3n=(e,n)=>zt(`/api/files/abs?path=${encodeURIComponent(e)}`,n),DI=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,E3n=(e,n,t,r)=>MI(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),N3n=(e,n,t,r={})=>kl(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),z3n=(e,n,t={})=>mt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),MS=(e,n,t={})=>mt(`/api/projects/${e}/file/reveal`,{path:n,...t}),j3n=(e,n,t)=>zt(`/api/projects/${e}/file/location?${Sl(n,new URLSearchParams({path:n.path,source:n.source}))}`,t),A3n=(e,n,t,r)=>zt(`/api/projects/${e}/files/search?${new URLSearchParams({q:n,...t?{after:t}:{}})}`,r),T3n=e=>zt("/api/latex/engine",e),R3n=(e,n,t={})=>mt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),M3n=e=>zt("/api/overleaf/settings",e),LI=e=>mt("/api/overleaf/token",{token:e}),O3n=()=>Ca("/api/overleaf/token",{method:"DELETE"}).then(e=>wi(e)),II=(e,n={})=>mt("/api/overleaf/session",{session:e,host:n.host}),D3n=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>wi(e)),L3n=(e={})=>mt("/api/overleaf/session/import",{host:e.host}),I3n=(e,n,t={})=>mt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),$3n=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${Sl(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>wi(r)),B3n=(e,n,t={},r)=>zt(`/api/projects/${e}/file/overleaf?${Sl(t,new URLSearchParams({path:n}))}`,r),P3n=(e,n,t)=>mt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),F3n=(e,n,t={})=>Ca(`/api/projects/${e}/file/overleaf?${Sl(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>wi(r)),H3n=(e,n,t={})=>mt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),q3n=(e,n,t={},r)=>zt(`/api/projects/${e}/file/overleaf/status?${Sl(t,new URLSearchParams({path:n}))}`,r),U3n=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Sl(t,new URLSearchParams({path:n}))}`,G3n=(e,n={},t)=>{const r=Sl(n).toString();return zt(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},K3n=(e,n)=>zt(`/api/chat/sessions/${e}/worktree`,n),Gb=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,V3n=e=>zt("/api/settings/hf",e),W3n=e=>mt("/api/settings/hf",{token:e}),Q3n=e=>zt("/api/settings/tinker",e),X3n=e=>mt("/api/settings/tinker",{key:e}),Y3n=e=>zt("/api/update",e),Z3n=()=>mt("/api/update/apply"),J3n=()=>mt("/api/update/restart"),e5n=e=>mt("/api/update/auto",{enabled:e}),t5n=(e=!1)=>mt("/api/update/install-cli",{force:e}),n5n=e=>zt("/api/settings/k8s",e),r5n=e=>mt("/api/settings/k8s",e),s5n=e=>zt("/api/settings/modal",e),i5n=(e,n)=>mt("/api/settings/modal",{tokenId:e,tokenSecret:n}),a5n=e=>zt("/api/settings/env",e).then(n=>n.vars),$I=(e,n)=>mt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),o5n=e=>Ca(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n)).then(n=>n.vars),c5n=e=>zt("/api/settings/data-dir",e),l5n=e=>mt("/api/settings/data-dir/validate",{path:e}),u5n=e=>mt("/api/settings/data-dir/move",{path:e}),_5n=e=>zt("/api/settings/ssh",e),f5n=e=>mt("/api/settings/ssh",e),d5n=e=>mt("/api/settings/ssh/default",{host:e}),h5n=(e,n)=>mt("/api/settings/ssh/preflight",{host:e,container:n}),p5n=e=>zt("/api/settings/ssh/config",e),m5n=(e,n)=>MI("/api/settings/ssh/config",{content:e,previousContent:n}),g5n=(e,n)=>zt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),v5n=e=>zt("/_orx/runtime",e),b5n=e=>zt("/api/remote/sessions",e).then(n=>n.sessions),y5n=(e,n)=>mt("/api/remote/sessions",{host:e,uiPreferences:n}),x5n=e=>mt("/_orx/install",e),w5n=()=>mt("/_orx/reconnect"),BI=()=>mt("/_orx/disconnect"),k5n=()=>mt("/_orx/start-host"),PI=()=>zt("/_orx/stop-host"),FI=e=>mt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),S5n=e=>zt("/api/settings/slurm",e),C5n=e=>mt("/api/settings/slurm",e),E5n=e=>zt("/api/settings/ray",e),N5n=e=>mt("/api/settings/ray",e),z5n=e=>mt("/api/settings/ray/preflight",{address:e??null}),j5n=(e,n)=>zt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),A5n=e=>mt("/api/settings/compute/default",e),T5n=e=>zt("/api/settings/local",e),R5n=e=>zt("/api/settings/openresearch",e),M5n=(e,n)=>zt(`/api/projects/${e}/files`,n),O5n=(e,n)=>Ca(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>wi(t)),D5n=(e,n,t)=>kl(`/api/projects/${e}/files`,{path:n,...t}),df=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,HI=512e3,L5n=(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}}},I5n=(e,n,t)=>fetch(df(e,n),{signal:t,headers:{Range:`bytes=0-${HI-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=>L5n(a,Number.isFinite(s)&&s>a.byteLength))}),$5n=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",B5n=(e,n,t)=>fetch(df(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:$5n(s)?s:"download"}}),P5n=e=>zt("/api/settings/profile",e),F5n=e=>zt("/api/settings/lit-sources",e),H5n=e=>mt("/api/settings/lit-sources",e),q5n=e=>zt("/api/settings/projects",e),qI=(e,n)=>mt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),U5n=(e,n)=>zt(`/api/projects/${e}/git`,n),G5n=e=>mt(`/api/projects/${e}/git/init`),K5n=e=>mt(`/api/projects/${e}/github`),V5n=e=>mt(`/api/projects/${e}/github/disable`),W5n=e=>zt("/api/settings/telemetry",e),Q5n=e=>mt("/api/settings/telemetry",{enabled:e}),vu=e=>{mt("/api/telemetry/event",e).catch(()=>{})},UI=e=>{mt("/api/telemetry/locale",{locale:e}).catch(()=>{})};function nv(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??W3(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"?kS():n,r=W3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${r} · ${t}`:r}const Hv="default";function Kb(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===Hv)?Hv:((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 V3="default";function GI(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:V3,label:Njt(),description:yjt()},...t]:[]}function qv(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=GI(e,n);return s.length===0?V3:t!=null&&s.some(a=>a.id===t)?t:V3}function KI(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Kb(e,n);return r.length===0?Hv:t&&r.some(i=>i.id===t)?t:s}const X5n=e=>zt("/api/harnesses/setup/commands",e),VI=(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 zt(`/api/harnesses${s}`,t).then(i=>i.harnesses)},Y5n=(e,n,t)=>{const r=new URLSearchParams({...n?{harness:n}:{},...t?{project:t}:{}});return zt(`/api/skills${r.size?`?${r}`:""}`,e)},Z5n=(e,n,t,r)=>zt(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...n?{project:n}:{},...r?{harness:r}:{}})}`}`,t).then(s=>s.content),J5n=e=>zt("/api/latex-templates",e).then(n=>n.templates),ekn=e=>mt("/api/latex-templates",e).then(n=>n.template),tkn=e=>Ca(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n)),nkn=e=>zt("/api/user-skills",e),rkn=e=>mt("/api/user-skills",e).then(n=>n.skill),skn=e=>Ca(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n));function W3(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 ikn=(e,n)=>zt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),akn=e=>zt("/api/chat/native-sessions",e).then(n=>n.chats),okn=(e,n)=>mt("/api/chat/native-sessions/import",{projectId:e,harness:n.harness,nativeId:n.nativeId,title:n.title}).then(t=>t.session),ckn=e=>zt("/api/chat/sessions?scope=all",e).then(n=>n.sessions),lkn=(e,n,t={})=>mt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),Q3=e=>Ca(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>wi(n).then(t=>(Fb(e),t))),ukn=(e,n)=>kl(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),_kn=(e,n)=>kl(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),fkn=(e,n)=>kl(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),dkn=e=>mt(`/api/chat/sessions/${e}/side`,{}).then(n=>n.session),hkn=(e,n)=>kl(`/api/chat/sessions/${e}`,{goal:n}).then(t=>t.session),pkn=(e,n)=>kl(`/api/chat/sessions/${e}`,{autonomy:n}).then(t=>t.session),mkn=(e,n)=>kl(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),gkn=(e,n)=>zt(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),vkn=(e,n)=>Ca(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>wi(t)),bkn=(e,n)=>mt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),ykn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,X3=(e,n,t={},r,s,i,a)=>mt(`/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}),xkn=e=>mt(`/api/chat/sessions/${e}/compact`,{}),wkn=(e,n)=>mt(`/api/chat/sessions/${e}/shell`,{command:n}),kkn=(e,n,t,r={})=>mt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),Skn=(e,n,t)=>mt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),Ckn=(e,n)=>mt(`/api/chat/sessions/${e}/branch`,{leafId:n}),Ekn=e=>mt(`/api/chat/sessions/${e}/interrupt`),Nkn=(e,n)=>mt(`/api/chat/sessions/${e}/respond`,n);function vo(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 $0(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return cLe({value:Jt(n)});const t=Math.floor(n/60);if(t<60)return tLe({value:Jt(t)});const r=Math.floor(t/60);return r<24?WDe({hours:Jt(r),minutes:Jt(t%60)}):FDe({days:Jt(Math.floor(r/24)),hours:Jt(r%24)})}function _l(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&rzt("/api/local-models",e),Akn=e=>mt("/api/local-models/discover",e),Tkn=e=>mt("/api/local-models",e),Rkn=e=>mt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),Mkn=e=>Ca(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>wi(n)),wj=()=>({queryKey:kt("getHfSettings"),queryFn:({signal:e})=>V3n(e),staleTime:3e5}),kj=()=>({queryKey:kt("getTinkerSettings"),queryFn:({signal:e})=>Q3n(e),staleTime:3e5}),Sj=()=>({queryKey:kt("getK8sSettings"),queryFn:({signal:e})=>n5n(e),staleTime:3e4}),Cj=()=>({queryKey:kt("getModalSettings"),queryFn:({signal:e})=>s5n(e),staleTime:3e5}),Okn=()=>({queryKey:kt("getSlurmSettings"),queryFn:({signal:e})=>S5n(e),staleTime:3e5}),Dkn=()=>({queryKey:kt("getRaySettings"),queryFn:({signal:e})=>E5n(e),staleTime:3e5}),WI=e=>({queryKey:kt("getComputeSettings",e??null),queryFn:({signal:n})=>j5n(e,n),staleTime:3e4}),Lkn=()=>({queryKey:kt("getLocalMachine"),queryFn:({signal:e})=>T5n(e),staleTime:3e5}),Ikn=()=>({queryKey:kt("getOpenResearchSettings"),queryFn:({signal:e})=>R5n(e),staleTime:3e4}),$kn=()=>({queryKey:kt("getEnvVars"),queryFn:({signal:e})=>a5n(e),staleTime:3e5}),Bkn=()=>({queryKey:kt("getDataDir"),queryFn:({signal:e})=>c5n(e),staleTime:3e5}),QI=()=>({queryKey:kt("getSshSettings"),queryFn:({signal:e})=>_5n(e),staleTime:3e4}),Pkn=()=>({queryKey:kt("getSshConfig"),queryFn:({signal:e})=>p5n(e),staleTime:3e5}),Ej=e=>({queryKey:kt("getSshMasterStatus",e),queryFn:({signal:n})=>g5n(e,n),staleTime:5e3}),Fkn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>v5n(e),staleTime:2e3}),Hkn=()=>({queryKey:kt("listRemoteSessions"),queryFn:({signal:e})=>b5n(e),staleTime:3e4}),Uv=()=>({queryKey:kt("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>Kh(n,t,()=>Y3n(e)),staleTime:3e4}),qkn=()=>({queryKey:kt("getProfile"),queryFn:({signal:e})=>P5n(e),staleTime:3e5}),Ukn=()=>({queryKey:kt("getLitSources"),queryFn:({signal:e})=>F5n(e),staleTime:3e5}),DS=()=>({queryKey:kt("getProjectDefaults"),queryFn:({signal:e})=>q5n(e),staleTime:3e5}),Gkn=e=>({queryKey:kt("getProjectGitStatus",e),queryFn:({signal:n})=>U5n(e,n),staleTime:3e4}),Kkn=()=>({queryKey:kt("getTelemetry"),queryFn:({signal:e})=>W5n(e),staleTime:3e5}),XI=()=>({queryKey:kt("getHarnessSetupCommands"),queryFn:({signal:e})=>X5n(e),staleTime:1/0}),Bu=()=>({queryKey:kt("getHarnesses"),queryFn:({signal:e})=>VI(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),Vkn=(e,n)=>({queryKey:kt("getSkills",e??null,n??null),queryFn:({signal:t})=>Y5n(t,e,n),select:t=>t.skills,refetchInterval:t=>{var r;return(r=t.state.data)!=null&&r.importing?2e3:3e4},staleTime:3e5}),Wkn=(e,n,t)=>({queryKey:kt("getSkillContent",e,n??null,t??null),queryFn:({signal:r})=>Z5n(e,n,r,t),staleTime:3e5}),Qkn=()=>({queryKey:kt("listLatexTemplates"),queryFn:({signal:e})=>J5n(e),refetchInterval:3e4,staleTime:3e5}),Xkn=()=>({queryKey:kt("listUserSkills"),queryFn:({signal:e})=>nkn(e),select:e=>e.skills,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5});async function hf(e=!1,n=!1){const t=Bu();if(!e&&!n)return tt.fetchQuery(t);await tt.cancelQueries(t);const r=await VI(e,n);return zn(t.queryKey)&&tt.setQueryData(t.queryKey,r),r}const Ykn=()=>({queryKey:kt("getLocalModels"),queryFn:({signal:e})=>jkn(e),staleTime:3e4}),Gi=e=>({queryKey:kt("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>Kh(t,r,async()=>{const s=await ikn(e,n),i=t.getQueryData(r);return s.filter(a=>!bl.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)}})},jm),staleTime:3e4}),YI=()=>({queryKey:kt("listNativeChats"),queryFn:({signal:e})=>akn(e),staleTime:0}),Zkn=()=>({queryKey:kt("listAllChatSessions"),queryFn:async({signal:e})=>(await ckn(e)).filter(n=>!bl.has(n.id)),staleTime:0}),ac=e=>({queryKey:kt("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var h;const s=t.getQueryData(r),i=await Kh(t,r,()=>gkn(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:jm(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||!((h=a.activeLeafId)!=null&&h.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),rf="local-",ZI="bash";function Nj(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(rf)),n]}function Jkn(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(rf),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:Nj(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:`${rf}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:ZI,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?Nj(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:`${rf}${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 JI=0;function e$(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}tt.getQueryCache().subscribe(e=>{e$(e)&&JI++});const eSn=e=>tt.getQueryCache().subscribe(n=>{e$(n)&&e()}),tSn=()=>JI;function nSn(e,n){const t=tt.getQueryData(Gi(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=tt.getQueryData(ac(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function t$(e,n,t=!1){if(n.type==="busy"){oo(tt,Gi(e).queryKey,n.sessionId),tt.setQueryData(Gi(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=ac(n.sessionId);if(bl.has(n.sessionId))return;oo(tt,r.queryKey,n.type==="upsertMessage"?`message:${n.message.id}`:n.type==="setQueued"?"queued":n.type==="activeLeaf"?"branch":"local");const s=tt.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=Jkn(i,n),o={messages:a.messagesBySession[n.sessionId]??[],queued:a.queuedBySession[n.sessionId]??[],activeLeafId:a.activeLeafBySession[n.sessionId]??null};tt.setQueryData(r.queryKey,o)}function rSn(e,n){const t=!!n&&!bl.has(n??""),r=ut({...ac(n??""),enabled:t,subscribed:t}),s=T.useSyncExternalStore(eSn,tSn),i=T.useMemo(()=>nSn(e,n),[e,n,s]),a=yi()[1],o=T.useCallback(c=>{zn(["workspace",a])&&t$(e,c)},[e,a]);return[i,o,r]}const rv=new Map;function sSn(e,n){let t=rv.get(e);return t||(t=new Set,rv.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&rv.delete(e)}}function iSn(e){var n;(n=rv.get(e.runId))==null||n.forEach(t=>t(e))}const Y3=new Set;function Gv(e){return Y3.add(e),()=>{Y3.delete(e)}}function Xc(e){Y3.forEach(n=>n(e))}const Z3=new Set;function aSn(e){return Z3.add(e),()=>{Z3.delete(e)}}function Yc(){Z3.forEach(e=>e())}const J3=new Set;function oSn(e){return J3.add(e),()=>{J3.delete(e)}}const e5=new Set;function cSn(e){return e5.add(e),()=>{e5.delete(e)}}function lSn(){e5.forEach(e=>e())}function zj(e){J3.forEach(n=>n(e))}const t5=new Set;function n$(e){return t5.add(e),()=>{t5.delete(e)}}function yw(e){t5.forEach(n=>n(e))}const n5=new Set;function uSn(e){return n5.add(e),()=>{n5.delete(e)}}function jj(e){n5.forEach(n=>n(e))}const r5=new Set;function _Sn(e){return r5.add(e),()=>{r5.delete(e)}}function fSn(e){r5.forEach(n=>n(e))}let s5=!0;const i5=new Set;function dSn(e){return i5.add(e),()=>{i5.delete(e)}}function Aj(){return s5}function Tj(e){e!==s5&&(s5=e,i5.forEach(n=>n()))}const hSn=8e3,pSn=3e3;function mSn(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(()=>Tj(!1),hSn)),c.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},pSn)))},c.onopen=()=>{var h,f;r||(window.clearTimeout(s),s=void 0,Tj(!0),a&&(Xc({type:"reconnected"}),Yc(),zj({harness:"*",authState:"unknown"}),(f=(h=n.current).onReconnect)==null||f.call(h)),a=!0)};const u=h=>{try{return JSON.parse(h.data)}catch{return null}};c.addEventListener("resync.required",()=>{var h,f;Xc({type:"reconnected"}),Yc(),(f=(h=n.current).onReconnect)==null||f.call(h)}),c.addEventListener("run.updated",h=>{const f=u(h);f!=null&&f.run&&(Yc(),n.current.onRun(f.run))}),c.addEventListener("experiment.updated",h=>{var p,m;const f=u(h);f!=null&&f.experiment&&(Yc(),(m=(p=n.current).onExperiment)==null||m.call(p,f.experiment))}),c.addEventListener("project.updated",h=>{var p,m;const f=u(h);f!=null&&f.project&&(Yc(),(m=(p=n.current).onProject)==null||m.call(p,f.project))}),c.addEventListener("files.updated",h=>{var p,m;const f=u(h);f!=null&&f.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,f.projectId))}),c.addEventListener("run.log",h=>{const f=u(h);f!=null&&f.runId&&iSn(f)}),c.addEventListener("chat.session",h=>{const f=u(h);f!=null&&f.session&&(Yc(),Xc({type:"session",session:f.session}))}),c.addEventListener("chat.session.deleted",h=>{const f=u(h);f!=null&&f.sessionId&&(Yc(),Xc({type:"sessionDeleted",sessionId:f.sessionId}))}),c.addEventListener("chat.message",h=>{const f=u(h);f!=null&&f.message&&(Yc(),Xc({type:"message",sessionId:f.sessionId,message:f.message}))}),c.addEventListener("chat.busy",h=>{const f=u(h);f!=null&&f.sessionId&&(Yc(),Xc({type:"busy",sessionId:f.sessionId,busy:f.busy}))}),c.addEventListener("chat.usage",h=>{const f=u(h);f!=null&&f.sessionId&&f.usage&&Xc({type:"usage",sessionId:f.sessionId,usage:f.usage})}),c.addEventListener("chat.queued",h=>{const f=u(h);f!=null&&f.sessionId&&Xc({type:"queued",sessionId:f.sessionId,items:f.items??[]})}),c.addEventListener("chat.branch",h=>{const f=u(h);f!=null&&f.sessionId&&Xc({type:"branch",sessionId:f.sessionId,activeLeafId:f.activeLeafId??null})}),c.addEventListener("harness.auth",h=>{const f=u(h);f!=null&&f.harness&&f.authState&&zj(f)}),c.addEventListener("harness.catalog",()=>lSn()),c.addEventListener("datadir.move.progress",h=>{const f=u(h);f&&yw({type:"progress",...f})}),c.addEventListener("datadir.move.done",h=>{const f=u(h);f&&yw({type:"done",path:f.path,oldPathLeft:f.oldPathLeft})}),c.addEventListener("datadir.move.error",h=>{const f=u(h);f&&yw({type:"error",error:f.error})}),c.addEventListener("update.status",h=>{const f=u(h);f&&fSn(f)}),c.addEventListener("overleaf.live",h=>{const f=u(h);f!=null&&f.key&&f.status&&jj({type:"live",key:f.key,status:f.status})}),c.addEventListener("overleaf.pulled",h=>{const f=u(h);f!=null&&f.key&&Array.isArray(f.paths)&&jj({type:"pulled",key:f.key,paths:f.paths})})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const Kv=new Set;function gSn(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 Kv.add(t),()=>{Kv.delete(t)}},[])}const Rj={onRun:e=>Kv.forEach(n=>n.onRun(e)),onReconnect:()=>Kv.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},zh=()=>({queryKey:kt("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>Kh(n,t,()=>Z4n(e),jm),staleTime:3e4}),vSn=()=>({queryKey:kt("listProjectActivity"),queryFn:({signal:e})=>J4n(e),staleTime:3e4}),Om=()=>({queryKey:kt("getUiState"),queryFn:({signal:e})=>e3n(e),staleTime:3e5}),LS=e=>({queryKey:kt("getProjectUiState",e),queryFn:({signal:n})=>t3n(e,n),staleTime:3e5}),y0=(e="")=>({queryKey:kt("getProjectPathStatus",e),queryFn:({signal:n})=>a3n(e,n),staleTime:3e4}),r$=e=>({queryKey:kt("searchPapers",e),queryFn:({signal:n})=>l3n(e,n),staleTime:3e5}),bSn=()=>({queryKey:kt("githubAccount"),queryFn:({signal:e})=>u3n(e),staleTime:3e5}),ySn=e=>({queryKey:kt("githubProjectRepoPreview",e),queryFn:({signal:n})=>_3n(e,n),staleTime:3e4}),Mj=(e,n)=>({queryKey:kt("repoAccess",e,n),queryFn:({signal:t})=>f3n(e,n,t),staleTime:3e4}),a5=e=>({queryKey:kt("resolvePaper",e),queryFn:({signal:n})=>d3n(e,n),staleTime:36e5}),xSn=(e,n,t,r)=>({queryKey:kt("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>p3n(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),Vv=e=>({queryKey:kt("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>Kh(t,r,()=>v3n(e,n),jm),staleTime:3e4}),Tu=e=>({queryKey:kt("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>Kh(t,r,()=>y3n(e,n),jm),staleTime:3e4});function l1(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 Oj(){const e=yi();return mSn({onRun(n){var r;if(!zn(e))return;const t=(r=tt.getQueryData(Tu(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);oo(tt,Tu(n.projectId).queryKey,n.id),tt.setQueryData(Tu(n.projectId).queryKey,s=>l1(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(Pa(["getRunDiff"],e,s=>s.queryKey[3]===n.id),Pa(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),Rj.onRun(n)},onExperiment(n){zn(e)&&(oo(tt,Vv(n.projectId).queryKey,n.id),tt.setQueryData(Vv(n.projectId).queryKey,t=>l1(t,n)),Pa(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),Pa(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),Pa(["getRunDiff"],e,t=>{var r;return((r=tt.getQueryData(Tu(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){zn(e)&&(oo(tt,zh().queryKey,n.id),tt.setQueryData(zh().queryKey,t=>l1(t,n)))},onArtifacts(n){zn(e)&&(Pa(hS,e,t=>t.queryKey[3]===n),Pa(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){zn(e)&&(Pa(aX,e),Rj.onReconnect())}}),T.useEffect(()=>{let n;const t=aSn(()=>{n??(n=setTimeout(()=>{n=void 0,Pa(["listProjectActivity"],e)},100))}),r=n$(c=>{c.type==="done"&&Pa(["getDataDir"],e)}),s=Gv(c=>{zn(e)&&(c.type==="session"?oo(tt,Gi(c.session.projectId).queryKey,c.session.id):(c.type==="busy"||c.type==="usage")&&oo(tt,[...e,"listChatSessions"],c.sessionId),(c.type==="message"||c.type==="queued"||c.type==="branch")&&t$("",c.type==="message"?{type:"upsertMessage",sessionId:c.sessionId,message:c.message}:c.type==="queued"?{type:"setQueued",sessionId:c.sessionId,items:c.items}:{type:"activeLeaf",sessionId:c.sessionId,leafId:c.activeLeafId},!0),c.type==="session"&&!bl.has(c.session.id)?tt.setQueryData(Gi(c.session.projectId).queryKey,u=>{if(!u)return;const h=u.find(f=>f.id===c.session.id);return h?l1(u,{...c.session,contextUsage:c.session.contextUsage??h.contextUsage}):[c.session,...u]}):c.type==="sessionDeleted"?Fb(c.sessionId):(c.type==="busy"||c.type==="usage")&&tt.setQueriesData({queryKey:[...e,"listChatSessions"]},u=>u==null?void 0:u.map(h=>h.id!==c.sessionId?h:c.type==="busy"?{...h,busy:c.busy}:{...h,contextUsage:c.usage})))}),i=oSn(()=>{zn(e)&&hf(!0).catch(()=>{})}),a=cSn(()=>{zn(e)&&tt.fetchQuery({...Bu(),staleTime:0}).catch(()=>{})}),o=_Sn(c=>{zn(e)&&(oo(tt,Uv().queryKey),tt.setQueryData(Uv().queryKey,c))});return()=>{clearTimeout(n),t(),r(),s(),i(),a(),o()}},[e[1]]),null}const o5=new Set;function s$(e){if(e!==E()){JD(e,{reload:!1}),document.documentElement.lang=e,UI(e);for(const n of o5)n()}}function wSn(e){return o5.add(e),()=>o5.delete(e)}function Qu(){return T.useSyncExternalStore(wSn,E,E)}const Vb="__ORX_MAC_TITLEBAR__"in window,i$="__ORX_WIN_TITLEBAR__"in window;let Dj="system",Lj="",xw=!1;const Sd=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function Ij(e){if(!Sd)return null;Sd.clearRect(0,0,1,1),Sd.fillStyle="transparent",Sd.fillStyle=e,Sd.fillRect(0,0,1,1);const[n,t,r,s]=Sd.getImageData(0,0,1,1).data;return s!==255?null:[n,t,r].map(i=>i.toString(16).padStart(2,"0")).join("")}function kSn(){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=Ij(getComputedStyle(t).backgroundColor);if(r)return r}return Ij(getComputedStyle(document.documentElement).backgroundColor)}function c5(e){e&&(Dj=e),!(!Vb||xw)&&(xw=!0,setTimeout(()=>{var r;xw=!1;const n=kSn(),t=`titlebar:${Dj}:${n}`;!n||t===Lj||(Lj=t,(r=window.ipc)==null||r.postMessage(t))},100))}Vb&&(new MutationObserver(()=>c5()).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style","data-theme"]}),window.addEventListener("resize",()=>c5()));const SSn="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'])",$j=Vb?28:i$?32:0;if($j){document.documentElement.classList.add(Vb?"mac-titlebar":"win-titlebar");let e=!1;window.addEventListener("mousedown",n=>{var t;e=!1,!(n.button!==0||n.defaultPrevented||n.clientY>=$j)&&(n.target instanceof Element&&n.target.closest(SSn)||(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 a$="orx:theme";function CSn(){try{const e=localStorage.getItem(a$);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let pf=CSn();const l5=new Set;function ESn(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function IS(){document.documentElement.dataset.theme=ESn(pf),c5(pf)}function o$(e){pf=e;try{localStorage.setItem(a$,e)}catch{}IS();for(const n of l5)n()}function NSn(){return pf}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{pf==="system"&&IS()});IS();function zSn(e){return l5.add(e),()=>l5.delete(e)}function c$(){return[T.useSyncExternalStore(zSn,()=>pf,()=>pf),o$]}const jSn=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),l$=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),Wv="-",Bj=[],TSn="arbitrary..",RSn=e=>{const n=OSn(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return MSn(a);const o=a.split(Wv),c=o[0]===""&&o.length>1?1:0;return u$(o,c,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const c=r[a],u=t[a];return c?u?jSn(u,c):c:u||Bj}return t[a]||Bj}}},u$=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=u$(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(Wv):e.slice(n).join(Wv),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?TSn+r:void 0})(),OSn=e=>{const{theme:n,classGroups:t}=e;return DSn(t,n)},DSn=(e,n)=>{const t=l$();for(const r in e){const s=e[r];$S(s,t,r,n)}return t},$S=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){ISn(e,n,t);return}if(typeof e=="function"){$Sn(e,n,t,r);return}BSn(e,n,t,r)},ISn=(e,n,t)=>{const r=e===""?n:_$(n,e);r.classGroupId=t},$Sn=(e,n,t,r)=>{if(PSn(e)){$S(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(ASn(t,e))},BSn=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(Wv),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,FSn=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)}}},u5="!",Pj=":",HSn=[],Fj=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),qSn=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,c=0,u;const h=s.length;for(let k=0;kc?u-c:void 0;return Fj(i,m,p,w)};if(n){const s=n+Pj,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):Fj(HSn,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},USn=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}},GSn=e=>({cache:FSn(e.cacheSize),parseClassName:qSn(e),sortModifiers:USn(e),postfixLookupClassGroupIds:KSn(e),...RSn(e)}),KSn=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(VSn);let u="";for(let h=c.length-1;h>=0;h-=1){const f=c[h],{isExternal:p,modifiers:m,hasImportantModifier:w,baseClassName:k,maybePostfixModifierPosition:v}=t(f);if(p){u=f+(u.length>0?" "+u:u);continue}let b=!!v,y;if(b){const A=k.substring(0,v);y=r(A);const z=y&&a[y]?r(k):void 0;z&&z!==y&&(y=z,b=!1)}else y=r(k);if(!y){if(!b){u=f+(u.length>0?" "+u:u);continue}if(y=r(k),!y){u=f+(u.length>0?" "+u:u);continue}b=!1}const x=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=w?x+u5:x,N=C+y;if(o.indexOf(N)>-1)continue;o.push(N);const j=s(y,b);for(let A=0;A0?" "+u:u)}return u},QSn=(...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((h,f)=>f(h),e());return t=GSn(u),r=t.cache.get,s=t.cache.set,i=o,o(c)},o=c=>{const u=r(c);if(u)return u;const h=WSn(c,t);return s(c,h),h};return i=a,(...c)=>i(QSn(...c))},XSn=[],Ss=e=>{const n=t=>t[e]||XSn;return n.isThemeGetter=!0,n},d$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,h$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,YSn=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,ZSn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,JSn=/\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$/,e6n=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,t6n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,n6n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,uu=e=>YSn.test(e),wn=e=>!!e&&!Number.isNaN(Number(e)),Ho=e=>!!e&&Number.isInteger(Number(e)),ww=e=>e.endsWith("%")&&wn(e.slice(0,-1)),Zc=e=>ZSn.test(e),p$=()=>!0,r6n=e=>JSn.test(e)&&!e6n.test(e),BS=()=>!1,s6n=e=>t6n.test(e),i6n=e=>n6n.test(e),a6n=e=>!pt(e)&&!bt(e),o6n=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)),c6n=e=>Xu(e,v$,BS),pt=e=>d$.test(e),N_=e=>Xu(e,b$,r6n),qj=e=>Xu(e,m6n,wn),l6n=e=>Xu(e,x$,p$),u6n=e=>Xu(e,y$,BS),Uj=e=>Xu(e,m$,BS),_6n=e=>Xu(e,g$,i6n),u1=e=>Xu(e,w$,s6n),bt=e=>h$.test(e),Qp=e=>Rf(e,b$),f6n=e=>Rf(e,y$),Gj=e=>Rf(e,m$),d6n=e=>Rf(e,v$),h6n=e=>Rf(e,g$),_1=e=>Rf(e,w$,!0),p6n=e=>Rf(e,x$,!0),Xu=(e,n,t)=>{const r=d$.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Rf=(e,n,t=!1)=>{const r=h$.exec(e);return r?r[1]?n(r[1]):t:!1},m$=e=>e==="position"||e==="percentage",g$=e=>e==="image"||e==="url",v$=e=>e==="length"||e==="size"||e==="bg-size",b$=e=>e==="length",m6n=e=>e==="number",y$=e=>e==="family-name",x$=e=>e==="number"||e==="weight",w$=e=>e==="shadow",Kj=()=>{const e=Ss("color"),n=Ss("font"),t=Ss("text"),r=Ss("font-weight"),s=Ss("tracking"),i=Ss("leading"),a=Ss("breakpoint"),o=Ss("container"),c=Ss("spacing"),u=Ss("radius"),h=Ss("shadow"),f=Ss("inset-shadow"),p=Ss("text-shadow"),m=Ss("drop-shadow"),w=Ss("blur"),k=Ss("perspective"),v=Ss("aspect"),b=Ss("ease"),y=Ss("animate"),x=()=>["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(),bt,pt],j=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],z=()=>[bt,pt,c],M=()=>[uu,"full","auto",...z()],D=()=>[Ho,"none","subgrid",bt,pt],I=()=>["auto",{span:["full",Ho,bt,pt]},Ho,bt,pt],B=()=>[Ho,"auto",bt,pt],G=()=>["auto","min","max","fr",bt,pt],U=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...z()],Z=()=>[uu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],J=()=>[uu,"screen","full","dvw","lvw","svw","min","max","fit",...z()],$=()=>[uu,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],L=()=>[e,bt,pt],q=()=>[...C(),Gj,Uj,{position:[bt,pt]}],P=()=>["no-repeat",{repeat:["","x","y","space","round"]}],F=()=>["auto","cover","contain",d6n,c6n,{size:[bt,pt]}],re=()=>[ww,Qp,N_],ie=()=>["","none","full",u,bt,pt],ue=()=>["",wn,Qp,N_],se=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],oe=()=>[wn,ww,Gj,Uj],ce=()=>["","none",w,bt,pt],pe=()=>["none",wn,bt,pt],ve=()=>["none",wn,bt,pt],Me=()=>[wn,bt,pt],Fe=()=>[uu,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Zc],breakpoint:[Zc],color:[p$],container:[Zc],"drop-shadow":[Zc],ease:["in","out","in-out"],font:[a6n],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Zc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Zc],shadow:[Zc],spacing:["px",wn],text:[Zc],"text-shadow":[Zc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",uu,pt,bt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",bt,pt]}],"container-named":[o6n],columns:[{columns:[wn,pt,bt,o]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],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:[Ho,"auto",bt,pt]}],basis:[{basis:[uu,"full","auto",o,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[wn,uu,"auto","initial","none",pt]}],grow:[{grow:["",wn,bt,pt]}],shrink:[{shrink:["",wn,bt,pt]}],order:[{order:[Ho,"first","last","none",bt,pt]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:I()}],"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":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...U(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...U()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":U()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...J()]}],"min-inline-size":[{"min-inline":["auto",...J()]}],"max-inline-size":[{"max-inline":["none",...J()]}],"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,Qp,N_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,p6n,l6n]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",ww,pt]}],"font-family":[{font:[f6n,u6n,n]}],"font-features":[{"font-features":[pt]}],"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,bt,pt]}],"line-clamp":[{"line-clamp":[wn,"none",bt,qj]}],leading:[{leading:[i,...z()]}],"list-image":[{"list-image":["none",bt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",bt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[wn,"from-font","auto",bt,N_]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[wn,"auto",bt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"tab-size":[{tab:[Ho,bt,pt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",bt,pt]}],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",bt,pt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:q()}],"bg-repeat":[{bg:P()}],"bg-size":[{bg:F()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ho,bt,pt],radial:["",bt,pt],conic:[Ho,bt,pt]},h6n,_6n]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:re()}],"gradient-via-pos":[{via:re()}],"gradient-to-pos":[{to:re()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ie()}],"rounded-s":[{"rounded-s":ie()}],"rounded-e":[{"rounded-e":ie()}],"rounded-t":[{"rounded-t":ie()}],"rounded-r":[{"rounded-r":ie()}],"rounded-b":[{"rounded-b":ie()}],"rounded-l":[{"rounded-l":ie()}],"rounded-ss":[{"rounded-ss":ie()}],"rounded-se":[{"rounded-se":ie()}],"rounded-ee":[{"rounded-ee":ie()}],"rounded-es":[{"rounded-es":ie()}],"rounded-tl":[{"rounded-tl":ie()}],"rounded-tr":[{"rounded-tr":ie()}],"rounded-br":[{"rounded-br":ie()}],"rounded-bl":[{"rounded-bl":ie()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[wn,bt,pt]}],"outline-w":[{outline:["",wn,Qp,N_]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",h,_1,u1]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,_1,u1]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[wn,N_]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,_1,u1]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[wn,bt,pt]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"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":[wn]}],"mask-image-linear-from-pos":[{"mask-linear-from":oe()}],"mask-image-linear-to-pos":[{"mask-linear-to":oe()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":oe()}],"mask-image-t-to-pos":[{"mask-t-to":oe()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":oe()}],"mask-image-r-to-pos":[{"mask-r-to":oe()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":oe()}],"mask-image-b-to-pos":[{"mask-b-to":oe()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":oe()}],"mask-image-l-to-pos":[{"mask-l-to":oe()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":oe()}],"mask-image-x-to-pos":[{"mask-x-to":oe()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":oe()}],"mask-image-y-to-pos":[{"mask-y-to":oe()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[bt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":oe()}],"mask-image-radial-to-pos":[{"mask-radial-to":oe()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":[wn]}],"mask-image-conic-from-pos":[{"mask-conic-from":oe()}],"mask-image-conic-to-pos":[{"mask-conic-to":oe()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:q()}],"mask-repeat":[{mask:P()}],"mask-size":[{mask:F()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",bt,pt]}],filter:[{filter:["","none",bt,pt]}],blur:[{blur:ce()}],brightness:[{brightness:[wn,bt,pt]}],contrast:[{contrast:[wn,bt,pt]}],"drop-shadow":[{"drop-shadow":["","none",m,_1,u1]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",wn,bt,pt]}],"hue-rotate":[{"hue-rotate":[wn,bt,pt]}],invert:[{invert:["",wn,bt,pt]}],saturate:[{saturate:[wn,bt,pt]}],sepia:[{sepia:["",wn,bt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",bt,pt]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[wn,bt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[wn,bt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",wn,bt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[wn,bt,pt]}],"backdrop-invert":[{"backdrop-invert":["",wn,bt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[wn,bt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[wn,bt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",wn,bt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",bt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[wn,"initial",bt,pt]}],ease:[{ease:["linear","initial",b,bt,pt]}],delay:[{delay:[wn,bt,pt]}],animate:[{animate:["none",y,bt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,bt,pt]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:pe()}],"rotate-x":[{"rotate-x":pe()}],"rotate-y":[{"rotate-y":pe()}],"rotate-z":[{"rotate-z":pe()}],scale:[{scale:ve()}],"scale-x":[{"scale-x":ve()}],"scale-y":[{"scale-y":ve()}],"scale-z":[{"scale-z":ve()}],"scale-3d":["scale-3d"],skew:[{skew:Me()}],"skew-x":[{"skew-x":Me()}],"skew-y":[{"skew-y":Me()}],transform:[{transform:[bt,pt,"","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:[Ho,bt,pt]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",bt,pt]}],"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":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"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",bt,pt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[wn,Qp,N_,qj]}],stroke:[{stroke:["none",...L()]}],"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"]}},g6n=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(Od(e,"cacheSize",n),Od(e,"prefix",t),Od(e,"experimentalParseClassName",r),f1(e.theme,i.theme),f1(e.classGroups,i.classGroups),f1(e.conflictingClassGroups,i.conflictingClassGroups),f1(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Od(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),Od(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),d1(e.theme,s.theme),d1(e.classGroups,s.classGroups),d1(e.conflictingClassGroups,s.conflictingClassGroups),d1(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),_5(e,s,"postfixLookupClassGroups"),_5(e,s,"orderSensitiveModifiers"),e),Od=(e,n,t)=>{t!==void 0&&(e[n]=t)},f1=(e,n)=>{if(n)for(const t in n)Od(e,t,n[t])},d1=(e,n)=>{if(n)for(const t in n)_5(e,n,t)},_5=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},v6n=(e,...n)=>typeof e=="function"?Hj(Kj,e,...n):Hj(()=>g6n(Kj(),e),...n),b6n=v6n({extend:{theme:{text:["menu"]}}});function Ns(...e){return b6n(...e)}const y6n={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 Wt({variant:e="default",size:n="default",className:t,...r}){return _.jsx("span",{className:Ns("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",y6n[e],t),...r})}const x6n=["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(" "),w6n={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"},k6n={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 k$(e,n,t,r){return Ns(x6n,w6n[e],k6n[n],t&&"active",r)}function Ie({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return _.jsx("button",{className:k$(n,t,e,r),...s})}function jh({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return _.jsx("a",{className:k$(n,t,e,r),...s})}const S6n=["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(" "),C6n={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"},E6n={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function S$(e,n,t,r,s){return Ns(S6n,C6n[e],E6n[n],r==="circle"&&"rounded-full",t&&"active",s)}const It=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:S$(s,r,n,t,i),...a})});function Wh({active:e=!1,shape:n="rounded",size:t="default",variant:r="default",className:s,...i}){return _.jsx("a",{className:S$(r,t,e,n,s),...i})}const N6n={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 Br({variant:e="default",className:n,...t}){return _.jsx("input",{className:Ns("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",N6n[e],n),...t})}function vn({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return _.jsx("button",{className:Ns("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 St({className:e,...n}){return _.jsx("span",{className:Ns("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 Pr({className:e,...n}){return _.jsx("div",{className:Ns("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const z6n={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 Yd({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return _.jsxs("span",{className:Ns("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[_.jsx("span",{className:Ns("h-[7px] w-[7px] shrink-0 rounded-full bg-current",z6n[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const j6n=["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 C$(e,n){return Ns(j6n,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function PS({checked:e=!1,className:n,children:t,...r}){return _.jsx("button",{role:"switch","aria-checked":e,className:C$(e,n),...r,children:t??_.jsx("span",{})})}function A6n({checked:e=!1,className:n,...t}){return _.jsx("span",{className:C$(e,n),...t,children:_.jsx("span",{})})}var si=mD();const T6n=Em(si);function R6n(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 M6n=e=>{switch(e){case"success":return L6n;case"info":return $6n;case"warning":return I6n;case"error":return B6n;default:return null}},O6n=Array(12).fill(0),D6n=({visible:e,className:n})=>it.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},it.createElement("div",{className:"sonner-spinner"},O6n.map((t,r)=>it.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),L6n=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),I6n=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),$6n=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),B6n=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),P6n=it.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"},it.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),it.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),F6n=()=>{const[e,n]=it.useState(document.hidden);return it.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let H6n=1;const q6n=100,Vj=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:H6n++};class U6n{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-q6n;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=Vj(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],it.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(K6n(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"&&!it.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"&&!it.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"&&!it.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 h=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description,m=typeof h=="object"&&!it.isValidElement(h)?h:{message:h};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,h)=>o.then(()=>a[0]==="reject"?h(a[1]):u(a[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=Vj(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 Fi=new U6n,G6n=(e,n)=>Fi.message(e,n),K6n=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",V6n=G6n,W6n=()=>Fi.toasts,Q6n=()=>Fi.getActiveToasts(),X6n=Object.assign(V6n,{success:Fi.success,info:Fi.info,warning:Fi.warning,error:Fi.error,custom:Fi.custom,message:Fi.message,promise:Fi.promise,dismiss:Fi.dismiss,loading:Fi.loading},{getHistory:W6n,getToasts:Q6n});R6n("[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 h1(e){return e.label!==void 0}const Y6n=3,Z6n="24px",J6n="16px",Wj=4e3,eCn=356,tCn=14,nCn=45,rCn=200;function qo(...e){return e.filter(Boolean).join(" ")}function sCn(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const iCn=e=>{var n,t,r,s,i,a,o,c,u;const{invert:h,toast:f,unstyled:p,interacting:m,setHeights:w,visibleToasts:k,heights:v,index:b,toasts:y,expanded:x,removeToast:C,defaultRichColors:N,closeButton:j,style:A,cancelButtonStyle:z,actionButtonStyle:M,className:D="",descriptionClassName:I="",duration:B,position:G,gap:U,expandByDefault:Q,classNames:V,icons:Z,closeButtonAriaLabel:J="Close toast"}=e,[$,L]=it.useState(null),[q,P]=it.useState(null),[F,re]=it.useState(!1),[ie,ue]=it.useState(!1),[se,K]=it.useState(!1),[oe,ce]=it.useState(!1),[pe,ve]=it.useState(!1),[Me,Fe]=it.useState(0),[Ye,Te]=it.useState(0),$e=it.useRef(f.duration||B||Wj),yt=it.useRef(null),ot=it.useRef(null),Mt=b===0,jt=b+1<=k,Pt=f.type,Le=Pt??"default",nt=f.dismissible!==!1,ke=f.className||"",me=f.descriptionClassName||"",je=it.useMemo(()=>v.findIndex(gt=>gt.toastId===f.id)||0,[v,f.id]),qe=it.useMemo(()=>{var gt;return(gt=f.closeButton)!=null?gt:j},[f.closeButton,j]),rt=it.useMemo(()=>f.duration||B||Wj,[f.duration,B]),dt=it.useRef(0),st=it.useRef(0),Ut=it.useRef(0),Xt=it.useRef(null),[en,an]=G.split("-"),At=it.useMemo(()=>v.reduce((gt,ln,bn)=>bn>=je?gt:gt+ln.height,0),[v,je]),gn=F6n(),on=it.useMemo(()=>{var gt;return(gt=e.swipeDirections)!=null?gt:sCn(G)},[e.swipeDirections,G]),Ot=f.invert||h,dn=Pt==="loading";st.current=it.useMemo(()=>je*U+At,[je,At]),it.useEffect(()=>{$e.current=rt},[rt]),it.useEffect(()=>{re(!0)},[]),it.useEffect(()=>{const gt=ot.current;if(gt){const ln=gt.getBoundingClientRect().height;return Te(ln),w(bn=>[{toastId:f.id,height:ln,position:f.position},...bn]),()=>w(bn=>bn.filter(un=>un.toastId!==f.id))}},[w,f.id]),it.useLayoutEffect(()=>{if(!F)return;const gt=ot.current,ln=gt.style.height;gt.style.height="auto";const bn=gt.getBoundingClientRect().height;gt.style.height=ln,Te(bn),w(un=>un.find(Mn=>Mn.toastId===f.id)?un.map(Mn=>Mn.toastId===f.id?{...Mn,height:bn}:Mn):[{toastId:f.id,height:bn,position:f.position},...un])},[F,f.title,f.description,w,f.id,f.jsx,f.action,f.cancel]);const cn=it.useCallback(()=>{ue(!0),Fe(st.current),w(gt=>gt.filter(ln=>ln.toastId!==f.id)),setTimeout(()=>{C(f)},rCn)},[f,C,w,st]);it.useEffect(()=>{if(f.promise&&Pt==="loading"||f.duration===1/0||f.type==="loading")return;let gt;return x||m||gn?(()=>{if(Ut.current{$e.current!==1/0&&(dt.current=new Date().getTime(),gt=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),cn()},$e.current))})(),()=>clearTimeout(gt)},[x,m,f,Pt,gn,cn]),it.useEffect(()=>{f.delete&&(cn(),f.onDismiss==null||f.onDismiss.call(f,f))},[cn,f.delete]);function kn(){var gt;if(Z!=null&&Z.loading){var ln;return it.createElement("div",{className:qo(V==null?void 0:V.loader,f==null||(ln=f.classNames)==null?void 0:ln.loader,"sonner-loader"),"data-visible":Pt==="loading"},Z.loading)}return it.createElement(D6n,{className:qo(V==null?void 0:V.loader,f==null||(gt=f.classNames)==null?void 0:gt.loader),visible:Pt==="loading"})}const Wn=f.icon||(Z==null?void 0:Z[Pt])||M6n(Pt);var gs,ns;return it.createElement("li",{tabIndex:0,ref:ot,className:qo(D,ke,V==null?void 0:V.toast,f==null||(n=f.classNames)==null?void 0:n.toast,V==null?void 0:V[Le],f==null||(t=f.classNames)==null?void 0:t[Le]),"data-sonner-toast":"","data-rich-colors":(gs=f.richColors)!=null?gs:N,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":F,"data-promise":!!f.promise,"data-swiped":pe,"data-removed":ie,"data-visible":jt,"data-y-position":en,"data-x-position":an,"data-index":b,"data-front":Mt,"data-swiping":se,"data-dismissible":nt,"data-type":Pt,"data-invert":Ot,"data-swipe-out":oe,"data-swipe-direction":q,"data-expanded":!!(x||Q&&F),"data-testid":f.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${ie?Me:st.current}px`,"--initial-height":Q?"auto":`${Ye}px`,...A,...f.style},onDragEnd:()=>{K(!1),L(null),Xt.current=null},onPointerDown:gt=>{gt.button!==2&&(dn||!nt||(yt.current=new Date,Fe(st.current),gt.target.setPointerCapture(gt.pointerId),gt.target.tagName!=="BUTTON"&&(K(!0),Xt.current={x:gt.clientX,y:gt.clientY})))},onPointerUp:()=>{var gt,ln,bn;if(oe||!nt)return;Xt.current=null;const un=Number(((gt=ot.current)==null?void 0:gt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),_r=Number(((ln=ot.current)==null?void 0:ln.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Mn=new Date().getTime()-((bn=yt.current)==null?void 0:bn.getTime()),Qn=$==="x"?un:_r,ar=Math.abs(Qn)/Mn;if(($==="x"?on.includes(un>0?"right":"left"):on.includes(_r>0?"bottom":"top"))&&(Math.abs(Qn)>=nCn||ar>.11)){Fe(st.current),f.onDismiss==null||f.onDismiss.call(f,f),P($==="x"?un>0?"right":"left":_r>0?"down":"up"),cn(),ce(!0);return}else{var Ht,vr;(Ht=ot.current)==null||Ht.style.setProperty("--swipe-amount-x","0px"),(vr=ot.current)==null||vr.style.setProperty("--swipe-amount-y","0px")}ve(!1),K(!1),L(null)},onPointerMove:gt=>{var ln,bn,un;if(!Xt.current||!nt||((ln=window.getSelection())==null?void 0:ln.toString().length)>0)return;const Mn=gt.clientY-Xt.current.y,Qn=gt.clientX-Xt.current.x;!$&&(Math.abs(Qn)>1||Math.abs(Mn)>1)&&L(Math.abs(Qn)>Math.abs(Mn)?"x":"y");let ar={x:0,y:0};const wt=Ht=>1/(1.5+Math.abs(Ht)/20);if($==="y"){if(on.includes("top")||on.includes("bottom"))if(on.includes("top")&&Mn<0||on.includes("bottom")&&Mn>0)ar.y=Mn;else{const Ht=Mn*wt(Mn);ar.y=Math.abs(Ht)0)ar.x=Qn;else{const Ht=Qn*wt(Qn);ar.x=Math.abs(Ht)0||Math.abs(ar.y)>0)&&ve(!0),(bn=ot.current)==null||bn.style.setProperty("--swipe-amount-x",`${ar.x}px`),(un=ot.current)==null||un.style.setProperty("--swipe-amount-y",`${ar.y}px`)}},qe&&!f.jsx&&Pt!=="loading"?it.createElement("button",{"aria-label":J,"data-disabled":dn,"data-close-button":!0,onClick:dn||!nt?()=>{}:()=>{cn(),f.onDismiss==null||f.onDismiss.call(f,f)},className:qo(V==null?void 0:V.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(ns=Z==null?void 0:Z.close)!=null?ns:P6n):null,(Pt||f.icon||f.promise)&&f.icon!==null&&((Z==null?void 0:Z[Pt])!==null||f.icon)?it.createElement("div",{"data-icon":"",className:qo(V==null?void 0:V.icon,f==null||(s=f.classNames)==null?void 0:s.icon)},Pt==="loading"?f.icon||kn():f.promise?kn():null,Pt!=="loading"?Wn:null):null,it.createElement("div",{"data-content":"",className:qo(V==null?void 0:V.content,f==null||(i=f.classNames)==null?void 0:i.content)},it.createElement("div",{"data-title":"",className:qo(V==null?void 0:V.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?it.createElement("div",{"data-description":"",className:qo(I,me,V==null?void 0:V.description,f==null||(o=f.classNames)==null?void 0:o.description)},typeof f.description=="function"?f.description():f.description):null),it.isValidElement(f.cancel)?f.cancel:f.cancel&&h1(f.cancel)?it.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||z,onClick:gt=>{h1(f.cancel)&&nt&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,gt),cn())},className:qo(V==null?void 0:V.cancelButton,f==null||(c=f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,it.isValidElement(f.action)?f.action:f.action&&h1(f.action)?it.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||M,onClick:gt=>{h1(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,gt),!gt.defaultPrevented&&cn())},className:qo(V==null?void 0:V.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function Qj(){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 aCn(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?J6n:Z6n;function c(u){["top","right","bottom","left"].forEach(h=>{t[`${a}-${h}`]=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 oCn=it.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:c,className:u,offset:h,mobileOffset:f,theme:p="light",richColors:m,duration:w,style:k,visibleToasts:v=Y6n,toastOptions:b,dir:y=Qj(),gap:x=tCn,icons:C,customAriaLabel:N,containerAriaLabel:j="Notifications"}=n,[A,z]=it.useState([]),M=it.useMemo(()=>r?A.filter(re=>re.toasterId===r):A.filter(re=>!re.toasterId),[A,r]),D=it.useMemo(()=>Array.from(new Set([i].concat(M.filter(re=>re.position).map(re=>re.position)))),[M,i]),[I,B]=it.useState([]),[G,U]=it.useState(!1),[Q,V]=it.useState(!1),[Z,J]=it.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=it.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),q=it.useRef(null),P=it.useRef(!1),F=it.useCallback(re=>{z(ie=>{var ue;return(ue=ie.find(se=>se.id===re.id))!=null&&ue.delete||Fi.dismiss(re.id),ie.filter(({id:se})=>se!==re.id)})},[]);return it.useEffect(()=>Fi.subscribe(re=>{if(re.dismiss){requestAnimationFrame(()=>{z(ie=>ie.map(ue=>ue.id===re.id?{...ue,delete:!0}:ue))});return}setTimeout(()=>{T6n.flushSync(()=>{z(ie=>{const ue=ie.findIndex(se=>se.id===re.id);return ue!==-1?[...ie.slice(0,ue),{...ie[ue],...re},...ie.slice(ue+1)]:[re,...ie]})})})}),[]),it.useEffect(()=>{if(p!=="system"){J(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const re=window.matchMedia("(prefers-color-scheme: dark)");try{re.addEventListener("change",({matches:ie})=>{J(ie?"dark":"light")})}catch{re.addListener(({matches:ue})=>{try{J(ue?"dark":"light")}catch(se){console.error(se)}})}},[p]),it.useEffect(()=>{A.length<=1&&U(!1)},[A]),it.useEffect(()=>{const re=ie=>{var ue;if(a.length>0&&a.every(oe=>ie[oe]||ie.code===oe)){var K;U(!0),(K=$.current)==null||K.focus()}ie.code==="Escape"&&(document.activeElement===$.current||(ue=$.current)!=null&&ue.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",re),()=>document.removeEventListener("keydown",re)},[a]),it.useEffect(()=>{if($.current)return()=>{q.current&&(q.current.focus({preventScroll:!0}),q.current=null,P.current=!1)}},[$.current]),it.createElement("section",{ref:t,"aria-label":N??`${j} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},D.map((re,ie)=>{var ue;const[se,K]=re.split("-");return M.length?it.createElement("ol",{key:re,dir:y==="auto"?Qj():y,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":se,"data-x-position":K,style:{"--front-toast-height":`${((ue=I[0])==null?void 0:ue.height)||0}px`,"--width":`${eCn}px`,"--gap":`${x}px`,...k,...aCn(h,f)},onBlur:oe=>{P.current&&!oe.currentTarget.contains(oe.relatedTarget)&&(P.current=!1,q.current&&(q.current.focus({preventScroll:!0}),q.current=null))},onFocus:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||P.current||(P.current=!0,q.current=oe.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{Q||U(!1)},onDragEnd:()=>U(!1),onPointerDown:oe=>{oe.target instanceof HTMLElement&&oe.target.dataset.dismissible==="false"||V(!0)},onPointerUp:()=>V(!1)},M.filter(oe=>!oe.position&&ie===0||oe.position===re).map((oe,ce)=>{var pe,ve;return it.createElement(iCn,{key:oe.id,icons:C,index:ce,toast:oe,defaultRichColors:m,duration:(pe=b==null?void 0:b.duration)!=null?pe:w,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(ve=b==null?void 0:b.closeButton)!=null?ve:c,interacting:Q,position:re,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:F,toasts:M.filter(Me=>Me.position==oe.position),heights:I.filter(Me=>Me.position==oe.position),setHeights:B,expandByDefault:o,gap:x,expanded:G,swipeDirections:n.swipeDirections})})):null}))});function cCn(e){const[n]=c$();return _.jsx(oCn,{theme:n,...e})}function Zt(e,n,t){X6n[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function FS({content:e,children:n,className:t}){const r=T.useRef(null),s=T.useRef(null);function i(){const o=r.current,c=s.current;if(!o||!c)return;c.matches(":popover-open")||c.showPopover();const u=o.getBoundingClientRect(),h=c.getBoundingClientRect(),f=Math.max(8,Math.min(u.left+u.width/2-h.width/2,window.innerWidth-h.width-8));c.style.left=`${f}px`,c.style.top=`${Math.max(8,u.top-h.height-6)}px`}function a(){var o,c;(o=r.current)!=null&&o.matches(":hover, :focus")||(c=s.current)==null||c.hidePopover()}return T.useEffect(()=>{const o=()=>{var c;return(c=s.current)==null?void 0:c.hidePopover()};return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[]),_.jsxs("span",{ref:r,className:Ns("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:0,role:"img","aria-label":e,onMouseEnter:i,onMouseLeave:a,onFocus:i,onBlur:a,onKeyDown:o=>{var c;o.key==="Escape"&&((c=s.current)!=null&&c.matches(":popover-open"))&&(o.preventDefault(),o.stopPropagation(),s.current.hidePopover())},children:[n,_.jsx("span",{ref:s,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 lCn=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function Dm(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(lCn)];(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(),h=u[0],f=u.at(-1);!h||!f?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===h?(c.preventDefault(),f.focus()):!c.shiftKey&&document.activeElement===f&&(c.preventDefault(),h.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function E$({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?Z9t():bEt({count:Jt(n.activeTurnCount)})),n.pendingPermissionCount>0&&c.push(n.pendingPermissionCount===1?S9t():I8t({count:Jt(n.pendingPermissionCount)})),o>0&&c.push(o===1?$9t():iEt({count:Jt(o)})),n.queuedMessageCount>0&&c.push(n.queuedMessageCount===1?G9t():fEt({count:Jt(n.queuedMessageCount)})),n.activeRunCount>0&&c.push(n.activeRunCount===1?T9t():s9t({count:Jt(n.activeRunCount)})),Dm(a,s),si.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:Y8t({host:Ce(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:g9t()}),_.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(Ie,{disabled:r,onClick:s,children:ff()}),_.jsx(Ie,{variant:"danger",disabled:r,onClick:i,children:r?EEt():U8t()})]})]})}),document.body)}/** +स्टोर की एक कॉपी नए स्थान पर बनाई जाएगी और वहीं सक्रिय की जाएगी। सक्रिय रन या चैट स्थानांतरण को रोक सकते हैं।`,_0n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?a0n(e):t==="fa"?o0n(e):t==="ar"?c0n(e):t==="es"?l0n(e):t==="hi"?u0n(e):i0n(e)}),f0n=()=>"Move data here",d0n=()=>"将数据移动到此处",h0n=()=>"انتقال داده به اینجا",p0n=()=>"نقل البيانات إلى هنا",m0n=()=>"Mover los datos aquí",g0n=()=>"डेटा यहाँ ले जाएं",v0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d0n():t==="fa"?h0n():t==="ar"?p0n():t==="es"?m0n():t==="hi"?g0n():f0n()}),b0n=()=>"Moving…",y0n=()=>"正在移动…",x0n=()=>"در حال جابه‌جایی…",w0n=()=>"جارٍ النقل…",k0n=()=>"Moviendo…",S0n=()=>"स्थानांतरित हो रहा है…",C0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y0n():t==="fa"?x0n():t==="ar"?w0n():t==="es"?k0n():t==="hi"?S0n():b0n()}),E0n=()=>"Preparing…",N0n=()=>"正在准备…",z0n=()=>"در حال آماده‌سازی…",j0n=()=>"جارٍ التحضير…",A0n=()=>"Preparando…",T0n=()=>"तैयार हो रहा है…",R0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N0n():t==="fa"?z0n():t==="ar"?j0n():t==="es"?A0n():t==="hi"?T0n():E0n()}),M0n=()=>" (same disk, instant)",O0n=()=>"(同一磁盘,可立即完成)",D0n=()=>" (روی همان دیسک، فوری)",L0n=()=>" (القرص نفسه، فوري)",I0n=()=>" (mismo disco, instantáneo)",$0n=()=>" (उसी डिस्क पर, तुरंत)",B0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?O0n():t==="fa"?D0n():t==="ar"?L0n():t==="es"?I0n():t==="hi"?$0n():M0n()}),P0n=()=>"default location",F0n=()=>"默认位置",H0n=()=>"محل پیش‌فرض",q0n=()=>"الموقع الافتراضي",U0n=()=>"ubicación predeterminada",G0n=()=>"डिफ़ॉल्ट स्थान",V0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?F0n():t==="fa"?H0n():t==="ar"?q0n():t==="es"?U0n():t==="hi"?G0n():P0n()}),K0n=()=>"ORX_DATA_DIR environment variable",W0n=()=>"ORX_DATA_DIR 环境变量",Q0n=()=>"متغیر محیطی ORX_DATA_DIR",X0n=()=>"متغيّر البيئة ORX_DATA_DIR",Y0n=()=>"variable de entorno ORX_DATA_DIR",Z0n=()=>"ORX_DATA_DIR एनवायरनमेंट वेरिएबल",J0n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?W0n():t==="fa"?Q0n():t==="ar"?X0n():t==="es"?Y0n():t==="hi"?Z0n():K0n()}),emn=()=>"your saved setting",tmn=()=>"已保存的设置",nmn=()=>"تنظیم ذخیره‌شدهٔ شما",rmn=()=>"إعدادك المحفوظ",smn=()=>"tu ajuste guardado",imn=()=>"आपकी सेव की गई सेटिंग",amn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?tmn():t==="fa"?nmn():t==="ar"?rmn():t==="es"?smn():t==="hi"?imn():emn()}),omn=()=>"XDG_DATA_HOME",cmn=()=>"XDG_DATA_HOME",lmn=()=>"XDG_DATA_HOME",umn=()=>"XDG_DATA_HOME",_mn=()=>"XDG_DATA_HOME",fmn=()=>"XDG_DATA_HOME",dmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?cmn():t==="fa"?lmn():t==="ar"?umn():t==="es"?_mn():t==="hi"?fmn():omn()}),hmn=()=>"Verifying…",pmn=()=>"正在验证…",mmn=()=>"در حال بررسی…",gmn=()=>"جارٍ التحقق…",vmn=()=>"Verificando…",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=()=>"Loading…",wmn=()=>"正在加载…",kmn=()=>"در حال بارگیری…",Smn=()=>"جارٍ التحميل…",Cmn=()=>"Cargando…",Emn=()=>"लोड हो रहा है…",SI=((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=()=>"This sub-agent is no longer available.",zmn=()=>"此子智能体已不可用。",jmn=()=>"این عامل فرعی دیگر در دسترس نیست.",Amn=()=>"لم يعد هذا الوكيل الفرعي متاحًا.",Tmn=()=>"Este subagente ya no está disponible.",Rmn=()=>"यह सब-एजेंट अब उपलब्ध नहीं है।",Mmn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zmn():t==="fa"?jmn():t==="ar"?Amn():t==="es"?Tmn():t==="hi"?Rmn():Nmn()}),Omn=e=>`${e==null?void 0:e.label} (preview; double-click or Command/Control K, then Enter to keep open)`,Dmn=e=>`${e==null?void 0:e.label}(预览;双击或按 Command/Control K 后按 Enter 以保持打开)`,Lmn=e=>`${e==null?void 0:e.label} (پیش‌نمایش؛ برای باز نگه‌داشتن دوبار کلیک کنید یا Command/Control K و سپس Enter را بزنید)`,Imn=e=>`${e==null?void 0:e.label} (معاينة؛ انقر نقرًا مزدوجًا أو Command/Control K ثم Enter لإبقائه مفتوحًا)`,$mn=e=>`${e==null?void 0:e.label} (vista previa; doble clic o Comando/Control K y luego Intro para mantenerla abierta)`,Bmn=e=>`${e==null?void 0:e.label} (प्रीव्यू; खुला रखने के लिए डबल-क्लिक करें या Command/Control K, फिर Enter दबाएं)`,Pmn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Dmn(e):t==="fa"?Lmn(e):t==="ar"?Imn(e):t==="es"?$mn(e):t==="hi"?Bmn(e):Omn(e)}),Fmn=e=>`${e==null?void 0:e.label} (double-click or ⌘/Ctrl+K Enter to keep open)`,Hmn=e=>`${e==null?void 0:e.label}(双击或按 ⌘/Ctrl+K 后按 Enter 以保持打开)`,qmn=e=>`${e==null?void 0:e.label} (برای باز نگه‌داشتن دوبار کلیک کنید یا ⌘/Ctrl+K و سپس Enter را بزنید)`,Umn=e=>`${e==null?void 0:e.label} (انقر نقرًا مزدوجًا أو ⌘/Ctrl+K ثم Enter لإبقائه مفتوحًا)`,Gmn=e=>`${e==null?void 0:e.label} (doble clic o ⌘/Ctrl+K Intro para mantenerla abierta)`,Vmn=e=>`${e==null?void 0:e.label} (खुला रखने के लिए डबल-क्लिक करें या ⌘/Ctrl+K फिर Enter दबाएं)`,Kmn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Hmn(e):t==="fa"?qmn(e):t==="ar"?Umn(e):t==="es"?Gmn(e):t==="hi"?Vmn(e):Fmn(e)}),Wmn=()=>"Alternatively, tell your agent to add a LaTeX template for you.",Qmn=()=>"或者,请你的智能体为你添加 LaTeX 模板。",Xmn=()=>"یا از عامل خود بخواهید یک قالب LaTeX برایتان اضافه کند.",Ymn=()=>"أو بدلًا من ذلك، اطلب من وكيلك إضافة قالب LaTeX لك.",Zmn=()=>"También puedes pedirle a tu agente que añada una plantilla de LaTeX por ti.",Jmn=()=>"या अपने एजेंट से आपके लिए एक LaTeX टेम्पलेट जोड़ने को कहें।",egn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Qmn():t==="fa"?Xmn():t==="ar"?Ymn():t==="es"?Zmn():t==="hi"?Jmn():Wmn()}),tgn=()=>", a repo for training a mini-GPT from scratch.",ngn=()=>",一个从零训练迷你 GPT 的仓库。",rgn=()=>"، اثر Andrej Karpathy، مخزنی برای آموزش یک GPT کوچک از صفر، استفاده می‌کند.",sgn=()=>" لأندريه كارباثي، المخصّص لتدريب نموذج mini-GPT من الصفر.",ign=()=>" de Andrej Karpathy, un repositorio para entrenar un mini-GPT desde cero.",agn=()=>", स्क्रैच से एक मिनी-GPT ट्रेन करने के लिए एक रिपॉज़िटरी।",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=()=>"Close",lgn=()=>"关闭",ugn=()=>"بستن",_gn=()=>"إغلاق",fgn=()=>"Cerrar",dgn=()=>"बंद करें",H3=((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=()=>"Create a new project",pgn=()=>"新建项目",mgn=()=>"ایجاد پروژهٔ جدید",ggn=()=>"إنشاء مشروع جديد",vgn=()=>"Crear un proyecto nuevo",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=()=>"Demo project",wgn=()=>"演示项目",kgn=()=>"پروژهٔ نمایشی",Sgn=()=>"مشروع توضيحي",Cgn=()=>"Proyecto de demostración",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=()=>"Look through the agent conversations, experiments, runs, and artifacts to see how a project on OpenResearch comes together.",jgn=()=>"浏览智能体对话、实验、运行和产物,了解 OpenResearch 项目是如何形成的。",Agn=()=>"گفتگوهای عامل، آزمایش‌ها، اجراها و خروجی‌ها را ببینید تا با شکل‌گیری یک پروژه در OpenResearch آشنا شوید.",Tgn=()=>"تصفّح محادثات الوكيل والتجارب وعمليات التشغيل والمُخرَجات لترى كيف يتشكّل مشروع على OpenResearch.",Rgn=()=>"Explora las conversaciones con el agente, los experimentos, las ejecuciones y los artefactos para ver cómo se construye un proyecto en OpenResearch.",Mgn=()=>"यह देखने के लिए एजेंट बातचीत, प्रयोग, रन और आर्टिफ़ैक्ट देखें कि OpenResearch पर एक प्रोजेक्ट कैसे आकार लेता है।",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=()=>"nanochat",Lgn=()=>"nanochat",Ign=()=>"nanochat",$gn=()=>"nanochat",Bgn=()=>"nanochat",Pgn=()=>"nanochat",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=()=>"Try the demo experiment",qgn=()=>"试试演示实验",Ugn=()=>"آزمایش نمایشی را امتحان کنید",Ggn=()=>"جرّب التجربة التوضيحية",Vgn=()=>"Probar el experimento de demostración",Kgn=()=>"डेमो प्रयोग आज़माएं",Wgn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?qgn():t==="fa"?Ugn():t==="ar"?Ggn():t==="es"?Vgn():t==="hi"?Kgn():Hgn()}),Qgn=()=>"Couldn’t save your progress. Try again.",Xgn=()=>"无法保存进度。请重试。",Ygn=()=>"ذخیرهٔ پیشرفت ممکن نشد. دوباره تلاش کنید.",Zgn=()=>"تعذّر حفظ تقدّمك. حاول مجددًا.",Jgn=()=>"No se pudo guardar tu progreso. Inténtalo de nuevo.",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=()=>"This is a demo project showing how OpenResearch works. This demo uses Andrej Karpathy's",r1n=()=>"这是一个展示 OpenResearch 工作方式的演示项目。本演示使用 Andrej Karpathy 的",s1n=()=>"این پروژهٔ نمایشی نحوهٔ کار OpenResearch را نشان می‌دهد. این نسخهٔ نمایشی از",i1n=()=>"هذا مشروع توضيحي يبيّن كيف يعمل OpenResearch. يستخدم هذا العرض مستودع",a1n=()=>"Este es un proyecto de demostración que muestra cómo funciona OpenResearch. Esta demo usa",o1n=()=>"यह एक डेमो प्रोजेक्ट है जो दिखाता है कि OpenResearch कैसे काम करता है। यह डेमो Andrej Karpathy के",c1n=((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()}),l1n=()=>"Welcome to OpenResearch",u1n=()=>"欢迎使用 OpenResearch",_1n=()=>"به OpenResearch خوش آمدید",f1n=()=>"مرحبًا بك في OpenResearch",d1n=()=>"Te damos la bienvenida a OpenResearch",h1n=()=>"OpenResearch में आपका स्वागत है",p1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?u1n():t==="fa"?_1n():t==="ar"?f1n():t==="es"?d1n():t==="hi"?h1n():l1n()}),m1n=()=>"All experiments are archived. Turn on Show archived to view them.",g1n=()=>"所有实验均已归档。开启“显示已归档”即可查看。",v1n=()=>"همه آزمایش‌ها بایگانی شده‌اند. برای دیدنشان نمایش بایگانی‌شده‌ها را فعال کنید.",b1n=()=>"جميع التجارب مؤرشفة. فعّل إظهار المؤرشف لعرضها.",y1n=()=>"Todos los experimentos están archivados. Activa Mostrar archivados para verlos.",x1n=()=>"सभी प्रयोग संग्रहीत हैं। उन्हें देखने के लिए संग्रहीत दिखाएँ चालू करें।",w1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?g1n():t==="fa"?v1n():t==="ar"?b1n():t==="es"?y1n():t==="hi"?x1n():m1n()}),k1n=()=>"Archive ancestors",S1n=()=>"归档祖先节点",C1n=()=>"بایگانی نیاکان",E1n=()=>"أرشفة الأسلاف",N1n=()=>"Archivar antepasados",z1n=()=>"पूर्वजों को संग्रहीत करें",j1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?S1n():t==="fa"?C1n():t==="ar"?E1n():t==="es"?N1n():t==="hi"?z1n():k1n()}),A1n=()=>"Archive descendants",T1n=()=>"归档后代节点",R1n=()=>"بایگانی نوادگان",M1n=()=>"أرشفة الفروع التابعة",O1n=()=>"Archivar descendientes",D1n=()=>"वंशजों को संग्रहीत करें",L1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?T1n():t==="fa"?R1n():t==="ar"?M1n():t==="es"?O1n():t==="hi"?D1n():A1n()}),I1n=()=>"Manage",$1n=()=>"管理",B1n=()=>"مدیریت",P1n=()=>"إدارة",F1n=()=>"Gestionar",H1n=()=>"प्रबंधित करें",q1n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$1n():t==="fa"?B1n():t==="ar"?P1n():t==="es"?F1n():t==="hi"?H1n():I1n()}),U1n=e=>`Manage ${e==null?void 0:e.name}`,G1n=e=>`管理 ${e==null?void 0:e.name}`,V1n=e=>`مدیریت ${e==null?void 0:e.name}`,K1n=e=>`إدارة ${e==null?void 0:e.name}`,W1n=e=>`Gestionar ${e==null?void 0:e.name}`,Q1n=e=>`${e==null?void 0:e.name} प्रबंधित करें`,bj=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?G1n(e):t==="fa"?V1n(e):t==="ar"?K1n(e):t==="es"?W1n(e):t==="hi"?Q1n(e):U1n(e)}),X1n=()=>"Archive this experiment",Y1n=()=>"归档此实验",Z1n=()=>"بایگانی این آزمایش",J1n=()=>"أرشفة هذه التجربة",evn=()=>"Archivar este experimento",tvn=()=>"इस प्रयोग को संग्रहीत करें",nvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Y1n():t==="fa"?Z1n():t==="ar"?J1n():t==="es"?evn():t==="hi"?tvn():X1n()}),rvn=()=>"Archived",svn=()=>"已归档",ivn=()=>"بایگانی‌شده",avn=()=>"مؤرشف",ovn=()=>"Archivado",cvn=()=>"संग्रहीत",CI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?svn():t==="fa"?ivn():t==="ar"?avn():t==="es"?ovn():t==="hi"?cvn():rvn()}),lvn=e=>`${e==null?void 0:e.count} archived`,uvn=e=>`${e==null?void 0:e.count} 个已归档`,_vn=e=>`${e==null?void 0:e.count} بایگانی‌شده`,fvn=e=>`${e==null?void 0:e.count} مؤرشفة`,dvn=e=>`${e==null?void 0:e.count} archivados`,hvn=e=>`${e==null?void 0:e.count} संग्रहीत`,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=()=>"Baseline",gvn=()=>"基线",vvn=()=>"مبنا",bvn=()=>"الأساس",yvn=()=>"Base",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=()=>"Experiment",Svn=()=>"实验",Cvn=()=>"آزمایش",Evn=()=>"تجربة",Nvn=()=>"Experimento",zvn=()=>"प्रयोग",rl=((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=>`${e==null?void 0:e.count} experiments`,Avn=e=>`${e==null?void 0:e.count} 个实验`,Tvn=e=>`${e==null?void 0:e.count} آزمایش`,Rvn=e=>`التجارب: ${e==null?void 0:e.count}`,Mvn=e=>`${e==null?void 0:e.count} experimentos`,Ovn=e=>`${e==null?void 0:e.count} प्रयोग`,Dvn=((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)}),Lvn=()=>"hidden",Ivn=()=>"已隐藏",$vn=()=>"پنهان",Bvn=()=>"مخفية",Pvn=()=>"ocultos",Fvn=()=>"छिपे हुए",Hvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Ivn():t==="fa"?$vn():t==="ar"?Bvn():t==="es"?Pvn():t==="hi"?Fvn():Lvn()}),qvn=()=>"1 experiment",Uvn=()=>"1 个实验",Gvn=()=>"۱ آزمایش",Vvn=()=>"تجربة واحدة",Kvn=()=>"1 experimento",Wvn=()=>"1 प्रयोग",Qvn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Uvn():t==="fa"?Gvn():t==="ar"?Vvn():t==="es"?Kvn():t==="hi"?Wvn():qvn()}),Xvn=()=>"Restore archived ancestors",Yvn=()=>"恢复已归档的祖先节点",Zvn=()=>"بازیابی نیاکان بایگانی‌شده",Jvn=()=>"استعادة الأسلاف المؤرشفين",ebn=()=>"Restaurar antepasados archivados",tbn=()=>"संग्रहीत पूर्वजों को पुनर्स्थापित करें",nbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Yvn():t==="fa"?Zvn():t==="ar"?Jvn():t==="es"?ebn():t==="hi"?tbn():Xvn()}),rbn=e=>`Restore ${e==null?void 0:e.count} archived experiments`,sbn=e=>`恢复 ${e==null?void 0:e.count} 个已归档实验`,ibn=e=>`بازیابی ${e==null?void 0:e.count} آزمایش بایگانی‌شده`,abn=e=>`استعادة ${e==null?void 0:e.count} تجارب مؤرشفة`,obn=e=>`Restaurar ${e==null?void 0:e.count} experimentos archivados`,cbn=e=>`${e==null?void 0:e.count} संग्रहीत प्रयोग पुनर्स्थापित करें`,lbn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?sbn(e):t==="fa"?ibn(e):t==="ar"?abn(e):t==="es"?obn(e):t==="hi"?cbn(e):rbn(e)}),ubn=()=>"Restore descendants",_bn=()=>"恢复后代节点",fbn=()=>"بازیابی نوادگان",dbn=()=>"استعادة الفروع التابعة",hbn=()=>"Restaurar descendientes",pbn=()=>"वंशजों को पुनर्स्थापित करें",mbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?_bn():t==="fa"?fbn():t==="ar"?dbn():t==="es"?hbn():t==="hi"?pbn():ubn()}),gbn=()=>"Restore this experiment",vbn=()=>"恢复此实验",bbn=()=>"بازیابی این آزمایش",ybn=()=>"استعادة هذه التجربة",xbn=()=>"Restaurar este experimento",wbn=()=>"इस प्रयोग को पुनर्स्थापित करें",EI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?vbn():t==="fa"?bbn():t==="ar"?ybn():t==="es"?xbn():t==="hi"?wbn():gbn()}),kbn=()=>"Running",Sbn=()=>"运行中",Cbn=()=>"در حال اجرا",Ebn=()=>"قيد التشغيل",Nbn=()=>"En ejecución",zbn=()=>"चल रहा है",jbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Sbn():t==="fa"?Cbn():t==="ar"?Ebn():t==="es"?Nbn():t==="hi"?zbn():kbn()}),Abn=()=>"Ask in this task to create one, or switch to Entire project to see all experiments.",Tbn=()=>"在此任务中请求创建实验,或切换到“整个项目”查看所有实验。",Rbn=()=>"در این وظیفه بخواهید یکی ساخته شود، یا برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید.",Mbn=()=>"اطلب في هذه المهمة إنشاء واحدة، أو بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب.",Obn=()=>"Pide en esta tarea que se cree uno, o cambia a Todo el proyecto para ver todos los experimentos.",Dbn=()=>"इस टास्क में एक बनाने को कहें, या सभी प्रयोग देखने के लिए पूरा प्रोजेक्ट पर स्विच करें।",Lbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Tbn():t==="fa"?Rbn():t==="ar"?Mbn():t==="es"?Obn():t==="hi"?Dbn():Abn()}),Ibn=()=>"Ask the agent in chat to create and run your first experiment.",$bn=()=>"在聊天中让智能体创建并运行你的第一个实验。",Bbn=()=>"در گفتگو از عامل بخواهید نخستین آزمایش شما را بسازد و اجرا کند.",Pbn=()=>"اطلب من الوكيل في المحادثة إنشاء أول تجربة لك وتشغيلها.",Fbn=()=>"Pídele al agente en el chat que cree y ejecute tu primer experimento.",Hbn=()=>"एजेंट से चैट में अपना पहला प्रयोग बनाने और चलाने को कहें।",qbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?$bn():t==="fa"?Bbn():t==="ar"?Pbn():t==="es"?Fbn():t==="hi"?Hbn():Ibn()}),Ubn=()=>"Code",Gbn=()=>"代码",Vbn=()=>"کد",Kbn=()=>"الشيفرة",Wbn=()=>"Código",Qbn=()=>"कोड",Xbn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Gbn():t==="fa"?Vbn():t==="ar"?Kbn():t==="es"?Wbn():t==="hi"?Qbn():Ubn()}),Ybn=()=>"Logs",Zbn=()=>"日志",Jbn=()=>"گزارش‌ها",eyn=()=>"السجلات",tyn=()=>"Logs",nyn=()=>"लॉग",NI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Zbn():t==="fa"?Jbn():t==="ar"?eyn():t==="es"?tyn():t==="hi"?nyn():Ybn()}),ryn=()=>"No experiments from the current task yet",syn=()=>"当前任务尚无实验",iyn=()=>"وظیفهٔ فعلی هنوز آزمایشی ندارد",ayn=()=>"لا توجد تجارب من المهمة الحالية بعد",oyn=()=>"Aún no hay experimentos de la tarea actual",cyn=()=>"मौजूदा टास्क से अभी तक कोई प्रयोग नहीं",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=()=>"No experiments yet",_yn=()=>"尚无实验",fyn=()=>"هنوز آزمایشی وجود ندارد",dyn=()=>"لا توجد تجارب بعد",hyn=()=>"Aún no hay experimentos",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=()=>"no runs",vyn=()=>"无运行",byn=()=>"بدون اجرا",yyn=()=>"لا عمليات تشغيل",xyn=()=>"sin ejecuciones",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=()=>"Open logs",Cyn=()=>"打开日志",Eyn=()=>"باز کردن گزارش‌ها",Nyn=()=>"فتح السجلات",zyn=()=>"Abrir logs",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=()=>"Runs",Ryn=()=>"运行",Myn=()=>"اجراها",Oyn=()=>"عمليات التشغيل",Dyn=()=>"Ejecuciones",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=()=>"Switch to Entire project to see all experiments",Byn=()=>"切换到“整个项目”以查看所有实验",Pyn=()=>"برای دیدن همهٔ آزمایش‌ها به «کل پروژه» بروید",Fyn=()=>"بدّل إلى «المشروع بالكامل» لرؤية جميع التجارب",Hyn=()=>"Cambia a Todo el proyecto para ver todos los experimentos",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=e=>`Updated to ${e==null?void 0:e.version}. Restart to use it.`,Vyn=e=>`已更新到 ${e==null?void 0:e.version}。重新启动即可使用。`,Kyn=e=>`به ${e==null?void 0:e.version} به‌روزرسانی شد. برای استفاده دوباره راه‌اندازی کنید.`,Wyn=e=>`تم التحديث إلى ${e==null?void 0:e.version}. أعد التشغيل لاستخدامه.`,Qyn=e=>`Actualizado a la versión ${e==null?void 0:e.version}. Reinicia para usarla.`,Xyn=e=>`${e==null?void 0:e.version} पर अपडेट हुआ। इस्तेमाल के लिए फिर से शुरू करें।`,Yyn=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?Vyn(e):t==="fa"?Kyn(e):t==="ar"?Wyn(e):t==="es"?Qyn(e):t==="hi"?Xyn(e):Gyn(e)}),Zyn=()=>"Dismiss",Jyn=()=>"关闭",exn=()=>"بستن",txn=()=>"تجاهل",nxn=()=>"Descartar",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=()=>"Restart now",axn=()=>"立即重新启动",oxn=()=>"هم‌اکنون دوباره راه‌اندازی کن",cxn=()=>"أعد التشغيل الآن",lxn=()=>"Reiniciar ahora",uxn=()=>"अभी फिर से शुरू करें",zI=((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=e=>`Could not restart: ${e==null?void 0:e.error}`,fxn=e=>`无法重新启动:${e==null?void 0:e.error}`,dxn=e=>`راه‌اندازی مجدد ممکن نشد: ${e==null?void 0:e.error}`,hxn=e=>`تعذّرت إعادة التشغيل: ${e==null?void 0:e.error}`,pxn=e=>`No se pudo reiniciar: ${e==null?void 0:e.error}`,mxn=e=>`फिर से शुरू नहीं हो सका: ${e==null?void 0:e.error}`,jI=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?fxn(e):t==="fa"?dxn(e):t==="ar"?hxn(e):t==="es"?pxn(e):t==="hi"?mxn(e):_xn(e)}),gxn=()=>"The updated OpenResearch did not come back in time. Restart it by hand.",vxn=()=>"更新后的 OpenResearch 未能及时恢复。请手动重新启动。",bxn=()=>"OpenResearch به‌روزشده به‌موقع برنگشت. آن را به‌صورت دستی دوباره راه‌اندازی کنید.",yxn=()=>"لم يعد OpenResearch المحدَّث في الوقت المناسب. أعد تشغيله يدويًا.",xxn=()=>"La nueva versión de OpenResearch no se inició a tiempo. Reinícialo manualmente.",wxn=()=>"अपडेट किया गया OpenResearch समय पर वापस नहीं आया। इसे खुद फिर से शुरू करें।",kxn=((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()}),Sxn=()=>"Restarting…",Cxn=()=>"正在重新启动…",Exn=()=>"در حال راه‌اندازی مجدد…",Nxn=()=>"جارٍ إعادة التشغيل…",zxn=()=>"Reiniciando…",jxn=()=>"फिर से शुरू हो रहा है…",AI=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Cxn():t==="fa"?Exn():t==="ar"?Nxn():t==="es"?zxn():t==="hi"?jxn():Sxn()}),Axn=()=>"macOS app",Txn=()=>"macOS 应用",Rxn=()=>"برنامهٔ macOS",Mxn=()=>"تطبيق macOS",Oxn=()=>"App de macOS",Dxn=()=>"macOS ऐप",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=()=>"Linux app (AppImage)",$xn=()=>"Linux 应用(AppImage)",Bxn=()=>"برنامه لینوکس (AppImage)",Pxn=()=>"تطبيق Linux ‏(AppImage)",Fxn=()=>"Aplicación para Linux (AppImage)",Hxn=()=>"Linux ऐप (AppImage)",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=()=>"Installed with cargo",Gxn=()=>"通过 cargo 安装",Vxn=()=>"نصب‌شده با cargo",Kxn=()=>"مثبّت عبر cargo",Wxn=()=>"Instalado con cargo",Qxn=()=>"cargo से इंस्टॉल किया गया",Xxn=((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()}),Yxn=()=>"Installed with Homebrew",Zxn=()=>"通过 Homebrew 安装",Jxn=()=>"نصب‌شده با Homebrew",e2n=()=>"مثبّت عبر Homebrew",t2n=()=>"Instalado con Homebrew",n2n=()=>"Homebrew से इंस्टॉल किया गया",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=()=>"Installed with the orx installer",i2n=()=>"通过 orx 安装程序安装",a2n=()=>"نصب‌شده با نصب‌کنندهٔ orx",o2n=()=>"مثبّت عبر مُثبّت orx",c2n=()=>"Instalado con el instalador de orx",l2n=()=>"orx इंस्टॉलर से इंस्टॉल किया गया",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=()=>"Managed by Nix",f2n=()=>"由 Nix 管理",d2n=()=>"مدیریت‌شده با Nix",h2n=()=>"مُدار بواسطة Nix",p2n=()=>"Gestionado por Nix",m2n=()=>"Nix द्वारा प्रबंधित",g2n=((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()}),v2n=()=>"Portable orx.exe",b2n=()=>"便携版 orx.exe",y2n=()=>"orx.exe قابل‌حمل",x2n=()=>"‏orx.exe المحمول",w2n=()=>"orx.exe portable",k2n=()=>"पोर्टेबल orx.exe",S2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?b2n():t==="fa"?y2n():t==="ar"?x2n():t==="es"?w2n():t==="hi"?k2n():v2n()}),C2n=()=>"Unknown install",E2n=()=>"未知安装方式",N2n=()=>"روش نصب نامشخص",z2n=()=>"تثبيت غير معروف",j2n=()=>"Instalación desconocida",A2n=()=>"अज्ञात इंस्टॉल",T2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?E2n():t==="fa"?N2n():t==="ar"?z2n():t==="es"?j2n():t==="hi"?A2n():C2n()}),R2n=()=>"Re-run your cargo install to update.",M2n=()=>"重新运行 cargo 安装命令以更新。",O2n=()=>"برای به‌روزرسانی، نصب cargo را دوباره اجرا کنید.",D2n=()=>"أعِد تنفيذ أمر cargo install للتحديث.",L2n=()=>"Vuelve a ejecutar cargo install para actualizar.",I2n=()=>"अपडेट करने के लिए अपना cargo install फिर से चलाएं।",$2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?M2n():t==="fa"?O2n():t==="ar"?D2n():t==="es"?L2n():t==="hi"?I2n():R2n()}),B2n=()=>"Run brew upgrade to update.",P2n=()=>"运行 brew upgrade 以更新。",F2n=()=>"برای به‌روزرسانی brew upgrade را اجرا کنید.",H2n=()=>"نفّذ brew upgrade للتحديث.",q2n=()=>"Ejecuta brew upgrade para actualizar.",U2n=()=>"अपडेट करने के लिए brew upgrade चलाएं।",G2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?P2n():t==="fa"?F2n():t==="ar"?H2n():t==="es"?q2n():t==="hi"?U2n():B2n()}),V2n=()=>"Update it through your Nix configuration.",K2n=()=>"通过 Nix 配置进行更新。",W2n=()=>"از طریق پیکربندی Nix به‌روزرسانی کنید.",Q2n=()=>"حدّثه عبر إعداد Nix الخاص بك.",X2n=()=>"Actualízalo desde tu configuración de Nix.",Y2n=()=>"इसे अपने Nix कॉन्फ़िगरेशन के ज़रिए अपडेट करें।",Z2n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?K2n():t==="fa"?W2n():t==="ar"?Q2n():t==="es"?X2n():t==="hi"?Y2n():V2n()}),J2n=()=>"Close",ewn=()=>"关闭",twn=()=>"بستن",nwn=()=>"إغلاق",rwn=()=>"Cerrar",swn=()=>"बंद करें",iwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?ewn():t==="fa"?twn():t==="ar"?nwn():t==="es"?rwn():t==="hi"?swn():J2n()}),awn=()=>"Maximize",own=()=>"最大化",cwn=()=>"بزرگ کردن",lwn=()=>"تكبير",uwn=()=>"Maximizar",_wn=()=>"बड़ा करें",fwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?own():t==="fa"?cwn():t==="ar"?lwn():t==="es"?uwn():t==="hi"?_wn():awn()}),dwn=()=>"Minimize",hwn=()=>"最小化",pwn=()=>"کوچک کردن",mwn=()=>"تصغير",gwn=()=>"Minimizar",vwn=()=>"छोटा करें",bwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?hwn():t==="fa"?pwn():t==="ar"?mwn():t==="es"?gwn():t==="hi"?vwn():dwn()}),ywn=()=>"Restore",xwn=()=>"还原",wwn=()=>"بازیابی",kwn=()=>"استعادة",Swn=()=>"Restaurar",Cwn=()=>"पुनर्स्थापित करें",Ewn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?xwn():t==="fa"?wwn():t==="ar"?kwn():t==="es"?Swn():t==="hi"?Cwn():ywn()}),Nwn=()=>"Active Experiments",zwn=()=>"活跃实验",jwn=()=>"آزمایش‌های فعال",Awn=()=>"التجارب النشطة",Twn=()=>"Experimentos activos",Rwn=()=>"सक्रिय प्रयोग",Mwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?zwn():t==="fa"?jwn():t==="ar"?Awn():t==="es"?Twn():t==="hi"?Rwn():Nwn()}),Own=()=>"Default compute",Dwn=()=>"默认计算目标",Lwn=()=>"محاسبات پیش‌فرض",Iwn=()=>"الحوسبة الافتراضية",$wn=()=>"Cómputo predeterminado",Bwn=()=>"डिफ़ॉल्ट कंप्यूट",Pwn=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Dwn():t==="fa"?Lwn():t==="ar"?Iwn():t==="es"?$wn():t==="hi"?Bwn():Own()}),Fwn=()=>"More tools",Hwn=()=>"更多工具",qwn=()=>"ابزارهای بیشتر",Uwn=()=>"مزيد من الأدوات",Gwn=()=>"Más herramientas",Vwn=()=>"और टूल",yj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Hwn():t==="fa"?qwn():t==="ar"?Uwn():t==="es"?Gwn():t==="hi"?Vwn():Fwn()}),Kwn=()=>"Terminal",Wwn=()=>"终端",Qwn=()=>"ترمینال",Xwn=()=>"الطرفية",Ywn=()=>"Terminal",Zwn=()=>"टर्मिनल",Fv=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?Wwn():t==="fa"?Qwn():t==="ar"?Xwn():t==="es"?Ywn():t==="hi"?Zwn():Kwn()}),Jwn=()=>"The terminal disconnected.",e4n=()=>"终端连接已断开。",t4n=()=>"ارتباط ترمینال قطع شد.",n4n=()=>"انقطعت الطرفية.",r4n=()=>"La terminal se desconectó.",s4n=()=>"टर्मिनल डिस्कनेक्ट हो गया।",xj=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e4n():t==="fa"?t4n():t==="ar"?n4n():t==="es"?r4n():t==="hi"?s4n():Jwn()}),i4n=e=>`Shell exited with code ${e==null?void 0:e.code}.`,a4n=e=>`Shell 已退出,退出码 ${e==null?void 0:e.code}。`,o4n=e=>`پوسته با کد ${e==null?void 0:e.code} خارج شد.`,c4n=e=>`انتهى Shell برمز الخروج ${e==null?void 0:e.code}.`,l4n=e=>`El shell terminó con el código ${e==null?void 0:e.code}.`,u4n=e=>`शेल कोड ${e==null?void 0:e.code} के साथ बंद हो गया।`,_4n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?a4n(e):t==="fa"?o4n(e):t==="ar"?c4n(e):t==="es"?l4n(e):t==="hi"?u4n(e):i4n(e)}),f4n=()=>"Restart shell",d4n=()=>"重新启动 Shell",h4n=()=>"راه‌اندازی دوباره پوسته",p4n=()=>"إعادة تشغيل Shell",m4n=()=>"Reiniciar shell",g4n=()=>"शेल फिर से शुरू करें",v4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?d4n():t==="fa"?h4n():t==="ar"?p4n():t==="es"?m4n():t==="hi"?g4n():f4n()}),b4n=()=>"This worktree",y4n=()=>"当前工作树",x4n=()=>"این درخت کاری",w4n=()=>"شجرة العمل هذه",k4n=()=>"Este árbol de trabajo",S4n=()=>"यह वर्कट्री",C4n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?y4n():t==="fa"?x4n():t==="ar"?w4n():t==="es"?k4n():t==="hi"?S4n():b4n()}),E4n=()=>"Workspace",N4n=()=>"工作区",z4n=()=>"فضای کاری",j4n=()=>"مساحة العمل",A4n=()=>"Espacio de trabajo",T4n=()=>"वर्कस्पेस",gw=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?N4n():t==="fa"?z4n():t==="ar"?j4n():t==="es"?A4n():t==="hi"?T4n():E4n()}),R4n=e=>`Current worktree · ${e==null?void 0:e.branch}`,M4n=e=>`当前工作树 · ${e==null?void 0:e.branch}`,O4n=e=>`درخت کاری کنونی · ${e==null?void 0:e.branch}`,D4n=e=>`شجرة العمل الحالية · ${e==null?void 0:e.branch}`,L4n=e=>`Árbol de trabajo actual · ${e==null?void 0:e.branch}`,I4n=e=>`मौजूदा वर्कट्री · ${e==null?void 0:e.branch}`,$4n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?M4n(e):t==="fa"?O4n(e):t==="ar"?D4n(e):t==="es"?L4n(e):t==="hi"?I4n(e):R4n(e)}),B4n=e=>`Default branch · ${e==null?void 0:e.branch}`,P4n=e=>`默认分支 · ${e==null?void 0:e.branch}`,F4n=e=>`شاخهٔ پیش‌فرض · ${e==null?void 0:e.branch}`,H4n=e=>`الفرع الافتراضي · ${e==null?void 0:e.branch}`,q4n=e=>`Rama predeterminada · ${e==null?void 0:e.branch}`,U4n=e=>`डिफ़ॉल्ट ब्रांच · ${e==null?void 0:e.branch}`,G4n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?P4n(e):t==="fa"?F4n(e):t==="ar"?H4n(e):t==="es"?q4n(e):t==="hi"?U4n(e):B4n(e)}),V4n=e=>`detached at ${e==null?void 0:e.branch}`,K4n=e=>`分离于 ${e==null?void 0:e.branch}`,W4n=e=>`جدا در ${e==null?void 0:e.branch}`,Q4n=e=>`منفصل عند ${e==null?void 0:e.branch}`,X4n=e=>`desacoplado en ${e==null?void 0:e.branch}`,Y4n=e=>`${e==null?void 0:e.branch} पर डिटैच्ड`,Z4n=((e,n={})=>{const t=n.locale??E();return t==="zh-CN"?K4n(e):t==="fa"?W4n(e):t==="ar"?Q4n(e):t==="es"?X4n(e):t==="hi"?Y4n(e):V4n(e)}),J4n=()=>"Listing truncated.",e3n=()=>"列表已截断。",t3n=()=>"فهرست کوتاه شده است.",n3n=()=>"القائمة مقتطعة.",r3n=()=>"Listado truncado.",s3n=()=>"सूची छोटी की गई।",i3n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?e3n():t==="fa"?t3n():t==="ar"?n3n():t==="es"?r3n():t==="hi"?s3n():J4n()}),a3n=()=>"Loading…",o3n=()=>"正在加载…",c3n=()=>"در حال بارگیری…",l3n=()=>"جارٍ التحميل…",u3n=()=>"Cargando…",_3n=()=>"लोड हो रहा है…",f3n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?o3n():t==="fa"?c3n():t==="ar"?l3n():t==="es"?u3n():t==="hi"?_3n():a3n()}),d3n=()=>"No changes yet.",h3n=()=>"尚无更改。",p3n=()=>"هنوز تغییری وجود ندارد.",m3n=()=>"لا توجد تغييرات بعد.",g3n=()=>"Aún no hay cambios.",v3n=()=>"अभी तक कोई बदलाव नहीं।",b3n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?h3n():t==="fa"?p3n():t==="ar"?m3n():t==="es"?g3n():t==="hi"?v3n():d3n()}),y3n=()=>"No files.",x3n=()=>"没有文件。",w3n=()=>"فایلی وجود ندارد.",k3n=()=>"لا توجد ملفات.",S3n=()=>"No hay archivos.",C3n=()=>"कोई फ़ाइल नहीं।",E3n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?x3n():t==="fa"?w3n():t==="ar"?k3n():t==="es"?S3n():t==="hi"?C3n():y3n()}),N3n=()=>"Refresh failed:",z3n=()=>"刷新失败:",j3n=()=>"تازه‌سازی ناموفق بود:",A3n=()=>"فشل التحديث:",T3n=()=>"Error al actualizar:",R3n=()=>"रीफ़्रेश विफल:",M3n=((e={},n={})=>{const t=n.locale??E();return t==="zh-CN"?z3n():t==="fa"?j3n():t==="ar"?A3n():t==="es"?T3n():t==="hi"?R3n():N3n()}),Ce=e=>`⁦${e}⁩`,_a=e=>`⁨${e}⁩`,Jt=e=>new Intl.NumberFormat(E()).format(e),Wp="demo_nanochat_v1",Ko=e=>e.startsWith("demo_"),Xd="chat_demo_nanochat_v1",Hb="chat_demo_nanochat_figures_v1",qb="chat_demo_nanochat_literature_v1",O3n={[Xd]:"cpu_end_to_end",[Hb]:"figures",[qb]:"literature"},vw="cpu-apple-silicon-pipeline-results.md",D3n={[Xd]:"msg_demo_nanochat_assistant_v1",[Hb]:"msg_demo_nanochat_figures_assistant_v1",[qb]:"msg_demo_nanochat_literature_assistant_v1"},wj="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 q3 extends Error{constructor(t,r,s){super(t);fs(this,"currentVersion");fs(this,"exists");this.name="FileChangedError",this.currentVersion=r,this.exists=s}}function pa(e){return(e.status==="running"||e.status==="starting")&&e.cancelRequested?"cancelling":e.status}function L3n(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 TI(e){return[...e].sort((t,r)=>r.createdAt-t.createdAt).map(L3n).find(t=>t!==null)??null}const RI=new WeakMap;async function Ls(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 q3(s,a,i.exists)}}catch(i){if(i instanceof q3)throw i}throw new Error(s||`HTTP ${e.status}`)}const n=await e.json(),t=RI.get(e);if(t&&!zn(t))throw new DOMException("Workspace changed","AbortError");return n}const zt=(e,n)=>fetch(e,{signal:n}).then(t=>Ls(t));async function Ca(e,n){const t=xi(),r=await fetch(e,n);if(!zn(t))throw new DOMException("Workspace changed","AbortError");return RI.set(r,t),r.ok&&cX(e,t),r}const mt=(e,n,t=!1)=>Ca(e,{method:"POST",keepalive:t,headers:n===void 0?{}:{"content-type":"application/json"},body:n===void 0?void 0:JSON.stringify(n)}).then(r=>Ls(r)),kl=(e,n)=>Ca(e,{method:"PATCH",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Ls(t)),MI=(e,n)=>Ca(e,{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(n)}).then(t=>Ls(t)),I3n=e=>zt("/api/projects",e).then(n=>n.projects),$3n=e=>zt("/api/projects/activity",e).then(n=>n.activity),U3="agentic",B3n=e=>zt("/api/settings/ui-state",e),P3n=(e,n)=>zt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n),F3n=(e,n,t=!1)=>mt(`/api/projects/${encodeURIComponent(e)}/ui-state`,n,t),H3n=(e,n=!1)=>mt("/api/settings/ui-state",{workspace:e},n),q3n=e=>mt("/api/settings/ui-state",e),U3n=(e,n)=>mt("/api/onboarding/complete",{...e,...n}),G3n=(e="",n)=>{const t=e?`?path=${encodeURIComponent(e)}`:"";return zt(`/api/project-path/status${t}`,n)},V3n=()=>mt("/api/project-path/pick").then(e=>e.path),K3n=e=>mt("/api/projects",e),W3n=(e,n)=>zt(`/api/papers/search?q=${encodeURIComponent(e)}`,n).then(t=>t.papers),Q3n=e=>zt("/api/github/account",e),X3n=(e,n)=>zt(`/api/github/project-repo-preview?name=${encodeURIComponent(e)}`,n),Y3n=(e,n,t)=>zt(`/api/github/repo-access?owner=${encodeURIComponent(e)}&repo=${encodeURIComponent(n)}`,t),Z3n=(e,n)=>zt(`/api/papers/resolve?id=${encodeURIComponent(e)}`,n).then(t=>t.paper),J3n=e=>mt("/api/projects/starter-prompts/prewarm",e),e5n=(e,n,t,r,s)=>zt(`/api/projects/${e}/starter-prompts?${new URLSearchParams({harness:n,...t?{model:t}:{},locale:r})}`,s),t5n=e=>mt(`/api/projects/${e}/open`).then(n=>n.project),n5n=e=>Ca(`/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})`)}aX(e)}),r5n=(e,n)=>zt(`/api/projects/${e}/experiments`,n).then(t=>t.experiments),s5n=(e,n,t)=>kl(`/api/experiments/${e}/archive`,{direction:n,archived:t}),i5n=(e,n)=>zt(`/api/projects/${e}/runs`,n).then(t=>t.runs),OI=e=>mt(`/api/runs/${e}/cancel`).then(()=>{}),a5n=(e,n)=>zt(`/api/runs/${e}/log?offset=${n}`),o5n=(e,n)=>zt(`/api/runs/${e}/diff`,n),c5n=(e,n)=>zt(`/api/experiments/${e}/diff`,n),Sl=(e,n=new URLSearchParams)=>(e.sessionId&&n.set("sessionId",e.sessionId),e.ref&&n.set("ref",e.ref),n),l5n=(e,n,t={},r)=>zt(`/api/projects/${e}/file?${Sl(t,new URLSearchParams({path:n}))}`,r),G3=(e,n,t={})=>`/api/projects/${e}/file/raw?${Sl(t,new URLSearchParams({path:n}))}`,u5n=(e,n)=>zt(`/api/files/abs?path=${encodeURIComponent(e)}`,n),DI=e=>`/api/files/abs/raw?path=${encodeURIComponent(e)}`,_5n=(e,n,t,r)=>MI(`/api/projects/${e}/file`,{path:n,content:t,sessionId:r.sessionId,expectedVersion:r.expectedVersion}),f5n=(e,n,t,r={})=>kl(`/api/projects/${e}/file`,{path:n,...t,sessionId:r.sessionId}),d5n=(e,n,t={})=>mt(`/api/projects/${e}/file/open`,{path:n,sessionId:t.sessionId}),MS=(e,n,t={})=>mt(`/api/projects/${e}/file/reveal`,{path:n,...t}),h5n=(e,n,t)=>zt(`/api/projects/${e}/file/location?${Sl(n,new URLSearchParams({path:n.path,source:n.source}))}`,t),p5n=e=>{const n=`/api/projects/${e}/files/search`;return{start:(t,r)=>fetch(n,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({q:t,after:r})}).then(Ls),status:t=>zt(`${n}/${t}`),resume:t=>fetch(`${n}/${t}/continue`,{method:"POST"}).then(Ls),cancel:t=>fetch(`${n}/${t}`,{method:"DELETE"}).then(Ls)}},m5n=e=>zt("/api/latex/engine",e),g5n=(e,n,t={})=>mt(`/api/projects/${e}/file/latex`,{path:n,sessionId:t.sessionId}),v5n=e=>zt("/api/overleaf/settings",e),LI=e=>mt("/api/overleaf/token",{token:e}),b5n=()=>Ca("/api/overleaf/token",{method:"DELETE"}).then(e=>Ls(e)),II=(e,n={})=>mt("/api/overleaf/session",{session:e,host:n.host}),y5n=()=>fetch("/api/overleaf/session",{method:"DELETE"}).then(e=>Ls(e)),x5n=(e={})=>mt("/api/overleaf/session/import",{host:e.host}),w5n=(e,n,t={})=>mt(`/api/projects/${e}/file/overleaf/live`,{path:n,sessionId:t.sessionId,retry:t.retry}),k5n=(e,n,t={})=>fetch(`/api/projects/${e}/file/overleaf/live?${Sl(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Ls(r)),S5n=(e,n,t={},r)=>zt(`/api/projects/${e}/file/overleaf?${Sl(t,new URLSearchParams({path:n}))}`,r),C5n=(e,n,t)=>mt(`/api/projects/${e}/file/overleaf`,{path:n,project:t.project,sessionId:t.sessionId}),E5n=(e,n,t={})=>Ca(`/api/projects/${e}/file/overleaf?${Sl(t,new URLSearchParams({path:n}))}`,{method:"DELETE"}).then(r=>Ls(r)),N5n=(e,n,t={})=>mt(`/api/projects/${e}/file/overleaf/sync`,{path:n,sessionId:t.sessionId,resolve:t.resolve}),z5n=(e,n,t={},r)=>zt(`/api/projects/${e}/file/overleaf/status?${Sl(t,new URLSearchParams({path:n}))}`,r),j5n=(e,n,t={})=>`/api/projects/${e}/file/overleaf/upload?${Sl(t,new URLSearchParams({path:n}))}`,A5n=(e,n={},t)=>{const r=Sl(n).toString();return zt(`/api/projects/${e}/code-tree${r?`?${r}`:""}`,t)},T5n=(e,n)=>zt(`/api/chat/sessions/${e}/worktree`,n),Ub=(e,n,t)=>`https://github.com/${e}/${n}/tree/${t.split("/").map(encodeURIComponent).join("/")}`,R5n=e=>zt("/api/settings/hf",e),M5n=e=>mt("/api/settings/hf",{token:e}),O5n=e=>zt("/api/settings/tinker",e),D5n=e=>mt("/api/settings/tinker",{key:e}),L5n=e=>zt("/api/update",e),I5n=()=>mt("/api/update/apply"),$5n=()=>mt("/api/update/restart"),B5n=e=>mt("/api/update/auto",{enabled:e}),P5n=(e=!1)=>mt("/api/update/install-cli",{force:e}),F5n=e=>zt("/api/settings/k8s",e),H5n=e=>mt("/api/settings/k8s",e),q5n=e=>zt("/api/settings/modal",e),U5n=(e,n)=>mt("/api/settings/modal",{tokenId:e,tokenSecret:n}),G5n=e=>zt("/api/settings/env",e).then(n=>n.vars),$I=(e,n)=>mt("/api/settings/env",{key:e,value:n}).then(t=>t.vars),V5n=e=>Ca(`/api/settings/env/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Ls(n)).then(n=>n.vars),K5n=e=>zt("/api/settings/data-dir",e),W5n=e=>mt("/api/settings/data-dir/validate",{path:e}),Q5n=e=>mt("/api/settings/data-dir/move",{path:e}),X5n=e=>zt("/api/settings/ssh",e),Y5n=e=>mt("/api/settings/ssh",e),Z5n=e=>mt("/api/settings/ssh/default",{host:e}),J5n=(e,n)=>mt("/api/settings/ssh/preflight",{host:e,container:n}),ekn=e=>zt("/api/settings/ssh/config",e),tkn=(e,n)=>MI("/api/settings/ssh/config",{content:e,previousContent:n}),nkn=(e,n)=>zt(`/api/settings/ssh/master?host=${encodeURIComponent(e)}`,n),rkn=e=>zt("/_orx/runtime",e),skn=e=>zt("/api/remote/sessions",e).then(n=>n.sessions),ikn=(e,n)=>mt("/api/remote/sessions",{host:e,uiPreferences:n}),akn=e=>mt("/_orx/install",e),okn=()=>mt("/_orx/reconnect"),BI=()=>mt("/_orx/disconnect"),ckn=()=>mt("/_orx/start-host"),PI=()=>zt("/_orx/stop-host"),FI=e=>mt("/_orx/stop-host",{expectedInstanceId:e.instanceId,expectedPreview:{activeTurnCount:e.activeTurnCount,queuedMessageCount:e.queuedMessageCount,pendingPermissionCount:e.pendingPermissionCount,activeRunCount:e.activeRunCount,attachmentCount:e.attachmentCount}}),lkn=e=>zt("/api/settings/slurm",e),ukn=e=>mt("/api/settings/slurm",e),_kn=e=>zt("/api/settings/ray",e),fkn=e=>mt("/api/settings/ray",e),dkn=e=>mt("/api/settings/ray/preflight",{address:e??null}),hkn=(e,n)=>zt(`/api/settings/compute${e?`?projectId=${encodeURIComponent(e)}`:""}`,n),pkn=e=>mt("/api/settings/compute/default",e),mkn=e=>zt("/api/settings/local",e),gkn=e=>zt("/api/settings/openresearch",e),vkn=(e,n)=>zt(`/api/projects/${e}/files`,n),bkn=(e,n)=>Ca(`/api/projects/${e}/files?path=${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Ls(t)),ykn=(e,n,t)=>kl(`/api/projects/${e}/files`,{path:n,...t}),Bu=(e,n)=>`/api/projects/${e}/files/file?path=${encodeURIComponent(n)}`,HI=512e3,xkn=(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}}},wkn=(e,n,t)=>fetch(Bu(e,n),{signal:t,headers:{Range:`bytes=0-${HI-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=>xkn(a,Number.isFinite(s)&&s>a.byteLength))}),kkn=e=>e==="image"||e==="audio"||e==="video"||e==="pdf"||e==="text"||e==="unknown"||e==="download",Skn=(e,n,t)=>fetch(Bu(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:kkn(s)?s:"download"}}),Ckn=e=>zt("/api/settings/profile",e),Ekn=e=>zt("/api/settings/lit-sources",e),Nkn=e=>mt("/api/settings/lit-sources",e),zkn=e=>zt("/api/settings/projects",e),qI=(e,n)=>mt("/api/settings/projects",{githubForNewProjects:e,...n===void 0?{}:{githubDefaultPromptSeen:n}}),jkn=(e,n)=>zt(`/api/projects/${e}/git`,n),Akn=e=>mt(`/api/projects/${e}/git/init`),Tkn=e=>mt(`/api/projects/${e}/github`),Rkn=e=>mt(`/api/projects/${e}/github/disable`),Mkn=e=>zt("/api/settings/telemetry",e),Okn=e=>mt("/api/settings/telemetry",{enabled:e}),vu=e=>{mt("/api/telemetry/event",e).catch(()=>{})},UI=e=>{mt("/api/telemetry/locale",{locale:e}).catch(()=>{})};function nv(e){var s;if(!e.id.startsWith("orx-local-"))return e.displayName??K3(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"?kS():n,r=K3(e.id.replace(/-(?:FP|BF)\d+$/i,""));return t?`${r} · ${t}`:r}const Hv="default";function Gb(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===Hv)?Hv:((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 V3="default";function GI(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:V3,label:fAt(),description:iAt()},...t]:[]}function qv(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=GI(e,n);return s.length===0?V3:t!=null&&s.some(a=>a.id===t)?t:V3}function VI(e,n,t){if(!e)return t;const{choices:r,defaultId:s}=Gb(e,n);return r.length===0?Hv:t&&r.some(i=>i.id===t)?t:s}const Dkn=e=>zt("/api/harnesses/setup/commands",e),KI=(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 zt(`/api/harnesses${s}`,t).then(i=>i.harnesses)},Lkn=(e,n,t)=>{const r=new URLSearchParams({...n?{harness:n}:{},...t?{project:t}:{}});return zt(`/api/skills${r.size?`?${r}`:""}`,e)},Ikn=(e,n,t,r)=>zt(`/api/skills/${encodeURIComponent(e)}${`?${new URLSearchParams({...n?{project:n}:{},...r?{harness:r}:{}})}`}`,t).then(s=>s.content),$kn=e=>zt("/api/latex-templates",e).then(n=>n.templates),Bkn=e=>mt("/api/latex-templates",e).then(n=>n.template),Pkn=e=>Ca(`/api/latex-templates?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Ls(n)),Fkn=e=>zt("/api/user-skills",e),Hkn=e=>mt("/api/user-skills",e).then(n=>n.skill),qkn=e=>Ca(`/api/user-skills?name=${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Ls(n));function K3(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 Ukn=(e,n)=>zt(`/api/chat/sessions?projectId=${encodeURIComponent(e)}`,n).then(t=>t.sessions),Gkn=e=>zt("/api/chat/native-sessions",e).then(n=>n.chats),Vkn=(e,n)=>mt("/api/chat/native-sessions/import",{projectId:e,harness:n.harness,nativeId:n.nativeId,title:n.title}).then(t=>t.session),Kkn=e=>zt("/api/chat/sessions?scope=all",e).then(n=>n.sessions),Wkn=(e,n,t={})=>mt("/api/chat/sessions",{projectId:e,harness:n,...t}).then(r=>r.session),W3=e=>Ca(`/api/chat/sessions/${e}`,{method:"DELETE"}).then(n=>Ls(n).then(t=>(Pb(e),t))),Qkn=(e,n)=>kl(`/api/chat/sessions/${e}`,{archived:n}).then(t=>t.session),Xkn=(e,n)=>kl(`/api/chat/sessions/${e}`,{title:n}).then(t=>t.session),Ykn=(e,n)=>kl(`/api/chat/sessions/${e}`,{planMode:n}).then(t=>t.session),Zkn=e=>mt(`/api/chat/sessions/${e}/side`,{}).then(n=>n.session),Jkn=(e,n)=>kl(`/api/chat/sessions/${e}`,{goal:n}).then(t=>t.session),eSn=(e,n)=>kl(`/api/chat/sessions/${e}`,{autonomy:n}).then(t=>t.session),tSn=(e,n)=>kl(`/api/chat/sessions/${e}`,{permissionMode:n}).then(t=>t.session),nSn=(e,n)=>zt(`/api/chat/sessions/${e}/messages`,n).then(t=>({messages:t.messages,queued:t.queued??[],activeLeafId:t.activeLeafId??null})),rSn=(e,n)=>Ca(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`,{method:"DELETE"}).then(t=>Ls(t)),sSn=(e,n)=>mt(`/api/chat/sessions/${e}/queue/${encodeURIComponent(n)}`),iSn=e=>`/api/chat/attachments/${encodeURIComponent(e)}`,Q3=(e,n,t={},r,s,i,a)=>mt(`/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}),aSn=e=>mt(`/api/chat/sessions/${e}/compact`,{}),oSn=(e,n)=>mt(`/api/chat/sessions/${e}/shell`,{command:n}),cSn=(e,n,t,r={})=>mt(`/api/chat/sessions/${e}/turns/${n}/recover`,{action:t,...r}),lSn=(e,n,t)=>mt(`/api/chat/sessions/${e}/fork`,{messageId:n,text:t}),uSn=(e,n)=>mt(`/api/chat/sessions/${e}/branch`,{leafId:n}),_Sn=e=>mt(`/api/chat/sessions/${e}/interrupt`),fSn=(e,n)=>mt(`/api/chat/sessions/${e}/respond`,n);function vo(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 $0(e){const n=Math.max(0,Math.floor(e/1e3));if(n<60)return KLe({value:Jt(n)});const t=Math.floor(n/60);if(t<60)return PLe({value:Jt(t)});const r=Math.floor(t/60);return r<24?MLe({hours:Jt(r),minutes:Jt(t%60)}):ELe({days:Jt(Math.floor(r/24)),hours:Jt(r%24)})}function _l(e){const n=["B","KB","MB","GB","TB"];let t=e,r=0;for(;t>=1024&&rzt("/api/local-models",e),pSn=e=>mt("/api/local-models/discover",e),mSn=e=>mt("/api/local-models",e),gSn=e=>mt(`/api/local-models/${encodeURIComponent(e)}/check`,{}),vSn=e=>Ca(`/api/local-models/${encodeURIComponent(e)}`,{method:"DELETE"}).then(n=>Ls(n)),kj=()=>({queryKey:St("getHfSettings"),queryFn:({signal:e})=>R5n(e),staleTime:3e5}),Sj=()=>({queryKey:St("getTinkerSettings"),queryFn:({signal:e})=>O5n(e),staleTime:3e5}),Cj=()=>({queryKey:St("getK8sSettings"),queryFn:({signal:e})=>F5n(e),staleTime:3e4}),Ej=()=>({queryKey:St("getModalSettings"),queryFn:({signal:e})=>q5n(e),staleTime:3e5}),bSn=()=>({queryKey:St("getSlurmSettings"),queryFn:({signal:e})=>lkn(e),staleTime:3e5}),ySn=()=>({queryKey:St("getRaySettings"),queryFn:({signal:e})=>_kn(e),staleTime:3e5}),WI=e=>({queryKey:St("getComputeSettings",e??null),queryFn:({signal:n})=>hkn(e,n),staleTime:3e4}),xSn=()=>({queryKey:St("getLocalMachine"),queryFn:({signal:e})=>mkn(e),staleTime:3e5}),wSn=()=>({queryKey:St("getOpenResearchSettings"),queryFn:({signal:e})=>gkn(e),staleTime:3e4}),kSn=()=>({queryKey:St("getEnvVars"),queryFn:({signal:e})=>G5n(e),staleTime:3e5}),SSn=()=>({queryKey:St("getDataDir"),queryFn:({signal:e})=>K5n(e),staleTime:3e5}),QI=()=>({queryKey:St("getSshSettings"),queryFn:({signal:e})=>X5n(e),staleTime:3e4}),CSn=()=>({queryKey:St("getSshConfig"),queryFn:({signal:e})=>ekn(e),staleTime:3e5}),Nj=e=>({queryKey:St("getSshMasterStatus",e),queryFn:({signal:n})=>nkn(e,n),staleTime:5e3}),ESn=()=>({queryKey:["gateway","runtime"],queryFn:({signal:e})=>rkn(e),staleTime:2e3}),NSn=()=>({queryKey:St("listRemoteSessions"),queryFn:({signal:e})=>skn(e),staleTime:3e4}),Uv=()=>({queryKey:St("getUpdateStatus"),queryFn:({signal:e,client:n,queryKey:t})=>Vh(n,t,()=>L5n(e)),staleTime:3e4}),zSn=()=>({queryKey:St("getProfile"),queryFn:({signal:e})=>Ckn(e),staleTime:3e5}),jSn=()=>({queryKey:St("getLitSources"),queryFn:({signal:e})=>Ekn(e),staleTime:3e5}),DS=()=>({queryKey:St("getProjectDefaults"),queryFn:({signal:e})=>zkn(e),staleTime:3e5}),ASn=e=>({queryKey:St("getProjectGitStatus",e),queryFn:({signal:n})=>jkn(e,n),staleTime:3e4}),TSn=()=>({queryKey:St("getTelemetry"),queryFn:({signal:e})=>Mkn(e),staleTime:3e5}),XI=()=>({queryKey:St("getHarnessSetupCommands"),queryFn:({signal:e})=>Dkn(e),staleTime:1/0}),Pu=()=>({queryKey:St("getHarnesses"),queryFn:({signal:e})=>KI(!1,!1,e),staleTime:3e5,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.some(t=>t.accountLoading||t.catalogPending)?1e3:!1}}),RSn=(e,n)=>({queryKey:St("getSkills",e??null,n??null),queryFn:({signal:t})=>Lkn(t,e,n),select:t=>t.skills,refetchInterval:t=>{var r;return(r=t.state.data)!=null&&r.importing?2e3:3e4},staleTime:3e5}),MSn=(e,n,t)=>({queryKey:St("getSkillContent",e,n??null,t??null),queryFn:({signal:r})=>Ikn(e,n,r,t),staleTime:3e5}),OSn=()=>({queryKey:St("listLatexTemplates"),queryFn:({signal:e})=>$kn(e),refetchInterval:3e4,staleTime:3e5}),DSn=()=>({queryKey:St("listUserSkills"),queryFn:({signal:e})=>Fkn(e),select:e=>e.skills,refetchInterval:e=>{var n;return(n=e.state.data)!=null&&n.importing?2e3:3e4},staleTime:3e5});async function hf(e=!1,n=!1){const t=Pu();if(!e&&!n)return tt.fetchQuery(t);await tt.cancelQueries(t);const r=await KI(e,n);return zn(t.queryKey)&&tt.setQueryData(t.queryKey,r),r}const LSn=()=>({queryKey:St("getLocalModels"),queryFn:({signal:e})=>hSn(e),staleTime:3e4}),Gi=e=>({queryKey:St("listChatSessions",e),queryFn:({signal:n,client:t,queryKey:r})=>Vh(t,r,async()=>{const s=await Ukn(e,n),i=t.getQueryData(r);return s.filter(a=>!bl.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)}})},jm),staleTime:3e4}),YI=()=>({queryKey:St("listNativeChats"),queryFn:({signal:e})=>Gkn(e),staleTime:0}),ISn=()=>({queryKey:St("listAllChatSessions"),queryFn:async({signal:e})=>(await Kkn(e)).filter(n=>!bl.has(n.id)),staleTime:0}),ac=e=>({queryKey:St("getChatMessages",e),queryFn:async({signal:n,client:t,queryKey:r})=>{var h;const s=t.getQueryData(r),i=await Vh(t,r,()=>nSn(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:jm(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||!((h=a.activeLeafId)!=null&&h.startsWith("local-"))&&a.activeLeafId!==(s==null?void 0:s.activeLeafId))?a.activeLeafId:i.activeLeafId}},staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),sf="local-",ZI="bash";function zj(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(sf)),n]}function $Sn(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(sf),a=n.message.parentId!=null&&n.message.parentId===s;return{...e,messagesBySession:{...e.messagesBySession,[n.sessionId]:zj(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:`${sf}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:ZI,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?zj(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:`${sf}${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 JI=0;function e$(e){return(e.query.queryKey[2]==="listChatSessions"||e.query.queryKey[2]==="getChatMessages")&&(e.type==="removed"||e.type==="updated"&&e.action.type==="success")}tt.getQueryCache().subscribe(e=>{e$(e)&&JI++});const BSn=e=>tt.getQueryCache().subscribe(n=>{e$(n)&&e()}),PSn=()=>JI;function FSn(e,n){const t=tt.getQueryData(Gi(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=tt.getQueryData(ac(a).queryKey);o&&(s.messagesBySession[a]=o.messages,s.queuedBySession[a]=o.queued,s.activeLeafBySession[a]=o.activeLeafId)}return s}function t$(e,n,t=!1){if(n.type==="busy"){oo(tt,Gi(e).queryKey,n.sessionId),tt.setQueryData(Gi(e).queryKey,c=>c==null?void 0:c.map(u=>u.id===n.sessionId?{...u,busy:n.busy}:u));return}const r=ac(n.sessionId);if(bl.has(n.sessionId))return;oo(tt,r.queryKey,n.type==="upsertMessage"?`message:${n.message.id}`:n.type==="setQueued"?"queued":n.type==="activeLeaf"?"branch":"local");const s=tt.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=$Sn(i,n),o={messages:a.messagesBySession[n.sessionId]??[],queued:a.queuedBySession[n.sessionId]??[],activeLeafId:a.activeLeafBySession[n.sessionId]??null};tt.setQueryData(r.queryKey,o)}function HSn(e,n){const t=!!n&&!bl.has(n??""),r=ut({...ac(n??""),enabled:t,subscribed:t}),s=T.useSyncExternalStore(BSn,PSn),i=T.useMemo(()=>FSn(e,n),[e,n,s]),a=xi()[1],o=T.useCallback(c=>{zn(["workspace",a])&&t$(e,c)},[e,a]);return[i,o,r]}const rv=new Map;function qSn(e,n){let t=rv.get(e);return t||(t=new Set,rv.set(e,t)),t.add(n),()=>{t.delete(n),t.size===0&&rv.delete(e)}}function USn(e){var n;(n=rv.get(e.runId))==null||n.forEach(t=>t(e))}const X3=new Set;function Gv(e){return X3.add(e),()=>{X3.delete(e)}}function Xc(e){X3.forEach(n=>n(e))}const Y3=new Set;function GSn(e){return Y3.add(e),()=>{Y3.delete(e)}}function Yc(){Y3.forEach(e=>e())}const Z3=new Set;function VSn(e){return Z3.add(e),()=>{Z3.delete(e)}}const J3=new Set;function KSn(e){return J3.add(e),()=>{J3.delete(e)}}function WSn(){J3.forEach(e=>e())}function jj(e){Z3.forEach(n=>n(e))}const e5=new Set;function n$(e){return e5.add(e),()=>{e5.delete(e)}}function bw(e){e5.forEach(n=>n(e))}const t5=new Set;function QSn(e){return t5.add(e),()=>{t5.delete(e)}}function Aj(e){t5.forEach(n=>n(e))}const n5=new Set;function XSn(e){return n5.add(e),()=>{n5.delete(e)}}function YSn(e){n5.forEach(n=>n(e))}let r5=!0;const s5=new Set;function ZSn(e){return s5.add(e),()=>{s5.delete(e)}}function Tj(){return r5}function Rj(e){e!==r5&&(r5=e,s5.forEach(n=>n()))}const JSn=8e3,e6n=3e3;function t6n(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(()=>Rj(!1),JSn)),c.readyState===EventSource.CLOSED&&i===void 0&&(i=window.setTimeout(()=>{i=void 0,o()},e6n)))},c.onopen=()=>{var h,f;r||(window.clearTimeout(s),s=void 0,Rj(!0),a&&(Xc({type:"reconnected"}),Yc(),jj({harness:"*",authState:"unknown"}),(f=(h=n.current).onReconnect)==null||f.call(h)),a=!0)};const u=h=>{try{return JSON.parse(h.data)}catch{return null}};c.addEventListener("resync.required",()=>{var h,f;Xc({type:"reconnected"}),Yc(),(f=(h=n.current).onReconnect)==null||f.call(h)}),c.addEventListener("run.updated",h=>{const f=u(h);f!=null&&f.run&&(Yc(),n.current.onRun(f.run))}),c.addEventListener("experiment.updated",h=>{var p,m;const f=u(h);f!=null&&f.experiment&&(Yc(),(m=(p=n.current).onExperiment)==null||m.call(p,f.experiment))}),c.addEventListener("project.updated",h=>{var p,m;const f=u(h);f!=null&&f.project&&(Yc(),(m=(p=n.current).onProject)==null||m.call(p,f.project))}),c.addEventListener("files.updated",h=>{var p,m;const f=u(h);f!=null&&f.projectId&&((m=(p=n.current).onArtifacts)==null||m.call(p,f.projectId))}),c.addEventListener("run.log",h=>{const f=u(h);f!=null&&f.runId&&USn(f)}),c.addEventListener("chat.session",h=>{const f=u(h);f!=null&&f.session&&(Yc(),Xc({type:"session",session:f.session}))}),c.addEventListener("chat.session.deleted",h=>{const f=u(h);f!=null&&f.sessionId&&(Yc(),Xc({type:"sessionDeleted",sessionId:f.sessionId}))}),c.addEventListener("chat.message",h=>{const f=u(h);f!=null&&f.message&&(Yc(),Xc({type:"message",sessionId:f.sessionId,message:f.message}))}),c.addEventListener("chat.busy",h=>{const f=u(h);f!=null&&f.sessionId&&(Yc(),Xc({type:"busy",sessionId:f.sessionId,busy:f.busy}))}),c.addEventListener("chat.usage",h=>{const f=u(h);f!=null&&f.sessionId&&f.usage&&Xc({type:"usage",sessionId:f.sessionId,usage:f.usage})}),c.addEventListener("chat.queued",h=>{const f=u(h);f!=null&&f.sessionId&&Xc({type:"queued",sessionId:f.sessionId,items:f.items??[]})}),c.addEventListener("chat.branch",h=>{const f=u(h);f!=null&&f.sessionId&&Xc({type:"branch",sessionId:f.sessionId,activeLeafId:f.activeLeafId??null})}),c.addEventListener("harness.auth",h=>{const f=u(h);f!=null&&f.harness&&f.authState&&jj(f)}),c.addEventListener("harness.catalog",()=>WSn()),c.addEventListener("datadir.move.progress",h=>{const f=u(h);f&&bw({type:"progress",...f})}),c.addEventListener("datadir.move.done",h=>{const f=u(h);f&&bw({type:"done",path:f.path,oldPathLeft:f.oldPathLeft})}),c.addEventListener("datadir.move.error",h=>{const f=u(h);f&&bw({type:"error",error:f.error})}),c.addEventListener("update.status",h=>{const f=u(h);f&&YSn(f)}),c.addEventListener("overleaf.live",h=>{const f=u(h);f!=null&&f.key&&f.status&&Aj({type:"live",key:f.key,status:f.status})}),c.addEventListener("overleaf.pulled",h=>{const f=u(h);f!=null&&f.key&&Array.isArray(f.paths)&&Aj({type:"pulled",key:f.key,paths:f.paths})})};return o(),()=>{r=!0,window.clearTimeout(s),window.clearTimeout(i),t==null||t.close()}},[])}const Vv=new Set;function n6n(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 Vv.add(t),()=>{Vv.delete(t)}},[])}const Mj={onRun:e=>Vv.forEach(n=>n.onRun(e)),onReconnect:()=>Vv.forEach(e=>{var n;return(n=e.onReconnect)==null?void 0:n.call(e)})},zh=()=>({queryKey:St("listProjects"),queryFn:({signal:e,client:n,queryKey:t})=>Vh(n,t,()=>I3n(e),jm),staleTime:3e4}),r6n=()=>({queryKey:St("listProjectActivity"),queryFn:({signal:e})=>$3n(e),staleTime:3e4}),Om=()=>({queryKey:St("getUiState"),queryFn:({signal:e})=>B3n(e),staleTime:3e5}),LS=e=>({queryKey:St("getProjectUiState",e),queryFn:({signal:n})=>P3n(e,n),staleTime:3e5}),y0=(e="")=>({queryKey:St("getProjectPathStatus",e),queryFn:({signal:n})=>G3n(e,n),staleTime:3e4}),r$=e=>({queryKey:St("searchPapers",e),queryFn:({signal:n})=>W3n(e,n),staleTime:3e5}),s6n=()=>({queryKey:St("githubAccount"),queryFn:({signal:e})=>Q3n(e),staleTime:3e5}),i6n=e=>({queryKey:St("githubProjectRepoPreview",e),queryFn:({signal:n})=>X3n(e,n),staleTime:3e4}),Oj=(e,n)=>({queryKey:St("repoAccess",e,n),queryFn:({signal:t})=>Y3n(e,n,t),staleTime:3e4}),i5=e=>({queryKey:St("resolvePaper",e),queryFn:({signal:n})=>Z3n(e,n),staleTime:36e5}),a6n=(e,n,t,r)=>({queryKey:St("getProjectStarterPrompts",e,n,t,r),queryFn:({signal:s})=>e5n(e,n,t,r,s),staleTime:3e5,refetchOnWindowFocus:!1,retryOnMount:!1}),Kv=e=>({queryKey:St("listExperiments",e),queryFn:({signal:n,client:t,queryKey:r})=>Vh(t,r,()=>r5n(e,n),jm),staleTime:3e4}),Tu=e=>({queryKey:St("listRuns",e),queryFn:({signal:n,client:t,queryKey:r})=>Vh(t,r,()=>i5n(e,n),jm),staleTime:3e4});function l1(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 Dj(){const e=xi();return t6n({onRun(n){var r;if(!zn(e))return;const t=(r=tt.getQueryData(Tu(n.projectId).queryKey))==null?void 0:r.find(s=>s.id===n.id);oo(tt,Tu(n.projectId).queryKey,n.id),tt.setQueryData(Tu(n.projectId).queryKey,s=>l1(s,n)),(t==null?void 0:t.commitSha)!==n.commitSha&&(Pa(["getRunDiff"],e,s=>s.queryKey[3]===n.id),Pa(["getExperimentDiff"],e,s=>s.queryKey[3]===n.experimentId)),Mj.onRun(n)},onExperiment(n){zn(e)&&(oo(tt,Kv(n.projectId).queryKey,n.id),tt.setQueryData(Kv(n.projectId).queryKey,t=>l1(t,n)),Pa(["getProjectStarterPrompts"],e,t=>t.queryKey[3]===n.projectId),Pa(["getExperimentDiff"],e,t=>t.queryKey[3]===n.id),Pa(["getRunDiff"],e,t=>{var r;return((r=tt.getQueryData(Tu(n.projectId).queryKey))==null?void 0:r.some(s=>s.experimentId===n.id&&s.id===t.queryKey[3]))??!1}))},onProject(n){zn(e)&&(oo(tt,zh().queryKey,n.id),tt.setQueryData(zh().queryKey,t=>l1(t,n)))},onArtifacts(n){zn(e)&&(Pa(hS,e,t=>t.queryKey[3]===n),Pa(["resolvedFile"],e,t=>t.queryKey[3]===n&&t.queryKey[5]==="artifacts"))},onReconnect(){zn(e)&&(Pa(sX,e),Mj.onReconnect())}}),T.useEffect(()=>{let n;const t=GSn(()=>{n??(n=setTimeout(()=>{n=void 0,Pa(["listProjectActivity"],e)},100))}),r=n$(c=>{c.type==="done"&&Pa(["getDataDir"],e)}),s=Gv(c=>{zn(e)&&(c.type==="session"?oo(tt,Gi(c.session.projectId).queryKey,c.session.id):(c.type==="busy"||c.type==="usage")&&oo(tt,[...e,"listChatSessions"],c.sessionId),(c.type==="message"||c.type==="queued"||c.type==="branch")&&t$("",c.type==="message"?{type:"upsertMessage",sessionId:c.sessionId,message:c.message}:c.type==="queued"?{type:"setQueued",sessionId:c.sessionId,items:c.items}:{type:"activeLeaf",sessionId:c.sessionId,leafId:c.activeLeafId},!0),c.type==="session"&&!bl.has(c.session.id)?tt.setQueryData(Gi(c.session.projectId).queryKey,u=>{if(!u)return;const h=u.find(f=>f.id===c.session.id);return h?l1(u,{...c.session,contextUsage:c.session.contextUsage??h.contextUsage}):[c.session,...u]}):c.type==="sessionDeleted"?Pb(c.sessionId):(c.type==="busy"||c.type==="usage")&&tt.setQueriesData({queryKey:[...e,"listChatSessions"]},u=>u==null?void 0:u.map(h=>h.id!==c.sessionId?h:c.type==="busy"?{...h,busy:c.busy}:{...h,contextUsage:c.usage})))}),i=VSn(()=>{zn(e)&&hf(!0).catch(()=>{})}),a=KSn(()=>{zn(e)&&tt.fetchQuery({...Pu(),staleTime:0}).catch(()=>{})}),o=XSn(c=>{zn(e)&&(oo(tt,Uv().queryKey),tt.setQueryData(Uv().queryKey,c))});return()=>{clearTimeout(n),t(),r(),s(),i(),a(),o()}},[e[1]]),null}const a5=new Set;function s$(e){if(e!==E()){JD(e,{reload:!1}),document.documentElement.lang=e,UI(e);for(const n of a5)n()}}function o6n(e){return a5.add(e),()=>a5.delete(e)}function Xu(){return T.useSyncExternalStore(o6n,E,E)}const Vb="__ORX_MAC_TITLEBAR__"in window,i$="__ORX_WIN_TITLEBAR__"in window;let Lj="system",Ij="",yw=!1;const Sd=document.createElement("canvas").getContext("2d",{willReadFrequently:!0});function $j(e){if(!Sd)return null;Sd.clearRect(0,0,1,1),Sd.fillStyle="transparent",Sd.fillStyle=e,Sd.fillRect(0,0,1,1);const[n,t,r,s]=Sd.getImageData(0,0,1,1).data;return s!==255?null:[n,t,r].map(i=>i.toString(16).padStart(2,"0")).join("")}function c6n(){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=$j(getComputedStyle(t).backgroundColor);if(r)return r}return $j(getComputedStyle(document.documentElement).backgroundColor)}function o5(e){e&&(Lj=e),!(!Vb||yw)&&(yw=!0,setTimeout(()=>{var r;yw=!1;const n=c6n(),t=`titlebar:${Lj}:${n}`;!n||t===Ij||(Ij=t,(r=window.ipc)==null||r.postMessage(t))},100))}Vb&&(new MutationObserver(()=>o5()).observe(document.documentElement,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["class","style","data-theme"]}),window.addEventListener("resize",()=>o5()));const l6n="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'])",Bj=Vb?28:i$?32:0;if(Bj){document.documentElement.classList.add(Vb?"mac-titlebar":"win-titlebar");let e=!1;window.addEventListener("mousedown",n=>{var t;e=!1,!(n.button!==0||n.defaultPrevented||n.clientY>=Bj)&&(n.target instanceof Element&&n.target.closest(l6n)||(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 a$="orx:theme";function u6n(){try{const e=localStorage.getItem(a$);if(e==="light"||e==="dark"||e==="system")return e}catch{}return"system"}let pf=u6n();const c5=new Set;function _6n(e){return e!=="system"?e:window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function IS(){document.documentElement.dataset.theme=_6n(pf),o5(pf)}function o$(e){pf=e;try{localStorage.setItem(a$,e)}catch{}IS();for(const n of c5)n()}function f6n(){return pf}window.matchMedia("(prefers-color-scheme: dark)").addEventListener("change",()=>{pf==="system"&&IS()});IS();function d6n(e){return c5.add(e),()=>c5.delete(e)}function c$(){return[T.useSyncExternalStore(d6n,()=>pf,()=>pf),o$]}const h6n=(e,n)=>{const t=new Array(e.length+n.length);for(let r=0;r({classGroupId:e,validator:n}),l$=(e=new Map,n=null,t)=>({nextPart:e,validators:n,classGroupId:t}),Wv="-",Pj=[],m6n="arbitrary..",g6n=e=>{const n=b6n(e),{conflictingClassGroups:t,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return v6n(a);const o=a.split(Wv),c=o[0]===""&&o.length>1?1:0;return u$(o,c,n)},getConflictingClassGroupIds:(a,o)=>{if(o){const c=r[a],u=t[a];return c?u?h6n(u,c):c:u||Pj}return t[a]||Pj}}},u$=(e,n,t)=>{if(e.length-n===0)return t.classGroupId;const s=e[n],i=t.nextPart.get(s);if(i){const u=u$(e,n+1,i);if(u)return u}const a=t.validators;if(a===null)return;const o=n===0?e.join(Wv):e.slice(n).join(Wv),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?m6n+r:void 0})(),b6n=e=>{const{theme:n,classGroups:t}=e;return y6n(t,n)},y6n=(e,n)=>{const t=l$();for(const r in e){const s=e[r];$S(s,t,r,n)}return t},$S=(e,n,t,r)=>{const s=e.length;for(let i=0;i{if(typeof e=="string"){w6n(e,n,t);return}if(typeof e=="function"){k6n(e,n,t,r);return}S6n(e,n,t,r)},w6n=(e,n,t)=>{const r=e===""?n:_$(n,e);r.classGroupId=t},k6n=(e,n,t,r)=>{if(C6n(e)){$S(e(r),n,t,r);return}n.validators===null&&(n.validators=[]),n.validators.push(p6n(t,e))},S6n=(e,n,t,r)=>{const s=Object.entries(e),i=s.length;for(let a=0;a{let t=e;const r=n.split(Wv),s=r.length;for(let i=0;i"isThemeGetter"in e&&e.isThemeGetter===!0,E6n=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)}}},l5="!",Fj=":",N6n=[],Hj=(e,n,t,r,s)=>({modifiers:e,hasImportantModifier:n,baseClassName:t,maybePostfixModifierPosition:r,isExternal:s}),z6n=e=>{const{prefix:n,experimentalParseClassName:t}=e;let r=s=>{const i=[];let a=0,o=0,c=0,u;const h=s.length;for(let k=0;kc?u-c:void 0;return Hj(i,m,p,w)};if(n){const s=n+Fj,i=r;r=a=>a.startsWith(s)?i(a.slice(s.length)):Hj(N6n,!1,a,void 0,!0)}if(t){const s=r;r=i=>t({className:i,parseClassName:s})}return r},j6n=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}},A6n=e=>({cache:E6n(e.cacheSize),parseClassName:z6n(e),sortModifiers:j6n(e),postfixLookupClassGroupIds:T6n(e),...g6n(e)}),T6n=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(R6n);let u="";for(let h=c.length-1;h>=0;h-=1){const f=c[h],{isExternal:p,modifiers:m,hasImportantModifier:w,baseClassName:k,maybePostfixModifierPosition:v}=t(f);if(p){u=f+(u.length>0?" "+u:u);continue}let b=!!v,y;if(b){const A=k.substring(0,v);y=r(A);const z=y&&a[y]?r(k):void 0;z&&z!==y&&(y=z,b=!1)}else y=r(k);if(!y){if(!b){u=f+(u.length>0?" "+u:u);continue}if(y=r(k),!y){u=f+(u.length>0?" "+u:u);continue}b=!1}const x=m.length===0?"":m.length===1?m[0]:i(m).join(":"),C=w?x+l5:x,N=C+y;if(o.indexOf(N)>-1)continue;o.push(N);const j=s(y,b);for(let A=0;A0?" "+u:u)}return u},O6n=(...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((h,f)=>f(h),e());return t=A6n(u),r=t.cache.get,s=t.cache.set,i=o,o(c)},o=c=>{const u=r(c);if(u)return u;const h=M6n(c,t);return s(c,h),h};return i=a,(...c)=>i(O6n(...c))},D6n=[],Cs=e=>{const n=t=>t[e]||D6n;return n.isThemeGetter=!0,n},d$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,h$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,L6n=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,I6n=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,$6n=/\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$/,B6n=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,P6n=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,F6n=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,uu=e=>L6n.test(e),wn=e=>!!e&&!Number.isNaN(Number(e)),Ho=e=>!!e&&Number.isInteger(Number(e)),xw=e=>e.endsWith("%")&&wn(e.slice(0,-1)),Zc=e=>I6n.test(e),p$=()=>!0,H6n=e=>$6n.test(e)&&!B6n.test(e),BS=()=>!1,q6n=e=>P6n.test(e),U6n=e=>F6n.test(e),G6n=e=>!pt(e)&&!bt(e),V6n=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)),K6n=e=>Yu(e,v$,BS),pt=e=>d$.test(e),z_=e=>Yu(e,b$,H6n),Uj=e=>Yu(e,tCn,wn),W6n=e=>Yu(e,x$,p$),Q6n=e=>Yu(e,y$,BS),Gj=e=>Yu(e,m$,BS),X6n=e=>Yu(e,g$,U6n),u1=e=>Yu(e,w$,q6n),bt=e=>h$.test(e),Qp=e=>Rf(e,b$),Y6n=e=>Rf(e,y$),Vj=e=>Rf(e,m$),Z6n=e=>Rf(e,v$),J6n=e=>Rf(e,g$),_1=e=>Rf(e,w$,!0),eCn=e=>Rf(e,x$,!0),Yu=(e,n,t)=>{const r=d$.exec(e);return r?r[1]?n(r[1]):t(r[2]):!1},Rf=(e,n,t=!1)=>{const r=h$.exec(e);return r?r[1]?n(r[1]):t:!1},m$=e=>e==="position"||e==="percentage",g$=e=>e==="image"||e==="url",v$=e=>e==="length"||e==="size"||e==="bg-size",b$=e=>e==="length",tCn=e=>e==="number",y$=e=>e==="family-name",x$=e=>e==="number"||e==="weight",w$=e=>e==="shadow",Kj=()=>{const e=Cs("color"),n=Cs("font"),t=Cs("text"),r=Cs("font-weight"),s=Cs("tracking"),i=Cs("leading"),a=Cs("breakpoint"),o=Cs("container"),c=Cs("spacing"),u=Cs("radius"),h=Cs("shadow"),f=Cs("inset-shadow"),p=Cs("text-shadow"),m=Cs("drop-shadow"),w=Cs("blur"),k=Cs("perspective"),v=Cs("aspect"),b=Cs("ease"),y=Cs("animate"),x=()=>["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(),bt,pt],j=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],z=()=>[bt,pt,c],M=()=>[uu,"full","auto",...z()],D=()=>[Ho,"none","subgrid",bt,pt],I=()=>["auto",{span:["full",Ho,bt,pt]},Ho,bt,pt],B=()=>[Ho,"auto",bt,pt],G=()=>["auto","min","max","fr",bt,pt],q=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],Q=()=>["start","end","center","stretch","center-safe","end-safe"],K=()=>["auto",...z()],Z=()=>[uu,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...z()],J=()=>[uu,"screen","full","dvw","lvw","svw","min","max","fit",...z()],$=()=>[uu,"screen","full","lh","dvh","lvh","svh","min","max","fit",...z()],L=()=>[e,bt,pt],F=()=>[...C(),Vj,Gj,{position:[bt,pt]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",Z6n,K6n,{size:[bt,pt]}],oe=()=>[xw,Qp,z_],ae=()=>["","none","full",u,bt,pt],ue=()=>["",wn,Qp,z_],se=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ne=()=>[wn,xw,Vj,Gj],ce=()=>["","none",w,bt,pt],he=()=>["none",wn,bt,pt],me=()=>["none",wn,bt,pt],Ae=()=>[wn,bt,pt],Pe=()=>[uu,"full",...z()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Zc],breakpoint:[Zc],color:[p$],container:[Zc],"drop-shadow":[Zc],ease:["in","out","in-out"],font:[G6n],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Zc],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Zc],shadow:[Zc],spacing:["px",wn],text:[Zc],"text-shadow":[Zc],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",uu,pt,bt,v]}],container:["container"],"container-type":[{"@container":["","normal","size",bt,pt]}],"container-named":[V6n],columns:[{columns:[wn,pt,bt,o]}],"break-after":[{"break-after":x()}],"break-before":[{"break-before":x()}],"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:j()}],"overflow-x":[{"overflow-x":j()}],"overflow-y":[{"overflow-y":j()}],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:[Ho,"auto",bt,pt]}],basis:[{basis:[uu,"full","auto",o,...z()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[wn,uu,"auto","initial","none",pt]}],grow:[{grow:["",wn,bt,pt]}],shrink:[{shrink:["",wn,bt,pt]}],order:[{order:[Ho,"first","last","none",bt,pt]}],"grid-cols":[{"grid-cols":D()}],"col-start-end":[{col:I()}],"col-start":[{"col-start":B()}],"col-end":[{"col-end":B()}],"grid-rows":[{"grid-rows":D()}],"row-start-end":[{row:I()}],"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":G()}],"auto-rows":[{"auto-rows":G()}],gap:[{gap:z()}],"gap-x":[{"gap-x":z()}],"gap-y":[{"gap-y":z()}],"justify-content":[{justify:[...q(),"normal"]}],"justify-items":[{"justify-items":[...Q(),"normal"]}],"justify-self":[{"justify-self":["auto",...Q()]}],"align-content":[{content:["normal",...q()]}],"align-items":[{items:[...Q(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...Q(),{baseline:["","last"]}]}],"place-content":[{"place-content":q()}],"place-items":[{"place-items":[...Q(),"baseline"]}],"place-self":[{"place-self":["auto",...Q()]}],p:[{p:z()}],px:[{px:z()}],py:[{py:z()}],ps:[{ps:z()}],pe:[{pe:z()}],pbs:[{pbs:z()}],pbe:[{pbe:z()}],pt:[{pt:z()}],pr:[{pr:z()}],pb:[{pb:z()}],pl:[{pl:z()}],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":z()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":z()}],"space-y-reverse":["space-y-reverse"],size:[{size:Z()}],"inline-size":[{inline:["auto",...J()]}],"min-inline-size":[{"min-inline":["auto",...J()]}],"max-inline-size":[{"max-inline":["none",...J()]}],"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,Qp,z_]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,eCn,W6n]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",xw,pt]}],"font-family":[{font:[Y6n,Q6n,n]}],"font-features":[{"font-features":[pt]}],"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,bt,pt]}],"line-clamp":[{"line-clamp":[wn,"none",bt,Uj]}],leading:[{leading:[i,...z()]}],"list-image":[{"list-image":["none",bt,pt]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",bt,pt]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:L()}],"text-color":[{text:L()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...se(),"wavy"]}],"text-decoration-thickness":[{decoration:[wn,"from-font","auto",bt,z_]}],"text-decoration-color":[{decoration:L()}],"underline-offset":[{"underline-offset":[wn,"auto",bt,pt]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"tab-size":[{tab:[Ho,bt,pt]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",bt,pt]}],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",bt,pt]}],"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:U()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ho,bt,pt],radial:["",bt,pt],conic:[Ho,bt,pt]},J6n,X6n]}],"bg-color":[{bg:L()}],"gradient-from-pos":[{from:oe()}],"gradient-via-pos":[{via:oe()}],"gradient-to-pos":[{to:oe()}],"gradient-from":[{from:L()}],"gradient-via":[{via:L()}],"gradient-to":[{to:L()}],rounded:[{rounded:ae()}],"rounded-s":[{"rounded-s":ae()}],"rounded-e":[{"rounded-e":ae()}],"rounded-t":[{"rounded-t":ae()}],"rounded-r":[{"rounded-r":ae()}],"rounded-b":[{"rounded-b":ae()}],"rounded-l":[{"rounded-l":ae()}],"rounded-ss":[{"rounded-ss":ae()}],"rounded-se":[{"rounded-se":ae()}],"rounded-ee":[{"rounded-ee":ae()}],"rounded-es":[{"rounded-es":ae()}],"rounded-tl":[{"rounded-tl":ae()}],"rounded-tr":[{"rounded-tr":ae()}],"rounded-br":[{"rounded-br":ae()}],"rounded-bl":[{"rounded-bl":ae()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...se(),"hidden","none"]}],"divide-style":[{divide:[...se(),"hidden","none"]}],"border-color":[{border:L()}],"border-color-x":[{"border-x":L()}],"border-color-y":[{"border-y":L()}],"border-color-s":[{"border-s":L()}],"border-color-e":[{"border-e":L()}],"border-color-bs":[{"border-bs":L()}],"border-color-be":[{"border-be":L()}],"border-color-t":[{"border-t":L()}],"border-color-r":[{"border-r":L()}],"border-color-b":[{"border-b":L()}],"border-color-l":[{"border-l":L()}],"divide-color":[{divide:L()}],"outline-style":[{outline:[...se(),"none","hidden"]}],"outline-offset":[{"outline-offset":[wn,bt,pt]}],"outline-w":[{outline:["",wn,Qp,z_]}],"outline-color":[{outline:L()}],shadow:[{shadow:["","none",h,_1,u1]}],"shadow-color":[{shadow:L()}],"inset-shadow":[{"inset-shadow":["none",f,_1,u1]}],"inset-shadow-color":[{"inset-shadow":L()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:L()}],"ring-offset-w":[{"ring-offset":[wn,z_]}],"ring-offset-color":[{"ring-offset":L()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":L()}],"text-shadow":[{"text-shadow":["none",p,_1,u1]}],"text-shadow-color":[{"text-shadow":L()}],opacity:[{opacity:[wn,bt,pt]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"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":[wn]}],"mask-image-linear-from-pos":[{"mask-linear-from":ne()}],"mask-image-linear-to-pos":[{"mask-linear-to":ne()}],"mask-image-linear-from-color":[{"mask-linear-from":L()}],"mask-image-linear-to-color":[{"mask-linear-to":L()}],"mask-image-t-from-pos":[{"mask-t-from":ne()}],"mask-image-t-to-pos":[{"mask-t-to":ne()}],"mask-image-t-from-color":[{"mask-t-from":L()}],"mask-image-t-to-color":[{"mask-t-to":L()}],"mask-image-r-from-pos":[{"mask-r-from":ne()}],"mask-image-r-to-pos":[{"mask-r-to":ne()}],"mask-image-r-from-color":[{"mask-r-from":L()}],"mask-image-r-to-color":[{"mask-r-to":L()}],"mask-image-b-from-pos":[{"mask-b-from":ne()}],"mask-image-b-to-pos":[{"mask-b-to":ne()}],"mask-image-b-from-color":[{"mask-b-from":L()}],"mask-image-b-to-color":[{"mask-b-to":L()}],"mask-image-l-from-pos":[{"mask-l-from":ne()}],"mask-image-l-to-pos":[{"mask-l-to":ne()}],"mask-image-l-from-color":[{"mask-l-from":L()}],"mask-image-l-to-color":[{"mask-l-to":L()}],"mask-image-x-from-pos":[{"mask-x-from":ne()}],"mask-image-x-to-pos":[{"mask-x-to":ne()}],"mask-image-x-from-color":[{"mask-x-from":L()}],"mask-image-x-to-color":[{"mask-x-to":L()}],"mask-image-y-from-pos":[{"mask-y-from":ne()}],"mask-image-y-to-pos":[{"mask-y-to":ne()}],"mask-image-y-from-color":[{"mask-y-from":L()}],"mask-image-y-to-color":[{"mask-y-to":L()}],"mask-image-radial":[{"mask-radial":[bt,pt]}],"mask-image-radial-from-pos":[{"mask-radial-from":ne()}],"mask-image-radial-to-pos":[{"mask-radial-to":ne()}],"mask-image-radial-from-color":[{"mask-radial-from":L()}],"mask-image-radial-to-color":[{"mask-radial-to":L()}],"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":[wn]}],"mask-image-conic-from-pos":[{"mask-conic-from":ne()}],"mask-image-conic-to-pos":[{"mask-conic-to":ne()}],"mask-image-conic-from-color":[{"mask-conic-from":L()}],"mask-image-conic-to-color":[{"mask-conic-to":L()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:F()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",bt,pt]}],filter:[{filter:["","none",bt,pt]}],blur:[{blur:ce()}],brightness:[{brightness:[wn,bt,pt]}],contrast:[{contrast:[wn,bt,pt]}],"drop-shadow":[{"drop-shadow":["","none",m,_1,u1]}],"drop-shadow-color":[{"drop-shadow":L()}],grayscale:[{grayscale:["",wn,bt,pt]}],"hue-rotate":[{"hue-rotate":[wn,bt,pt]}],invert:[{invert:["",wn,bt,pt]}],saturate:[{saturate:[wn,bt,pt]}],sepia:[{sepia:["",wn,bt,pt]}],"backdrop-filter":[{"backdrop-filter":["","none",bt,pt]}],"backdrop-blur":[{"backdrop-blur":ce()}],"backdrop-brightness":[{"backdrop-brightness":[wn,bt,pt]}],"backdrop-contrast":[{"backdrop-contrast":[wn,bt,pt]}],"backdrop-grayscale":[{"backdrop-grayscale":["",wn,bt,pt]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[wn,bt,pt]}],"backdrop-invert":[{"backdrop-invert":["",wn,bt,pt]}],"backdrop-opacity":[{"backdrop-opacity":[wn,bt,pt]}],"backdrop-saturate":[{"backdrop-saturate":[wn,bt,pt]}],"backdrop-sepia":[{"backdrop-sepia":["",wn,bt,pt]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":z()}],"border-spacing-x":[{"border-spacing-x":z()}],"border-spacing-y":[{"border-spacing-y":z()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",bt,pt]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[wn,"initial",bt,pt]}],ease:[{ease:["linear","initial",b,bt,pt]}],delay:[{delay:[wn,bt,pt]}],animate:[{animate:["none",y,bt,pt]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[k,bt,pt]}],"perspective-origin":[{"perspective-origin":N()}],rotate:[{rotate:he()}],"rotate-x":[{"rotate-x":he()}],"rotate-y":[{"rotate-y":he()}],"rotate-z":[{"rotate-z":he()}],scale:[{scale:me()}],"scale-x":[{"scale-x":me()}],"scale-y":[{"scale-y":me()}],"scale-z":[{"scale-z":me()}],"scale-3d":["scale-3d"],skew:[{skew:Ae()}],"skew-x":[{"skew-x":Ae()}],"skew-y":[{"skew-y":Ae()}],transform:[{transform:[bt,pt,"","none","gpu","cpu"]}],"transform-origin":[{origin:N()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Pe()}],"translate-x":[{"translate-x":Pe()}],"translate-y":[{"translate-y":Pe()}],"translate-z":[{"translate-z":Pe()}],"translate-none":["translate-none"],zoom:[{zoom:[Ho,bt,pt]}],accent:[{accent:L()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:L()}],"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",bt,pt]}],"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":L()}],"scrollbar-track-color":[{"scrollbar-track":L()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mbs":[{"scroll-mbs":z()}],"scroll-mbe":[{"scroll-mbe":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pbs":[{"scroll-pbs":z()}],"scroll-pbe":[{"scroll-pbe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"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",bt,pt]}],fill:[{fill:["none",...L()]}],"stroke-w":[{stroke:[wn,Qp,z_,Uj]}],stroke:[{stroke:["none",...L()]}],"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"]}},nCn=(e,{cacheSize:n,prefix:t,experimentalParseClassName:r,extend:s={},override:i={}})=>(Od(e,"cacheSize",n),Od(e,"prefix",t),Od(e,"experimentalParseClassName",r),f1(e.theme,i.theme),f1(e.classGroups,i.classGroups),f1(e.conflictingClassGroups,i.conflictingClassGroups),f1(e.conflictingClassGroupModifiers,i.conflictingClassGroupModifiers),Od(e,"postfixLookupClassGroups",i.postfixLookupClassGroups),Od(e,"orderSensitiveModifiers",i.orderSensitiveModifiers),d1(e.theme,s.theme),d1(e.classGroups,s.classGroups),d1(e.conflictingClassGroups,s.conflictingClassGroups),d1(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),u5(e,s,"postfixLookupClassGroups"),u5(e,s,"orderSensitiveModifiers"),e),Od=(e,n,t)=>{t!==void 0&&(e[n]=t)},f1=(e,n)=>{if(n)for(const t in n)Od(e,t,n[t])},d1=(e,n)=>{if(n)for(const t in n)u5(e,n,t)},u5=(e,n,t)=>{const r=n[t];r!==void 0&&(e[t]=e[t]?e[t].concat(r):r)},rCn=(e,...n)=>typeof e=="function"?qj(Kj,e,...n):qj(()=>nCn(Kj(),e),...n),sCn=rCn({extend:{theme:{text:["menu"]}}});function zs(...e){return sCn(...e)}const iCn={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 Wt({variant:e="default",size:n="default",className:t,...r}){return _.jsx("span",{className:zs("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",iCn[e],t),...r})}const aCn=["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(" "),oCn={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"},cCn={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 k$(e,n,t,r){return zs(aCn,oCn[e],cCn[n],t&&"active",r)}function De({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return _.jsx("button",{className:k$(n,t,e,r),...s})}function jh({active:e=!1,variant:n="default",size:t="default",className:r,...s}){return _.jsx("a",{className:k$(n,t,e,r),...s})}const lCn=["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(" "),uCn={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"},_Cn={default:"h-8 w-8 rounded-md",small:"h-7 w-7 rounded-sm"};function S$(e,n,t,r,s){return zs(lCn,uCn[e],_Cn[n],r==="circle"&&"rounded-full",t&&"active",s)}const It=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:S$(s,r,n,t,i),...a})});function Wh({active:e=!1,shape:n="rounded",size:t="default",variant:r="default",className:s,...i}){return _.jsx("a",{className:S$(r,t,e,n,s),...i})}const fCn={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 Br({variant:e="default",className:n,...t}){return _.jsx("input",{className:zs("w-full font-sans text-sm font-normal text-text outline-none placeholder:text-muted disabled:cursor-default disabled:opacity-45",fCn[e],n),...t})}function vn({active:e=!1,danger:n=!1,size:t="default",className:r,...s}){return _.jsx("button",{className:zs("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 kt({className:e,...n}){return _.jsx("span",{className:zs("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 Pr({className:e,...n}){return _.jsx("div",{className:zs("flex items-center gap-2 px-0 py-1 text-sm text-subtext",e),...n})}const dCn={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 Yd({tone:e="neutral",live:n=!1,className:t,children:r,...s}){return _.jsxs("span",{className:zs("status-badge inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium text-text",t),...s,children:[_.jsx("span",{className:zs("h-[7px] w-[7px] shrink-0 rounded-full bg-current",dCn[e],n&&"animate-[or-pulse_1.2s_ease-in-out_infinite]")}),r]})}const hCn=["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 C$(e,n){return zs(hCn,e&&"border-primary bg-primary [&_span]:translate-x-4 [&_span]:bg-background",n)}function PS({checked:e=!1,className:n,children:t,...r}){return _.jsx("button",{role:"switch","aria-checked":e,className:C$(e,n),...r,children:t??_.jsx("span",{})})}function pCn({checked:e=!1,className:n,...t}){return _.jsx("span",{className:C$(e,n),...t,children:_.jsx("span",{})})}var ii=mD();const mCn=Em(ii);function gCn(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 vCn=e=>{switch(e){case"success":return xCn;case"info":return kCn;case"warning":return wCn;case"error":return SCn;default:return null}},bCn=Array(12).fill(0),yCn=({visible:e,className:n})=>it.createElement("div",{className:["sonner-loading-wrapper",n].filter(Boolean).join(" "),"data-visible":e},it.createElement("div",{className:"sonner-spinner"},bCn.map((t,r)=>it.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),xCn=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),wCn=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),kCn=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),SCn=it.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20","aria-hidden":"true"},it.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"})),CCn=it.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"},it.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),it.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),ECn=()=>{const[e,n]=it.useState(document.hidden);return it.useEffect(()=>{const t=()=>{n(document.hidden)};return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]),e};let NCn=1;const zCn=100,Wj=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:NCn++};class jCn{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-zCn;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=Wj(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],it.isValidElement(u))i=!1,this.create({id:r,type:"default",message:u});else if(TCn(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"&&!it.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"&&!it.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"&&!it.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 h=typeof t.error=="function"?await t.error(u):t.error,f=typeof t.description=="function"?await t.description(u):t.description,m=typeof h=="object"&&!it.isValidElement(h)?h:{message:h};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,h)=>o.then(()=>a[0]==="reject"?h(a[1]):u(a[1])).catch(h));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(n,t)=>{const r=Wj(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 Fi=new jCn,ACn=(e,n)=>Fi.message(e,n),TCn=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",RCn=ACn,MCn=()=>Fi.toasts,OCn=()=>Fi.getActiveToasts(),DCn=Object.assign(RCn,{success:Fi.success,info:Fi.info,warning:Fi.warning,error:Fi.error,custom:Fi.custom,message:Fi.message,promise:Fi.promise,dismiss:Fi.dismiss,loading:Fi.loading},{getHistory:MCn,getToasts:OCn});gCn("[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 h1(e){return e.label!==void 0}const LCn=3,ICn="24px",$Cn="16px",Qj=4e3,BCn=356,PCn=14,FCn=45,HCn=200;function qo(...e){return e.filter(Boolean).join(" ")}function qCn(e){const[n,t]=e.split("-"),r=[];return n&&r.push(n),t&&r.push(t),r}const UCn=e=>{var n,t,r,s,i,a,o,c,u;const{invert:h,toast:f,unstyled:p,interacting:m,setHeights:w,visibleToasts:k,heights:v,index:b,toasts:y,expanded:x,removeToast:C,defaultRichColors:N,closeButton:j,style:A,cancelButtonStyle:z,actionButtonStyle:M,className:D="",descriptionClassName:I="",duration:B,position:G,gap:q,expandByDefault:Q,classNames:K,icons:Z,closeButtonAriaLabel:J="Close toast"}=e,[$,L]=it.useState(null),[F,U]=it.useState(null),[H,oe]=it.useState(!1),[ae,ue]=it.useState(!1),[se,V]=it.useState(!1),[ne,ce]=it.useState(!1),[he,me]=it.useState(!1),[Ae,Pe]=it.useState(0),[Ye,Re]=it.useState(0),$e=it.useRef(f.duration||B||Qj),yt=it.useRef(null),ot=it.useRef(null),Mt=b===0,jt=b+1<=k,Pt=f.type,Ie=Pt??"default",nt=f.dismissible!==!1,ke=f.className||"",ge=f.descriptionClassName||"",je=it.useMemo(()=>v.findIndex(gt=>gt.toastId===f.id)||0,[v,f.id]),qe=it.useMemo(()=>{var gt;return(gt=f.closeButton)!=null?gt:j},[f.closeButton,j]),rt=it.useMemo(()=>f.duration||B||Qj,[f.duration,B]),dt=it.useRef(0),st=it.useRef(0),Ut=it.useRef(0),Xt=it.useRef(null),[en,an]=G.split("-"),At=it.useMemo(()=>v.reduce((gt,ln,bn)=>bn>=je?gt:gt+ln.height,0),[v,je]),gn=ECn(),on=it.useMemo(()=>{var gt;return(gt=e.swipeDirections)!=null?gt:qCn(G)},[e.swipeDirections,G]),Ot=f.invert||h,dn=Pt==="loading";st.current=it.useMemo(()=>je*q+At,[je,At]),it.useEffect(()=>{$e.current=rt},[rt]),it.useEffect(()=>{oe(!0)},[]),it.useEffect(()=>{const gt=ot.current;if(gt){const ln=gt.getBoundingClientRect().height;return Re(ln),w(bn=>[{toastId:f.id,height:ln,position:f.position},...bn]),()=>w(bn=>bn.filter(un=>un.toastId!==f.id))}},[w,f.id]),it.useLayoutEffect(()=>{if(!H)return;const gt=ot.current,ln=gt.style.height;gt.style.height="auto";const bn=gt.getBoundingClientRect().height;gt.style.height=ln,Re(bn),w(un=>un.find(Mn=>Mn.toastId===f.id)?un.map(Mn=>Mn.toastId===f.id?{...Mn,height:bn}:Mn):[{toastId:f.id,height:bn,position:f.position},...un])},[H,f.title,f.description,w,f.id,f.jsx,f.action,f.cancel]);const cn=it.useCallback(()=>{ue(!0),Pe(st.current),w(gt=>gt.filter(ln=>ln.toastId!==f.id)),setTimeout(()=>{C(f)},HCn)},[f,C,w,st]);it.useEffect(()=>{if(f.promise&&Pt==="loading"||f.duration===1/0||f.type==="loading")return;let gt;return x||m||gn?(()=>{if(Ut.current{$e.current!==1/0&&(dt.current=new Date().getTime(),gt=setTimeout(()=>{f.onAutoClose==null||f.onAutoClose.call(f,f),cn()},$e.current))})(),()=>clearTimeout(gt)},[x,m,f,Pt,gn,cn]),it.useEffect(()=>{f.delete&&(cn(),f.onDismiss==null||f.onDismiss.call(f,f))},[cn,f.delete]);function kn(){var gt;if(Z!=null&&Z.loading){var ln;return it.createElement("div",{className:qo(K==null?void 0:K.loader,f==null||(ln=f.classNames)==null?void 0:ln.loader,"sonner-loader"),"data-visible":Pt==="loading"},Z.loading)}return it.createElement(yCn,{className:qo(K==null?void 0:K.loader,f==null||(gt=f.classNames)==null?void 0:gt.loader),visible:Pt==="loading"})}const Wn=f.icon||(Z==null?void 0:Z[Pt])||vCn(Pt);var vs,ns;return it.createElement("li",{tabIndex:0,ref:ot,className:qo(D,ke,K==null?void 0:K.toast,f==null||(n=f.classNames)==null?void 0:n.toast,K==null?void 0:K[Ie],f==null||(t=f.classNames)==null?void 0:t[Ie]),"data-sonner-toast":"","data-rich-colors":(vs=f.richColors)!=null?vs:N,"data-styled":!(f.jsx||f.unstyled||p),"data-mounted":H,"data-promise":!!f.promise,"data-swiped":he,"data-removed":ae,"data-visible":jt,"data-y-position":en,"data-x-position":an,"data-index":b,"data-front":Mt,"data-swiping":se,"data-dismissible":nt,"data-type":Pt,"data-invert":Ot,"data-swipe-out":ne,"data-swipe-direction":F,"data-expanded":!!(x||Q&&H),"data-testid":f.testId,style:{"--index":b,"--toasts-before":b,"--z-index":y.length-b,"--offset":`${ae?Ae:st.current}px`,"--initial-height":Q?"auto":`${Ye}px`,...A,...f.style},onDragEnd:()=>{V(!1),L(null),Xt.current=null},onPointerDown:gt=>{gt.button!==2&&(dn||!nt||(yt.current=new Date,Pe(st.current),gt.target.setPointerCapture(gt.pointerId),gt.target.tagName!=="BUTTON"&&(V(!0),Xt.current={x:gt.clientX,y:gt.clientY})))},onPointerUp:()=>{var gt,ln,bn;if(ne||!nt)return;Xt.current=null;const un=Number(((gt=ot.current)==null?void 0:gt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),_r=Number(((ln=ot.current)==null?void 0:ln.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),Mn=new Date().getTime()-((bn=yt.current)==null?void 0:bn.getTime()),Qn=$==="x"?un:_r,ar=Math.abs(Qn)/Mn;if(($==="x"?on.includes(un>0?"right":"left"):on.includes(_r>0?"bottom":"top"))&&(Math.abs(Qn)>=FCn||ar>.11)){Pe(st.current),f.onDismiss==null||f.onDismiss.call(f,f),U($==="x"?un>0?"right":"left":_r>0?"down":"up"),cn(),ce(!0);return}else{var Ht,vr;(Ht=ot.current)==null||Ht.style.setProperty("--swipe-amount-x","0px"),(vr=ot.current)==null||vr.style.setProperty("--swipe-amount-y","0px")}me(!1),V(!1),L(null)},onPointerMove:gt=>{var ln,bn,un;if(!Xt.current||!nt||((ln=window.getSelection())==null?void 0:ln.toString().length)>0)return;const Mn=gt.clientY-Xt.current.y,Qn=gt.clientX-Xt.current.x;!$&&(Math.abs(Qn)>1||Math.abs(Mn)>1)&&L(Math.abs(Qn)>Math.abs(Mn)?"x":"y");let ar={x:0,y:0};const wt=Ht=>1/(1.5+Math.abs(Ht)/20);if($==="y"){if(on.includes("top")||on.includes("bottom"))if(on.includes("top")&&Mn<0||on.includes("bottom")&&Mn>0)ar.y=Mn;else{const Ht=Mn*wt(Mn);ar.y=Math.abs(Ht)0)ar.x=Qn;else{const Ht=Qn*wt(Qn);ar.x=Math.abs(Ht)0||Math.abs(ar.y)>0)&&me(!0),(bn=ot.current)==null||bn.style.setProperty("--swipe-amount-x",`${ar.x}px`),(un=ot.current)==null||un.style.setProperty("--swipe-amount-y",`${ar.y}px`)}},qe&&!f.jsx&&Pt!=="loading"?it.createElement("button",{"aria-label":J,"data-disabled":dn,"data-close-button":!0,onClick:dn||!nt?()=>{}:()=>{cn(),f.onDismiss==null||f.onDismiss.call(f,f)},className:qo(K==null?void 0:K.closeButton,f==null||(r=f.classNames)==null?void 0:r.closeButton)},(ns=Z==null?void 0:Z.close)!=null?ns:CCn):null,(Pt||f.icon||f.promise)&&f.icon!==null&&((Z==null?void 0:Z[Pt])!==null||f.icon)?it.createElement("div",{"data-icon":"",className:qo(K==null?void 0:K.icon,f==null||(s=f.classNames)==null?void 0:s.icon)},Pt==="loading"?f.icon||kn():f.promise?kn():null,Pt!=="loading"?Wn:null):null,it.createElement("div",{"data-content":"",className:qo(K==null?void 0:K.content,f==null||(i=f.classNames)==null?void 0:i.content)},it.createElement("div",{"data-title":"",className:qo(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?it.createElement("div",{"data-description":"",className:qo(I,ge,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),it.isValidElement(f.cancel)?f.cancel:f.cancel&&h1(f.cancel)?it.createElement("button",{"data-button":!0,"data-cancel":!0,style:f.cancelButtonStyle||z,onClick:gt=>{h1(f.cancel)&&nt&&(f.cancel.onClick==null||f.cancel.onClick.call(f.cancel,gt),cn())},className:qo(K==null?void 0:K.cancelButton,f==null||(c=f.classNames)==null?void 0:c.cancelButton)},f.cancel.label):null,it.isValidElement(f.action)?f.action:f.action&&h1(f.action)?it.createElement("button",{"data-button":!0,"data-action":!0,style:f.actionButtonStyle||M,onClick:gt=>{h1(f.action)&&(f.action.onClick==null||f.action.onClick.call(f.action,gt),!gt.defaultPrevented&&cn())},className:qo(K==null?void 0:K.actionButton,f==null||(u=f.classNames)==null?void 0:u.actionButton)},f.action.label):null)};function Xj(){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 GCn(e,n){const t={};return[e,n].forEach((r,s)=>{const i=s===1,a=i?"--mobile-offset":"--offset",o=i?$Cn:ICn;function c(u){["top","right","bottom","left"].forEach(h=>{t[`${a}-${h}`]=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 VCn=it.forwardRef(function(n,t){const{id:r,invert:s,position:i="bottom-right",hotkey:a=["altKey","KeyT"],expand:o,closeButton:c,className:u,offset:h,mobileOffset:f,theme:p="light",richColors:m,duration:w,style:k,visibleToasts:v=LCn,toastOptions:b,dir:y=Xj(),gap:x=PCn,icons:C,customAriaLabel:N,containerAriaLabel:j="Notifications"}=n,[A,z]=it.useState([]),M=it.useMemo(()=>r?A.filter(oe=>oe.toasterId===r):A.filter(oe=>!oe.toasterId),[A,r]),D=it.useMemo(()=>Array.from(new Set([i].concat(M.filter(oe=>oe.position).map(oe=>oe.position)))),[M,i]),[I,B]=it.useState([]),[G,q]=it.useState(!1),[Q,K]=it.useState(!1),[Z,J]=it.useState(p!=="system"?p:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),$=it.useRef(null),L=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=it.useRef(null),U=it.useRef(!1),H=it.useCallback(oe=>{z(ae=>{var ue;return(ue=ae.find(se=>se.id===oe.id))!=null&&ue.delete||Fi.dismiss(oe.id),ae.filter(({id:se})=>se!==oe.id)})},[]);return it.useEffect(()=>Fi.subscribe(oe=>{if(oe.dismiss){requestAnimationFrame(()=>{z(ae=>ae.map(ue=>ue.id===oe.id?{...ue,delete:!0}:ue))});return}setTimeout(()=>{mCn.flushSync(()=>{z(ae=>{const ue=ae.findIndex(se=>se.id===oe.id);return ue!==-1?[...ae.slice(0,ue),{...ae[ue],...oe},...ae.slice(ue+1)]:[oe,...ae]})})})}),[]),it.useEffect(()=>{if(p!=="system"){J(p);return}if(p==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?J("dark"):J("light")),typeof window>"u")return;const oe=window.matchMedia("(prefers-color-scheme: dark)");try{oe.addEventListener("change",({matches:ae})=>{J(ae?"dark":"light")})}catch{oe.addListener(({matches:ue})=>{try{J(ue?"dark":"light")}catch(se){console.error(se)}})}},[p]),it.useEffect(()=>{A.length<=1&&q(!1)},[A]),it.useEffect(()=>{const oe=ae=>{var ue;if(a.length>0&&a.every(ne=>ae[ne]||ae.code===ne)){var V;q(!0),(V=$.current)==null||V.focus()}ae.code==="Escape"&&(document.activeElement===$.current||(ue=$.current)!=null&&ue.contains(document.activeElement))&&q(!1)};return document.addEventListener("keydown",oe),()=>document.removeEventListener("keydown",oe)},[a]),it.useEffect(()=>{if($.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,U.current=!1)}},[$.current]),it.createElement("section",{ref:t,"aria-label":N??`${j} ${L}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},D.map((oe,ae)=>{var ue;const[se,V]=oe.split("-");return M.length?it.createElement("ol",{key:oe,dir:y==="auto"?Xj():y,tabIndex:-1,ref:$,className:u,"data-sonner-toaster":!0,"data-sonner-theme":Z,"data-y-position":se,"data-x-position":V,style:{"--front-toast-height":`${((ue=I[0])==null?void 0:ue.height)||0}px`,"--width":`${BCn}px`,"--gap":`${x}px`,...k,...GCn(h,f)},onBlur:ne=>{U.current&&!ne.currentTarget.contains(ne.relatedTarget)&&(U.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||U.current||(U.current=!0,F.current=ne.relatedTarget)},onMouseEnter:()=>q(!0),onMouseMove:()=>q(!0),onMouseLeave:()=>{Q||q(!1)},onDragEnd:()=>q(!1),onPointerDown:ne=>{ne.target instanceof HTMLElement&&ne.target.dataset.dismissible==="false"||K(!0)},onPointerUp:()=>K(!1)},M.filter(ne=>!ne.position&&ae===0||ne.position===oe).map((ne,ce)=>{var he,me;return it.createElement(UCn,{key:ne.id,icons:C,index:ce,toast:ne,defaultRichColors:m,duration:(he=b==null?void 0:b.duration)!=null?he:w,className:b==null?void 0:b.className,descriptionClassName:b==null?void 0:b.descriptionClassName,invert:s,visibleToasts:v,closeButton:(me=b==null?void 0:b.closeButton)!=null?me:c,interacting:Q,position:oe,style:b==null?void 0:b.style,unstyled:b==null?void 0:b.unstyled,classNames:b==null?void 0:b.classNames,cancelButtonStyle:b==null?void 0:b.cancelButtonStyle,actionButtonStyle:b==null?void 0:b.actionButtonStyle,closeButtonAriaLabel:b==null?void 0:b.closeButtonAriaLabel,removeToast:H,toasts:M.filter(Ae=>Ae.position==ne.position),heights:I.filter(Ae=>Ae.position==ne.position),setHeights:B,expandByDefault:o,gap:x,expanded:G,swipeDirections:n.swipeDirections})})):null}))});function KCn(e){const[n]=c$();return _.jsx(VCn,{theme:n,...e})}function Zt(e,n,t){DCn[n](e,{duration:n==="warning"||n==="error"?1/0:5e3,position:"top-center",closeButton:!0,...t})}function FS({content:e,children:n,className:t}){const r=T.useRef(null),s=T.useRef(null);function i(){const o=r.current,c=s.current;if(!o||!c)return;c.matches(":popover-open")||c.showPopover();const u=o.getBoundingClientRect(),h=c.getBoundingClientRect(),f=Math.max(8,Math.min(u.left+u.width/2-h.width/2,window.innerWidth-h.width-8));c.style.left=`${f}px`,c.style.top=`${Math.max(8,u.top-h.height-6)}px`}function a(){var o,c;(o=r.current)!=null&&o.matches(":hover, :focus")||(c=s.current)==null||c.hidePopover()}return T.useEffect(()=>{const o=()=>{var c;return(c=s.current)==null?void 0:c.hidePopover()};return window.addEventListener("scroll",o,!0),window.addEventListener("resize",o),()=>{window.removeEventListener("scroll",o,!0),window.removeEventListener("resize",o)}},[]),_.jsxs("span",{ref:r,className:zs("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:0,role:"img","aria-label":e,onMouseEnter:i,onMouseLeave:a,onFocus:i,onBlur:a,onKeyDown:o=>{var c;o.key==="Escape"&&((c=s.current)!=null&&c.matches(":popover-open"))&&(o.preventDefault(),o.stopPropagation(),s.current.hidePopover())},children:[n,_.jsx("span",{ref:s,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 WCn=["button:not([disabled])","input:not([disabled])","textarea:not([disabled])","[tabindex]"].map(e=>`${e}:not([tabindex="-1"])`).join(", ");function Dm(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(WCn)];(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(),h=u[0],f=u.at(-1);!h||!f?(c.preventDefault(),s.focus()):c.shiftKey&&document.activeElement===h?(c.preventDefault(),f.focus()):!c.shiftKey&&document.activeElement===f&&(c.preventDefault(),h.focus())};return document.addEventListener("keydown",o,!0),()=>{document.removeEventListener("keydown",o,!0),i==null||i.focus()}},[e,t])}function E$({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?IEt():sNt({count:Jt(n.activeTurnCount)})),n.pendingPermissionCount>0&&c.push(n.pendingPermissionCount===1?lEt():w9t({count:Jt(n.pendingPermissionCount)})),o>0&&c.push(o===1?kEt():UEt({count:Jt(o)})),n.queuedMessageCount>0&&c.push(n.queuedMessageCount===1?AEt():YEt({count:Jt(n.queuedMessageCount)})),n.activeRunCount>0&&c.push(n.activeRunCount===1?mEt():q9t({count:Jt(n.activeRunCount)})),Dm(a,s),ii.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:L9t({host:Ce(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:nEt()}),_.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(De,{disabled:r,onClick:s,children:df()}),_.jsx(De,{variant:"danger",disabled:r,onClick:i,children:r?_Nt():j9t()})]})]})}),document.body)}/** * @license lucide-react v1.23.0 - ISC * * This source code is licensed under the ISC license. @@ -103,515 +103,515 @@ ${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 uCn=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/** + */const QCn=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 _Cn=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,t,r)=>r?r.toUpperCase():t.toLowerCase());/** + */const XCn=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 Xj=e=>{const n=_Cn(e);return n.charAt(0).toUpperCase()+n.slice(1)};/** + */const Yj=e=>{const n=XCn(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 kw={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 ww={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 fCn=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},dCn=T.createContext({}),hCn=()=>T.useContext(dCn),pCn=T.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>{const{size:u=24,strokeWidth:h=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:m=""}=hCn()??{},w=r??f?Number(t??h)*24/Number(n??u):t??h;return T.createElement("svg",{ref:c,...kw,width:n??u??kw.width,height:n??u??kw.height,stroke:e??p,strokeWidth:w,className:N$("lucide",m,s),...!i&&!fCn(o)&&{"aria-hidden":"true"},...o},[...a.map(([k,v])=>T.createElement(k,v)),...Array.isArray(i)?i:[i]])});/** + */const YCn=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0;return!1},ZCn=T.createContext({}),JCn=()=>T.useContext(ZCn),e7n=T.forwardRef(({color:e,size:n,strokeWidth:t,absoluteStrokeWidth:r,className:s="",children:i,iconNode:a,...o},c)=>{const{size:u=24,strokeWidth:h=2,absoluteStrokeWidth:f=!1,color:p="currentColor",className:m=""}=JCn()??{},w=r??f?Number(t??h)*24/Number(n??u):t??h;return T.createElement("svg",{ref:c,...ww,width:n??u??ww.width,height:n??u??ww.height,stroke:e??p,strokeWidth:w,className:N$("lucide",m,s),...!i&&!YCn(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 ct=(e,n)=>{const t=T.forwardRef(({className:r,...s},i)=>T.createElement(pCn,{ref:i,iconNode:n,className:N$(`lucide-${uCn(Xj(e))}`,`lucide-${e}`,r),...s}));return t.displayName=Xj(e),t};/** + */const ct=(e,n)=>{const t=T.forwardRef(({className:r,...s},i)=>T.createElement(e7n,{ref:i,iconNode:n,className:N$(`lucide-${QCn(Yj(e))}`,`lucide-${e}`,r),...s}));return t.displayName=Yj(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 mCn=[["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"}]],gCn=ct("archive",mCn);/** + */const t7n=[["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"}]],n7n=ct("archive",t7n);/** * @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=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],bCn=ct("arrow-down",vCn);/** + */const r7n=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],s7n=ct("arrow-down",r7n);/** * @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 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],B0=ct("arrow-left",yCn);/** + */const i7n=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],B0=ct("arrow-left",i7n);/** * @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=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],sv=ct("arrow-right",xCn);/** + */const a7n=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],sv=ct("arrow-right",a7n);/** * @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 wCn=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],kCn=ct("arrow-up-right",wCn);/** + */const o7n=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],c7n=ct("arrow-up-right",o7n);/** * @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:"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"}]],z$=ct("blocks",SCn);/** + */const l7n=[["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"}]],z$=ct("blocks",l7n);/** * @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 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"}]],j$=ct("book-open",CCn);/** + */const u7n=[["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"}]],j$=ct("book-open",u7n);/** * @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 ECn=[["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"}]],NCn=ct("calendar-days",ECn);/** + */const _7n=[["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"}]],f7n=ct("calendar-days",_7n);/** * @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:"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"}]],jCn=ct("chart-spline",zCn);/** + */const d7n=[["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"}]],h7n=ct("chart-spline",d7n);/** * @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:"M20 6 9 17l-5-5",key:"1gmf2c"}]],bi=ct("check",ACn);/** + */const p7n=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yi=ct("check",p7n);/** * @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:"m6 9 6 6 6-6",key:"qrunsl"}]],mc=ct("chevron-down",TCn);/** + */const m7n=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],mc=ct("chevron-down",m7n);/** * @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 RCn=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],A$=ct("chevron-left",RCn);/** + */const g7n=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],A$=ct("chevron-left",g7n);/** * @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 MCn=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ka=ct("chevron-right",MCn);/** + */const v7n=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Va=ct("chevron-right",v7n);/** * @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=[["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"}]],HS=ct("circle-alert",OCn);/** + */const b7n=[["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"}]],HS=ct("circle-alert",b7n);/** * @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=[["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"}]],LCn=ct("circle-question-mark",DCn);/** + */const y7n=[["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"}]],x7n=ct("circle-question-mark",y7n);/** * @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 ICn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],T$=ct("circle-stop",ICn);/** + */const w7n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["rect",{x:"9",y:"9",width:"6",height:"6",rx:"1",key:"1ssd4o"}]],T$=ct("circle-stop",w7n);/** * @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=[["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"}]],R$=ct("circle-x",$Cn);/** + */const k7n=[["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"}]],R$=ct("circle-x",k7n);/** * @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 BCn=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],PCn=ct("clock-3",BCn);/** + */const S7n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6h4",key:"135r8i"}]],C7n=ct("clock-3",S7n);/** * @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=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],HCn=ct("clock",FCn);/** + */const E7n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 6v6l4 2",key:"mmk7yg"}]],N7n=ct("clock",E7n);/** * @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 qCn=[["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"}]],UCn=ct("cloud-upload",qCn);/** + */const z7n=[["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"}]],j7n=ct("cloud-upload",z7n);/** * @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:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],f5=ct("code",GCn);/** + */const A7n=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],_5=ct("code",A7n);/** * @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=[["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"}]],Yu=ct("copy",KCn);/** + */const T7n=[["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"}]],Zu=ct("copy",T7n);/** * @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=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],M$=ct("corner-down-left",VCn);/** + */const R7n=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],M$=ct("corner-down-left",R7n);/** * @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 WCn=[["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"}]],qS=ct("cpu",WCn);/** + */const M7n=[["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"}]],qS=ct("cpu",M7n);/** * @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 QCn=[["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"}]],Wb=ct("download",QCn);/** + */const O7n=[["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"}]],Kb=ct("download",O7n);/** * @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:"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"}]],Lm=ct("ellipsis",XCn);/** + */const D7n=[["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"}]],Lm=ct("ellipsis",D7n);/** * @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:"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"}]],mf=ct("external-link",YCn);/** + */const L7n=[["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"}]],mf=ct("external-link",L7n);/** * @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:"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"}]],O$=ct("file-code",ZCn);/** + */const I7n=[["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"}]],O$=ct("file-code",I7n);/** * @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 JCn=[["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"}]],e7n=ct("file-output",JCn);/** + */const $7n=[["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"}]],B7n=ct("file-output",$7n);/** * @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 t7n=[["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"}]],Qb=ct("file-text",t7n);/** + */const P7n=[["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"}]],Wb=ct("file-text",P7n);/** * @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 n7n=[["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"}]],Ah=ct("flask-conical",n7n);/** + */const F7n=[["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"}]],Ah=ct("flask-conical",F7n);/** * @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 r7n=[["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"}]],s7n=ct("fold-vertical",r7n);/** + */const H7n=[["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"}]],q7n=ct("fold-vertical",H7n);/** * @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 i7n=[["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"}]],D$=ct("folder-git-2",i7n);/** + */const U7n=[["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"}]],D$=ct("folder-git-2",U7n);/** * @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 a7n=[["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"}]],Pu=ct("folder-open",a7n);/** + */const G7n=[["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"}]],Fu=ct("folder-open",G7n);/** * @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 o7n=[["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"}]],c7n=ct("folder-plus",o7n);/** + */const V7n=[["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"}]],K7n=ct("folder-plus",V7n);/** * @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 l7n=[["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"}]],Xb=ct("folder-tree",l7n);/** + */const W7n=[["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"}]],Qb=ct("folder-tree",W7n);/** * @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 u7n=[["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"}]],_7n=ct("funnel",u7n);/** + */const Q7n=[["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"}]],X7n=ct("funnel",Q7n);/** * @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 f7n=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],d7n=ct("gauge",f7n);/** + */const Y7n=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Z7n=ct("gauge",Y7n);/** * @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 h7n=[["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"}]],Im=ct("git-branch",h7n);/** + */const J7n=[["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"}]],Im=ct("git-branch",J7n);/** * @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 p7n=[["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"}]],m7n=ct("git-commit-horizontal",p7n);/** + */const e8n=[["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"}]],t8n=ct("git-commit-horizontal",e8n);/** * @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 g7n=[["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"}]],L$=ct("goal",g7n);/** + */const n8n=[["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"}]],L$=ct("goal",n8n);/** * @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 v7n=[["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"}]],b7n=ct("globe",v7n);/** + */const r8n=[["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"}]],s8n=ct("globe",r8n);/** * @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 y7n=[["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"}]],I$=ct("history",y7n);/** + */const i8n=[["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"}]],I$=ct("history",i8n);/** * @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 x7n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],US=ct("info",x7n);/** + */const a8n=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],US=ct("info",a8n);/** * @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 w7n=[["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"}]],k7n=ct("laptop",w7n);/** + */const o8n=[["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"}]],c8n=ct("laptop",o8n);/** * @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 S7n=[["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"}]],C7n=ct("lightbulb",S7n);/** + */const l8n=[["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"}]],u8n=ct("lightbulb",l8n);/** * @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 E7n=[["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"}]],$$=ct("link-2",E7n);/** + */const _8n=[["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"}]],$$=ct("link-2",_8n);/** * @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 N7n=[["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"}]],z7n=ct("list-checks",N7n);/** + */const f8n=[["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"}]],d8n=ct("list-checks",f8n);/** * @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 j7n=[["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"}]],Yj=ct("lock",j7n);/** + */const h8n=[["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"}]],Zj=ct("lock",h8n);/** * @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 A7n=[["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"}]],T7n=ct("maximize-2",A7n);/** + */const p8n=[["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"}]],m8n=ct("maximize-2",p8n);/** * @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 R7n=[["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"}]],B$=ct("message-square-quote",R7n);/** + */const g8n=[["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"}]],B$=ct("message-square-quote",g8n);/** * @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 M7n=[["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"}]],P0=ct("messages-square",M7n);/** + */const v8n=[["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"}]],P0=ct("messages-square",v8n);/** * @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 O7n=[["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"}]],D7n=ct("minimize-2",O7n);/** + */const b8n=[["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"}]],y8n=ct("minimize-2",b8n);/** * @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 L7n=[["path",{d:"M5 12h14",key:"1ays0h"}]],I7n=ct("minus",L7n);/** + */const x8n=[["path",{d:"M5 12h14",key:"1ays0h"}]],w8n=ct("minus",x8n);/** * @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 $7n=[["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"}]],B7n=ct("monitor",$7n);/** + */const k8n=[["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"}]],S8n=ct("monitor",k8n);/** * @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 P7n=[["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"}]],F7n=ct("moon",P7n);/** + */const C8n=[["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"}]],E8n=ct("moon",C8n);/** * @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 H7n=[["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"}]],q7n=ct("mouse-pointer-click",H7n);/** + */const N8n=[["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"}]],z8n=ct("mouse-pointer-click",N8n);/** * @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 U7n=[["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"}]],GS=ct("package",U7n);/** + */const j8n=[["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"}]],GS=ct("package",j8n);/** * @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 G7n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],P$=ct("panel-left",G7n);/** + */const A8n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],P$=ct("panel-left",A8n);/** * @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 K7n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],F$=ct("panel-right",K7n);/** + */const T8n=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],F$=ct("panel-right",T8n);/** * @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 V7n=[["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"}]],W7n=ct("paperclip",V7n);/** + */const R8n=[["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"}]],M8n=ct("paperclip",R8n);/** * @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 Q7n=[["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"}]],KS=ct("pencil",Q7n);/** + */const O8n=[["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"}]],VS=ct("pencil",O8n);/** * @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 X7n=[["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"}]],Y7n=ct("play",X7n);/** + */const D8n=[["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"}]],L8n=ct("play",D8n);/** * @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 Z7n=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Qh=ct("plus",Z7n);/** + */const I8n=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Qh=ct("plus",I8n);/** * @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 J7n=[["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"}]],Va=ct("refresh-cw",J7n);/** + */const $8n=[["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"}]],Ka=ct("refresh-cw",$8n);/** * @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 e8n=[["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"}]],t8n=ct("rotate-cw",e8n);/** + */const B8n=[["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"}]],P8n=ct("rotate-cw",B8n);/** * @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 n8n=[["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"}]],VS=ct("scroll-text",n8n);/** + */const F8n=[["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"}]],KS=ct("scroll-text",F8n);/** * @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 r8n=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],H$=ct("search",r8n);/** + */const H8n=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],H$=ct("search",H8n);/** * @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 s8n=[["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"}]],Zj=ct("server",s8n);/** + */const q8n=[["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"}]],Jj=ct("server",q8n);/** * @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 i8n=[["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"}]],WS=ct("settings",i8n);/** + */const U8n=[["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"}]],WS=ct("settings",U8n);/** * @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 a8n=[["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"}]],q$=ct("sliders-horizontal",a8n);/** + */const G8n=[["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"}]],q$=ct("sliders-horizontal",G8n);/** * @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 o8n=[["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"}]],c8n=ct("square-pen",o8n);/** + */const V8n=[["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"}]],K8n=ct("square-pen",V8n);/** * @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 l8n=[["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"}]],Mf=ct("square-terminal",l8n);/** + */const W8n=[["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"}]],Mf=ct("square-terminal",W8n);/** * @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 u8n=[["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"}]],_8n=ct("sun",u8n);/** + */const Q8n=[["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"}]],X8n=ct("sun",Q8n);/** * @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 f8n=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],bo=ct("terminal",f8n);/** + */const Y8n=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],bo=ct("terminal",Y8n);/** * @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 d8n=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],h8n=ct("toggle-right",d8n);/** + */const Z8n=[["circle",{cx:"15",cy:"12",r:"3",key:"1afu0r"}],["rect",{width:"20",height:"14",x:"2",y:"5",rx:"7",key:"g7kal2"}]],J8n=ct("toggle-right",Z8n);/** * @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 p8n=[["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"}]],Of=ct("trash-2",p8n);/** + */const e9n=[["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"}]],Of=ct("trash-2",e9n);/** * @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 m8n=[["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"}]],QS=ct("triangle-alert",m8n);/** + */const t9n=[["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"}]],QS=ct("triangle-alert",t9n);/** * @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 g8n=[["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"}]],v8n=ct("upload",g8n);/** + */const n9n=[["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"}]],r9n=ct("upload",n9n);/** * @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 b8n=[["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"}]],XS=ct("users",b8n);/** + */const s9n=[["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"}]],XS=ct("users",s9n);/** * @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 y8n=[["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"}]],x8n=ct("wand-sparkles",y8n);/** + */const i9n=[["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"}]],a9n=ct("wand-sparkles",i9n);/** * @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 w8n=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xr=ct("x",w8n);/** + */const o9n=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],xr=ct("x",o9n);/** * @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 k8n=[["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"}]],S8n=ct("zap",k8n);function Lu(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const C8n=["settings","harnesses","projects","compute","instances","environment","git","storage"],E8n=e=>C8n.some(n=>n===e),Df=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),$i=e=>typeof e=="string"&&e.length>0,p1=e=>e==null||$i(e);function YS(e){if(!Df(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")&&$i(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&p1(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...$i(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&$i(e.path)&&p1(e.sessionId)&&p1(e.ref)&&p1(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}:{},...$i(e.sessionId)?{sessionId:e.sessionId}:{},...$i(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...$i(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&$i(e.experimentId)&&$i(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")&&$i(e.sessionId)&&$i(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&$i(e.sessionId)&&$i(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};break;case"side":if(n("kind","sessionId")&&$i(e.sessionId))return{kind:"side",sessionId:e.sessionId}}}function gf(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"&&E8n(r)?{kind:"settings",projectId:t,section:r}:null:null}function Yb(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=gf(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(!YS(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function iv(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const Jj=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function U$(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 h=i;i=!1;try{await e(u,h),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 Sw={exports:{}},eA;function N8n(){return eA||(eA=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"))),h=window.getComputedStyle(this._terminal.element),f=c-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),p=u-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.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})()))})(Sw)),Sw.exports}var z8n=N8n(),Cw={exports:{}},tA;function j8n(){return tA||(tA=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function c(h){try{const f=new URL(h),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 h.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(h,f,p,m={}){this._terminal=h,this._regex=f,this._handler=p,this._options=m}provideLinks(h,f){const p=u.computeLink(h,this._regex,this._terminal,this._handler);f(this._addCallbacks(p))}_addCallbacks(h){return h.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,b]=u._getWindowedLineStrings(f-1,m),y=v.join("");let x;const C=[];for(;x=k.exec(y);){const N=x[0];if(!c(N))continue;const[j,A]=u._mapStrIdx(m,b,0,x.index),[z,M]=u._mapStrIdx(m,j,A,N.length);if(j===-1||A===-1||z===-1||M===-1)continue;const D={start:{x:A+1,y:j+1},end:{x:M,y:z+1}};C.push({range:D,text:N,activate:w})}return C}static _getWindowedLineStrings(f,p){let m,w=f,k=f,v=0,b="";const y=[];if(m=p.buffer.active.getLine(f)){const x=m.translateToString(!0);if(m.isWrapped&&x[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--w))&&v<2048&&(b=m.translateToString(!0),v+=b.length,y.push(b),m.isWrapped&&b.indexOf(" ")===-1););y.reverse()}for(y.push(x),v=0;(m=p.buffer.active.getLine(++k))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,y.push(b),b.indexOf(" ")===-1););}return[y,w]}static _mapStrIdx(f,p,m,w){const k=f.buffer.active,v=k.getNullCell();let b=m;for(;w;){const y=k.getLine(p);if(!y)return[-1,-1];for(let x=b;x{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(h,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(h=u,f={}){this._handler=h,this._options=f}activate(h){this._terminal=h;const f=this._options,p=f.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,f))}dispose(){var h;(h=this._linkProvider)==null||h.dispose()}}})(),i})()))})(Cw)),Cw.exports}var A8n=j8n(),Ew={exports:{}},nA;function T8n(){return nA||(nA=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,c){var u=this&&this.__decorate||function(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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 b=o.AccessibilityManager=class extends m.Disposable{constructor(y,x,C,N){super(),this._terminal=y,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 j=0;jthis._handleBoundaryFocus(j,0),this._bottomBoundaryFocusListener=j=>this._handleBoundaryFocus(j,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((j=>this._handleResize(j.rows)))),this.register(this._terminal.onRender((j=>this._refreshRows(j.start,j.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((j=>this._handleChar(j)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` + */const c9n=[["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"}]],l9n=ct("zap",c9n);function Lu(e,n){return e&&Object.hasOwn(e.tasks,n)?e.tasks[n]:void 0}const u9n=["settings","harnesses","projects","compute","instances","environment","git","storage"],_9n=e=>u9n.some(n=>n===e),Df=e=>typeof e=="object"&&e!==null&&!Array.isArray(e),$i=e=>typeof e=="string"&&e.length>0,p1=e=>e==null||$i(e);function YS(e){if(!Df(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")&&$i(e.experimentId)&&(e.view==="overview"||e.view==="terminal")&&p1(e.runId))return{kind:"experiment",experimentId:e.experimentId,view:e.view,...$i(e.runId)?{runId:e.runId}:{}};break;case"file":if(n("kind","path","source","sessionId","ref","line","branchLabel")&&$i(e.path)&&p1(e.sessionId)&&p1(e.ref)&&p1(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}:{},...$i(e.sessionId)?{sessionId:e.sessionId}:{},...$i(e.ref)?{ref:e.ref}:{},...typeof e.line=="number"?{line:e.line}:{},...$i(e.branchLabel)?{branchLabel:e.branchLabel}:{}};break;case"code":if(n("kind","experimentId","branch","view")&&$i(e.experimentId)&&$i(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")&&$i(e.sessionId)&&$i(e.promptId))return{kind:"plan",sessionId:e.sessionId,promptId:e.promptId};break;case"subagent":if(n("kind","sessionId","spawnPartId")&&$i(e.sessionId)&&$i(e.spawnPartId))return{kind:"subagent",sessionId:e.sessionId,spawnPartId:e.spawnPartId};break;case"side":if(n("kind","sessionId")&&$i(e.sessionId))return{kind:"side",sessionId:e.sessionId}}}function gf(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"&&_9n(r)?{kind:"settings",projectId:t,section:r}:null:null}function Xb(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=gf(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(!YS(JSON.parse(i.get("pane")??"")))return null}catch{return null}return e}function iv(e,n,t){const r=`/projects/${encodeURIComponent(e)}/tasks/${n?encodeURIComponent(n):"new"}`;return t?`${r}?${new URLSearchParams({pane:JSON.stringify(t)})}`:r}const eA=()=>({version:1,lastTaskId:null,lastLocation:null,tasks:{}});function U$(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 h=i;i=!1;try{await e(u,h),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 kw={exports:{}},tA;function f9n(){return tA||(tA=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"))),h=window.getComputedStyle(this._terminal.element),f=c-(parseInt(h.getPropertyValue("padding-top"))+parseInt(h.getPropertyValue("padding-bottom"))),p=u-(parseInt(h.getPropertyValue("padding-right"))+parseInt(h.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})()))})(kw)),kw.exports}var d9n=f9n(),Sw={exports:{}},nA;function h9n(){return nA||(nA=1,(function(e,n){(function(t,r){e.exports=r()})(self,(()=>(()=>{var t={6:(a,o)=>{function c(h){try{const f=new URL(h),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 h.toLocaleLowerCase().startsWith(p.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(h,f,p,m={}){this._terminal=h,this._regex=f,this._handler=p,this._options=m}provideLinks(h,f){const p=u.computeLink(h,this._regex,this._terminal,this._handler);f(this._addCallbacks(p))}_addCallbacks(h){return h.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,b]=u._getWindowedLineStrings(f-1,m),y=v.join("");let x;const C=[];for(;x=k.exec(y);){const N=x[0];if(!c(N))continue;const[j,A]=u._mapStrIdx(m,b,0,x.index),[z,M]=u._mapStrIdx(m,j,A,N.length);if(j===-1||A===-1||z===-1||M===-1)continue;const D={start:{x:A+1,y:j+1},end:{x:M,y:z+1}};C.push({range:D,text:N,activate:w})}return C}static _getWindowedLineStrings(f,p){let m,w=f,k=f,v=0,b="";const y=[];if(m=p.buffer.active.getLine(f)){const x=m.translateToString(!0);if(m.isWrapped&&x[0]!==" "){for(v=0;(m=p.buffer.active.getLine(--w))&&v<2048&&(b=m.translateToString(!0),v+=b.length,y.push(b),m.isWrapped&&b.indexOf(" ")===-1););y.reverse()}for(y.push(x),v=0;(m=p.buffer.active.getLine(++k))&&m.isWrapped&&v<2048&&(b=m.translateToString(!0),v+=b.length,y.push(b),b.indexOf(" ")===-1););}return[y,w]}static _mapStrIdx(f,p,m,w){const k=f.buffer.active,v=k.getNullCell();let b=m;for(;w;){const y=k.getLine(p);if(!y)return[-1,-1];for(let x=b;x{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(h,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(h=u,f={}){this._handler=h,this._options=f}activate(h){this._terminal=h;const f=this._options,p=f.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,p,this._handler,f))}dispose(){var h;(h=this._linkProvider)==null||h.dispose()}}})(),i})()))})(Sw)),Sw.exports}var p9n=h9n(),Cw={exports:{}},rA;function m9n(){return rA||(rA=1,(function(e,n){(function(t,r){e.exports=r()})(globalThis,(()=>(()=>{var t={4567:function(a,o,c){var u=this&&this.__decorate||function(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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 b=o.AccessibilityManager=class extends m.Disposable{constructor(y,x,C,N){super(),this._terminal=y,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 j=0;jthis._handleBoundaryFocus(j,0),this._bottomBoundaryFocusListener=j=>this._handleBoundaryFocus(j,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((j=>this._handleResize(j.rows)))),this.register(this._terminal.onRender((j=>this._refreshRows(j.start,j.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((j=>this._handleChar(j)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(` `)))),this.register(this._terminal.onA11yTab((j=>this._handleTab(j)))),this.register(this._terminal.onKey((j=>this._handleKey(j.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(y){for(let x=0;x0?this._charsToConsume.shift()!==y&&(this._charsToAnnounce+=y):this._charsToAnnounce+=y,y===` -`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=f.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(y){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(y)||this._charsToConsume.push(y)}_refreshRows(y,x){this._liveRegionDebouncer.refresh(y,x,this._terminal.rows)}_renderRows(y,x){const C=this._terminal.buffer,N=C.lines.length.toString();for(let j=y;j<=x;j++){const A=C.lines.get(C.ydisp+j),z=[],M=(A==null?void 0:A.translateToString(!0,void 0,void 0,z))||"",D=(C.ydisp+j+1).toString(),I=this._rowElements[j];I&&(M.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=M,this._rowColumns.set(I,z)),I.setAttribute("aria-posinset",D),I.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(y,x){const C=y.target,N=this._rowElements[x===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(x===0?"1":`${this._terminal.buffer.lines.length}`)||y.relatedTarget!==N)return;let j,A;if(x===0?(j=C,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(j=this._rowElements.shift(),A=C,this._rowContainer.removeChild(j)),j.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),x===0){const z=this._createAccessibilityTreeNode();this._rowElements.unshift(z),this._rowContainer.insertAdjacentElement("afterbegin",z)}else{const z=this._createAccessibilityTreeNode();this._rowElements.push(z),this._rowContainer.appendChild(z)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(x===0?-1:1),this._rowElements[x===0?1:this._rowElements.length-2].focus(),y.preventDefault(),y.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const y=document.getSelection();if(!y)return;if(y.isCollapsed)return void(this._rowContainer.contains(y.anchorNode)&&this._terminal.clearSelection());if(!y.anchorNode||!y.focusNode)return void console.error("anchorNode and/or focusNode are null");let x={node:y.anchorNode,offset:y.anchorOffset},C={node:y.focusNode,offset:y.focusOffset};if((x.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||x.node===C.node&&x.offset>C.offset)&&([x,C]=[C,x]),x.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(x={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(x.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 j=({node:D,offset:I})=>{const B=D instanceof Text?D.parentNode:D;let G=parseInt(B==null?void 0:B.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;const U=this._rowColumns.get(B);if(!U)return console.warn("columns is null. Race condition?"),null;let Q=I=this._terminal.cols&&(++G,Q=0),{row:G,column:Q}},A=j(x),z=j(C);if(A&&z){if(A.row>z.row||A.row===z.row&&A.column>=z.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(z.row-A.row)*this._terminal.cols-A.column+z.column)}}_handleResize(y){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let x=this._rowContainer.children.length;xy;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const y=this._coreBrowserService.mainDocument.createElement("div");return y.setAttribute("role","listitem"),y.tabIndex=-1,this._refreshRowDimensions(y),y}_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 y=0;y{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function h(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,b=p.clientY-k.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}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&&h(p.clipboardData.getData("text/plain"),m,w,k)},o.paste=h,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(h,f,p){this._css.set(h,f,p)}getCss(h,f){return this._css.get(h,f)}setColor(h,f,p){this._color.set(h,f,p)}getColor(h,f){return this._color.get(h,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,h,f){c.addEventListener(u,h,f);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,h,f))}}}},3551:function(a,o,c){var u=this&&this.__decorate||function(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(b,y,x,C,N){super(),this._element=b,this._mouseService=y,this._renderService=x,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 j;this._lastMouseEvent=void 0,(j=this._activeProviderReplies)==null||j.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(b){this._lastMouseEvent=b;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!y)return;this._isMouseOut=!1;const x=b.composedPath();for(let C=0;C{j==null||j.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let x=!1;for(const[j,A]of this._linkProviderService.linkProviders.entries())y?(N=this._activeProviderReplies)!=null&&N.get(j)&&(x=this._checkLinkProviderResult(j,b,x)):A.provideLinks(b.y,(z=>{var D,I;if(this._isMouseOut)return;const M=z==null?void 0:z.map((B=>({link:B})));(D=this._activeProviderReplies)==null||D.set(j,M),x=this._checkLinkProviderResult(j,b,x),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,y){const x=new Set;for(let C=0;Cb?this._bufferService.cols:A.link.range.end.x;for(let D=z;D<=M;D++){if(x.has(D)){N.splice(j--,1);break}x.add(D)}}}}_checkLinkProviderResult(b,y,x){var j;if(!this._activeProviderReplies)return x;const C=this._activeProviderReplies.get(b);let N=!1;for(let A=0;Athis._linkAtPosition(z.link,y)));A&&(x=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!x)for(let A=0;Athis._linkAtPosition(M.link,y)));if(z){x=!0,this._handleNewLink(z);break}}return x}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);y&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,y)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,y){this._currentLink&&this._lastMouseEvent&&(!b||!y||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=y)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._linkAtPosition(b.link,y)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var x,C;return(C=(x=this._currentLink)==null?void 0:x.state)==null?void 0:C.decorations.pointerCursor},set:x=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==x&&(this._currentLink.state.decorations.pointerCursor=x,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",x))}},underline:{get:()=>{var x,C;return(C=(x=this._currentLink)==null?void 0:x.state)==null?void 0:C.decorations.underline},set:x=>{var C,N,j;(C=this._currentLink)!=null&&C.state&&((j=(N=this._currentLink)==null?void 0:N.state)==null?void 0:j.decorations.underline)!==x&&(this._currentLink.state.decorations.underline=x,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,x))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((x=>{if(!this._currentLink)return;const C=x.start===0?0:x.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+x.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(C,N),this._lastMouseEvent)){const j=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);j&&this._askForLink(j,!1)}}))))}_linkHover(b,y,x){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),y.hover&&y.hover(x,y.text)}_fireUnderlineEvent(b,y){const x=b.range,C=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(x.start.x-1,x.start.y-C-1,x.end.x,x.end.y-C-1,void 0);(y?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(b,y,x){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),y.leave&&y.leave(x,y.text)}_linkAtPosition(b,y){const x=b.range.start.y*this._bufferService.cols+b.range.start.x,C=b.range.end.y*this._bufferService.cols+b.range.end.x,N=y.y*this._bufferService.cols+y.x;return x<=N&&N<=C}_positionFromMouseEvent(b,y,x){const C=x.getCoords(b,y,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,y,x,C,N){return{x1:b,y1:y,x2:x,y2:C,cols:this._bufferService.cols,fg:N}}};o.Linkifier=v=u([h(1,k.IMouseService),h(2,k.IRenderService),h(3,w.IBufferService),h(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,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b){this._bufferService=k,this._optionsService=v,this._oscLinkService=b}provideLinks(k,v){var M;const b=this._bufferService.buffer.lines.get(k-1);if(!b)return void v(void 0);const y=[],x=this._optionsService.rawOptions.linkHandler,C=new f.CellData,N=b.getTrimmedLength();let j=-1,A=-1,z=!1;for(let D=0;Dx?x.activate(U,Q,B):w(0,Q),hover:(U,Q)=>{var V;return(V=x==null?void 0:x.hover)==null?void 0:V.call(x,U,Q,B)},leave:(U,Q)=>{var V;return(V=x==null?void 0:x.leave)==null?void 0:V.call(x,U,Q,B)}})}z=!1,C.hasExtendedAttrs()&&C.extended.urlId?(A=D,j=C.extended.urlId):(A=-1,j=-1)}}v(y)}};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(y){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(y)||this._charsToConsume.push(y)}_refreshRows(y,x){this._liveRegionDebouncer.refresh(y,x,this._terminal.rows)}_renderRows(y,x){const C=this._terminal.buffer,N=C.lines.length.toString();for(let j=y;j<=x;j++){const A=C.lines.get(C.ydisp+j),z=[],M=(A==null?void 0:A.translateToString(!0,void 0,void 0,z))||"",D=(C.ydisp+j+1).toString(),I=this._rowElements[j];I&&(M.length===0?(I.innerText=" ",this._rowColumns.set(I,[0,1])):(I.textContent=M,this._rowColumns.set(I,z)),I.setAttribute("aria-posinset",D),I.setAttribute("aria-setsize",N))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(y,x){const C=y.target,N=this._rowElements[x===0?1:this._rowElements.length-2];if(C.getAttribute("aria-posinset")===(x===0?"1":`${this._terminal.buffer.lines.length}`)||y.relatedTarget!==N)return;let j,A;if(x===0?(j=C,A=this._rowElements.pop(),this._rowContainer.removeChild(A)):(j=this._rowElements.shift(),A=C,this._rowContainer.removeChild(j)),j.removeEventListener("focus",this._topBoundaryFocusListener),A.removeEventListener("focus",this._bottomBoundaryFocusListener),x===0){const z=this._createAccessibilityTreeNode();this._rowElements.unshift(z),this._rowContainer.insertAdjacentElement("afterbegin",z)}else{const z=this._createAccessibilityTreeNode();this._rowElements.push(z),this._rowContainer.appendChild(z)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(x===0?-1:1),this._rowElements[x===0?1:this._rowElements.length-2].focus(),y.preventDefault(),y.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const y=document.getSelection();if(!y)return;if(y.isCollapsed)return void(this._rowContainer.contains(y.anchorNode)&&this._terminal.clearSelection());if(!y.anchorNode||!y.focusNode)return void console.error("anchorNode and/or focusNode are null");let x={node:y.anchorNode,offset:y.anchorOffset},C={node:y.focusNode,offset:y.focusOffset};if((x.node.compareDocumentPosition(C.node)&Node.DOCUMENT_POSITION_PRECEDING||x.node===C.node&&x.offset>C.offset)&&([x,C]=[C,x]),x.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(x={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(x.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 j=({node:D,offset:I})=>{const B=D instanceof Text?D.parentNode:D;let G=parseInt(B==null?void 0:B.getAttribute("aria-posinset"),10)-1;if(isNaN(G))return console.warn("row is invalid. Race condition?"),null;const q=this._rowColumns.get(B);if(!q)return console.warn("columns is null. Race condition?"),null;let Q=I=this._terminal.cols&&(++G,Q=0),{row:G,column:Q}},A=j(x),z=j(C);if(A&&z){if(A.row>z.row||A.row===z.row&&A.column>=z.column)throw new Error("invalid range");this._terminal.select(A.column,A.row,(z.row-A.row)*this._terminal.cols-A.column+z.column)}}_handleResize(y){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let x=this._rowContainer.children.length;xy;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const y=this._coreBrowserService.mainDocument.createElement("div");return y.setAttribute("role","listitem"),y.tabIndex=-1,this._refreshRowDimensions(y),y}_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 y=0;y{function c(p){return p.replace(/\r?\n/g,"\r")}function u(p,m){return m?"\x1B[200~"+p+"\x1B[201~":p}function h(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,b=p.clientY-k.top-10;m.style.width="20px",m.style.height="20px",m.style.left=`${v}px`,m.style.top=`${b}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&&h(p.clipboardData.getData("text/plain"),m,w,k)},o.paste=h,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(h,f,p){this._css.set(h,f,p)}getCss(h,f){return this._css.get(h,f)}setColor(h,f,p){this._color.set(h,f,p)}getColor(h,f){return this._color.get(h,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,h,f){c.addEventListener(u,h,f);let p=!1;return{dispose:()=>{p||(p=!0,c.removeEventListener(u,h,f))}}}},3551:function(a,o,c){var u=this&&this.__decorate||function(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(b,y,x,C,N){super(),this._element=b,this._mouseService=y,this._renderService=x,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 j;this._lastMouseEvent=void 0,(j=this._activeProviderReplies)==null||j.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(b){this._lastMouseEvent=b;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);if(!y)return;this._isMouseOut=!1;const x=b.composedPath();for(let C=0;C{j==null||j.forEach((A=>{A.link.dispose&&A.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=b.y);let x=!1;for(const[j,A]of this._linkProviderService.linkProviders.entries())y?(N=this._activeProviderReplies)!=null&&N.get(j)&&(x=this._checkLinkProviderResult(j,b,x)):A.provideLinks(b.y,(z=>{var D,I;if(this._isMouseOut)return;const M=z==null?void 0:z.map((B=>({link:B})));(D=this._activeProviderReplies)==null||D.set(j,M),x=this._checkLinkProviderResult(j,b,x),((I=this._activeProviderReplies)==null?void 0:I.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(b.y,this._activeProviderReplies)}))}_removeIntersectingLinks(b,y){const x=new Set;for(let C=0;Cb?this._bufferService.cols:A.link.range.end.x;for(let D=z;D<=M;D++){if(x.has(D)){N.splice(j--,1);break}x.add(D)}}}}_checkLinkProviderResult(b,y,x){var j;if(!this._activeProviderReplies)return x;const C=this._activeProviderReplies.get(b);let N=!1;for(let A=0;Athis._linkAtPosition(z.link,y)));A&&(x=!0,this._handleNewLink(A))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!x)for(let A=0;Athis._linkAtPosition(M.link,y)));if(z){x=!0,this._handleNewLink(z);break}}return x}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(b){if(!this._currentLink)return;const y=this._positionFromMouseEvent(b,this._element,this._mouseService);y&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,y)&&this._currentLink.link.activate(b,this._currentLink.link.text)}_clearCurrentLink(b,y){this._currentLink&&this._lastMouseEvent&&(!b||!y||this._currentLink.link.range.start.y>=b&&this._currentLink.link.range.end.y<=y)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,m.disposeArray)(this._linkCacheDisposables))}_handleNewLink(b){if(!this._lastMouseEvent)return;const y=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);y&&this._linkAtPosition(b.link,y)&&(this._currentLink=b,this._currentLink.state={decorations:{underline:b.link.decorations===void 0||b.link.decorations.underline,pointerCursor:b.link.decorations===void 0||b.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,b.link,this._lastMouseEvent),b.link.decorations={},Object.defineProperties(b.link.decorations,{pointerCursor:{get:()=>{var x,C;return(C=(x=this._currentLink)==null?void 0:x.state)==null?void 0:C.decorations.pointerCursor},set:x=>{var C;(C=this._currentLink)!=null&&C.state&&this._currentLink.state.decorations.pointerCursor!==x&&(this._currentLink.state.decorations.pointerCursor=x,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",x))}},underline:{get:()=>{var x,C;return(C=(x=this._currentLink)==null?void 0:x.state)==null?void 0:C.decorations.underline},set:x=>{var C,N,j;(C=this._currentLink)!=null&&C.state&&((j=(N=this._currentLink)==null?void 0:N.state)==null?void 0:j.decorations.underline)!==x&&(this._currentLink.state.decorations.underline=x,this._currentLink.state.isHovered&&this._fireUnderlineEvent(b.link,x))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((x=>{if(!this._currentLink)return;const C=x.start===0?0:x.start+1+this._bufferService.buffer.ydisp,N=this._bufferService.buffer.ydisp+1+x.end;if(this._currentLink.link.range.start.y>=C&&this._currentLink.link.range.end.y<=N&&(this._clearCurrentLink(C,N),this._lastMouseEvent)){const j=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);j&&this._askForLink(j,!1)}}))))}_linkHover(b,y,x){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!0),this._currentLink.state.decorations.pointerCursor&&b.classList.add("xterm-cursor-pointer")),y.hover&&y.hover(x,y.text)}_fireUnderlineEvent(b,y){const x=b.range,C=this._bufferService.buffer.ydisp,N=this._createLinkUnderlineEvent(x.start.x-1,x.start.y-C-1,x.end.x,x.end.y-C-1,void 0);(y?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(N)}_linkLeave(b,y,x){var C;(C=this._currentLink)!=null&&C.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(y,!1),this._currentLink.state.decorations.pointerCursor&&b.classList.remove("xterm-cursor-pointer")),y.leave&&y.leave(x,y.text)}_linkAtPosition(b,y){const x=b.range.start.y*this._bufferService.cols+b.range.start.x,C=b.range.end.y*this._bufferService.cols+b.range.end.x,N=y.y*this._bufferService.cols+y.x;return x<=N&&N<=C}_positionFromMouseEvent(b,y,x){const C=x.getCoords(b,y,this._bufferService.cols,this._bufferService.rows);if(C)return{x:C[0],y:C[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(b,y,x,C,N){return{x1:b,y1:y,x2:x,y2:C,cols:this._bufferService.cols,fg:N}}};o.Linkifier=v=u([h(1,k.IMouseService),h(2,k.IRenderService),h(3,w.IBufferService),h(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,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b){this._bufferService=k,this._optionsService=v,this._oscLinkService=b}provideLinks(k,v){var M;const b=this._bufferService.buffer.lines.get(k-1);if(!b)return void v(void 0);const y=[],x=this._optionsService.rawOptions.linkHandler,C=new f.CellData,N=b.getTrimmedLength();let j=-1,A=-1,z=!1;for(let D=0;Dx?x.activate(q,Q,B):w(0,Q),hover:(q,Q)=>{var K;return(K=x==null?void 0:x.hover)==null?void 0:K.call(x,q,Q,B)},leave:(q,Q)=>{var K;return(K=x==null?void 0:x.leave)==null?void 0:K.call(x,q,Q,B)}})}z=!1,C.hasExtendedAttrs()&&C.extended.urlId?(A=D,j=C.extended.urlId):(A=-1,j=-1)}}v(y)}};function w(k,v){if(confirm(`Do you want to navigate to ${v}? -WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([h(0,p.IBufferService),h(1,p.IOptionsService),h(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,h){this._rowCount=h,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),h=c(3656),f=c(3551),p=c(9042),m=c(3730),w=c(1680),k=c(3107),v=c(5744),b=c(2950),y=c(1296),x=c(428),C=c(4269),N=c(5114),j=c(8934),A=c(3230),z=c(9312),M=c(4725),D=c(6731),I=c(8055),B=c(8969),G=c(8460),U=c(844),Q=c(6114),V=c(8437),Z=c(2584),J=c(7399),$=c(5941),L=c(9074),q=c(2585),P=c(5435),F=c(4567),re=c(779);class ie 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(se={}){super(se),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new U.MutableDisposable),this._onCursorMove=this.register(new G.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new G.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new G.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new G.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new G.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new G.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new G.EventEmitter),this._onBlur=this.register(new G.EventEmitter),this._onA11yCharEmitter=this.register(new G.EventEmitter),this._onA11yTabEmitter=this.register(new G.EventEmitter),this._onWillOpen=this.register(new G.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(q.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(re.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(((K,oe)=>this.refresh(K,oe)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((K=>this._reportWindowsOptions(K)))),this.register(this._inputHandler.onColor((K=>this._handleColorEvent(K)))),this.register((0,G.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,G.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((K=>this._afterResize(K.cols,K.rows)))),this.register((0,U.toDisposable)((()=>{var K,oe;this._customKeyEventHandler=void 0,(oe=(K=this.element)==null?void 0:K.parentNode)==null||oe.removeChild(this.element)})))}_handleColorEvent(se){if(this._themeService)for(const K of se){let oe,ce="";switch(K.index){case 256:oe="foreground",ce="10";break;case 257:oe="background",ce="11";break;case 258:oe="cursor",ce="12";break;default:oe="ansi",ce="4;"+K.index}switch(K.type){case 0:const pe=I.color.toColorRGB(oe==="ansi"?this._themeService.colors.ansi[K.index]:this._themeService.colors[oe]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${ce};${(0,$.toRgbString)(pe)}${Z.C1_ESCAPED.ST}`);break;case 1:if(oe==="ansi")this._themeService.modifyColors((ve=>ve.ansi[K.index]=I.channels.toColor(...K.color)));else{const ve=oe;this._themeService.modifyColors((Me=>Me[ve]=I.channels.toColor(...K.color)))}break;case 2:this._themeService.restoreColor(K.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(se){se?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(F.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var se;return(se=this.textarea)==null?void 0:se.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 se=this.buffer.ybase+this.buffer.y,K=this.buffer.lines.get(se);if(!K)return;const oe=Math.min(this.buffer.x,this.cols-1),ce=this._renderService.dimensions.css.cell.height,pe=K.getWidth(oe),ve=this._renderService.dimensions.css.cell.width*pe,Me=this.buffer.y*this._renderService.dimensions.css.cell.height,Fe=oe*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Fe+"px",this.textarea.style.top=Me+"px",this.textarea.style.width=ve+"px",this.textarea.style.height=ce+"px",this.textarea.style.lineHeight=ce+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",(K=>{this.hasSelection()&&(0,u.copyHandler)(K,this._selectionService)})));const se=K=>(0,u.handlePasteEvent)(K,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",se)),this.register((0,h.addDisposableDomListener)(this.element,"paste",se)),Q.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(K=>{K.button===2&&(0,u.rightClickHandler)(K,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",(K=>{(0,u.rightClickHandler)(K,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",(K=>{K.button===1&&(0,u.moveTextAreaUnderMouseCursor)(K,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",(se=>this._keyUp(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",(se=>this._keyDown(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",(se=>this._keyPress(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",(se=>this._compositionHelper.compositionupdate(se)))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,h.addDisposableDomListener)(this.textarea,"input",(se=>this._inputEvent(se)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(se){var oe;if(!se)throw new Error("Terminal requires a parent element.");if(se.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((oe=this.element)==null?void 0:oe.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=se.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"),se.appendChild(this.element);const K=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),K.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,h.addDisposableDomListener)(this.screenElement,"mousemove",(ce=>this.updateCursorStyle(ce)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),K.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,se.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",(ce=>this._handleTextAreaFocus(ce)))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(x.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((ce=>this._onRender.fire(ce)))),this.onResize((ce=>this._renderService.resize(ce.cols,ce.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(j.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(K);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((ce=>this.scrollLines(ce.amount,ce.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(z.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ce=>this.scrollLines(ce.amount,ce.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ce=>this._renderService.handleSelectionChanged(ce.start,ce.end,ce.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ce=>{this.textarea.value=ce,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ce=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(ce=>this._selectionService.handleMouseDown(ce)))),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(F.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ce=>this._handleScreenReaderModeOptionChange(ce)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ce=>{!this._overviewRulerRenderer&&ce&&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(y.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const se=this,K=this.element;function oe(ve){const Me=se._mouseService.getMouseReportCoords(ve,se.screenElement);if(!Me)return!1;let Fe,Ye;switch(ve.overrideType||ve.type){case"mousemove":Ye=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":Ye=0,Fe=ve.button<3?ve.button:3;break;case"mousedown":Ye=1,Fe=ve.button<3?ve.button:3;break;case"wheel":if(se._customWheelEventHandler&&se._customWheelEventHandler(ve)===!1||se.viewport.getLinesScrolled(ve)===0)return!1;Ye=ve.deltaY<0?0:1,Fe=4;break;default:return!1}return!(Ye===void 0||Fe===void 0||Fe>4)&&se.coreMouseService.triggerMouseEvent({col:Me.col,row:Me.row,x:Me.x,y:Me.y,button:Fe,action:Ye,ctrl:ve.ctrlKey,alt:ve.altKey,shift:ve.shiftKey})}const ce={mouseup:null,wheel:null,mousedrag:null,mousemove:null},pe={mouseup:ve=>(oe(ve),ve.buttons||(this._document.removeEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.removeEventListener("mousemove",ce.mousedrag)),this.cancel(ve)),wheel:ve=>(oe(ve),this.cancel(ve,!0)),mousedrag:ve=>{ve.buttons&&oe(ve)},mousemove:ve=>{ve.buttons||oe(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?ce.mousemove||(K.addEventListener("mousemove",pe.mousemove),ce.mousemove=pe.mousemove):(K.removeEventListener("mousemove",ce.mousemove),ce.mousemove=null),16&ve?ce.wheel||(K.addEventListener("wheel",pe.wheel,{passive:!1}),ce.wheel=pe.wheel):(K.removeEventListener("wheel",ce.wheel),ce.wheel=null),2&ve?ce.mouseup||(ce.mouseup=pe.mouseup):(this._document.removeEventListener("mouseup",ce.mouseup),ce.mouseup=null),4&ve?ce.mousedrag||(ce.mousedrag=pe.mousedrag):(this._document.removeEventListener("mousemove",ce.mousedrag),ce.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(K,"mousedown",(ve=>{if(ve.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(ve))return oe(ve),ce.mouseup&&this._document.addEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.addEventListener("mousemove",ce.mousedrag),this.cancel(ve)}))),this.register((0,h.addDisposableDomListener)(K,"wheel",(ve=>{if(!ce.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(ve)===!1)return!1;if(!this.buffer.hasScrollback){const Me=this.viewport.getLinesScrolled(ve);if(Me===0)return;const Fe=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(ve.deltaY<0?"A":"B");let Ye="";for(let Te=0;Te{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(ve),this.cancel(ve)}),{passive:!0})),this.register((0,h.addDisposableDomListener)(K,"touchmove",(ve=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(ve)?void 0:this.cancel(ve)}),{passive:!1}))}refresh(se,K){var oe;(oe=this._renderService)==null||oe.refreshRows(se,K)}updateCursorStyle(se){var K;(K=this._selectionService)!=null&&K.shouldColumnSelect(se)?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(se,K,oe=0){var ce;oe===1?(super.scrollLines(se,K,oe),this.refresh(0,this.rows-1)):(ce=this.viewport)==null||ce.scrollLines(se)}paste(se){(0,u.paste)(se,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(se){this._customKeyEventHandler=se}attachCustomWheelEventHandler(se){this._customWheelEventHandler=se}registerLinkProvider(se){return this._linkProviderService.registerLinkProvider(se)}registerCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const K=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),K}deregisterCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(se)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(se){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+se)}registerDecoration(se){return this._decorationService.registerDecoration(se)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(se,K,oe){this._selectionService.setSelection(se,K,oe)}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 se;(se=this._selectionService)==null||se.clearSelection()}selectAll(){var se;(se=this._selectionService)==null||se.selectAll()}selectLines(se,K){var oe;(oe=this._selectionService)==null||oe.selectLines(se,K)}_keyDown(se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;const K=this.browser.isMac&&this.options.macOptionIsMeta&&se.altKey;if(!K&&!this._compositionHelper.keydown(se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;K||se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const oe=(0,J.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),oe.type===3||oe.type===2){const ce=this.rows-1;return this.scrollLines(oe.type===2?-ce:ce),this.cancel(se,!0)}return oe.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(oe.cancel&&this.cancel(se,!0),!oe.key||!!(se.key&&!se.ctrlKey&&!se.altKey&&!se.metaKey&&se.key.length===1&&se.key.charCodeAt(0)>=65&&se.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(oe.key!==Z.C0.ETX&&oe.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:oe.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(oe.key,!0),!this.optionsService.rawOptions.screenReaderMode||se.altKey||se.ctrlKey?this.cancel(se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(se,K){const oe=se.isMac&&!this.options.macOptionIsMeta&&K.altKey&&!K.ctrlKey&&!K.metaKey||se.isWindows&&K.altKey&&K.ctrlKey&&!K.metaKey||se.isWindows&&K.getModifierState("AltGraph");return K.type==="keypress"?oe:oe&&(!K.keyCode||K.keyCode>47)}_keyUp(se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||((function(K){return K.keyCode===16||K.keyCode===17||K.keyCode===18})(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)}_keyPress(se){let K;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)K=se.charCode;else if(se.which===null||se.which===void 0)K=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;K=se.which}return!(!K||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(K=String.fromCharCode(K),this._onKey.fire({key:K,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(K,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(se){if(se.data&&se.inputType==="insertText"&&(!se.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const K=se.data;return this.coreService.triggerDataEvent(K,!0),this.cancel(se),!0}return!1}resize(se,K){se!==this.cols||K!==this.rows?super.resize(se,K):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(se,K){var oe,ce;(oe=this._charSizeService)==null||oe.measure(),(ce=this.viewport)==null||ce.syncScrollArea(!0)}clear(){var se;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 K=1;K{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,h){this._rowCount=h,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(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(b,y,x,C,N,j,A,z){super(),this._viewportElement=b,this._scrollArea=y,this._bufferService=x,this._optionsService=C,this._charSizeService=N,this._renderService=j,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(z.colors),this.register(z.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.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(b){if(b)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 y=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==y&&(this._lastRecordedBufferHeight=y,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){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 y=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:y,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<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(b,y){const x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(y<0&&this._viewportElement.scrollTop!==0||y>0&&x0&&(x=B),C=""}}return{bufferElements:N,cursorElement:x}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let y=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(y/=this._currentRowHeight+0,this._wheelPartialScroll+=y,y=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(y*=this._bufferService.rows),y}_applyScrollModifier(b,y){const x=this._optionsService.rawOptions.fastScrollModifier;return x==="alt"&&y.altKey||x==="ctrl"&&y.ctrlKey||x==="shift"&&y.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const y=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,y!==0&&(this._viewportElement.scrollTop+=y,this._bubbleScroll(b,y))}};o.Viewport=v=u([h(2,k.IBufferService),h(3,k.IOptionsService),h(4,p.ICharSizeService),h(5,p.IRenderService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],v)},3107:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b,y,x){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=b,this._decorationService=y,this._renderService=x,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 y;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((y=k==null?void 0:k.options)==null?void 0:y.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 b=k.options.x??0;return b&&b>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 b=this._decorationElements.get(k);b||(b=this._createElement(k),k.element=b,this._decorationElements.set(k,b),this._container.appendChild(b),k.onDispose((()=>{this._decorationElements.delete(k),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(b)}}_refreshXPosition(k,v=k.element){if(!v)return;const b=k.options.x??0;(k.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*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([h(1,m.IBufferService),h(2,f.ICoreBrowserService),h(3,m.IDecorationService),h(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,h){return u>=c.startBufferLine-this._linePadding[h||"full"]&&u<=c.endBufferLine+this._linePadding[h||"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(x,C,N,j){var A,z=arguments.length,M=z<3?C:j===null?j=Object.getOwnPropertyDescriptor(C,N):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,C,N,j);else for(var D=x.length-1;D>=0;D--)(A=x[D])&&(M=(z<3?A(M):z>3?A(C,N,M):A(C,N))||M);return z>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(x,C){return function(N,j){C(N,j,x)}};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},b={full:0,left:0,center:0,right:0};let y=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(x,C,N,j,A,z,M){var I;super(),this._viewportElement=x,this._screenElement=C,this._bufferService=N,this._decorationService=j,this._renderService=A,this._optionsService=z,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(),(I=this._viewportElement.parentElement)==null||I.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 x=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=x,v.center=C,v.right=x,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const x=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(x,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 x=this._colorZoneStore.zones;for(const C of x)C.position!=="full"&&this._renderColorZone(C);for(const C of x)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(x){this._ctx.fillStyle=x.color,this._ctx.fillRect(b[x.position||"full"],Math.round((this._canvas.height-1)*(x.startBufferLine/this._bufferService.buffers.active.lines.length)-k[x.position||"full"]/2),v[x.position||"full"],Math.round((this._canvas.height-1)*((x.endBufferLine-x.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[x.position||"full"]))}_queueRefresh(x,C){this._shouldUpdateDimensions=x||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=y=u([h(2,w.IBufferService),h(3,w.IDecorationService),h(4,p.IRenderService),h(5,w.IOptionsService),h(6,p.ICoreBrowserService)],y)},2950:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b,y,x,C){this._textarea=k,this._compositionView=v,this._bufferService=b,this._optionsService=y,this._coreService=x,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 b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!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,b=v.replace(k,"");this._dataAlreadySent=b,v.length>k.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=w=u([h(2,p.IBufferService),h(3,p.IOptionsService),h(4,p.ICoreService),h(5,f.IRenderService)],w)},9806:(a,o)=>{function c(u,h,f){const p=f.getBoundingClientRect(),m=u.getComputedStyle(f),w=parseInt(m.getPropertyValue("padding-left")),k=parseInt(m.getPropertyValue("padding-top"));return[h.clientX-p.left-w,h.clientY-p.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(u,h,f,p,m,w,k,v,b){if(!w)return;const y=c(u,h,f);return y?(y[0]=Math.ceil((y[0]+(b?k/2:0))/k),y[1]=Math.ceil(y[1]/v),y[0]=Math.min(Math.max(y[0],1),p+(b?1:0)),y[1]=Math.min(Math.max(y[1],1),m),y):void 0}},9504:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=c(2584);function h(v,b,y,x){const C=v-f(v,y),N=b-f(b,y),j=Math.abs(C-N)-(function(A,z,M){let D=0;const I=A-f(A,M),B=z-f(z,M);for(let G=0;G=0&&vb?"A":"B"}function m(v,b,y,x,C,N){let j=v,A=b,z="";for(;j!==y||A!==x;)j+=C?1:-1,C&&j>N.cols-1?(z+=N.buffer.translateBufferLineToString(A,!1,v,j),j=0,v=0,A++):!C&&j<0&&(z+=N.buffer.translateBufferLineToString(A,!1,0,v+1),j=N.cols-1,v=j,A--);return z+N.buffer.translateBufferLineToString(A,!1,v,j)}function w(v,b){const y=b?"O":"[";return u.C0.ESC+y+v}function k(v,b){v=Math.floor(v);let y="";for(let x=0;x0?I-f(I,B):M;const Q=I,V=(function(Z,J,$,L,q,P){let F;return F=h($,L,q,P).length>0?L-f(L,q):J,Z<$&&F<=L||Z>=$&&Fv?"D":"C",k(Math.abs(C-v),w(j,x));j=N>b?"D":"C";const A=Math.abs(N-b);return k((function(z,M){return M.cols-z})(N>b?v:C,y)+(A-1)*y.cols+1+((N>b?C:v)-1),w(j,x))}},1296:function(a,o,c){var u=this&&this.__decorate||function(G,U,Q,V){var Z,J=arguments.length,$=J<3?U:V===null?V=Object.getOwnPropertyDescriptor(U,Q):V;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(G,U,Q,V);else for(var L=G.length-1;L>=0;L--)(Z=G[L])&&($=(J<3?Z($):J>3?Z(U,Q,$):Z(U,Q))||$);return J>3&&$&&Object.defineProperty(U,Q,$),$},h=this&&this.__param||function(G,U){return function(Q,V){U(Q,V,G)}};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),b=c(8055),y=c(8460),x=c(844),C=c(2585),N="xterm-dom-renderer-owner-",j="xterm-rows",A="xterm-fg-",z="xterm-bg-",M="xterm-focus",D="xterm-selection";let I=1,B=o.DomRenderer=class extends x.Disposable{constructor(G,U,Q,V,Z,J,$,L,q,P,F,re,ie){super(),this._terminal=G,this._document=U,this._element=Q,this._screenElement=V,this._viewportElement=Z,this._helperContainer=J,this._linkifier2=$,this._charSizeService=q,this._optionsService=P,this._bufferService=F,this._coreBrowserService=re,this._themeService=ie,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new y.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(j),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((ue=>this._injectCss(ue)))),this._injectCss(this._themeService.colors),this._rowFactory=L.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((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),this.register((0,x.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 G=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*G,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*G),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/G),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/G),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 U=`${this._terminalSelector} .${j} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=U,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(G){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let U=`${this._terminalSelector} .${j} { color: ${G.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;U+=`${this._terminalSelector} .${j} .xterm-dim { color: ${b.color.multiplyOpacity(G.foreground,.5).css};}`,U+=`${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}`,V=`blink_bar_${this._terminalClass}`,Z=`blink_block_${this._terminalClass}`;U+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,U+=`@keyframes ${V} { 50% { box-shadow: none; }}`,U+=`@keyframes ${Z} { 0% { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css}; } 50% { background-color: inherit; color: ${G.cursor.css}; }}`,U+=`${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${V} 1s step-end infinite;}${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css};}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${G.cursor.css} !important; color: ${G.cursorAccent.css} !important;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${G.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${G.cursor.css} inset;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${G.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,U+=`${this._terminalSelector} .${D} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${D} div { position: absolute; background-color: ${G.selectionBackgroundOpaque.css};}${this._terminalSelector} .${D} div { position: absolute; background-color: ${G.selectionInactiveBackgroundOpaque.css};}`;for(const[J,$]of G.ansi.entries())U+=`${this._terminalSelector} .${A}${J} { color: ${$.css}; }${this._terminalSelector} .${A}${J}.xterm-dim { color: ${b.color.multiplyOpacity($,.5).css}; }${this._terminalSelector} .${z}${J} { background-color: ${$.css}; }`;U+=`${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(G.background).css}; }${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(G.background),.5).css}; }${this._terminalSelector} .${z}${m.INVERTED_DEFAULT_COLOR} { background-color: ${G.foreground.css}; }`,this._themeStyleElement.textContent=U}_setDefaultSpacing(){const G=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${G}px`,this._rowFactory.defaultSpacing=G}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(G,U){for(let Q=this._rowElements.length;Q<=U;Q++){const V=this._document.createElement("div");this._rowContainer.appendChild(V),this._rowElements.push(V)}for(;this._rowElements.length>U;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(G,U){this._refreshRowElements(G,U),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(G,U,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(G,U,Q),this.renderRows(0,this._bufferService.rows-1),!G||!U)return;this._selectionRenderModel.update(this._terminal,G,U,Q);const V=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,$=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||$<0)return;const L=this._document.createDocumentFragment();if(Q){const q=G[0]>U[0];L.appendChild(this._createSelectionElement(J,q?U[0]:G[0],q?G[0]:U[0],$-J+1))}else{const q=V===J?G[0]:0,P=J===Z?U[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(J,q,P));const F=$-J-1;if(L.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,F)),J!==$){const re=Z===$?U[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement($,0,re))}}this._selectionContainer.appendChild(L)}_createSelectionElement(G,U,Q,V=1){const Z=this._document.createElement("div"),J=U*this.dimensions.css.cell.width;let $=this.dimensions.css.cell.width*(Q-U);return J+$>this.dimensions.css.canvas.width&&($=this.dimensions.css.canvas.width-J),Z.style.height=V*this.dimensions.css.cell.height+"px",Z.style.top=G*this.dimensions.css.cell.height+"px",Z.style.left=`${J}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 G of this._rowElements)G.replaceChildren()}renderRows(G,U){const Q=this._bufferService.buffer,V=Q.ybase+Q.y,Z=Math.min(Q.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let q=G;q<=U;q++){const P=q+Q.ydisp,F=this._rowElements[q],re=Q.lines.get(P);if(!F||!re)break;F.replaceChildren(...this._rowFactory.createRow(re,P,P===V,$,L,Z,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!0)}_handleLinkLeave(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!1)}_setCellUnderline(G,U,Q,V,Z,J){Q<0&&(G=0),V<0&&(U=0);const $=this._bufferService.rows-1;Q=Math.max(Math.min(Q,$),0),V=Math.max(Math.min(V,$),0),Z=Math.min(Z,this._bufferService.cols);const L=this._bufferService.buffer,q=L.ybase+L.y,P=Math.min(L.x,Z-1),F=this._optionsService.rawOptions.cursorBlink,re=this._optionsService.rawOptions.cursorStyle,ie=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=Q;ue<=V;++ue){const se=ue+L.ydisp,K=this._rowElements[ue],oe=L.lines.get(se);if(!K||!oe)break;K.replaceChildren(...this._rowFactory.createRow(oe,se,se===q,re,ie,P,F,this.dimensions.css.cell.width,this._widthCache,J?ue===Q?G:0:-1,J?(ue===V?U:Z)-1:-1))}}};o.DomRenderer=B=u([h(7,C.IInstantiationService),h(8,v.ICharSizeService),h(9,C.IOptionsService),h(10,C.IBufferService),h(11,v.ICoreBrowserService),h(12,v.IThemeService)],B)},3787:function(a,o,c){var u=this&&this.__decorate||function(j,A,z,M){var D,I=arguments.length,B=I<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,z):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(j,A,z,M);else for(var G=j.length-1;G>=0;G--)(D=j[G])&&(B=(I<3?D(B):I>3?D(A,z,B):D(A,z))||B);return I>3&&B&&Object.defineProperty(A,z,B),B},h=this&&this.__param||function(j,A){return function(z,M){A(z,M,j)}};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),b=c(4269),y=c(6171),x=c(3734);let C=o.DomRendererRowFactory=class{constructor(j,A,z,M,D,I,B){this._document=j,this._characterJoinerService=A,this._optionsService=z,this._coreBrowserService=M,this._coreService=D,this._decorationService=I,this._themeService=B,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(j,A,z){this._selectionStart=j,this._selectionEnd=A,this._columnSelectMode=z}createRow(j,A,z,M,D,I,B,G,U,Q,V){const Z=[],J=this._characterJoinerService.getJoinedCharacters(A),$=this._themeService.colors;let L,q=j.getNoBgTrimmedLength();z&&q0&&Me===J[0][0]){Ye=!0;const Ut=J.shift();$e=new b.JoinedCellData(this._workCell,j.translateToString(!0,Ut[0],Ut[1]),Ut[1]-Ut[0]),Te=Ut[1]-1,Fe=$e.getWidth()}const yt=this._isCellInSelection(Me,A),ot=z&&Me===I,Mt=ve&&Me>=Q&&Me<=V;let jt=!1;this._decorationService.forEachDecorationAtCell(Me,A,void 0,(Ut=>{jt=!0}));let Pt=$e.getChars()||p.WHITESPACE_CELL_CHAR;if(Pt===" "&&($e.isUnderline()||$e.isOverline())&&(Pt=" "),ce=Fe*G-U.get(Pt,$e.isBold(),$e.isItalic()),L){if(P&&(yt&&oe||!yt&&!oe&&$e.bg===re)&&(yt&&oe&&$.selectionForeground||$e.fg===ie)&&$e.extended.ext===ue&&Mt===se&&ce===K&&!ot&&!Ye&&!jt){$e.isInvisible()?F+=p.WHITESPACE_CELL_CHAR:F+=Pt,P++;continue}P&&(L.textContent=F),L=this._document.createElement("span"),P=0,F=""}else L=this._document.createElement("span");if(re=$e.bg,ie=$e.fg,ue=$e.extended.ext,se=Mt,K=ce,oe=yt,Ye&&I>=Me&&I<=Te&&(I=Me),!this._coreService.isCursorHidden&&ot&&this._coreService.isCursorInitialized){if(pe.push("xterm-cursor"),this._coreBrowserService.isFocused)B&&pe.push("xterm-cursor-blink"),pe.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(D)switch(D){case"outline":pe.push("xterm-cursor-outline");break;case"block":pe.push("xterm-cursor-block");break;case"bar":pe.push("xterm-cursor-bar");break;case"underline":pe.push("xterm-cursor-underline")}}if($e.isBold()&&pe.push("xterm-bold"),$e.isItalic()&&pe.push("xterm-italic"),$e.isDim()&&pe.push("xterm-dim"),F=$e.isInvisible()?p.WHITESPACE_CELL_CHAR:$e.getChars()||p.WHITESPACE_CELL_CHAR,$e.isUnderline()&&(pe.push(`xterm-underline-${$e.extended.underlineStyle}`),F===" "&&(F=" "),!$e.isUnderlineColorDefault()))if($e.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${x.AttributeData.toColorRGB($e.getUnderlineColor()).join(",")})`;else{let Ut=$e.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&$e.isBold()&&Ut<8&&(Ut+=8),L.style.textDecorationColor=$.ansi[Ut].css}$e.isOverline()&&(pe.push("xterm-overline"),F===" "&&(F=" ")),$e.isStrikethrough()&&pe.push("xterm-strikethrough"),Mt&&(L.style.textDecoration="underline");let Le=$e.getFgColor(),nt=$e.getFgColorMode(),ke=$e.getBgColor(),me=$e.getBgColorMode();const je=!!$e.isInverse();if(je){const Ut=Le;Le=ke,ke=Ut;const Xt=nt;nt=me,me=Xt}let qe,rt,dt,st=!1;switch(this._decorationService.forEachDecorationAtCell(Me,A,void 0,(Ut=>{Ut.options.layer!=="top"&&st||(Ut.backgroundColorRGB&&(me=50331648,ke=Ut.backgroundColorRGB.rgba>>8&16777215,qe=Ut.backgroundColorRGB),Ut.foregroundColorRGB&&(nt=50331648,Le=Ut.foregroundColorRGB.rgba>>8&16777215,rt=Ut.foregroundColorRGB),st=Ut.options.layer==="top")})),!st&&yt&&(qe=this._coreBrowserService.isFocused?$.selectionBackgroundOpaque:$.selectionInactiveBackgroundOpaque,ke=qe.rgba>>8&16777215,me=50331648,st=!0,$.selectionForeground&&(nt=50331648,Le=$.selectionForeground.rgba>>8&16777215,rt=$.selectionForeground)),st&&pe.push("xterm-decoration-top"),me){case 16777216:case 33554432:dt=$.ansi[ke],pe.push(`xterm-bg-${ke}`);break;case 50331648:dt=k.channels.toColor(ke>>16,ke>>8&255,255&ke),this._addStyle(L,`background-color:#${N((ke>>>0).toString(16),"0",6)}`);break;default:je?(dt=$.foreground,pe.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):dt=$.background}switch(qe||$e.isDim()&&(qe=k.color.multiplyOpacity(dt,.5)),nt){case 16777216:case 33554432:$e.isBold()&&Le<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Le+=8),this._applyMinimumContrast(L,dt,$.ansi[Le],$e,qe,void 0)||pe.push(`xterm-fg-${Le}`);break;case 50331648:const Ut=k.channels.toColor(Le>>16&255,Le>>8&255,255&Le);this._applyMinimumContrast(L,dt,Ut,$e,qe,rt)||this._addStyle(L,`color:#${N(Le.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,dt,$.foreground,$e,qe,rt)||je&&pe.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}pe.length&&(L.className=pe.join(" "),pe.length=0),ot||Ye||jt?L.textContent=F:P++,ce!==this.defaultSpacing&&(L.style.letterSpacing=`${ce}px`),Z.push(L),Me=Te}return L&&P&&(L.textContent=F),Z}_applyMinimumContrast(j,A,z,M,D,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,y.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const B=this._getContrastCache(M);let G;if(D||I||(G=B.getColor(A.rgba,z.rgba)),G===void 0){const U=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);G=k.color.ensureContrastRatio(D||A,I||z,U),B.setColor((D||A).rgba,(I||z).rgba,G??null)}return!!G&&(this._addStyle(j,`color:${G.css}`),!0)}_getContrastCache(j){return j.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(j,A){j.setAttribute("style",`${j.getAttribute("style")||""}${A};`)}_isCellInSelection(j,A){const z=this._selectionStart,M=this._selectionEnd;return!(!z||!M)&&(this._columnSelectMode?z[0]<=M[0]?j>=z[0]&&A>=z[1]&&j=z[1]&&j>=M[0]&&A<=M[1]:A>z[1]&&A=z[0]&&j=z[0])}};function N(j,A,z){for(;j.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 h=c.createElement("span");h.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=[h,f,p,m],this._container.appendChild(h),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,h,f){c===this._font&&u===this._fontSize&&h===this._weight&&f===this._weightBold||(this._font=c,this._fontSize=u,this._weight=h,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(c,u,h){let f=0;if(!u&&!h&&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"),h&&(p+="I");let m=this._holey.get(p);if(m===void 0){let w=0;u&&(w|=1),h&&(w|=2),m=this._measure(c,w),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const h=this._measureElements[u];return h.textContent=c.repeat(32),h.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(h){return 57508<=h&&h<=57558}function u(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=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(h){if(!h)throw new Error("value must not be falsy");return h},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},o.isEmoji=u,o.allowRescaling=function(h,f,p,m){return f===1&&p>Math.ceil(1.5*m)&&h!==void 0&&h>255&&!u(h)&&!c(h)&&!(function(w){return 57344<=w&&w<=63743})(h)},o.treatGlyphAsBackgroundColor=function(h){return c(h)||(function(f){return 9472<=f&&f<=9631})(h)},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(h,f,p=0){return(h-(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(h,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=h.buffers.active.ydisp,k=f[1]-w,v=p[1]-w,b=Math.max(k,0),y=Math.min(v,h.rows-1);b>=h.rows||y<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=y,this.startCol=f[0],this.endCol=p[0])}isCellSelected(h,f,p){return!!this.hasSelection&&(p-=h.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(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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(y,x,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 b(this._optionsService))}catch{this._measureStrategy=this.register(new v(y,x,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const y=this._measureStrategy.measure();y.width===this.width&&y.height===this.height||(this.width=y.width,this.height=y.height,this._onCharSizeChange.fire())}};o.CharSizeService=w=u([h(2,f.IOptionsService)],w);class k extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(x,C){x!==void 0&&x>0&&C!==void 0&&C>0&&(this._result.width=x,this._result.height=C)}}class v extends k{constructor(x,C,N){super(),this._document=x,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 b extends k{constructor(x){super(),this._optionsService=x,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 x=this._ctx.measureText("W");return this._validateAndSet(x.width,x.fontBoundingBoxAscent+x.fontBoundingBoxDescent),this._result}}},4269:function(a,o,c){var u=this&&this.__decorate||function(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(y,x,C){super(),this.content=0,this.combinedData="",this.fg=y.fg,this.bg=y.bg,this.combinedData=x,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(y){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let v=o.CharacterJoinerService=class G${constructor(y){this._bufferService=y,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(y){const x={id:this._nextCharacterJoinerId++,handler:y};return this._characterJoiners.push(x),x.id}deregister(y){for(let x=0;x1){const B=this._getJoinedRanges(N,z,A,x,j);for(let G=0;G1){const I=this._getJoinedRanges(N,z,A,x,j);for(let B=0;B{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=c(844),h=c(8460),f=c(3656);class p extends u.Disposable{constructor(k,v,b){super(),this._textarea=k,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((y=>this._screenDprMonitor.setWindow(y)))),this.register((0,h.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 h.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 h 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=h},8934:function(a,o,c){var u=this&&this.__decorate||function(w,k,v,b){var y,x=arguments.length,C=x<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(w,k,v,b);else for(var N=w.length-1;N>=0;N--)(y=w[N])&&(C=(x<3?y(C):x>3?y(k,v,C):y(k,v))||C);return x>3&&C&&Object.defineProperty(k,v,C),C},h=this&&this.__param||function(w,k){return function(v,b){k(v,b,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,b,y){return(0,p.getCoords)(window,w,k,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,y)}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([h(0,f.IRenderService),h(1,f.ICharSizeService)],m)},3230:function(a,o,c){var u=this&&this.__decorate||function(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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 b=o.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(y,x,C,N,j,A,z,M){super(),this._rowCount=y,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,I)=>this._renderRows(D,I)),z),this.register(this._renderDebouncer),this.register(z.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(j.onDecorationRegistered((()=>this._fullRefresh()))),this.register(j.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(z.window,x),this.register(z.onWindowChange((D=>this._registerIntersectionObserver(D,x))))}_registerIntersectionObserver(y,x){if("IntersectionObserver"in y){const C=new y.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(x),this._observerDisposable.value=(0,w.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(y){this._isPaused=y.isIntersecting===void 0?y.intersectionRatio===0:!y.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(y,x,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(y,x,this._rowCount))}_renderRows(y,x){this._renderer.value&&(y=Math.min(y,this._rowCount-1),x=Math.min(x,this._rowCount-1),this._renderer.value.renderRows(y,x),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:y,end:x}),this._onRender.fire({start:y,end:x}),this._isNextRenderRedrawOnly=!0)}resize(y,x){this._rowCount=x,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(y){this._renderer.value=y,this._renderer.value&&(this._renderer.value.onRequestRedraw((x=>this.refreshRows(x.start,x.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(y){return this._renderDebouncer.addRefreshCallback(y)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var y,x;this._renderer.value&&((x=(y=this._renderer.value).clearTextureAtlas)==null||x.call(y),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(y,x){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(y,x)})):this._renderer.value.handleResize(y,x),this._fullRefresh())}handleCharSizeChanged(){var y;(y=this._renderer.value)==null||y.handleCharSizeChanged()}handleBlur(){var y;(y=this._renderer.value)==null||y.handleBlur()}handleFocus(){var y;(y=this._renderer.value)==null||y.handleFocus()}handleSelectionChanged(y,x,C){var N;this._selectionState.start=y,this._selectionState.end=x,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(y,x,C)}handleCursorMove(){var y;(y=this._renderer.value)==null||y.handleCursorMove()}clear(){var y;(y=this._renderer.value)==null||y.clear()}};o.RenderService=b=u([h(2,v.IOptionsService),h(3,p.ICharSizeService),h(4,v.IDecorationService),h(5,v.IBufferService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],b)},9312:function(a,o,c){var u=this&&this.__decorate||function(z,M,D,I){var B,G=arguments.length,U=G<3?M:I===null?I=Object.getOwnPropertyDescriptor(M,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(z,M,D,I);else for(var Q=z.length-1;Q>=0;Q--)(B=z[Q])&&(U=(G<3?B(U):G>3?B(M,D,U):B(M,D))||U);return G>3&&U&&Object.defineProperty(M,D,U),U},h=this&&this.__param||function(z,M){return function(D,I){M(D,I,z)}};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),b=c(6114),y=c(4841),x=c(511),C=c(2585),N=" ",j=new RegExp(N,"g");let A=o.SelectionService=class extends v.Disposable{constructor(z,M,D,I,B,G,U,Q,V){super(),this._element=z,this._screenElement=M,this._linkifier=D,this._bufferService=I,this._coreService=B,this._mouseService=G,this._optionsService=U,this._renderService=Q,this._coreBrowserService=V,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new x.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 z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!z||!M||z[0]===M[0]&&z[1]===M[1])}get selectionText(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!z||!M)return"";const D=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(z[0]===M[0])return"";const B=z[0]B.replace(j," "))).join(b.isWindows?`\r +WARNING: This link could potentially be dangerous`)){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=v}else console.warn("Opening link blocked as opener could not be cleared")}}o.OscLinkProvider=m=u([h(0,p.IBufferService),h(1,p.IOptionsService),h(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,h){this._rowCount=h,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),h=c(3656),f=c(3551),p=c(9042),m=c(3730),w=c(1680),k=c(3107),v=c(5744),b=c(2950),y=c(1296),x=c(428),C=c(4269),N=c(5114),j=c(8934),A=c(3230),z=c(9312),M=c(4725),D=c(6731),I=c(8055),B=c(8969),G=c(8460),q=c(844),Q=c(6114),K=c(8437),Z=c(2584),J=c(7399),$=c(5941),L=c(9074),F=c(2585),U=c(5435),H=c(4567),oe=c(779);class ae 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(se={}){super(se),this.browser=Q,this._keyDownHandled=!1,this._keyDownSeen=!1,this._keyPressHandled=!1,this._unprocessedDeadKey=!1,this._accessibilityManager=this.register(new q.MutableDisposable),this._onCursorMove=this.register(new G.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onKey=this.register(new G.EventEmitter),this.onKey=this._onKey.event,this._onRender=this.register(new G.EventEmitter),this.onRender=this._onRender.event,this._onSelectionChange=this.register(new G.EventEmitter),this.onSelectionChange=this._onSelectionChange.event,this._onTitleChange=this.register(new G.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onBell=this.register(new G.EventEmitter),this.onBell=this._onBell.event,this._onFocus=this.register(new G.EventEmitter),this._onBlur=this.register(new G.EventEmitter),this._onA11yCharEmitter=this.register(new G.EventEmitter),this._onA11yTabEmitter=this.register(new G.EventEmitter),this._onWillOpen=this.register(new G.EventEmitter),this._setup(),this._decorationService=this._instantiationService.createInstance(L.DecorationService),this._instantiationService.setService(F.IDecorationService,this._decorationService),this._linkProviderService=this._instantiationService.createInstance(oe.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(((V,ne)=>this.refresh(V,ne)))),this.register(this._inputHandler.onRequestSendFocus((()=>this._reportFocus()))),this.register(this._inputHandler.onRequestReset((()=>this.reset()))),this.register(this._inputHandler.onRequestWindowsOptionsReport((V=>this._reportWindowsOptions(V)))),this.register(this._inputHandler.onColor((V=>this._handleColorEvent(V)))),this.register((0,G.forwardEvent)(this._inputHandler.onCursorMove,this._onCursorMove)),this.register((0,G.forwardEvent)(this._inputHandler.onTitleChange,this._onTitleChange)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yChar,this._onA11yCharEmitter)),this.register((0,G.forwardEvent)(this._inputHandler.onA11yTab,this._onA11yTabEmitter)),this.register(this._bufferService.onResize((V=>this._afterResize(V.cols,V.rows)))),this.register((0,q.toDisposable)((()=>{var V,ne;this._customKeyEventHandler=void 0,(ne=(V=this.element)==null?void 0:V.parentNode)==null||ne.removeChild(this.element)})))}_handleColorEvent(se){if(this._themeService)for(const V of se){let ne,ce="";switch(V.index){case 256:ne="foreground",ce="10";break;case 257:ne="background",ce="11";break;case 258:ne="cursor",ce="12";break;default:ne="ansi",ce="4;"+V.index}switch(V.type){case 0:const he=I.color.toColorRGB(ne==="ansi"?this._themeService.colors.ansi[V.index]:this._themeService.colors[ne]);this.coreService.triggerDataEvent(`${Z.C0.ESC}]${ce};${(0,$.toRgbString)(he)}${Z.C1_ESCAPED.ST}`);break;case 1:if(ne==="ansi")this._themeService.modifyColors((me=>me.ansi[V.index]=I.channels.toColor(...V.color)));else{const me=ne;this._themeService.modifyColors((Ae=>Ae[me]=I.channels.toColor(...V.color)))}break;case 2:this._themeService.restoreColor(V.index)}}}_setup(){super._setup(),this._customKeyEventHandler=void 0}get buffer(){return this.buffers.active}focus(){this.textarea&&this.textarea.focus({preventScroll:!0})}_handleScreenReaderModeOptionChange(se){se?!this._accessibilityManager.value&&this._renderService&&(this._accessibilityManager.value=this._instantiationService.createInstance(H.AccessibilityManager,this)):this._accessibilityManager.clear()}_handleTextAreaFocus(se){this.coreService.decPrivateModes.sendFocus&&this.coreService.triggerDataEvent(Z.C0.ESC+"[I"),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()}blur(){var se;return(se=this.textarea)==null?void 0:se.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 se=this.buffer.ybase+this.buffer.y,V=this.buffer.lines.get(se);if(!V)return;const ne=Math.min(this.buffer.x,this.cols-1),ce=this._renderService.dimensions.css.cell.height,he=V.getWidth(ne),me=this._renderService.dimensions.css.cell.width*he,Ae=this.buffer.y*this._renderService.dimensions.css.cell.height,Pe=ne*this._renderService.dimensions.css.cell.width;this.textarea.style.left=Pe+"px",this.textarea.style.top=Ae+"px",this.textarea.style.width=me+"px",this.textarea.style.height=ce+"px",this.textarea.style.lineHeight=ce+"px",this.textarea.style.zIndex="-5"}_initGlobal(){this._bindKeys(),this.register((0,h.addDisposableDomListener)(this.element,"copy",(V=>{this.hasSelection()&&(0,u.copyHandler)(V,this._selectionService)})));const se=V=>(0,u.handlePasteEvent)(V,this.textarea,this.coreService,this.optionsService);this.register((0,h.addDisposableDomListener)(this.textarea,"paste",se)),this.register((0,h.addDisposableDomListener)(this.element,"paste",se)),Q.isFirefox?this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(V=>{V.button===2&&(0,u.rightClickHandler)(V,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))):this.register((0,h.addDisposableDomListener)(this.element,"contextmenu",(V=>{(0,u.rightClickHandler)(V,this.textarea,this.screenElement,this._selectionService,this.options.rightClickSelectsWord)}))),Q.isLinux&&this.register((0,h.addDisposableDomListener)(this.element,"auxclick",(V=>{V.button===1&&(0,u.moveTextAreaUnderMouseCursor)(V,this.textarea,this.screenElement)})))}_bindKeys(){this.register((0,h.addDisposableDomListener)(this.textarea,"keyup",(se=>this._keyUp(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keydown",(se=>this._keyDown(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"keypress",(se=>this._keyPress(se)),!0)),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionstart",(()=>this._compositionHelper.compositionstart()))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionupdate",(se=>this._compositionHelper.compositionupdate(se)))),this.register((0,h.addDisposableDomListener)(this.textarea,"compositionend",(()=>this._compositionHelper.compositionend()))),this.register((0,h.addDisposableDomListener)(this.textarea,"input",(se=>this._inputEvent(se)),!0)),this.register(this.onRender((()=>this._compositionHelper.updateCompositionElements())))}open(se){var ne;if(!se)throw new Error("Terminal requires a parent element.");if(se.isConnected||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),((ne=this.element)==null?void 0:ne.ownerDocument.defaultView)&&this._coreBrowserService)return void(this.element.ownerDocument.defaultView!==this._coreBrowserService.window&&(this._coreBrowserService.window=this.element.ownerDocument.defaultView));this._document=se.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"),se.appendChild(this.element);const V=this._document.createDocumentFragment();this._viewportElement=this._document.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),V.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,h.addDisposableDomListener)(this.screenElement,"mousemove",(ce=>this.updateCursorStyle(ce)))),this._helperContainer=this._document.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),V.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,se.ownerDocument.defaultView??window,this._document??typeof window<"u"?window.document:null)),this._instantiationService.setService(M.ICoreBrowserService,this._coreBrowserService),this.register((0,h.addDisposableDomListener)(this.textarea,"focus",(ce=>this._handleTextAreaFocus(ce)))),this.register((0,h.addDisposableDomListener)(this.textarea,"blur",(()=>this._handleTextAreaBlur()))),this._helperContainer.appendChild(this.textarea),this._charSizeService=this._instantiationService.createInstance(x.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((ce=>this._onRender.fire(ce)))),this.onResize((ce=>this._renderService.resize(ce.cols,ce.rows))),this._compositionView=this._document.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(b.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this._mouseService=this._instantiationService.createInstance(j.MouseService),this._instantiationService.setService(M.IMouseService,this._mouseService),this.linkifier=this.register(this._instantiationService.createInstance(f.Linkifier,this.screenElement)),this.element.appendChild(V);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((ce=>this.scrollLines(ce.amount,ce.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(z.SelectionService,this.element,this.screenElement,this.linkifier)),this._instantiationService.setService(M.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines((ce=>this.scrollLines(ce.amount,ce.suppressScrollEvent)))),this.register(this._selectionService.onSelectionChange((()=>this._onSelectionChange.fire()))),this.register(this._selectionService.onRequestRedraw((ce=>this._renderService.handleSelectionChanged(ce.start,ce.end,ce.columnSelectMode)))),this.register(this._selectionService.onLinuxMouseSelection((ce=>{this.textarea.value=ce,this.textarea.focus(),this.textarea.select()}))),this.register(this._onScroll.event((ce=>{this.viewport.syncScrollArea(),this._selectionService.refresh()}))),this.register((0,h.addDisposableDomListener)(this._viewportElement,"scroll",(()=>this._selectionService.refresh()))),this.register(this._instantiationService.createInstance(k.BufferDecorationRenderer,this.screenElement)),this.register((0,h.addDisposableDomListener)(this.element,"mousedown",(ce=>this._selectionService.handleMouseDown(ce)))),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(H.AccessibilityManager,this)),this.register(this.optionsService.onSpecificOptionChange("screenReaderMode",(ce=>this._handleScreenReaderModeOptionChange(ce)))),this.options.overviewRulerWidth&&(this._overviewRulerRenderer=this.register(this._instantiationService.createInstance(v.OverviewRulerRenderer,this._viewportElement,this.screenElement))),this.optionsService.onSpecificOptionChange("overviewRulerWidth",(ce=>{!this._overviewRulerRenderer&&ce&&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(y.DomRenderer,this,this._document,this.element,this.screenElement,this._viewportElement,this._helperContainer,this.linkifier)}bindMouse(){const se=this,V=this.element;function ne(me){const Ae=se._mouseService.getMouseReportCoords(me,se.screenElement);if(!Ae)return!1;let Pe,Ye;switch(me.overrideType||me.type){case"mousemove":Ye=32,me.buttons===void 0?(Pe=3,me.button!==void 0&&(Pe=me.button<3?me.button:3)):Pe=1&me.buttons?0:4&me.buttons?1:2&me.buttons?2:3;break;case"mouseup":Ye=0,Pe=me.button<3?me.button:3;break;case"mousedown":Ye=1,Pe=me.button<3?me.button:3;break;case"wheel":if(se._customWheelEventHandler&&se._customWheelEventHandler(me)===!1||se.viewport.getLinesScrolled(me)===0)return!1;Ye=me.deltaY<0?0:1,Pe=4;break;default:return!1}return!(Ye===void 0||Pe===void 0||Pe>4)&&se.coreMouseService.triggerMouseEvent({col:Ae.col,row:Ae.row,x:Ae.x,y:Ae.y,button:Pe,action:Ye,ctrl:me.ctrlKey,alt:me.altKey,shift:me.shiftKey})}const ce={mouseup:null,wheel:null,mousedrag:null,mousemove:null},he={mouseup:me=>(ne(me),me.buttons||(this._document.removeEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.removeEventListener("mousemove",ce.mousedrag)),this.cancel(me)),wheel:me=>(ne(me),this.cancel(me,!0)),mousedrag:me=>{me.buttons&&ne(me)},mousemove:me=>{me.buttons||ne(me)}};this.register(this.coreMouseService.onProtocolChange((me=>{me?(this.optionsService.rawOptions.logLevel==="debug"&&this._logService.debug("Binding to mouse events:",this.coreMouseService.explainEvents(me)),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&me?ce.mousemove||(V.addEventListener("mousemove",he.mousemove),ce.mousemove=he.mousemove):(V.removeEventListener("mousemove",ce.mousemove),ce.mousemove=null),16&me?ce.wheel||(V.addEventListener("wheel",he.wheel,{passive:!1}),ce.wheel=he.wheel):(V.removeEventListener("wheel",ce.wheel),ce.wheel=null),2&me?ce.mouseup||(ce.mouseup=he.mouseup):(this._document.removeEventListener("mouseup",ce.mouseup),ce.mouseup=null),4&me?ce.mousedrag||(ce.mousedrag=he.mousedrag):(this._document.removeEventListener("mousemove",ce.mousedrag),ce.mousedrag=null)}))),this.coreMouseService.activeProtocol=this.coreMouseService.activeProtocol,this.register((0,h.addDisposableDomListener)(V,"mousedown",(me=>{if(me.preventDefault(),this.focus(),this.coreMouseService.areMouseEventsActive&&!this._selectionService.shouldForceSelection(me))return ne(me),ce.mouseup&&this._document.addEventListener("mouseup",ce.mouseup),ce.mousedrag&&this._document.addEventListener("mousemove",ce.mousedrag),this.cancel(me)}))),this.register((0,h.addDisposableDomListener)(V,"wheel",(me=>{if(!ce.wheel){if(this._customWheelEventHandler&&this._customWheelEventHandler(me)===!1)return!1;if(!this.buffer.hasScrollback){const Ae=this.viewport.getLinesScrolled(me);if(Ae===0)return;const Pe=Z.C0.ESC+(this.coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(me.deltaY<0?"A":"B");let Ye="";for(let Re=0;Re{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchStart(me),this.cancel(me)}),{passive:!0})),this.register((0,h.addDisposableDomListener)(V,"touchmove",(me=>{if(!this.coreMouseService.areMouseEventsActive)return this.viewport.handleTouchMove(me)?void 0:this.cancel(me)}),{passive:!1}))}refresh(se,V){var ne;(ne=this._renderService)==null||ne.refreshRows(se,V)}updateCursorStyle(se){var V;(V=this._selectionService)!=null&&V.shouldColumnSelect(se)?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(se,V,ne=0){var ce;ne===1?(super.scrollLines(se,V,ne),this.refresh(0,this.rows-1)):(ce=this.viewport)==null||ce.scrollLines(se)}paste(se){(0,u.paste)(se,this.textarea,this.coreService,this.optionsService)}attachCustomKeyEventHandler(se){this._customKeyEventHandler=se}attachCustomWheelEventHandler(se){this._customWheelEventHandler=se}registerLinkProvider(se){return this._linkProviderService.registerLinkProvider(se)}registerCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");const V=this._characterJoinerService.register(se);return this.refresh(0,this.rows-1),V}deregisterCharacterJoiner(se){if(!this._characterJoinerService)throw new Error("Terminal must be opened first");this._characterJoinerService.deregister(se)&&this.refresh(0,this.rows-1)}get markers(){return this.buffer.markers}registerMarker(se){return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+se)}registerDecoration(se){return this._decorationService.registerDecoration(se)}hasSelection(){return!!this._selectionService&&this._selectionService.hasSelection}select(se,V,ne){this._selectionService.setSelection(se,V,ne)}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 se;(se=this._selectionService)==null||se.clearSelection()}selectAll(){var se;(se=this._selectionService)==null||se.selectAll()}selectLines(se,V){var ne;(ne=this._selectionService)==null||ne.selectLines(se,V)}_keyDown(se){if(this._keyDownHandled=!1,this._keyDownSeen=!0,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;const V=this.browser.isMac&&this.options.macOptionIsMeta&&se.altKey;if(!V&&!this._compositionHelper.keydown(se))return this.options.scrollOnUserInput&&this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;V||se.key!=="Dead"&&se.key!=="AltGraph"||(this._unprocessedDeadKey=!0);const ne=(0,J.evaluateKeyboardEvent)(se,this.coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(se),ne.type===3||ne.type===2){const ce=this.rows-1;return this.scrollLines(ne.type===2?-ce:ce),this.cancel(se,!0)}return ne.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,se)||(ne.cancel&&this.cancel(se,!0),!ne.key||!!(se.key&&!se.ctrlKey&&!se.altKey&&!se.metaKey&&se.key.length===1&&se.key.charCodeAt(0)>=65&&se.key.charCodeAt(0)<=90)||(this._unprocessedDeadKey?(this._unprocessedDeadKey=!1,!0):(ne.key!==Z.C0.ETX&&ne.key!==Z.C0.CR||(this.textarea.value=""),this._onKey.fire({key:ne.key,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(ne.key,!0),!this.optionsService.rawOptions.screenReaderMode||se.altKey||se.ctrlKey?this.cancel(se,!0):void(this._keyDownHandled=!0))))}_isThirdLevelShift(se,V){const ne=se.isMac&&!this.options.macOptionIsMeta&&V.altKey&&!V.ctrlKey&&!V.metaKey||se.isWindows&&V.altKey&&V.ctrlKey&&!V.metaKey||se.isWindows&&V.getModifierState("AltGraph");return V.type==="keypress"?ne:ne&&(!V.keyCode||V.keyCode>47)}_keyUp(se){this._keyDownSeen=!1,this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1||((function(V){return V.keyCode===16||V.keyCode===17||V.keyCode===18})(se)||this.focus(),this.updateCursorStyle(se),this._keyPressHandled=!1)}_keyPress(se){let V;if(this._keyPressHandled=!1,this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(se)===!1)return!1;if(this.cancel(se),se.charCode)V=se.charCode;else if(se.which===null||se.which===void 0)V=se.keyCode;else{if(se.which===0||se.charCode===0)return!1;V=se.which}return!(!V||(se.altKey||se.ctrlKey||se.metaKey)&&!this._isThirdLevelShift(this.browser,se)||(V=String.fromCharCode(V),this._onKey.fire({key:V,domEvent:se}),this._showCursor(),this.coreService.triggerDataEvent(V,!0),this._keyPressHandled=!0,this._unprocessedDeadKey=!1,0))}_inputEvent(se){if(se.data&&se.inputType==="insertText"&&(!se.composed||!this._keyDownSeen)&&!this.optionsService.rawOptions.screenReaderMode){if(this._keyPressHandled)return!1;this._unprocessedDeadKey=!1;const V=se.data;return this.coreService.triggerDataEvent(V,!0),this.cancel(se),!0}return!1}resize(se,V){se!==this.cols||V!==this.rows?super.resize(se,V):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()}_afterResize(se,V){var ne,ce;(ne=this._charSizeService)==null||ne.measure(),(ce=this.viewport)==null||ce.syncScrollArea(!0)}clear(){var se;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 V=1;V{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,h){this._rowCount=h,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(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(b,y,x,C,N,j,A,z){super(),this._viewportElement=b,this._scrollArea=y,this._bufferService=x,this._optionsService=C,this._charSizeService=N,this._renderService=j,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(z.colors),this.register(z.onChangeColors((M=>this._handleThemeChange(M)))),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.syncScrollArea()))),setTimeout((()=>this.syncScrollArea()))}_handleThemeChange(b){this._viewportElement.style.backgroundColor=b.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(b){if(b)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 y=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderDimensions.css.canvas.height);this._lastRecordedBufferHeight!==y&&(this._lastRecordedBufferHeight=y,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}const b=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==b&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=b),this._refreshAnimationFrame=null}syncScrollArea(b=!1){if(this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(b);this._lastRecordedViewportHeight===this._renderService.dimensions.css.canvas.height&&this._lastScrollTop===this._activeBuffer.ydisp*this._currentRowHeight&&this._renderDimensions.device.cell.height===this._currentDeviceCellHeight||this._refresh(b)}_handleScroll(b){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 y=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._onRequestScrollLines.fire({amount:y,suppressScrollEvent:!0})}_smoothScroll(){if(this._isDisposed||this._smoothScrollState.origin===-1||this._smoothScrollState.target===-1)return;const b=this._smoothScrollPercent();this._viewportElement.scrollTop=this._smoothScrollState.origin+Math.round(b*(this._smoothScrollState.target-this._smoothScrollState.origin)),b<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(b,y){const x=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(y<0&&this._viewportElement.scrollTop!==0||y>0&&x0&&(x=B),C=""}}return{bufferElements:N,cursorElement:x}}getLinesScrolled(b){if(b.deltaY===0||b.shiftKey)return 0;let y=this._applyScrollModifier(b.deltaY,b);return b.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(y/=this._currentRowHeight+0,this._wheelPartialScroll+=y,y=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):b.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(y*=this._bufferService.rows),y}_applyScrollModifier(b,y){const x=this._optionsService.rawOptions.fastScrollModifier;return x==="alt"&&y.altKey||x==="ctrl"&&y.ctrlKey||x==="shift"&&y.shiftKey?b*this._optionsService.rawOptions.fastScrollSensitivity*this._optionsService.rawOptions.scrollSensitivity:b*this._optionsService.rawOptions.scrollSensitivity}handleTouchStart(b){this._lastTouchY=b.touches[0].pageY}handleTouchMove(b){const y=this._lastTouchY-b.touches[0].pageY;return this._lastTouchY=b.touches[0].pageY,y!==0&&(this._viewportElement.scrollTop+=y,this._bubbleScroll(b,y))}};o.Viewport=v=u([h(2,k.IBufferService),h(3,k.IOptionsService),h(4,p.ICharSizeService),h(5,p.IRenderService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],v)},3107:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b,y,x){super(),this._screenElement=k,this._bufferService=v,this._coreBrowserService=b,this._decorationService=y,this._renderService=x,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 y;const v=this._coreBrowserService.mainDocument.createElement("div");v.classList.add("xterm-decoration"),v.classList.toggle("xterm-decoration-top-layer",((y=k==null?void 0:k.options)==null?void 0:y.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 b=k.options.x??0;return b&&b>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 b=this._decorationElements.get(k);b||(b=this._createElement(k),k.element=b,this._decorationElements.set(k,b),this._container.appendChild(b),k.onDispose((()=>{this._decorationElements.delete(k),b.remove()}))),b.style.top=v*this._renderService.dimensions.css.cell.height+"px",b.style.display=this._altBufferIsActive?"none":"block",k.onRenderEmitter.fire(b)}}_refreshXPosition(k,v=k.element){if(!v)return;const b=k.options.x??0;(k.options.anchor||"left")==="right"?v.style.right=b?b*this._renderService.dimensions.css.cell.width+"px":"":v.style.left=b?b*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([h(1,m.IBufferService),h(2,f.ICoreBrowserService),h(3,m.IDecorationService),h(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,h){return u>=c.startBufferLine-this._linePadding[h||"full"]&&u<=c.endBufferLine+this._linePadding[h||"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(x,C,N,j){var A,z=arguments.length,M=z<3?C:j===null?j=Object.getOwnPropertyDescriptor(C,N):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,C,N,j);else for(var D=x.length-1;D>=0;D--)(A=x[D])&&(M=(z<3?A(M):z>3?A(C,N,M):A(C,N))||M);return z>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(x,C){return function(N,j){C(N,j,x)}};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},b={full:0,left:0,center:0,right:0};let y=o.OverviewRulerRenderer=class extends m.Disposable{get _width(){return this._optionsService.options.overviewRulerWidth||0}constructor(x,C,N,j,A,z,M){var I;super(),this._viewportElement=x,this._screenElement=C,this._bufferService=N,this._decorationService=j,this._renderService=A,this._optionsService=z,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(),(I=this._viewportElement.parentElement)==null||I.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 x=Math.floor(this._canvas.width/3),C=Math.ceil(this._canvas.width/3);v.full=this._canvas.width,v.left=x,v.center=C,v.right=x,this._refreshDrawHeightConstants(),b.full=0,b.left=0,b.center=v.left,b.right=v.left+v.center}_refreshDrawHeightConstants(){k.full=Math.round(2*this._coreBrowserService.dpr);const x=this._canvas.height/this._bufferService.buffer.lines.length,C=Math.round(Math.max(Math.min(x,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 x=this._colorZoneStore.zones;for(const C of x)C.position!=="full"&&this._renderColorZone(C);for(const C of x)C.position==="full"&&this._renderColorZone(C);this._shouldUpdateDimensions=!1,this._shouldUpdateAnchor=!1}_renderColorZone(x){this._ctx.fillStyle=x.color,this._ctx.fillRect(b[x.position||"full"],Math.round((this._canvas.height-1)*(x.startBufferLine/this._bufferService.buffers.active.lines.length)-k[x.position||"full"]/2),v[x.position||"full"],Math.round((this._canvas.height-1)*((x.endBufferLine-x.startBufferLine)/this._bufferService.buffers.active.lines.length)+k[x.position||"full"]))}_queueRefresh(x,C){this._shouldUpdateDimensions=x||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=y=u([h(2,w.IBufferService),h(3,w.IDecorationService),h(4,p.IRenderService),h(5,w.IOptionsService),h(6,p.ICoreBrowserService)],y)},2950:function(a,o,c){var u=this&&this.__decorate||function(k,v,b,y){var x,C=arguments.length,N=C<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,b):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(k,v,b,y);else for(var j=k.length-1;j>=0;j--)(x=k[j])&&(N=(C<3?x(N):C>3?x(v,b,N):x(v,b))||N);return C>3&&N&&Object.defineProperty(v,b,N),N},h=this&&this.__param||function(k,v){return function(b,y){v(b,y,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,b,y,x,C){this._textarea=k,this._compositionView=v,this._bufferService=b,this._optionsService=y,this._coreService=x,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 b;this._isSendingComposition=!1,v.start+=this._dataAlreadySent.length,b=this._isComposing?this._textarea.value.substring(v.start,v.end):this._textarea.value.substring(v.start),b.length>0&&this._coreService.triggerDataEvent(b,!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,b=v.replace(k,"");this._dataAlreadySent=b,v.length>k.length?this._coreService.triggerDataEvent(b,!0):v.lengththis.updateCompositionElements(!0)),0)}}};o.CompositionHelper=w=u([h(2,p.IBufferService),h(3,p.IOptionsService),h(4,p.ICoreService),h(5,f.IRenderService)],w)},9806:(a,o)=>{function c(u,h,f){const p=f.getBoundingClientRect(),m=u.getComputedStyle(f),w=parseInt(m.getPropertyValue("padding-left")),k=parseInt(m.getPropertyValue("padding-top"));return[h.clientX-p.left-w,h.clientY-p.top-k]}Object.defineProperty(o,"__esModule",{value:!0}),o.getCoords=o.getCoordsRelativeToElement=void 0,o.getCoordsRelativeToElement=c,o.getCoords=function(u,h,f,p,m,w,k,v,b){if(!w)return;const y=c(u,h,f);return y?(y[0]=Math.ceil((y[0]+(b?k/2:0))/k),y[1]=Math.ceil(y[1]/v),y[0]=Math.min(Math.max(y[0],1),p+(b?1:0)),y[1]=Math.min(Math.max(y[1],1),m),y):void 0}},9504:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.moveToCellSequence=void 0;const u=c(2584);function h(v,b,y,x){const C=v-f(v,y),N=b-f(b,y),j=Math.abs(C-N)-(function(A,z,M){let D=0;const I=A-f(A,M),B=z-f(z,M);for(let G=0;G=0&&vb?"A":"B"}function m(v,b,y,x,C,N){let j=v,A=b,z="";for(;j!==y||A!==x;)j+=C?1:-1,C&&j>N.cols-1?(z+=N.buffer.translateBufferLineToString(A,!1,v,j),j=0,v=0,A++):!C&&j<0&&(z+=N.buffer.translateBufferLineToString(A,!1,0,v+1),j=N.cols-1,v=j,A--);return z+N.buffer.translateBufferLineToString(A,!1,v,j)}function w(v,b){const y=b?"O":"[";return u.C0.ESC+y+v}function k(v,b){v=Math.floor(v);let y="";for(let x=0;x0?I-f(I,B):M;const Q=I,K=(function(Z,J,$,L,F,U){let H;return H=h($,L,F,U).length>0?L-f(L,F):J,Z<$&&H<=L||Z>=$&&Hv?"D":"C",k(Math.abs(C-v),w(j,x));j=N>b?"D":"C";const A=Math.abs(N-b);return k((function(z,M){return M.cols-z})(N>b?v:C,y)+(A-1)*y.cols+1+((N>b?C:v)-1),w(j,x))}},1296:function(a,o,c){var u=this&&this.__decorate||function(G,q,Q,K){var Z,J=arguments.length,$=J<3?q:K===null?K=Object.getOwnPropertyDescriptor(q,Q):K;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")$=Reflect.decorate(G,q,Q,K);else for(var L=G.length-1;L>=0;L--)(Z=G[L])&&($=(J<3?Z($):J>3?Z(q,Q,$):Z(q,Q))||$);return J>3&&$&&Object.defineProperty(q,Q,$),$},h=this&&this.__param||function(G,q){return function(Q,K){q(Q,K,G)}};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),b=c(8055),y=c(8460),x=c(844),C=c(2585),N="xterm-dom-renderer-owner-",j="xterm-rows",A="xterm-fg-",z="xterm-bg-",M="xterm-focus",D="xterm-selection";let I=1,B=o.DomRenderer=class extends x.Disposable{constructor(G,q,Q,K,Z,J,$,L,F,U,H,oe,ae){super(),this._terminal=G,this._document=q,this._element=Q,this._screenElement=K,this._viewportElement=Z,this._helperContainer=J,this._linkifier2=$,this._charSizeService=F,this._optionsService=U,this._bufferService=H,this._coreBrowserService=oe,this._themeService=ae,this._terminalClass=I++,this._rowElements=[],this._selectionRenderModel=(0,k.createSelectionRenderModel)(),this.onRequestRedraw=this.register(new y.EventEmitter).event,this._rowContainer=this._document.createElement("div"),this._rowContainer.classList.add(j),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((ue=>this._injectCss(ue)))),this._injectCss(this._themeService.colors),this._rowFactory=L.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((ue=>this._handleLinkHover(ue)))),this.register(this._linkifier2.onHideLinkUnderline((ue=>this._handleLinkLeave(ue)))),this.register((0,x.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 G=this._coreBrowserService.dpr;this.dimensions.device.char.width=this._charSizeService.width*G,this.dimensions.device.char.height=Math.ceil(this._charSizeService.height*G),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/G),this.dimensions.css.canvas.height=Math.round(this.dimensions.device.canvas.height/G),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 q=`${this._terminalSelector} .${j} span { display: inline-block; height: 100%; vertical-align: top;}`;this._dimensionsStyleElement.textContent=q,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(G){this._themeStyleElement||(this._themeStyleElement=this._document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));let q=`${this._terminalSelector} .${j} { color: ${G.foreground.css}; font-family: ${this._optionsService.rawOptions.fontFamily}; font-size: ${this._optionsService.rawOptions.fontSize}px; font-kerning: none; white-space: pre}`;q+=`${this._terminalSelector} .${j} .xterm-dim { color: ${b.color.multiplyOpacity(G.foreground,.5).css};}`,q+=`${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}`;q+=`@keyframes ${Q} { 50% { border-bottom-style: hidden; }}`,q+=`@keyframes ${K} { 50% { box-shadow: none; }}`,q+=`@keyframes ${Z} { 0% { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css}; } 50% { background-color: inherit; color: ${G.cursor.css}; }}`,q+=`${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-underline { animation: ${Q} 1s step-end infinite;}${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-bar { animation: ${K} 1s step-end infinite;}${this._terminalSelector} .${j}.${M} .xterm-cursor.xterm-cursor-blink.xterm-cursor-block { animation: ${Z} 1s step-end infinite;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block { background-color: ${G.cursor.css}; color: ${G.cursorAccent.css};}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-block:not(.xterm-cursor-blink) { background-color: ${G.cursor.css} !important; color: ${G.cursorAccent.css} !important;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-outline { outline: 1px solid ${G.cursor.css}; outline-offset: -1px;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-bar { box-shadow: ${this._optionsService.rawOptions.cursorWidth}px 0 0 ${G.cursor.css} inset;}${this._terminalSelector} .${j} .xterm-cursor.xterm-cursor-underline { border-bottom: 1px ${G.cursor.css}; border-bottom-style: solid; height: calc(100% - 1px);}`,q+=`${this._terminalSelector} .${D} { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}${this._terminalSelector}.focus .${D} div { position: absolute; background-color: ${G.selectionBackgroundOpaque.css};}${this._terminalSelector} .${D} div { position: absolute; background-color: ${G.selectionInactiveBackgroundOpaque.css};}`;for(const[J,$]of G.ansi.entries())q+=`${this._terminalSelector} .${A}${J} { color: ${$.css}; }${this._terminalSelector} .${A}${J}.xterm-dim { color: ${b.color.multiplyOpacity($,.5).css}; }${this._terminalSelector} .${z}${J} { background-color: ${$.css}; }`;q+=`${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR} { color: ${b.color.opaque(G.background).css}; }${this._terminalSelector} .${A}${m.INVERTED_DEFAULT_COLOR}.xterm-dim { color: ${b.color.multiplyOpacity(b.color.opaque(G.background),.5).css}; }${this._terminalSelector} .${z}${m.INVERTED_DEFAULT_COLOR} { background-color: ${G.foreground.css}; }`,this._themeStyleElement.textContent=q}_setDefaultSpacing(){const G=this.dimensions.css.cell.width-this._widthCache.get("W",!1,!1);this._rowContainer.style.letterSpacing=`${G}px`,this._rowFactory.defaultSpacing=G}handleDevicePixelRatioChange(){this._updateDimensions(),this._widthCache.clear(),this._setDefaultSpacing()}_refreshRowElements(G,q){for(let Q=this._rowElements.length;Q<=q;Q++){const K=this._document.createElement("div");this._rowContainer.appendChild(K),this._rowElements.push(K)}for(;this._rowElements.length>q;)this._rowContainer.removeChild(this._rowElements.pop())}handleResize(G,q){this._refreshRowElements(G,q),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(G,q,Q){if(this._selectionContainer.replaceChildren(),this._rowFactory.handleSelectionChanged(G,q,Q),this.renderRows(0,this._bufferService.rows-1),!G||!q)return;this._selectionRenderModel.update(this._terminal,G,q,Q);const K=this._selectionRenderModel.viewportStartRow,Z=this._selectionRenderModel.viewportEndRow,J=this._selectionRenderModel.viewportCappedStartRow,$=this._selectionRenderModel.viewportCappedEndRow;if(J>=this._bufferService.rows||$<0)return;const L=this._document.createDocumentFragment();if(Q){const F=G[0]>q[0];L.appendChild(this._createSelectionElement(J,F?q[0]:G[0],F?G[0]:q[0],$-J+1))}else{const F=K===J?G[0]:0,U=J===Z?q[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement(J,F,U));const H=$-J-1;if(L.appendChild(this._createSelectionElement(J+1,0,this._bufferService.cols,H)),J!==$){const oe=Z===$?q[0]:this._bufferService.cols;L.appendChild(this._createSelectionElement($,0,oe))}}this._selectionContainer.appendChild(L)}_createSelectionElement(G,q,Q,K=1){const Z=this._document.createElement("div"),J=q*this.dimensions.css.cell.width;let $=this.dimensions.css.cell.width*(Q-q);return J+$>this.dimensions.css.canvas.width&&($=this.dimensions.css.canvas.width-J),Z.style.height=K*this.dimensions.css.cell.height+"px",Z.style.top=G*this.dimensions.css.cell.height+"px",Z.style.left=`${J}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 G of this._rowElements)G.replaceChildren()}renderRows(G,q){const Q=this._bufferService.buffer,K=Q.ybase+Q.y,Z=Math.min(Q.x,this._bufferService.cols-1),J=this._optionsService.rawOptions.cursorBlink,$=this._optionsService.rawOptions.cursorStyle,L=this._optionsService.rawOptions.cursorInactiveStyle;for(let F=G;F<=q;F++){const U=F+Q.ydisp,H=this._rowElements[F],oe=Q.lines.get(U);if(!H||!oe)break;H.replaceChildren(...this._rowFactory.createRow(oe,U,U===K,$,L,Z,J,this.dimensions.css.cell.width,this._widthCache,-1,-1))}}get _terminalSelector(){return`.${N}${this._terminalClass}`}_handleLinkHover(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!0)}_handleLinkLeave(G){this._setCellUnderline(G.x1,G.x2,G.y1,G.y2,G.cols,!1)}_setCellUnderline(G,q,Q,K,Z,J){Q<0&&(G=0),K<0&&(q=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 L=this._bufferService.buffer,F=L.ybase+L.y,U=Math.min(L.x,Z-1),H=this._optionsService.rawOptions.cursorBlink,oe=this._optionsService.rawOptions.cursorStyle,ae=this._optionsService.rawOptions.cursorInactiveStyle;for(let ue=Q;ue<=K;++ue){const se=ue+L.ydisp,V=this._rowElements[ue],ne=L.lines.get(se);if(!V||!ne)break;V.replaceChildren(...this._rowFactory.createRow(ne,se,se===F,oe,ae,U,H,this.dimensions.css.cell.width,this._widthCache,J?ue===Q?G:0:-1,J?(ue===K?q:Z)-1:-1))}}};o.DomRenderer=B=u([h(7,C.IInstantiationService),h(8,v.ICharSizeService),h(9,C.IOptionsService),h(10,C.IBufferService),h(11,v.ICoreBrowserService),h(12,v.IThemeService)],B)},3787:function(a,o,c){var u=this&&this.__decorate||function(j,A,z,M){var D,I=arguments.length,B=I<3?A:M===null?M=Object.getOwnPropertyDescriptor(A,z):M;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")B=Reflect.decorate(j,A,z,M);else for(var G=j.length-1;G>=0;G--)(D=j[G])&&(B=(I<3?D(B):I>3?D(A,z,B):D(A,z))||B);return I>3&&B&&Object.defineProperty(A,z,B),B},h=this&&this.__param||function(j,A){return function(z,M){A(z,M,j)}};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),b=c(4269),y=c(6171),x=c(3734);let C=o.DomRendererRowFactory=class{constructor(j,A,z,M,D,I,B){this._document=j,this._characterJoinerService=A,this._optionsService=z,this._coreBrowserService=M,this._coreService=D,this._decorationService=I,this._themeService=B,this._workCell=new m.CellData,this._columnSelectMode=!1,this.defaultSpacing=0}handleSelectionChanged(j,A,z){this._selectionStart=j,this._selectionEnd=A,this._columnSelectMode=z}createRow(j,A,z,M,D,I,B,G,q,Q,K){const Z=[],J=this._characterJoinerService.getJoinedCharacters(A),$=this._themeService.colors;let L,F=j.getNoBgTrimmedLength();z&&F0&&Ae===J[0][0]){Ye=!0;const Ut=J.shift();$e=new b.JoinedCellData(this._workCell,j.translateToString(!0,Ut[0],Ut[1]),Ut[1]-Ut[0]),Re=Ut[1]-1,Pe=$e.getWidth()}const yt=this._isCellInSelection(Ae,A),ot=z&&Ae===I,Mt=me&&Ae>=Q&&Ae<=K;let jt=!1;this._decorationService.forEachDecorationAtCell(Ae,A,void 0,(Ut=>{jt=!0}));let Pt=$e.getChars()||p.WHITESPACE_CELL_CHAR;if(Pt===" "&&($e.isUnderline()||$e.isOverline())&&(Pt=" "),ce=Pe*G-q.get(Pt,$e.isBold(),$e.isItalic()),L){if(U&&(yt&&ne||!yt&&!ne&&$e.bg===oe)&&(yt&&ne&&$.selectionForeground||$e.fg===ae)&&$e.extended.ext===ue&&Mt===se&&ce===V&&!ot&&!Ye&&!jt){$e.isInvisible()?H+=p.WHITESPACE_CELL_CHAR:H+=Pt,U++;continue}U&&(L.textContent=H),L=this._document.createElement("span"),U=0,H=""}else L=this._document.createElement("span");if(oe=$e.bg,ae=$e.fg,ue=$e.extended.ext,se=Mt,V=ce,ne=yt,Ye&&I>=Ae&&I<=Re&&(I=Ae),!this._coreService.isCursorHidden&&ot&&this._coreService.isCursorInitialized){if(he.push("xterm-cursor"),this._coreBrowserService.isFocused)B&&he.push("xterm-cursor-blink"),he.push(M==="bar"?"xterm-cursor-bar":M==="underline"?"xterm-cursor-underline":"xterm-cursor-block");else if(D)switch(D){case"outline":he.push("xterm-cursor-outline");break;case"block":he.push("xterm-cursor-block");break;case"bar":he.push("xterm-cursor-bar");break;case"underline":he.push("xterm-cursor-underline")}}if($e.isBold()&&he.push("xterm-bold"),$e.isItalic()&&he.push("xterm-italic"),$e.isDim()&&he.push("xterm-dim"),H=$e.isInvisible()?p.WHITESPACE_CELL_CHAR:$e.getChars()||p.WHITESPACE_CELL_CHAR,$e.isUnderline()&&(he.push(`xterm-underline-${$e.extended.underlineStyle}`),H===" "&&(H=" "),!$e.isUnderlineColorDefault()))if($e.isUnderlineColorRGB())L.style.textDecorationColor=`rgb(${x.AttributeData.toColorRGB($e.getUnderlineColor()).join(",")})`;else{let Ut=$e.getUnderlineColor();this._optionsService.rawOptions.drawBoldTextInBrightColors&&$e.isBold()&&Ut<8&&(Ut+=8),L.style.textDecorationColor=$.ansi[Ut].css}$e.isOverline()&&(he.push("xterm-overline"),H===" "&&(H=" ")),$e.isStrikethrough()&&he.push("xterm-strikethrough"),Mt&&(L.style.textDecoration="underline");let Ie=$e.getFgColor(),nt=$e.getFgColorMode(),ke=$e.getBgColor(),ge=$e.getBgColorMode();const je=!!$e.isInverse();if(je){const Ut=Ie;Ie=ke,ke=Ut;const Xt=nt;nt=ge,ge=Xt}let qe,rt,dt,st=!1;switch(this._decorationService.forEachDecorationAtCell(Ae,A,void 0,(Ut=>{Ut.options.layer!=="top"&&st||(Ut.backgroundColorRGB&&(ge=50331648,ke=Ut.backgroundColorRGB.rgba>>8&16777215,qe=Ut.backgroundColorRGB),Ut.foregroundColorRGB&&(nt=50331648,Ie=Ut.foregroundColorRGB.rgba>>8&16777215,rt=Ut.foregroundColorRGB),st=Ut.options.layer==="top")})),!st&&yt&&(qe=this._coreBrowserService.isFocused?$.selectionBackgroundOpaque:$.selectionInactiveBackgroundOpaque,ke=qe.rgba>>8&16777215,ge=50331648,st=!0,$.selectionForeground&&(nt=50331648,Ie=$.selectionForeground.rgba>>8&16777215,rt=$.selectionForeground)),st&&he.push("xterm-decoration-top"),ge){case 16777216:case 33554432:dt=$.ansi[ke],he.push(`xterm-bg-${ke}`);break;case 50331648:dt=k.channels.toColor(ke>>16,ke>>8&255,255&ke),this._addStyle(L,`background-color:#${N((ke>>>0).toString(16),"0",6)}`);break;default:je?(dt=$.foreground,he.push(`xterm-bg-${f.INVERTED_DEFAULT_COLOR}`)):dt=$.background}switch(qe||$e.isDim()&&(qe=k.color.multiplyOpacity(dt,.5)),nt){case 16777216:case 33554432:$e.isBold()&&Ie<8&&this._optionsService.rawOptions.drawBoldTextInBrightColors&&(Ie+=8),this._applyMinimumContrast(L,dt,$.ansi[Ie],$e,qe,void 0)||he.push(`xterm-fg-${Ie}`);break;case 50331648:const Ut=k.channels.toColor(Ie>>16&255,Ie>>8&255,255&Ie);this._applyMinimumContrast(L,dt,Ut,$e,qe,rt)||this._addStyle(L,`color:#${N(Ie.toString(16),"0",6)}`);break;default:this._applyMinimumContrast(L,dt,$.foreground,$e,qe,rt)||je&&he.push(`xterm-fg-${f.INVERTED_DEFAULT_COLOR}`)}he.length&&(L.className=he.join(" "),he.length=0),ot||Ye||jt?L.textContent=H:U++,ce!==this.defaultSpacing&&(L.style.letterSpacing=`${ce}px`),Z.push(L),Ae=Re}return L&&U&&(L.textContent=H),Z}_applyMinimumContrast(j,A,z,M,D,I){if(this._optionsService.rawOptions.minimumContrastRatio===1||(0,y.treatGlyphAsBackgroundColor)(M.getCode()))return!1;const B=this._getContrastCache(M);let G;if(D||I||(G=B.getColor(A.rgba,z.rgba)),G===void 0){const q=this._optionsService.rawOptions.minimumContrastRatio/(M.isDim()?2:1);G=k.color.ensureContrastRatio(D||A,I||z,q),B.setColor((D||A).rgba,(I||z).rgba,G??null)}return!!G&&(this._addStyle(j,`color:${G.css}`),!0)}_getContrastCache(j){return j.isDim()?this._themeService.colors.halfContrastCache:this._themeService.colors.contrastCache}_addStyle(j,A){j.setAttribute("style",`${j.getAttribute("style")||""}${A};`)}_isCellInSelection(j,A){const z=this._selectionStart,M=this._selectionEnd;return!(!z||!M)&&(this._columnSelectMode?z[0]<=M[0]?j>=z[0]&&A>=z[1]&&j=z[1]&&j>=M[0]&&A<=M[1]:A>z[1]&&A=z[0]&&j=z[0])}};function N(j,A,z){for(;j.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 h=c.createElement("span");h.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=[h,f,p,m],this._container.appendChild(h),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,h,f){c===this._font&&u===this._fontSize&&h===this._weight&&f===this._weightBold||(this._font=c,this._fontSize=u,this._weight=h,this._weightBold=f,this._container.style.fontFamily=this._font,this._container.style.fontSize=`${this._fontSize}px`,this._measureElements[0].style.fontWeight=`${h}`,this._measureElements[1].style.fontWeight=`${f}`,this._measureElements[2].style.fontWeight=`${h}`,this._measureElements[3].style.fontWeight=`${f}`,this.clear())}get(c,u,h){let f=0;if(!u&&!h&&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"),h&&(p+="I");let m=this._holey.get(p);if(m===void 0){let w=0;u&&(w|=1),h&&(w|=2),m=this._measure(c,w),m>0&&this._holey.set(p,m)}return m}_measure(c,u){const h=this._measureElements[u];return h.textContent=c.repeat(32),h.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(h){return 57508<=h&&h<=57558}function u(h){return h>=128512&&h<=128591||h>=127744&&h<=128511||h>=128640&&h<=128767||h>=9728&&h<=9983||h>=9984&&h<=10175||h>=65024&&h<=65039||h>=129280&&h<=129535||h>=127462&&h<=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(h){if(!h)throw new Error("value must not be falsy");return h},o.isPowerlineGlyph=c,o.isRestrictedPowerlineGlyph=function(h){return 57520<=h&&h<=57527},o.isEmoji=u,o.allowRescaling=function(h,f,p,m){return f===1&&p>Math.ceil(1.5*m)&&h!==void 0&&h>255&&!u(h)&&!c(h)&&!(function(w){return 57344<=w&&w<=63743})(h)},o.treatGlyphAsBackgroundColor=function(h){return c(h)||(function(f){return 9472<=f&&f<=9631})(h)},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(h,f,p=0){return(h-(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(h,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=h.buffers.active.ydisp,k=f[1]-w,v=p[1]-w,b=Math.max(k,0),y=Math.min(v,h.rows-1);b>=h.rows||y<0?this.clear():(this.hasSelection=!0,this.columnSelectMode=m,this.viewportStartRow=k,this.viewportEndRow=v,this.viewportCappedStartRow=b,this.viewportCappedEndRow=y,this.startCol=f[0],this.endCol=p[0])}isCellSelected(h,f,p){return!!this.hasSelection&&(p-=h.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(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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(y,x,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 b(this._optionsService))}catch{this._measureStrategy=this.register(new v(y,x,this._optionsService))}this.register(this._optionsService.onMultipleOptionChange(["fontFamily","fontSize"],(()=>this.measure())))}measure(){const y=this._measureStrategy.measure();y.width===this.width&&y.height===this.height||(this.width=y.width,this.height=y.height,this._onCharSizeChange.fire())}};o.CharSizeService=w=u([h(2,f.IOptionsService)],w);class k extends m.Disposable{constructor(){super(...arguments),this._result={width:0,height:0}}_validateAndSet(x,C){x!==void 0&&x>0&&C!==void 0&&C>0&&(this._result.width=x,this._result.height=C)}}class v extends k{constructor(x,C,N){super(),this._document=x,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 b extends k{constructor(x){super(),this._optionsService=x,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 x=this._ctx.measureText("W");return this._validateAndSet(x.width,x.fontBoundingBoxAscent+x.fontBoundingBoxDescent),this._result}}},4269:function(a,o,c){var u=this&&this.__decorate||function(b,y,x,C){var N,j=arguments.length,A=j<3?y:C===null?C=Object.getOwnPropertyDescriptor(y,x):C;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")A=Reflect.decorate(b,y,x,C);else for(var z=b.length-1;z>=0;z--)(N=b[z])&&(A=(j<3?N(A):j>3?N(y,x,A):N(y,x))||A);return j>3&&A&&Object.defineProperty(y,x,A),A},h=this&&this.__param||function(b,y){return function(x,C){y(x,C,b)}};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(y,x,C){super(),this.content=0,this.combinedData="",this.fg=y.fg,this.bg=y.bg,this.combinedData=x,this._width=C}isCombined(){return 2097152}getWidth(){return this._width}getChars(){return this.combinedData}getCode(){return 2097151}setFromCharData(y){throw new Error("not implemented")}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.JoinedCellData=k;let v=o.CharacterJoinerService=class G${constructor(y){this._bufferService=y,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new m.CellData}register(y){const x={id:this._nextCharacterJoinerId++,handler:y};return this._characterJoiners.push(x),x.id}deregister(y){for(let x=0;x1){const B=this._getJoinedRanges(N,z,A,x,j);for(let G=0;G1){const I=this._getJoinedRanges(N,z,A,x,j);for(let B=0;B{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreBrowserService=void 0;const u=c(844),h=c(8460),f=c(3656);class p extends u.Disposable{constructor(k,v,b){super(),this._textarea=k,this._window=v,this.mainDocument=b,this._isFocused=!1,this._cachedIsFocused=void 0,this._screenDprMonitor=new m(this._window),this._onDprChange=this.register(new h.EventEmitter),this.onDprChange=this._onDprChange.event,this._onWindowChange=this.register(new h.EventEmitter),this.onWindowChange=this._onWindowChange.event,this.register(this.onWindowChange((y=>this._screenDprMonitor.setWindow(y)))),this.register((0,h.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 h.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 h 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=h},8934:function(a,o,c){var u=this&&this.__decorate||function(w,k,v,b){var y,x=arguments.length,C=x<3?k:b===null?b=Object.getOwnPropertyDescriptor(k,v):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")C=Reflect.decorate(w,k,v,b);else for(var N=w.length-1;N>=0;N--)(y=w[N])&&(C=(x<3?y(C):x>3?y(k,v,C):y(k,v))||C);return x>3&&C&&Object.defineProperty(k,v,C),C},h=this&&this.__param||function(w,k){return function(v,b){k(v,b,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,b,y){return(0,p.getCoords)(window,w,k,v,b,this._charSizeService.hasValidSize,this._renderService.dimensions.css.cell.width,this._renderService.dimensions.css.cell.height,y)}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([h(0,f.IRenderService),h(1,f.ICharSizeService)],m)},3230:function(a,o,c){var u=this&&this.__decorate||function(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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 b=o.RenderService=class extends w.Disposable{get dimensions(){return this._renderer.value.dimensions}constructor(y,x,C,N,j,A,z,M){super(),this._rowCount=y,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,I)=>this._renderRows(D,I)),z),this.register(this._renderDebouncer),this.register(z.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(j.onDecorationRegistered((()=>this._fullRefresh()))),this.register(j.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(z.window,x),this.register(z.onWindowChange((D=>this._registerIntersectionObserver(D,x))))}_registerIntersectionObserver(y,x){if("IntersectionObserver"in y){const C=new y.IntersectionObserver((N=>this._handleIntersectionChange(N[N.length-1])),{threshold:0});C.observe(x),this._observerDisposable.value=(0,w.toDisposable)((()=>C.disconnect()))}}_handleIntersectionChange(y){this._isPaused=y.isIntersecting===void 0?y.intersectionRatio===0:!y.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(y,x,C=!1){this._isPaused?this._needsFullRefresh=!0:(C||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(y,x,this._rowCount))}_renderRows(y,x){this._renderer.value&&(y=Math.min(y,this._rowCount-1),x=Math.min(x,this._rowCount-1),this._renderer.value.renderRows(y,x),this._needsSelectionRefresh&&(this._renderer.value.handleSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRenderedViewportChange.fire({start:y,end:x}),this._onRender.fire({start:y,end:x}),this._isNextRenderRedrawOnly=!0)}resize(y,x){this._rowCount=x,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(y){this._renderer.value=y,this._renderer.value&&(this._renderer.value.onRequestRedraw((x=>this.refreshRows(x.start,x.end,!0))),this._needsSelectionRefresh=!0,this._fullRefresh())}addRefreshCallback(y){return this._renderDebouncer.addRefreshCallback(y)}_fullRefresh(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)}clearTextureAtlas(){var y,x;this._renderer.value&&((x=(y=this._renderer.value).clearTextureAtlas)==null||x.call(y),this._fullRefresh())}handleDevicePixelRatioChange(){this._charSizeService.measure(),this._renderer.value&&(this._renderer.value.handleDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1))}handleResize(y,x){this._renderer.value&&(this._isPaused?this._pausedResizeTask.set((()=>{var C;return(C=this._renderer.value)==null?void 0:C.handleResize(y,x)})):this._renderer.value.handleResize(y,x),this._fullRefresh())}handleCharSizeChanged(){var y;(y=this._renderer.value)==null||y.handleCharSizeChanged()}handleBlur(){var y;(y=this._renderer.value)==null||y.handleBlur()}handleFocus(){var y;(y=this._renderer.value)==null||y.handleFocus()}handleSelectionChanged(y,x,C){var N;this._selectionState.start=y,this._selectionState.end=x,this._selectionState.columnSelectMode=C,(N=this._renderer.value)==null||N.handleSelectionChanged(y,x,C)}handleCursorMove(){var y;(y=this._renderer.value)==null||y.handleCursorMove()}clear(){var y;(y=this._renderer.value)==null||y.clear()}};o.RenderService=b=u([h(2,v.IOptionsService),h(3,p.ICharSizeService),h(4,v.IDecorationService),h(5,v.IBufferService),h(6,p.ICoreBrowserService),h(7,p.IThemeService)],b)},9312:function(a,o,c){var u=this&&this.__decorate||function(z,M,D,I){var B,G=arguments.length,q=G<3?M:I===null?I=Object.getOwnPropertyDescriptor(M,D):I;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")q=Reflect.decorate(z,M,D,I);else for(var Q=z.length-1;Q>=0;Q--)(B=z[Q])&&(q=(G<3?B(q):G>3?B(M,D,q):B(M,D))||q);return G>3&&q&&Object.defineProperty(M,D,q),q},h=this&&this.__param||function(z,M){return function(D,I){M(D,I,z)}};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),b=c(6114),y=c(4841),x=c(511),C=c(2585),N=" ",j=new RegExp(N,"g");let A=o.SelectionService=class extends v.Disposable{constructor(z,M,D,I,B,G,q,Q,K){super(),this._element=z,this._screenElement=M,this._linkifier=D,this._bufferService=I,this._coreService=B,this._mouseService=G,this._optionsService=q,this._renderService=Q,this._coreBrowserService=K,this._dragScrollAmount=0,this._enabled=!0,this._workCell=new x.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 z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;return!(!z||!M||z[0]===M[0]&&z[1]===M[1])}get selectionText(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd;if(!z||!M)return"";const D=this._bufferService.buffer,I=[];if(this._activeSelectionMode===3){if(z[0]===M[0])return"";const B=z[0]B.replace(j," "))).join(b.isWindows?`\r `:` -`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(z){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&z&&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(z){const M=this._getMouseBufferCoords(z),D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(D&&I&&M)&&this._areCoordsInSelection(M,D,I)}isCellInSelection(z,M){const D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!D||!I)&&this._areCoordsInSelection([z,M],D,I)}_areCoordsInSelection(z,M,D){return z[1]>M[1]&&z[1]=M[0]&&z[0]=M[0]}_selectWordAtCursor(z,M){var B,G;const D=(G=(B=this._linkifier.currentLink)==null?void 0:B.link)==null?void 0:G.range;if(D)return this._model.selectionStart=[D.start.x-1,D.start.y-1],this._model.selectionStartLength=(0,y.getRangeLength)(D,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(z);return!!I&&(this._selectWordAt(I,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(z,M){this._model.clearSelection(),z=Math.max(z,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,z],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(z){this._model.handleTrim(z)&&this.refresh()}_getMouseBufferCoords(z){const M=this._mouseService.getCoords(z,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(z){let M=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,z,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(z){return b.isMac?z.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:z.shiftKey}handleMouseDown(z){if(this._mouseDownTimeStamp=z.timeStamp,(z.button!==2||!this.hasSelection)&&z.button===0){if(!this._enabled){if(!this.shouldForceSelection(z))return;z.stopPropagation()}z.preventDefault(),this._dragScrollAmount=0,this._enabled&&z.shiftKey?this._handleIncrementalClick(z):z.detail===1?this._handleSingleClick(z):z.detail===2?this._handleDoubleClick(z):z.detail===3&&this._handleTripleClick(z),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(z){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(z))}_handleSingleClick(z){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(z)?3:0,this._model.selectionStart=this._getMouseBufferCoords(z),!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(z){this._selectWordAtCursor(z,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(z){const M=this._getMouseBufferCoords(z);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(z){return z.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(z){if(z.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(z),!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(z.ydisp+this._bufferService.rows,z.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=z.ydisp),this.refresh()}}_handleMouseUp(z){const M=z.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&z.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const D=this._mouseService.getCoords(z,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){const I=(0,p.moveToCellSequence)(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,D=!(!z||!M||z[0]===M[0]&&z[1]===M[1]);D?z&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&z[0]===this._oldSelectionStart[0]&&z[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(z,M,D)):this._oldHasSelection&&this._fireOnSelectionChange(z,M,D)}_fireOnSelectionChange(z,M,D){this._oldSelectionStart=z,this._oldSelectionEnd=M,this._oldHasSelection=D,this._onSelectionChange.fire()}_handleBufferActivate(z){this.clearSelection(),this._trimListener.dispose(),this._trimListener=z.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(z,M){let D=M;for(let I=0;M>=I;I++){const B=z.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:B>1&&M!==I&&(D+=B-1)}return D}setSelection(z,M,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[z,M],this._model.selectionStartLength=D,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(z){this._isClickInSelection(z)||(this._selectWordAtCursor(z,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(z,M,D=!0,I=!0){if(z[0]>=this._bufferService.cols)return;const B=this._bufferService.buffer,G=B.lines.get(z[1]);if(!G)return;const U=B.translateBufferLineToString(z[1],!1);let Q=this._convertViewportColToCharacterIndex(G,z[0]),V=Q;const Z=z[0]-Q;let J=0,$=0,L=0,q=0;if(U.charAt(Q)===" "){for(;Q>0&&U.charAt(Q-1)===" ";)Q--;for(;V1&&(q+=ue-1,V+=ue-1);re>0&&Q>0&&!this._isCharWordSeparator(G.loadCell(re-1,this._workCell));){G.loadCell(re-1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,re--):se>1&&(L+=se-1,Q-=se-1),Q--,re--}for(;ie1&&(q+=se-1,V+=se-1),V++,ie++}}V++;let P=Q+Z-J+L,F=Math.min(this._bufferService.cols,V-Q+J+$-L-q);if(M||U.slice(Q,V).trim()!==""){if(D&&P===0&&G.getCodePoint(0)!==32){const re=B.lines.get(z[1]-1);if(re&&G.isWrapped&&re.getCodePoint(this._bufferService.cols-1)!==32){const ie=this._getWordAt([this._bufferService.cols-1,z[1]-1],!1,!0,!1);if(ie){const ue=this._bufferService.cols-ie.start;P-=ue,F+=ue}}}if(I&&P+F===this._bufferService.cols&&G.getCodePoint(this._bufferService.cols-1)!==32){const re=B.lines.get(z[1]+1);if(re!=null&&re.isWrapped&&re.getCodePoint(0)!==32){const ie=this._getWordAt([0,z[1]+1],!1,!1,!0);ie&&(F+=ie.length)}}return{start:P,length:F}}}_selectWordAt(z,M){const D=this._getWordAt(z,M);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,z[1]--;this._model.selectionStart=[D.start,z[1]],this._model.selectionStartLength=D.length}}_selectToWordAt(z){const M=this._getWordAt(z,!0);if(M){let D=z[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(z){return z.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(z.getChars())>=0}_selectLineAt(z){const M=this._bufferService.buffer.getWrappedRangeForLine(z),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,y.getRangeLength)(D,this._bufferService.cols)}};o.SelectionService=A=u([h(3,C.IBufferService),h(4,C.ICoreService),h(5,w.IMouseService),h(6,C.IOptionsService),h(7,w.IRenderService),h(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,z,M,D){var I,B=arguments.length,G=B<3?z:D===null?D=Object.getOwnPropertyDescriptor(z,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(A,z,M,D);else for(var U=A.length-1;U>=0;U--)(I=A[U])&&(G=(B<3?I(G):B>3?I(z,M,G):I(z,M))||G);return B>3&&G&&Object.defineProperty(z,M,G),G},h=this&&this.__param||function(A,z){return function(M,D){z(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"),b=p.css.toColor("#000000"),y=p.css.toColor("#ffffff"),x=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")],z=[0,95,135,175,215,255];for(let M=0;M<216;M++){const D=z[M/36%6|0],I=z[M/6%6|0],B=z[M%6];A.push({css:p.channels.toCss(D,I,B),rgba:p.channels.toRgba(D,I,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:b,cursor:y,cursorAccent:x,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(b,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(b,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 z=this._colors;if(z.foreground=j(A.foreground,v),z.background=j(A.background,b),z.cursor=j(A.cursor,y),z.cursorAccent=j(A.cursorAccent,x),z.selectionBackgroundTransparent=j(A.selectionBackground,C),z.selectionBackgroundOpaque=p.color.blend(z.background,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundTransparent=j(A.selectionInactiveBackground,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundOpaque=p.color.blend(z.background,z.selectionInactiveBackgroundTransparent),z.selectionForeground=A.selectionForeground?j(A.selectionForeground,p.NULL_COLOR):void 0,z.selectionForeground===p.NULL_COLOR&&(z.selectionForeground=void 0),p.color.isOpaque(z.selectionBackgroundTransparent)&&(z.selectionBackgroundTransparent=p.color.opacity(z.selectionBackgroundTransparent,.3)),p.color.isOpaque(z.selectionInactiveBackgroundTransparent)&&(z.selectionInactiveBackgroundTransparent=p.color.opacity(z.selectionInactiveBackgroundTransparent,.3)),z.ansi=o.DEFAULT_ANSI_COLORS.slice(),z.ansi[0]=j(A.black,o.DEFAULT_ANSI_COLORS[0]),z.ansi[1]=j(A.red,o.DEFAULT_ANSI_COLORS[1]),z.ansi[2]=j(A.green,o.DEFAULT_ANSI_COLORS[2]),z.ansi[3]=j(A.yellow,o.DEFAULT_ANSI_COLORS[3]),z.ansi[4]=j(A.blue,o.DEFAULT_ANSI_COLORS[4]),z.ansi[5]=j(A.magenta,o.DEFAULT_ANSI_COLORS[5]),z.ansi[6]=j(A.cyan,o.DEFAULT_ANSI_COLORS[6]),z.ansi[7]=j(A.white,o.DEFAULT_ANSI_COLORS[7]),z.ansi[8]=j(A.brightBlack,o.DEFAULT_ANSI_COLORS[8]),z.ansi[9]=j(A.brightRed,o.DEFAULT_ANSI_COLORS[9]),z.ansi[10]=j(A.brightGreen,o.DEFAULT_ANSI_COLORS[10]),z.ansi[11]=j(A.brightYellow,o.DEFAULT_ANSI_COLORS[11]),z.ansi[12]=j(A.brightBlue,o.DEFAULT_ANSI_COLORS[12]),z.ansi[13]=j(A.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),z.ansi[14]=j(A.brightCyan,o.DEFAULT_ANSI_COLORS[14]),z.ansi[15]=j(A.brightWhite,o.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const M=Math.min(z.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),h=c(844);class f extends h.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 b=w-1;b>=0;b--)this.set(m+b+k,this.get(m+b));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,h=5){if(typeof u!="object")return u;const f=Array.isArray(u)?[]:{};for(const p in u)f[p]=h<=1?u[p]:u[p]&&c(u[p],h-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,h=0,f=0;var p,m,w,k,v;function b(x){const C=x.toString(16);return C.length<2?"0"+C:C}function y(x,C){return x>>0},x.toColor=function(C,N,j,A){return{css:x.toCss(C,N,j,A),rgba:x.toRgba(C,N,j,A)}}})(p||(o.channels=p={})),(function(x){function C(N,j){return f=Math.round(255*j),[c,u,h]=v.toChannels(N.rgba),{css:p.toCss(c,u,h,f),rgba:p.toRgba(c,u,h,f)}}x.blend=function(N,j){if(f=(255&j.rgba)/255,f===1)return{css:j.css,rgba:j.rgba};const A=j.rgba>>24&255,z=j.rgba>>16&255,M=j.rgba>>8&255,D=N.rgba>>24&255,I=N.rgba>>16&255,B=N.rgba>>8&255;return c=D+Math.round((A-D)*f),u=I+Math.round((z-I)*f),h=B+Math.round((M-B)*f),{css:p.toCss(c,u,h),rgba:p.toRgba(c,u,h)}},x.isOpaque=function(N){return(255&N.rgba)==255},x.ensureContrastRatio=function(N,j,A){const z=v.ensureContrastRatio(N.rgba,j.rgba,A);if(z)return p.toColor(z>>24&255,z>>16&255,z>>8&255)},x.opaque=function(N){const j=(255|N.rgba)>>>0;return[c,u,h]=v.toChannels(j),{css:p.toCss(c,u,h),rgba:j}},x.opacity=C,x.multiplyOpacity=function(N,j){return f=255&N.rgba,C(N,f*j/255)},x.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(o.color=m={})),(function(x){let C,N;try{const j=document.createElement("canvas");j.width=1,j.height=1;const A=j.getContext("2d",{willReadFrequently:!0});A&&(C=A,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}x.toColor=function(j){if(j.match(/#[\da-f]{3,8}/i))switch(j.length){case 4:return c=parseInt(j.slice(1,2).repeat(2),16),u=parseInt(j.slice(2,3).repeat(2),16),h=parseInt(j.slice(3,4).repeat(2),16),p.toColor(c,u,h);case 5:return c=parseInt(j.slice(1,2).repeat(2),16),u=parseInt(j.slice(2,3).repeat(2),16),h=parseInt(j.slice(3,4).repeat(2),16),f=parseInt(j.slice(4,5).repeat(2),16),p.toColor(c,u,h,f);case 7:return{css:j,rgba:(parseInt(j.slice(1),16)<<8|255)>>>0};case 9:return{css:j,rgba:parseInt(j.slice(1),16)>>>0}}const A=j.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]),h=parseInt(A[3]),f=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(c,u,h,f);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=j,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,u,h,f]=C.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,h,f),css:j}}})(w||(o.css=w={})),(function(x){function C(N,j,A){const z=N/255,M=j/255,D=A/255;return .2126*(z<=.03928?z/12.92:Math.pow((z+.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))}x.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},x.relativeLuminance2=C})(k||(o.rgb=k={})),(function(x){function C(j,A,z){const M=j>>24&255,D=j>>16&255,I=j>>8&255;let B=A>>24&255,G=A>>16&255,U=A>>8&255,Q=y(k.relativeLuminance2(B,G,U),k.relativeLuminance2(M,D,I));for(;Q0||G>0||U>0);)B-=Math.max(0,Math.ceil(.1*B)),G-=Math.max(0,Math.ceil(.1*G)),U-=Math.max(0,Math.ceil(.1*U)),Q=y(k.relativeLuminance2(B,G,U),k.relativeLuminance2(M,D,I));return(B<<24|G<<16|U<<8|255)>>>0}function N(j,A,z){const M=j>>24&255,D=j>>16&255,I=j>>8&255;let B=A>>24&255,G=A>>16&255,U=A>>8&255,Q=y(k.relativeLuminance2(B,G,U),k.relativeLuminance2(M,D,I));for(;Q>>0}x.blend=function(j,A){if(f=(255&A)/255,f===1)return A;const z=A>>24&255,M=A>>16&255,D=A>>8&255,I=j>>24&255,B=j>>16&255,G=j>>8&255;return c=I+Math.round((z-I)*f),u=B+Math.round((M-B)*f),h=G+Math.round((D-G)*f),p.toRgba(c,u,h)},x.ensureContrastRatio=function(j,A,z){const M=k.relativeLuminance(j>>8),D=k.relativeLuminance(A>>8);if(y(M,D)>8));if(Uy(M,k.relativeLuminance(Q>>8))?G:Q}return G}const I=N(j,A,z),B=y(M,k.relativeLuminance(I>>8));if(By(M,k.relativeLuminance(G>>8))?I:G}return I}},x.reduceLuminance=C,x.increaseLuminance=N,x.toChannels=function(j){return[j>>24&255,j>>16&255,j>>8&255,255&j]}})(v||(o.rgba=v={})),o.toPaddedHex=b,o.contrastRatio=y},8969:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=c(844),h=c(2585),f=c(4348),p=c(7866),m=c(744),w=c(7302),k=c(6975),v=c(8460),b=c(1753),y=c(1480),x=c(7994),C=c(9282),N=c(5435),j=c(5981),A=c(2660);let z=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var B;(B=this._onScrollApi)==null||B.fire(I.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(I){for(const B in I)this.optionsService.options[B]=I[B]}constructor(I){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(I)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(y.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(x.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(h.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 j.WriteBuffer(((B,G)=>this._inputHandler.parse(B,G)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,B){this._writeBuffer.write(I,B)}writeSync(I,B){this._logService.logLevel<=h.LogLevelEnum.WARN&&!z&&(this._logService.warn("writeSync is unreliable and will be removed soon."),z=!0),this._writeBuffer.writeSync(I,B)}input(I,B=!0){this.coreService.triggerDataEvent(I,B)}resize(I,B){isNaN(I)||isNaN(B)||(I=Math.max(I,m.MINIMUM_COLS),B=Math.max(B,m.MINIMUM_ROWS),this._bufferService.resize(I,B))}scroll(I,B=!1){this._bufferService.scroll(I,B)}scrollLines(I,B,G){this._bufferService.scrollLines(I,B,G)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const B=I-this._bufferService.buffer.ydisp;B!==0&&this.scrollLines(B)}registerEscHandler(I,B){return this._inputHandler.registerEscHandler(I,B)}registerDcsHandler(I,B){return this._inputHandler.registerDcsHandler(I,B)}registerCsiHandler(I,B){return this._inputHandler.registerCsiHandler(I,B)}registerOscHandler(I,B){return this._inputHandler.registerOscHandler(I,B)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const B=this.optionsService.rawOptions.windowsPty;B&&B.buildNumber!==void 0&&B.buildNumber!==void 0?I=B.backend==="conpty"&&B.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const B of I)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(h)))},o.runAndSubscribe=function(c,u){return u(void 0),c((h=>u(h)))}},5435:function(a,o,c){var u=this&&this.__decorate||function(J,$,L,q){var P,F=arguments.length,re=F<3?$:q===null?q=Object.getOwnPropertyDescriptor($,L):q;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(J,$,L,q);else for(var ie=J.length-1;ie>=0;ie--)(P=J[ie])&&(re=(F<3?P(re):F>3?P($,L,re):P($,L))||re);return F>3&&re&&Object.defineProperty($,L,re),re},h=this&&this.__param||function(J,$){return function(L,q){$(L,q,J)}};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),b=c(8460),y=c(643),x=c(511),C=c(3734),N=c(2585),j=c(1480),A=c(6242),z=c(6351),M=c(5941),D={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function B(J,$){if(J>24)return $.setWinLines||!1;switch(J){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 G;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(G||(o.WindowsOptionsReportType=G={}));let U=0;class Q extends w.Disposable{getAttrData(){return this._curAttrData}constructor($,L,q,P,F,re,ie,ue,se=new m.EscapeSequenceParser){super(),this._bufferService=$,this._charsetService=L,this._coreService=q,this._logService=P,this._optionsService=F,this._oscLinkService=re,this._coreMouseService=ie,this._unicodeService=ue,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new x.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 b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.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 V(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((K=>this._activeBuffer=K.activeBuffer))),this._parser.setCsiHandlerFallback(((K,oe)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(K),params:oe.toArray()})})),this._parser.setEscHandlerFallback((K=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(K)})})),this._parser.setExecuteHandlerFallback((K=>{this._logService.debug("Unknown EXECUTE code: ",{code:K})})),this._parser.setOscHandlerFallback(((K,oe,ce)=>{this._logService.debug("Unknown OSC code: ",{identifier:K,action:oe,data:ce})})),this._parser.setDcsHandlerFallback(((K,oe,ce)=>{oe==="HOOK"&&(ce=ce.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(K),action:oe,payload:ce})})),this._parser.setPrintHandler(((K,oe,ce)=>this.print(K,oe,ce))),this._parser.registerCsiHandler({final:"@"},(K=>this.insertChars(K))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(K=>this.scrollLeft(K))),this._parser.registerCsiHandler({final:"A"},(K=>this.cursorUp(K))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(K=>this.scrollRight(K))),this._parser.registerCsiHandler({final:"B"},(K=>this.cursorDown(K))),this._parser.registerCsiHandler({final:"C"},(K=>this.cursorForward(K))),this._parser.registerCsiHandler({final:"D"},(K=>this.cursorBackward(K))),this._parser.registerCsiHandler({final:"E"},(K=>this.cursorNextLine(K))),this._parser.registerCsiHandler({final:"F"},(K=>this.cursorPrecedingLine(K))),this._parser.registerCsiHandler({final:"G"},(K=>this.cursorCharAbsolute(K))),this._parser.registerCsiHandler({final:"H"},(K=>this.cursorPosition(K))),this._parser.registerCsiHandler({final:"I"},(K=>this.cursorForwardTab(K))),this._parser.registerCsiHandler({final:"J"},(K=>this.eraseInDisplay(K,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(K=>this.eraseInDisplay(K,!0))),this._parser.registerCsiHandler({final:"K"},(K=>this.eraseInLine(K,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(K=>this.eraseInLine(K,!0))),this._parser.registerCsiHandler({final:"L"},(K=>this.insertLines(K))),this._parser.registerCsiHandler({final:"M"},(K=>this.deleteLines(K))),this._parser.registerCsiHandler({final:"P"},(K=>this.deleteChars(K))),this._parser.registerCsiHandler({final:"S"},(K=>this.scrollUp(K))),this._parser.registerCsiHandler({final:"T"},(K=>this.scrollDown(K))),this._parser.registerCsiHandler({final:"X"},(K=>this.eraseChars(K))),this._parser.registerCsiHandler({final:"Z"},(K=>this.cursorBackwardTab(K))),this._parser.registerCsiHandler({final:"`"},(K=>this.charPosAbsolute(K))),this._parser.registerCsiHandler({final:"a"},(K=>this.hPositionRelative(K))),this._parser.registerCsiHandler({final:"b"},(K=>this.repeatPrecedingCharacter(K))),this._parser.registerCsiHandler({final:"c"},(K=>this.sendDeviceAttributesPrimary(K))),this._parser.registerCsiHandler({prefix:">",final:"c"},(K=>this.sendDeviceAttributesSecondary(K))),this._parser.registerCsiHandler({final:"d"},(K=>this.linePosAbsolute(K))),this._parser.registerCsiHandler({final:"e"},(K=>this.vPositionRelative(K))),this._parser.registerCsiHandler({final:"f"},(K=>this.hVPosition(K))),this._parser.registerCsiHandler({final:"g"},(K=>this.tabClear(K))),this._parser.registerCsiHandler({final:"h"},(K=>this.setMode(K))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(K=>this.setModePrivate(K))),this._parser.registerCsiHandler({final:"l"},(K=>this.resetMode(K))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(K=>this.resetModePrivate(K))),this._parser.registerCsiHandler({final:"m"},(K=>this.charAttributes(K))),this._parser.registerCsiHandler({final:"n"},(K=>this.deviceStatus(K))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(K=>this.deviceStatusPrivate(K))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(K=>this.softReset(K))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(K=>this.setCursorStyle(K))),this._parser.registerCsiHandler({final:"r"},(K=>this.setScrollRegion(K))),this._parser.registerCsiHandler({final:"s"},(K=>this.saveCursor(K))),this._parser.registerCsiHandler({final:"t"},(K=>this.windowOptions(K))),this._parser.registerCsiHandler({final:"u"},(K=>this.restoreCursor(K))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(K=>this.insertColumns(K))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(K=>this.deleteColumns(K))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(K=>this.selectProtected(K))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(K=>this.requestMode(K,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(K=>this.requestMode(K,!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((K=>(this.setTitle(K),this.setIconName(K),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((K=>this.setIconName(K)))),this._parser.registerOscHandler(2,new A.OscHandler((K=>this.setTitle(K)))),this._parser.registerOscHandler(4,new A.OscHandler((K=>this.setOrReportIndexedColor(K)))),this._parser.registerOscHandler(8,new A.OscHandler((K=>this.setHyperlink(K)))),this._parser.registerOscHandler(10,new A.OscHandler((K=>this.setOrReportFgColor(K)))),this._parser.registerOscHandler(11,new A.OscHandler((K=>this.setOrReportBgColor(K)))),this._parser.registerOscHandler(12,new A.OscHandler((K=>this.setOrReportCursorColor(K)))),this._parser.registerOscHandler(104,new A.OscHandler((K=>this.restoreIndexedColor(K)))),this._parser.registerOscHandler(110,new A.OscHandler((K=>this.restoreFgColor(K)))),this._parser.registerOscHandler(111,new A.OscHandler((K=>this.restoreBgColor(K)))),this._parser.registerOscHandler(112,new A.OscHandler((K=>this.restoreCursorColor(K)))),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 K in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:K},(()=>this.selectCharset("("+K))),this._parser.registerEscHandler({intermediates:")",final:K},(()=>this.selectCharset(")"+K))),this._parser.registerEscHandler({intermediates:"*",final:K},(()=>this.selectCharset("*"+K))),this._parser.registerEscHandler({intermediates:"+",final:K},(()=>this.selectCharset("+"+K))),this._parser.registerEscHandler({intermediates:"-",final:K},(()=>this.selectCharset("-"+K))),this._parser.registerEscHandler({intermediates:".",final:K},(()=>this.selectCharset("."+K))),this._parser.registerEscHandler({intermediates:"/",final:K},(()=>this.selectCharset("/"+K)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((K=>(this._logService.error("Parsing error: ",K),K))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new z.DcsHandler(((K,oe)=>this.requestStatusString(K,oe))))}_preserveStack($,L,q,P){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=q,this._parseStack.position=P}_logSlowResolvingAsync($){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([$,new Promise(((L,q)=>setTimeout((()=>q("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse($,L){let q,P=this._activeBuffer.x,F=this._activeBuffer.y,re=0;const ie=this._parseStack.paused;if(ie){if(q=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(q),q;P=this._parseStack.cursorStartX,F=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>I&&(re=this._parseStack.position+I)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?` "${$}"`:` "${Array.prototype.map.call($,(K=>String.fromCharCode(K))).join("")}"`),typeof $=="string"?$.split("").map((K=>K.charCodeAt(0))):$),this._parseBuffer.length<$.length&&this._parseBuffer.lengthI)for(let K=re;K<$.length;K+=I){const oe=K+I<$.length?K+I:$.length,ce=typeof $=="string"?this._stringDecoder.decode($.substring(K,oe),this._parseBuffer):this._utf8Decoder.decode($.subarray(K,oe),this._parseBuffer);if(q=this._parser.parse(this._parseBuffer,ce))return this._preserveStack(P,F,ce,K),this._logSlowResolvingAsync(q),q}else if(!ie){const K=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer);if(q=this._parser.parse(this._parseBuffer,K))return this._preserveStack(P,F,K,0),this._logSlowResolvingAsync(q),q}this._activeBuffer.x===P&&this._activeBuffer.y===F||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),se=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);se0&&ce.getWidth(this._activeBuffer.x-1)===2&&ce.setCellFromCodepoint(this._activeBuffer.x-1,0,1,oe);let pe=this._parser.precedingJoinState;for(let ve=L;veue){if(se){const Te=ce;let $e=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),ce=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ye>0&&ce instanceof v.BufferLine&&ce.copyCellsFrom(Te,$e,0,Ye,!1);$e=0;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}else if(K&&(ce.insertCells(this._activeBuffer.x,F-Ye,this._activeBuffer.getNullCell(oe)),ce.getWidth(ue-1)===2&&ce.setCellFromCodepoint(ue-1,y.NULL_CELL_CODE,y.NULL_CELL_WIDTH,oe)),ce.setCellFromCodepoint(this._activeBuffer.x++,P,F,oe),F>0)for(;--F;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,oe)}this._parser.precedingJoinState=pe,this._activeBuffer.x0&&ce.getWidth(this._activeBuffer.x)===0&&!ce.hasContent(this._activeBuffer.x)&&ce.setCellFromCodepoint(this._activeBuffer.x,0,1,oe),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler($,L){return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,L):this._parser.registerCsiHandler($,(q=>!B(q.params[0],this._optionsService.rawOptions.windowOptions)||L(q)))}registerDcsHandler($,L){return this._parser.registerDcsHandler($,new z.DcsHandler(L))}registerEscHandler($,L){return this._parser.registerEscHandler($,L)}registerOscHandler($,L){return this._parser.registerOscHandler($,new A.OscHandler(L))}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 L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.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($,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=$,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=$,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor($,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+$,this._activeBuffer.y+L)}cursorUp($){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,$.params[0]||1)):this._moveCursor(0,-($.params[0]||1)),!0}cursorDown($){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,$.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 L=$.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected($){const L=$.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine($,L,q,P=!1,F=!1){const re=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);re.replaceCells(L,q,this._activeBuffer.getNullCell(this._eraseAttrData()),F),P&&(re.isWrapped=!1)}_resetBufferLine($,L=!1){const q=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);q&&(q.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+$),q.isWrapped=!1)}eraseInDisplay($,L=!1){let q;switch(this._restrictCursor(this._bufferService.cols),$.params[0]){case 0:for(q=this._activeBuffer.y,this._dirtyRowTracker.markDirty(q),this._eraseInBufferLine(q++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,L);q=this._bufferService.cols&&(this._activeBuffer.lines.get(q+1).isWrapped=!1);q--;)this._resetBufferLine(q,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(q=this._bufferService.rows,this._dirtyRowTracker.markDirty(q-1);q--;)this._resetBufferLine(q,L);this._dirtyRowTracker.markDirty(0);break;case 3:const P=this._activeBuffer.lines.length-this._bufferService.rows;P>0&&(this._activeBuffer.lines.trimStart(P),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-P,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-P,0),this._onScroll.fire(0))}return!0}eraseInLine($,L=!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,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines($){this._restrictCursor();let L=$.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 se=ue;for(let K=1;K0||(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 L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){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 L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){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[L]===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($,L){const q=this._coreService.decPrivateModes,{activeProtocol:P,activeEncoding:F}=this._coreMouseService,re=this._coreService,{buffers:ie,cols:ue}=this._bufferService,{active:se,alt:K}=ie,oe=this._optionsService.rawOptions,ce=Fe=>Fe?1:2,pe=$.params[0];return ve=pe,Me=L?pe===2?4:pe===4?ce(re.modes.insertMode):pe===12?3:pe===20?ce(oe.convertEol):0:pe===1?ce(q.applicationCursorKeys):pe===3?oe.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:pe===6?ce(q.origin):pe===7?ce(q.wraparound):pe===8?3:pe===9?ce(P==="X10"):pe===12?ce(oe.cursorBlink):pe===25?ce(!re.isCursorHidden):pe===45?ce(q.reverseWraparound):pe===66?ce(q.applicationKeypad):pe===67?4:pe===1e3?ce(P==="VT200"):pe===1002?ce(P==="DRAG"):pe===1003?ce(P==="ANY"):pe===1004?ce(q.sendFocus):pe===1005?4:pe===1006?ce(F==="SGR"):pe===1015?4:pe===1016?ce(F==="SGR_PIXELS"):pe===1048?1:pe===47||pe===1047||pe===1049?ce(se===K):pe===2004?ce(q.bracketedPasteMode):0,re.triggerDataEvent(`${f.C0.ESC}[${L?"":"?"}${ve};${Me}$y`),!0;var ve,Me}_updateAttrColor($,L,q,P,F){return L===2?($|=50331648,$&=-16777216,$|=C.AttributeData.fromColorRGB([q,P,F])):L===5&&($&=-50331904,$|=33554432|255&q),$}_extractColor($,L,q){const P=[0,0,-1,0,0,0];let F=0,re=0;do{if(P[re+F]=$.params[L+re],$.hasSubParams(L+re)){const ie=$.getSubParams(L+re);let ue=0;do P[1]===5&&(F=1),P[re+ue+1+F]=ie[ue];while(++ue=2||P[1]===2&&re+F>=5)break;P[1]&&(F=1)}while(++re+L<$.length&&re+F5)&&($=1),L.extended.underlineStyle=$,L.fg|=268435456,$===0&&(L.fg&=-268435457),L.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 L=$.length;let q;const P=this._curAttrData;for(let F=0;F=30&&q<=37?(P.fg&=-50331904,P.fg|=16777216|q-30):q>=40&&q<=47?(P.bg&=-50331904,P.bg|=16777216|q-40):q>=90&&q<=97?(P.fg&=-50331904,P.fg|=16777224|q-90):q>=100&&q<=107?(P.bg&=-50331904,P.bg|=16777224|q-100):q===0?this._processSGR0(P):q===1?P.fg|=134217728:q===3?P.bg|=67108864:q===4?(P.fg|=268435456,this._processUnderline($.hasSubParams(F)?$.getSubParams(F)[0]:1,P)):q===5?P.fg|=536870912:q===7?P.fg|=67108864:q===8?P.fg|=1073741824:q===9?P.fg|=2147483648:q===2?P.bg|=134217728:q===21?this._processUnderline(2,P):q===22?(P.fg&=-134217729,P.bg&=-134217729):q===23?P.bg&=-67108865:q===24?(P.fg&=-268435457,this._processUnderline(0,P)):q===25?P.fg&=-536870913:q===27?P.fg&=-67108865:q===28?P.fg&=-1073741825:q===29?P.fg&=2147483647:q===39?(P.fg&=-67108864,P.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):q===49?(P.bg&=-67108864,P.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):q===38||q===48||q===58?F+=this._extractColor($,F,P):q===53?P.bg|=1073741824:q===55?P.bg&=-1073741825:q===59?(P.extended=P.extended.clone(),P.extended.underlineColor=-1,P.updateExtended()):q===100?(P.fg&=-67108864,P.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,P.bg&=-67108864,P.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",q);return!0}deviceStatus($){switch($.params[0]){case 5:this._coreService.triggerDataEvent(`${f.C0.ESC}[0n`);break;case 6:const L=this._activeBuffer.y+1,q=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${L};${q}R`)}return!0}deviceStatusPrivate($){if($.params[0]===6){const L=this._activeBuffer.y+1,q=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${L};${q}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 L=$.params[0]||1;switch(L){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 q=L%2==1;return this._optionsService.options.cursorBlink=q,!0}setScrollRegion($){const L=$.params[0]||1;let q;return($.length<2||(q=$.params[1])>this._bufferService.rows||q===0)&&(q=this._bufferService.rows),q>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=q-1,this._setCursor(0,0)),!0}windowOptions($){if(!B($.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=$.length>1?$.params[1]:0;switch($.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(G.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(G.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:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==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 L=[],q=$.split(";");for(;q.length>1;){const P=q.shift(),F=q.shift();if(/^\d+$/.exec(P)){const re=parseInt(P);if(Z(re))if(F==="?")L.push({type:0,index:re});else{const ie=(0,M.parseColor)(F);ie&&L.push({type:1,index:re,color:ie})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink($){const L=$.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink($,L){this._getCurrentLinkId()&&this._finishHyperlink();const q=$.split(":");let P;const F=q.findIndex((re=>re.startsWith("id=")));return F!==-1&&(P=q[F].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:P,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor($,L){const q=$.split(";");for(let P=0;P=this._specialColors.length);++P,++L)if(q[P]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const F=(0,M.parseColor)(q[P]);F&&this._onColor.fire([{type:1,index:this._specialColors[L],color:F}])}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 L=[],q=$.split(";");for(let P=0;P=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 x.CellData;$.content=4194373,$.fg=this._curAttrData.fg,$.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${f.C0.ESC}${F}${f.C0.ESC}\\`),!0))($==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:$==='"p'?'P1$r61;1"p':$==="r"?`P1$r${q.scrollTop+1};${q.scrollBottom+1}r`:$==="m"?"P1$r0m":$===" q"?`P1$r${{block:2,underline:4,bar:6}[P.cursorStyle]-(P.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty($,L){this._dirtyRowTracker.markRangeDirty($,L)}}o.InputHandler=Q;let V=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){Jthis.end&&(this.end=J)}markRangeDirty(J,$){J>$&&(U=J,J=$,$=U),Jthis.end&&(this.end=$)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(J){return 0<=J&&J<256}V=u([h(0,N.IBufferService)],V)},844:(a,o)=>{function c(u){for(const h of u)h.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 h=this._disposables.indexOf(u);h!==-1&&this._disposables.splice(h,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var h;this._isDisposed||u===this._value||((h=this._value)==null||h.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(h,f,p){this._data[h]||(this._data[h]={}),this._data[h][f]=p}get(h,f){return this._data[h]?this._data[h][f]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(u,h,f,p,m){this._data.get(u,h)||this._data.set(u,h,new c),this._data.get(u,h).set(f,p,m)}get(u,h,f,p){var m;return(m=this._data.get(u,h))==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 h=c.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[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 h=this._getKey(u);if(h===void 0||(c=this._search(h),c===-1)||this._getKey(this._array[c])!==h)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 h(this._array[c]);while(++c=h;){let p=h+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}h=p+1}}return h}}},7226:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=c(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-w))}ms`),void this._start();v=b}this.clear()}}class f extends h{_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 h{_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(h){const f=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),p=f==null?void 0:f.get(h.cols-1),m=h.buffer.lines.get(h.buffer.ybase+h.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),h=c(7226),f=c(3734),p=c(8437),m=c(4634),w=c(511),k=c(643),v=c(4863),b=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(y,x,C){this._hasScrollback=y,this._optionsService=x,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=b.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 h.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(y){return y?(this._nullCell.fg=y.fg,this._nullCell.bg=y.bg,this._nullCell.extended=y.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(y){return y?(this._whitespaceCell.fg=y.fg,this._whitespaceCell.bg=y.bg,this._whitespaceCell.extended=y.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(y,x){return new p.BufferLine(this._bufferService.cols,this.getNullCell(y),x)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const y=this.ybase+this.y-this.ydisp;return y>=0&&yo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:x}fillViewportRows(y){if(this.lines.length===0){y===void 0&&(y=p.DEFAULT_ATTR_DATA);let x=this._rows;for(;x--;)this.lines.push(this.getBlankLine(y))}}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(y,x){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const j=this._getCorrectBufferLength(x);if(j>this.lines.maxLength&&(this.lines.maxLength=j),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(y,C)));else for(let z=this._rows;z>x;z--)this.lines.length>x+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(j0&&(this.lines.trimStart(z),this.ybase=Math.max(this.ybase-z,0),this.ydisp=Math.max(this.ydisp-z,0),this.savedY=Math.max(this.savedY-z,0)),this.lines.maxLength=j}this.x=Math.min(this.x,y-1),this.y=Math.min(this.y,x-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,y-1),this.scrollTop=0}if(this.scrollBottom=x-1,this._isReflowEnabled&&(this._reflow(y,x),this._cols>y))for(let A=0;A.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let y=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,y=!1);let x=0;for(;this._memoryCleanupPosition100)return!0;return y}get _isReflowEnabled(){const y=this._optionsService.rawOptions.windowsPty;return y&&y.buildNumber?this._hasScrollback&&y.backend==="conpty"&&y.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(y,x){this._cols!==y&&(y>this._cols?this._reflowLarger(y,x):this._reflowSmaller(y,x))}_reflowLarger(y,x){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,y,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(y,x,N.countRemoved)}}_reflowLargerAdjustViewport(y,x,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let j=C;for(;j-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;A--){let z=this.lines.get(A);if(!z||!z.isWrapped&&z.getTrimmedLength()<=y)continue;const M=[z];for(;z.isWrapped&&A>0;)z=this.lines.get(--A),M.unshift(z);const D=this.ybase+this.y;if(D>=A&&D0&&(N.push({start:A+M.length+j,newLines:Q}),j+=Q.length),M.push(...Q);let V=B.length-1,Z=B[V];Z===0&&(V--,Z=B[V]);let J=M.length-G-1,$=I;for(;J>=0;){const q=Math.min($,Z);if(M[V]===void 0)break;if(M[V].copyCellsFrom(M[J],$-q,Z-q,q,!0),Z-=q,Z===0&&(V--,Z=B[V]),$-=q,$===0){J--;const P=Math.max(J,0);$=(0,m.getWrappedLineTrimmedLength)(M,P,this._cols)}}for(let q=0;q0;)this.ybase===0?this.y0){const A=[],z=[];for(let V=0;V=0;V--)if(B&&B.start>D+G){for(let Z=B.newLines.length-1;Z>=0;Z--)this.lines.set(V--,B.newLines[Z]);V++,A.push({index:D+1,amount:B.newLines.length}),G+=B.newLines.length,B=N[++I]}else this.lines.set(V,z[D--]);let U=0;for(let V=A.length-1;V>=0;V--)A[V].index+=U,this.lines.onInsertEmitter.fire(A[V]),U+=A[V].amount;const Q=Math.max(0,M+j-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(y,x,C=0,N){const j=this.lines.get(y);return j?j.translateToString(x,C,N):""}getWrappedRangeForLine(y){let x=y,C=y;for(;x>0&&this.lines.get(x).isWrapped;)x--;for(;C+10;);return y>=this._cols?this._cols-1:y<0?0:y}nextStop(y){for(y==null&&(y=this.x);!this.tabs[++y]&&y=this._cols?this._cols-1:y<0?0:y}clearMarkers(y){this._isClearing=!0;for(let x=0;x{x.line-=C,x.line<0&&x.dispose()}))),x.register(this.lines.onInsert((C=>{x.line>=C.index&&(x.line+=C.amount)}))),x.register(this.lines.onDelete((C=>{x.line>=C.index&&x.lineC.index&&(x.line-=C.amount)}))),x.register(x.onDispose((()=>this._removeMarker(x)))),x}_removeMarker(y){this._isClearing||this.markers.splice(this.markers.indexOf(y),1)}}},8437:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=c(3734),h=c(511),f=c(643),p=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class w{constructor(v,b,y=!1){this.isWrapped=y,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const x=b||h.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let C=0;C>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):y]}set(v,b){this._data[3*v+1]=b[f.CHAR_DATA_ATTR_INDEX],b[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[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 b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,y,x){268435456&x.bg&&(this._extendedAttrs[v]=x.extended),this._data[3*v+0]=b|y<<22,this._data[3*v+1]=x.fg,this._data[3*v+2]=x.bg}addCodepointToCell(v,b,y){let x=this._data[3*v+0];2097152&x?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&x?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&x)+(0,p.stringFromCodePoint)(b),x&=-2097152,x|=2097152):x=b|4194304,y&&(x&=-12582913,x|=y<<22),this._data[3*v+0]=x}insertCells(v,b,y){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,y),b=0;--C)this.setCell(v+b+C,this.loadCell(v+C,x));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*y)this._data=new Uint32Array(this._data.buffer,0,y);else{const x=new Uint32Array(y);x.set(this._data),this._data=x}for(let x=this.length;x=v&&delete this._combined[j]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=v&&delete this._extendedAttrs[j]}}return this.length=v,4*y*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,b,y,x,C){const N=v._data;if(C)for(let A=x-1;A>=0;A--){for(let z=0;z<3;z++)this._data[3*(y+A)+z]=N[3*(b+A)+z];268435456&N[3*(b+A)+2]&&(this._extendedAttrs[y+A]=v._extendedAttrs[b+A])}else for(let A=0;A=b&&(this._combined[z-b+y]=v._combined[z])}}translateToString(v,b,y,x){b=b??0,y=y??this.length,v&&(y=Math.min(y,this.getTrimmedLength())),x&&(x.length=0);let C="";for(;b>22||1}return x&&x.push(b),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,h,f){if(h===u.length-1)return u[h].getTrimmedLength();const p=!u[h].hasContent(f-1)&&u[h].getWidth(f-1)===1,m=u[h+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,h,f,p,m){const w=[];for(let k=0;k=k&&p0&&(z>x||y[z].getTrimmedLength()===0);z--)A++;A>0&&(w.push(k+y.length-A),w.push(A)),k+=y.length-1}return w},o.reflowLargerCreateNewLayout=function(u,h){const f=[];let p=0,m=h[p],w=0;for(let k=0;kc(u,y,h))).reduce(((b,y)=>b+y));let w=0,k=0,v=0;for(;vb&&(w-=b,k++);const y=u[k].getWidth(w-1)===2;y&&w--;const x=y?f-1:f;p.push(x),v+=x}return p},o.getWrappedLineTrimmedLength=c},5295:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=c(8460),h=c(844),f=c(9092);class p extends h.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),h=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[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(w[h.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(w[h.CHAR_DATA_CHAR_INDEX].length===2){const v=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|w[h.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[h.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=w[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[h.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),h=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,h.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,h;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=` +`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(z){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),b.isLinux&&z&&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(z){const M=this._getMouseBufferCoords(z),D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!!(D&&I&&M)&&this._areCoordsInSelection(M,D,I)}isCellInSelection(z,M){const D=this._model.finalSelectionStart,I=this._model.finalSelectionEnd;return!(!D||!I)&&this._areCoordsInSelection([z,M],D,I)}_areCoordsInSelection(z,M,D){return z[1]>M[1]&&z[1]=M[0]&&z[0]=M[0]}_selectWordAtCursor(z,M){var B,G;const D=(G=(B=this._linkifier.currentLink)==null?void 0:B.link)==null?void 0:G.range;if(D)return this._model.selectionStart=[D.start.x-1,D.start.y-1],this._model.selectionStartLength=(0,y.getRangeLength)(D,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const I=this._getMouseBufferCoords(z);return!!I&&(this._selectWordAt(I,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(z,M){this._model.clearSelection(),z=Math.max(z,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,z],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(z){this._model.handleTrim(z)&&this.refresh()}_getMouseBufferCoords(z){const M=this._mouseService.getCoords(z,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(z){let M=(0,f.getCoordsRelativeToElement)(this._coreBrowserService.window,z,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(z){return b.isMac?z.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:z.shiftKey}handleMouseDown(z){if(this._mouseDownTimeStamp=z.timeStamp,(z.button!==2||!this.hasSelection)&&z.button===0){if(!this._enabled){if(!this.shouldForceSelection(z))return;z.stopPropagation()}z.preventDefault(),this._dragScrollAmount=0,this._enabled&&z.shiftKey?this._handleIncrementalClick(z):z.detail===1?this._handleSingleClick(z):z.detail===2?this._handleDoubleClick(z):z.detail===3&&this._handleTripleClick(z),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(z){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(z))}_handleSingleClick(z){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(z)?3:0,this._model.selectionStart=this._getMouseBufferCoords(z),!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(z){this._selectWordAtCursor(z,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(z){const M=this._getMouseBufferCoords(z);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(z){return z.altKey&&!(b.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(z){if(z.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(z),!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(z.ydisp+this._bufferService.rows,z.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=z.ydisp),this.refresh()}}_handleMouseUp(z){const M=z.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&z.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const D=this._mouseService.getCoords(z,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(D&&D[0]!==void 0&&D[1]!==void 0){const I=(0,p.moveToCellSequence)(D[0]-1,D[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(I,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const z=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,D=!(!z||!M||z[0]===M[0]&&z[1]===M[1]);D?z&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&z[0]===this._oldSelectionStart[0]&&z[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(z,M,D)):this._oldHasSelection&&this._fireOnSelectionChange(z,M,D)}_fireOnSelectionChange(z,M,D){this._oldSelectionStart=z,this._oldSelectionEnd=M,this._oldHasSelection=D,this._onSelectionChange.fire()}_handleBufferActivate(z){this.clearSelection(),this._trimListener.dispose(),this._trimListener=z.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(z,M){let D=M;for(let I=0;M>=I;I++){const B=z.loadCell(I,this._workCell).getChars().length;this._workCell.getWidth()===0?D--:B>1&&M!==I&&(D+=B-1)}return D}setSelection(z,M,D){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[z,M],this._model.selectionStartLength=D,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(z){this._isClickInSelection(z)||(this._selectWordAtCursor(z,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(z,M,D=!0,I=!0){if(z[0]>=this._bufferService.cols)return;const B=this._bufferService.buffer,G=B.lines.get(z[1]);if(!G)return;const q=B.translateBufferLineToString(z[1],!1);let Q=this._convertViewportColToCharacterIndex(G,z[0]),K=Q;const Z=z[0]-Q;let J=0,$=0,L=0,F=0;if(q.charAt(Q)===" "){for(;Q>0&&q.charAt(Q-1)===" ";)Q--;for(;K1&&(F+=ue-1,K+=ue-1);oe>0&&Q>0&&!this._isCharWordSeparator(G.loadCell(oe-1,this._workCell));){G.loadCell(oe-1,this._workCell);const se=this._workCell.getChars().length;this._workCell.getWidth()===0?(J++,oe--):se>1&&(L+=se-1,Q-=se-1),Q--,oe--}for(;ae1&&(F+=se-1,K+=se-1),K++,ae++}}K++;let U=Q+Z-J+L,H=Math.min(this._bufferService.cols,K-Q+J+$-L-F);if(M||q.slice(Q,K).trim()!==""){if(D&&U===0&&G.getCodePoint(0)!==32){const oe=B.lines.get(z[1]-1);if(oe&&G.isWrapped&&oe.getCodePoint(this._bufferService.cols-1)!==32){const ae=this._getWordAt([this._bufferService.cols-1,z[1]-1],!1,!0,!1);if(ae){const ue=this._bufferService.cols-ae.start;U-=ue,H+=ue}}}if(I&&U+H===this._bufferService.cols&&G.getCodePoint(this._bufferService.cols-1)!==32){const oe=B.lines.get(z[1]+1);if(oe!=null&&oe.isWrapped&&oe.getCodePoint(0)!==32){const ae=this._getWordAt([0,z[1]+1],!1,!1,!0);ae&&(H+=ae.length)}}return{start:U,length:H}}}_selectWordAt(z,M){const D=this._getWordAt(z,M);if(D){for(;D.start<0;)D.start+=this._bufferService.cols,z[1]--;this._model.selectionStart=[D.start,z[1]],this._model.selectionStartLength=D.length}}_selectToWordAt(z){const M=this._getWordAt(z,!0);if(M){let D=z[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(z){return z.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(z.getChars())>=0}_selectLineAt(z){const M=this._bufferService.buffer.getWrappedRangeForLine(z),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,y.getRangeLength)(D,this._bufferService.cols)}};o.SelectionService=A=u([h(3,C.IBufferService),h(4,C.ICoreService),h(5,w.IMouseService),h(6,C.IOptionsService),h(7,w.IRenderService),h(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,z,M,D){var I,B=arguments.length,G=B<3?z:D===null?D=Object.getOwnPropertyDescriptor(z,M):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")G=Reflect.decorate(A,z,M,D);else for(var q=A.length-1;q>=0;q--)(I=A[q])&&(G=(B<3?I(G):B>3?I(z,M,G):I(z,M))||G);return B>3&&G&&Object.defineProperty(z,M,G),G},h=this&&this.__param||function(A,z){return function(M,D){z(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"),b=p.css.toColor("#000000"),y=p.css.toColor("#ffffff"),x=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")],z=[0,95,135,175,215,255];for(let M=0;M<216;M++){const D=z[M/36%6|0],I=z[M/6%6|0],B=z[M%6];A.push({css:p.channels.toCss(D,I,B),rgba:p.channels.toRgba(D,I,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:b,cursor:y,cursorAccent:x,selectionForeground:void 0,selectionBackgroundTransparent:C,selectionBackgroundOpaque:p.color.blend(b,C),selectionInactiveBackgroundTransparent:C,selectionInactiveBackgroundOpaque:p.color.blend(b,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 z=this._colors;if(z.foreground=j(A.foreground,v),z.background=j(A.background,b),z.cursor=j(A.cursor,y),z.cursorAccent=j(A.cursorAccent,x),z.selectionBackgroundTransparent=j(A.selectionBackground,C),z.selectionBackgroundOpaque=p.color.blend(z.background,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundTransparent=j(A.selectionInactiveBackground,z.selectionBackgroundTransparent),z.selectionInactiveBackgroundOpaque=p.color.blend(z.background,z.selectionInactiveBackgroundTransparent),z.selectionForeground=A.selectionForeground?j(A.selectionForeground,p.NULL_COLOR):void 0,z.selectionForeground===p.NULL_COLOR&&(z.selectionForeground=void 0),p.color.isOpaque(z.selectionBackgroundTransparent)&&(z.selectionBackgroundTransparent=p.color.opacity(z.selectionBackgroundTransparent,.3)),p.color.isOpaque(z.selectionInactiveBackgroundTransparent)&&(z.selectionInactiveBackgroundTransparent=p.color.opacity(z.selectionInactiveBackgroundTransparent,.3)),z.ansi=o.DEFAULT_ANSI_COLORS.slice(),z.ansi[0]=j(A.black,o.DEFAULT_ANSI_COLORS[0]),z.ansi[1]=j(A.red,o.DEFAULT_ANSI_COLORS[1]),z.ansi[2]=j(A.green,o.DEFAULT_ANSI_COLORS[2]),z.ansi[3]=j(A.yellow,o.DEFAULT_ANSI_COLORS[3]),z.ansi[4]=j(A.blue,o.DEFAULT_ANSI_COLORS[4]),z.ansi[5]=j(A.magenta,o.DEFAULT_ANSI_COLORS[5]),z.ansi[6]=j(A.cyan,o.DEFAULT_ANSI_COLORS[6]),z.ansi[7]=j(A.white,o.DEFAULT_ANSI_COLORS[7]),z.ansi[8]=j(A.brightBlack,o.DEFAULT_ANSI_COLORS[8]),z.ansi[9]=j(A.brightRed,o.DEFAULT_ANSI_COLORS[9]),z.ansi[10]=j(A.brightGreen,o.DEFAULT_ANSI_COLORS[10]),z.ansi[11]=j(A.brightYellow,o.DEFAULT_ANSI_COLORS[11]),z.ansi[12]=j(A.brightBlue,o.DEFAULT_ANSI_COLORS[12]),z.ansi[13]=j(A.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),z.ansi[14]=j(A.brightCyan,o.DEFAULT_ANSI_COLORS[14]),z.ansi[15]=j(A.brightWhite,o.DEFAULT_ANSI_COLORS[15]),A.extendedAnsi){const M=Math.min(z.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),h=c(844);class f extends h.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 b=w-1;b>=0;b--)this.set(m+b+k,this.get(m+b));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,h=5){if(typeof u!="object")return u;const f=Array.isArray(u)?[]:{};for(const p in u)f[p]=h<=1?u[p]:u[p]&&c(u[p],h-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,h=0,f=0;var p,m,w,k,v;function b(x){const C=x.toString(16);return C.length<2?"0"+C:C}function y(x,C){return x>>0},x.toColor=function(C,N,j,A){return{css:x.toCss(C,N,j,A),rgba:x.toRgba(C,N,j,A)}}})(p||(o.channels=p={})),(function(x){function C(N,j){return f=Math.round(255*j),[c,u,h]=v.toChannels(N.rgba),{css:p.toCss(c,u,h,f),rgba:p.toRgba(c,u,h,f)}}x.blend=function(N,j){if(f=(255&j.rgba)/255,f===1)return{css:j.css,rgba:j.rgba};const A=j.rgba>>24&255,z=j.rgba>>16&255,M=j.rgba>>8&255,D=N.rgba>>24&255,I=N.rgba>>16&255,B=N.rgba>>8&255;return c=D+Math.round((A-D)*f),u=I+Math.round((z-I)*f),h=B+Math.round((M-B)*f),{css:p.toCss(c,u,h),rgba:p.toRgba(c,u,h)}},x.isOpaque=function(N){return(255&N.rgba)==255},x.ensureContrastRatio=function(N,j,A){const z=v.ensureContrastRatio(N.rgba,j.rgba,A);if(z)return p.toColor(z>>24&255,z>>16&255,z>>8&255)},x.opaque=function(N){const j=(255|N.rgba)>>>0;return[c,u,h]=v.toChannels(j),{css:p.toCss(c,u,h),rgba:j}},x.opacity=C,x.multiplyOpacity=function(N,j){return f=255&N.rgba,C(N,f*j/255)},x.toColorRGB=function(N){return[N.rgba>>24&255,N.rgba>>16&255,N.rgba>>8&255]}})(m||(o.color=m={})),(function(x){let C,N;try{const j=document.createElement("canvas");j.width=1,j.height=1;const A=j.getContext("2d",{willReadFrequently:!0});A&&(C=A,C.globalCompositeOperation="copy",N=C.createLinearGradient(0,0,1,1))}catch{}x.toColor=function(j){if(j.match(/#[\da-f]{3,8}/i))switch(j.length){case 4:return c=parseInt(j.slice(1,2).repeat(2),16),u=parseInt(j.slice(2,3).repeat(2),16),h=parseInt(j.slice(3,4).repeat(2),16),p.toColor(c,u,h);case 5:return c=parseInt(j.slice(1,2).repeat(2),16),u=parseInt(j.slice(2,3).repeat(2),16),h=parseInt(j.slice(3,4).repeat(2),16),f=parseInt(j.slice(4,5).repeat(2),16),p.toColor(c,u,h,f);case 7:return{css:j,rgba:(parseInt(j.slice(1),16)<<8|255)>>>0};case 9:return{css:j,rgba:parseInt(j.slice(1),16)>>>0}}const A=j.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]),h=parseInt(A[3]),f=Math.round(255*(A[5]===void 0?1:parseFloat(A[5]))),p.toColor(c,u,h,f);if(!C||!N)throw new Error("css.toColor: Unsupported css format");if(C.fillStyle=N,C.fillStyle=j,typeof C.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(C.fillRect(0,0,1,1),[c,u,h,f]=C.getImageData(0,0,1,1).data,f!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:p.toRgba(c,u,h,f),css:j}}})(w||(o.css=w={})),(function(x){function C(N,j,A){const z=N/255,M=j/255,D=A/255;return .2126*(z<=.03928?z/12.92:Math.pow((z+.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))}x.relativeLuminance=function(N){return C(N>>16&255,N>>8&255,255&N)},x.relativeLuminance2=C})(k||(o.rgb=k={})),(function(x){function C(j,A,z){const M=j>>24&255,D=j>>16&255,I=j>>8&255;let B=A>>24&255,G=A>>16&255,q=A>>8&255,Q=y(k.relativeLuminance2(B,G,q),k.relativeLuminance2(M,D,I));for(;Q0||G>0||q>0);)B-=Math.max(0,Math.ceil(.1*B)),G-=Math.max(0,Math.ceil(.1*G)),q-=Math.max(0,Math.ceil(.1*q)),Q=y(k.relativeLuminance2(B,G,q),k.relativeLuminance2(M,D,I));return(B<<24|G<<16|q<<8|255)>>>0}function N(j,A,z){const M=j>>24&255,D=j>>16&255,I=j>>8&255;let B=A>>24&255,G=A>>16&255,q=A>>8&255,Q=y(k.relativeLuminance2(B,G,q),k.relativeLuminance2(M,D,I));for(;Q>>0}x.blend=function(j,A){if(f=(255&A)/255,f===1)return A;const z=A>>24&255,M=A>>16&255,D=A>>8&255,I=j>>24&255,B=j>>16&255,G=j>>8&255;return c=I+Math.round((z-I)*f),u=B+Math.round((M-B)*f),h=G+Math.round((D-G)*f),p.toRgba(c,u,h)},x.ensureContrastRatio=function(j,A,z){const M=k.relativeLuminance(j>>8),D=k.relativeLuminance(A>>8);if(y(M,D)>8));if(qy(M,k.relativeLuminance(Q>>8))?G:Q}return G}const I=N(j,A,z),B=y(M,k.relativeLuminance(I>>8));if(By(M,k.relativeLuminance(G>>8))?I:G}return I}},x.reduceLuminance=C,x.increaseLuminance=N,x.toChannels=function(j){return[j>>24&255,j>>16&255,j>>8&255,255&j]}})(v||(o.rgba=v={})),o.toPaddedHex=b,o.contrastRatio=y},8969:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const u=c(844),h=c(2585),f=c(4348),p=c(7866),m=c(744),w=c(7302),k=c(6975),v=c(8460),b=c(1753),y=c(1480),x=c(7994),C=c(9282),N=c(5435),j=c(5981),A=c(2660);let z=!1;class M extends u.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new v.EventEmitter),this._onScroll.event((I=>{var B;(B=this._onScrollApi)==null||B.fire(I.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(I){for(const B in I)this.optionsService.options[B]=I[B]}constructor(I){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(I)),this._instantiationService.setService(h.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(m.BufferService)),this._instantiationService.setService(h.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(p.LogService)),this._instantiationService.setService(h.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(k.CoreService)),this._instantiationService.setService(h.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(b.CoreMouseService)),this._instantiationService.setService(h.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(y.UnicodeService)),this._instantiationService.setService(h.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(x.CharsetService),this._instantiationService.setService(h.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(A.OscLinkService),this._instantiationService.setService(h.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 j.WriteBuffer(((B,G)=>this._inputHandler.parse(B,G)))),this.register((0,v.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(I,B){this._writeBuffer.write(I,B)}writeSync(I,B){this._logService.logLevel<=h.LogLevelEnum.WARN&&!z&&(this._logService.warn("writeSync is unreliable and will be removed soon."),z=!0),this._writeBuffer.writeSync(I,B)}input(I,B=!0){this.coreService.triggerDataEvent(I,B)}resize(I,B){isNaN(I)||isNaN(B)||(I=Math.max(I,m.MINIMUM_COLS),B=Math.max(B,m.MINIMUM_ROWS),this._bufferService.resize(I,B))}scroll(I,B=!1){this._bufferService.scroll(I,B)}scrollLines(I,B,G){this._bufferService.scrollLines(I,B,G)}scrollPages(I){this.scrollLines(I*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(I){const B=I-this._bufferService.buffer.ydisp;B!==0&&this.scrollLines(B)}registerEscHandler(I,B){return this._inputHandler.registerEscHandler(I,B)}registerDcsHandler(I,B){return this._inputHandler.registerDcsHandler(I,B)}registerCsiHandler(I,B){return this._inputHandler.registerCsiHandler(I,B)}registerOscHandler(I,B){return this._inputHandler.registerOscHandler(I,B)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let I=!1;const B=this.optionsService.rawOptions.windowsPty;B&&B.buildNumber!==void 0&&B.buildNumber!==void 0?I=B.backend==="conpty"&&B.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(I=!0),I?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const I=[];I.push(this.onLineFeed(C.updateWindowsModeWrappedState.bind(null,this._bufferService))),I.push(this.registerCsiHandler({final:"H"},(()=>((0,C.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,u.toDisposable)((()=>{for(const B of I)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(h)))},o.runAndSubscribe=function(c,u){return u(void 0),c((h=>u(h)))}},5435:function(a,o,c){var u=this&&this.__decorate||function(J,$,L,F){var U,H=arguments.length,oe=H<3?$:F===null?F=Object.getOwnPropertyDescriptor($,L):F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")oe=Reflect.decorate(J,$,L,F);else for(var ae=J.length-1;ae>=0;ae--)(U=J[ae])&&(oe=(H<3?U(oe):H>3?U($,L,oe):U($,L))||oe);return H>3&&oe&&Object.defineProperty($,L,oe),oe},h=this&&this.__param||function(J,$){return function(L,F){$(L,F,J)}};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),b=c(8460),y=c(643),x=c(511),C=c(3734),N=c(2585),j=c(1480),A=c(6242),z=c(6351),M=c(5941),D={"(":0,")":1,"*":2,"+":3,"-":1,".":2},I=131072;function B(J,$){if(J>24)return $.setWinLines||!1;switch(J){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 G;(function(J){J[J.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",J[J.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(G||(o.WindowsOptionsReportType=G={}));let q=0;class Q extends w.Disposable{getAttrData(){return this._curAttrData}constructor($,L,F,U,H,oe,ae,ue,se=new m.EscapeSequenceParser){super(),this._bufferService=$,this._charsetService=L,this._coreService=F,this._logService=U,this._optionsService=H,this._oscLinkService=oe,this._coreMouseService=ae,this._unicodeService=ue,this._parser=se,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new k.StringToUtf32,this._utf8Decoder=new k.Utf8ToUtf32,this._workCell=new x.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 b.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new b.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new b.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new b.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new b.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new b.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new b.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new b.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new b.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new b.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new b.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new b.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new b.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((V=>this._activeBuffer=V.activeBuffer))),this._parser.setCsiHandlerFallback(((V,ne)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(V),params:ne.toArray()})})),this._parser.setEscHandlerFallback((V=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(V)})})),this._parser.setExecuteHandlerFallback((V=>{this._logService.debug("Unknown EXECUTE code: ",{code:V})})),this._parser.setOscHandlerFallback(((V,ne,ce)=>{this._logService.debug("Unknown OSC code: ",{identifier:V,action:ne,data:ce})})),this._parser.setDcsHandlerFallback(((V,ne,ce)=>{ne==="HOOK"&&(ce=ce.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(V),action:ne,payload:ce})})),this._parser.setPrintHandler(((V,ne,ce)=>this.print(V,ne,ce))),this._parser.registerCsiHandler({final:"@"},(V=>this.insertChars(V))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(V=>this.scrollLeft(V))),this._parser.registerCsiHandler({final:"A"},(V=>this.cursorUp(V))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(V=>this.scrollRight(V))),this._parser.registerCsiHandler({final:"B"},(V=>this.cursorDown(V))),this._parser.registerCsiHandler({final:"C"},(V=>this.cursorForward(V))),this._parser.registerCsiHandler({final:"D"},(V=>this.cursorBackward(V))),this._parser.registerCsiHandler({final:"E"},(V=>this.cursorNextLine(V))),this._parser.registerCsiHandler({final:"F"},(V=>this.cursorPrecedingLine(V))),this._parser.registerCsiHandler({final:"G"},(V=>this.cursorCharAbsolute(V))),this._parser.registerCsiHandler({final:"H"},(V=>this.cursorPosition(V))),this._parser.registerCsiHandler({final:"I"},(V=>this.cursorForwardTab(V))),this._parser.registerCsiHandler({final:"J"},(V=>this.eraseInDisplay(V,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(V=>this.eraseInDisplay(V,!0))),this._parser.registerCsiHandler({final:"K"},(V=>this.eraseInLine(V,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(V=>this.eraseInLine(V,!0))),this._parser.registerCsiHandler({final:"L"},(V=>this.insertLines(V))),this._parser.registerCsiHandler({final:"M"},(V=>this.deleteLines(V))),this._parser.registerCsiHandler({final:"P"},(V=>this.deleteChars(V))),this._parser.registerCsiHandler({final:"S"},(V=>this.scrollUp(V))),this._parser.registerCsiHandler({final:"T"},(V=>this.scrollDown(V))),this._parser.registerCsiHandler({final:"X"},(V=>this.eraseChars(V))),this._parser.registerCsiHandler({final:"Z"},(V=>this.cursorBackwardTab(V))),this._parser.registerCsiHandler({final:"`"},(V=>this.charPosAbsolute(V))),this._parser.registerCsiHandler({final:"a"},(V=>this.hPositionRelative(V))),this._parser.registerCsiHandler({final:"b"},(V=>this.repeatPrecedingCharacter(V))),this._parser.registerCsiHandler({final:"c"},(V=>this.sendDeviceAttributesPrimary(V))),this._parser.registerCsiHandler({prefix:">",final:"c"},(V=>this.sendDeviceAttributesSecondary(V))),this._parser.registerCsiHandler({final:"d"},(V=>this.linePosAbsolute(V))),this._parser.registerCsiHandler({final:"e"},(V=>this.vPositionRelative(V))),this._parser.registerCsiHandler({final:"f"},(V=>this.hVPosition(V))),this._parser.registerCsiHandler({final:"g"},(V=>this.tabClear(V))),this._parser.registerCsiHandler({final:"h"},(V=>this.setMode(V))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(V=>this.setModePrivate(V))),this._parser.registerCsiHandler({final:"l"},(V=>this.resetMode(V))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(V=>this.resetModePrivate(V))),this._parser.registerCsiHandler({final:"m"},(V=>this.charAttributes(V))),this._parser.registerCsiHandler({final:"n"},(V=>this.deviceStatus(V))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(V=>this.deviceStatusPrivate(V))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(V=>this.softReset(V))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(V=>this.setCursorStyle(V))),this._parser.registerCsiHandler({final:"r"},(V=>this.setScrollRegion(V))),this._parser.registerCsiHandler({final:"s"},(V=>this.saveCursor(V))),this._parser.registerCsiHandler({final:"t"},(V=>this.windowOptions(V))),this._parser.registerCsiHandler({final:"u"},(V=>this.restoreCursor(V))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(V=>this.insertColumns(V))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(V=>this.deleteColumns(V))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(V=>this.selectProtected(V))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(V=>this.requestMode(V,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(V=>this.requestMode(V,!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((V=>(this.setTitle(V),this.setIconName(V),!0)))),this._parser.registerOscHandler(1,new A.OscHandler((V=>this.setIconName(V)))),this._parser.registerOscHandler(2,new A.OscHandler((V=>this.setTitle(V)))),this._parser.registerOscHandler(4,new A.OscHandler((V=>this.setOrReportIndexedColor(V)))),this._parser.registerOscHandler(8,new A.OscHandler((V=>this.setHyperlink(V)))),this._parser.registerOscHandler(10,new A.OscHandler((V=>this.setOrReportFgColor(V)))),this._parser.registerOscHandler(11,new A.OscHandler((V=>this.setOrReportBgColor(V)))),this._parser.registerOscHandler(12,new A.OscHandler((V=>this.setOrReportCursorColor(V)))),this._parser.registerOscHandler(104,new A.OscHandler((V=>this.restoreIndexedColor(V)))),this._parser.registerOscHandler(110,new A.OscHandler((V=>this.restoreFgColor(V)))),this._parser.registerOscHandler(111,new A.OscHandler((V=>this.restoreBgColor(V)))),this._parser.registerOscHandler(112,new A.OscHandler((V=>this.restoreCursorColor(V)))),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 V in p.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:V},(()=>this.selectCharset("("+V))),this._parser.registerEscHandler({intermediates:")",final:V},(()=>this.selectCharset(")"+V))),this._parser.registerEscHandler({intermediates:"*",final:V},(()=>this.selectCharset("*"+V))),this._parser.registerEscHandler({intermediates:"+",final:V},(()=>this.selectCharset("+"+V))),this._parser.registerEscHandler({intermediates:"-",final:V},(()=>this.selectCharset("-"+V))),this._parser.registerEscHandler({intermediates:".",final:V},(()=>this.selectCharset("."+V))),this._parser.registerEscHandler({intermediates:"/",final:V},(()=>this.selectCharset("/"+V)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((V=>(this._logService.error("Parsing error: ",V),V))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new z.DcsHandler(((V,ne)=>this.requestStatusString(V,ne))))}_preserveStack($,L,F,U){this._parseStack.paused=!0,this._parseStack.cursorStartX=$,this._parseStack.cursorStartY=L,this._parseStack.decodedLength=F,this._parseStack.position=U}_logSlowResolvingAsync($){this._logService.logLevel<=N.LogLevelEnum.WARN&&Promise.race([$,new Promise(((L,F)=>setTimeout((()=>F("#SLOW_TIMEOUT")),5e3)))]).catch((L=>{if(L!=="#SLOW_TIMEOUT")throw L;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse($,L){let F,U=this._activeBuffer.x,H=this._activeBuffer.y,oe=0;const ae=this._parseStack.paused;if(ae){if(F=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,L))return this._logSlowResolvingAsync(F),F;U=this._parseStack.cursorStartX,H=this._parseStack.cursorStartY,this._parseStack.paused=!1,$.length>I&&(oe=this._parseStack.position+I)}if(this._logService.logLevel<=N.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof $=="string"?` "${$}"`:` "${Array.prototype.map.call($,(V=>String.fromCharCode(V))).join("")}"`),typeof $=="string"?$.split("").map((V=>V.charCodeAt(0))):$),this._parseBuffer.length<$.length&&this._parseBuffer.lengthI)for(let V=oe;V<$.length;V+=I){const ne=V+I<$.length?V+I:$.length,ce=typeof $=="string"?this._stringDecoder.decode($.substring(V,ne),this._parseBuffer):this._utf8Decoder.decode($.subarray(V,ne),this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,ce))return this._preserveStack(U,H,ce,V),this._logSlowResolvingAsync(F),F}else if(!ae){const V=typeof $=="string"?this._stringDecoder.decode($,this._parseBuffer):this._utf8Decoder.decode($,this._parseBuffer);if(F=this._parser.parse(this._parseBuffer,V))return this._preserveStack(U,H,V,0),this._logSlowResolvingAsync(F),F}this._activeBuffer.x===U&&this._activeBuffer.y===H||this._onCursorMove.fire();const ue=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),se=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);se0&&ce.getWidth(this._activeBuffer.x-1)===2&&ce.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ne);let he=this._parser.precedingJoinState;for(let me=L;meue){if(se){const Re=ce;let $e=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),ce=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),Ye>0&&ce instanceof v.BufferLine&&ce.copyCellsFrom(Re,$e,0,Ye,!1);$e=0;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}else if(V&&(ce.insertCells(this._activeBuffer.x,H-Ye,this._activeBuffer.getNullCell(ne)),ce.getWidth(ue-1)===2&&ce.setCellFromCodepoint(ue-1,y.NULL_CELL_CODE,y.NULL_CELL_WIDTH,ne)),ce.setCellFromCodepoint(this._activeBuffer.x++,U,H,ne),H>0)for(;--H;)ce.setCellFromCodepoint(this._activeBuffer.x++,0,0,ne)}this._parser.precedingJoinState=he,this._activeBuffer.x0&&ce.getWidth(this._activeBuffer.x)===0&&!ce.hasContent(this._activeBuffer.x)&&ce.setCellFromCodepoint(this._activeBuffer.x,0,1,ne),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler($,L){return $.final!=="t"||$.prefix||$.intermediates?this._parser.registerCsiHandler($,L):this._parser.registerCsiHandler($,(F=>!B(F.params[0],this._optionsService.rawOptions.windowOptions)||L(F)))}registerDcsHandler($,L){return this._parser.registerDcsHandler($,new z.DcsHandler(L))}registerEscHandler($,L){return this._parser.registerEscHandler($,L)}registerOscHandler($,L){return this._parser.registerOscHandler($,new A.OscHandler(L))}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 L=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);L.hasWidth(this._activeBuffer.x)&&!L.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($,L){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=$,this._activeBuffer.y=this._activeBuffer.scrollTop+L):(this._activeBuffer.x=$,this._activeBuffer.y=L),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor($,L){this._restrictCursor(),this._setCursor(this._activeBuffer.x+$,this._activeBuffer.y+L)}cursorUp($){const L=this._activeBuffer.y-this._activeBuffer.scrollTop;return L>=0?this._moveCursor(0,-Math.min(L,$.params[0]||1)):this._moveCursor(0,-($.params[0]||1)),!0}cursorDown($){const L=this._activeBuffer.scrollBottom-this._activeBuffer.y;return L>=0?this._moveCursor(0,Math.min(L,$.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 L=$.params[0];return L===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:L===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab($){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let L=$.params[0]||1;for(;L--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected($){const L=$.params[0];return L===1&&(this._curAttrData.bg|=536870912),L!==2&&L!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine($,L,F,U=!1,H=!1){const oe=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);oe.replaceCells(L,F,this._activeBuffer.getNullCell(this._eraseAttrData()),H),U&&(oe.isWrapped=!1)}_resetBufferLine($,L=!1){const F=this._activeBuffer.lines.get(this._activeBuffer.ybase+$);F&&(F.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),L),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+$),F.isWrapped=!1)}eraseInDisplay($,L=!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,L);F=this._bufferService.cols&&(this._activeBuffer.lines.get(F+1).isWrapped=!1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 2:for(F=this._bufferService.rows,this._dirtyRowTracker.markDirty(F-1);F--;)this._resetBufferLine(F,L);this._dirtyRowTracker.markDirty(0);break;case 3:const U=this._activeBuffer.lines.length-this._bufferService.rows;U>0&&(this._activeBuffer.lines.trimStart(U),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-U,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-U,0),this._onScroll.fire(0))}return!0}eraseInLine($,L=!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,L);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,L);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,L)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines($){this._restrictCursor();let L=$.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 se=ue;for(let V=1;V0||(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 L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){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 L=0;L<$.length;L++)switch($.params[L]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate($){for(let L=0;L<$.length;L++)switch($.params[L]){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[L]===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($,L){const F=this._coreService.decPrivateModes,{activeProtocol:U,activeEncoding:H}=this._coreMouseService,oe=this._coreService,{buffers:ae,cols:ue}=this._bufferService,{active:se,alt:V}=ae,ne=this._optionsService.rawOptions,ce=Pe=>Pe?1:2,he=$.params[0];return me=he,Ae=L?he===2?4:he===4?ce(oe.modes.insertMode):he===12?3:he===20?ce(ne.convertEol):0:he===1?ce(F.applicationCursorKeys):he===3?ne.windowOptions.setWinLines?ue===80?2:ue===132?1:0:0:he===6?ce(F.origin):he===7?ce(F.wraparound):he===8?3:he===9?ce(U==="X10"):he===12?ce(ne.cursorBlink):he===25?ce(!oe.isCursorHidden):he===45?ce(F.reverseWraparound):he===66?ce(F.applicationKeypad):he===67?4:he===1e3?ce(U==="VT200"):he===1002?ce(U==="DRAG"):he===1003?ce(U==="ANY"):he===1004?ce(F.sendFocus):he===1005?4:he===1006?ce(H==="SGR"):he===1015?4:he===1016?ce(H==="SGR_PIXELS"):he===1048?1:he===47||he===1047||he===1049?ce(se===V):he===2004?ce(F.bracketedPasteMode):0,oe.triggerDataEvent(`${f.C0.ESC}[${L?"":"?"}${me};${Ae}$y`),!0;var me,Ae}_updateAttrColor($,L,F,U,H){return L===2?($|=50331648,$&=-16777216,$|=C.AttributeData.fromColorRGB([F,U,H])):L===5&&($&=-50331904,$|=33554432|255&F),$}_extractColor($,L,F){const U=[0,0,-1,0,0,0];let H=0,oe=0;do{if(U[oe+H]=$.params[L+oe],$.hasSubParams(L+oe)){const ae=$.getSubParams(L+oe);let ue=0;do U[1]===5&&(H=1),U[oe+ue+1+H]=ae[ue];while(++ue=2||U[1]===2&&oe+H>=5)break;U[1]&&(H=1)}while(++oe+L<$.length&&oe+H5)&&($=1),L.extended.underlineStyle=$,L.fg|=268435456,$===0&&(L.fg&=-268435457),L.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 L=$.length;let F;const U=this._curAttrData;for(let H=0;H=30&&F<=37?(U.fg&=-50331904,U.fg|=16777216|F-30):F>=40&&F<=47?(U.bg&=-50331904,U.bg|=16777216|F-40):F>=90&&F<=97?(U.fg&=-50331904,U.fg|=16777224|F-90):F>=100&&F<=107?(U.bg&=-50331904,U.bg|=16777224|F-100):F===0?this._processSGR0(U):F===1?U.fg|=134217728:F===3?U.bg|=67108864:F===4?(U.fg|=268435456,this._processUnderline($.hasSubParams(H)?$.getSubParams(H)[0]:1,U)):F===5?U.fg|=536870912:F===7?U.fg|=67108864:F===8?U.fg|=1073741824:F===9?U.fg|=2147483648:F===2?U.bg|=134217728:F===21?this._processUnderline(2,U):F===22?(U.fg&=-134217729,U.bg&=-134217729):F===23?U.bg&=-67108865:F===24?(U.fg&=-268435457,this._processUnderline(0,U)):F===25?U.fg&=-536870913:F===27?U.fg&=-67108865:F===28?U.fg&=-1073741825:F===29?U.fg&=2147483647:F===39?(U.fg&=-67108864,U.fg|=16777215&v.DEFAULT_ATTR_DATA.fg):F===49?(U.bg&=-67108864,U.bg|=16777215&v.DEFAULT_ATTR_DATA.bg):F===38||F===48||F===58?H+=this._extractColor($,H,U):F===53?U.bg|=1073741824:F===55?U.bg&=-1073741825:F===59?(U.extended=U.extended.clone(),U.extended.underlineColor=-1,U.updateExtended()):F===100?(U.fg&=-67108864,U.fg|=16777215&v.DEFAULT_ATTR_DATA.fg,U.bg&=-67108864,U.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 L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[${L};${F}R`)}return!0}deviceStatusPrivate($){if($.params[0]===6){const L=this._activeBuffer.y+1,F=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${f.C0.ESC}[?${L};${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 L=$.params[0]||1;switch(L){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=L%2==1;return this._optionsService.options.cursorBlink=F,!0}setScrollRegion($){const L=$.params[0]||1;let F;return($.length<2||(F=$.params[1])>this._bufferService.rows||F===0)&&(F=this._bufferService.rows),F>L&&(this._activeBuffer.scrollTop=L-1,this._activeBuffer.scrollBottom=F-1,this._setCursor(0,0)),!0}windowOptions($){if(!B($.params[0],this._optionsService.rawOptions.windowOptions))return!0;const L=$.length>1?$.params[1]:0;switch($.params[0]){case 14:L!==2&&this._onRequestWindowsOptionsReport.fire(G.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(G.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:L!==0&&L!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),L!==0&&L!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:L!==0&&L!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),L!==0&&L!==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 L=[],F=$.split(";");for(;F.length>1;){const U=F.shift(),H=F.shift();if(/^\d+$/.exec(U)){const oe=parseInt(U);if(Z(oe))if(H==="?")L.push({type:0,index:oe});else{const ae=(0,M.parseColor)(H);ae&&L.push({type:1,index:oe,color:ae})}}}return L.length&&this._onColor.fire(L),!0}setHyperlink($){const L=$.split(";");return!(L.length<2)&&(L[1]?this._createHyperlink(L[0],L[1]):!L[0]&&this._finishHyperlink())}_createHyperlink($,L){this._getCurrentLinkId()&&this._finishHyperlink();const F=$.split(":");let U;const H=F.findIndex((oe=>oe.startsWith("id=")));return H!==-1&&(U=F[H].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:U,uri:L}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor($,L){const F=$.split(";");for(let U=0;U=this._specialColors.length);++U,++L)if(F[U]==="?")this._onColor.fire([{type:0,index:this._specialColors[L]}]);else{const H=(0,M.parseColor)(F[U]);H&&this._onColor.fire([{type:1,index:this._specialColors[L],color:H}])}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 L=[],F=$.split(";");for(let U=0;U=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 x.CellData;$.content=4194373,$.fg=this._curAttrData.fg,$.bg=this._curAttrData.bg,this._setCursor(0,0);for(let L=0;L(this._coreService.triggerDataEvent(`${f.C0.ESC}${H}${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}[U.cursorStyle]-(U.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty($,L){this._dirtyRowTracker.markRangeDirty($,L)}}o.InputHandler=Q;let K=class{constructor(J){this._bufferService=J,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(J){Jthis.end&&(this.end=J)}markRangeDirty(J,$){J>$&&(q=J,J=$,$=q),Jthis.end&&(this.end=$)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function Z(J){return 0<=J&&J<256}K=u([h(0,N.IBufferService)],K)},844:(a,o)=>{function c(u){for(const h of u)h.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 h=this._disposables.indexOf(u);h!==-1&&this._disposables.splice(h,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(u){var h;this._isDisposed||u===this._value||((h=this._value)==null||h.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(h,f,p){this._data[h]||(this._data[h]={}),this._data[h][f]=p}get(h,f){return this._data[h]?this._data[h][f]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(u,h,f,p,m){this._data.get(u,h)||this._data.set(u,h,new c),this._data.get(u,h).set(f,p,m)}get(u,h,f,p){var m;return(m=this._data.get(u,h))==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 h=c.match(/Version\/(\d+)/);return h===null||h.length<2?0:parseInt(h[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 h=this._getKey(u);if(h===void 0||(c=this._search(h),c===-1)||this._getKey(this._array[c])!==h)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 h(this._array[c]);while(++c=h;){let p=h+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}h=p+1}}return h}}},7226:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const u=c(6114);class h{constructor(){this._tasks=[],this._i=0}enqueue(m){this._tasks.push(m),this._start()}flush(){for(;this._ib)return v-w<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(v-w))}ms`),void this._start();v=b}this.clear()}}class f extends h{_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 h{_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(h){const f=h.buffer.lines.get(h.buffer.ybase+h.buffer.y-1),p=f==null?void 0:f.get(h.cols-1),m=h.buffer.lines.get(h.buffer.ybase+h.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),h=c(7226),f=c(3734),p=c(8437),m=c(4634),w=c(511),k=c(643),v=c(4863),b=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(y,x,C){this._hasScrollback=y,this._optionsService=x,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=b.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 h.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(y){return y?(this._nullCell.fg=y.fg,this._nullCell.bg=y.bg,this._nullCell.extended=y.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new f.ExtendedAttrs),this._nullCell}getWhitespaceCell(y){return y?(this._whitespaceCell.fg=y.fg,this._whitespaceCell.bg=y.bg,this._whitespaceCell.extended=y.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new f.ExtendedAttrs),this._whitespaceCell}getBlankLine(y,x){return new p.BufferLine(this._bufferService.cols,this.getNullCell(y),x)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const y=this.ybase+this.y-this.ydisp;return y>=0&&yo.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:x}fillViewportRows(y){if(this.lines.length===0){y===void 0&&(y=p.DEFAULT_ATTR_DATA);let x=this._rows;for(;x--;)this.lines.push(this.getBlankLine(y))}}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(y,x){const C=this.getNullCell(p.DEFAULT_ATTR_DATA);let N=0;const j=this._getCorrectBufferLength(x);if(j>this.lines.maxLength&&(this.lines.maxLength=j),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(y,C)));else for(let z=this._rows;z>x;z--)this.lines.length>x+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(j0&&(this.lines.trimStart(z),this.ybase=Math.max(this.ybase-z,0),this.ydisp=Math.max(this.ydisp-z,0),this.savedY=Math.max(this.savedY-z,0)),this.lines.maxLength=j}this.x=Math.min(this.x,y-1),this.y=Math.min(this.y,x-1),A&&(this.y+=A),this.savedX=Math.min(this.savedX,y-1),this.scrollTop=0}if(this.scrollBottom=x-1,this._isReflowEnabled&&(this._reflow(y,x),this._cols>y))for(let A=0;A.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let y=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,y=!1);let x=0;for(;this._memoryCleanupPosition100)return!0;return y}get _isReflowEnabled(){const y=this._optionsService.rawOptions.windowsPty;return y&&y.buildNumber?this._hasScrollback&&y.backend==="conpty"&&y.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(y,x){this._cols!==y&&(y>this._cols?this._reflowLarger(y,x):this._reflowSmaller(y,x))}_reflowLarger(y,x){const C=(0,m.reflowLargerGetLinesToRemove)(this.lines,this._cols,y,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(y,x,N.countRemoved)}}_reflowLargerAdjustViewport(y,x,C){const N=this.getNullCell(p.DEFAULT_ATTR_DATA);let j=C;for(;j-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length=0;A--){let z=this.lines.get(A);if(!z||!z.isWrapped&&z.getTrimmedLength()<=y)continue;const M=[z];for(;z.isWrapped&&A>0;)z=this.lines.get(--A),M.unshift(z);const D=this.ybase+this.y;if(D>=A&&D0&&(N.push({start:A+M.length+j,newLines:Q}),j+=Q.length),M.push(...Q);let K=B.length-1,Z=B[K];Z===0&&(K--,Z=B[K]);let J=M.length-G-1,$=I;for(;J>=0;){const F=Math.min($,Z);if(M[K]===void 0)break;if(M[K].copyCellsFrom(M[J],$-F,Z-F,F,!0),Z-=F,Z===0&&(K--,Z=B[K]),$-=F,$===0){J--;const U=Math.max(J,0);$=(0,m.getWrappedLineTrimmedLength)(M,U,this._cols)}}for(let F=0;F0;)this.ybase===0?this.y0){const A=[],z=[];for(let K=0;K=0;K--)if(B&&B.start>D+G){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}),G+=B.newLines.length,B=N[++I]}else this.lines.set(K,z[D--]);let q=0;for(let K=A.length-1;K>=0;K--)A[K].index+=q,this.lines.onInsertEmitter.fire(A[K]),q+=A[K].amount;const Q=Math.max(0,M+j-this.lines.maxLength);Q>0&&this.lines.onTrimEmitter.fire(Q)}}translateBufferLineToString(y,x,C=0,N){const j=this.lines.get(y);return j?j.translateToString(x,C,N):""}getWrappedRangeForLine(y){let x=y,C=y;for(;x>0&&this.lines.get(x).isWrapped;)x--;for(;C+10;);return y>=this._cols?this._cols-1:y<0?0:y}nextStop(y){for(y==null&&(y=this.x);!this.tabs[++y]&&y=this._cols?this._cols-1:y<0?0:y}clearMarkers(y){this._isClearing=!0;for(let x=0;x{x.line-=C,x.line<0&&x.dispose()}))),x.register(this.lines.onInsert((C=>{x.line>=C.index&&(x.line+=C.amount)}))),x.register(this.lines.onDelete((C=>{x.line>=C.index&&x.lineC.index&&(x.line-=C.amount)}))),x.register(x.onDispose((()=>this._removeMarker(x)))),x}_removeMarker(y){this._isClearing||this.markers.splice(this.markers.indexOf(y),1)}}},8437:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const u=c(3734),h=c(511),f=c(643),p=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new u.AttributeData);let m=0;class w{constructor(v,b,y=!1){this.isWrapped=y,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*v);const x=b||h.CellData.fromCharData([0,f.NULL_CELL_CHAR,f.NULL_CELL_WIDTH,f.NULL_CELL_CODE]);for(let C=0;C>22,2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):y]}set(v,b){this._data[3*v+1]=b[f.CHAR_DATA_ATTR_INDEX],b[f.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[v]=b[1],this._data[3*v+0]=2097152|v|b[f.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*v+0]=b[f.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|b[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 b=this._data[3*v+0];return 2097152&b?this._combined[v].charCodeAt(this._combined[v].length-1):2097151&b}isCombined(v){return 2097152&this._data[3*v+0]}getString(v){const b=this._data[3*v+0];return 2097152&b?this._combined[v]:2097151&b?(0,p.stringFromCodePoint)(2097151&b):""}isProtected(v){return 536870912&this._data[3*v+2]}loadCell(v,b){return m=3*v,b.content=this._data[m+0],b.fg=this._data[m+1],b.bg=this._data[m+2],2097152&b.content&&(b.combinedData=this._combined[v]),268435456&b.bg&&(b.extended=this._extendedAttrs[v]),b}setCell(v,b){2097152&b.content&&(this._combined[v]=b.combinedData),268435456&b.bg&&(this._extendedAttrs[v]=b.extended),this._data[3*v+0]=b.content,this._data[3*v+1]=b.fg,this._data[3*v+2]=b.bg}setCellFromCodepoint(v,b,y,x){268435456&x.bg&&(this._extendedAttrs[v]=x.extended),this._data[3*v+0]=b|y<<22,this._data[3*v+1]=x.fg,this._data[3*v+2]=x.bg}addCodepointToCell(v,b,y){let x=this._data[3*v+0];2097152&x?this._combined[v]+=(0,p.stringFromCodePoint)(b):2097151&x?(this._combined[v]=(0,p.stringFromCodePoint)(2097151&x)+(0,p.stringFromCodePoint)(b),x&=-2097152,x|=2097152):x=b|4194304,y&&(x&=-12582913,x|=y<<22),this._data[3*v+0]=x}insertCells(v,b,y){if((v%=this.length)&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v-1,0,1,y),b=0;--C)this.setCell(v+b+C,this.loadCell(v+C,x));for(let C=0;Cthis.length){if(this._data.buffer.byteLength>=4*y)this._data=new Uint32Array(this._data.buffer,0,y);else{const x=new Uint32Array(y);x.set(this._data),this._data=x}for(let x=this.length;x=v&&delete this._combined[j]}const C=Object.keys(this._extendedAttrs);for(let N=0;N=v&&delete this._extendedAttrs[j]}}return this.length=v,4*y*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,b,y,x,C){const N=v._data;if(C)for(let A=x-1;A>=0;A--){for(let z=0;z<3;z++)this._data[3*(y+A)+z]=N[3*(b+A)+z];268435456&N[3*(b+A)+2]&&(this._extendedAttrs[y+A]=v._extendedAttrs[b+A])}else for(let A=0;A=b&&(this._combined[z-b+y]=v._combined[z])}}translateToString(v,b,y,x){b=b??0,y=y??this.length,v&&(y=Math.min(y,this.getTrimmedLength())),x&&(x.length=0);let C="";for(;b>22||1}return x&&x.push(b),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,h,f){if(h===u.length-1)return u[h].getTrimmedLength();const p=!u[h].hasContent(f-1)&&u[h].getWidth(f-1)===1,m=u[h+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,h,f,p,m){const w=[];for(let k=0;k=k&&p0&&(z>x||y[z].getTrimmedLength()===0);z--)A++;A>0&&(w.push(k+y.length-A),w.push(A)),k+=y.length-1}return w},o.reflowLargerCreateNewLayout=function(u,h){const f=[];let p=0,m=h[p],w=0;for(let k=0;kc(u,y,h))).reduce(((b,y)=>b+y));let w=0,k=0,v=0;for(;vb&&(w-=b,k++);const y=u[k].getWidth(w-1)===2;y&&w--;const x=y?f-1:f;p.push(x),v+=x}return p},o.getWrappedLineTrimmedLength=c},5295:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const u=c(8460),h=c(844),f=c(9092);class p extends h.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),h=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[h.CHAR_DATA_ATTR_INDEX],this.bg=0;let k=!1;if(w[h.CHAR_DATA_CHAR_INDEX].length>2)k=!0;else if(w[h.CHAR_DATA_CHAR_INDEX].length===2){const v=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=v&&v<=56319){const b=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=b&&b<=57343?this.content=1024*(v-55296)+b-56320+65536|w[h.CHAR_DATA_WIDTH_INDEX]<<22:k=!0}else k=!0}else this.content=w[h.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|w[h.CHAR_DATA_WIDTH_INDEX]<<22;k&&(this.combinedData=w[h.CHAR_DATA_CHAR_INDEX],this.content=2097152|w[h.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),h=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,h.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,h;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}\\`})(h||(o.C1_ESCAPED=h={}))},7399:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const u=c(2584),h={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 b=h[f.keyCode],y=b==null?void 0:b[f.shiftKey?1:0];if(y)k.key=u.C0.ESC+y;else if(f.keyCode>=65&&f.keyCode<=90){const x=f.ctrlKey?f.keyCode-64:f.keyCode+32;let C=String.fromCharCode(x);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 x=f.code.slice(3,4);f.shiftKey||(x=x.toLowerCase()),k.key=u.C0.ESC+x,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,h=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 h=c.length;if(!h)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=h)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 h=c.length;if(!h)return 0;let f,p,m,w,k=0,v=0,b=0;if(this.interim[0]){let C=!1,N=this.interim[0];N&=(224&N)==192?31:(240&N)==224?15:7;let j,A=0;for(;(j=63&this.interim[++A])&&A<4;)N<<=6,N|=j;const z=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=z-A;for(;b=h)return 0;if(j=c[b++],(192&j)!=128){b--,C=!0;break}this.interim[A++]=j,N<<=6,N|=63&j}C||(z===2?N<128?b--:u[k++]=N:z===3?N<2048||N>=55296&&N<=57343||N===65279||(u[k++]=N):N<65536||N>1114111||(u[k++]=N)),this.interim.fill(0)}const y=h-4;let x=b;for(;x=h)return this.interim[0]=f,k;if(p=c[x++],(192&p)!=128){x--;continue}if(v=(31&f)<<6|63&p,v<128){x--;continue}u[k++]=v}else if((240&f)==224){if(x>=h)return this.interim[0]=f,k;if(p=c[x++],(192&p)!=128){x--;continue}if(x>=h)return this.interim[0]=f,this.interim[1]=p,k;if(m=c[x++],(192&m)!=128){x--;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(x>=h)return this.interim[0]=f,k;if(p=c[x++],(192&p)!=128){x--;continue}if(x>=h)return this.interim[0]=f,this.interim[1]=p,k;if(m=c[x++],(192&m)!=128){x--;continue}if(x>=h)return this.interim[0]=f,this.interim[1]=p,this.interim[2]=m,k;if(w=c[x++],(192&w)!=128){x--;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),h=[[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[y][1])return!1;for(;y>=b;)if(v=b+y>>1,w>k[v][1])b=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 b=u.UnicodeService.extractWidth(w);b===0?v=!1:b>k&&(k=b)}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),h=c(844);class f extends h.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],b=this._action(v,w);if(b){const x=C=>Date.now()-k>=12?setTimeout((()=>this._innerWrite(0,C))):this._innerWrite(k,C);return void b.catch((C=>(queueMicrotask((()=>{throw C})),Promise.resolve(!1)))).then(x)}const y=this._callbacks[this._bufferOffset];if(y&&y(),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 h(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:${h(m,p)}/${h(w,p)}/${h(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),h=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 b=v.indexOf(k);b!==-1&&v.splice(b,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 b=this._active.length-1;b>=0;b--)this._active[b].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,b=this._active.length-1,y=!1;if(this._stack.paused&&(b=this._stack.loopPosition-1,v=k,y=this._stack.fallThrough,this._stack.paused=!1),!y&&v===!1){for(;b>=0&&(v=this._active[b].unhook(w),v!==!0);b--)if(v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!1,v;b--}for(;b>=0;b--)if(v=this._active[b].unhook(!1),v instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=b,this._stack.fallThrough=!0,v}else this._handlerFb(this._ident,"UNHOOK",w);this._active=p,this._ident=0}};const m=new h.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),h=c(8742),f=c(6242),p=c(6351);class m{constructor(b){this.table=new Uint8Array(b)}setDefault(b,y){this.table.fill(b<<4|y)}add(b,y,x,C){this.table[y<<8|b]=x<<4|C}addMany(b,y,x,C){for(let N=0;Nz)),y=(A,z)=>b.slice(A,z),x=y(32,127),C=y(0,24);C.push(25),C.push.apply(C,y(28,32));const N=y(0,14);let j;for(j in v.setDefault(1,0),v.addMany(x,0,2,0),N)v.addMany([24,26,153,154],j,3,0),v.addMany(y(128,144),j,3,0),v.addMany(y(144,152),j,3,0),v.add(156,j,0,0),v.add(27,j,11,1),v.add(157,j,4,8),v.addMany([152,158,159],j,0,7),v.add(155,j,11,3),v.add(144,j,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(x,8,5,8),v.add(127,8,5,8),v.addMany([156,27,24,26,7],8,6,0),v.addMany(y(28,32),8,0,8),v.addMany([88,94,95],1,0,7),v.addMany(x,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(y(64,127),3,7,0),v.addMany(y(48,60),3,8,4),v.addMany([60,61,62,63],3,9,4),v.addMany(y(48,60),4,8,4),v.addMany(y(64,127),4,7,0),v.addMany([60,61,62,63],4,0,6),v.addMany(y(32,64),6,0,6),v.add(127,6,0,6),v.addMany(y(64,127),6,0,0),v.addMany(y(32,48),3,9,5),v.addMany(y(32,48),5,9,5),v.addMany(y(48,64),5,0,6),v.addMany(y(64,127),5,7,0),v.addMany(y(32,48),4,9,5),v.addMany(y(32,48),1,9,2),v.addMany(y(32,48),2,9,2),v.addMany(y(48,127),2,10,0),v.addMany(y(48,80),1,10,0),v.addMany(y(81,88),1,10,0),v.addMany([89,90,92],1,10,0),v.addMany(y(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(y(28,32),9,0,9),v.addMany(y(32,48),9,9,12),v.addMany(y(48,60),9,8,10),v.addMany([60,61,62,63],9,9,10),v.addMany(C,11,0,11),v.addMany(y(32,128),11,0,11),v.addMany(y(28,32),11,0,11),v.addMany(C,10,0,10),v.add(127,10,0,10),v.addMany(y(28,32),10,0,10),v.addMany(y(48,60),10,8,10),v.addMany([60,61,62,63],10,0,11),v.addMany(y(32,48),10,9,12),v.addMany(C,12,0,12),v.add(127,12,0,12),v.addMany(y(28,32),12,0,12),v.addMany(y(32,48),12,9,12),v.addMany(y(48,64),12,0,11),v.addMany(y(64,127),12,12,13),v.addMany(y(64,127),10,12,13),v.addMany(y(64,127),9,12,13),v.addMany(C,13,13,13),v.addMany(x,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(b=o.VT500_TRANSITION_TABLE){super(),this._transitions=b,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new h.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(y,x,C)=>{},this._executeHandlerFb=y=>{},this._csiHandlerFb=(y,x)=>{},this._escHandlerFb=y=>{},this._errorHandlerFb=y=>y,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(b,y=[64,126]){let x=0;if(b.prefix){if(b.prefix.length>1)throw new Error("only one byte as prefix supported");if(x=b.prefix.charCodeAt(0),x&&60>x||x>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(b.intermediates){if(b.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let N=0;Nj||j>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");x<<=8,x|=j}}if(b.final.length!==1)throw new Error("final must be a single byte");const C=b.final.charCodeAt(0);if(y[0]>C||C>y[1])throw new Error(`final must be in range ${y[0]} .. ${y[1]}`);return x<<=8,x|=C,x}identToString(b){const y=[];for(;b;)y.push(String.fromCharCode(255&b)),b>>=8;return y.reverse().join("")}setPrintHandler(b){this._printHandler=b}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(b,y){const x=this._identifier(b,[48,126]);this._escHandlers[x]===void 0&&(this._escHandlers[x]=[]);const C=this._escHandlers[x];return C.push(y),{dispose:()=>{const N=C.indexOf(y);N!==-1&&C.splice(N,1)}}}clearEscHandler(b){this._escHandlers[this._identifier(b,[48,126])]&&delete this._escHandlers[this._identifier(b,[48,126])]}setEscHandlerFallback(b){this._escHandlerFb=b}setExecuteHandler(b,y){this._executeHandlers[b.charCodeAt(0)]=y}clearExecuteHandler(b){this._executeHandlers[b.charCodeAt(0)]&&delete this._executeHandlers[b.charCodeAt(0)]}setExecuteHandlerFallback(b){this._executeHandlerFb=b}registerCsiHandler(b,y){const x=this._identifier(b);this._csiHandlers[x]===void 0&&(this._csiHandlers[x]=[]);const C=this._csiHandlers[x];return C.push(y),{dispose:()=>{const N=C.indexOf(y);N!==-1&&C.splice(N,1)}}}clearCsiHandler(b){this._csiHandlers[this._identifier(b)]&&delete this._csiHandlers[this._identifier(b)]}setCsiHandlerFallback(b){this._csiHandlerFb=b}registerDcsHandler(b,y){return this._dcsParser.registerHandler(this._identifier(b),y)}clearDcsHandler(b){this._dcsParser.clearHandler(this._identifier(b))}setDcsHandlerFallback(b){this._dcsParser.setHandlerFallback(b)}registerOscHandler(b,y){return this._oscParser.registerHandler(b,y)}clearOscHandler(b){this._oscParser.clearHandler(b)}setOscHandlerFallback(b){this._oscParser.setHandlerFallback(b)}setErrorHandler(b){this._errorHandler=b}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(b,y,x,C,N){this._parseStack.state=b,this._parseStack.handlers=y,this._parseStack.handlerPos=x,this._parseStack.transition=C,this._parseStack.chunkPos=N}parse(b,y,x){let C,N=0,j=0,A=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,A=this._parseStack.chunkPos+1;else{if(x===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const z=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(x===!1&&M>-1){for(;M>=0&&(C=z[M](this._params),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 4:if(x===!1&&M>-1){for(;M>=0&&(C=z[M](),C!==!0);M--)if(C instanceof Promise)return this._parseStack.handlerPos=M,C}this._parseStack.handlers=[];break;case 6:if(N=b[this._parseStack.chunkPos],C=this._dcsParser.unhook(N!==24&&N!==26,x),C)return C;N===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(N=b[this._parseStack.chunkPos],C=this._oscParser.end(N!==24&&N!==26,x),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 z=A;z>4){case 2:for(let G=z+1;;++G){if(G>=y||(N=b[G])<32||N>126&&N=y||(N=b[G])<32||N>126&&N=y||(N=b[G])<32||N>126&&N=y||(N=b[G])<32||N>126&&N=0&&(C=M[D](this._params),C!==!0);D--)if(C instanceof Promise)return this._preserveStack(3,M,D,j,z),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(++z47&&N<60);z--;break;case 9:this._collect<<=8,this._collect|=N;break;case 10:const I=this._escHandlers[this._collect<<8|N];let B=I?I.length-1:-1;for(;B>=0&&(C=I[B](),C!==!0);B--)if(C instanceof Promise)return this._preserveStack(4,I,B,j,z),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 G=z+1;;++G)if(G>=y||(N=b[G])===24||N===26||N===27||N>127&&N=y||(N=b[G])<32||N>127&&N{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const u=c(5770),h=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,h.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,h.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 h={instance:u,dispose:u.dispose,isDisposed:!1};this._addons.push(h),u.dispose=()=>this._wrappedAddonDispose(h),u.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let u=-1;for(let h=0;h{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const u=c(3785),h=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 h.CellData}}},3785:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const u=c(511);o.BufferLineApiView=class{constructor(h){this._line=h}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(h,f){if(!(h<0||h>=this._line.length))return f?(this._line.loadCell(h,f),f):this._line.loadCell(h,new u.CellData)}translateToString(h,f,p){return this._line.translateToString(h,f,p)}}},8285:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const u=c(8771),h=c(8460),f=c(844);class p extends f.Disposable{constructor(w){super(),this._core=w,this._onBufferChange=this.register(new h.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,(h=>u(h.toArray())))}addCsiHandler(c,u){return this.registerCsiHandler(c,u)}registerDcsHandler(c,u){return this._core.registerDcsHandler(c,((h,f)=>u(h,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,b,y,x){var C,N=arguments.length,j=N<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,b,y,x);else for(var A=v.length-1;A>=0;A--)(C=v[A])&&(j=(N<3?C(j):N>3?C(b,y,j):C(b,y))||j);return N>3&&j&&Object.defineProperty(b,y,j),j},h=this&&this.__param||function(v,b){return function(y,x){b(y,x,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,b){this.cols=v,this.rows=b,this.buffers.resize(v,b),this._onResize.fire({cols:v,rows:b})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(v,b=!1){const y=this.buffer;let x;x=this._cachedBlankLine,x&&x.length===this.cols&&x.getFg(0)===v.fg&&x.getBg(0)===v.bg||(x=y.getBlankLine(v,b),this._cachedBlankLine=x),x.isWrapped=b;const C=y.ybase+y.scrollTop,N=y.ybase+y.scrollBottom;if(y.scrollTop===0){const j=y.lines.isFull;N===y.lines.length-1?j?y.lines.recycle().copyFrom(x):y.lines.push(x.clone()):y.lines.splice(N+1,0,x.clone()),j?this.isUserScrolling&&(y.ydisp=Math.max(y.ydisp-1,0)):(y.ybase++,this.isUserScrolling||y.ydisp++)}else{const j=N-C+1;y.lines.shiftElements(C+1,j-1,-1),y.lines.set(N,x.clone())}this.isUserScrolling||(y.ydisp=y.ybase),this._onScroll.fire(y.ydisp)}scrollLines(v,b,y){const x=this.buffer;if(v<0){if(x.ydisp===0)return;this.isUserScrolling=!0}else v+x.ydisp>=x.ybase&&(this.isUserScrolling=!1);const C=x.ydisp;x.ydisp=Math.max(Math.min(x.ydisp+v,x.ybase),0),C!==x.ydisp&&(b||this._onScroll.fire(x.ydisp))}};o.BufferService=k=u([h(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(x,C,N,j){var A,z=arguments.length,M=z<3?C:j===null?j=Object.getOwnPropertyDescriptor(C,N):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(x,C,N,j);else for(var D=x.length-1;D>=0;D--)(A=x[D])&&(M=(z<3?A(M):z>3?A(C,N,M):A(C,N))||M);return z>3&&M&&Object.defineProperty(C,N,M),M},h=this&&this.__param||function(x,C){return function(N,j){C(N,j,x)}};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:x=>x.button!==4&&x.action===1&&(x.ctrl=!1,x.alt=!1,x.shift=!1,!0)},VT200:{events:19,restrict:x=>x.action!==32},DRAG:{events:23,restrict:x=>x.action!==32||x.button!==3},ANY:{events:31,restrict:x=>!0}};function k(x,C){let N=(x.ctrl?16:0)|(x.shift?4:0)|(x.alt?8:0);return x.button===4?(N|=64,N|=x.action):(N|=3&x.button,4&x.button&&(N|=64),8&x.button&&(N|=128),x.action===32?N|=32:x.action!==0||C||(N|=3)),N}const v=String.fromCharCode,b={DEFAULT:x=>{const C=[k(x,!1)+32,x.col+32,x.row+32];return C[0]>255||C[1]>255||C[2]>255?"":`\x1B[M${v(C[0])}${v(C[1])}${v(C[2])}`},SGR:x=>{const C=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${k(x,!0)};${x.col};${x.row}${C}`},SGR_PIXELS:x=>{const C=x.action===0&&x.button!==4?"m":"M";return`\x1B[<${k(x,!0)};${x.x};${x.y}${C}`}};let y=o.CoreMouseService=class extends m.Disposable{constructor(x,C){super(),this._bufferService=x,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(b))this.addEncoding(N,b[N]);this.reset()}addProtocol(x,C){this._protocols[x]=C}addEncoding(x,C){this._encodings[x]=C}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(x){if(!this._protocols[x])throw new Error(`unknown protocol "${x}"`);this._activeProtocol=x,this._onProtocolChange.fire(this._protocols[x].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(x){if(!this._encodings[x])throw new Error(`unknown encoding "${x}"`);this._activeEncoding=x}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(x){if(x.col<0||x.col>=this._bufferService.cols||x.row<0||x.row>=this._bufferService.rows||x.button===4&&x.action===32||x.button===3&&x.action!==32||x.button!==4&&(x.action===2||x.action===3)||(x.col++,x.row++,x.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,x,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(x))return!1;const C=this._encodings[this._activeEncoding](x);return C&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(C):this._coreService.triggerDataEvent(C,!0)),this._lastEvent=x,!0}explainEvents(x){return{down:!!(1&x),up:!!(2&x),drag:!!(4&x),move:!!(8&x),wheel:!!(16&x)}}_equalEvents(x,C,N){if(N){if(x.x!==C.x||x.y!==C.y)return!1}else if(x.col!==C.col||x.row!==C.row)return!1;return x.button===C.button&&x.action===C.action&&x.ctrl===C.ctrl&&x.alt===C.alt&&x.shift===C.shift}};o.CoreMouseService=y=u([h(0,f.IBufferService),h(1,f.ICoreService)],y)},6975:function(a,o,c){var u=this&&this.__decorate||function(y,x,C,N){var j,A=arguments.length,z=A<3?x:N===null?N=Object.getOwnPropertyDescriptor(x,C):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(y,x,C,N);else for(var M=y.length-1;M>=0;M--)(j=y[M])&&(z=(A<3?j(z):A>3?j(x,C,z):j(x,C))||z);return A>3&&z&&Object.defineProperty(x,C,z),z},h=this&&this.__param||function(y,x){return function(C,N){x(C,N,y)}};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 b=o.CoreService=class extends m.Disposable{constructor(y,x,C){super(),this._bufferService=y,this._logService=x,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(y,x=!1){if(this._optionsService.rawOptions.disableStdin)return;const C=this._bufferService.buffer;x&&this._optionsService.rawOptions.scrollOnUserInput&&C.ybase!==C.ydisp&&this._onRequestScrollToBottom.fire(),x&&this._onUserInput.fire(),this._logService.debug(`sending data "${y}"`,(()=>y.split("").map((N=>N.charCodeAt(0))))),this._onData.fire(y)}triggerBinaryEvent(y){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${y}"`,(()=>y.split("").map((x=>x.charCodeAt(0))))),this._onBinary.fire(y))}};o.CoreService=b=u([h(0,w.IBufferService),h(1,w.ILogService),h(2,w.IOptionsService)],b)},9074:(a,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const u=c(8055),h=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((y=>y==null?void 0:y.marker.line)),this._onDecorationRegistered=this.register(new h.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new h.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,f.toDisposable)((()=>this.reset())))}registerDecoration(y){if(y.marker.isDisposed)return;const x=new v(y);if(x){const C=x.marker.onDispose((()=>x.dispose()));x.onDispose((()=>{x&&(this._decorations.delete(x)&&this._onDecorationRemoved.fire(x),C.dispose())})),this._decorations.insert(x),this._onDecorationRegistered.fire(x)}return x}reset(){for(const y of this._decorations.values())y.dispose();this._decorations.clear()}*getDecorationsAtCell(y,x,C){let N=0,j=0;for(const A of this._decorations.getKeyIterator(x))N=A.options.x??0,j=N+(A.options.width??1),y>=N&&y{m=j.options.x??0,w=m+(j.options.width??1),y>=m&&y{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const u=c(2585),h=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,h.getServiceDependencies)(p).sort(((b,y)=>b.index-y.index)),k=[];for(const b of w){const y=this._services.get(b.id);if(!y)throw new Error(`[createInstance] ${p.name} depends on UNKNOWN service ${b.id}.`);k.push(y)}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,b,y,x){var C,N=arguments.length,j=N<3?b:x===null?x=Object.getOwnPropertyDescriptor(b,y):x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")j=Reflect.decorate(v,b,y,x);else for(var A=v.length-1;A>=0;A--)(C=v[A])&&(j=(N<3?C(j):N>3?C(b,y,j):C(b,y))||j);return N>3&&j&&Object.defineProperty(b,y,j),j},h=this&&this.__param||function(v,b){return function(y,x){b(y,x,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 b=0;bJSON.stringify(j))).join(", ")})`);const N=x.apply(this,C);return w.trace(`GlyphRenderer#${x.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),h=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 h.Disposable{constructor(k){super(),this._onOptionChange=this.register(new u.EventEmitter),this.onOptionChange=this._onOptionChange.event;const v={...o.DEFAULT_OPTIONS};for(const b in k)if(b in v)try{const y=k[b];v[b]=this._sanitizeAndValidateOption(b,y)}catch(y){console.error(y)}this.rawOptions=v,this.options={...v},this._setupOptions(),this.register((0,h.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(k,v){return this.onOptionChange((b=>{b===k&&v(this.rawOptions[k])}))}onMultipleOptionChange(k,v){return this.onOptionChange((b=>{k.indexOf(b)!==-1&&v()}))}_setupOptions(){const k=b=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);return this.rawOptions[b]},v=(b,y)=>{if(!(b in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${b}"`);y=this._sanitizeAndValidateOption(b,y),this.rawOptions[b]!==y&&(this.rawOptions[b]=y,this._onOptionChange.fire(b))};for(const b in this.rawOptions){const y={get:k.bind(this,b),set:v.bind(this,b)};Object.defineProperty(this.options,b,y)}}_sanitizeAndValidateOption(k,v){switch(k){case"cursorStyle":if(v||(v=o.DEFAULT_OPTIONS[k]),!(function(b){return b==="block"||b==="underline"||b==="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 b,y=arguments.length,x=y<3?w:v===null?v=Object.getOwnPropertyDescriptor(w,k):v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(m,w,k,v);else for(var C=m.length-1;C>=0;C--)(b=m[C])&&(x=(y<3?b(x):y>3?b(w,k,x):b(w,k))||x);return y>3&&x&&Object.defineProperty(w,k,x),x},h=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),b=this._entriesWithId.get(v);if(b)return this.addLineToLink(b.id,w.ybase+w.y),b.id;const y=w.addMarker(w.ybase+w.y),x={id:this._nextId++,key:this._getEntryIdKey(k),data:k,lines:[y]};return y.onDispose((()=>this._removeMarkerFromLink(x,y))),this._entriesWithId.set(x.key,x),this._dataByLinkId.set(x.id,x),x.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([h(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(h){return h[u]||[]},o.createDecorator=function(h){if(o.serviceRegistry.has(h))return o.serviceRegistry.get(h);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,b){v[c]===v?v[u].push({id:k,index:b}):(v[u]=[{id:k,index:b}],v[c]=v)})(f,p,w)};return f.toString=()=>h,o.serviceRegistry.set(h,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 h;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"})(h||(o.LogLevelEnum=h={})),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),h=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 h.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 b=0;b=v)return w+this.wcwidth(y);const N=m.charCodeAt(b);56320<=N&&N<=57343?y=1024*(y-55296)+N-56320+65536:w+=this.wcwidth(N)}const x=this.charProperties(y,k);let C=f.extractWidth(x);f.extractShouldJoin(x)&&(C-=f.extractWidth(k)),w+=C,k=x}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),h=s(5741),f=s(8285),p=s(7975),m=s(7090),w=["cols","rows"];class k extends u.Disposable{constructor(b){super(),this._core=this.register(new c.Terminal(b)),this._addonManager=this.register(new h.AddonManager),this._publicOptions={...this._core.options};const y=C=>this._core.options[C],x=(C,N)=>{this._checkReadonlyOptions(C),this._core.options[C]=N};for(const C in this._core.options){const N={get:y.bind(this,C),set:x.bind(this,C)};Object.defineProperty(this._publicOptions,C,N)}}_checkReadonlyOptions(b){if(w.includes(b))throw new Error(`Option "${b}" 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 b=this._core.coreService.decPrivateModes;let y="none";switch(this._core.coreMouseService.activeProtocol){case"X10":y="x10";break;case"VT200":y="vt200";break;case"DRAG":y="drag";break;case"ANY":y="any"}return{applicationCursorKeysMode:b.applicationCursorKeys,applicationKeypadMode:b.applicationKeypad,bracketedPasteMode:b.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:y,originMode:b.origin,reverseWraparoundMode:b.reverseWraparound,sendFocusMode:b.sendFocus,wraparoundMode:b.wraparound}}get options(){return this._publicOptions}set options(b){for(const y in b)this._publicOptions[y]=b[y]}blur(){this._core.blur()}focus(){this._core.focus()}input(b,y=!0){this._core.input(b,y)}resize(b,y){this._verifyIntegers(b,y),this._core.resize(b,y)}open(b){this._core.open(b)}attachCustomKeyEventHandler(b){this._core.attachCustomKeyEventHandler(b)}attachCustomWheelEventHandler(b){this._core.attachCustomWheelEventHandler(b)}registerLinkProvider(b){return this._core.registerLinkProvider(b)}registerCharacterJoiner(b){return this._checkProposedApi(),this._core.registerCharacterJoiner(b)}deregisterCharacterJoiner(b){this._checkProposedApi(),this._core.deregisterCharacterJoiner(b)}registerMarker(b=0){return this._verifyIntegers(b),this._core.registerMarker(b)}registerDecoration(b){return this._checkProposedApi(),this._verifyPositiveIntegers(b.x??0,b.width??0,b.height??0),this._core.registerDecoration(b)}hasSelection(){return this._core.hasSelection()}select(b,y,x){this._verifyIntegers(b,y,x),this._core.select(b,y,x)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(b,y){this._verifyIntegers(b,y),this._core.selectLines(b,y)}dispose(){super.dispose()}scrollLines(b){this._verifyIntegers(b),this._core.scrollLines(b)}scrollPages(b){this._verifyIntegers(b),this._core.scrollPages(b)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(b){this._verifyIntegers(b),this._core.scrollToLine(b)}clear(){this._core.clear()}write(b,y){this._core.write(b,y)}writeln(b,y){this._core.write(b),this._core.write(`\r -`,y)}paste(b){this._core.paste(b)}refresh(b,y){this._verifyIntegers(b,y),this._core.refresh(b,y)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return o}_verifyIntegers(...b){for(const y of b)if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const y of b)if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),i})()))})(Ew)),Ew.exports}var K$=T8n();const R8n=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function rA(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 R8n){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 Zb(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),i=new K$.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:rA(n,r)}),a=r==="app"?new MutationObserver(()=>{i.options.theme=rA(i.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const o=new z8n.FitAddon;i.loadAddon(o),t&&i.loadAddon(new A8n.WebLinksAddon((y,x)=>{let C;try{C=new URL(x)}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,h=null;const f=()=>{if(h===e.scrollTop){h=null;return}h=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",f);const p=()=>{var z;const y=i.element,x=y==null?void 0:y.querySelector(".xterm-screen"),C=y==null?void 0:y.querySelector(".xterm-viewport");if(!y||!(x instanceof HTMLElement)||!(C instanceof HTMLElement))return;const N=i.buffer.active;let j=Math.max(0,N.baseY+N.cursorY-N.viewportY+1);for(let M=i.rows-1;M>=j;M--)if((z=N.getLine(N.viewportY+M))!=null&&z.translateToString(!0).trim()){j=M+1;break}const A=x.getBoundingClientRect().height;y.style.height=`${Math.max(e.clientHeight,Math.min(j,i.rows)*A/i.rows)}px`,y.style.overflow="hidden",C.style.height=`${A}px`},m=()=>{try{const y=o.proposeDimensions();y&&(i.resize(y.cols,Math.max(y.rows,n?1:40)),p())}catch{}};m();const w=new ResizeObserver(m);w.observe(e);const k=i.onWriteParsed(()=>{var x;const y=u&&i.buffer.active.viewportY===i.buffer.active.baseY;if(p(),y){const C=(x=i.element)==null?void 0:x.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),h=e.scrollTop}}}),v=i.onScroll(p),b=y=>{(y.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function M8n(e){return Df(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||W$(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function O8n(e){return Df(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&W$(e.partitions)&&(e.error===null||typeof e.error=="string")}function D8n(e){return!Df(e)||e.type!=="complete"?null:e.backend==="ssh"&&M8n(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&O8n(e.result)?{backend:"slurm",result:e.result}:null}function Q$(e){return Df(e)&&e.type==="complete"}function L8n(e){return Df(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function ZS({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(Jb,{path:`${t}?${a}`,label:bI({host:Ce(e)}),active:r,onError:i,onComplete:o=>{const c=D8n(o);return c?(s(c),!0):!1}})}function I8n({login:e,onComplete:n,onError:t}){return _.jsx(Jb,{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=>Q$(r)?(n(),!0):!1})}function $8n({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(St,{className:"border-t-accent-amber"})," ",qTt()]}):i==="done"?_.jsxs(_.Fragment,{children:[_.jsx(bi,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",jTt()]}):i==="failed"?_.jsxs(_.Fragment,{children:[_.jsx(xr,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",LTt()]}):wTt()}),_.jsx("button",{type:"button",onClick:s,"aria-label":ij(),title:ij(),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(xr,{size:14})})]}),_.jsx(Jb,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(o,c)=>{a("failed"),c&&r(o)},onComplete:o=>Q$(o)?(a("done"),t(),!0):!1,onClosed:()=>a(o=>o==="running"?"closed":o)})]})}function Jb({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:h,onClosed:f}){const p=T.useRef(null),m=T.useRef(null),w=T.useRef(u),k=T.useRef(h),v=T.useRef(f),[b,y]=T.useState(null);return w.current=u,k.current=h,v.current=f,T.useEffect(()=>{const x=p.current;if(!x)return;const{terminal:C,dispose:N}=Zb(x,c,!0,i);if(m.current=C,c)return t&&C.writeln(`$ ${t}`),()=>{m.current=null,N()};C.focus();const j=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${j}//${location.host}`),z=new WebSocket(A);z.binaryType="arraybuffer";let M=!1,D=!1,I=!1;const B=(Q,V)=>{var Z;if(D){V||C.writeln(Q);return}D=!0,(!I||a)&&C.writeln(Q),(Z=k.current)==null||Z.call(k,Q,V),!(a&&!V)&&(C.options.disableStdin=!0,C.blur(),y(Q))},G=C.onData(Q=>{z.readyState===WebSocket.OPEN&&z.send(new TextEncoder().encode(Q))}),U=C.onResize(({cols:Q,rows:V})=>{z.readyState===WebSocket.OPEN&&z.send(JSON.stringify({type:"resize",cols:Q,rows:V}))});return z.onopen=()=>{t&&C.writeln(`$ ${t}`),z.send(JSON.stringify({type:"resize",cols:C.cols,rows:C.rows}))},z.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){I=!0,C.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=L8n(V);Z&&(M?C.writeln(Z):B(Z,!a))},z.onerror=()=>B(Pv(),!0),z.onclose=()=>{var Q;if(!M&&!D){B(Pv(),!0);return}a&&(C.options.disableStdin=!0,C.blur(),(Q=v.current)==null||Q.call(v))},()=>{z.onopen=null,z.onmessage=null,z.onerror=null,z.onclose=null,G.dispose(),U.dispose(),z.close(),m.current=null,N()}},[e,t,c,i,a]),T.useEffect(()=>{const x=m.current;x&&(x.options.disableStdin=c||!o||b!==null,!c&&o&&b===null?x.focus():x.blur())},[o,b,c]),_.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[_.jsx("div",{className:`${r} ${s==="card"?V$:`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"})}),b?_.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function B8n({host:e,transcript:n}){const t=T.useRef(null);return T.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=Zb(r,!0,!0);return s.write(n),i},[n]),_.jsx("div",{className:`mt-3 h-40 ${V$}`,role:"group","aria-label":bI({host:Ce(e)}),children:_.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Qv=null,_0=0;const JS=()=>Qv;function X$(){const e=_0;return U$(async(n,t)=>{if(e!==_0)return;const r=await r3n(n,t);e===_0&&tt.setQueryData(Om().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===_0&&Zt(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:ni(),onClick:()=>void ey.retry()}})})}let av=X$();function P8n(){_0++,Qv=null,av=X$()}const ey={flush:(e=!1)=>av.flush(e),retry:()=>av.retry(),queue(e,n=0){const t=Qv;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Qv=e,av.queue(e,n))}};window.addEventListener("pagehide",()=>void ey.flush(!0));function fl(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 co(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 Y$(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=>[Tt(u),u])),a=e.contentTabOrder.flatMap(u=>{const h=i.get(u);return h?[h]:[]}),o=Tt(e.rightTab);return{tabs:[...r,...a].map(u=>fl(u,Tt(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?fl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Tt(e.previewTab):null,history:e.tabHistory.map(Tt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Tt(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function F8n(e,n){const t=t6();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=>Tt(co(a))===Tt(co(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=co(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[Tt(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(Tt(a))}const s=new Map(r.map(i=>{const a=co(i);return[Tt(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?co(n):e!=null&&e.active?co(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,J$(t,n)}const Nw=(e,n)=>e.id===n.id&&e.view===n.view,z_=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,e6=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,Hs=(e,n,t)=>`${e}:${n??""}:${e6(t)}`,Z$=e=>({...e,lineScrollRequest:void 0});function m1(e){return typeof e=="object"&&"path"in e?Z$(e):e}const Cd=(e,n)=>e.branch===n.branch;function Tt(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:${e6(e)}`:`experiment:${e.id}:${e.view}`}function Xp(e,n){const t=e.filter(r=>Tt(r)!==n);return t.length===e.length?e:t}function H8n(e){return e!==void 0}function t6(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===Xd&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===qb){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(Tt),panelOpen:!0}}if(e===Ub){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Tt),panelOpen:!0}}return t}function n6(e,n){const t=t6(e,n);return t.panelOpen?Y$(t,{},{}):void 0}function J$(e,n){if(!n)return e;const t=co(n),r=Tt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs].find(c=>Tt(c)===r),i=(c,u)=>{const h=c.findIndex(f=>Tt(f)===r);return h<0?[...c,u]:JSON.stringify(fl(c[h]))===JSON.stringify(fl(u))?c:c.map((f,p)=>p===h?{...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&&Tt(o)===r&&JSON.stringify(fl(o))===JSON.stringify(fl(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Tt(c)!==r),t]),a}let lo=0;const F0=new Map,Xv=new Map,d5=new Set,h5=()=>{for(const e of d5)e()},q8n=e=>(d5.add(e),()=>{d5.delete(e)}),H0=new Map,uo=new Map,eB=e=>uo.get(e);function U8n(){lo++,uo.clear(),H0.clear(),F0.clear(),Xv.clear(),h5()}function G8n(e,n){const t=uo.get(e);if(!(t!=null&&t.tasks.new)||Lu(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const c=co(o);if(typeof c=="string"||!("path"in c))return[];const u=Hs(e,null,c);return u in a?[[Hs(e,n,c),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,H0.set(e,n),uo.set(e,{...t,tasks:i})}function K8n(e){let n=F0.get(e);if(!n){const t=lo;n=U$(async(r,s)=>{if(t!==lo)return;const i=await n3n(e,r,s);t===lo&&tt.setQueryData(LS(e).queryKey,i),t===lo&&Xv.delete(e)&&h5()},r=>{t===lo&&(Xv.set(e,r instanceof Error?r.message:String(r)),h5())}),F0.set(e,n)}return n}function zw(e,n,t,r){const s=uo.get(e);if(!s||t==="new"&&H0.has(e))return;const i=Yb(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?Lu(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:{}});uo.set(e,c),K8n(e).queue(c,u?250:0)}function sA(e,n,t,r){const s=new Set(e.state.fileTabs.map(h=>Hs(t,r==="new"?null:r,h))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([h])=>s.has(h))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([h])=>s.has(h))),o=Y$(e.state,i,a),c=e.pane??(n==null?void 0:n.active),u=c?Tt(co(c)):null;return o.active=o.tabs.find(h=>Tt(co(h))===u)??null,o}function V8n(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,firstDemoOpen:a,state:o,apply:c,getScroll:u,sourceModes:h,revision:f}=e,p=T.useRef(Jj()),m=T.useSyncExternalStore(q8n,()=>n?Xv.get(n)??null:null),[w,k]=T.useState(null),[v,b]=T.useState(0),[y,x]=T.useState(null),[C,N]=T.useState(null),j=T.useRef(null),A=T.useRef(null),z=T.useRef(null),M=T.useRef(e);M.current=e;const D=JSON.stringify([n,t,i]),I=JSON.stringify(s??null),B=T.useCallback(()=>{const U=z.current;if(!U)return;const Q=sA({...M.current,state:U.state,pane:U.pane},Lu(uo.get(U.projectId),U.taskKey),U.projectId,U.taskKey);zw(U.projectId,U.location,U.taskKey,Q)},[]);T.useEffect(()=>{let U=!0;const Q=lo;if(k(null),x(null),!!n)return uo.has(n)?x(n):tt.fetchQuery(LS(n)).then(V=>{!U||Q!==lo||(uo.set(n,V??Jj()),x(n))}).catch(V=>{U&&Q===lo&&k(V instanceof Error?V.message:String(V))}),()=>{U=!1}},[n,v]),T.useLayoutEffect(()=>{if(z.current&&z.current.scope!==D){const V=z.current.projectId;B(),H0.get(V)===t&&H0.delete(V),z.current=null}if(!n||y!==n)return;const U=uo.get(n);if(!U)return;if(p.current=U,j.current!==D){if(j.current=D,A.current=I,i){const V=Lu(U,t)??(Vo(n)?n6(t,a):void 0);c(F8n(V,s),V,!0)}N(D);return}if(C!==D)return;let Q=o;A.current!==I&&(A.current=I,i&&s&&(Q=J$(o,s),c(Q,void 0,!1))),i?(zw(n,r,t,sA({state:Q,pane:s,getScroll:u,sourceModes:h},Lu(U,t),n,t)),z.current={projectId:n,taskKey:t,scope:D,location:r,pane:s,state:Q}):zw(n,r),p.current=uo.get(n)??U},[n,t,r,s,I,i,a,o,c,u,h,f,y,D,C,B]),T.useEffect(()=>{const U=lo,Q=Z=>{if(U===lo){B();for(const J of F0.values())J.flush(Z)}},V=()=>Q(!0);return window.addEventListener("pagehide",V),()=>{window.removeEventListener("pagehide",V),Q(!1)}},[B]);const G=T.useCallback(()=>{var U;n&&(w?b(Q=>Q+1):(U=F0.get(n))==null||U.retry())},[n,w]);return{ready:n===null||y===n&&C===D,loaded:n===null||y===n,error:w??m,retry:G,capture:B,workspace:p}}const W8n="data:image/svg+xml,"+encodeURIComponent(''),p5=T.createContext(null);function Q8n(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function tB(){const e=T.useContext(p5);if(!e)throw new Error("Runtime is not connected");return e}function X8n(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?W8n:"/favicon.svg")}function iA(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function Y8n(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!iA("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&o$(n),!iA("orx:locale")&&t&&eL(t)&&s$(t)}function Z8n(e){return e.includes("ssh ")&&e.includes("failed")}function aA({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:VL({host:Ce(e)})}),_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:D3()}),_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:cCt()})]})})}function oA({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,D,I;const{session:s}=e,[i,a]=T.useState(s.installPaths),[o,c]=T.useState(!1),[u,h]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(D=s.installPaths)==null?void 0:D.database,(I=s.installPaths)==null?void 0:I.cache]);async function f(){if(i){c(!0);try{await x5n(i)}catch(B){Zt(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 w5n()}catch(G){Zt(G instanceof Error?G.message:String(G),"error")}finally{c(!1)}}async function m(){c(!0);try{await BI()}catch(B){Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function w(){c(!0);try{h(await PI())}catch(B){Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function k(){if(u){c(!0);try{await FI(u),h(null)}catch(B){h(null),Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}}async function v(){c(!0);try{await k5n()}catch(B){Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}const b=s.status==="applying"||o,y=s.status==="needsInstall",x=s.status==="needsUpdate",C=i&&y,N=["connecting","applying","reconnecting"].includes(s.status),j=s.status==="disconnected"&&s.error!==null&&Z8n(s.error)&&t!==s.error&&!s.canStartNewHost,A=y?XCt():x?KEt():s.status==="applying"?jSt({host:Ce(s.host)}):s.status==="reconnecting"?_8t({host:Ce(s.host)}):s.status==="disconnected"?s.error?tCt({host:Ce(s.host)}):s.canStartNewHost?wCt({host:Ce(s.host)}):VL({host:Ce(s.host)}):l6t({host:Ce(s.host)}),z=s.error??(s.canStartNewHost?pCt():y?g7t({user:Ce(s.user??""),host:Ce(s.host)}):x?BEt({host:Ce(s.host)}):s.status==="applying"?wSt():s.status==="reconnecting"?s8t():s.status==="disconnected"?H6t():n6t());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(St,{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}),!j&&_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:z})]})]}),j&&_.jsx(ZS,{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:qCt()}),[["binary",jCt()],["database",LCt()]].map(([B,G])=>_.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[G,_.jsx(Br,{value:i[B],onChange:U=>a({...i,[B]:U.target.value}),disabled:b,dir:"ltr"})]},B)),!s.error&&_.jsx("div",{className:"flex justify-end pt-1",children:_.jsx(Ie,{variant:"primary",disabled:b,onClick:()=>void f(),children:b?_.jsxs(_.Fragment,{children:[_.jsx(St,{})," ",r7t()]}):x?tj():iI()})})]}),x&&i&&_.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&_.jsx(Ie,{variant:"primary",disabled:b,onClick:()=>void f(),children:b?_.jsxs(_.Fragment,{children:[_.jsx(St,{})," ",JEt()]}):tj()})}),s.status==="disconnected"&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?_.jsxs(Ie,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?_.jsx(St,{}):null,s.error?Jz():A8t()]}):_.jsxs(Ie,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?_.jsx(St,{}):null,Jz()]})}),(s.status==="connecting"||s.status==="reconnecting")&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:_.jsx(Ie,{disabled:o,onClick:()=>void m(),children:B3()})}),x&&s.error&&_.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[_.jsx(Ie,{disabled:o,onClick:()=>void m(),children:B3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?_.jsx(St,{}):null,Zz()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid w(),children:[o?_.jsx(St,{}):null,WL()]})]}),y&&s.error&&_.jsx("div",{className:"mt-6 flex justify-end",children:_.jsxs(Ie,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?_.jsx(St,{}):null,Zz()]})})]})}),u&&_.jsx(E$,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||h(null)},onConfirm:()=>void k()})]})}function J8n({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 e9n(){T.useSyncExternalStore(RE,eW),T.useEffect(()=>RE(()=>{P8n(),U8n()}),[]);const e=iX({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,h]=T.useState(null),f=ut({...Fkn(),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,b;if(e)return;const w=f.data;if(!w){s(((v=f.error)==null?void 0:v.message)??null);return}const k=Q8n(w);tW(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,Y8n(w)),w.session.status==="connected"?(i.current=!0,a.current=!0,h(null)):w.session.status==="disconnected"&&w.session.error===null&&(a.current=!1)),t(w),s(((b=f.error)==null?void 0:b.message)??null)},[e,f.data,f.error]),T.useEffect(()=>{const w=(n==null?void 0:n.kind)==="ssh";X8n(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(St,{})," ",G7t()]});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(Ie,{onClick:()=>location.reload(),children:ni()})]}):_.jsx(St,{})});if(n.kind==="local")return _.jsxs(p5,{value:n,children:[_.jsx(Oj,{}),_.jsx(O0,{})]},yi()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?_.jsx(aA,{host:n.session.host}):_.jsx(oA,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:h});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(p5,{value:n,children:[_.jsx(Oj,{}),_.jsx(O0,{})]},yi()[1])}),m&&_.jsx(J8n,{children:r?_.jsx(aA,{host:n.session.host,overlay:!0}):_.jsx(oA,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:h})})]})}const ty=HQ()({component:e9n}),r6="orx:demo-read-sessions";function nB(){try{const e=JSON.parse(sessionStorage.getItem(r6)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function t9n(e){try{const n=nB();n.add(e),sessionStorage.setItem(r6,JSON.stringify([...n]))}catch{}}function n9n(){try{sessionStorage.removeItem(r6)}catch{}}function rB(e,n){const t=gf(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function r9n(e=tt){var i;const[n,t]=await Promise.all([e.fetchQuery(Om()),e.fetchQuery(zh())]),r=Yb((i=JS()??n.workspace)==null?void 0:i.lastLocation);if(!r)return"/projects";const s=gf(r.split("?")[0]);return!(s!=null&&s.projectId)||!t.some(a=>a.id===s.projectId)||s.sessionId&&!rB(r,await e.fetchQuery(Gi(s.projectId)))?"/projects":r}async function s9n(e,n=tt){var h;const[t,r]=await Promise.all([n.fetchQuery(LS(e)),n.fetchQuery(Gi(e))]),s=eB(e)??t,i=Yb(s==null?void 0:s.lastLocation);if(i&&((h=gf(i.split("?")[0]))==null?void 0:h.projectId)===e&&rB(i,r))return i;const a=r.find(f=>!f.archived&&!f.sideParentSessionId),o=Vo(e)?n6(a==null?void 0:a.id,!(await n.fetchQuery(Om())).tourCompleted):void 0,c=Lu(s,(a==null?void 0:a.id)??"new"),u=c?c.active:o==null?void 0:o.active;return iv(e,(a==null?void 0:a.id)??null,u)}const Yv=360,i9n=272,a9n=380,o9n=i9n+56;function Fd(){return Math.max(Yv,window.innerWidth-o9n-a9n)}const c9n=500,l9n=.33;function cA(){return Math.min(Fd(),Math.max(c9n,Math.round(window.innerWidth*l9n)))}function sB(){const e=Fd();return Math.max(Yv,Math.min(480,e,Math.round(window.innerWidth*.25)))}function s6(){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 jw(){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(s6,{}),"OpenResearch"]})}const lA="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 u9n({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 ${lA}`,onClick:n,"aria-label":bN({value:Ce(e)}),title:bN({value:Ce(e)}),children:_.jsx(Y7n,{size:11})}),_.jsx("button",{type:"button",className:`cmd-inline-copy ${lA}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?uf():jY({value:Ce(e)}),title:t?uf():SS(),children:t?_.jsx(bi,{size:11,strokeWidth:3}):_.jsx(Yu,{size:11})})]})}function Fu(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?_.jsx(u9n,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function ny(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 Th({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 m5(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function _9n(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function uA(e,n){return n||e==="preview"}function f9n(e,n){if(!e||e.needsConfigRepair)return null;const t=m5(e);return t===n?null:t}function iB({harness:e,commands:n,onReady:t,onClose:r}){const s=T.useRef(null),i=T.useRef(!1),[a,o]=T.useState(()=>m5(e)),[c,u]=T.useState(0),[h,f]=T.useState(()=>_9n(e,m5(e))),[p,m]=T.useState(h==="running"),[w,k]=T.useState(e.needsConfigRepair),[v,b]=T.useState(e.needsConfigRepair?e.agentNote??null:null),y=h==="running"||h==="checking",x=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"),b(null);try{const N=await hf(!0,!0);if(i.current)return;const j=N.find(A=>A.id===e.id);if(k((j==null?void 0:j.needsConfigRepair)??!1),j!=null&&j.agentReady&&(a!=="login"||j.authenticated))t==null||t(j),f("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(j!=null&&j.installed)&&!j.installBroken&&!j.needsConfigRepair&&j.authState==="needsLogin")o("login"),m(!0),f("running");else{const A=f9n(j,a);A&&(o(A),m(!1)),b((j==null?void 0:j.agentNote)??TL()),f("error")}}catch(N){if(i.current)return;b(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"&&y&&N.preventDefault()},onCancel:N=>{N.preventDefault(),y||r()},children:[_.jsxs("div",{className:"flex items-center gap-3",children:[_.jsx(Th,{harness:e.id,size:26}),_.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:xz({agent:e.name})})]}),h==="preview"?_.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?RXe({agent:e.name}):$Ye({agent:e.name})}):x&&uA(h,p)?_.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:Fu(vYe({command:x}))}):null,h!=="running"&&h!=="preview"&&_.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[h==="checking"&&_.jsx(St,{}),h==="success"?fXe({agent:e.name}):h==="error"?jL():iXe()]}),a==="install"&&n.requiresNpm&&_.jsx("p",{className:"text-sm text-subtext",children:_Ye()}),uA(h,p)&&_.jsx(Jb,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:xz({agent:e.name}),command:x,heightClass:"h-96",active:h==="running",awaitingApproval:h==="preview",onComplete:N=>typeof N!="object"||N===null||!("type"in N)||N.type!=="complete"?!1:(C(),!0),onError:N=>{b(N),f("error")}},`${a}-${c}`),v&&_.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:Fu(v)}),_.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h==="error"&&_.jsx(Ie,{variant:"ghost",onClick:()=>{b(null),C()},children:Iv()}),h==="error"&&!w&&_.jsx(Ie,{onClick:()=>{b(null),m(!0),f("running"),u(N=>N+1)},children:ni()}),_.jsx(Ie,{variant:h==="success"?"primary":"default",onClick:r,children:h==="success"?kI():y?ZQe():I0()}),h==="preview"&&_.jsx(Ie,{variant:"primary",onClick:()=>{m(!0),f("running")},children:GQe()})]})]})}const d9n={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 q0({variant:e="list",className:n,...t}){return _.jsx("span",{className:Ns("title",d9n[e],n),...t})}const _A=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),Ru=["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(" "),Aw=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),aB=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),h9n=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),p9n=[{id:"AI/ML",label:qft},{id:"Biology",label:Xft},{id:"Physics",label:udt},{id:"Other",label:rdt}],m9n=["welcome","environment","profile"];function g9n({onDone:e,preferredAgent:n,remote:t}){var nt;const r=pn({mutationFn:ke=>i3n(...ke)}),[s,i]=T.useState(0);T.useEffect(()=>{const ke=m9n[s];ke&&vu({name:"onboarding_step_viewed",step:ke})},[s]);const a=ut(Bu()),o=ut(y0()),c=ut(XI()),[u,h]=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 ke;return(ke=m.current)==null?void 0:ke.close()},[]);const b=a.data??null,y=(nt=o.data)==null?void 0:nt.gitVersion,[x,C]=T.useState(!1),[N,j]=T.useState(null),[A,z]=T.useState(""),[M,D]=T.useState(null),[I,B]=T.useState(!1),[G,U]=T.useState([]),[Q,V]=T.useState(""),[Z,J]=T.useState(""),[$,L]=T.useState([]),[q,P]=T.useState(""),[F,re]=T.useState([]),[ie,ue]=T.useState(!1),se=T.useRef(0),[K,oe]=T.useState(!1),[ce,pe]=T.useState(!1),ve=(b==null?void 0:b.some(ke=>ke.agentReady&&!ke.catalogPending))??!1,Me=(b==null?void 0:b.some(ke=>ke.catalogPending))??!1,Fe=y!=null,Ye=T.useRef(0),Te=(ke,me=!1)=>{const je=++Ye.current;B(!0),oe(!1),pe(!1);const qe=()=>je===Ye.current;Promise.allSettled([hf(ke,me),tt.fetchQuery({...y0(),staleTime:ke?0:3e4})]).then(([rt,dt])=>{qe()&&(rt.status==="rejected"&&oe(!0),dt.status==="rejected"&&pe(!0))}).finally(()=>qe()&&B(!1))};T.useEffect(()=>Te(!1),[]),T.useEffect(()=>{if(b===null)return;const ke=b.filter(me=>me.agentReady&&!me.catalogPending);D(me=>{var qe;if(me&&ke.some(rt=>rt.id===me))return me;const je=n&&ke.find(rt=>rt.id===n.harness);return(je==null?void 0:je.id)??((qe=ke[0])==null?void 0:qe.id)??null})},[b,n]),T.useEffect(()=>oe(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>pe(o.isError),[o.isError,o.dataUpdatedAt]),T.useEffect(()=>{tt.fetchQuery(qkn()).then(ke=>{U(ke.researchAreas),V(ke.otherArea??""),J(ke.background??""),L(ke.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const ke=q.trim();if(ke.length<3){re([]),ue(!1);return}const me=++se.current;ue(!0);const je=setTimeout(()=>{tt.fetchQuery(r$(ke)).then(qe=>me===se.current&&re(qe)).catch(()=>me===se.current&&re([])).finally(()=>me===se.current&&ue(!1))},350);return()=>clearTimeout(je)},[q]);const $e=ke=>{const me=$.some(je=>je.paperId===ke.paperId);L(je=>je.some(qe=>qe.paperId===ke.paperId)?je:[...je,{paperId:ke.paperId,title:fA(ke.title)}]),P(""),re([]),me||tt.fetchQuery(a5(ke.paperId)).then(je=>{var rt;const qe=(rt=je.title)==null?void 0:rt.trim();qe&&L(dt=>dt.map(st=>st.paperId===ke.paperId?{...st,title:qe}:st))}).catch(()=>{})},yt=ke=>L(me=>me.filter(je=>je.paperId!==ke)),ot=ke=>{U(me=>me.includes(ke)?me.filter(je=>je!==ke):[...me,ke])},Mt=G.length>0&&(!G.includes("Other")||Q.trim().length>0),jt=()=>{if(k.current)return k.current;w.current="",v.current=!0,p(!0);const ke=(async()=>{await new Promise((qe,rt)=>{const dt=location.protocol==="https:"?"wss:":"ws:",st=new WebSocket(`${dt}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);st.binaryType="arraybuffer";const Ut=new TextDecoder,Xt=new K$.Terminal;Xt.onData(an=>{st.readyState===WebSocket.OPEN&&st.send(new TextEncoder().encode(an))}),m.current=st;let en=!1;st.onmessage=an=>{if(an.data instanceof ArrayBuffer){Xt.write(new Uint8Array(an.data)),w.current=(w.current+Ut.decode(an.data,{stream:!0})).slice(-65536);return}if(typeof an.data!="string")return;let At;try{At=JSON.parse(an.data)}catch{return}typeof At!="object"||At===null||!("type"in At)||(At.type==="complete"?(en=!0,st.close(),qe()):At.type==="error"&&(st.close(),rt(new Error("error"in At&&typeof At.error=="string"?At.error:jL()))))},st.onerror=()=>{st.close(),rt(new Error(Pv()))},st.onclose=()=>{Xt.dispose(),m.current=null,en||rt(new Error(Pv()))}});const je=(await hf(!0,!0)).find(qe=>qe.id==="opencode"&&qe.agentReady);if(!je)throw new Error(U0t());return D("opencode"),je})();return k.current=ke,ke.catch(()=>{}),ke};T.useEffect(()=>{t||v.current||!(b!=null&&b.length)||b.some(ke=>ke.catalogPending)||!b.every(ke=>!ke.installed&&!ke.installBroken)||jt()},[b,t]),T.useEffect(()=>{s===1&&f&&i(2)},[s,f]);const Pt=()=>{i(f?2:1)},Le=async(ke="complete")=>{var me;if(!(x||ke==="complete"&&(!Mt||!Fe))){C(!0),j(null),z("");try{const je=f?await jt():b==null?void 0:b.find(dt=>dt.id===M&&dt.agentReady&&!dt.catalogPending);if(!je)throw new Error(TL());if(ke==="setup")return;const qe=b9n(je,((me=je.models[0])==null?void 0:me.id)??null),rt=await r.mutateAsync([qe,{researchAreas:G,otherArea:G.includes("Other")?Q:null,background:Z||null,papers:$}]);e(rt.project,rt.selection)}catch(je){f&&(k.current=null);const qe=je instanceof Error?je.message:String(je);j(qe),z([w.current,qe].filter(Boolean).join(` +`,y)}paste(b){this._core.paste(b)}refresh(b,y){this._verifyIntegers(b,y),this._core.refresh(b,y)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(b){this._addonManager.loadAddon(this,b)}static get strings(){return o}_verifyIntegers(...b){for(const y of b)if(y===1/0||isNaN(y)||y%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...b){for(const y of b)if(y&&(y===1/0||isNaN(y)||y%1!=0||y<0))throw new Error("This API only accepts positive integers")}}a.Terminal=k})(),i})()))})(Cw)),Cw.exports}var V$=m9n();const g9n=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"];function sA(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 g9n){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 Yb(e,n,t=!1,r="dark"){const s=getComputedStyle(document.documentElement),i=new V$.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:sA(n,r)}),a=r==="app"?new MutationObserver(()=>{i.options.theme=sA(i.options.disableStdin??n,r)}):null;a==null||a.observe(document.documentElement,{attributes:!0,attributeFilter:["data-theme"]});const o=new d9n.FitAddon;i.loadAddon(o),t&&i.loadAddon(new p9n.WebLinksAddon((y,x)=>{let C;try{C=new URL(x)}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,h=null;const f=()=>{if(h===e.scrollTop){h=null;return}h=null,u=e.scrollTop+e.clientHeight>=e.scrollHeight-1};e.addEventListener("scroll",f);const p=()=>{var z;const y=i.element,x=y==null?void 0:y.querySelector(".xterm-screen"),C=y==null?void 0:y.querySelector(".xterm-viewport");if(!y||!(x instanceof HTMLElement)||!(C instanceof HTMLElement))return;const N=i.buffer.active;let j=Math.max(0,N.baseY+N.cursorY-N.viewportY+1);for(let M=i.rows-1;M>=j;M--)if((z=N.getLine(N.viewportY+M))!=null&&z.translateToString(!0).trim()){j=M+1;break}const A=x.getBoundingClientRect().height;y.style.height=`${Math.max(e.clientHeight,Math.min(j,i.rows)*A/i.rows)}px`,y.style.overflow="hidden",C.style.height=`${A}px`},m=()=>{try{const y=o.proposeDimensions();y&&(i.resize(y.cols,Math.max(y.rows,n?1:40)),p())}catch{}};m();const w=new ResizeObserver(m);w.observe(e);const k=i.onWriteParsed(()=>{var x;const y=u&&i.buffer.active.viewportY===i.buffer.active.baseY;if(p(),y){const C=(x=i.element)==null?void 0:x.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),h=e.scrollTop}}}),v=i.onScroll(p),b=y=>{(y.deltaY<0?e.scrollTop>0:e.scrollTop+e.clientHeighttypeof n=="string")}function v9n(e){return Df(e)&&typeof e.reachable=="boolean"&&typeof e.toolsFound=="boolean"&&(e.missingTools===void 0||W$(e.missingTools))&&(e.error===null||typeof e.error=="string")&&typeof e.testedAt=="number"}function b9n(e){return Df(e)&&typeof e.reachable=="boolean"&&typeof e.slurmFound=="boolean"&&typeof e.toolsFound=="boolean"&&W$(e.partitions)&&(e.error===null||typeof e.error=="string")}function y9n(e){return!Df(e)||e.type!=="complete"?null:e.backend==="ssh"&&v9n(e.result)?{backend:"ssh",result:e.result}:e.backend==="slurm"&&b9n(e.result)?{backend:"slurm",result:e.result}:null}function Q$(e){return Df(e)&&e.type==="complete"}function x9n(e){return Df(e)&&e.type==="error"&&typeof e.error=="string"?e.error:null}function ZS({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(Zb,{path:`${t}?${a}`,label:bI({host:Ce(e)}),active:r,onError:i,onComplete:o=>{const c=y9n(o);return c?(s(c),!0):!1}})}function w9n({login:e,onComplete:n,onError:t}){return _.jsx(Zb,{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=>Q$(r)?(n(),!0):!1})}function k9n({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(kt,{className:"border-t-accent-amber"})," ",zRt()]}):i==="done"?_.jsxs(_.Fragment,{children:[_.jsx(yi,{size:13,strokeWidth:2.5,className:"text-accent-green"})," ",hRt()]}):i==="failed"?_.jsxs(_.Fragment,{children:[_.jsx(xr,{size:13,strokeWidth:2.5,className:"text-accent-red"})," ",xRt()]}):oRt()}),_.jsx("button",{type:"button",onClick:s,"aria-label":aj(),title:aj(),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(xr,{size:14})})]}),_.jsx(Zb,{path:e,label:n,heightClass:"h-80",frame:"bare",palette:"app",shellAfter:!0,onError:(o,c)=>{a("failed"),c&&r(o)},onComplete:o=>Q$(o)?(a("done"),t(),!0):!1,onClosed:()=>a(o=>o==="running"?"closed":o)})]})}function Zb({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:h,onClosed:f}){const p=T.useRef(null),m=T.useRef(null),w=T.useRef(u),k=T.useRef(h),v=T.useRef(f),[b,y]=T.useState(null);return w.current=u,k.current=h,v.current=f,T.useEffect(()=>{const x=p.current;if(!x)return;const{terminal:C,dispose:N}=Yb(x,c,!0,i);if(m.current=C,c)return t&&C.writeln(`$ ${t}`),()=>{m.current=null,N()};C.focus();const j=location.protocol==="https:"?"wss:":"ws:",A=new URL(e,`${j}//${location.host}`),z=new WebSocket(A);z.binaryType="arraybuffer";let M=!1,D=!1,I=!1;const B=(Q,K)=>{var Z;if(D){K||C.writeln(Q);return}D=!0,(!I||a)&&C.writeln(Q),(Z=k.current)==null||Z.call(k,Q,K),!(a&&!K)&&(C.options.disableStdin=!0,C.blur(),y(Q))},G=C.onData(Q=>{z.readyState===WebSocket.OPEN&&z.send(new TextEncoder().encode(Q))}),q=C.onResize(({cols:Q,rows:K})=>{z.readyState===WebSocket.OPEN&&z.send(JSON.stringify({type:"resize",cols:Q,rows:K}))});return z.onopen=()=>{t&&C.writeln(`$ ${t}`),z.send(JSON.stringify({type:"resize",cols:C.cols,rows:C.rows}))},z.onmessage=Q=>{if(Q.data instanceof ArrayBuffer){I=!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||z.close();return}const Z=x9n(K);Z&&(M?C.writeln(Z):B(Z,!a))},z.onerror=()=>B(Pv(),!0),z.onclose=()=>{var Q;if(!M&&!D){B(Pv(),!0);return}a&&(C.options.disableStdin=!0,C.blur(),(Q=v.current)==null||Q.call(v))},()=>{z.onopen=null,z.onmessage=null,z.onerror=null,z.onclose=null,G.dispose(),q.dispose(),z.close(),m.current=null,N()}},[e,t,c,i,a]),T.useEffect(()=>{const x=m.current;x&&(x.options.disableStdin=c||!o||b!==null,!c&&o&&b===null?x.focus():x.blur())},[o,b,c]),_.jsxs("div",{className:s==="card"?"mt-3":void 0,children:[_.jsx("div",{className:`${r} ${s==="card"?K$:`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"})}),b?_.jsx("p",{role:"alert",className:"sr-only",children:b}):null]})}function S9n({host:e,transcript:n}){const t=T.useRef(null);return T.useEffect(()=>{const r=t.current;if(!r)return;const{terminal:s,dispose:i}=Yb(r,!0,!0);return s.write(n),i},[n]),_.jsx("div",{className:`mt-3 h-40 ${K$}`,role:"group","aria-label":bI({host:Ce(e)}),children:_.jsx("div",{ref:t,className:"h-full overflow-hidden"})})}let Qv=null,_0=0;const JS=()=>Qv;function X$(){const e=_0;return U$(async(n,t)=>{if(e!==_0)return;const r=await H3n(n,t);e===_0&&tt.setQueryData(Om().queryKey,s=>s?{...s,workspace:r.workspace}:r)},n=>{e===_0&&Zt(n instanceof Error?n.message:String(n),"error",{id:"workspace-save",action:{label:ri(),onClick:()=>void Jb.retry()}})})}let av=X$();function C9n(){_0++,Qv=null,av=X$()}const Jb={flush:(e=!1)=>av.flush(e),retry:()=>av.retry(),queue(e,n=0){const t=Qv;t&&t.lastLocation===e.lastLocation&&t.railOpen===e.railOpen&&t.panelWidth===e.panelWidth&&t.experimentsView===e.experimentsView||(Qv=e,av.queue(e,n))}};window.addEventListener("pagehide",()=>void Jb.flush(!0));function fl(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 co(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 Y$(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=>[Tt(u),u])),a=e.contentTabOrder.flatMap(u=>{const h=i.get(u);return h?[h]:[]}),o=Tt(e.rightTab);return{tabs:[...r,...a].map(u=>fl(u,Tt(u)===o?e.selectedRunId:void 0)),active:e.panelOpen?fl(e.rightTab,e.selectedRunId):null,previewKey:e.previewTab?Tt(e.previewTab):null,history:e.tabHistory.map(Tt),expanded:Object.fromEntries([["files",[...e.filesToggled]],...e.codeTabs.map(u=>[Tt(u),[...u.toggled]])]),scroll:n,sourceModes:t,filesView:e.filesView,scope:e.scope,panelMax:e.panelMax,treeViewport:e.treeViewport}}function E9n(e,n){const t=t6();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=>Tt(co(a))===Tt(co(n)));i===-1?r.push(n):r[i]=n}for(const i of r){const a=co(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[Tt(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(Tt(a))}const s=new Map(r.map(i=>{const a=co(i);return[Tt(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?co(n):e!=null&&e.active?co(e.active):"experiments",t.panelOpen=n!==void 0,t.selectedRunId=(n==null?void 0:n.kind)==="experiment"?n.runId??null:null,J$(t,n)}const Ew=(e,n)=>e.id===n.id&&e.view===n.view,j_=(e,n)=>e.path===n.path&&(e.source??"repo")===(n.source??"repo")&&e.sessionId===n.sessionId&&e.ref===n.ref,e6=e=>`${e.source??"repo"}:${e.sessionId??""}:${e.ref??""}:${e.path}`,Us=(e,n,t)=>`${e}:${n??""}:${e6(t)}`,Z$=e=>({...e,lineScrollRequest:void 0});function m1(e){return typeof e=="object"&&"path"in e?Z$(e):e}const Cd=(e,n)=>e.branch===n.branch;function Tt(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:${e6(e)}`:`experiment:${e.id}:${e.view}`}function Xp(e,n){const t=e.filter(r=>Tt(r)!==n);return t.length===e.length?e:t}function N9n(e){return e!==void 0}function t6(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===Xd&&n){const r="experiments";return{...t,rightTab:r,tabHistory:[r],experimentsTabOpen:!0,panelOpen:!0}}if(e===Hb){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(Tt),panelOpen:!0}}if(e===qb){const r=[{path:"nanochat-bottleneck-diagnosis.md",source:"artifacts"}];return{...t,rightTab:r[0],tabHistory:[r[0]],fileTabs:r,contentTabOrder:r.map(Tt),panelOpen:!0}}return t}function n6(e,n){const t=t6(e,n);return t.panelOpen?Y$(t,{},{}):void 0}function J$(e,n){if(!n)return e;const t=co(n),r=Tt(t),s=[...e.expTabs,...e.fileTabs,...e.codeTabs,...e.planTabs,...e.subagentTabs,...e.sideTabs].find(c=>Tt(c)===r),i=(c,u)=>{const h=c.findIndex(f=>Tt(f)===r);return h<0?[...c,u]:JSON.stringify(fl(c[h]))===JSON.stringify(fl(u))?c:c.map((f,p)=>p===h?{...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&&Tt(o)===r&&JSON.stringify(fl(o))===JSON.stringify(fl(t))||(a.tabHistory=[...e.tabHistory.filter(c=>Tt(c)!==r),t]),a}let lo=0;const F0=new Map,Xv=new Map,f5=new Set,d5=()=>{for(const e of f5)e()},z9n=e=>(f5.add(e),()=>{f5.delete(e)}),H0=new Map,uo=new Map,eB=e=>uo.get(e);function j9n(){lo++,uo.clear(),H0.clear(),F0.clear(),Xv.clear(),d5()}function A9n(e,n){const t=uo.get(e);if(!(t!=null&&t.tasks.new)||Lu(t,n))return;const r=t.tasks.new,s=a=>Object.fromEntries(r.tabs.flatMap(o=>{if(o.kind!=="file")return[];const c=co(o);if(typeof c=="string"||!("path"in c))return[];const u=Us(e,null,c);return u in a?[[Us(e,n,c),a[u]]]:[]})),i={...t.tasks,[n]:{...r,scroll:s(r.scroll),sourceModes:s(r.sourceModes)}};delete i.new,H0.set(e,n),uo.set(e,{...t,tasks:i})}function T9n(e){let n=F0.get(e);if(!n){const t=lo;n=U$(async(r,s)=>{if(t!==lo)return;const i=await F3n(e,r,s);t===lo&&tt.setQueryData(LS(e).queryKey,i),t===lo&&Xv.delete(e)&&d5()},r=>{t===lo&&(Xv.set(e,r instanceof Error?r.message:String(r)),d5())}),F0.set(e,n)}return n}function Nw(e,n,t,r){const s=uo.get(e);if(!s||t==="new"&&H0.has(e))return;const i=Xb(n)??s.lastLocation,a=t?t==="new"?null:t:s.lastTaskId,o=t?Lu(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:{}});uo.set(e,c),T9n(e).queue(c,u?250:0)}function iA(e,n,t,r){const s=new Set(e.state.fileTabs.map(h=>Us(t,r==="new"?null:r,h))),i=Object.fromEntries(Object.entries(e.getScroll()).filter(([h])=>s.has(h))),a=Object.fromEntries(Object.entries(e.sourceModes).filter(([h])=>s.has(h))),o=Y$(e.state,i,a),c=e.pane??(n==null?void 0:n.active),u=c?Tt(co(c)):null;return o.active=o.tabs.find(h=>Tt(co(h))===u)??null,o}function R9n(e){const{projectId:n,taskKey:t,location:r,pane:s,isTask:i,firstDemoOpen:a,state:o,apply:c,getScroll:u,sourceModes:h,revision:f}=e,p=T.useRef(eA()),m=T.useSyncExternalStore(z9n,()=>n?Xv.get(n)??null:null),[w,k]=T.useState(null),[v,b]=T.useState(0),[y,x]=T.useState(null),[C,N]=T.useState(null),j=T.useRef(null),A=T.useRef(null),z=T.useRef(null),M=T.useRef(e);M.current=e;const D=JSON.stringify([n,t,i]),I=JSON.stringify(s??null),B=T.useCallback(()=>{const q=z.current;if(!q)return;const Q=iA({...M.current,state:q.state,pane:q.pane},Lu(uo.get(q.projectId),q.taskKey),q.projectId,q.taskKey);Nw(q.projectId,q.location,q.taskKey,Q)},[]);T.useEffect(()=>{let q=!0;const Q=lo;if(k(null),x(null),!!n)return uo.has(n)?x(n):tt.fetchQuery(LS(n)).then(K=>{!q||Q!==lo||(uo.set(n,K??eA()),x(n))}).catch(K=>{q&&Q===lo&&k(K instanceof Error?K.message:String(K))}),()=>{q=!1}},[n,v]),T.useLayoutEffect(()=>{if(z.current&&z.current.scope!==D){const K=z.current.projectId;B(),H0.get(K)===t&&H0.delete(K),z.current=null}if(!n||y!==n)return;const q=uo.get(n);if(!q)return;if(p.current=q,j.current!==D){if(j.current=D,A.current=I,i){const K=Lu(q,t)??(Ko(n)?n6(t,a):void 0);c(E9n(K,s),K,!0)}N(D);return}if(C!==D)return;let Q=o;A.current!==I&&(A.current=I,i&&s&&(Q=J$(o,s),c(Q,void 0,!1))),i?(Nw(n,r,t,iA({state:Q,pane:s,getScroll:u,sourceModes:h},Lu(q,t),n,t)),z.current={projectId:n,taskKey:t,scope:D,location:r,pane:s,state:Q}):Nw(n,r),p.current=uo.get(n)??q},[n,t,r,s,I,i,a,o,c,u,h,f,y,D,C,B]),T.useEffect(()=>{const q=lo,Q=Z=>{if(q===lo){B();for(const J of F0.values())J.flush(Z)}},K=()=>Q(!0);return window.addEventListener("pagehide",K),()=>{window.removeEventListener("pagehide",K),Q(!1)}},[B]);const G=T.useCallback(()=>{var q;n&&(w?b(Q=>Q+1):(q=F0.get(n))==null||q.retry())},[n,w]);return{ready:n===null||y===n&&C===D,loaded:n===null||y===n,error:w??m,retry:G,capture:B,workspace:p}}const M9n="data:image/svg+xml,"+encodeURIComponent(''),h5=T.createContext(null);function O9n(e){var n;return e.kind==="local"?"local":`${e.session.id}:${((n=e.session.installPaths)==null?void 0:n.database)??""}`}function tB(){const e=T.useContext(h5);if(!e)throw new Error("Runtime is not connected");return e}function D9n(e){const n=document.querySelector('link[rel="icon"]');n&&(n.href=e?M9n:"/favicon.svg")}function aA(e){try{return localStorage.getItem(e)!==null}catch{return!1}}function L9n(e){if(e.kind!=="ssh")return;const{theme:n,locale:t}=e.session.uiPreferences;!aA("orx:theme")&&(n==="light"||n==="dark"||n==="system")&&o$(n),!aA("orx:locale")&&t&&eL(t)&&s$(t)}function I9n(e){return e.includes("ssh ")&&e.includes("failed")}function oA({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:KL({host:Ce(e)})}),_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:O3()}),_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:KCt()})]})})}function cA({runtime:e,overlay:n=!1,retriedInteractiveError:t,setRetriedInteractiveError:r}){var M,D,I;const{session:s}=e,[i,a]=T.useState(s.installPaths),[o,c]=T.useState(!1),[u,h]=T.useState(null);T.useEffect(()=>a(s.installPaths),[(M=s.installPaths)==null?void 0:M.binary,(D=s.installPaths)==null?void 0:D.database,(I=s.installPaths)==null?void 0:I.cache]);async function f(){if(i){c(!0);try{await akn(i)}catch(B){Zt(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 okn()}catch(G){Zt(G instanceof Error?G.message:String(G),"error")}finally{c(!1)}}async function m(){c(!0);try{await BI()}catch(B){Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function w(){c(!0);try{h(await PI())}catch(B){Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}async function k(){if(u){c(!0);try{await FI(u),h(null)}catch(B){h(null),Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}}async function v(){c(!0);try{await ckn()}catch(B){Zt(B instanceof Error?B.message:String(B),"error")}finally{c(!1)}}const b=s.status==="applying"||o,y=s.status==="needsInstall",x=s.status==="needsUpdate",C=i&&y,N=["connecting","applying","reconnecting"].includes(s.status),j=s.status==="disconnected"&&s.error!==null&&I9n(s.error)&&t!==s.error&&!s.canStartNewHost,A=y?D7t():x?TNt():s.status==="applying"?h6t({host:Ce(s.host)}):s.status==="reconnecting"?X8t({host:Ce(s.host)}):s.status==="disconnected"?s.error?PCt({host:Ce(s.host)}):s.canStartNewHost?o7t({host:Ce(s.host)}):KL({host:Ce(s.host)}):W6t({host:Ce(s.host)}),z=s.error??(s.canStartNewHost?e7t():y?n8t({user:Ce(s.user??""),host:Ce(s.host)}):x?SNt({host:Ce(s.host)}):s.status==="applying"?o6t():s.status==="reconnecting"?q8t():s.status==="disconnected"?NCt():F6t());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(kt,{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}),!j&&_.jsx("p",{className:"mt-2 mb-0 text-base text-text",children:z})]})]}),j&&_.jsx(ZS,{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:z7t()}),[["binary",h7t()],["database",x7t()]].map(([B,G])=>_.jsxs("label",{className:"grid gap-1 text-sm font-medium text-subtext",children:[G,_.jsx(Br,{value:i[B],onChange:q=>a({...i,[B]:q.target.value}),disabled:b,dir:"ltr"})]},B)),!s.error&&_.jsx("div",{className:"flex justify-end pt-1",children:_.jsx(De,{variant:"primary",disabled:b,onClick:()=>void f(),children:b?_.jsxs(_.Fragment,{children:[_.jsx(kt,{})," ",H7t()]}):x?nj():iI()})})]}),x&&i&&_.jsx("div",{className:"mt-6 flex justify-end",children:!s.error&&_.jsx(De,{variant:"primary",disabled:b,onClick:()=>void f(),children:b?_.jsxs(_.Fragment,{children:[_.jsx(kt,{})," ",$Nt()]}):nj()})}),s.status==="disconnected"&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:s.canStartNewHost?_.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void v(),children:[o?_.jsx(kt,{}):null,s.error?ej():p9t()]}):_.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?_.jsx(kt,{}):null,ej()]})}),(s.status==="connecting"||s.status==="reconnecting")&&_.jsx("div",{className:"mt-6 flex justify-end border-t border-border-variant pt-5",children:_.jsx(De,{disabled:o,onClick:()=>void m(),children:$3()})}),x&&s.error&&_.jsxs("div",{className:"mt-6 flex justify-end gap-2 border-t border-border-variant pt-5",children:[_.jsx(De,{disabled:o,onClick:()=>void m(),children:$3()}),s.installPaths!==null&&(s.dashboardProtocol===null||s.dashboardProtocolvoid p(),children:[o?_.jsx(kt,{}):null,Jz()]}),s.installPaths===null&&s.dashboardProtocol!==null&&s.dashboardProtocolvoid w(),children:[o?_.jsx(kt,{}):null,WL()]})]}),y&&s.error&&_.jsx("div",{className:"mt-6 flex justify-end",children:_.jsxs(De,{variant:"primary",disabled:o,onClick:()=>void p(),children:[o?_.jsx(kt,{}):null,Jz()]})})]})}),u&&_.jsx(E$,{host:s.host,preview:u,currentClientAttached:!1,stopping:o,onClose:()=>{o||h(null)},onConfirm:()=>void k()})]})}function $9n({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 B9n(){T.useSyncExternalStore(g3,pD),T.useEffect(()=>g3(()=>{C9n(),j9n()}),[]);const e=rX({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,h]=T.useState(null),f=ut({...ESn(),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,b;if(e)return;const w=f.data;if(!w){s(((v=f.error)==null?void 0:v.message)??null);return}const k=O9n(w);JK(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,L9n(w)),w.session.status==="connected"?(i.current=!0,a.current=!0,h(null)):w.session.status==="disconnected"&&w.session.error===null&&(a.current=!1)),t(w),s(((b=f.error)==null?void 0:b.message)??null)},[e,f.data,f.error]),T.useEffect(()=>{const w=(n==null?void 0:n.kind)==="ssh";D9n(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(kt,{})," ",A8t()]});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(De,{onClick:()=>location.reload(),children:ri()})]}):_.jsx(kt,{})});if(n.kind==="local")return _.jsxs(h5,{value:n,children:[_.jsx(Dj,{}),_.jsx(O0,{})]},xi()[1]);if(!(a.current&&(n.session.status!=="disconnected"||n.session.error!==null))&&n.session.status!=="connected")return r?_.jsx(oA,{host:n.session.host}):_.jsx(cA,{runtime:n,retriedInteractiveError:u,setRetriedInteractiveError:h});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(h5,{value:n,children:[_.jsx(Dj,{}),_.jsx(O0,{})]},xi()[1])}),m&&_.jsx($9n,{children:r?_.jsx(oA,{host:n.session.host,overlay:!0}):_.jsx(cA,{runtime:n,overlay:!0,retriedInteractiveError:u,setRetriedInteractiveError:h})})]})}const ey=PQ()({component:B9n}),r6="orx:demo-read-sessions";function nB(){try{const e=JSON.parse(sessionStorage.getItem(r6)??"[]");return new Set(Array.isArray(e)?e.filter(n=>typeof n=="string"):[])}catch{return new Set}}function P9n(e){try{const n=nB();n.add(e),sessionStorage.setItem(r6,JSON.stringify([...n]))}catch{}}function F9n(){try{sessionStorage.removeItem(r6)}catch{}}function rB(e,n){const t=gf(e.split("?")[0]);return!!(t&&(!t.sessionId||n.some(r=>r.id===t.sessionId&&r.projectId===t.projectId)))}async function H9n(e=tt){var i;const[n,t]=await Promise.all([e.fetchQuery(Om()),e.fetchQuery(zh())]),r=Xb((i=JS()??n.workspace)==null?void 0:i.lastLocation);if(!r)return"/projects";const s=gf(r.split("?")[0]);return!(s!=null&&s.projectId)||!t.some(a=>a.id===s.projectId)||s.sessionId&&!rB(r,await e.fetchQuery(Gi(s.projectId)))?"/projects":r}async function q9n(e,n=tt){var h;const[t,r]=await Promise.all([n.fetchQuery(LS(e)),n.fetchQuery(Gi(e))]),s=eB(e)??t,i=Xb(s==null?void 0:s.lastLocation);if(i&&((h=gf(i.split("?")[0]))==null?void 0:h.projectId)===e&&rB(i,r))return i;const a=r.find(f=>!f.archived&&!f.sideParentSessionId),o=Ko(e)?n6(a==null?void 0:a.id,!(await n.fetchQuery(Om())).tourCompleted):void 0,c=Lu(s,(a==null?void 0:a.id)??"new"),u=c?c.active:o==null?void 0:o.active;return iv(e,(a==null?void 0:a.id)??null,u)}const Yv=360,U9n=272,G9n=380,V9n=U9n+56;function Fd(){return Math.max(Yv,window.innerWidth-V9n-G9n)}const K9n=500,W9n=.33;function lA(){return Math.min(Fd(),Math.max(K9n,Math.round(window.innerWidth*W9n)))}function sB(){const e=Fd();return Math.max(Yv,Math.min(480,e,Math.round(window.innerWidth*.25)))}function s6(){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 zw(){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(s6,{}),"OpenResearch"]})}const uA="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 Q9n({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 ${uA}`,onClick:n,"aria-label":bN({value:Ce(e)}),title:bN({value:Ce(e)}),children:_.jsx(L8n,{size:11})}),_.jsx("button",{type:"button",className:`cmd-inline-copy ${uA}`,onClick:()=>{navigator.clipboard.writeText(e).then(()=>{r(!0),setTimeout(()=>r(!1),1500)}).catch(()=>{})},"aria-label":t?_f():NY({value:Ce(e)}),title:t?_f():SS(),children:t?_.jsx(yi,{size:11,strokeWidth:3}):_.jsx(Zu,{size:11})})]})}function Hu(e,n){return e?e.split(/`([^`]+)`/).map((t,r)=>r%2===1?_.jsx(Q9n,{cmd:t,onRun:n!=null&&n.canRun(t)?()=>n.onRun(t):void 0},r):t):null}function ty(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 Th({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 p5(e){return!e.installed||e.installBroken?"install":e.authState==="unsupported"&&!e.needsConfigRepair?"update":"login"}function X9n(e,n){return e.needsConfigRepair?"error":n==="login"?"running":"preview"}function _A(e,n){return n||e==="preview"}function Y9n(e,n){if(!e||e.needsConfigRepair)return null;const t=p5(e);return t===n?null:t}function iB({harness:e,commands:n,onReady:t,onClose:r}){const s=T.useRef(null),i=T.useRef(!1),[a,o]=T.useState(()=>p5(e)),[c,u]=T.useState(0),[h,f]=T.useState(()=>X9n(e,p5(e))),[p,m]=T.useState(h==="running"),[w,k]=T.useState(e.needsConfigRepair),[v,b]=T.useState(e.needsConfigRepair?e.agentNote??null:null),y=h==="running"||h==="checking",x=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"),b(null);try{const N=await hf(!0,!0);if(i.current)return;const j=N.find(A=>A.id===e.id);if(k((j==null?void 0:j.needsConfigRepair)??!1),j!=null&&j.agentReady&&(a!=="login"||j.authenticated))t==null||t(j),f("success"),e.id==="antigravity"&&a==="login"&&r();else if(a!=="login"&&(j!=null&&j.installed)&&!j.installBroken&&!j.needsConfigRepair&&j.authState==="needsLogin")o("login"),m(!0),f("running");else{const A=Y9n(j,a);A&&(o(A),m(!1)),b((j==null?void 0:j.agentNote)??TL()),f("error")}}catch(N){if(i.current)return;b(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"&&y&&N.preventDefault()},onCancel:N=>{N.preventDefault(),y||r()},children:[_.jsxs("div",{className:"flex items-center gap-3",children:[_.jsx(Th,{harness:e.id,size:26}),_.jsx("h2",{id:"harness-setup-title",className:"m-0 text-xl font-medium",children:wz({agent:e.name})})]}),h==="preview"?_.jsx("p",{className:"my-4 text-sm text-subtext",children:a==="install"?gYe({agent:e.name}):kZe({agent:e.name})}):x&&_A(h,p)?_.jsx("p",{className:"my-4 text-sm text-subtext [&_.cmd-inline]:mx-2 [&_.cmd-inline]:gap-2",children:Hu(rZe({command:x}))}):null,h!=="running"&&h!=="preview"&&_.jsxs("p",{className:"my-4 flex items-center gap-2 text-sm",role:"status",children:[h==="checking"&&_.jsx(kt,{}),h==="success"?YXe({agent:e.name}):h==="error"?jL():UXe()]}),a==="install"&&n.requiresNpm&&_.jsx("p",{className:"text-sm text-subtext",children:XYe()}),_A(h,p)&&_.jsx(Zb,{path:`/api/harnesses/setup?${new URLSearchParams({harness:e.id,action:a})}`,label:wz({agent:e.name}),command:x,heightClass:"h-96",active:h==="running",awaitingApproval:h==="preview",onComplete:N=>typeof N!="object"||N===null||!("type"in N)||N.type!=="complete"?!1:(C(),!0),onError:N=>{b(N),f("error")}},`${a}-${c}`),v&&_.jsx("p",{role:"alert",className:"text-sm text-accent-red",children:Hu(v)}),_.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h==="error"&&_.jsx(De,{variant:"ghost",onClick:()=>{b(null),C()},children:Iv()}),h==="error"&&!w&&_.jsx(De,{onClick:()=>{b(null),m(!0),f("running"),u(N=>N+1)},children:ri()}),_.jsx(De,{variant:h==="success"?"primary":"default",onClick:r,children:h==="success"?kI():y?IXe():I0()}),h==="preview"&&_.jsx(De,{variant:"primary",onClick:()=>{m(!0),f("running")},children:AXe()})]})]})}const Z9n={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 q0({variant:e="list",className:n,...t}){return _.jsx("span",{className:zs("title",Z9n[e],n),...t})}const fA=["onb-gate-hint text-base font-medium leading-normal text-text","onb-agent-hint mt-0 mx-0 mb-2.5"].join(" "),Ru=["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(" "),jw=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text onb-git-hint mt-2"].join(" "),aB=["onb-card flex flex-col gap-[5px] bg-background","border border-border rounded-lg py-4.5 px-5"].join(" "),J9n=["onb-gate-hint mt-4.5 mx-0 mb-0 text-base font-medium leading-normal","text-text"].join(" "),eEn=[{id:"AI/ML",label:zdt},{id:"Biology",label:Ddt},{id:"Physics",label:Qdt},{id:"Other",label:Hdt}],tEn=["welcome","environment","profile"];function nEn({onDone:e,preferredAgent:n,remote:t}){var nt;const r=pn({mutationFn:ke=>U3n(...ke)}),[s,i]=T.useState(0);T.useEffect(()=>{const ke=tEn[s];ke&&vu({name:"onboarding_step_viewed",step:ke})},[s]);const a=ut(Pu()),o=ut(y0()),c=ut(XI()),[u,h]=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 ke;return(ke=m.current)==null?void 0:ke.close()},[]);const b=a.data??null,y=(nt=o.data)==null?void 0:nt.gitVersion,[x,C]=T.useState(!1),[N,j]=T.useState(null),[A,z]=T.useState(""),[M,D]=T.useState(null),[I,B]=T.useState(!1),[G,q]=T.useState([]),[Q,K]=T.useState(""),[Z,J]=T.useState(""),[$,L]=T.useState([]),[F,U]=T.useState(""),[H,oe]=T.useState([]),[ae,ue]=T.useState(!1),se=T.useRef(0),[V,ne]=T.useState(!1),[ce,he]=T.useState(!1),me=(b==null?void 0:b.some(ke=>ke.agentReady&&!ke.catalogPending))??!1,Ae=(b==null?void 0:b.some(ke=>ke.catalogPending))??!1,Pe=y!=null,Ye=T.useRef(0),Re=(ke,ge=!1)=>{const je=++Ye.current;B(!0),ne(!1),he(!1);const qe=()=>je===Ye.current;Promise.allSettled([hf(ke,ge),tt.fetchQuery({...y0(),staleTime:ke?0:3e4})]).then(([rt,dt])=>{qe()&&(rt.status==="rejected"&&ne(!0),dt.status==="rejected"&&he(!0))}).finally(()=>qe()&&B(!1))};T.useEffect(()=>Re(!1),[]),T.useEffect(()=>{if(b===null)return;const ke=b.filter(ge=>ge.agentReady&&!ge.catalogPending);D(ge=>{var qe;if(ge&&ke.some(rt=>rt.id===ge))return ge;const je=n&&ke.find(rt=>rt.id===n.harness);return(je==null?void 0:je.id)??((qe=ke[0])==null?void 0:qe.id)??null})},[b,n]),T.useEffect(()=>ne(a.isError),[a.isError,a.dataUpdatedAt]),T.useEffect(()=>he(o.isError),[o.isError,o.dataUpdatedAt]),T.useEffect(()=>{tt.fetchQuery(zSn()).then(ke=>{q(ke.researchAreas),K(ke.otherArea??""),J(ke.background??""),L(ke.papers)}).catch(()=>{})},[]),T.useEffect(()=>{const ke=F.trim();if(ke.length<3){oe([]),ue(!1);return}const ge=++se.current;ue(!0);const je=setTimeout(()=>{tt.fetchQuery(r$(ke)).then(qe=>ge===se.current&&oe(qe)).catch(()=>ge===se.current&&oe([])).finally(()=>ge===se.current&&ue(!1))},350);return()=>clearTimeout(je)},[F]);const $e=ke=>{const ge=$.some(je=>je.paperId===ke.paperId);L(je=>je.some(qe=>qe.paperId===ke.paperId)?je:[...je,{paperId:ke.paperId,title:dA(ke.title)}]),U(""),oe([]),ge||tt.fetchQuery(i5(ke.paperId)).then(je=>{var rt;const qe=(rt=je.title)==null?void 0:rt.trim();qe&&L(dt=>dt.map(st=>st.paperId===ke.paperId?{...st,title:qe}:st))}).catch(()=>{})},yt=ke=>L(ge=>ge.filter(je=>je.paperId!==ke)),ot=ke=>{q(ge=>ge.includes(ke)?ge.filter(je=>je!==ke):[...ge,ke])},Mt=G.length>0&&(!G.includes("Other")||Q.trim().length>0),jt=()=>{if(k.current)return k.current;w.current="",v.current=!0,p(!0);const ke=(async()=>{await new Promise((qe,rt)=>{const dt=location.protocol==="https:"?"wss:":"ws:",st=new WebSocket(`${dt}//${location.host}/api/harnesses/setup?harness=opencode&action=install&trigger=automatic`);st.binaryType="arraybuffer";const Ut=new TextDecoder,Xt=new V$.Terminal;Xt.onData(an=>{st.readyState===WebSocket.OPEN&&st.send(new TextEncoder().encode(an))}),m.current=st;let en=!1;st.onmessage=an=>{if(an.data instanceof ArrayBuffer){Xt.write(new Uint8Array(an.data)),w.current=(w.current+Ut.decode(an.data,{stream:!0})).slice(-65536);return}if(typeof an.data!="string")return;let At;try{At=JSON.parse(an.data)}catch{return}typeof At!="object"||At===null||!("type"in At)||(At.type==="complete"?(en=!0,st.close(),qe()):At.type==="error"&&(st.close(),rt(new Error("error"in At&&typeof At.error=="string"?At.error:jL()))))},st.onerror=()=>{st.close(),rt(new Error(Pv()))},st.onclose=()=>{Xt.dispose(),m.current=null,en||rt(new Error(Pv()))}});const je=(await hf(!0,!0)).find(qe=>qe.id==="opencode"&&qe.agentReady);if(!je)throw new Error(jmt());return D("opencode"),je})();return k.current=ke,ke.catch(()=>{}),ke};T.useEffect(()=>{t||v.current||!(b!=null&&b.length)||b.some(ke=>ke.catalogPending)||!b.every(ke=>!ke.installed&&!ke.installBroken)||jt()},[b,t]),T.useEffect(()=>{s===1&&f&&i(2)},[s,f]);const Pt=()=>{i(f?2:1)},Ie=async(ke="complete")=>{var ge;if(!(x||ke==="complete"&&(!Mt||!Pe))){C(!0),j(null),z("");try{const je=f?await jt():b==null?void 0:b.find(dt=>dt.id===M&&dt.agentReady&&!dt.catalogPending);if(!je)throw new Error(TL());if(ke==="setup")return;const qe=sEn(je,((ge=je.models[0])==null?void 0:ge.id)??null),rt=await r.mutateAsync([qe,{researchAreas:G,otherArea:G.includes("Other")?Q:null,background:Z||null,papers:$}]);e(rt.project,rt.selection)}catch(je){f&&(k.current=null);const qe=je instanceof Error?je.message:String(je);j(qe),z([w.current,qe].filter(Boolean).join(` -`))}finally{C(!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(iB,{harness:u,commands:c.data[u.id],onReady:ke=>{D(ke.id)},onClose:()=>{h(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(jw,{})}),_.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:kft()})]}),_.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:Tht()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:C1t()})]})}),_.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:$pt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Ugt()})]})}),_.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:vpt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:fvt()})]})})]})]}),_.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(Ie,{variant:"primary",size:"large",onClick:Pt,disabled:I&&b===null,children:[I&&b===null?_.jsx(St,{}):null,Hz()," ",_.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(jw,{}),_.jsx("span",{children:Ygt()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:qdt()}),_.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:I0t()}),b!==null&&!ve&&!Me&&_.jsx("p",{className:_A,children:Agt()}),b!==null&&ve&&M===null&&_.jsx("p",{className:_A,children:Xdt()}),(y===null||ce)&&_.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[_.jsx(dA,{gitVersion:y,error:ce}),ce?_.jsx("p",{className:Aw,children:pw()}):_.jsx("p",{className:Aw,children:qz()})]}),_.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(ke=>{var me;return _.jsx(x9n,{h:ke,remote:t,selected:M===ke.id,onSelect:()=>D(ke.id),commands:(me=c.data)==null?void 0:me[ke.id],onSetup:()=>h(ke)},ke.id)}):K?_.jsx("div",{className:Ru,children:pw()}):_.jsxs(Pr,{className:"py-2",children:[_.jsx(St,{})," ",Yht()]})}),c.isError&&_.jsxs("p",{className:Ru,children:[BXe()," ",_.jsx(Ie,{variant:"ghost",onClick:()=>void c.refetch(),children:ni()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Ie,{variant:"ghost",onClick:()=>i(0),children:[_.jsx(B0,{size:12})," ",Fz()]}),_.jsxs(Ie,{variant:"ghost",onClick:()=>Te(!0,!0),disabled:I,children:[_.jsx(Va,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",Iv()]}),_.jsx("div",{className:"flex-1"}),_.jsxs(Ie,{variant:"primary",onClick:()=>i(2),disabled:I||!ve||M===null||!Fe,title:I||!ve&&Me?Z1t():ve?M===null?Sht():ce?mmt():y===void 0?G1t():y===null?Zpt():void 0:kgt(),children:[Hz()," ",_.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(jw,{}),!f&&_.jsx("span",{children:s1t()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:_1t()}),_.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:_.jsxs("div",{className:aB,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:ivt()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:ght()}),_.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:p9n.map(ke=>_.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:G.includes(ke.id),onChange:()=>ot(ke.id),disabled:x}),_.jsx("span",{children:ke.label()})]},ke.id))}),G.includes("Other")&&_.jsx("input",{className:"onb-other-area w-full mt-2",value:Q,onChange:ke=>V(ke.target.value),disabled:x,placeholder:v1t(),"aria-label":Y0t()})]}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:Amt()}),_.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:ke=>J(ke.target.value),disabled:x,rows:4,placeholder:spt()}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:kmt()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:Aft()}),_.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:ke=>P(ke.target.value),disabled:x,placeholder:qmt()}),ie?_.jsx("div",{className:Ru,children:Xmt()}):F.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:F.map(ke=>_.jsxs("button",{type:"button",onClick:()=>$e(ke),disabled:x,children:[_.jsx(q0,{children:fA(ke.title)}),_.jsx("span",{className:"id",children:ke.paperId})]},ke.paperId))}):null]}),$.length>0&&_.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:$.map(ke=>_.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(q0,{children:ke.title||ke.paperId}),_.jsx("span",{className:"id",children:ke.paperId}),_.jsx("button",{type:"button","aria-label":qJ({name:Ce(ke.paperId)}),onClick:()=>yt(ke.paperId),disabled:x,children:_.jsx(xr,{size:12})})]},ke.paperId))})]})}),!Mt&&_.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:G.length===0?uht():Uht()}),f&&!Fe&&_.jsxs("div",{className:"mt-5",role:"status",children:[_.jsx(dA,{gitVersion:y,error:ce}),_.jsx("p",{className:Aw,children:ce?pw():qz()}),_.jsx(Ie,{onClick:()=>Te(!0,!0),disabled:I,children:Iv()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(Ie,{variant:"ghost",onClick:()=>i(f?0:1),disabled:x,children:[_.jsx(B0,{size:12})," ",Fz()]}),_.jsx("div",{className:"flex-1"}),_.jsx(Ie,{variant:"primary",onClick:()=>void Le(),disabled:x||!Fe||!f&&M===null||!Mt,children:x?_.jsxs(_.Fragment,{children:[_.jsx(St,{})," ",mgt()]}):_.jsxs(_.Fragment,{children:[Cpt()," ",_.jsx(sv,{size:13})]})})]}),M===null&&!f&&_.jsx("p",{className:h9n,children:bvt()}),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(HS,{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(Ie,{size:"small",onClick:()=>void Le(Mt&&Fe?"complete":"setup"),disabled:x,children:ni()}),f&&_.jsx(Ie,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:x,onClick:()=>{p(!1),j(null),i(1)},children:rht()}),_.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:_pt()}),_.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 fA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function v9n(e){return e.catalogPending?{tone:"warning",label:_f()}:e.authCheckFailed?{tone:"warning",label:mw()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||ny(e)?Rm():e.authMethod==="local"||!e.authenticated?ES():Igt()}:e.installed?e.installBroken?{tone:"warning",label:Gpt()}:e.authMethod==="local"?{tone:"warning",label:BL()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:mw()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:mw()}:e.authState==="unsupported"?{tone:"warning",label:$1t()}:e.installed?{tone:"warning",label:$L()}:{tone:"neutral",label:Uz()}:{tone:"neutral",label:Uz()}}function b9n(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:Kb(e,n).defaultId}}function y9n({harness:e}){return _.jsx(Th,{harness:e,size:26})}function x9n({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"),h=v9n(e),f=t&&!e.authCheckFailed?{tone:"success",label:rgt()}:h,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(y9n,{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(Yd,{tone:h.tone,className:"font-normal",children:h.label})]}),c&&!u&&_.jsx(Yd,{tone:f.tone,children:f.label})]})]}),c?_.jsxs(Ie,{size:"small",onClick:i,disabled:!s,"aria-haspopup":"dialog",title:sYe(),children:[_.jsx(bo,{size:14}),!e.installed||e.installBroken?CXe():e.authState==="unsupported"?TYe():AL()]}):_.jsx(Yd,{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(St,{})," ",i0t()]}):_.jsxs(_.Fragment,{children:[ny(e)??e.account??(e.authMethod==="apiKey"?CS():null),e.plan?` · ${e.plan}`:""]})}),m&&_.jsx("div",{className:Ru,children:m}),e.authCheckFailed&&e.agentNote&&_.jsx("div",{className:Ru,children:Fu(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:Ru,children:p}),!c&&e.agentNote&&_.jsx("div",{className:`${Ru} [&_code]:whitespace-pre-wrap break-words`,children:Fu(e.agentNote)})]})}function dA({gitVersion:e,error:n}){return _.jsxs("div",{className:aB,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:f0t()}),_.jsx(Yd,{tone:e?"success":n||e===null?"danger":"warning",children:e?ES():n?kdt():e===null?IL():_f()})]}),(e||!n&&e===void 0)&&_.jsx("div",{className:Ru,children:e??Ldt()})]})}const w9n="/assets/slurm-logo-aGSXVZcE.svg",k9n="/assets/thinking-machines-BOdslTfm.png";function S9n(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 yL();case"tinker_job":return"Tinker";default:return e||"—"}}function C9n({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 E9n({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 N9n({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 z9n({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 j9n({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 A9n({size:e=16}){return _.jsx("img",{className:"tinker-logo block flex-none object-contain",src:k9n,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 T9n({size:e=16}){return _.jsx("img",{className:"block flex-none object-contain",src:w9n,width:e,height:e,alt:"","aria-hidden":"true"})}function ry({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 Xh({kind:e,size:n=16}){switch(e){case"modal_job":return _.jsx(E9n,{size:n});case"hf_job":return _.jsx(C9n,{size:n});case"k8s_job":return _.jsx(N9n,{size:n});case"ssh_job":return _.jsx(Zj,{size:n,strokeWidth:1.5});case"slurm_job":return _.jsx(T9n,{size:n});case"ray_job":return _.jsx(z9n,{size:n});case"openresearch_job":return _.jsx(j9n,{size:n});case"tinker_job":return _.jsx(A9n,{size:n});case"local_job":return _.jsx(k7n,{size:n,strokeWidth:1.5});default:return _.jsx(Zj,{size:n})}}function i6({backend:e}){const n=OS(e),t=zkn(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(Xh,{kind:n}),_.jsx("span",{className:"backend-name",children:S9n(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 Tw(e,n){const[t,r]=T.useState(e);return T.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function g1(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function R9n(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 M9n(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 O9n(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function D9n({onCreated:e,onCancel:n,remote:t=!1}){var _r,Mn,Qn,ar;const[r,s]=T.useState("blank"),[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,h]=T.useState(""),[f,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(!1),[b,y]=T.useState(null),[x,C]=T.useState(!1),[N,j]=T.useState(!1),[A,z]=T.useState(""),[M,D]=T.useState(null),[I,B]=T.useState(!1),G=T.useRef(0),U=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}}),V=r==="paper"?M9n(M==null?void 0:M.repoUrl):null,Z=i.trim()?`~/OpenResearch/${g1(i,48)}`:"",J=`~/OpenResearch/${g1(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,$=r==="blank"&&!f?Z:r==="paper"&&M&&!f?J:u,L=Tw($.trim(),200),q=ut({...y0(L),enabled:!!L&&L===$.trim()}),P=L===$.trim()?q.data??null:null,F=L===$.trim()?((_r=q.error)==null?void 0:_r.message)??null:null,re=!!$.trim()&&(L!==$.trim()||q.isFetching),ie=V??(r==="folder"&&(P!=null&&P.githubOwner)&&P.githubRepo?{owner:P.githubOwner,repo:P.githubRepo}:null),ue=ut(bSn()),se=((Mn=ue.data)==null?void 0:Mn.login)??(ue.isPending?void 0:null),K=ut(DS()),oe=T.useRef(!1);T.useEffect(()=>{oe.current||!K.data||(oe.current=!0,j(K.data.githubForNewProjects))},[K.data]);const ce=Tw(i.trim(),150),pe=ut({...ySn(ce),enabled:ce===i.trim()}),ve=ce===i.trim()?((Qn=pe.data)==null?void 0:Qn.repo)??g1(i,48):g1(i,48),Me=ce!==i.trim()||pe.isFetching,Fe=ut({...Mj((ie==null?void 0:ie.owner)??"",(ie==null?void 0:ie.repo)??""),enabled:!!ie,subscribed:!!ie}),Ye=!!ie&&Fe.isFetching,Te=ie&&((ar=Fe.data)!=null&&ar.canPush)?`github.com/${ie.owner}/${ie.repo}`:null,$e=Tw(A.trim(),350),yt=R9n($e),ot=r==="paper"&&!M&&$e===A.trim(),Mt=ut({...r$($e),enabled:ot&&!yt&&$e.length>=3,subscribed:ot&&!yt&&$e.length>=3}),jt=ut({...a5(yt??""),enabled:ot&&!!yt,subscribed:ot&&!!yt}),Pt=ot&&!yt?Mt.data??[]:[],Le=ot&&Mt.isSuccess?$e:"",nt=I||r==="paper"&&!M&&($e!==A.trim()||(yt?jt.isFetching:Mt.isFetching));T.useEffect(()=>{var wt;!ot||!yt||!jt.data||(D(jt.data),o||a(((wt=jt.data.title)==null?void 0:wt.trim())||jt.data.paperId))},[ot,yt,jt.data,o]),T.useEffect(()=>{const wt=yt?jt.error:Mt.error;ot&&wt&&y(wt.message)},[ot,yt,jt.error,Mt.error]);const ke=pn({mutationFn:c3n});async function me(wt){var vr;const Ht=++G.current;B(!0),y(null);try{const Pn=await tt.fetchQuery(a5(wt));if(Ht!==G.current)return;D(Pn),o||a(((vr=Pn.title)==null?void 0:vr.trim())||Pn.paperId)}catch(Pn){Ht===G.current&&y(Pn instanceof Error?Pn.message:String(Pn))}finally{Ht===G.current&&B(!1)}}function je(){G.current+=1,U.current+=1,D(null),z(""),B(!1),w(!1),h(""),p(!1),Q.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function qe(wt){if(wt===r)return;G.current+=1,U.current+=1,Q.current[r]={name:i,nameTouched:o,path:u,pathTouched:f};const Ht=Q.current[wt];s(wt),y(null),B(!1),w(!1),a(Ht.name),c(Ht.nameTouched),h(Ht.path),p(Ht.pathTouched)}async function rt(){if(m)return;const wt=++U.current;w(!0),y(null);try{const Ht=await o3n();if(wt!==U.current||!Ht)return;if(p(!0),h(Ht),tt.invalidateQueries(y0(Ht)),r==="folder"&&!o){const vr=Ht.replace(/[\\/]+$/,"").split(/[\\/]/).pop();vr&&a(vr)}}catch(Ht){wt===U.current&&y(Ht instanceof Error?Ht.message:String(Ht))}finally{wt===U.current&&w(!1)}}async function dt(wt){if(wt.preventDefault(),!!gt){v(!0),y(null);try{const Ht=await tt.fetchQuery({...y0($.trim()),staleTime:0});if(Ht.exists&&Ht.directory===!1)throw new Error(dw());if(r==="blank"&&Ht.exists)throw new Error(Dz());if(r==="paper"&&Ht.empty===!1)throw new Error(Pz());N&&ie&&await tt.fetchQuery({...Mj(ie.owner,ie.repo),staleTime:0}).catch(()=>null);const vr=await ke.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(vr.project,vr.githubPublicationError)}catch(Ht){y(Ht instanceof Error?Ht.message:String(Ht))}finally{v(!1)}}}const st=i.trim(),Ut=r==="paper"&&M&&!M.repoUrl?M.paperId:null,Xt=r==="folder"&&(P==null?void 0:P.gitState)==="ready"?P.resolvedPath??null:null,en=st!==""&&(Ut!==null||Xt!==null);T.useEffect(()=>{if(!en)return;const wt=window.setTimeout(()=>{h3n({name:st,paperId:Ut??void 0,path:Xt??void 0,locale:E()}).catch(()=>{})},1200);return()=>window.clearTimeout(wt)},[en,st,Ut,Xt]);const an=(P==null?void 0:P.gitVersion)===null,At=r==="folder"&&!!$.trim()&&P!==null&&P.exists===!1,gn=r==="blank"&&(P==null?void 0:P.exists)===!0,on=!!$.trim()&&(P==null?void 0:P.exists)===!0&&P.directory===!1,Ot=r==="paper"&&!!(M!=null&&M.repoUrl)&&(P==null?void 0:P.empty)===!1,dn=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(P==null?void 0:P.empty)===!1,cn=r==="folder"&&((P==null?void 0:P.gitState)==="detached"||(P==null?void 0:P.gitState)==="invalid"),kn=f&&!$.trim()||on||Ot||dn,Wn=f&&!$.trim()||on||gn,gs=f&&!$.trim()?Bz():on?dw():gn?Dz():null,ns=f&&!$.trim()?Bz():on?dw():Ot?Pz():dn?uot():null,gt=!!(i.trim()&&$.trim())&&!k&&!m&&!re&&P!==null&&!F&&!an&&!At&&!gn&&!on&&!Ot&&!dn&&!cn&&(r!=="paper"||!!M)&&(!N||typeof se=="string"&&!Me&&!Ye),ln=Te??`github.com/${se??"you"}/${ve}`,bn=se===void 0||Me||Ye,un=r==="paper"&&!M&&A.trim().length>=3&&Le===A.trim()&&!nt&&Pt.length===0&&!b;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:dt,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:()=>qe("blank"),children:wct()}),_.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:()=>qe("folder"),children:llt()}),_.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:()=>qe("paper"),children:klt()})]}),r==="paper"&&!M&&_.jsxs("label",{className:"!font-normal",children:[uut(),_.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:A,onChange:wt=>{y(null),z(wt.target.value)},placeholder:jut()}),!un&&_.jsx("span",{className:"repo-hint",children:nt?rft():q_t()}),un&&_.jsx("span",{className:"project-path-notice block",children:qlt()}),Pt.length>0&&_.jsx("div",{className:"paper-results",children:Pt.map(wt=>_.jsxs("button",{type:"button",onClick:()=>void me(wt.paperId),children:[_.jsx(q0,{children:wt.title}),_.jsx("span",{className:"id",children:wt.paperId})]},wt.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(q0,{className:"block",children:M.title||M.paperId}),M.repoUrl&&_.jsx("div",{className:"id",children:O9n(M.repoUrl)})]}),_.jsx(Ie,{size:"small",type:"button","aria-label":qct(),onClick:je,children:Lct()})]}),!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(HS,{size:16})," ",Xlt()]}),_.jsx("span",{className:"text-sm font-normal text-accent-amber",children:rut()})]})]}),(r!=="paper"||M)&&_.jsxs(_.Fragment,{children:[r==="blank"&&_.jsxs("label",{className:"!font-normal",children:[_.jsx("span",{className:"project-field-label !font-medium",children:$z()}),_.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:wt=>{c(!0),a(wt.target.value)},placeholder:Iz()})]}),r==="paper"?_.jsxs("label",{className:"project-location-field",children:[_.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?Iot():hw()}),_.jsx("input",{className:"text-sm font-normal",value:$,onChange:wt=>{p(!0),h(wt.target.value)},"aria-describedby":kn?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),re&&_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Lz()}),kn&&_.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:ns})]}):r==="folder"&&!t?_.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?got({path:Ce(u)}):Mz(),disabled:m,title:u||void 0,onClick:()=>void rt(),children:[_.jsx(Pu,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),_.jsx("span",{className:u?"text-sm":"placeholder",children:m?Aot():u||Mz()}),_.jsx(Ka,{className:"folder-picker-chevron",size:15})]}):r==="folder"?_.jsxs("label",{className:"project-location-field",children:[_.jsx("span",{className:"project-location-label !font-medium",children:hw()}),_.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:wt=>{p(!0),h(wt.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:hw()}),_.jsx("input",{className:"text-sm font-normal",value:$,onChange:wt=>{p(!0),h(wt.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":Wn?"blank-destination-description":void 0,spellCheck:!1}),re&&_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Lz()}),Wn&&_.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:gs})]}):null,r!=="blank"&&$&&_.jsxs("label",{className:"!font-normal",children:[_.jsx("span",{className:"project-field-label !font-medium",children:$z()}),_.jsx("input",{className:"text-sm font-normal",value:i,onChange:wt=>{c(!0),a(wt.target.value)},placeholder:Iz()})]}),an&&_.jsx("div",{className:"project-path-notice error",children:Alt()}),!an&&r==="folder"&&u.trim()&&!re&&(P==null?void 0:P.exists)===!1&&_.jsx("div",{className:"project-path-notice error",children:qut()}),!an&&r==="folder"&&u.trim()&&!re&&on&&_.jsx("div",{className:"project-path-notice error",children:r_t()}),!an&&r==="folder"&&!re&&(P==null?void 0:P.gitState)==="detached"&&_.jsx("div",{className:"project-path-notice error",children:Xct()}),!an&&r==="folder"&&!re&&(P==null?void 0:P.gitState)==="invalid"&&_.jsx("div",{className:"project-path-notice error",children:Xut()}),F&&_.jsx("div",{className:"project-path-notice error",role:"alert",children:F})]}),b&&_.jsx("div",{className:"error",role:"alert",children:b}),(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&&se===null?" text-accent-red":" text-text"}`,"aria-expanded":x,"aria-controls":"new-project-advanced-settings",onClick:()=>C(wt=>!wt),children:[N?se===null?Xat():rot():LL(),_.jsx(mc,{className:x?"rotate-180":"",size:16})]}),x&&_.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:wt=>j(wt.target.checked),disabled:k}),_.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:Lut()})]}),_.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[_.jsx("span",{children:bn?u_t({repository:Ce(ln)}):Te?S_t({repository:Ce(ln)}):g_t({repository:Ce(ln)})}),_.jsx("span",{children:mlt()}),se===null&&_.jsx("span",{children:X_t({command:Ce("gh auth login")})})]})]})]}),_.jsxs("div",{className:"actions new-project-actions",children:[n&&_.jsx(Ie,{type:"button",onClick:n,children:jct()}),_.jsx(Ie,{variant:"primary",className:"ms-auto",disabled:!gt,children:k?rct():r==="paper"?M!=null&&M.repoUrl?Uot():Oz():r==="folder"?uft():Oz()})]})]})}function oB({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 h=o();if(h.length===0){u.preventDefault(),i.focus();return}const f=h[0],p=h[h.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:KL()}),_.jsx(D9n,{onCancel:e,onCreated:n,remote:t})]})})}function L9n({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const i=T.useRef(null),a=T.useRef(r),o=T.useRef(n);a.current=r,o.current=n,T.useEffect(()=>{const u=i.current;if(!u)return;const h=document.activeElement instanceof HTMLElement?document.activeElement:null,f=()=>[...u.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(f()[0]??u).focus();const p=m=>{if(m.key==="Escape"){m.preventDefault(),o.current||a.current();return}if(m.key!=="Tab")return;const w=f();if(w.length===0){m.preventDefault(),u.focus();return}const k=w[0],v=w[w.length-1];m.shiftKey&&document.activeElement===k?(m.preventDefault(),v.focus()):!m.shiftKey&&document.activeElement===v&&(m.preventDefault(),k.focus())};return document.addEventListener("keydown",p,!0),()=>{document.removeEventListener("keydown",p,!0),h==null||h.focus()}},[]);const c=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return _.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:u=>{!n&&u.target===u.currentTarget&&r()},children:_.jsxs("div",{ref:i,className:"modal w-110 max-w-full bg-background border border-border rounded-xl shadow-modal p-6",role:"dialog","aria-modal":"true","aria-labelledby":"delete-project-dialog-title","aria-describedby":"delete-project-dialog-description",tabIndex:-1,children:[_.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:k5t()}),_.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[_.jsx("p",{className:"m-0",children:q3t({name:_a(e.name)})}),_.jsx("p",{className:"m-0",children:c?X5t():rkt()}),t&&_.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),_.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[_.jsx(Ie,{disabled:n,onClick:r,children:l5t()}),_.jsx(Ie,{variant:"danger",disabled:n,onClick:s,children:n?I5t():A5t()})]})]})})}function hA(){return _.jsx("span",{className:"activity-pulse h-2 w-2 shrink-0 rounded-full bg-accent-teal animate-[or-pulse_1.2s_ease-in-out_infinite]"})}function I9n({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[i,a]=T.useState(!1),[o,c]=T.useState(null),[u,h]=T.useState(null),[f,p]=T.useState(null),m=ut(vSn()),w=Object.fromEntries((m.data??[]).map(v=>[v.projectId,v]));async function k(v){c(v.id),h(null);try{await g3n(v.id),h(null),p(null),r(v.id)}catch(b){h(b instanceof Error?b.message:String(b))}finally{c(null)}}return _.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[_.jsxs("div",{className:"home-inner max-w-290 my-0 mx-auto pt-12 px-6 pb-16 [@media((max-width:_960px))]:pt-6 [@media((max-width:_960px))]:px-4 win-titlebar:[@media((max-width:_960px))]:pt-10",children:[_.jsxs("div",{className:"home-head flex items-center justify-between gap-3 mb-4.5 [&_h2]:m-0 [&_h2]:text-4xl [&_h2]:tracking-[-0.02em] [@media((max-width:_520px))]:items-start [@media((max-width:_520px))]:flex-col",children:[_.jsx("h2",{children:Akt()}),_.jsxs(Ie,{onClick:()=>a(!0),children:[_.jsx(Qh,{size:15})," ",KL()]})]}),_.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:_.jsxs("div",{children:[_.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border bg-background py-2.5 ps-4 pe-2 text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:hidden",children:[_.jsx("span",{children:kkt()}),_.jsx("span",{children:Wz()}),_.jsx("span",{children:Qz()}),_.jsx("span",{children:Xz()})]}),e.length===0?_.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:mkt()}):[...e].sort((v,b)=>{var C,N;const y=((C=w[v.id])==null?void 0:C.lastMessageAt)??v.createdAt;return(((N=w[b.id])==null?void 0:N.lastMessageAt)??b.createdAt)-y||v.name.localeCompare(b.name)}).map(v=>{const b=w[v.id],y=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,x=y?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:y.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):$v(),C=b?b.activeAgents>0?j3t({count:Jt(b.activeAgents)}):qkt():"—",N=b?b.totalAgents===1?nSt():L3t({count:Jt(b.totalAgents)}):"—",j=b?b.runningExperiments>0?lSt({count:Jt(b.runningExperiments)}):b.totalExperiments===0?jS():Yz({count:Jt(b.totalExperiments)}):"—",A=b&&b.runningExperiments>0?Yz({count:Jt(b.totalExperiments)}):null;return _.jsxs("div",{className:"group project-row relative grid cursor-pointer grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border-variant py-4 ps-4 pe-2 text-start transition-colors duration-120 ease-standard last:border-b-0 hover:bg-surface-bright focus-within:bg-surface-bright [@media((max-width:_960px))]:grid-cols-[minmax(0,0.8fr)_minmax(0,0.8fr)_minmax(0,1.4fr)] [@media((max-width:_960px))]:items-start [@media((max-width:_960px))]:gap-x-4 [@media((max-width:_960px))]:gap-y-3 [@media((max-width:_960px))]:py-4 [@media((max-width:_960px))]:px-4 [@media((max-width:_600px))]:grid-cols-2",children:[_.jsx("button",{className:"project-row-open absolute inset-0 z-0 cursor-pointer rounded-[inherit] focus-visible:outline focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-[-2px]","aria-label":QZ({name:_a(v.name)}),onClick:()=>n(v.id)}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none [@media((max-width:_960px))]:col-span-3 [@media((max-width:_600px))]:col-span-2",children:[_.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),_.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[_.jsxs("span",{children:[m5t()," ",vo(v.createdAt)]}),v.paperId&&_.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&_.jsxs("span",{children:[n5t()," ",Ce(v.paperId)]}),_.jsx("button",{className:"project-row-secondary project-row-delete inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm leading-0 text-muted opacity-0 pointer-events-none transition-opacity hover:bg-surface hover:text-accent-red group-hover:opacity-100 group-hover:pointer-events-auto group-focus-within:opacity-100 group-focus-within:pointer-events-auto focus:opacity-100 focus:pointer-events-auto focus-visible:outline focus-visible:outline-2 focus-visible:outline-text","aria-label":N3({name:_a(v.name)}),disabled:o===v.id,onClick:z=>{z.stopPropagation(),h(null),p(v)},children:_.jsx(Of,{size:14})})]})]}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:Wz()}),_.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.activeAgents>0&&_.jsx(hA,{}),C]}),_.jsx("span",{className:"text-xs text-muted",children:N})]}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:Qz()}),_.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.runningExperiments>0&&_.jsx(hA,{}),j]}),A&&_.jsx("span",{className:"text-xs text-muted",children:A})]}),_.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:mb-1 [@media((max-width:_960px))]:block",children:Xz()}),y?_.jsxs("a",{className:"project-row-secondary inline-flex max-w-full items-center gap-2 text-sm text-text no-underline pointer-events-auto hover:underline underline-offset-2",href:y,target:"_blank",rel:"noreferrer","aria-label":Ov({name:_a(v.name)}),children:[_.jsx("span",{className:"inline-flex shrink-0",children:_.jsx(ry,{size:14})}),_.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ce(x)})]}):_.jsx("span",{className:"text-sm text-text pointer-events-none",children:x})]})]},v.id)})]})})]}),i&&_.jsx(oB,{remote:s,onClose:()=>a(!1),onCreated:(v,b)=>{a(!1),t(v,b)}}),f&&_.jsx(L9n,{project:f,deleting:o===f.id,error:u,onClose:()=>{h(null),p(null)},onConfirm:()=>void k(f)})]})}function cB(){const e=T.useSyncExternalStore(dSn,Aj,Aj);return _.jsxs(_.Fragment,{children:[_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":D3()}),!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(HS,{size:13,className:"shrink-0 text-accent-amber"}),_.jsx("span",{dir:"auto",className:"min-w-0",children:D3()})]})]})}function $9n({onClose:e,onConfigureSsh:n}){var v,b,y;const t=pn({mutationFn:x=>y5n(...x)}),r=ut(QI()),s=ut(Hkn()),i=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[o,c]=T.useState(""),u=i?null:((b=r.error)==null?void 0:b.message)??((y=s.error)==null?void 0:y.message)??null,[h,f]=T.useState(null),p=T.useRef(null);Dm(p,e);async function m(x){const C="__ORX_DESKTOP__"in window,N=C?null:window.open("/remote-launch","_blank");if(!C&&!N){Zt($7t(),"error");return}f(x);try{const j=await t.mutateAsync([x,{theme:NSn(),locale:E()}]);N?N.location.replace(j.gatewayUrl):window.open(j.gatewayUrl,"_blank"),e()}catch(j){N==null||N.close(),Zt(j instanceof Error?j.message:String(j),"error")}finally{f(null)}}const w=i==null?void 0:i.filter(x=>x.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),k=new Map(a.map(x=>[x.host,x]));return si.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:x=>{x.target===x.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(It,{className:"absolute end-3.5 top-3.5","aria-label":m6t(),onClick:e,children:_.jsx(xr,{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:$3()}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:k6t()}),_.jsx(Br,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:x=>c(x.target.value),placeholder:ej(),"aria-label":ej()})]}),_.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(St,{})," ",uI()]}):(w==null?void 0:w.length)===0?_.jsx("p",{className:"m-3 text-sm text-subtext",children:u7t()}):w==null?void 0:w.map(x=>{const C=k.get(x.host);return _.jsxs(Ie,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:h===x.host,onClick:()=>void m(x.host),children:[_.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:x.host}),h===x.host?_.jsx(St,{}):C?_.jsx("span",{className:"text-sm text-subtext",children:S7t()}):null]},x.host)})}),_.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:_.jsxs(Ie,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[_.jsx(q$,{size:15}),wI()]})})]})}),document.body)}function Zv({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 B9n="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",P9n="/assets/ollama-logo-Bt9O-2K_.png",F9n="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",lB={id:"lmstudio",label:"LM Studio",icon:B9n,url:"http://127.0.0.1:1234/v1"},ov=[lB,{id:"omlx",label:"oMLX",icon:F9n,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:P9n,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 uB({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var V,Z;const s=ut({...Ykn(),enabled:!t}),i=ut(Bu()),a=(V=i.data)==null?void 0:V.find(J=>J.id==="opencode"),[o,c]=T.useState(t),u=()=>{c(!1),r==null||r()},[h,f]=T.useState("lmstudio"),p=ov.find(J=>J.id===h)??lB,[m,w]=T.useState({}),k=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:b,model:y,contextWindow:x,error:C}=k,N=p.id==="ollama"?"":k.apiKey,j=J=>{w($=>({...$,[p.id]:{...$[p.id]??k,...J}}))},A=pn({mutationFn:Akn}),z=pn({mutationFn:async J=>{var q;const $=await Tkn(J);if(!((q=(await hf(!0)).find(P=>P.id==="opencode"))!=null&&q.models.some(P=>P.id===$.model)))throw new Error(Ett());return $}}),M=pn({mutationFn:Mkn}),D=Number(x),I=A.isPending||z.isPending,B=(J={})=>j({models:[],model:null,error:null,...J}),G=async()=>{B();try{const J=await A.mutateAsync({baseUrl:v.trim(),apiKey:N});j({models:J.models,model:J.models[0]??null})}catch(J){j({error:J instanceof Error?J.message:String(J)})}},U=async()=>{if(y){j({error:null});try{const J=await z.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:N,model:y,contextWindow:D});u(),n==null||n(J.model)}catch(J){j({error:J instanceof Error?J.message:String(J)})}}},Q=async J=>{try{await M.mutateAsync(J)}catch($){Zt($ 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":zz(),children:[_.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[_.jsx("h3",{className:"text-base font-medium",children:zz()}),_.jsxs(Ie,{disabled:I,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[_.jsx(Qh,{size:14}),ML()]})]}),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(J=>_.jsx(H9n,{connection:J,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:I||M.isPending,onRemove:()=>void Q(J.id)},J.id))})]}),o&&_.jsx(q9n,{busy:I,onClose:u,footer:_.jsxs(Ie,{variant:"primary",disabled:I||!e||b.length>0&&(!y||!Number.isSafeInteger(D)||D<4096),onClick:()=>void(b.length>0?U():G()),children:[I&&_.jsx(St,{}),b.length>0?Ont():dtt()]}),children:_.jsxs("div",{className:"space-y-4",children:[!e&&_.jsxs("div",{className:"text-sm text-text",children:[_.jsx("p",{children:ynt()}),_.jsx(jh,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:dnt()})]}),_.jsx(lc,{choices:ov,value:h,title:Nz(),header:Nz(),variant:"field",floating:!0,dropDown:!0,disabled:I,renderLabel:J=>_.jsxs(_.Fragment,{children:[J.id==="openai-compatible"?kS():J.label,J.id==="openai-compatible"&&_.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:OL()})]}),renderIcon:J=>{var L;const $=(L=ov.find(q=>q.id===J.id))==null?void 0:L.icon;return $?_.jsx("img",{src:$,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${J.id==="ollama"?" dark:invert":""}`}):_.jsx($$,{size:14,className:"shrink-0"})},onSelect:f}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:att()}),_.jsx(Br,{value:v,disabled:I,onChange:J=>{B({baseUrl:J.target.value})}})]}),p.id!=="ollama"&&_.jsxs("details",{className:"text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:eI()}),_.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[_.jsx("span",{children:p.id==="lmstudio"?Jnt():Nnt()}),_.jsx(Br,{type:"password",autoComplete:"off",value:N,disabled:I,onChange:J=>B({apiKey:J.target.value})})]})]},p.id),b.length>0&&_.jsxs(_.Fragment,{children:[_.jsx(lc,{choices:b.map(J=>({id:J,label:J})),value:y,searchPlaceholder:$it(),title:b0(),header:b0(),variant:"field",floating:!0,dropDown:!0,disabled:I,onSelect:J=>{j({model:J})}}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:Ptt()}),_.jsx(Br,{type:"number",min:4096,step:1024,value:x,disabled:I,onChange:J=>{j({contextWindow:J.target.value})}})]}),_.jsx("p",{className:"text-sm text-subtext",children:Vtt()})]}),C&&_.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:C})]})})]})}function H9n({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:i,onRemove:a}){const o=pn({mutationFn:async()=>{try{await Rkn(e.id)}finally{await hf(!0)}}}),c=ov.find(w=>w.label===e.name||w.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),h=u.length>0&&n&&u.every(w=>t.includes(`${e.id}/${w}`)),f=o.isPending||r,p=s,m=h;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($$,{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"?kS():(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:OL()})," · ",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(Wt,{variant:f||p?"default":m?"success":"warning",children:f?ya():p?fI():m?Mtt():fo()})}),_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsxs(Ie,{variant:"ghost",disabled:i||o.isPending,onClick:()=>o.mutate(),children:[_.jsx(Va,{size:14}),Iv()]}),_.jsx(It,{"aria-label":ant({name:e.name}),disabled:i||o.isPending,onClick:a,children:_.jsx(Of,{size:14})})]})]})]}),o.error&&!m&&_.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:o.error.message})]})}function q9n({busy:e,onClose:n,footer:t,children:r}){const s=T.useRef(null),i=()=>{e||n()};return Dm(s,i,"input"),si.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:ML()})}),_.jsx(It,{className:"absolute end-3.5 top-3.5","aria-label":ff(),onClick:i,disabled:e,children:_.jsx(xr,{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(Ie,{onClick:i,disabled:e,children:ff()}),t]})]})}),document.body)}const _B=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),Rw=["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(" "),bu={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function U9n(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:qv(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Kb(n,t).defaultId}}function Ki(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 G9n({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:i,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:c,autonomy:u,onSelectAutonomy:h,lockHarness:f=!1,openRequest:p=0,className:m}){var Ye,Te,$e,yt,ot,Mt,jt,Pt;const{data:w=K9n}=ut(Bu()),k=zm(),[v,b]=T.useState(!1),y=T.useRef(null),x=T.useRef(null),{open:C,setOpen:N,ref:j}=Ki(y),[A,z]=T.useState(""),[M,D]=T.useState("root"),I=()=>{N(!1),D("root"),z("")},B=T.useRef(p);T.useEffect(()=>{p!==B.current&&(B.current=p,D("models"),z(""),N(!0))},[p,N]),T.useEffect(()=>{var Le;C&&(M==="reasoning"||M==="speed"||M==="permissions")&&((Le=x.current)==null||Le.focus())},[C,M]);const G=T.useMemo(()=>{const Le=A.trim().toLowerCase();return(f&&e?w.filter(ke=>ke.id===e.harness):w).map(ke=>{let me=ke.models;return Le?me=me.filter(je=>`${je.id} ${nv(je)}`.toLowerCase().includes(Le)):(ke.id==="opencode"||ke.id==="cursor"||ke.id==="antigravity")&&(me=me.slice(0,5)),{harness:ke,models:me,hidden:Le?0:ke.models.length-me.length}})},[w,A,f,e]),U=(Le,nt)=>{var me;const ke=(e==null?void 0:e.harness)===Le.id;n({harness:Le.id,model:nt,serviceTier:qv(Le,nt,ke?e==null?void 0:e.serviceTier:null),permissionMode:ke?e.permissionMode:((me=Le.options)==null?void 0:me.defaultPermissionMode)??null,reasoningLevel:KI(Le,nt,ke&&Le.models.some(je=>je.id===nt)?e.reasoningLevel:null)}),I()},Q=(e==null?void 0:e.model)!=null?(Ye=w.find(Le=>Le.id===e.harness))==null?void 0:Ye.models.find(Le=>Le.id===e.model):void 0,V=e?e.model?Q?nv(Q):`${W3(e.model)} · ${Rz()}`:O3():b0(),Z=(e==null?void 0:e.reasoningLevel)??o??((Te=a[0])==null?void 0:Te.id),J=($e=a.find(Le=>Le.id===Z))==null?void 0:$e.label,$=(e==null?void 0:e.permissionMode)??s??((yt=r[0])==null?void 0:yt.id),L=(ot=r.find(Le=>Le.id===$))==null?void 0:ot.label,q=(e==null?void 0:e.harness)==="opencode"?Aat():Zst(),P=w.find(Le=>Le.id===(e==null?void 0:e.harness)),F=GI(P,e==null?void 0:e.model),re=qv(P,e==null?void 0:e.model,e==null?void 0:e.serviceTier),ie=(Mt=F.find(Le=>Le.id===re))==null?void 0:Mt.label,ue=Le=>{c==null||c(Le),I()},se=Le=>{i==null||i(Le),I()},K=[{id:"agentic",label:Zrt(),description:ist()},{id:"copilot",label:fst(),description:bst()}],oe=(jt=K.find(Le=>Le.id===u))==null?void 0:jt.label,ce=Le=>{const nt=K.find(ke=>ke.id===Le);nt&&(h==null||h(nt.id)),I()},pe=Le=>{e&&n({...e,serviceTier:Le}),I()},ve=(Le,nt,ke)=>_.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(ke),children:[_.jsx("span",{className:"flex-1",children:Le}),nt&&_.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:nt}),_.jsx(Ka,{size:14,className:"shrink-0 text-muted"})]}),Me=Le=>_.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[_.jsx(It,{ref:x,type:"button",size:"small",className:"model-submenu-header","aria-label":GL(),onClick:()=>{D("root"),z("")},children:_.jsx(A$,{size:15})}),_.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:Le}),M==="models"&&_.jsx(It,{type:"button",size:"small","aria-label":F3(),onClick:()=>{I(),t()},children:_.jsx(WS,{size:15,"aria-hidden":"true"})})]}),Fe=(Le,nt,ke,me)=>_.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:Le.map(je=>_.jsxs(vn,{onClick:()=>me(je.id),children:[_.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[_.jsxs("span",{children:[je.label,je.id===ke&&_.jsxs("span",{className:"font-normal text-muted",children:[" ",DL()]})]}),je.description&&_.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:je.description})]}),je.id===nt&&_.jsx(bi,{size:13})]},je.id))});return _.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:j,children:[_.jsxs("button",{ref:y,type:"button",className:Ns("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:tY({label:`${V}${J?` · ${J}`:""}${ie?` · ${ie}`:""}`}),"aria-haspopup":"menu","aria-expanded":C,onClick:()=>{C?I():(D("root"),N(!0))},children:[re==="priority"?_.jsx(S8n,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?_.jsx(Th,{harness:e.harness,size:14}):null,re==="priority"&&_.jsxs("span",{className:"sr-only",children:[iit()," "]}),_.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[V,J&&_.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:J})]}),_.jsx(mc,{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(b0(),V,"models"),a.length>0&&ve(q,J,"reasoning"),F.length>0&&ve(Tz(),ie,"speed"),r.length>0&&ve(Az(),L,"permissions"),h&&ve(jz(),oe,"autonomy")]}),M==="models"&&_.jsxs(_.Fragment,{children:[Me(b0()),_.jsx("input",{autoFocus:!0,type:"text",placeholder:Git(),value:A,onChange:Le=>z(Le.target.value)}),_.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[G.map(({harness:Le,models:nt,hidden:ke})=>_.jsxs("div",{className:"[&_.model-item]:ps-6",children:[_.jsxs("div",{className:_B,children:[_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[_.jsx(Th,{harness:Le.id,size:14}),Le.name]}),!Le.agentReady&&_.jsx("span",{className:"model-group-status inline-flex items-center gap-1 text-accent-amber font-normal",children:Le.catalogPending?_f():_.jsxs(_.Fragment,{children:[_.jsx(Yj,{size:10})," ",fo()]})})]}),Le.agentReady?_.jsxs(_.Fragment,{children:[!A.trim()&&_.jsxs(vn,{onClick:()=>U(Le,null),children:[_.jsx("span",{children:O3()}),(e==null?void 0:e.harness)===Le.id&&(e==null?void 0:e.model)===null&&_.jsx(bi,{size:13})]}),Le.models.length===0&&Le.agentNote&&_.jsx("div",{className:Rw,children:Fu(Le.agentNote)}),nt.map(me=>_.jsxs(vn,{title:me.id,onClick:()=>U(Le,me.id),children:[_.jsx("span",{children:nv(me)}),(e==null?void 0:e.harness)===Le.id&&(e==null?void 0:e.model)===me.id&&_.jsx(bi,{size:13})]},me.id)),A.trim().length>0&&!Le.models.some(me=>me.id===A.trim())&&_.jsx(vn,{onClick:()=>U(Le,A.trim()),children:_.jsxs("span",{children:[kat({id:Ce(A.trim())})," · ",Rz()]})})]}):_.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:Le.catalogPending?_f():Le.agentNote?Fu(Le.agentNote):Tit()}),Le.id==="opencode"&&_.jsx(vn,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var me;I(),(me=y.current)==null||me.focus(),b(!0)},children:_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[Brt(),_.jsx(Qh,{size:14,"aria-hidden":"true"})]})}),Le.agentReady&&ke>0&&_.jsx("div",{className:Rw,children:Sit({count:Jt(ke)})})]},Le.id)),w.length===0&&_.jsx("div",{className:Rw,children:Gst()})]}),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(Yj,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),Zit()]})]}),M==="reasoning"&&_.jsxs(_.Fragment,{children:[Me(q),Fe(a,Z,o,ue)]}),M==="permissions"&&_.jsxs(_.Fragment,{children:[Me(Az()),Fe(r,$,s,se)]}),M==="autonomy"&&_.jsxs(_.Fragment,{children:[Me(jz()),Fe(K,u,G3,ce)]}),M==="speed"&&_.jsxs(_.Fragment,{children:[Me(Tz()),Fe(F,re??void 0,"default",pe)]})]}),v&&_.jsx(uB,{dialogOnly:!0,installed:((Pt=w.find(Le=>Le.id==="opencode"))==null?void 0:Pt.installed)??!1,onClose:()=>b(!1),onConnected:Le=>{var ke;const nt=(ke=k.getQueryData(Bu().queryKey))==null?void 0:ke.find(me=>me.id==="opencode");nt&&(!f||(e==null?void 0:e.harness)==="opencode")&&U(nt,Le)}})]})}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:h,renderIcon:f,renderLabel:p,floating:m=!1,onSelect:w,className:k}){var Q,V;const v=T.useRef(null),{open:b,setOpen:y,ref:x}=Ki(v),C=T.useRef(null),[N,j]=T.useState("");if(T.useLayoutEffect(()=>{var L;const Z=C.current,J=x.current;if(!b||!m||!Z||!J)return;Z.matches(":popover-open")||(Z.showPopover(),(L=Z.querySelector("input"))==null||L.focus());const $=()=>{const q=J.getBoundingClientRect(),P=window.innerHeight-q.bottom-12,F=q.top-12,re=Math.min(380,Z.scrollHeight),ie=i?P>=re||P>=F:FF;Z.style.width=`${q.width}px`,Z.style.minWidth="0",Z.style.maxHeight=`${Math.max(0,Math.min(380,ie?P:F))}px`,Z.style.left=`${q.left}px`,Z.style.top=`${ie?q.bottom+4:q.top-Z.getBoundingClientRect().height-4}px`};return $(),window.addEventListener("resize",$),window.addEventListener("scroll",$,!0),()=>{window.removeEventListener("resize",$),window.removeEventListener("scroll",$,!0)}},[b,m,i,N,e.length,x]),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=o==="bare"&&(M==null?void 0:M.id)===Hv?M:void 0,B=(D?e.filter(Z=>Z.id!==D.id):e).filter(Z=>`${Z.label} ${Z.id}`.toLowerCase().includes(N.toLowerCase())),G=(z==null?void 0:z.label)??((V=e[0])==null?void 0:V.label)??"",U=Z=>{var J;w(Z),y(!1),(J=v.current)==null||J.focus()};return _.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:x,children:[_.jsxs("button",{ref:v,type:"button",className:Ns(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":b,disabled:a,onClick:()=>{j(""),y(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))??G:G})]}),_.jsx(mc,{size:12})]}),b&&_.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:_B,children:r}),h&&_.jsx("input",{autoFocus:!0,"aria-label":h,placeholder:h,value:N,onChange:Z=>j(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(vn,{type:"button",onClick:()=>U(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:Est()})]})]}),A===D.id&&_.jsx(bi,{size:13})]}),_.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),B.map((Z,J)=>_.jsxs(vn,{type:"button",onClick:()=>U(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:[" ",DL()]})]}),Z.description&&_.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:Z.description})]})]}),A===Z.id?_.jsx(bi,{size:13}):u&&_.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:J+1})]},Z.id))]})]})]})}const K9n=[];function g5({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),h=Ki();async function f(){if(c){o(!0);try{await FI(c),u(null)}catch(p){u(null),Zt(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:h.ref,children:[h.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:QSt({host:Ce(e.session.host),user:Ce(e.session.user??"")})}),_.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ce(e.session.version??"…")]})]}),_.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[_.jsx(vn,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await BI(),h.setOpen(!1)}catch(p){Zt(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?HSt():B3()}),_.jsx(FS,{content:T7t(),className:"me-2 shrink-0 text-subtext",children:_.jsx(US,{size:15})})]}),_.jsx(vn,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await PI()),h.setOpen(!1)}catch(p){Zt(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:WL()})]}),n?_.jsxs(Ie,{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":h.open,onClick:()=>h.setOpen(p=>!p),children:[_.jsx(Zv,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:gw({host:Ce(e.session.host)})})]}):_.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[_.jsx(It,{size:"small","aria-label":gw({host:Ce(e.session.host)}),"aria-haspopup":"menu","aria-expanded":h.open,onClick:()=>h.setOpen(p=>!p),children:_.jsx(Zv,{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:gw({host:Ce(e.session.host)})}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ce(e.session.version??"…")]})]})]})]}),c&&_.jsx(E$,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void f()})]})}const Jv="code-source-text",fB="code-source-wrap",dB="file-view-gutter text-right text-muted select-none";function hB(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const V9n={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"},W9n={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function v5(e){const n=e.trim().toLowerCase();return V9n[n]??n}function a6(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=W9n[n];if(t)return v5(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:v5(n.slice(r+1))}gc.displayName="clike";gc.aliases=[];function gc(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:/[{}[\];(),.:]/}}$m.displayName="c";$m.aliases=[];function $m(e){e.register(gc),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}sy.displayName="cpp";sy.aliases=[];function sy(e){e.register($m),(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)}o6.displayName="arduino";o6.aliases=["ino"];function o6(e){e.register(sy),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}c6.displayName="bash";c6.aliases=["sh","shell"];function c6(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(P,F){return"(?:"+q[+F]+")"})}function r(L,q,P){return RegExp(t(L,q),"")}function s(L,q){for(var P=0;P>/g,function(){return"(?:"+L+")"});return L.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(L){return"\\b(?:"+L.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),h=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,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),y=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,p,v]),x=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[x,k,v]),N={keyword:c,punctuation:/[<>()?,.:[\]]/},j=/'(?:[^\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: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,[b]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,h,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+"|"+j,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),I=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,G=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,I]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,G]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[I]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var U=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),V=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,U]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),J=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,U]);function $(L,q){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[q,U]),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:$(V,Q)},{pattern:r(/(^|[^@\\])\$"(?:\\.|\{\{|<<0>>|[^\\"{])*"/.source,[J]),lookbehind:!0,greedy:!0,inside:$(J,Z)}],char:{pattern:RegExp(j),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}Bm.displayName="markup";Bm.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Bm(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}Yh.displayName="css";Yh.aliases=[];function Yh(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)}u6.displayName="diff";u6.aliases=[];function u6(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{C(!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(iB,{harness:u,commands:c.data[u.id],onReady:ke=>{D(ke.id)},onClose:()=>{h(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(zw,{})}),_.jsx("h2",{className:"onb-title mt-0 mx-0 text-4xl font-medium leading-[1.08] tracking-[-0.035em]",children:cdt()})]}),_.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:mpt()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:uvt()})]})}),_.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:k0t()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:j1t()})]})}),_.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:r0t()}),_.jsx("span",{className:"block text-lg leading-[1.55] text-text",children:Yvt()})]})})]})]}),_.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(De,{variant:"primary",size:"large",onClick:Pt,disabled:I&&b===null,children:[I&&b===null?_.jsx(kt,{}):null,qz()," ",_.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(zw,{}),_.jsx("span",{children:L1t()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em]",children:zht()}),_.jsx("p",{className:"onb-sub text-text text-base leading-[1.55] mt-0 mx-0 mb-5.5 max-w-120",children:wmt()}),b!==null&&!me&&!Ae&&_.jsx("p",{className:fA,children:p1t()}),b!==null&&me&&M===null&&_.jsx("p",{className:fA,children:Dht()}),(y===null||ce)&&_.jsxs("div",{className:"onb-git-check mt-7",role:"status","aria-live":"polite",children:[_.jsx(hA,{gitVersion:y,error:ce}),ce?_.jsx("p",{className:jw,children:hw()}):_.jsx("p",{className:jw,children:Uz()})]}),_.jsx("div",{className:"onb-cards flex flex-col gap-3.5",children:b!==null?b.map(ke=>{var ge;return _.jsx(aEn,{h:ke,remote:t,selected:M===ke.id,onSelect:()=>D(ke.id),commands:(ge=c.data)==null?void 0:ge[ke.id],onSetup:()=>h(ke)},ke.id)}):V?_.jsx("div",{className:Ru,children:hw()}):_.jsxs(Pr,{className:"py-2",children:[_.jsx(kt,{})," ",Lpt()]})}),c.isError&&_.jsxs("p",{className:Ru,children:[SYe()," ",_.jsx(De,{variant:"ghost",onClick:()=>void c.refetch(),children:ri()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(De,{variant:"ghost",onClick:()=>i(0),children:[_.jsx(B0,{size:12})," ",Hz()]}),_.jsxs(De,{variant:"ghost",onClick:()=>Re(!0,!0),disabled:I,children:[_.jsx(Ka,{size:12,className:I?"animate-[spin_0.9s_linear_infinite]":""})," ",Iv()]}),_.jsx("div",{className:"flex-1"}),_.jsxs(De,{variant:"primary",onClick:()=>i(2),disabled:I||!me||M===null||!Pe,title:I||!me&&Ae?Ivt():me?M===null?lpt():ce?tgt():y===void 0?Avt():y===null?I0t():void 0:c1t(),children:[qz()," ",_.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(zw,{}),!f&&_.jsx("span",{children:q1t()})]}),_.jsx("h2",{className:"onb-title mt-0 mx-0 mb-1.5 text-3xl tracking-[-0.01em] onb-profile-title mb-5.5",children:X1t()}),_.jsx("div",{className:"onb-cards flex flex-col gap-2.5",children:_.jsxs("div",{className:aB,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:Uvt()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:npt()}),_.jsx("div",{className:"onb-area-options grid grid-cols-[repeat(2,_minmax(0,_1fr))] gap-2",children:eEn.map(ke=>_.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:G.includes(ke.id),onChange:()=>ot(ke.id),disabled:x}),_.jsx("span",{children:ke.label()})]},ke.id))}),G.includes("Other")&&_.jsx("input",{className:"onb-other-area w-full mt-2",value:Q,onChange:ke=>K(ke.target.value),disabled:x,placeholder:rvt(),"aria-label":Lmt()})]}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-background",children:pgt()}),_.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:ke=>J(ke.target.value),disabled:x,rows:4,placeholder:qpt()}),_.jsx("label",{className:"onb-field-label text-base font-medium mb-1.5",htmlFor:"onb-paper-search",children:cgt()}),_.jsx("p",{className:"onb-field-hint text-muted text-sm leading-[1.4] mt-0 mx-0 mb-2",children:pdt()}),_.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:F,onChange:ke=>U(ke.target.value),disabled:x,placeholder:zgt()}),ae?_.jsx("div",{className:Ru,children:Dgt()}):H.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:H.map(ke=>_.jsxs("button",{type:"button",onClick:()=>$e(ke),disabled:x,children:[_.jsx(q0,{children:dA(ke.title)}),_.jsx("span",{className:"id",children:ke.paperId})]},ke.paperId))}):null]}),$.length>0&&_.jsx("div",{className:"onb-paper-chips flex flex-wrap gap-1.5 mt-2.5",children:$.map(ke=>_.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(q0,{children:ke.title||ke.paperId}),_.jsx("span",{className:"id",children:ke.paperId}),_.jsx("button",{type:"button","aria-label":FJ({name:Ce(ke.paperId)}),onClick:()=>yt(ke.paperId),disabled:x,children:_.jsx(xr,{size:12})})]},ke.paperId))})]})}),!Mt&&_.jsx("p",{className:"onb-profile-hint text-accent-red text-sm mt-2 mx-0 mb-0",children:G.length===0?Qht():jpt()}),f&&!Pe&&_.jsxs("div",{className:"mt-5",role:"status",children:[_.jsx(hA,{gitVersion:y,error:ce}),_.jsx("p",{className:jw,children:ce?hw():Uz()}),_.jsx(De,{onClick:()=>Re(!0,!0),disabled:I,children:Iv()})]}),_.jsxs("div",{className:"onb-actions flex items-center gap-2.5 mt-5.5",children:[_.jsxs(De,{variant:"ghost",onClick:()=>i(f?0:1),disabled:x,children:[_.jsx(B0,{size:12})," ",Hz()]}),_.jsx("div",{className:"flex-1"}),_.jsx(De,{variant:"primary",onClick:()=>void Ie(),disabled:x||!Pe||!f&&M===null||!Mt,children:x?_.jsxs(_.Fragment,{children:[_.jsx(kt,{})," ",t1t()]}):_.jsxs(_.Fragment,{children:[u0t()," ",_.jsx(sv,{size:13})]})})]}),M===null&&!f&&_.jsx("p",{className:J9n,children:sbt()}),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(HS,{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(De,{size:"small",onClick:()=>void Ie(Mt&&Pe?"complete":"setup"),disabled:x,children:ri()}),f&&_.jsx(De,{variant:"ghost",size:"small",className:"col-start-2 justify-self-start",disabled:x,onClick:()=>{p(!1),j(null),i(1)},children:Hht()}),_.jsxs("details",{className:"col-start-2 col-span-2 min-w-0 text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:Xpt()}),_.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 dA(e){return e.replace(/^\[[^\]]*\]\s*/,"").replace(/\s*[-–|]\s*arXiv\s*$/i,"")}function rEn(e){return e.catalogPending?{tone:"warning",label:ff()}:e.authCheckFailed?{tone:"warning",label:pw()}:e.agentReady?{tone:"success",label:e.authMethod==="thirdParty"||ty(e)?Rm():e.authMethod==="local"||!e.authenticated?ES():w1t()}:e.installed?e.installBroken?{tone:"warning",label:A0t()}:e.authMethod==="local"?{tone:"warning",label:BL()}:e.needsConfigRepair||e.authState==="unknown"?{tone:"warning",label:pw()}:e.id==="claude-code"&&e.authState==="needsLogin"&&!e.loginEligible?{tone:"warning",label:pw()}:e.authState==="unsupported"?{tone:"warning",label:kvt()}:e.installed?{tone:"warning",label:$L()}:{tone:"neutral",label:Gz()}:{tone:"neutral",label:Gz()}}function sEn(e,n){var t;return{harness:e.id,model:n,permissionMode:((t=e.options)==null?void 0:t.defaultPermissionMode)??null,reasoningLevel:Gb(e,n).defaultId}}function iEn({harness:e}){return _.jsx(Th,{harness:e,size:26})}function aEn({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"),h=rEn(e),f=t&&!e.authCheckFailed?{tone:"success",label:Hgt()}:h,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(iEn,{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(Yd,{tone:h.tone,className:"font-normal",children:h.label})]}),c&&!u&&_.jsx(Yd,{tone:f.tone,children:f.label})]})]}),c?_.jsxs(De,{size:"small",onClick:i,disabled:!s,"aria-haspopup":"dialog",title:qYe(),children:[_.jsx(bo,{size:14}),!e.installed||e.installBroken?uYe():e.authState==="unsupported"?mZe():AL()]}):_.jsx(Yd,{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(kt,{})," ",U0t()]}):_.jsxs(_.Fragment,{children:[ty(e)??e.account??(e.authMethod==="apiKey"?CS():null),e.plan?` · ${e.plan}`:""]})}),m&&_.jsx("div",{className:Ru,children:m}),e.authCheckFailed&&e.agentNote&&_.jsx("div",{className:Ru,children:Hu(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:Ru,children:p}),!c&&e.agentNote&&_.jsx("div",{className:`${Ru} [&_code]:whitespace-pre-wrap break-words`,children:Hu(e.agentNote)})]})}function hA({gitVersion:e,error:n}){return _.jsxs("div",{className:aB,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:Y0t()}),_.jsx(Yd,{tone:e?"success":n||e===null?"danger":"warning",children:e?ES():n?cht():e===null?IL():ff()})]}),(e||!n&&e===void 0)&&_.jsx("div",{className:Ru,children:e??xht()})]})}const oEn="/assets/slurm-logo-aGSXVZcE.svg",cEn="/assets/thinking-machines-BOdslTfm.png";function lEn(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 yL();case"tinker_job":return"Tinker";default:return e||"—"}}function uEn({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 _En({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 fEn({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 dEn({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 hEn({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 pEn({size:e=16}){return _.jsx("img",{className:"tinker-logo block flex-none object-contain",src:cEn,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 mEn({size:e=16}){return _.jsx("img",{className:"block flex-none object-contain",src:oEn,width:e,height:e,alt:"","aria-hidden":"true"})}function ny({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 Xh({kind:e,size:n=16}){switch(e){case"modal_job":return _.jsx(_En,{size:n});case"hf_job":return _.jsx(uEn,{size:n});case"k8s_job":return _.jsx(fEn,{size:n});case"ssh_job":return _.jsx(Jj,{size:n,strokeWidth:1.5});case"slurm_job":return _.jsx(mEn,{size:n});case"ray_job":return _.jsx(dEn,{size:n});case"openresearch_job":return _.jsx(hEn,{size:n});case"tinker_job":return _.jsx(pEn,{size:n});case"local_job":return _.jsx(c8n,{size:n,strokeWidth:1.5});default:return _.jsx(Jj,{size:n})}}function i6({backend:e}){const n=OS(e),t=dSn(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(Xh,{kind:n}),_.jsx("span",{className:"backend-name",children:lEn(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 Aw(e,n){const[t,r]=T.useState(e);return T.useEffect(()=>{const s=setTimeout(()=>r(e),n);return()=>clearTimeout(s)},[e,n]),t}function g1(e,n){const t=e.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return(n?t.slice(0,n):t)||"research-project"}function gEn(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 vEn(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 bEn(e){return e.trim().replace(/^https?:\/\//i,"").replace(/^git@([^:]+):/i,"$1/").replace(/\.git$/i,"").replace(/\/$/,"")}function yEn({onCreated:e,onCancel:n,remote:t=!1}){var _r,Mn,Qn,ar;const[r,s]=T.useState("blank"),[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,h]=T.useState(""),[f,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(!1),[b,y]=T.useState(null),[x,C]=T.useState(!1),[N,j]=T.useState(!1),[A,z]=T.useState(""),[M,D]=T.useState(null),[I,B]=T.useState(!1),G=T.useRef(0),q=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"?vEn(M==null?void 0:M.repoUrl):null,Z=i.trim()?`~/OpenResearch/${g1(i,48)}`:"",J=`~/OpenResearch/${g1(i||(M==null?void 0:M.title)||(M==null?void 0:M.paperId)||"")}`,$=r==="blank"&&!f?Z:r==="paper"&&M&&!f?J:u,L=Aw($.trim(),200),F=ut({...y0(L),enabled:!!L&&L===$.trim()}),U=L===$.trim()?F.data??null:null,H=L===$.trim()?((_r=F.error)==null?void 0:_r.message)??null:null,oe=!!$.trim()&&(L!==$.trim()||F.isFetching),ae=K??(r==="folder"&&(U!=null&&U.githubOwner)&&U.githubRepo?{owner:U.githubOwner,repo:U.githubRepo}:null),ue=ut(s6n()),se=((Mn=ue.data)==null?void 0:Mn.login)??(ue.isPending?void 0:null),V=ut(DS()),ne=T.useRef(!1);T.useEffect(()=>{ne.current||!V.data||(ne.current=!0,j(V.data.githubForNewProjects))},[V.data]);const ce=Aw(i.trim(),150),he=ut({...i6n(ce),enabled:ce===i.trim()}),me=ce===i.trim()?((Qn=he.data)==null?void 0:Qn.repo)??g1(i,48):g1(i,48),Ae=ce!==i.trim()||he.isFetching,Pe=ut({...Oj((ae==null?void 0:ae.owner)??"",(ae==null?void 0:ae.repo)??""),enabled:!!ae,subscribed:!!ae}),Ye=!!ae&&Pe.isFetching,Re=ae&&((ar=Pe.data)!=null&&ar.canPush)?`github.com/${ae.owner}/${ae.repo}`:null,$e=Aw(A.trim(),350),yt=gEn($e),ot=r==="paper"&&!M&&$e===A.trim(),Mt=ut({...r$($e),enabled:ot&&!yt&&$e.length>=3,subscribed:ot&&!yt&&$e.length>=3}),jt=ut({...i5(yt??""),enabled:ot&&!!yt,subscribed:ot&&!!yt}),Pt=ot&&!yt?Mt.data??[]:[],Ie=ot&&Mt.isSuccess?$e:"",nt=I||r==="paper"&&!M&&($e!==A.trim()||(yt?jt.isFetching:Mt.isFetching));T.useEffect(()=>{var wt;!ot||!yt||!jt.data||(D(jt.data),o||a(((wt=jt.data.title)==null?void 0:wt.trim())||jt.data.paperId))},[ot,yt,jt.data,o]),T.useEffect(()=>{const wt=yt?jt.error:Mt.error;ot&&wt&&y(wt.message)},[ot,yt,jt.error,Mt.error]);const ke=pn({mutationFn:K3n});async function ge(wt){var vr;const Ht=++G.current;B(!0),y(null);try{const Pn=await tt.fetchQuery(i5(wt));if(Ht!==G.current)return;D(Pn),o||a(((vr=Pn.title)==null?void 0:vr.trim())||Pn.paperId)}catch(Pn){Ht===G.current&&y(Pn instanceof Error?Pn.message:String(Pn))}finally{Ht===G.current&&B(!1)}}function je(){G.current+=1,q.current+=1,D(null),z(""),B(!1),w(!1),h(""),p(!1),Q.current.paper={name:o?i:"",nameTouched:o,path:"",pathTouched:!1},o||a("")}function qe(wt){if(wt===r)return;G.current+=1,q.current+=1,Q.current[r]={name:i,nameTouched:o,path:u,pathTouched:f};const Ht=Q.current[wt];s(wt),y(null),B(!1),w(!1),a(Ht.name),c(Ht.nameTouched),h(Ht.path),p(Ht.pathTouched)}async function rt(){if(m)return;const wt=++q.current;w(!0),y(null);try{const Ht=await V3n();if(wt!==q.current||!Ht)return;if(p(!0),h(Ht),tt.invalidateQueries(y0(Ht)),r==="folder"&&!o){const vr=Ht.replace(/[\\/]+$/,"").split(/[\\/]/).pop();vr&&a(vr)}}catch(Ht){wt===q.current&&y(Ht instanceof Error?Ht.message:String(Ht))}finally{wt===q.current&&w(!1)}}async function dt(wt){if(wt.preventDefault(),!!gt){v(!0),y(null);try{const Ht=await tt.fetchQuery({...y0($.trim()),staleTime:0});if(Ht.exists&&Ht.directory===!1)throw new Error(fw());if(r==="blank"&&Ht.exists)throw new Error(Lz());if(r==="paper"&&Ht.empty===!1)throw new Error(Fz());N&&ae&&await tt.fetchQuery({...Oj(ae.owner,ae.repo),staleTime:0}).catch(()=>null);const vr=await ke.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(vr.project,vr.githubPublicationError)}catch(Ht){y(Ht instanceof Error?Ht.message:String(Ht))}finally{v(!1)}}}const st=i.trim(),Ut=r==="paper"&&M&&!M.repoUrl?M.paperId:null,Xt=r==="folder"&&(U==null?void 0:U.gitState)==="ready"?U.resolvedPath??null:null,en=st!==""&&(Ut!==null||Xt!==null);T.useEffect(()=>{if(!en)return;const wt=window.setTimeout(()=>{J3n({name:st,paperId:Ut??void 0,path:Xt??void 0,locale:E()}).catch(()=>{})},1200);return()=>window.clearTimeout(wt)},[en,st,Ut,Xt]);const an=(U==null?void 0:U.gitVersion)===null,At=r==="folder"&&!!$.trim()&&U!==null&&U.exists===!1,gn=r==="blank"&&(U==null?void 0:U.exists)===!0,on=!!$.trim()&&(U==null?void 0:U.exists)===!0&&U.directory===!1,Ot=r==="paper"&&!!(M!=null&&M.repoUrl)&&(U==null?void 0:U.empty)===!1,dn=r==="paper"&&!!M&&!(M!=null&&M.repoUrl)&&(U==null?void 0:U.empty)===!1,cn=r==="folder"&&((U==null?void 0:U.gitState)==="detached"||(U==null?void 0:U.gitState)==="invalid"),kn=f&&!$.trim()||on||Ot||dn,Wn=f&&!$.trim()||on||gn,vs=f&&!$.trim()?Pz():on?fw():gn?Lz():null,ns=f&&!$.trim()?Pz():on?fw():Ot?Fz():dn?Qot():null,gt=!!(i.trim()&&$.trim())&&!k&&!m&&!oe&&U!==null&&!H&&!an&&!At&&!gn&&!on&&!Ot&&!dn&&!cn&&(r!=="paper"||!!M)&&(!N||typeof se=="string"&&!Ae&&!Ye),ln=Re??`github.com/${se??"you"}/${me}`,bn=se===void 0||Ae||Ye,un=r==="paper"&&!M&&A.trim().length>=3&&Ie===A.trim()&&!nt&&Pt.length===0&&!b;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:dt,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:()=>qe("blank"),children:olt()}),_.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:()=>qe("folder"),children:Wlt()}),_.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:()=>qe("paper"),children:cut()})]}),r==="paper"&&!M&&_.jsxs("label",{className:"!font-normal",children:[Qut(),_.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:A,onChange:wt=>{y(null),z(wt.target.value)},placeholder:h_t()}),!un&&_.jsx("span",{className:"repo-hint",children:nt?Hft():zft()}),un&&_.jsx("span",{className:"project-path-notice block",children:zut()}),Pt.length>0&&_.jsx("div",{className:"paper-results",children:Pt.map(wt=>_.jsxs("button",{type:"button",onClick:()=>void ge(wt.paperId),children:[_.jsx(q0,{children:wt.title}),_.jsx("span",{className:"id",children:wt.paperId})]},wt.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(q0,{className:"block",children:M.title||M.paperId}),M.repoUrl&&_.jsx("div",{className:"id",children:bEn(M.repoUrl)})]}),_.jsx(De,{size:"small",type:"button","aria-label":zlt(),onClick:je,children:xlt()})]}),!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(HS,{size:16})," ",Dut()]}),_.jsx("span",{className:"text-sm font-normal text-accent-amber",children:Hut()})]})]}),(r!=="paper"||M)&&_.jsxs(_.Fragment,{children:[r==="blank"&&_.jsxs("label",{className:"!font-normal",children:[_.jsx("span",{className:"project-field-label !font-medium",children:Bz()}),_.jsx("input",{className:"text-sm font-normal","data-initial-focus":!0,value:i,onChange:wt=>{c(!0),a(wt.target.value)},placeholder:$z()})]}),r==="paper"?_.jsxs("label",{className:"project-location-field",children:[_.jsx("span",{className:"project-location-label !font-medium",children:M!=null&&M.repoUrl?wct():dw()}),_.jsx("input",{className:"text-sm font-normal",value:$,onChange:wt=>{p(!0),h(wt.target.value)},"aria-describedby":kn?"paper-destination-description":void 0,placeholder:"~/OpenResearch/paper-title",spellCheck:!1}),oe&&_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Iz()}),kn&&_.jsx("span",{id:"paper-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:ns})]}):r==="folder"&&!t?_.jsxs("button",{"data-initial-focus":!0,type:"button",className:"folder-picker-control","aria-label":u?nct({path:Ce(u)}):Oz(),disabled:m,title:u||void 0,onClick:()=>void rt(),children:[_.jsx(Fu,{className:u?"folder-picker-icon":"folder-picker-icon placeholder",size:16}),_.jsx("span",{className:u?"text-sm":"placeholder",children:m?pct():u||Oz()}),_.jsx(Va,{className:"folder-picker-chevron",size:15})]}):r==="folder"?_.jsxs("label",{className:"project-location-field",children:[_.jsx("span",{className:"project-location-label !font-medium",children:dw()}),_.jsx("input",{"data-initial-focus":!0,className:"text-sm font-normal",value:u,onChange:wt=>{p(!0),h(wt.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:dw()}),_.jsx("input",{className:"text-sm font-normal",value:$,onChange:wt=>{p(!0),h(wt.target.value)},placeholder:"~/OpenResearch/my-research","aria-describedby":Wn?"blank-destination-description":void 0,spellCheck:!1}),oe&&_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:Iz()}),Wn&&_.jsx("span",{id:"blank-destination-description",className:"folder-picker-hint error !text-accent-red",role:"alert",children:vs})]}):null,r!=="blank"&&$&&_.jsxs("label",{className:"!font-normal",children:[_.jsx("span",{className:"project-field-label !font-medium",children:Bz()}),_.jsx("input",{className:"text-sm font-normal",value:i,onChange:wt=>{c(!0),a(wt.target.value)},placeholder:$z()})]}),an&&_.jsx("div",{className:"project-path-notice error",children:put()}),!an&&r==="folder"&&u.trim()&&!oe&&(U==null?void 0:U.exists)===!1&&_.jsx("div",{className:"project-path-notice error",children:z_t()}),!an&&r==="folder"&&u.trim()&&!oe&&on&&_.jsx("div",{className:"project-path-notice error",children:H_t()}),!an&&r==="folder"&&!oe&&(U==null?void 0:U.gitState)==="detached"&&_.jsx("div",{className:"project-path-notice error",children:Dlt()}),!an&&r==="folder"&&!oe&&(U==null?void 0:U.gitState)==="invalid"&&_.jsx("div",{className:"project-path-notice error",children:D_t()}),H&&_.jsx("div",{className:"project-path-notice error",role:"alert",children:H})]}),b&&_.jsx("div",{className:"error",role:"alert",children:b}),(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&&se===null?" text-accent-red":" text-text"}`,"aria-expanded":x,"aria-controls":"new-project-advanced-settings",onClick:()=>C(wt=>!wt),children:[N?se===null?Dot():Hot():LL(),_.jsx(mc,{className:x?"rotate-180":"",size:16})]}),x&&_.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:wt=>j(wt.target.checked),disabled:k}),_.jsx("strong",{className:"text-base font-medium leading-[1.3] text-text",children:x_t()})]}),_.jsxs("span",{className:"flex flex-col gap-[3px] font-sans text-sm font-normal leading-[1.4] text-subtext",children:[_.jsx("span",{children:bn?Q_t({repository:Ce(ln)}):Re?lft({repository:Ce(ln)}):nft({repository:Ce(ln)})}),_.jsx("span",{children:tut()}),se===null&&_.jsx("span",{children:Dft({command:Ce("gh auth login")})})]})]})]}),_.jsxs("div",{className:"actions new-project-actions",children:[n&&_.jsx(De,{type:"button",onClick:n,children:hlt()}),_.jsx(De,{variant:"primary",className:"ms-auto",disabled:!gt,children:k?Hct():r==="paper"?M!=null&&M.repoUrl?jct():Dz():r==="folder"?Qft():Dz()})]})]})}function oB({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 h=o();if(h.length===0){u.preventDefault(),i.focus();return}const f=h[0],p=h[h.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:VL()}),_.jsx(yEn,{onCancel:e,onCreated:n,remote:t})]})})}function xEn({project:e,deleting:n,error:t,onClose:r,onConfirm:s}){const i=T.useRef(null),a=T.useRef(r),o=T.useRef(n);a.current=r,o.current=n,T.useEffect(()=>{const u=i.current;if(!u)return;const h=document.activeElement instanceof HTMLElement?document.activeElement:null,f=()=>[...u.querySelectorAll('button:not([disabled]), [tabindex]:not([tabindex="-1"])')];(f()[0]??u).focus();const p=m=>{if(m.key==="Escape"){m.preventDefault(),o.current||a.current();return}if(m.key!=="Tab")return;const w=f();if(w.length===0){m.preventDefault(),u.focus();return}const k=w[0],v=w[w.length-1];m.shiftKey&&document.activeElement===k?(m.preventDefault(),v.focus()):!m.shiftKey&&document.activeElement===v&&(m.preventDefault(),k.focus())};return document.addEventListener("keydown",p,!0),()=>{document.removeEventListener("keydown",p,!0),h==null||h.focus()}},[]);const c=!!(e.githubEnabled&&(e.githubUrl||e.githubOwner&&e.githubRepo));return _.jsx("div",{className:"modal-backdrop fixed inset-0 bg-modal-backdrop flex items-center justify-center p-5 overflow-y-auto z-100",onClick:u=>{!n&&u.target===u.currentTarget&&r()},children:_.jsxs("div",{ref:i,className:"modal w-110 max-w-full bg-background border border-border rounded-xl shadow-modal p-6",role:"dialog","aria-modal":"true","aria-labelledby":"delete-project-dialog-title","aria-describedby":"delete-project-dialog-description",tabIndex:-1,children:[_.jsx("h2",{id:"delete-project-dialog-title",className:"mt-0 mb-3 text-xl",children:ckt()}),_.jsxs("div",{id:"delete-project-dialog-description",className:"flex flex-col gap-2 text-sm leading-normal text-subtext",children:[_.jsx("p",{className:"m-0",children:z5t({name:_a(e.name)})}),_.jsx("p",{className:"m-0",children:c?Dkt():Hkt()}),t&&_.jsx("p",{className:"m-0 text-accent-red",role:"alert",children:t})]}),_.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[_.jsx(De,{disabled:n,onClick:r,children:W5t()}),_.jsx(De,{variant:"danger",disabled:n,onClick:s,children:n?wkt():pkt()})]})]})})}function pA(){return _.jsx("span",{className:"activity-pulse h-2 w-2 shrink-0 rounded-full bg-accent-teal animate-[or-pulse_1.2s_ease-in-out_infinite]"})}function wEn({projects:e,onOpen:n,onCreated:t,onDeleted:r,remote:s=!1}){const[i,a]=T.useState(!1),[o,c]=T.useState(null),[u,h]=T.useState(null),[f,p]=T.useState(null),m=ut(r6n()),w=Object.fromEntries((m.data??[]).map(v=>[v.projectId,v]));async function k(v){c(v.id),h(null);try{await n5n(v.id),h(null),p(null),r(v.id)}catch(b){h(b instanceof Error?b.message:String(b))}finally{c(null)}}return _.jsxs("div",{className:"home flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges] bg-canvas",children:[_.jsxs("div",{className:"home-inner max-w-290 my-0 mx-auto pt-12 px-6 pb-16 [@media((max-width:_960px))]:pt-6 [@media((max-width:_960px))]:px-4 win-titlebar:[@media((max-width:_960px))]:pt-10",children:[_.jsxs("div",{className:"home-head flex items-center justify-between gap-3 mb-4.5 [&_h2]:m-0 [&_h2]:text-4xl [&_h2]:tracking-[-0.02em] [@media((max-width:_520px))]:items-start [@media((max-width:_520px))]:flex-col",children:[_.jsx("h2",{children:pSt()}),_.jsxs(De,{onClick:()=>a(!0),children:[_.jsx(Qh,{size:15})," ",VL()]})]}),_.jsx("div",{className:"home-list overflow-hidden rounded-lg border border-border bg-background",children:_.jsxs("div",{children:[_.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border bg-background py-2.5 ps-4 pe-2 text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:hidden",children:[_.jsx("span",{children:cSt()}),_.jsx("span",{children:Qz()}),_.jsx("span",{children:Xz()}),_.jsx("span",{children:Yz()})]}),e.length===0?_.jsx("div",{className:"py-8 px-4 text-sm text-muted",children:tSt()}):[...e].sort((v,b)=>{var C,N;const y=((C=w[v.id])==null?void 0:C.lastMessageAt)??v.createdAt;return(((N=w[b.id])==null?void 0:N.lastMessageAt)??b.createdAt)-y||v.name.localeCompare(b.name)}).map(v=>{const b=w[v.id],y=v.githubEnabled?v.githubUrl??(v.githubOwner&&v.githubRepo?`https://github.com/${v.githubOwner}/${v.githubRepo}`:null):null,x=y?v.githubOwner&&v.githubRepo?`${v.githubOwner}/${v.githubRepo}`:y.replace(/^https?:\/\/github\.com\//,"").replace(/\.git$/,"").replace(/\/$/,""):$v(),C=b?b.activeAgents>0?h5t({count:Jt(b.activeAgents)}):zSt():"—",N=b?b.totalAgents===1?FSt():x5t({count:Jt(b.totalAgents)}):"—",j=b?b.runningExperiments>0?WSt({count:Jt(b.runningExperiments)}):b.totalExperiments===0?jS():Zz({count:Jt(b.totalExperiments)}):"—",A=b&&b.runningExperiments>0?Zz({count:Jt(b.totalExperiments)}):null;return _.jsxs("div",{className:"group project-row relative grid cursor-pointer grid-cols-[minmax(0,1fr)_9rem_9rem_minmax(18rem,max-content)] items-center gap-3 border-b border-border-variant py-4 ps-4 pe-2 text-start transition-colors duration-120 ease-standard last:border-b-0 hover:bg-surface-bright focus-within:bg-surface-bright [@media((max-width:_960px))]:grid-cols-[minmax(0,0.8fr)_minmax(0,0.8fr)_minmax(0,1.4fr)] [@media((max-width:_960px))]:items-start [@media((max-width:_960px))]:gap-x-4 [@media((max-width:_960px))]:gap-y-3 [@media((max-width:_960px))]:py-4 [@media((max-width:_960px))]:px-4 [@media((max-width:_600px))]:grid-cols-2",children:[_.jsx("button",{className:"project-row-open absolute inset-0 z-0 cursor-pointer rounded-[inherit] focus-visible:outline focus-visible:outline-2 focus-visible:outline-text focus-visible:outline-offset-[-2px]","aria-label":KZ({name:_a(v.name)}),onClick:()=>n(v.id)}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none [@media((max-width:_960px))]:col-span-3 [@media((max-width:_600px))]:col-span-2",children:[_.jsx("span",{dir:"auto",className:"project-row-title whitespace-normal break-words text-base font-semibold text-text pointer-events-none",children:v.name}),_.jsxs("span",{className:"relative z-2 flex items-center gap-1.5 text-xs text-muted [@media((max-width:_960px))]:flex-wrap",children:[_.jsxs("span",{children:[tkt()," ",vo(v.createdAt)]}),v.paperId&&_.jsx("span",{"aria-hidden":"true",children:"·"}),v.paperId&&_.jsxs("span",{children:[F5t()," ",Ce(v.paperId)]}),_.jsx("button",{className:"project-row-secondary project-row-delete inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-sm leading-0 text-muted opacity-0 pointer-events-none transition-opacity hover:bg-surface hover:text-accent-red group-hover:opacity-100 group-hover:pointer-events-auto group-focus-within:opacity-100 group-focus-within:pointer-events-auto focus:opacity-100 focus:pointer-events-auto focus-visible:outline focus-visible:outline-2 focus-visible:outline-text","aria-label":E3({name:_a(v.name)}),disabled:o===v.id,onClick:z=>{z.stopPropagation(),h(null),p(v)},children:_.jsx(Of,{size:14})})]})]}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:Qz()}),_.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.activeAgents>0&&_.jsx(pA,{}),C]}),_.jsx("span",{className:"text-xs text-muted",children:N})]}),_.jsxs("div",{className:"relative z-1 flex min-w-0 flex-col gap-1 pointer-events-none",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:block",children:Xz()}),_.jsxs("span",{className:"inline-flex items-center gap-2 text-sm text-text",children:[b&&b.runningExperiments>0&&_.jsx(pA,{}),j]}),A&&_.jsx("span",{className:"text-xs text-muted",children:A})]}),_.jsxs("div",{className:"relative z-1 min-w-0 pointer-events-none [@media((max-width:_600px))]:col-span-2",children:[_.jsx("span",{className:"hidden text-xs font-medium tracking-[0.06em] text-text uppercase [@media((max-width:_960px))]:mb-1 [@media((max-width:_960px))]:block",children:Yz()}),y?_.jsxs("a",{className:"project-row-secondary inline-flex max-w-full items-center gap-2 text-sm text-text no-underline pointer-events-auto hover:underline underline-offset-2",href:y,target:"_blank",rel:"noreferrer","aria-label":Ov({name:_a(v.name)}),children:[_.jsx("span",{className:"inline-flex shrink-0",children:_.jsx(ny,{size:14})}),_.jsx("span",{className:"overflow-hidden text-ellipsis whitespace-nowrap [@media((max-width:_960px))]:whitespace-normal [@media((max-width:_960px))]:break-all",children:Ce(x)})]}):_.jsx("span",{className:"text-sm text-text pointer-events-none",children:x})]})]},v.id)})]})})]}),i&&_.jsx(oB,{remote:s,onClose:()=>a(!1),onCreated:(v,b)=>{a(!1),t(v,b)}}),f&&_.jsx(xEn,{project:f,deleting:o===f.id,error:u,onClose:()=>{h(null),p(null)},onConfirm:()=>void k(f)})]})}function cB(){const e=T.useSyncExternalStore(ZSn,Tj,Tj);return _.jsxs(_.Fragment,{children:[_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:e?"":O3()}),!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(HS,{size:13,className:"shrink-0 text-accent-amber"}),_.jsx("span",{dir:"auto",className:"min-w-0",children:O3()})]})]})}function kEn({onClose:e,onConfigureSsh:n}){var v,b,y;const t=pn({mutationFn:x=>ikn(...x)}),r=ut(QI()),s=ut(NSn()),i=((v=r.data)==null?void 0:v.hosts)??null,a=s.data??[],[o,c]=T.useState(""),u=i?null:((b=r.error)==null?void 0:b.message)??((y=s.error)==null?void 0:y.message)??null,[h,f]=T.useState(null),p=T.useRef(null);Dm(p,e);async function m(x){const C="__ORX_DESKTOP__"in window,N=C?null:window.open("/remote-launch","_blank");if(!C&&!N){Zt(k8t(),"error");return}f(x);try{const j=await t.mutateAsync([x,{theme:f6n(),locale:E()}]);N?N.location.replace(j.gatewayUrl):window.open(j.gatewayUrl,"_blank"),e()}catch(j){N==null||N.close(),Zt(j instanceof Error?j.message:String(j),"error")}finally{f(null)}}const w=i==null?void 0:i.filter(x=>x.host.toLocaleLowerCase().includes(o.trim().toLocaleLowerCase())),k=new Map(a.map(x=>[x.host,x]));return ii.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:x=>{x.target===x.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(It,{className:"absolute end-3.5 top-3.5","aria-label":tCt(),onClick:e,children:_.jsx(xr,{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:I3()}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-normal text-subtext",children:cCt()}),_.jsx(Br,{"data-initial-focus":!0,className:"mt-4",value:o,onChange:x=>c(x.target.value),placeholder:tj(),"aria-label":tj()})]}),_.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(kt,{})," ",uI()]}):(w==null?void 0:w.length)===0?_.jsx("p",{className:"m-3 text-sm text-subtext",children:Q7t()}):w==null?void 0:w.map(x=>{const C=k.get(x.host);return _.jsxs(De,{variant:"ghost",className:"w-full justify-start text-base font-normal",disabled:h===x.host,onClick:()=>void m(x.host),children:[_.jsx("span",{className:"min-w-0 flex-1 truncate text-start",children:x.host}),h===x.host?_.jsx(kt,{}):C?_.jsx("span",{className:"text-sm text-subtext",children:l8t()}):null]},x.host)})}),_.jsx("div",{className:"shrink-0 border-t border-border-variant p-2",children:_.jsxs(De,{variant:"ghost",className:"w-full justify-start text-base font-normal",onClick:n,children:[_.jsx(q$,{size:15}),wI()]})})]})}),document.body)}function Zv({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 SEn="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",CEn="/assets/ollama-logo-Bt9O-2K_.png",EEn="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",lB={id:"lmstudio",label:"LM Studio",icon:SEn,url:"http://127.0.0.1:1234/v1"},ov=[lB,{id:"omlx",label:"oMLX",icon:EEn,url:"http://127.0.0.1:8000/v1"},{id:"ollama",label:"Ollama",icon:CEn,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 uB({installed:e,onConnected:n,dialogOnly:t=!1,onClose:r}){var K,Z;const s=ut({...LSn(),enabled:!t}),i=ut(Pu()),a=(K=i.data)==null?void 0:K.find(J=>J.id==="opencode"),[o,c]=T.useState(t),u=()=>{c(!1),r==null||r()},[h,f]=T.useState("lmstudio"),p=ov.find(J=>J.id===h)??lB,[m,w]=T.useState({}),k=m[p.id]??{baseUrl:p.url,apiKey:"",models:[],model:null,contextWindow:"32768",error:null},{baseUrl:v,models:b,model:y,contextWindow:x,error:C}=k,N=p.id==="ollama"?"":k.apiKey,j=J=>{w($=>({...$,[p.id]:{...$[p.id]??k,...J}}))},A=pn({mutationFn:pSn}),z=pn({mutationFn:async J=>{var F;const $=await mSn(J);if(!((F=(await hf(!0)).find(U=>U.id==="opencode"))!=null&&F.models.some(U=>U.id===$.model)))throw new Error(_nt());return $}}),M=pn({mutationFn:vSn}),D=Number(x),I=A.isPending||z.isPending,B=(J={})=>j({models:[],model:null,error:null,...J}),G=async()=>{B();try{const J=await A.mutateAsync({baseUrl:v.trim(),apiKey:N});j({models:J.models,model:J.models[0]??null})}catch(J){j({error:J instanceof Error?J.message:String(J)})}},q=async()=>{if(y){j({error:null});try{const J=await z.mutateAsync({name:p.label,baseUrl:v.trim(),apiKey:N,model:y,contextWindow:D});u(),n==null||n(J.model)}catch(J){j({error:J instanceof Error?J.message:String(J)})}}},Q=async J=>{try{await M.mutateAsync(J)}catch($){Zt($ 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":jz(),children:[_.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[_.jsx("h3",{className:"text-base font-medium",children:jz()}),_.jsxs(De,{disabled:I,onClick:()=>c(!0),"aria-haspopup":"dialog",children:[_.jsx(Qh,{size:14}),ML()]})]}),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(J=>_.jsx(NEn,{connection:J,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:I||M.isPending,onRemove:()=>void Q(J.id)},J.id))})]}),o&&_.jsx(zEn,{busy:I,onClose:u,footer:_.jsxs(De,{variant:"primary",disabled:I||!e||b.length>0&&(!y||!Number.isSafeInteger(D)||D<4096),onClick:()=>void(b.length>0?q():G()),children:[I&&_.jsx(kt,{}),b.length>0?brt():Ztt()]}),children:_.jsxs("div",{className:"space-y-4",children:[!e&&_.jsxs("div",{className:"text-sm text-text",children:[_.jsx("p",{children:irt()}),_.jsx(jh,{href:"https://opencode.ai/docs/#install",target:"_blank",rel:"noreferrer",children:Znt()})]}),_.jsx(lc,{choices:ov,value:h,title:zz(),header:zz(),variant:"field",floating:!0,dropDown:!0,disabled:I,renderLabel:J=>_.jsxs(_.Fragment,{children:[J.id==="openai-compatible"?kS():J.label,J.id==="openai-compatible"&&_.jsx("span",{className:"ml-1 text-xs font-normal text-subtext",children:OL()})]}),renderIcon:J=>{var L;const $=(L=ov.find(F=>F.id===J.id))==null?void 0:L.icon;return $?_.jsx("img",{src:$,alt:"",width:14,height:14,className:`size-3.5 shrink-0 object-contain${J.id==="ollama"?" dark:invert":""}`}):_.jsx($$,{size:14,className:"shrink-0"})},onSelect:f}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:Gtt()}),_.jsx(Br,{value:v,disabled:I,onChange:J=>{B({baseUrl:J.target.value})}})]}),p.id!=="ollama"&&_.jsxs("details",{className:"text-sm text-text",children:[_.jsx("summary",{className:"cursor-pointer",children:eI()}),_.jsxs("label",{className:"block space-y-1 mt-3 text-sm text-subtext",children:[_.jsx("span",{children:p.id==="lmstudio"?$rt():frt()}),_.jsx(Br,{type:"password",autoComplete:"off",value:N,disabled:I,onChange:J=>B({apiKey:J.target.value})})]})]},p.id),b.length>0&&_.jsxs(_.Fragment,{children:[_.jsx(lc,{choices:b.map(J=>({id:J,label:J})),value:y,searchPlaceholder:kat(),title:b0(),header:b0(),variant:"field",floating:!0,dropDown:!0,disabled:I,onSelect:J=>{j({model:J})}}),_.jsxs("label",{className:"block space-y-1 text-sm text-subtext",children:[_.jsx("span",{children:Cnt()}),_.jsx(Br,{type:"number",min:4096,step:1024,value:x,disabled:I,onChange:J=>{j({contextWindow:J.target.value})}})]}),_.jsx("p",{className:"text-sm text-subtext",children:Rnt()})]}),C&&_.jsx("p",{className:"text-sm text-accent-red",role:"alert",children:C})]})})]})}function NEn({connection:e,harnessReady:n,availableModels:t,checking:r,unknown:s,disabled:i,onRemove:a}){const o=pn({mutationFn:async()=>{try{await gSn(e.id)}finally{await hf(!0)}}}),c=ov.find(w=>w.label===e.name||w.id==="openai-compatible"&&["OpenAI-compatible server","Custom endpoint"].includes(e.name)),u=Object.keys(e.models),h=u.length>0&&n&&u.every(w=>t.includes(`${e.id}/${w}`)),f=o.isPending||r,p=s,m=h;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($$,{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"?kS():(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:OL()})," · ",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(Wt,{variant:f||p?"default":m?"success":"warning",children:f?ya():p?fI():m?vnt():fo()})}),_.jsxs("div",{className:"flex items-center gap-1",children:[_.jsxs(De,{variant:"ghost",disabled:i||o.isPending,onClick:()=>o.mutate(),children:[_.jsx(Ka,{size:14}),Iv()]}),_.jsx(It,{"aria-label":Gnt({name:e.name}),disabled:i||o.isPending,onClick:a,children:_.jsx(Of,{size:14})})]})]})]}),o.error&&!m&&_.jsx("p",{className:"mt-2 text-sm text-accent-red",role:"alert",children:o.error.message})]})}function zEn({busy:e,onClose:n,footer:t,children:r}){const s=T.useRef(null),i=()=>{e||n()};return Dm(s,i,"input"),ii.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:ML()})}),_.jsx(It,{className:"absolute end-3.5 top-3.5","aria-label":df(),onClick:i,disabled:e,children:_.jsx(xr,{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(De,{onClick:i,disabled:e,children:df()}),t]})]})}),document.body)}const _B=["model-group flex items-center justify-between gap-2","text-sm font-medium text-text pt-2.5 px-2 pb-1.5"].join(" "),Tw=["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(" "),bu={"claude-code":"Claude Code",codex:"Codex",opencode:"OpenCode",cursor:"Cursor",antigravity:"Google Antigravity"};function jEn(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:qv(n,t,null),permissionMode:((s=n.options)==null?void 0:s.defaultPermissionMode)??null,reasoningLevel:Gb(n,t).defaultId}}function Vi(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 AEn({value:e,onSelect:n,onOpenSettings:t,permissionChoices:r=[],defaultPermissionId:s,onSelectPermission:i,reasoningChoices:a=[],defaultReasoningId:o,onSelectReasoning:c,autonomy:u,onSelectAutonomy:h,lockHarness:f=!1,openRequest:p=0,className:m}){var Ye,Re,$e,yt,ot,Mt,jt,Pt;const{data:w=TEn}=ut(Pu()),k=zm(),[v,b]=T.useState(!1),y=T.useRef(null),x=T.useRef(null),{open:C,setOpen:N,ref:j}=Vi(y),[A,z]=T.useState(""),[M,D]=T.useState("root"),I=()=>{N(!1),D("root"),z("")},B=T.useRef(p);T.useEffect(()=>{p!==B.current&&(B.current=p,D("models"),z(""),N(!0))},[p,N]),T.useEffect(()=>{var Ie;C&&(M==="reasoning"||M==="speed"||M==="permissions")&&((Ie=x.current)==null||Ie.focus())},[C,M]);const G=T.useMemo(()=>{const Ie=A.trim().toLowerCase();return(f&&e?w.filter(ke=>ke.id===e.harness):w).map(ke=>{let ge=ke.models;return Ie?ge=ge.filter(je=>`${je.id} ${nv(je)}`.toLowerCase().includes(Ie)):(ke.id==="opencode"||ke.id==="cursor"||ke.id==="antigravity")&&(ge=ge.slice(0,5)),{harness:ke,models:ge,hidden:Ie?0:ke.models.length-ge.length}})},[w,A,f,e]),q=(Ie,nt)=>{var ge;const ke=(e==null?void 0:e.harness)===Ie.id;n({harness:Ie.id,model:nt,serviceTier:qv(Ie,nt,ke?e==null?void 0:e.serviceTier:null),permissionMode:ke?e.permissionMode:((ge=Ie.options)==null?void 0:ge.defaultPermissionMode)??null,reasoningLevel:VI(Ie,nt,ke&&Ie.models.some(je=>je.id===nt)?e.reasoningLevel:null)}),I()},Q=(e==null?void 0:e.model)!=null?(Ye=w.find(Ie=>Ie.id===e.harness))==null?void 0:Ye.models.find(Ie=>Ie.id===e.model):void 0,K=e?e.model?Q?nv(Q):`${K3(e.model)} · ${Mz()}`:M3():b0(),Z=(e==null?void 0:e.reasoningLevel)??o??((Re=a[0])==null?void 0:Re.id),J=($e=a.find(Ie=>Ie.id===Z))==null?void 0:$e.label,$=(e==null?void 0:e.permissionMode)??s??((yt=r[0])==null?void 0:yt.id),L=(ot=r.find(Ie=>Ie.id===$))==null?void 0:ot.label,F=(e==null?void 0:e.harness)==="opencode"?pot():Iit(),U=w.find(Ie=>Ie.id===(e==null?void 0:e.harness)),H=GI(U,e==null?void 0:e.model),oe=qv(U,e==null?void 0:e.model,e==null?void 0:e.serviceTier),ae=(Mt=H.find(Ie=>Ie.id===oe))==null?void 0:Mt.label,ue=Ie=>{c==null||c(Ie),I()},se=Ie=>{i==null||i(Ie),I()},V=[{id:"agentic",label:Ist(),description:Ust()},{id:"copilot",label:Yst(),description:sit()}],ne=(jt=V.find(Ie=>Ie.id===u))==null?void 0:jt.label,ce=Ie=>{const nt=V.find(ke=>ke.id===Ie);nt&&(h==null||h(nt.id)),I()},he=Ie=>{e&&n({...e,serviceTier:Ie}),I()},me=(Ie,nt,ke)=>_.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(ke),children:[_.jsx("span",{className:"flex-1",children:Ie}),nt&&_.jsx("span",{className:"max-w-36 truncate text-sm text-muted",children:nt}),_.jsx(Va,{size:14,className:"shrink-0 text-muted"})]}),Ae=Ie=>_.jsxs("div",{className:"flex shrink-0 items-center border-b border-border-variant px-1 py-1",children:[_.jsx(It,{ref:x,type:"button",size:"small",className:"model-submenu-header","aria-label":GL(),onClick:()=>{D("root"),z("")},children:_.jsx(A$,{size:15})}),_.jsx("span",{className:"min-w-0 flex-1 text-sm font-medium text-text",children:Ie}),M==="models"&&_.jsx(It,{type:"button",size:"small","aria-label":P3(),onClick:()=>{I(),t()},children:_.jsx(WS,{size:15,"aria-hidden":"true"})})]}),Pe=(Ie,nt,ke,ge)=>_.jsx("div",{className:"model-menu-list overflow-y-auto p-1.5",children:Ie.map(je=>_.jsxs(vn,{onClick:()=>ge(je.id),children:[_.jsxs("span",{className:"flex min-w-0 flex-col items-start gap-0.5",children:[_.jsxs("span",{children:[je.label,je.id===ke&&_.jsxs("span",{className:"font-normal text-muted",children:[" ",DL()]})]}),je.description&&_.jsx("span",{className:"max-w-72 text-sm font-normal leading-snug text-muted",children:je.description})]}),je.id===nt&&_.jsx(yi,{size:13})]},je.id))});return _.jsxs("div",{className:"model-picker relative inline-flex min-w-0","data-onboarding":"model-picker",ref:j,children:[_.jsxs("button",{ref:y,type:"button",className:zs("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:JX({label:`${K}${J?` · ${J}`:""}${ae?` · ${ae}`:""}`}),"aria-haspopup":"menu","aria-expanded":C,onClick:()=>{C?I():(D("root"),N(!0))},children:[oe==="priority"?_.jsx(l9n,{size:14,fill:"currentColor","aria-hidden":"true"}):e!=null&&e.harness?_.jsx(Th,{harness:e.harness,size:14}):null,oe==="priority"&&_.jsxs("span",{className:"sr-only",children:[Uit()," "]}),_.jsxs("span",{className:"model-picker-label min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:[K,J&&_.jsx("span",{className:"model-picker-reasoning ms-1 text-muted",children:J})]}),_.jsx(mc,{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:[me(b0(),K,"models"),a.length>0&&me(F,J,"reasoning"),H.length>0&&me(Rz(),ae,"speed"),r.length>0&&me(Tz(),L,"permissions"),h&&me(Az(),ne,"autonomy")]}),M==="models"&&_.jsxs(_.Fragment,{children:[Ae(b0()),_.jsx("input",{autoFocus:!0,type:"text",placeholder:Aat(),value:A,onChange:Ie=>z(Ie.target.value)}),_.jsxs("div",{className:"model-menu-list overflow-y-auto p-1.5",children:[G.map(({harness:Ie,models:nt,hidden:ke})=>_.jsxs("div",{className:"[&_.model-item]:ps-6",children:[_.jsxs("div",{className:_B,children:[_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[_.jsx(Th,{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?ff():_.jsxs(_.Fragment,{children:[_.jsx(Zj,{size:10})," ",fo()]})})]}),Ie.agentReady?_.jsxs(_.Fragment,{children:[!A.trim()&&_.jsxs(vn,{onClick:()=>q(Ie,null),children:[_.jsx("span",{children:M3()}),(e==null?void 0:e.harness)===Ie.id&&(e==null?void 0:e.model)===null&&_.jsx(yi,{size:13})]}),Ie.models.length===0&&Ie.agentNote&&_.jsx("div",{className:Tw,children:Hu(Ie.agentNote)}),nt.map(ge=>_.jsxs(vn,{title:ge.id,onClick:()=>q(Ie,ge.id),children:[_.jsx("span",{children:nv(ge)}),(e==null?void 0:e.harness)===Ie.id&&(e==null?void 0:e.model)===ge.id&&_.jsx(yi,{size:13})]},ge.id)),A.trim().length>0&&!Ie.models.some(ge=>ge.id===A.trim())&&_.jsx(vn,{onClick:()=>q(Ie,A.trim()),children:_.jsxs("span",{children:[cot({id:Ce(A.trim())})," · ",Mz()]})})]}):_.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?ff():Ie.agentNote?Hu(Ie.agentNote):mat()}),Ie.id==="opencode"&&_.jsx(vn,{type:"button",className:"font-medium","aria-haspopup":"dialog",onClick:()=>{var ge;I(),(ge=y.current)==null||ge.focus(),b(!0)},children:_.jsxs("span",{className:"inline-flex items-center gap-1.5",children:[Sst(),_.jsx(Qh,{size:14,"aria-hidden":"true"})]})}),Ie.agentReady&&ke>0&&_.jsx("div",{className:Tw,children:lat({count:Jt(ke)})})]},Ie.id)),w.length===0&&_.jsx("div",{className:Tw,children:Ait()})]}),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(Zj,{size:11,className:"inline-block align-baseline me-1","aria-hidden":"true"}),Iat()]})]}),M==="reasoning"&&_.jsxs(_.Fragment,{children:[Ae(F),Pe(a,Z,o,ue)]}),M==="permissions"&&_.jsxs(_.Fragment,{children:[Ae(Tz()),Pe(r,$,s,se)]}),M==="autonomy"&&_.jsxs(_.Fragment,{children:[Ae(Az()),Pe(V,u,U3,ce)]}),M==="speed"&&_.jsxs(_.Fragment,{children:[Ae(Rz()),Pe(H,oe??void 0,"default",he)]})]}),v&&_.jsx(uB,{dialogOnly:!0,installed:((Pt=w.find(Ie=>Ie.id==="opencode"))==null?void 0:Pt.installed)??!1,onClose:()=>b(!1),onConnected:Ie=>{var ke;const nt=(ke=k.getQueryData(Pu().queryKey))==null?void 0:ke.find(ge=>ge.id==="opencode");nt&&(!f||(e==null?void 0:e.harness)==="opencode")&&q(nt,Ie)}})]})}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:h,renderIcon:f,renderLabel:p,floating:m=!1,onSelect:w,className:k}){var Q,K;const v=T.useRef(null),{open:b,setOpen:y,ref:x}=Vi(v),C=T.useRef(null),[N,j]=T.useState("");if(T.useLayoutEffect(()=>{var L;const Z=C.current,J=x.current;if(!b||!m||!Z||!J)return;Z.matches(":popover-open")||(Z.showPopover(),(L=Z.querySelector("input"))==null||L.focus());const $=()=>{const F=J.getBoundingClientRect(),U=window.innerHeight-F.bottom-12,H=F.top-12,oe=Math.min(380,Z.scrollHeight),ae=i?U>=oe||U>=H:HH;Z.style.width=`${F.width}px`,Z.style.minWidth="0",Z.style.maxHeight=`${Math.max(0,Math.min(380,ae?U:H))}px`,Z.style.left=`${F.left}px`,Z.style.top=`${ae?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)}},[b,m,i,N,e.length,x]),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=o==="bare"&&(M==null?void 0:M.id)===Hv?M:void 0,B=(D?e.filter(Z=>Z.id!==D.id):e).filter(Z=>`${Z.label} ${Z.id}`.toLowerCase().includes(N.toLowerCase())),G=(z==null?void 0:z.label)??((K=e[0])==null?void 0:K.label)??"",q=Z=>{var J;w(Z),y(!1),(J=v.current)==null||J.focus()};return _.jsxs("div",{className:`option-picker relative inline-flex${o==="field"?" w-full":""}`,ref:x,children:[_.jsxs("button",{ref:v,type:"button",className:zs(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":b,disabled:a,onClick:()=>{j(""),y(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))??G:G})]}),_.jsx(mc,{size:12})]}),b&&_.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:_B,children:r}),h&&_.jsx("input",{autoFocus:!0,"aria-label":h,placeholder:h,value:N,onChange:Z=>j(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(vn,{type:"button",onClick:()=>q(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:_it()})]})]}),A===D.id&&_.jsx(yi,{size:13})]}),_.jsx("div",{className:"option-sep h-px my-[5px] mx-1 bg-border-variant"})]}),B.map((Z,J)=>_.jsxs(vn,{type:"button",onClick:()=>q(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:[" ",DL()]})]}),Z.description&&_.jsx("span",{className:"max-w-68 text-sm font-normal leading-snug text-muted",children:Z.description})]})]}),A===Z.id?_.jsx(yi,{size:13}):u&&_.jsx("span",{className:"option-num text-muted text-xs tabular-nums",children:J+1})]},Z.id))]})]})]})}const TEn=[];function m5({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),h=Vi();async function f(){if(c){o(!0);try{await FI(c),u(null)}catch(p){u(null),Zt(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:h.ref,children:[h.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:O6t({host:Ce(e.session.host),user:Ce(e.session.user??"")})}),_.jsxs("div",{className:"mt-0.5 text-xs text-subtext",children:["OpenResearch ",Ce(e.session.version??"…")]})]}),_.jsxs("div",{className:"flex items-center rounded-sm hover:bg-surface",children:[_.jsx(vn,{className:"hover:bg-transparent",disabled:t,onClick:async()=>{r(!0);try{await BI(),h.setOpen(!1)}catch(p){Zt(p instanceof Error?p.message:String(p),"error")}finally{r(!1)}},children:t?N6t():$3()}),_.jsx(FS,{content:m8t(),className:"me-2 shrink-0 text-subtext",children:_.jsx(US,{size:15})})]}),_.jsx(vn,{danger:!0,disabled:s,onClick:async()=>{i(!0);try{u(await PI()),h.setOpen(!1)}catch(p){Zt(p instanceof Error?p.message:String(p),"error")}finally{i(!1)}},children:WL()})]}),n?_.jsxs(De,{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":h.open,onClick:()=>h.setOpen(p=>!p),children:[_.jsx(Zv,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:mw({host:Ce(e.session.host)})})]}):_.jsxs("div",{className:"flex items-center gap-1.5 py-2 ps-1 pe-2.5",children:[_.jsx(It,{size:"small","aria-label":mw({host:Ce(e.session.host)}),"aria-haspopup":"menu","aria-expanded":h.open,onClick:()=>h.setOpen(p=>!p),children:_.jsx(Zv,{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:mw({host:Ce(e.session.host)})}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ce(e.session.version??"…")]})]})]})]}),c&&_.jsx(E$,{host:e.session.host,preview:c,currentClientAttached:e.session.status==="connected",stopping:a,onClose:()=>{a||u(null)},onConfirm:()=>void f()})]})}const Jv="code-source-text",fB="code-source-wrap",dB="file-view-gutter text-right text-muted select-none";function hB(e){const n=String(e).length+2;return{ruleCh:n,codeCh:n+2}}const REn={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"},MEn={containerfile:"docker",dockerfile:"docker",justfile:"makefile",makefile:"makefile"};function g5(e){const n=e.trim().toLowerCase();return REn[n]??n}function a6(e){var s;if(!e)return null;const n=((s=e.split("/").pop())==null?void 0:s.toLowerCase())??"",t=MEn[n];if(t)return g5(t);const r=n.lastIndexOf(".");return r===-1||r===n.length-1?null:g5(n.slice(r+1))}gc.displayName="clike";gc.aliases=[];function gc(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:/[{}[\];(),.:]/}}$m.displayName="c";$m.aliases=[];function $m(e){e.register(gc),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}ry.displayName="cpp";ry.aliases=[];function ry(e){e.register($m),(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)}o6.displayName="arduino";o6.aliases=["ino"];function o6(e){e.register(ry),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}c6.displayName="bash";c6.aliases=["sh","shell"];function c6(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(U,H){return"(?:"+F[+H]+")"})}function r(L,F,U){return RegExp(t(L,F),"")}function s(L,F){for(var U=0;U>/g,function(){return"(?:"+L+")"});return L.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(L){return"\\b(?:"+L.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),h=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,b=t(/<<0>>(?:\s*(?:\?\s*)?<<1>>)*(?:\s*\?)?/.source,[k,v]),y=t(/[^,()<>[\];=+\-*/%&|^]|<<0>>|<<1>>|<<2>>/.source,[f,p,v]),x=t(/\(<<0>>+(?:,<<0>>+)+\)/.source,[y]),C=t(/(?:<<0>>|<<1>>)(?:\s*(?:\?\s*)?<<2>>)*(?:\s*\?)?/.source,[x,k,v]),N={keyword:c,punctuation:/[<>()?,.:[\]]/},j=/'(?:[^\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: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,[b]),lookbehind:!0,inside:N},{pattern:r(/\b<<0>>(?=\s+(?!<<1>>|with\s*\{)<<2>>(?:\s*[=,;:{)\]]|\s+(?:in|when)\b))/.source,[C,h,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+"|"+j,D=t(/\/(?![*/])|\/\/[^\r\n]*[\r\n]|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>/.source,[M]),I=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),B=/\b(?:assembly|event|field|method|module|param|property|return|type)\b/.source,G=t(/<<0>>(?:\s*\(<<1>>*\))?/.source,[k,I]);n.languages.insertBefore("csharp","class-name",{attribute:{pattern:r(/((?:^|[^\s\w>)?])\s*\[\s*)(?:<<0>>\s*:\s*)?<<1>>(?:\s*,\s*<<1>>)*(?=\s*\])/.source,[B,G]),lookbehind:!0,greedy:!0,inside:{target:{pattern:r(/^<<0>>(?=\s*:)/.source,[B]),alias:"keyword"},"attribute-arguments":{pattern:r(/\(<<0>>*\)/.source,[I]),inside:n.languages.csharp},"class-name":{pattern:RegExp(k),inside:{punctuation:/\./}},punctuation:/[:,]/}}});var q=/:[^}\r\n]+/.source,Q=s(t(/[^"'/()]|<<0>>|\(<>*\)/.source,[D]),2),K=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Q,q]),Z=s(t(/[^"'/()]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|<<0>>|\(<>*\)/.source,[M]),2),J=t(/\{(?!\{)(?:(?![}:])<<0>>)*<<1>>?\}/.source,[Z,q]);function $(L,F){return{interpolation:{pattern:r(/((?:^|[^{])(?:\{\{)*)<<0>>/.source,[L]),lookbehind:!0,inside:{"format-string":{pattern:r(/(^\{(?:(?![}:])<<0>>)*)<<1>>(?=\}$)/.source,[F,q]),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,[J]),lookbehind:!0,greedy:!0,inside:$(J,Z)}],char:{pattern:RegExp(j),greedy:!0}}),n.languages.dotnet=n.languages.cs=n.languages.csharp})(e)}Bm.displayName="markup";Bm.aliases=["atom","html","mathml","rss","ssml","svg","xml"];function Bm(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}Yh.displayName="css";Yh.aliases=[];function Yh(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)}u6.displayName="diff";u6.aliases=[];function u6(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)}_6.displayName="go";_6.aliases=[];function _6(e){e.register(gc),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"]}f6.displayName="ini";f6.aliases=[];function f6(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:/=/}}d6.displayName="java";d6.aliases=[];function d6(e){e.register(gc),(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)}h6.displayName="regex";h6.aliases=[];function h6(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}p6.displayName="json";p6.aliases=["webmanifest"];function p6(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}m6.displayName="kotlin";m6.aliases=["kt","kts"];function m6(e){e.register(gc),(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)}g6.displayName="less";g6.aliases=[];function g6(e){e.register(Yh),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"}})}v6.displayName="lua";v6.aliases=[];function v6(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:/[\[\](){},;]|\.+|:+/}}b6.displayName="makefile";b6.aliases=[];function b6(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:/[:;(){}]/}}y6.displayName="yaml";y6.aliases=["yml"];function y6(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 h=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(h,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)}x6.displayName="markdown";x6.aliases=["md"];function x6(e){e.register(Bm),(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 h=0,f=u.length;h]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}k6.displayName="perl";k6.aliases=[];function k6(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)}ay.displayName="markup-templating";ay.aliases=[];function ay(e){e.register(Bm),(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,h;r.code.indexOf(h=t(s,u))!==-1;)++u;return o[u]=c,h}),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 h=c[u];if(typeof h=="string"||h.content&&typeof h.content=="string"){var f=a[i],p=r.tokenStack[f],m=typeof h=="string"?h:h.content,w=t(s,f),k=m.indexOf(w);if(k>-1){++i;var v=m.substring(0,k),b=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),y=m.substring(k+w.length),x=[];v&&x.push.apply(x,o([v])),x.push(b),y&&x.push.apply(x,o([y])),typeof h=="string"?c.splice.apply(c,[u,1].concat(x)):h.content=x}}else h.content&&o(h.content)}return c}o(r.tokens)}}})})(e)}S6.displayName="php";S6.aliases=[];function S6(e){e.register(ay),(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 h=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",h)}}),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(gc),(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)}j6.displayName="sass";j6.aliases=[];function j6(e){e.register(Yh),(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)}A6.displayName="scss";A6.aliases=[];function A6(e){e.register(Yh),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}T6.displayName="sql";T6.aliases=[];function T6(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:/[;[\]()`,.]/}}R6.displayName="swift";R6.aliases=[];function R6(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})}M6.displayName="typescript";M6.aliases=["ts"];function M6(e){e.register(iy),(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)}oy.displayName="basic";oy.aliases=[];function oy(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:/[,;:()]/}}O6.displayName="vbnet";O6.aliases=[];function O6(e){e.register(oy),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 Pm{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Pm.prototype.normal={};Pm.prototype.property={};Pm.prototype.space=void 0;function pB(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new Pm(t,r,n)}function U0(e){return e.toLowerCase()}class Vi{constructor(n,t){this.attribute=t,this.property=n}}Vi.prototype.attribute="";Vi.prototype.booleanish=!1;Vi.prototype.boolean=!1;Vi.prototype.commaOrSpaceSeparated=!1;Vi.prototype.commaSeparated=!1;Vi.prototype.defined=!1;Vi.prototype.mustUseProperty=!1;Vi.prototype.number=!1;Vi.prototype.overloadedBoolean=!1;Vi.prototype.property="";Vi.prototype.spaceSeparated=!1;Vi.prototype.space=void 0;let Q9n=0;const tn=Lf(),fs=Lf(),b5=Lf(),Ze=Lf(),yr=Lf(),sf=Lf(),ca=Lf();function Lf(){return 2**++Q9n}const y5=Object.freeze(Object.defineProperty({__proto__:null,boolean:tn,booleanish:fs,commaOrSpaceSeparated:ca,commaSeparated:sf,number:Ze,overloadedBoolean:b5,spaceSeparated:yr},Symbol.toStringTag,{value:"Module"})),Mw=Object.keys(y5);class D6 extends Vi{constructor(n,t,r,s){let i=-1;if(super(n,t),pA(this,"space",s),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&eEn.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(mA,nEn);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!mA.test(i)){let a=i.replace(J9n,tEn);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=D6}return new s(r,n)}function tEn(e){return"-"+e.toLowerCase()}function nEn(e){return e.charAt(1).toUpperCase()}const kB=pB([mB,X9n,bB,yB,xB],"html"),cy=pB([mB,Y9n,bB,yB,xB],"svg");function gA(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 rEn(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const vA=/[#.]/g;function sEn(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function dEn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function hEn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function wA(e){return hEn(e)||EB(e)}const kA=document.createElement("i");function G0(e){const n="&"+e+";";kA.innerHTML=n;const t=kA.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const pEn=["","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 mEn(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 h=(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 b=e.charCodeAt(i+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){o+=String.fromCharCode(m),f++;continue}const y=i+1;let x=y,C=y,N;if(b===35){C=++x;const G=e.charCodeAt(C);G===88||G===120?(N="hexadecimal",C=++x):N="decimal"}else N="named";let j="",A="",z="";const M=N==="named"?wA:N==="decimal"?EB:dEn;for(C--;++C<=e.length;){const G=e.charCodeAt(C);if(!M(G))break;z+=String.fromCharCode(G),N==="named"&&fEn.includes(z)&&(j=z,A=G0(z))}let D=e.charCodeAt(C)===59;if(D){C++;const G=N==="named"?G0(z):!1;G&&(j=z,A=G)}let I=1+C-y,B="";if(!(!D&&t.nonTerminated===!1))if(!z)N!=="named"&&k(4,I);else if(N==="named"){if(D&&!A)k(5,1);else if(j!==z&&(C=x+j.length,I=1+C-x,D=!1),!D){const G=j?1:3;if(t.attribute){const U=e.charCodeAt(C);U===61?(k(G,I),A=""):wA(U)?A="":k(G,I)}else k(G,I)}B=A}else{D||k(2,I);let G=Number.parseInt(z,N==="hexadecimal"?16:10);if(gEn(G))k(7,I),B="�";else if(G in xA)k(6,I),B=xA[G];else{let U="";vEn(G)&&k(6,I),G>65535&&(G-=65536,U+=String.fromCharCode(G>>>10|55296),G=56320|G&1023),B=U+String.fromCharCode(G)}}if(B){v(),p=w(),i=C-1,f+=C-y+1,s.push(B);const G=w();G.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,B,{start:p,end:G},e.slice(y-1,C)),p=G}else z=e.slice(y-1,C),o+=z,f+=z.length,i=C-1}else m===10&&(h++,a++,f=0),Number.isNaN(m)?v():(o+=String.fromCharCode(m),f++);return s.join("");function w(){return{line:h,column:f,offset:i+((c?c.offset:0)||0)}}function k(b,y){let x;t.warning&&(x=w(),x.column+=y,x.offset+=y,t.warning.call(t.warningContext||void 0,pEn[b],x,b))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:w()}),o="")}}function gEn(e){return e>=55296&&e<=57343||e>1114111}function vEn(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 bEn=0,v1={},Os={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++bEn}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Os.util.type(n)){case"Object":if(s=Os.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=Os.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:v1,plaintext:v1,text:v1,txt:v1,extend:function(e,n){var t=Os.util.clone(Os.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Os.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,Os.languages.DFS(Os.languages,function(u,h){h===c&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=Os.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],c=Os.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(Os.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Os.tokenize(r.code,r.grammar),Os.hooks.run("after-tokenize",r),x0.stringify(Os.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 yEn;return cv(s,s.head,e),NB(e,s,n,s.head,0),wEn(s)},hooks:{all:{},add:function(e,n){var t=Os.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Os.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:x0};function x0(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function SA(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 NB(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);b+=v.value.length,v=v.next){var y=v.value;if(n.length>e.length)return;if(!(y instanceof x0)){var x=1,C;if(p){if(C=SA(k,b,e,f),!C||C.index>=e.length)break;var z=C.index,N=C.index+C[0].length,j=b;for(j+=v.value.length;z>=j;)v=v.next,j+=v.value.length;if(j-=v.value.length,b=j,v.value instanceof x0)continue;for(var A=v;A!==n.tail&&(ji.reach&&(i.reach=B);var G=v.prev;D&&(G=cv(n,G,D),b+=D.length),xEn(n,G,x);var U=new x0(a,h?Os.tokenize(M,h):M,m,M);if(v=cv(n,G,U),I&&cv(n,v,I),x>1){var Q={cause:a+","+c,reach:B};NB(e,n,t,v.prev,b,Q),i&&Q.reach>i.reach&&(i.reach=Q.reach)}}}}}}function yEn(){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 cv(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 xEn(e,n,t){for(var r=n.next,s=0;st)return null;try{return $t.highlight(e,n).children}catch{return null}}function TB(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(TB)},n)}function AEn(e,n,t=3e5){var r;return((r=AB(e,n,t))==null?void 0:r.map(TB))??e}function RB(e,n,t=3e5){const r=AB(e,n,t);if(!r)return e.split(` +|(?![\\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)}_6.displayName="go";_6.aliases=[];function _6(e){e.register(gc),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"]}f6.displayName="ini";f6.aliases=[];function f6(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:/=/}}d6.displayName="java";d6.aliases=[];function d6(e){e.register(gc),(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)}h6.displayName="regex";h6.aliases=[];function h6(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}p6.displayName="json";p6.aliases=["webmanifest"];function p6(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}m6.displayName="kotlin";m6.aliases=["kt","kts"];function m6(e){e.register(gc),(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)}g6.displayName="less";g6.aliases=[];function g6(e){e.register(Yh),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"}})}v6.displayName="lua";v6.aliases=[];function v6(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:/[\[\](){},;]|\.+|:+/}}b6.displayName="makefile";b6.aliases=[];function b6(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:/[:;(){}]/}}y6.displayName="yaml";y6.aliases=["yml"];function y6(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 h=/([:\-,[{]\s*(?:\s<>[ \t]+)?)(?:<>)(?=[ \t]*(?:$|,|\]|\}|(?:[\r\n]\s*)?#))/.source.replace(/<>/g,function(){return s}).replace(/<>/g,function(){return c});return RegExp(h,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)}x6.displayName="markdown";x6.aliases=["md"];function x6(e){e.register(Bm),(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 h=0,f=u.length;h]?|\+\+?|!=?|<>?=?|==?|&&?|\|\|?|[~^%?*\/@]/}),delete e.languages.objectivec["class-name"],e.languages.objc=e.languages.objectivec}k6.displayName="perl";k6.aliases=[];function k6(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)}iy.displayName="markup-templating";iy.aliases=[];function iy(e){e.register(Bm),(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,h;r.code.indexOf(h=t(s,u))!==-1;)++u;return o[u]=c,h}),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 h=c[u];if(typeof h=="string"||h.content&&typeof h.content=="string"){var f=a[i],p=r.tokenStack[f],m=typeof h=="string"?h:h.content,w=t(s,f),k=m.indexOf(w);if(k>-1){++i;var v=m.substring(0,k),b=new n.Token(s,n.tokenize(p,r.grammar),"language-"+s,p),y=m.substring(k+w.length),x=[];v&&x.push.apply(x,o([v])),x.push(b),y&&x.push.apply(x,o([y])),typeof h=="string"?c.splice.apply(c,[u,1].concat(x)):h.content=x}}else h.content&&o(h.content)}return c}o(r.tokens)}}})})(e)}S6.displayName="php";S6.aliases=[];function S6(e){e.register(iy),(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 h=/<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g;n.languages["markup-templating"].buildPlaceholders(u,"php",h)}}),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(gc),(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)}j6.displayName="sass";j6.aliases=[];function j6(e){e.register(Yh),(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)}A6.displayName="scss";A6.aliases=[];function A6(e){e.register(Yh),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}T6.displayName="sql";T6.aliases=[];function T6(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:/[;[\]()`,.]/}}R6.displayName="swift";R6.aliases=[];function R6(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})}M6.displayName="typescript";M6.aliases=["ts"];function M6(e){e.register(sy),(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)}ay.displayName="basic";ay.aliases=[];function ay(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:/[,;:()]/}}O6.displayName="vbnet";O6.aliases=[];function O6(e){e.register(ay),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 Pm{constructor(n,t,r){this.normal=t,this.property=n,r&&(this.space=r)}}Pm.prototype.normal={};Pm.prototype.property={};Pm.prototype.space=void 0;function pB(e,n){const t={},r={};for(const s of e)Object.assign(t,s.property),Object.assign(r,s.normal);return new Pm(t,r,n)}function U0(e){return e.toLowerCase()}class Ki{constructor(n,t){this.attribute=t,this.property=n}}Ki.prototype.attribute="";Ki.prototype.booleanish=!1;Ki.prototype.boolean=!1;Ki.prototype.commaOrSpaceSeparated=!1;Ki.prototype.commaSeparated=!1;Ki.prototype.defined=!1;Ki.prototype.mustUseProperty=!1;Ki.prototype.number=!1;Ki.prototype.overloadedBoolean=!1;Ki.prototype.property="";Ki.prototype.spaceSeparated=!1;Ki.prototype.space=void 0;let OEn=0;const tn=Lf(),ds=Lf(),v5=Lf(),Ze=Lf(),yr=Lf(),af=Lf(),ca=Lf();function Lf(){return 2**++OEn}const b5=Object.freeze(Object.defineProperty({__proto__:null,boolean:tn,booleanish:ds,commaOrSpaceSeparated:ca,commaSeparated:af,number:Ze,overloadedBoolean:v5,spaceSeparated:yr},Symbol.toStringTag,{value:"Module"})),Rw=Object.keys(b5);class D6 extends Ki{constructor(n,t,r,s){let i=-1;if(super(n,t),mA(this,"space",s),typeof r=="number")for(;++i4&&t.slice(0,4)==="data"&&BEn.test(n)){if(n.charAt(4)==="-"){const i=n.slice(5).replace(gA,FEn);r="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{const i=n.slice(4);if(!gA.test(i)){let a=i.replace($En,PEn);a.charAt(0)!=="-"&&(a="-"+a),n="data"+a}}s=D6}return new s(r,n)}function PEn(e){return"-"+e.toLowerCase()}function FEn(e){return e.charAt(1).toUpperCase()}const kB=pB([mB,DEn,bB,yB,xB],"html"),oy=pB([mB,LEn,bB,yB,xB],"svg");function vA(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 HEn(e,n){const t={};return(e[e.length-1]===""?[...e,""]:e).join((t.padRight?" ":"")+","+(t.padLeft===!1?"":" ")).trim()}const bA=/[#.]/g;function qEn(e,n){const t=e||"",r={};let s=0,i,a;for(;s=48&&n<=57}function ZEn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=102||n>=65&&n<=70||n>=48&&n<=57}function JEn(e){const n=typeof e=="string"?e.charCodeAt(0):e;return n>=97&&n<=122||n>=65&&n<=90}function kA(e){return JEn(e)||EB(e)}const SA=document.createElement("i");function G0(e){const n="&"+e+";";SA.innerHTML=n;const t=SA.textContent;return t.charCodeAt(t.length-1)===59&&e!=="semi"||t===n?!1:t}const eNn=["","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 tNn(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 h=(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 b=e.charCodeAt(i+1);if(b===9||b===10||b===12||b===32||b===38||b===60||Number.isNaN(b)||r&&b===r){o+=String.fromCharCode(m),f++;continue}const y=i+1;let x=y,C=y,N;if(b===35){C=++x;const G=e.charCodeAt(C);G===88||G===120?(N="hexadecimal",C=++x):N="decimal"}else N="named";let j="",A="",z="";const M=N==="named"?kA:N==="decimal"?EB:ZEn;for(C--;++C<=e.length;){const G=e.charCodeAt(C);if(!M(G))break;z+=String.fromCharCode(G),N==="named"&&YEn.includes(z)&&(j=z,A=G0(z))}let D=e.charCodeAt(C)===59;if(D){C++;const G=N==="named"?G0(z):!1;G&&(j=z,A=G)}let I=1+C-y,B="";if(!(!D&&t.nonTerminated===!1))if(!z)N!=="named"&&k(4,I);else if(N==="named"){if(D&&!A)k(5,1);else if(j!==z&&(C=x+j.length,I=1+C-x,D=!1),!D){const G=j?1:3;if(t.attribute){const q=e.charCodeAt(C);q===61?(k(G,I),A=""):kA(q)?A="":k(G,I)}else k(G,I)}B=A}else{D||k(2,I);let G=Number.parseInt(z,N==="hexadecimal"?16:10);if(nNn(G))k(7,I),B="�";else if(G in wA)k(6,I),B=wA[G];else{let q="";rNn(G)&&k(6,I),G>65535&&(G-=65536,q+=String.fromCharCode(G>>>10|55296),G=56320|G&1023),B=q+String.fromCharCode(G)}}if(B){v(),p=w(),i=C-1,f+=C-y+1,s.push(B);const G=w();G.offset++,t.reference&&t.reference.call(t.referenceContext||void 0,B,{start:p,end:G},e.slice(y-1,C)),p=G}else z=e.slice(y-1,C),o+=z,f+=z.length,i=C-1}else m===10&&(h++,a++,f=0),Number.isNaN(m)?v():(o+=String.fromCharCode(m),f++);return s.join("");function w(){return{line:h,column:f,offset:i+((c?c.offset:0)||0)}}function k(b,y){let x;t.warning&&(x=w(),x.column+=y,x.offset+=y,t.warning.call(t.warningContext||void 0,eNn[b],x,b))}function v(){o&&(s.push(o),t.text&&t.text.call(t.textContext||void 0,o,{start:p,end:w()}),o="")}}function nNn(e){return e>=55296&&e<=57343||e>1114111}function rNn(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 sNn=0,v1={},Ds={util:{type:function(e){return Object.prototype.toString.call(e).slice(8,-1)},objId:function(e){return e.__id||Object.defineProperty(e,"__id",{value:++sNn}),e.__id},clone:function e(n,t){t=t||{};var r,s;switch(Ds.util.type(n)){case"Object":if(s=Ds.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=Ds.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:v1,plaintext:v1,text:v1,txt:v1,extend:function(e,n){var t=Ds.util.clone(Ds.languages[e]);for(var r in n)t[r]=n[r];return t},insertBefore:function(e,n,t,r){r=r||Ds.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,Ds.languages.DFS(Ds.languages,function(u,h){h===c&&u!=e&&(this[u]=i)}),i},DFS:function e(n,t,r,s){s=s||{};var i=Ds.util.objId;for(var a in n)if(n.hasOwnProperty(a)){t.call(n,a,n[a],r||a);var o=n[a],c=Ds.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(Ds.hooks.run("before-tokenize",r),!r.grammar)throw new Error('The language "'+r.language+'" has no grammar.');return r.tokens=Ds.tokenize(r.code,r.grammar),Ds.hooks.run("after-tokenize",r),x0.stringify(Ds.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 iNn;return cv(s,s.head,e),NB(e,s,n,s.head,0),oNn(s)},hooks:{all:{},add:function(e,n){var t=Ds.hooks.all;t[e]=t[e]||[],t[e].push(n)},run:function(e,n){var t=Ds.hooks.all[e];if(!(!t||!t.length))for(var r=0,s;s=t[r++];)s(n)}},Token:x0};function x0(e,n,t,r){this.type=e,this.content=n,this.alias=t,this.length=(r||"").length|0}function CA(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 NB(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);b+=v.value.length,v=v.next){var y=v.value;if(n.length>e.length)return;if(!(y instanceof x0)){var x=1,C;if(p){if(C=CA(k,b,e,f),!C||C.index>=e.length)break;var z=C.index,N=C.index+C[0].length,j=b;for(j+=v.value.length;z>=j;)v=v.next,j+=v.value.length;if(j-=v.value.length,b=j,v.value instanceof x0)continue;for(var A=v;A!==n.tail&&(ji.reach&&(i.reach=B);var G=v.prev;D&&(G=cv(n,G,D),b+=D.length),aNn(n,G,x);var q=new x0(a,h?Ds.tokenize(M,h):M,m,M);if(v=cv(n,G,q),I&&cv(n,v,I),x>1){var Q={cause:a+","+c,reach:B};NB(e,n,t,v.prev,b,Q),i&&Q.reach>i.reach&&(i.reach=Q.reach)}}}}}}function iNn(){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 cv(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 aNn(e,n,t){for(var r=n.next,s=0;st)return null;try{return $t.highlight(e,n).children}catch{return null}}function TB(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(TB)},n)}function pNn(e,n,t=3e5){var r;return((r=AB(e,n,t))==null?void 0:r.map(TB))??e}function RB(e,n,t=3e5){const r=AB(e,n,t);if(!r)return e.split(` `);const s=[];let i=[];const a=[];let o=0;const c=h=>{let f=h;for(let p=a.length-1;p>=0;p--)f=_.jsx("span",{className:a[p],children:f},o++);i.push(f)},u=h=>{var f;if(h.type==="text"){(h.value??"").split(` `).forEach((p,m)=>{m>0&&(s.push(i),i=[]),p&&c(p)});return}h.type==="element"&&(a.push((((f=h.properties)==null?void 0:f.className)??[]).join(" ")),(h.children??[]).forEach(u),a.pop())};return r.forEach(u),s.push(i),s}function MB(e){return Array.isArray(e)?e.length===0:e===""}function OB({value:e,onChange:n,onSave:t,onBlur:r,readOnly:s=!1,path:i,highlightLine:a,scrollRequest:o,onScrollRequestHandled:c,scrollPosition:u,onScrollPositionChange:h}){const f=T.useMemo(()=>RB(e,a6(i)),[e,i]),{ruleCh:p,codeCh:m}=hB(f.length),w=T.useRef(null),k=T.useRef(null),v=()=>{const C=w.current;C&&k.current&&(k.current.scrollTop=C.scrollTop)},b=T.useRef(u);T.useLayoutEffect(()=>{const C=w.current;!C||!b.current||(C.scrollTop=b.current.top,C.scrollLeft=b.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(` -`),j=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:j,selectionEnd:A}=N,z=e.slice(0,j)+" "+e.slice(A);n(z),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=j+1})}}},x=`absolute inset-0 m-0 py-3.5 pe-4 ${Jv} ${fB} [scrollbar-gutter:stable]`;return _.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Jv}`,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 ${x} 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:`${dB} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),MB(C)?_.jsx("br",{}):C]},N))}),_.jsx("textarea",{ref:w,className:`file-view-editarea ${x} 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(),h==null||h({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:y,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function DB({onClose:e,onSaved:n}){const t=Pkn(),r=ut(t),[s,i]=T.useState(()=>r.data??null),[a,o]=T.useState(()=>{var x;return((x=r.data)==null?void 0:x.content)??""}),c=!s&&r.error?r.error.message:null,u=pn({mutationFn:({content:x,previous:C})=>m5n(x,C)}),[h,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(h);k.current=w,v.current=h,m.current=e,T.useEffect(()=>{!r.data||k.current||v.current||(i(r.data),o(r.data.content))},[r.data]);const b=()=>{v.current||k.current&&!window.confirm(qfn())||m.current()};Dm(p,b,"textarea");async function y(){if(!(!s||!w||h)){f(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!zn(t.queryKey))return;Vr(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),Zt(rdn(),"success")}catch(x){Zt(x instanceof Error?x.message:String(x),"error")}finally{f(!1)}}}return si.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:x=>{x.target===x.currentTarget&&b()},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:udn()}),_.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),_.jsx(It,{className:"absolute end-3.5 top-3.5","aria-label":Lfn(),onClick:b,disabled:h,children:_.jsx(xr,{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(St,{})," ",Xfn()]}):_.jsx(OB,{value:a,onChange:o,onSave:()=>void y(),path:s.path})}),_.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[_.jsx(Ie,{onClick:b,disabled:h,children:ff()}),_.jsx(Ie,{variant:"primary",onClick:()=>void y(),disabled:!w||h,children:h?Sa():pc()})]})]})}),document.body)}function LB({runtime:e,corner:n=!1}){const[t,r]=T.useState(null);return e.kind==="ssh"?_.jsx(g5,{runtime:e,corner:n}):_.jsxs(_.Fragment,{children:[n?_.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:_.jsxs(Ie,{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:$3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:[_.jsx(Zv,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:$v()})]})}):_.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(It,{size:"small","aria-label":$3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:_.jsx(Zv,{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:$v()}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ce(e.version)]})]})]})}),t==="hosts"&&_.jsx($9n,{onClose:()=>r(null),onConfigureSsh:()=>r("config")}),t==="config"&&_.jsx(DB,{onClose:()=>r("hosts")})]})}function I6(e=!0){var r;const n=Uv(),t=ut({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>Vr(n.queryKey,s)}}const TEn=6e4,REn=500,IB=e=>`https://github.com/alphaXiv/OpenResearch/releases/tag/${e.split("/").map(encodeURIComponent).join("/")}`;function $B(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=Uv(),u=()=>i.current||!zn(c.queryKey);t(!0),s(null),(async()=>{try{if(await J3n(),u())return;const h=Date.now()+TEn;for(;Date.now()setTimeout(p,REn)),u())return;const f=await tt.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(f&&f.instance!==a){window.location.reload();return}}throw new Error($yn())}catch(h){if(u())return;s(h instanceof Error?h.message:String(h)),t(!1)}})()}}}function BB({status:e}){const[n,t]=T.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=$B(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(Va,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),_.jsx("span",{className:"min-w-0",children:i?jI({error:i}):fyn({version:Ce(r)})}),(e==null?void 0:e.installedTag)&&_.jsx("a",{href:IB(e.installedTag),target:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:gI()}),(e==null?void 0:e.canRestart)&&_.jsx(Ie,{type:"button",size:"small",disabled:s,onClick:a,children:s?AI():zI()}),_.jsx(It,{type:"button",size:"small",className:"ms-auto","aria-label":byn(),disabled:s,onClick:()=>t(r),children:_.jsx(xr,{size:13})})]})}function $6(){return _.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:_.jsx(St,{})})}function MEn(){return _.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[_.jsx("p",{children:fo()}),_.jsx(Bb,{to:"/projects",children:v0()})]})}function B6({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(Ie,{onClick:n,children:ni()}),_.jsx(Bb,{to:"/projects",children:v0()})]})}function PB({projectId:e}){const{queryClient:n}=dS({from:"__root__"}),t=$b(),[r,s]=T.useState(null),[i,a]=T.useState(0);return T.useEffect(()=>{let o=!0;return s(null),(e?s9n(e,n):r9n(n)).then(c=>{o&&t({href:c,replace:!0})}).catch(c=>{o&&(LV(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{o=!1}},[e,i,t,n]),r?_.jsx(B6,{error:r,reset:()=>a(o=>o+1)}):_.jsx($6,{})}function OEn(){return _.jsx(PB,{})}function DEn({projectId:e}){return _.jsx(PB,{projectId:e})}function LEn(){const e=tB(),n=$b(),t=zh(),r=ut(t),s=ut(Om()),i=r.data,a=s.data,o=(i==null?void 0:i.length)===0&&(a==null?void 0:a.onboardingCompleted)===!1,c=r.error??s.error,u=()=>{r.refetch(),s.refetch()},{status:h}=I6(e.kind==="local");T.useEffect(()=>{document.title="OpenResearch",a&&ey.queue({...JS()??a.workspace??{railOpen:!0,panelWidth:sB(),experimentsView:"table"},lastLocation:"/projects"})},[a]);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(cB,{}),_.jsx(BB,{status:h})]}),c&&(!i||!a)?_.jsx(B6,{error:c,reset:u}):!i||!a?_.jsx($6,{}):o?_.jsx(g9n,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{n9n(),f(p.id)}}):_.jsx(I9n,{remote:e.kind==="ssh",projects:i,onOpen:f,onCreated:(p,m)=>{m?(Zt(m,"error"),n({to:"/projects/$projectId/settings/$tab",params:{projectId:p.id,tab:"git"}})):f(p.id)},onDeleted:p=>Vr(t.queryKey,m=>m==null?void 0:m.filter(w=>w.id!==p))}),(e.kind==="ssh"||i&&a&&!o)&&_.jsx(LB,{runtime:e,corner:!0})]})}const IEn=hc()({component:OEn}),$En=hc()({component:O0}),BEn=hc()({}),PEn=hc()({component:LEn});function k5(e,n,t){return e.source==="checkout"?{path:e.file.path,source:"repo",sessionId:e.file.root==="worktree"?n:void 0,ref:e.file.root==="branch"?t:void 0}:{path:e.file.path,source:e.source==="artifact"?"artifacts":"abs"}}function FB(e,n){const t=e.map(s=>({...s,children:s.children?FB(s.children,[]):void 0}));for(const s of n){const i=s.path.split("/");let a=t;for(let o=0;oh.path===c);if(o===i.length-1)u||a.push({...s});else{const h=u??{path:c,name:i[o],isDir:!0,size:0,modifiedAt:0,children:[]};u||a.push(h),h.children??(h.children=[]),a=h.children}}}const r=s=>{s.sort((i,a)=>Number(a.isDir)-Number(i.isDir)||i.name.localeCompare(a.name)),s.forEach(i=>{i.children&&r(i.children)})};return r(t),t}const FEn=e=>({queryKey:kt("getRunDiff",e),queryFn:({signal:n})=>w3n(e,n),staleTime:3e4}),HB=e=>({queryKey:kt("getExperimentDiff",e),queryFn:({signal:n})=>k3n(e,n),staleTime:3e4}),eb=(e,n,t={})=>({queryKey:kt("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>S3n(e,n,t,r),staleTime:t.ref?Nh(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),qB=e=>({queryKey:kt("getAbsoluteFile",e),queryFn:({signal:n})=>C3n(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),UB=(e,n={})=>({queryKey:kt("getCodeTree",e,{...n}),queryFn:({signal:t})=>G3n(e,n,t),staleTime:n.ref&&Nh(n.ref)?1/0:3e4}),tb=e=>({queryKey:kt("getSessionWorktree",e),queryFn:({signal:n})=>K3n(e,n),staleTime:3e4}),HEn=e=>({queryKey:kt("getArtifacts",e),queryFn:({signal:n})=>M5n(e,n),staleTime:3e4}),P6=(e,n)=>({queryKey:kt("getFileLocation",e,n),queryFn:({signal:t})=>j3n(e,n,t),staleTime:0}),qEn=(e,n)=>({queryKey:kt("searchArtifacts",e,n),queryFn:({signal:t,pageParam:r})=>A3n(e,n,r,t),initialPageParam:void 0,getNextPageParam:t=>t.nextCursor??void 0,staleTime:5e3}),F6=(e,n)=>({queryKey:kt("getArtifactFileText",e,n),queryFn:({signal:t})=>I5n(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),GB=(e,n)=>({queryKey:kt("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>B5n(e,n,t),staleTime:2e3}),UEn=()=>({queryKey:kt("getLatexEngine"),queryFn:({signal:e})=>T3n(e),staleTime:3e5}),GEn=()=>({queryKey:kt("getOverleafSettings"),queryFn:({signal:e})=>M3n(e),staleTime:3e5}),KEn=(e,n,t={})=>({queryKey:kt("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>B3n(e,n,t,r),staleTime:3e5}),VEn=(e,n,t={})=>({queryKey:kt("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>q3n(e,n,t,r),staleTime:3e4}),H6=(e,n,t,r,s)=>({queryKey:kt("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!Nh(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",h=async()=>{const m=await o(GB(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(eb(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(w&&!w.notFound)return w}return null},p=await(c?o(qB(n)).then(m=>({source:"absolute",file:m})):u?h().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(eb(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?h().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 WEn(e,n,t,r,s){if(Nh(s))return;const i=H6(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[qB(n).queryKey]:[eb(e,n,{sessionId:r,ref:s}).queryKey,eb(e,`artifacts/${n}`,{sessionId:r}).queryKey,F6(e,n).queryKey,GB(e,n).queryKey]];await Promise.all(a.map(o=>tt.cancelQueries({queryKey:o,exact:!0}))),await Promise.all(a.map(o=>tt.invalidateQueries({queryKey:o,exact:!0,refetchType:"none"}))),await tt.invalidateQueries({queryKey:i.queryKey,exact:!0})}function QEn(e,n){ly(n?`${e.replace(/[\\/]+$/,"")}/${n}`:e)}function ly(e){const n=navigator.clipboard;if(!n){typeof e!="string"&&e.catch(()=>{}),Zt(kL(),"error");return}(typeof e=="string"?n.writeText(e):typeof ClipboardItem<"u"&&n.write?n.write([new ClipboardItem({"text/plain":e.then(r=>new Blob([r],{type:"text/plain"}))})]):e.then(r=>n.writeText(r))).then(()=>Zt(uf(),"success")).catch(r=>Zt(r instanceof Error?r.message:String(r),"error"))}function KB({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(Br,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":yFe({path:Ce(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 q6(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 U6({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onReveal:a,pathStatus:o,copyLabel:c,openLabel:u,onClose:h}){const f=T.useRef(null),p=T.useRef(h);p.current=h;const[m,w]=T.useState({x:e.x,y:e.y});T.useLayoutEffect(()=>{var N;const b=f.current;if(!b)return;const y=document.activeElement instanceof HTMLElement?document.activeElement:null,x=()=>w({x:Math.max(8,Math.min(e.x,window.innerWidth-b.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-b.offsetHeight-8))});x();const C=new ResizeObserver(x);return C.observe(b),(N=b.querySelector("button"))==null||N.focus(),()=>{C.disconnect(),b.contains(document.activeElement)&&(y==null||y.focus())}},[e]),T.useEffect(()=>{const b=()=>p.current(),y=C=>{var N;(N=f.current)!=null&&N.contains(C.target instanceof Node?C.target:null)||p.current()},x=C=>{if(C.key==="Tab"){C.preventDefault(),p.current();return}C.key==="Escape"&&(C.preventDefault(),C.stopPropagation(),p.current())};return document.addEventListener("pointerdown",y),window.addEventListener("blur",b),window.addEventListener("resize",b),window.addEventListener("scroll",b,!0),document.addEventListener("keydown",x,!0),()=>{document.removeEventListener("pointerdown",y),window.removeEventListener("blur",b),window.removeEventListener("resize",b),window.removeEventListener("scroll",b,!0),document.removeEventListener("keydown",x,!0)}},[]);const k=b=>{p.current(),b()},v=(b,y,x=!1)=>_.jsx(vn,{size:"compact",role:"menuitem",danger:x,onClick:()=>k(y),children:_.jsx("span",{children:b})});return si.createPortal(_.jsxs("div",{ref:f,role:"menu","aria-label":aFe({path:Ce(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:m.x,top:m.y},onContextMenu:b=>b.preventDefault(),onKeyDown:b=>{var N,j;if(b.key!=="ArrowDown"&&b.key!=="ArrowUp")return;b.preventDefault();const y=[...((N=f.current)==null?void 0:N.querySelectorAll("button"))??[]],x=y.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:y[0]),C=b.key==="ArrowDown"?1:-1;(j=y[(x+C+y.length)%y.length])==null||j.focus()},children:[o&&_.jsx("p",{role:"status",className:"m-0 max-w-80 break-all px-2 py-1 text-xs text-subtext",dir:"auto",children:o}),n&&v(u??dFe(),n),t&&v(fL(),t),r&&v(JPe(),r),s&&v(c??jde(),s),a&&v(R3(),a),i&&v(_L(),i,!0)]}),document.body)}const uy=T.createContext(null),VB=T.createContext(null);function XEn(e,n){const t=T.useContext(VB),r=T.useContext(uy),[s,i]=T.useState(null),a=o=>{t&&(o.preventDefault(),o.stopPropagation(),i(q6(o,e)))};return{handlers:t?{onContextMenu:a,onKeyDown:o=>{(o.key==="ContextMenu"||o.shiftKey&&o.key==="F10")&&a(o)}}:{},menu:s&&t?{target:s,context:t,request:t.resolve(e,r,n),onClose:()=>i(null)}:null}}function YEn({target:e,context:n,request:t,onClose:r,onOpen:s}){var p,m,w;const i=yi(),a=ut({...H6(n.projectId,(t==null?void 0:t.path)??"",(t==null?void 0:t.source)??"repo",t==null?void 0:t.sessionId,t==null?void 0:t.ref),enabled:t!==null}),o=a.data,c=o?k5(o,t==null?void 0:t.sessionId,t==null?void 0:t.ref):t,u=ut({...P6(n.projectId,c??{path:"",source:"repo"}),enabled:!!o&&!o.file.notFound&&!a.isFetching}),h=!a.isFetching&&!u.isFetching&&!a.isError&&!u.isError&&!(o!=null&&o.file.notFound)?(p=u.data)==null?void 0:p.absolutePath:null,f=!t||o!=null&&o.file.notFound?Lv():((m=a.error)==null?void 0:m.message)??((w=u.error)==null?void 0:w.message)??(h?n.remote?xL({path:Ce(h)}):Ce(h):t.ref?wS({branch:Ce(t.ref)}):wL());return _.jsx(U6,{target:e,openLabel:xPe(),copyLabel:T3(),onOpen:s,pathStatus:f,onCopyPath:h?()=>{zn(i)&&ly(h)}:void 0,onReveal:h&&!n.remote&&c?()=>{zn(i)&&MS(n.projectId,c.path,c).catch(k=>Zt(k instanceof Error?k.message:String(k),"error"))}:void 0,onClose:r})}function ZEn(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 CA={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 JEn(e){return CA[e]??CA.idle}const eNn={done:kI,failed:Thn,running:Ghn,starting:Zhn,cancelling:_hn,cancelled:shn,editing:Shn,idle:$hn};function G6(e){const n=eNn[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function ml({status:e,label:n,className:t}){const r=JEn(e);return _.jsx(Yd,{tone:r.tone,live:r.live,className:t,children:n??G6(e)})}const vf={local:yL,tinker:iOe,hf:sMe,modal:SMe,k8s:_Me,ssh:ZMe,slurm:GMe,ray:$Me,openresearch:TMe};function EA(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 nr(e){for(var n=1;n=0||(h[c]=a[c]);return h})(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 In(e,n){return QB(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=[],h=!0,f=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;h=!1}else for(;!(h=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);h=!0);}catch(p){f=!0,a=p}finally{try{if(!h&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(f)throw a}}return u}})(e,n)||_y(e,n)||YB()}function WB(e){return QB(e)||XB(e)||_y(e)||YB()}function ma(e){return(function(n){if(Array.isArray(n))return C5(n)})(e)||XB(e)||_y(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 QB(e){if(Array.isArray(e))return e}function XB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function _y(e,n){if(e){if(typeof e=="string")return C5(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)?C5(e,n):void 0}}function C5(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. +`),j=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:j,selectionEnd:A}=N,z=e.slice(0,j)+" "+e.slice(A);n(z),requestAnimationFrame(()=>{N.selectionStart=N.selectionEnd=j+1})}}},x=`absolute inset-0 m-0 py-3.5 pe-4 ${Jv} ${fB} [scrollbar-gutter:stable]`;return _.jsxs("div",{className:`file-view-editwrap relative h-full min-h-0 ${Jv}`,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 ${x} 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:`${dB} absolute start-0 pe-[1ch]`,style:{width:`${p}ch`},children:N+1}),MB(C)?_.jsx("br",{}):C]},N))}),_.jsx("textarea",{ref:w,className:`file-view-editarea ${x} 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(),h==null||h({top:Math.max(0,C.currentTarget.scrollTop),left:Math.max(0,C.currentTarget.scrollLeft)})},onKeyDown:y,onBlur:s?void 0:r,readOnly:s,spellCheck:!1,autoComplete:"off",autoCorrect:"off",autoCapitalize:"off"})]})}function DB({onClose:e,onSaved:n}){const t=CSn(),r=ut(t),[s,i]=T.useState(()=>r.data??null),[a,o]=T.useState(()=>{var x;return((x=r.data)==null?void 0:x.content)??""}),c=!s&&r.error?r.error.message:null,u=pn({mutationFn:({content:x,previous:C})=>tkn(x,C)}),[h,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(h);k.current=w,v.current=h,m.current=e,T.useEffect(()=>{!r.data||k.current||v.current||(i(r.data),o(r.data.content))},[r.data]);const b=()=>{v.current||k.current&&!window.confirm(zdn())||m.current()};Dm(p,b,"textarea");async function y(){if(!(!s||!w||h)){f(!0);try{if(await u.mutateAsync({content:a,previous:s.content}),!zn(t.queryKey))return;Kr(t.queryKey,{...s,content:a}),i({...s,content:a}),n==null||n(),Zt(Hdn(),"success")}catch(x){Zt(x instanceof Error?x.message:String(x),"error")}finally{f(!1)}}}return ii.createPortal(_.jsx("div",{className:"fixed inset-0 z-200 flex items-center justify-center bg-modal-backdrop p-5",onClick:x=>{x.target===x.currentTarget&&b()},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:Qdn()}),_.jsx("code",{className:"mt-1 block font-mono text-sm text-subtext",children:"~/.ssh/config"})]}),_.jsx(It,{className:"absolute end-3.5 top-3.5","aria-label":xdn(),onClick:b,disabled:h,children:_.jsx(xr,{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(kt,{})," ",Ddn()]}):_.jsx(OB,{value:a,onChange:o,onSave:()=>void y(),path:s.path})}),_.jsxs("div",{className:"flex shrink-0 justify-end gap-2.5 p-4",children:[_.jsx(De,{onClick:b,disabled:h,children:df()}),_.jsx(De,{variant:"primary",onClick:()=>void y(),disabled:!w||h,children:h?Sa():pc()})]})]})}),document.body)}function LB({runtime:e,corner:n=!1}){const[t,r]=T.useState(null);return e.kind==="ssh"?_.jsx(m5,{runtime:e,corner:n}):_.jsxs(_.Fragment,{children:[n?_.jsx("div",{className:"fixed bottom-0 start-0 z-50",children:_.jsxs(De,{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:I3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:[_.jsx(Zv,{size:14,className:"shrink-0"}),_.jsx("span",{className:"min-w-0 truncate text-sm leading-tight",children:$v()})]})}):_.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(It,{size:"small","aria-label":I3(),"aria-haspopup":"dialog",onClick:()=>r("hosts"),children:_.jsx(Zv,{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:$v()}),_.jsxs("span",{className:"truncate text-xs leading-tight text-subtext",children:["OpenResearch ",Ce(e.version)]})]})]})}),t==="hosts"&&_.jsx(kEn,{onClose:()=>r(null),onConfigureSsh:()=>r("config")}),t==="config"&&_.jsx(DB,{onClose:()=>r("hosts")})]})}function I6(e=!0){var r;const n=Uv(),t=ut({...n,enabled:e});return{status:t.data??null,error:((r=t.error)==null?void 0:r.message)??null,apply:s=>Kr(n.queryKey,s)}}const mNn=6e4,gNn=500,IB=e=>`https://github.com/alphaXiv/OpenResearch/releases/tag/${e.split("/").map(encodeURIComponent).join("/")}`;function $B(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=Uv(),u=()=>i.current||!zn(c.queryKey);t(!0),s(null),(async()=>{try{if(await $5n(),u())return;const h=Date.now()+mNn;for(;Date.now()setTimeout(p,gNn)),u())return;const f=await tt.fetchQuery({...c,staleTime:0}).catch(()=>null);if(u())return;if(f&&f.instance!==a){window.location.reload();return}}throw new Error(kxn())}catch(h){if(u())return;s(h instanceof Error?h.message:String(h)),t(!1)}})()}}}function BB({status:e}){const[n,t]=T.useState(null),r=e!=null&&e.restartRequired?e.installedVersion:null,{restarting:s,error:i,restart:a}=$B(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(Ka,{size:13,className:`shrink-0 text-subtext${s?" animate-spin":""}`}),_.jsx("span",{className:"min-w-0",children:i?jI({error:i}):Yyn({version:Ce(r)})}),(e==null?void 0:e.installedTag)&&_.jsx("a",{href:IB(e.installedTag),target:"_blank",rel:"noreferrer",className:"text-sm text-subtext underline shrink-0",children:gI()}),(e==null?void 0:e.canRestart)&&_.jsx(De,{type:"button",size:"small",disabled:s,onClick:a,children:s?AI():zI()}),_.jsx(It,{type:"button",size:"small",className:"ms-auto","aria-label":sxn(),disabled:s,onClick:()=>t(r),children:_.jsx(xr,{size:13})})]})}function $6(){return _.jsx("div",{className:"flex flex-1 h-full items-center justify-center",children:_.jsx(kt,{})})}function vNn(){return _.jsxs("div",{className:"flex flex-1 h-full flex-col items-center justify-center gap-3 text-subtext",children:[_.jsx("p",{children:fo()}),_.jsx($b,{to:"/projects",children:v0()})]})}function B6({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(De,{onClick:n,children:ri()}),_.jsx($b,{to:"/projects",children:v0()})]})}function PB({projectId:e}){const{queryClient:n}=dS({from:"__root__"}),t=Ib(),[r,s]=T.useState(null),[i,a]=T.useState(0);return T.useEffect(()=>{let o=!0;return s(null),(e?q9n(e,n):H9n(n)).then(c=>{o&&t({href:c,replace:!0})}).catch(c=>{o&&(IK(c)?a(u=>u+1):s(c instanceof Error?c:new Error(String(c))))}),()=>{o=!1}},[e,i,t,n]),r?_.jsx(B6,{error:r,reset:()=>a(o=>o+1)}):_.jsx($6,{})}function bNn(){return _.jsx(PB,{})}function yNn({projectId:e}){return _.jsx(PB,{projectId:e})}function xNn(){const e=tB(),n=Ib(),t=zh(),r=ut(t),s=ut(Om()),i=r.data,a=s.data,o=(i==null?void 0:i.length)===0&&(a==null?void 0:a.onboardingCompleted)===!1,c=r.error??s.error,u=()=>{r.refetch(),s.refetch()},{status:h}=I6(e.kind==="local");T.useEffect(()=>{document.title="OpenResearch",a&&Jb.queue({...JS()??a.workspace??{railOpen:!0,panelWidth:sB(),experimentsView:"table"},lastLocation:"/projects"})},[a]);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(cB,{}),_.jsx(BB,{status:h})]}),c&&(!i||!a)?_.jsx(B6,{error:c,reset:u}):!i||!a?_.jsx($6,{}):o?_.jsx(nEn,{remote:e.kind==="ssh",preferredAgent:a.preferredAgent,onDone:p=>{F9n(),f(p.id)}}):_.jsx(wEn,{remote:e.kind==="ssh",projects:i,onOpen:f,onCreated:(p,m)=>{m?(Zt(m,"error"),n({to:"/projects/$projectId/settings/$tab",params:{projectId:p.id,tab:"git"}})):f(p.id)},onDeleted:p=>Kr(t.queryKey,m=>m==null?void 0:m.filter(w=>w.id!==p))}),(e.kind==="ssh"||i&&a&&!o)&&_.jsx(LB,{runtime:e,corner:!0})]})}const wNn=hc()({component:bNn}),kNn=hc()({component:O0}),SNn=hc()({}),CNn=hc()({component:xNn});function w5(e,n,t){return e.source==="checkout"?{path:e.file.path,source:"repo",sessionId:e.file.root==="worktree"?n:void 0,ref:e.file.root==="branch"?t:void 0}:{path:e.file.path,source:e.source==="artifact"?"artifacts":"abs"}}function FB(e,n){const t=e.map(s=>({...s,children:s.children?FB(s.children,[]):void 0}));for(const s of n){const i=s.path.split("/");let a=t;for(let o=0;oh.path===c);if(o===i.length-1)u||a.push({...s});else{const h=u??{path:c,name:i[o],isDir:!0,size:0,modifiedAt:0,children:[]};u||a.push(h),h.children??(h.children=[]),a=h.children}}}const r=s=>{s.sort((i,a)=>Number(a.isDir)-Number(i.isDir)||i.name.localeCompare(a.name)),s.forEach(i=>{i.children&&r(i.children)})};return r(t),t}const ENn=e=>({queryKey:St("getRunDiff",e),queryFn:({signal:n})=>o5n(e,n),staleTime:3e4}),HB=e=>({queryKey:St("getExperimentDiff",e),queryFn:({signal:n})=>c5n(e,n),staleTime:3e4}),eb=(e,n,t={})=>({queryKey:St("getProjectFile",e,n,{...t}),queryFn:({signal:r})=>l5n(e,n,t,r),staleTime:t.ref?Nh(t.ref)?1/0:3e4:1/0,refetchOnMount:t.ref?!0:"always",refetchOnWindowFocus:t.ref?!0:"always"}),qB=e=>({queryKey:St("getAbsoluteFile",e),queryFn:({signal:n})=>u5n(e,n),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),UB=(e,n={})=>({queryKey:St("getCodeTree",e,{...n}),queryFn:({signal:t})=>A5n(e,n,t),staleTime:n.ref&&Nh(n.ref)?1/0:3e4}),tb=e=>({queryKey:St("getSessionWorktree",e),queryFn:({signal:n})=>T5n(e,n),staleTime:3e4}),NNn=e=>({queryKey:St("getArtifacts",e),queryFn:({signal:n})=>vkn(e,n),staleTime:3e4}),P6=(e,n)=>({queryKey:St("getFileLocation",e,n),queryFn:({signal:t})=>h5n(e,n,t),staleTime:0}),F6=(e,n)=>({queryKey:St("getArtifactFileText",e,n),queryFn:({signal:t})=>wkn(e,n,t),staleTime:1/0,refetchOnMount:"always",refetchOnWindowFocus:"always"}),GB=(e,n)=>({queryKey:St("getArtifactFileMetadata",e,n),queryFn:({signal:t})=>Skn(e,n,t),staleTime:2e3}),zNn=()=>({queryKey:St("getLatexEngine"),queryFn:({signal:e})=>m5n(e),staleTime:3e5}),jNn=()=>({queryKey:St("getOverleafSettings"),queryFn:({signal:e})=>v5n(e),staleTime:3e5}),ANn=(e,n,t={})=>({queryKey:St("getOverleafState",e,n,{...t}),queryFn:({signal:r})=>S5n(e,n,t,r),staleTime:3e5}),TNn=(e,n,t={})=>({queryKey:St("getOverleafStatus",e,n,{...t}),queryFn:({signal:r})=>z5n(e,n,t,r),staleTime:3e4}),H6=(e,n,t,r,s)=>({queryKey:St("resolvedFile",e,n,t,r??null,s??null),staleTime:s&&!Nh(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",h=async()=>{const m=await o(GB(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(eb(e,m,{sessionId:r})).catch(()=>(i.throwIfAborted(),null));if(w&&!w.notFound)return w}return null},p=await(c?o(qB(n)).then(m=>({source:"absolute",file:m})):u?h().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(eb(e,n,{sessionId:r,ref:s})).then(m=>m.notFound&&!s?h().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 RNn(e,n,t,r,s){if(Nh(s))return;const i=H6(e,n,t,r,s),a=[i.queryKey,...t==="abs"?[qB(n).queryKey]:[eb(e,n,{sessionId:r,ref:s}).queryKey,eb(e,`artifacts/${n}`,{sessionId:r}).queryKey,F6(e,n).queryKey,GB(e,n).queryKey]];await Promise.all(a.map(o=>tt.cancelQueries({queryKey:o,exact:!0}))),await Promise.all(a.map(o=>tt.invalidateQueries({queryKey:o,exact:!0,refetchType:"none"}))),await tt.invalidateQueries({queryKey:i.queryKey,exact:!0})}function MNn(e,n){cy(n?`${e.replace(/[\\/]+$/,"")}/${n}`:e)}function cy(e){const n=navigator.clipboard;if(!n){typeof e!="string"&&e.catch(()=>{}),Zt(kL(),"error");return}(typeof e=="string"?n.writeText(e):typeof ClipboardItem<"u"&&n.write?n.write([new ClipboardItem({"text/plain":e.then(r=>new Blob([r],{type:"text/plain"}))})]):e.then(r=>n.writeText(r))).then(()=>Zt(_f(),"success")).catch(r=>Zt(r instanceof Error?r.message:String(r),"error"))}function VB({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(Br,{autoFocus:!0,variant:"inline",className:"min-w-0 flex-1",value:r,"aria-label":iHe({path:Ce(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 q6(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 U6({target:e,onOpen:n,onRename:t,onDuplicate:r,onCopyPath:s,onDelete:i,onReveal:a,pathStatus:o,copyLabel:c,openLabel:u,onClose:h}){const f=T.useRef(null),p=T.useRef(h);p.current=h;const[m,w]=T.useState({x:e.x,y:e.y});T.useLayoutEffect(()=>{var N;const b=f.current;if(!b)return;const y=document.activeElement instanceof HTMLElement?document.activeElement:null,x=()=>w({x:Math.max(8,Math.min(e.x,window.innerWidth-b.offsetWidth-8)),y:Math.max(8,Math.min(e.y,window.innerHeight-b.offsetHeight-8))});x();const C=new ResizeObserver(x);return C.observe(b),(N=b.querySelector("button"))==null||N.focus(),()=>{C.disconnect(),b.contains(document.activeElement)&&(y==null||y.focus())}},[e]),T.useEffect(()=>{const b=()=>p.current(),y=C=>{var N;(N=f.current)!=null&&N.contains(C.target instanceof Node?C.target:null)||p.current()},x=C=>{if(C.key==="Tab"){C.preventDefault(),p.current();return}C.key==="Escape"&&(C.preventDefault(),C.stopPropagation(),p.current())};return document.addEventListener("pointerdown",y),window.addEventListener("blur",b),window.addEventListener("resize",b),window.addEventListener("scroll",b,!0),document.addEventListener("keydown",x,!0),()=>{document.removeEventListener("pointerdown",y),window.removeEventListener("blur",b),window.removeEventListener("resize",b),window.removeEventListener("scroll",b,!0),document.removeEventListener("keydown",x,!0)}},[]);const k=b=>{p.current(),b()},v=(b,y,x=!1)=>_.jsx(vn,{size:"compact",role:"menuitem",danger:x,onClick:()=>k(y),children:_.jsx("span",{children:b})});return ii.createPortal(_.jsxs("div",{ref:f,role:"menu","aria-label":GFe({path:Ce(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:m.x,top:m.y},onContextMenu:b=>b.preventDefault(),onKeyDown:b=>{var N,j;if(b.key!=="ArrowDown"&&b.key!=="ArrowUp")return;b.preventDefault();const y=[...((N=f.current)==null?void 0:N.querySelectorAll("button"))??[]],x=y.indexOf(document.activeElement instanceof HTMLButtonElement?document.activeElement:y[0]),C=b.key==="ArrowDown"?1:-1;(j=y[(x+C+y.length)%y.length])==null||j.focus()},children:[o&&_.jsx("p",{role:"status",className:"m-0 max-w-80 break-all px-2 py-1 text-xs text-subtext",dir:"auto",children:o}),n&&v(u??ZFe(),n),t&&v(fL(),t),r&&v($Fe(),r),s&&v(c??Nde(),s),a&&v(T3(),a),i&&v(_L(),i,!0)]}),document.body)}const ly=T.createContext(null),KB=T.createContext(null);function ONn(e,n){const t=T.useContext(KB),r=T.useContext(ly),[s,i]=T.useState(null),a=o=>{t&&(o.preventDefault(),o.stopPropagation(),i(q6(o,e)))};return{handlers:t?{onContextMenu:a,onKeyDown:o=>{(o.key==="ContextMenu"||o.shiftKey&&o.key==="F10")&&a(o)}}:{},menu:s&&t?{target:s,context:t,request:t.resolve(e,r,n),onClose:()=>i(null)}:null}}function DNn({target:e,context:n,request:t,onClose:r,onOpen:s}){var p,m,w;const i=xi(),a=ut({...H6(n.projectId,(t==null?void 0:t.path)??"",(t==null?void 0:t.source)??"repo",t==null?void 0:t.sessionId,t==null?void 0:t.ref),enabled:t!==null}),o=a.data,c=o?w5(o,t==null?void 0:t.sessionId,t==null?void 0:t.ref):t,u=ut({...P6(n.projectId,c??{path:"",source:"repo"}),enabled:!!o&&!o.file.notFound&&!a.isFetching}),h=!a.isFetching&&!u.isFetching&&!a.isError&&!u.isError&&!(o!=null&&o.file.notFound)?(p=u.data)==null?void 0:p.absolutePath:null,f=!t||o!=null&&o.file.notFound?Lv():((m=a.error)==null?void 0:m.message)??((w=u.error)==null?void 0:w.message)??(h?n.remote?xL({path:Ce(h)}):Ce(h):t.ref?wS({branch:Ce(t.ref)}):wL());return _.jsx(U6,{target:e,openLabel:aFe(),copyLabel:A3(),onOpen:s,pathStatus:f,onCopyPath:h?()=>{zn(i)&&cy(h)}:void 0,onReveal:h&&!n.remote&&c?()=>{zn(i)&&MS(n.projectId,c.path,c).catch(k=>Zt(k instanceof Error?k.message:String(k),"error"))}:void 0,onClose:r})}function LNn(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 EA={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 INn(e){return EA[e]??EA.idle}const $Nn={done:kI,failed:mpn,running:Apn,starting:Ipn,cancelling:Xhn,cancelled:qhn,editing:lpn,idle:kpn};function G6(e){const n=$Nn[e];return n?n():e.charAt(0).toUpperCase()+e.slice(1)}function ml({status:e,label:n,className:t}){const r=INn(e);return _.jsx(Yd,{tone:r.tone,live:r.live,className:t,children:n??G6(e)})}const vf={local:yL,tinker:UOe,hf:qMe,modal:lOe,k8s:XMe,ssh:IOe,slurm:AOe,ray:kOe,openresearch:mOe};function NA(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 nr(e){for(var n=1;n=0||(h[c]=a[c]);return h})(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 In(e,n){return QB(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=[],h=!0,f=!1;try{if(o=(s=s.call(t)).next,r===0){if(Object(s)!==s)return;h=!1}else for(;!(h=(i=o.call(s)).done)&&(u.push(i.value),u.length!==r);h=!0);}catch(p){f=!0,a=p}finally{try{if(!h&&s.return!=null&&(c=s.return(),Object(c)!==c))return}finally{if(f)throw a}}return u}})(e,n)||uy(e,n)||YB()}function WB(e){return QB(e)||XB(e)||uy(e)||YB()}function ma(e){return(function(n){if(Array.isArray(n))return S5(n)})(e)||XB(e)||uy(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 QB(e){if(Array.isArray(e))return e}function XB(e){if(typeof Symbol<"u"&&e[Symbol.iterator]!=null||e["@@iterator"]!=null)return Array.from(e)}function uy(e,n){if(e){if(typeof e=="string")return S5(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)?S5(e,n):void 0}}function S5(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 b1=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Fm(e,n){return e(n={exports:{}},n.exports),n.exports}var ha=Fm((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?b.slice(0,x):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var N=b.slice(x+1);N.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var j=b.slice(x+1).split(" "),A=j[0].split("..");a.oldRevision=A[0],a.newRevision=A[1],j[1]&&(a.oldMode=a.newMode=j[1]);break;case"copy":case"rename":var z=b.slice(x+1);z.indexOf("from")===0?a.oldPath=z.slice(5):a.newPath=z.slice(3),y=C;break;case"---":var M=b.slice(x+1),D=m[++k].slice(4);M==="/dev/null"?(D=D.slice(2),y="add"):D==="/dev/null"?(M=M.slice(2),y="delete"):(y="modify",M=M.slice(2),D=D.slice(2)),M&&(a.oldPath=M),D&&(a.newPath=D),p=5;break e}}a.type=y||"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 I=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:I[1]-0,newStart:I[4]-0,oldLines:I[3]-0||1,newLines:I[6]-0||1,changes:[]},a.hunks.push(o),c=o.oldStart,u=o.newStart}else{var B=v.slice(0,1),G={content:v.slice(1)};switch(B){case"+":G.type="insert",G.isInsert=!0,G.lineNumber=u,u++;break;case"-":G.type="delete",G.isDelete=!0,G.lineNumber=c,c++;break;case" ":G.type="normal",G.isNormal=!0,G.oldLineNumber=c,G.newLineNumber=u,c++,u++;break;case"\\":var U=o.changes[o.changes.length-1];U.isDelete||(a.newEndingNewLine=!1),U.isInsert||(a.oldEndingNewLine=!1)}G.type&&o.changes.push(G)}k++}return f}};e.exports=s})()}));function Zu(e){return e.type==="insert"}function ga(e){return e.type==="delete"}function yl(e){return e.type==="normal"}function sNn(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var c=In(i,3),u=c[0],h=c[1],f=c[2];return h?Zu(a)&&f>=0?(u.splice(f+1,0,a),[u,a,f+2]):(u.push(a),[u,a,ga(a)&&ga(h)?f:o]):(u.push(a),[u,a,ga(a)?o:-1])}),[[],null,-1]);return In(s,1)[0]})(e.changes):e.changes;return nr(nr({},e),{},{isPlain:!1,changes:t})}function E5(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?b.slice(0,x):C;switch(C){case"diff":k--;break e;case"deleted":case"new":var N=b.slice(x+1);N.indexOf("file mode")===0&&(a[C==="new"?"newMode":"oldMode"]=N.slice(10));break;case"similarity":a.similarity=parseInt(b.split(" ")[2],10);break;case"index":var j=b.slice(x+1).split(" "),A=j[0].split("..");a.oldRevision=A[0],a.newRevision=A[1],j[1]&&(a.oldMode=a.newMode=j[1]);break;case"copy":case"rename":var z=b.slice(x+1);z.indexOf("from")===0?a.oldPath=z.slice(5):a.newPath=z.slice(3),y=C;break;case"---":var M=b.slice(x+1),D=m[++k].slice(4);M==="/dev/null"?(D=D.slice(2),y="add"):D==="/dev/null"?(M=M.slice(2),y="delete"):(y="modify",M=M.slice(2),D=D.slice(2)),M&&(a.oldPath=M),D&&(a.newPath=D),p=5;break e}}a.type=y||"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 I=/^@@\s+-([0-9]+)(,([0-9]+))?\s+\+([0-9]+)(,([0-9]+))?/.exec(v);o={content:v,oldStart:I[1]-0,newStart:I[4]-0,oldLines:I[3]-0||1,newLines:I[6]-0||1,changes:[]},a.hunks.push(o),c=o.oldStart,u=o.newStart}else{var B=v.slice(0,1),G={content:v.slice(1)};switch(B){case"+":G.type="insert",G.isInsert=!0,G.lineNumber=u,u++;break;case"-":G.type="delete",G.isDelete=!0,G.lineNumber=c,c++;break;case" ":G.type="normal",G.isNormal=!0,G.oldLineNumber=c,G.newLineNumber=u,c++,u++;break;case"\\":var q=o.changes[o.changes.length-1];q.isDelete||(a.newEndingNewLine=!1),q.isInsert||(a.oldEndingNewLine=!1)}G.type&&o.changes.push(G)}k++}return f}};e.exports=s})()}));function Ju(e){return e.type==="insert"}function ga(e){return e.type==="delete"}function yl(e){return e.type==="normal"}function HNn(e,n){var t=n.nearbySequences==="zip"?(function(r){var s=r.reduce((function(i,a,o){var c=In(i,3),u=c[0],h=c[1],f=c[2];return h?Ju(a)&&f>=0?(u.splice(f+1,0,a),[u,a,f+2]):(u.push(a),[u,a,ga(a)&&ga(h)?f:o]):(u.push(a),[u,a,ga(a)?o:-1])}),[[],null,-1]);return In(s,1)[0]})(e.changes):e.changes;return nr(nr({},e),{},{isPlain:!1,changes:t})}function C5(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 rNn.parse(t).map((function(r){return(function(s,i){var a=s.hunks.map((function(o){return sNn(o,i)}));return nr(nr({},s),{},{hunks:a})})(r,n)}))}function iNn(e){return e[0]}function aNn(e){return e[e.length-1]}function N5(e){return["".concat(e,"Start"),"".concat(e,"Lines")]}function K0(e){return e==="old"?function(n){return Zu(n)?-1:yl(n)?n.oldLineNumber:n.lineNumber}:function(n){return ga(n)?-1:yl(n)?n.newLineNumber:n.lineNumber}}function JB(e,n){return function(t,r){var s=t[e],i=s+t[n];return r>=s&&r=i&&s-1},hNn=function(e,n){var t=this.__data__,r=fy(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function Dd(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),h=i.get(n);if(u&&h)return u==n&&h==e;var f=-1,p=!0,m=2&t?new YNn:void 0;for(i.set(e,n),i.set(n,e);++f-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 dzn=function(e){return Rh(e)&&W6(e.length)&&!!Nr[Jh(e)]},hzn=function(e){return function(n){return e(n)}},OA=Fm((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&nP.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})),DA=OA&&OA.isTypedArray,Q6=DA?hzn(DA):dzn,pzn=Object.prototype.hasOwnProperty,mzn=function(e,n){var t=xa(e),r=!t&&my(e),s=!t&&!r&&nb(e),i=!t&&!r&&!s&&Q6(e),a=t||r||s||i,o=a?czn(e.length,String):[],c=o.length;for(var u in e)!pzn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||cP(u,c))||o.push(u);return o},gzn=Object.prototype,lP=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||gzn)},vzn=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),bzn=Object.prototype.hasOwnProperty,uP=function(e){if(!lP(e))return vzn(e);var n=[];for(var t in Object(e))bzn.call(e,t)&&t!="constructor"&&n.push(t);return n},gy=function(e){return e!=null&&W6(e.length)&&!sP(e)},X6=function(e){return gy(e)?mzn(e):uP(e)},LA=function(e){return rzn(e,X6,ozn)},yzn=Object.prototype.hasOwnProperty,xzn=function(e,n,t,r,s,i){var a=1&t,o=LA(e),c=o.length;if(c!=LA(n).length&&!a)return!1;for(var u=c;u--;){var h=o[u];if(!(a?h in n:yzn.call(n,h)))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=In(e,1)[0];return n.type==="text"&&!n.value}return!0}function ljn(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=Hu(e,ojn),a=s?function(o,c){return s(o,FA,c)}:FA;return _.jsx("td",nr(nr({},i),{},{"data-change-key":n,children:r?cjn(r)?" ":r.map(a):t||" "}))}var vP=T.memo(ljn);function bP(e,n){return function(){var t=n==="old"?wy(e):ky(e);return t===-1?void 0:t}}function yP(e,n){return function(t){return e&&t?_.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function rb(e,n){return n?function(t){e(),n(t)}:e}function HA(e,n,t,r){return T.useMemo((function(){var s=gP(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=rb(t,s.onMouseEnter),s.onMouseLeave=rb(r,s.onMouseLeave),s}),[e,t,r,n])}function qA(e,n,t,r,s,i,a,o,c){var u={change:n,side:r,inHoverState:o,renderDefault:bP(n,r),wrapInAnchor:yP(s,i)};return _.jsx("td",nr(nr({className:e},a),{},{"data-change-key":t,children:c(u)}))}function ujn(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,c=e.generateLineClassName,u=e.gutterClassName,h=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,y=s.type,x=s.content,C=Iu(s),N=(n=In(T.useState(!1),2),t=n[0],r=n[1],[t,T.useCallback((function(){return r(!0)}),[]),T.useCallback((function(){return r(!1)}),[])]),j=In(N,3),A=j[0],z=j[1],M=j[2],D=T.useMemo((function(){return{change:s}}),[s]),I=HA(f,D,z,M),B=HA(p,D,z,M),G=k(s),U=c({changes:[s],defaultGenerate:function(){return o}}),Q=ha("diff-gutter","diff-gutter-".concat(y),u,{"diff-gutter-selected":i}),V=ha("diff-code","diff-code-".concat(y),h,{"diff-code-selected":i});return _.jsxs("tr",{id:G,className:ha("diff-line",U),children:[!m&&qA(Q,s,C,"old",w,G,I,A,b),!m&&qA(Q,s,C,"new",w,G,I,A,b),_.jsx(vP,nr({className:V,changeKey:C,text:x,tokens:a,renderToken:v},B))]})}var _jn=T.memo(ujn);function fjn(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 djn=["hideGutter","selectedChanges","tokens","lineClassName"],hjn=["hunk","widgets","className"];function pjn(e){var n=e.hunk,t=e.widgets,r=e.className,s=Hu(e,hjn),i=(function(a,o){return a.reduce((function(c,u){var h=Iu(u);c.push(["change",h,u]);var f=o[h];return f&&c.push(["widget",h,f]),c}),[])})(n.changes,t);return _.jsx("tbody",{className:ha("diff-hunk",r),children:i.map((function(a){return(function(o,c){var u=In(o,3),h=u[0],f=u[1],p=u[2],m=c.hideGutter,w=c.selectedChanges,k=c.tokens,v=c.lineClassName,b=Hu(c,djn);if(h==="change"){var y=ga(p)?"old":"new",x=ga(p)?wy(p):ky(p),C=k?k[y][x-1]:null;return _.jsx(_jn,nr({className:v,change:p,hideGutter:m,selected:w.includes(f),tokens:C},b),"change".concat(f))}return h==="widget"?_.jsx(fjn,{hideGutter:m,element:p},"widget".concat(f)):null})(a,s)}))})}var xP=0;function x1(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=gP(r,(function(o){return function(c){return o&&o({side:e,change:t},c)}}));return a.onMouseEnter=rb(s,a.onMouseEnter),a.onMouseLeave=rb(i,a.onMouseLeave),a}),[t,r,s,e,i])}function Lw(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,h=e.gutterAnchor,f=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,w=e.renderToken,k=e.renderGutter;if(!n){var v=ha("diff-gutter","diff-gutter-omit",i),b=ha("diff-code","diff-code-omit",a);return[!p&&_.jsx("td",{className:v},"gutter"),_.jsx("td",{className:b},"code")]}var y=n.type,x=n.content,C=Iu(n),N=t===xP?"old":"new",j=nr({id:u||void 0,className:ha("diff-gutter","diff-gutter-".concat(y),S5({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:k({change:n,side:N,inHoverState:m,renderDefault:bP(n,N),wrapInAnchor:yP(h,f)})},o),A=ha("diff-code","diff-code-".concat(y),S5({"diff-code-selected":r},"diff-line-hover-"+N,m),a);return[!p&&_.jsx("td",nr(nr({},j),{},{"data-change-key":C}),"gutter"),_.jsx(vP,nr({className:A,changeKey:C,text:x,tokens:s,renderToken:w},c),"code")]}function mjn(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,h=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,y=e.renderGutter,x=In(T.useState(""),2),C=x[0],N=x[1],j=x1("old",N,t,f),A=x1("new",N,r,f),z=x1("old",N,t,p),M=x1("new",N,r,p),D=t&&w(t),I=r&&w(r),B=k({changes:[t,r],defaultGenerate:function(){return n}}),G={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:h,gutterEvents:f,codeEvents:p,renderToken:b,renderGutter:y},U=nr(nr({},G),{},{change:t,side:xP,selected:s,tokens:a,gutterEvents:j,codeEvents:z,anchorID:D,gutterAnchor:v,gutterAnchorTarget:D,hover:C==="old"}),Q=nr(nr({},G),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:A,codeEvents:M,anchorID:t===r?null:I,gutterAnchor:v,gutterAnchorTarget:t===r?D:I,hover:C==="new"});if(c)return _.jsx("tr",{className:ha("diff-line",B),children:Lw(t?U:Q)});var V=(function(Z,J){return Z&&!J?"diff-line-old-only":!Z&&J?"diff-line-new-only":Z===J?"diff-line-normal":"diff-line-compare"})(t,r);return _.jsxs("tr",{className:ha("diff-line",V,B),children:[Lw(U),Lw(Q)]})}var gjn=T.memo(mjn);function vjn(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 bjn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],yjn=["hunk","widgets","className"];function w1(e,n){return(e?Iu(e):"00")+(n?Iu(n):"00")}function xjn(e){var n=e.hunk,t=e.widgets,r=e.className,s=Hu(e,yjn),i=(function(a,o){for(var c=function(b){if(!b)return null;var y=Iu(b);return o[y]||null},u=[],h=0;h=s&&r=i&&s-1},ZNn=function(e,n){var t=this.__data__,r=_y(t,e);return r<0?(++this.size,t.push([e,n])):t[r][1]=n,this};function Dd(e){var n=-1,t=e==null?0:e.length;for(this.clear();++no))return!1;var u=i.get(e),h=i.get(n);if(u&&h)return u==n&&h==e;var f=-1,p=!0,m=2&t?new Dzn:void 0;for(i.set(e,n),i.set(n,e);++f-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 Yzn=function(e){return Rh(e)&&W6(e.length)&&!!Nr[Jh(e)]},Zzn=function(e){return function(n){return e(n)}},DA=Fm((function(e,n){var t=n&&!n.nodeType&&n,r=t&&e&&!e.nodeType&&e,s=r&&r.exports===t&&nP.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})),LA=DA&&DA.isTypedArray,Q6=LA?Zzn(LA):Yzn,Jzn=Object.prototype.hasOwnProperty,ejn=function(e,n){var t=xa(e),r=!t&&py(e),s=!t&&!r&&nb(e),i=!t&&!r&&!s&&Q6(e),a=t||r||s||i,o=a?Vzn(e.length,String):[],c=o.length;for(var u in e)!Jzn.call(e,u)||a&&(u=="length"||s&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||cP(u,c))||o.push(u);return o},tjn=Object.prototype,lP=function(e){var n=e&&e.constructor;return e===(typeof n=="function"&&n.prototype||tjn)},njn=(function(e,n){return function(t){return e(n(t))}})(Object.keys,Object),rjn=Object.prototype.hasOwnProperty,uP=function(e){if(!lP(e))return njn(e);var n=[];for(var t in Object(e))rjn.call(e,t)&&t!="constructor"&&n.push(t);return n},my=function(e){return e!=null&&W6(e.length)&&!sP(e)},X6=function(e){return my(e)?ejn(e):uP(e)},IA=function(e){return Fzn(e,X6,Gzn)},sjn=Object.prototype.hasOwnProperty,ijn=function(e,n,t,r,s,i){var a=1&t,o=IA(e),c=o.length;if(c!=IA(n).length&&!a)return!1;for(var u=c;u--;){var h=o[u];if(!(a?h in n:sjn.call(n,h)))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=In(e,1)[0];return n.type==="text"&&!n.value}return!0}function Kjn(e){var n=e.changeKey,t=e.text,r=e.tokens,s=e.renderToken,i=qu(e,Gjn),a=s?function(o,c){return s(o,HA,c)}:HA;return _.jsx("td",nr(nr({},i),{},{"data-change-key":n,children:r?Vjn(r)?" ":r.map(a):t||" "}))}var vP=T.memo(Kjn);function bP(e,n){return function(){var t=n==="old"?xy(e):wy(e);return t===-1?void 0:t}}function yP(e,n){return function(t){return e&&t?_.jsx("a",{href:n?"#"+n:void 0,children:t}):t}}function rb(e,n){return n?function(t){e(),n(t)}:e}function qA(e,n,t,r){return T.useMemo((function(){var s=gP(e,(function(i){return function(a){return i&&i(n,a)}}));return s.onMouseEnter=rb(t,s.onMouseEnter),s.onMouseLeave=rb(r,s.onMouseLeave),s}),[e,t,r,n])}function UA(e,n,t,r,s,i,a,o,c){var u={change:n,side:r,inHoverState:o,renderDefault:bP(n,r),wrapInAnchor:yP(s,i)};return _.jsx("td",nr(nr({className:e},a),{},{"data-change-key":t,children:c(u)}))}function Wjn(e){var n,t,r,s=e.change,i=e.selected,a=e.tokens,o=e.className,c=e.generateLineClassName,u=e.gutterClassName,h=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.gutterAnchor,k=e.generateAnchorID,v=e.renderToken,b=e.renderGutter,y=s.type,x=s.content,C=Iu(s),N=(n=In(T.useState(!1),2),t=n[0],r=n[1],[t,T.useCallback((function(){return r(!0)}),[]),T.useCallback((function(){return r(!1)}),[])]),j=In(N,3),A=j[0],z=j[1],M=j[2],D=T.useMemo((function(){return{change:s}}),[s]),I=qA(f,D,z,M),B=qA(p,D,z,M),G=k(s),q=c({changes:[s],defaultGenerate:function(){return o}}),Q=ha("diff-gutter","diff-gutter-".concat(y),u,{"diff-gutter-selected":i}),K=ha("diff-code","diff-code-".concat(y),h,{"diff-code-selected":i});return _.jsxs("tr",{id:G,className:ha("diff-line",q),children:[!m&&UA(Q,s,C,"old",w,G,I,A,b),!m&&UA(Q,s,C,"new",w,G,I,A,b),_.jsx(vP,nr({className:K,changeKey:C,text:x,tokens:a,renderToken:v},B))]})}var Qjn=T.memo(Wjn);function Xjn(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 Yjn=["hideGutter","selectedChanges","tokens","lineClassName"],Zjn=["hunk","widgets","className"];function Jjn(e){var n=e.hunk,t=e.widgets,r=e.className,s=qu(e,Zjn),i=(function(a,o){return a.reduce((function(c,u){var h=Iu(u);c.push(["change",h,u]);var f=o[h];return f&&c.push(["widget",h,f]),c}),[])})(n.changes,t);return _.jsx("tbody",{className:ha("diff-hunk",r),children:i.map((function(a){return(function(o,c){var u=In(o,3),h=u[0],f=u[1],p=u[2],m=c.hideGutter,w=c.selectedChanges,k=c.tokens,v=c.lineClassName,b=qu(c,Yjn);if(h==="change"){var y=ga(p)?"old":"new",x=ga(p)?xy(p):wy(p),C=k?k[y][x-1]:null;return _.jsx(Qjn,nr({className:v,change:p,hideGutter:m,selected:w.includes(f),tokens:C},b),"change".concat(f))}return h==="widget"?_.jsx(Xjn,{hideGutter:m,element:p},"widget".concat(f)):null})(a,s)}))})}var xP=0;function x1(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=gP(r,(function(o){return function(c){return o&&o({side:e,change:t},c)}}));return a.onMouseEnter=rb(s,a.onMouseEnter),a.onMouseLeave=rb(i,a.onMouseLeave),a}),[t,r,s,e,i])}function Dw(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,h=e.gutterAnchor,f=e.gutterAnchorTarget,p=e.hideGutter,m=e.hover,w=e.renderToken,k=e.renderGutter;if(!n){var v=ha("diff-gutter","diff-gutter-omit",i),b=ha("diff-code","diff-code-omit",a);return[!p&&_.jsx("td",{className:v},"gutter"),_.jsx("td",{className:b},"code")]}var y=n.type,x=n.content,C=Iu(n),N=t===xP?"old":"new",j=nr({id:u||void 0,className:ha("diff-gutter","diff-gutter-".concat(y),k5({"diff-gutter-selected":r},"diff-line-hover-"+N,m),i),children:k({change:n,side:N,inHoverState:m,renderDefault:bP(n,N),wrapInAnchor:yP(h,f)})},o),A=ha("diff-code","diff-code-".concat(y),k5({"diff-code-selected":r},"diff-line-hover-"+N,m),a);return[!p&&_.jsx("td",nr(nr({},j),{},{"data-change-key":C}),"gutter"),_.jsx(vP,nr({className:A,changeKey:C,text:x,tokens:s,renderToken:w},c),"code")]}function eAn(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,h=e.codeClassName,f=e.gutterEvents,p=e.codeEvents,m=e.hideGutter,w=e.generateAnchorID,k=e.generateLineClassName,v=e.gutterAnchor,b=e.renderToken,y=e.renderGutter,x=In(T.useState(""),2),C=x[0],N=x[1],j=x1("old",N,t,f),A=x1("new",N,r,f),z=x1("old",N,t,p),M=x1("new",N,r,p),D=t&&w(t),I=r&&w(r),B=k({changes:[t,r],defaultGenerate:function(){return n}}),G={monotonous:c,hideGutter:m,gutterClassName:u,codeClassName:h,gutterEvents:f,codeEvents:p,renderToken:b,renderGutter:y},q=nr(nr({},G),{},{change:t,side:xP,selected:s,tokens:a,gutterEvents:j,codeEvents:z,anchorID:D,gutterAnchor:v,gutterAnchorTarget:D,hover:C==="old"}),Q=nr(nr({},G),{},{change:r,side:1,selected:i,tokens:o,gutterEvents:A,codeEvents:M,anchorID:t===r?null:I,gutterAnchor:v,gutterAnchorTarget:t===r?D:I,hover:C==="new"});if(c)return _.jsx("tr",{className:ha("diff-line",B),children:Dw(t?q:Q)});var K=(function(Z,J){return Z&&!J?"diff-line-old-only":!Z&&J?"diff-line-new-only":Z===J?"diff-line-normal":"diff-line-compare"})(t,r);return _.jsxs("tr",{className:ha("diff-line",K,B),children:[Dw(q),Dw(Q)]})}var tAn=T.memo(eAn);function nAn(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 rAn=["selectedChanges","monotonous","hideGutter","tokens","lineClassName"],sAn=["hunk","widgets","className"];function w1(e,n){return(e?Iu(e):"00")+(n?Iu(n):"00")}function iAn(e){var n=e.hunk,t=e.widgets,r=e.className,s=qu(e,sAn),i=(function(a,o){for(var c=function(b){if(!b)return null;var y=Iu(b);return o[y]||null},u=[],h=0;h=(i==null?void 0:i.value.length))return[e];var o=function(f,p){var m=i.value.slice(f,p);return[].concat(ma(s),[nr(nr({},i),{},{value:m})])};if(n>0){var c=o(0,n);a.push(Hd(c))}var u=o(Math.max(n,0),t);if(a.push(r?(function(f,p){return[p].concat(ma(Hd(f)))})(u,r):Hd(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=Hu(e,Fjn);t.push(s);var i,a=K6(r);try{for(a.s();!(i=a.n()).done;)CP(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(Hd([].concat(ma(t.slice(1)),[e])));return n}function Hjn(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var u=tC(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[k1(r(n.oldSource)),k1(r(t))]}var s=In(yAn(e),2),i=s[0],a=s[1],o=n.highlight?function(c){return k1(n.refractor.highlight(c,n.language))}:function(c){return k1([{type:"text",value:c}])};return[o(i),o(a)]}function Hd(e){return e.map((function(n){return nr({},n)}))}function wAn(e,n){return[].concat(ma(Hd(e.slice(0,-1))),[n])}function kAn(e){return e.type==="text"}function tC(e){var n=e[e.length-1];if(kAn(n))return n;throw new Error("Invalid token path with leaf of type ".concat(n.type))}function SAn(e,n,t,r){var s=e.slice(0,-1),i=tC(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(ma(s),[nr(nr({},i),{},{value:m})])};if(n>0){var c=o(0,n);a.push(Hd(c))}var u=o(Math.max(n,0),t);if(a.push(r?(function(f,p){return[p].concat(ma(Hd(f)))})(u,r):Hd(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=qu(e,CAn);t.push(s);var i,a=V6(r);try{for(a.s();!(i=a.n()).done;)CP(i.value,n,t)}catch(o){a.e(o)}finally{a.f()}t.pop()}else n.push(Hd([].concat(ma(t.slice(1)),[e])));return n}function EAn(e){return e.reduce((function(n,t){var r=n[n.length-1],s=(function(c){var u=tC(c);return u.value.includes(` `)?u.value.split(` -`).map((function(h){return $jn(c,nr(nr({},u),{},{value:h}))})):[c]})(t),i=WB(s),a=i[0],o=i.slice(1);return[].concat(ma(n.slice(0,-1)),[[].concat(ma(r),[a])],ma(o.map((function(c){return[c]}))))}),[[]])}function VA(e){return Hjn(CP(e))}var qjn=function(e,n,t){var r=(t=typeof t=="function"?t:void 0)?t(e,n):void 0;return r===void 0?vy(e,n,void 0,t):!!r},Ujn=function(e,n){return vy(e,n)},Gjn=function(e){var n=e==null?0:e.length;return n?e[n-1]:void 0};function Kjn(e,n){if(!e.children)throw new Error("parent node missing children property");var t,r,s=Gjn(e.children);return s&&(r=n,(t=s).type===r.type&&(t.type==="text"||t.children&&r.children&&qjn(t,r,(function(i,a,o){return o==="chlidren"||Ujn(i,a)}))))?e.children[e.children.length-1]=(function(i,a){return"value"in i&&"value"in a?nr(nr({},i),{},{value:"".concat(i.value).concat(a.value)}):i})(s,n):e.children.push(n),e.children[e.children.length-1]}function WA(e){var n,t={type:"root",children:[]},r=K6(e);try{var s=function(){var i=n.value;i.reduce((function(a,o,c){return Kjn(a,c===i.length-1?nr({},o):nr(nr({},o),{},{children:[]}))}),t)};for(r.s();!(n=r.n()).done;)s()}catch(i){r.e(i)}finally{r.f()}return t}var Vjn=Object.prototype.hasOwnProperty,Wjn=kP((function(e,n,t){Vjn.call(e,t)?e[t].push(n):J6(e,t,[n])})),Qjn=Object.prototype.hasOwnProperty,Xjn=function(e){if(e==null)return!0;if(gy(e)&&(xa(e)||typeof e=="string"||typeof e.splice=="function"||nb(e)||Q6(e)||my(e)))return!e.length;var n=R5(e);if(n=="[object Map]"||n=="[object Set]")return!e.size;if(lP(e))return!uP(e).length;for(var t in e)if(Qjn.call(e,t))return!1;return!0},Yjn=function(e,n){var t=n.start,r=n.length,s=t+r,i=e.reduce((function(a,o){var c=In(a,2),u=c[0],h=c[1],f=h+tC(o).value.length;if(h>s||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 h=this.diff_halfMatch_(t,r);if(h){var f=h[0],p=h[1],m=h[2],w=h[3],k=h[4],v=this.diff_main(f,m,s,i),b=this.diff_main(p,w,s,i);return v.concat([new n.Diff(0,k)],b)}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,h=0,f="",p="";c=1&&h>=1){o.splice(c-u-h,u+h),c=c-u-h;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}h=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,h=new Array(u),f=new Array(u),p=0;ps);x++){for(var C=-x+k;C<=x-v;C+=2){for(var N=c+C,j=(I=C==-x||C!=x&&h[N-1]i)v+=2;else if(j>a)k+=2;else if(w&&(M=c+m-C)>=0&&M=(z=i-f[M]))return this.diff_bisectSplit_(t,r,I,j,s)}for(var A=-x+b;A<=x-y;A+=2){for(var z,M=c+A,D=(z=A==-x||A!=x&&f[M-1]i)y+=2;else if(D>a)b+=2;else if(!w&&(N=c+m-A)>=0&&N=(z=i-z))return this.diff_bisectSplit_(t,r,I,j,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),h=r.substring(i),f=this.diff_main(o,c,!1,a),p=this.diff_main(u,h,!1,a);return f.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var h="",f=0,p=-1,m=s.length;ps||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 h=this.diff_halfMatch_(t,r);if(h){var f=h[0],p=h[1],m=h[2],w=h[3],k=h[4],v=this.diff_main(f,m,s,i),b=this.diff_main(p,w,s,i);return v.concat([new n.Diff(0,k)],b)}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,h=0,f="",p="";c=1&&h>=1){o.splice(c-u-h,u+h),c=c-u-h;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}h=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,h=new Array(u),f=new Array(u),p=0;ps);x++){for(var C=-x+k;C<=x-v;C+=2){for(var N=c+C,j=(I=C==-x||C!=x&&h[N-1]i)v+=2;else if(j>a)k+=2;else if(w&&(M=c+m-C)>=0&&M=(z=i-f[M]))return this.diff_bisectSplit_(t,r,I,j,s)}for(var A=-x+b;A<=x-y;A+=2){for(var z,M=c+A,D=(z=A==-x||A!=x&&f[M-1]i)y+=2;else if(D>a)b+=2;else if(!w&&(N=c+m-A)>=0&&N=(z=i-z))return this.diff_bisectSplit_(t,r,I,j,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),h=r.substring(i),f=this.diff_main(o,c,!1,a),p=this.diff_main(u,h,!1,a);return f.concat(p)},n.prototype.diff_linesToChars_=function(t,r){var s=[],i={};function a(u){for(var h="",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?[y,x,C,N,z]:null}var c,u,h,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],h=c[1],f=c[2],p=c[3]):(f=c[0],p=c[1],u=c[2],h=c[3]),[u,h,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,h=0,f=0;o0?s[i-1]:-1,c=0,u=0,h=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 b=k.charAt(k.length-1),y=v.charAt(0),x=b.match(n.nonAlphaNumericRegex_),C=y.match(n.nonAlphaNumericRegex_),N=x&&b.match(n.whitespaceRegex_),j=C&&y.match(n.whitespaceRegex_),A=N&&b.match(n.linebreakRegex_),z=j&&y.match(n.linebreakRegex_),M=A&&k.match(n.blanklineEndRegex_),D=z&&v.match(n.blanklineStartRegex_);return M||D?5:A||z?4:x&&!N&&j?3:N||j?2:x||C?1:0}for(var s=1;s=m&&(m=w,h=i,f=a,p=o)}t[s-1][1]!=h&&(h?t[s-1][1]=h:(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,h=!1,f=!1;o0?s[i-1]:-1,h=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]=''+h+"";break;case-1:r[c]=''+h+"";break;case 0:r[c]=""+h+""}}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(j,A){var z=j/r.length,M=Math.abs(s-A);return a.Match_Distance?z+M/a.Match_Distance:M?1:z}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 h,f,p=1<=v;x--){var C=i[t.charAt(x-1)];if(y[x]=k===0?(y[x+1]<<1|1)&C:(y[x+1]<<1|1)&C|(m[x+1]|m[x])<<1|1|m[x+1],y[x]&p){var N=o(k,x-1);if(N<=c){if(c=N,!((u=x-1)>s))break;v=Math.max(1,2*s-u)}}}if(o(k+1,s)>c)break;m=y}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,h=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,h=f)}k!==1&&(h+=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),h))!=-1&&((p=this.match_main(r,f.substring(f.length-this.Match_MaxBits),h+f.length-this.Match_MaxBits))==-1||c>=p)&&(c=-1):c=this.match_main(r,f,h),c==-1)a[o]=!1,i-=t[o].length2-t[o].length1;else if(a[o]=!0,i=c-h,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,h=!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):h=!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))),h||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"?rAn:sAn,r=eC(e.map((function(o){return o.changes})),EP).map(t).reduce((function(o,c){var u=In(o,2),h=u[0],f=u[1],p=In(c,2),m=p[0],w=p[1];return[h.concat(m),f.concat(w)]}),[[],[]]),s=In(r,2),i=s[0],a=s[1];return Zjn(XA(i),XA(a))}var aAn=["enhancers"],eT=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=In(Ijn(e,Hu(t,aAn)),2),a=i[0],o=i[1],c=[VA(a),VA(o)],u=(n=[c[0],c[1]],s.reduce((function(k,v){return v(k)}),n)),h=In(u,2),f=h[0],p=h[1],m=[f.map(WA),p.map(WA)],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 O5=["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(" "),oAn=2e3,cAn={highlight(e,n){return $t.highlight(e,n).children}};function lAn(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function Cy(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 uAn(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function D5(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 _An(e){const n=[iAn(e.hunks,{type:"line"})],t=a6(uAn(e));return t&&$t.registered(t)?eT(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:cAn}):eT(e.hunks,{enhancers:n,highlight:!1})}function zP(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:E5(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:E5(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const fAn=({change:e,side:n})=>n==="old"?null:lAn(e);function jP({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:mWe()}),_.jsx("p",{children:gQe({limit:Ce(_l(n)),read:Ce(_l(e))})})]})}function AP({file:e,defaultExpanded:n}){const[t,r]=T.useState(n),{additions:s,deletions:i}=T.useMemo(()=>Cy(e),[e]),a=t&&s+i<=oAn,o=T.useMemo(()=>{if(a)try{return _An(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(mc,{size:14}):_.jsx(Ka,{size:14})}),_.jsx("span",{className:"path",children:_.jsx("code",{children:D5(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:UWe()}):_.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:_.jsx(Njn,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:fAn,tokens:o,viewType:"unified"})}))]})}function dAn({files:e,className:n}){return _.jsx("div",{className:n?`${O5} ${n}`:O5,children:e.map((t,r)=>_.jsx(AP,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function hAn(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 TP({diff:e,partial:n=!1}){var p;const t=T.useMemo(()=>zP(e,n),[e,n]),r=t.files,s=T.useMemo(()=>r.map((m,w)=>({file:m,key:`${m.oldPath}→${m.newPath}#${w}`,changes:Cy(m)})),[r]),[i,a]=T.useState(null),[o,c]=T.useState(!1),u=o&&!n,h=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,f=s.find(m=>m.key===h)??null;return t.failed?_.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?IWe():uQe()}):s.length===0?_.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:AWe()}):_.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?rQe():kWe({count:Jt(s.length)}):s.length===1?zL():NL({count:Jt(s.length)})}),!n&&_.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?XVe():SQe()})]}),u?_.jsx(dAn,{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":lWe(),children:s.map(m=>_.jsxs("button",{type:"button",className:m.key===h?"active":"","aria-pressed":m.key===h,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:hAn(m.file)}),_.jsx("code",{title:D5(m.file),children:D5(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:`${O5} diff-explorer-preview min-w-0`,children:f&&_.jsx(AP,{file:f.file,defaultExpanded:!0},f.key)})]})]})}function pAn({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:c,busy:u,onChanges:h,onFiles:f,onTerminal:p,onArtifacts:m,onExperiments:w,onSideChat:k}){var A,z;const v=ZEn(n,t,c),b=T.useRef(null),y=Ki(b),x=ut({...WI(a),enabled:e}),C=((A=x.data)==null?void 0:A.configuredDefaultBackend)??((z=x.data)==null?void 0:z.defaultBackend),N=C?vf[C]():x.isPending?"…":x.isError?fo():P3(),j=[{id:"files",label:z3(),Icon:Pu,onClick:f},{id:"artifacts",label:aL(),Icon:GS,onClick:m},{id:"experiments",label:oL(),Icon:Ah,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":vw(),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:vw()}),j.filter(M=>M.id!=="files").map(({id:M,label:D,Icon:I,onClick:B})=>_.jsx(vn,{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(I,{size:15}),D]})},M)),_.jsx(vn,{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(qS,{size:15,className:"shrink-0"}),twn()]}),_.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[C&&_.jsx(Xh,{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:Pwn()}),_.jsx(vn,{className:"min-h-7 py-1",onClick:f,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(Pu,{size:15}),z3()]})}),_.jsx(vn,{className:"min-h-7 py-1",onClick:p,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(bo,{size:15}),Fv()]})}),k&&_.jsx(vn,{className:"min-h-7 py-1",onClick:k,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(P0,{size:15}),H3()]})}),c&&_.jsx(mAn,{sessionId:c,busy:u,onChanges:h},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(Yd,{tone:"success",live:!0})}),_.jsx("span",{children:W2n()})]}),v.map(M=>_.jsx(vn,{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} · ${G6(pa(M.run))}`,children:M.experiment.title||M.experiment.slug})},M.run.id))]})]})]}):_.jsxs("nav",{"aria-label":vw(),className:"flex items-center justify-end gap-3",children:[j.map(({id:M,label:D,Icon:I,onClick:B})=>_.jsx(It,{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(I,{size:15})},M)),_.jsxs("div",{className:"relative",children:[_.jsx(It,{ref:b,active:i==="terminal"||y.open,className:"text-text [&.active]:text-text","data-tip":y.open?void 0:bj(),"data-tip-align":"end","aria-label":bj(),"aria-expanded":y.open,"aria-haspopup":"menu",onClick:()=>y.setOpen(M=>!M),children:_.jsx(Lm,{size:15})}),y.open&&_.jsxs("div",{ref:y.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(vn,{role:"menuitem",onClick:()=>{y.setOpen(!1),p()},children:_.jsxs("span",{className:"flex items-center gap-2.5",children:[_.jsx(bo,{size:15}),Fv()]})}),k&&_.jsx(vn,{role:"menuitem",onClick:()=>{y.setOpen(!1),k()},children:_.jsxs("span",{className:"flex items-center gap-2.5",children:[_.jsx(P0,{size:15}),H3()]})})]})]})]})})}function mAn({sessionId:e,busy:n,onChanges:t}){var c,u;const r=ut({...tb(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 h=zP(a.diff.diff,!1);return h.failed?null:h.files.map(Cy).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(vn,{className:"min-h-7 py-1",onClick:t,title:a.branch??zS(),children:[_.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[_.jsx(Im,{size:15,className:"shrink-0"}),_.jsx("span",{children:gL()})]}),o?_.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[_.jsxs("span",{className:"text-accent-green",children:["+",Jt(o.additions)]}),_.jsxs("span",{className:"text-accent-red",children:["−",Jt(o.deletions)]})]}):_.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?zL():NL({count:Jt(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function gAn({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 h=Zb(u,!1,!0,"app"),{terminal:f,dispose:p}=h;s.current=h,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 b=C=>{v||(v=!0,f.options.disableStdin=!0,f.blur(),f.writeln(`\r -${C}`),a(C))},y=f.onData(C=>{k.readyState===WebSocket.OPEN&&k.send(new TextEncoder().encode(C))}),x=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}Df(N)&&(N.type==="exit"?b(Ewn({code:String(N.code)})):N.type==="error"&&typeof N.error=="string"&&b(N.error))},k.onclose=()=>b(yj()),k.onerror=()=>b(yj()),()=>{k.onopen=null,k.onmessage=null,k.onerror=null,k.onclose=null,y.dispose(),x.dispose(),k.close(),s.current=null,p()}},[e,n,o]),T.useEffect(()=>{if(!t||i!==null)return;const u=requestAnimationFrame(()=>{var h,f;(h=s.current)==null||h.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":Fv(),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(Ie,{autoFocus:!0,onClick:()=>c(u=>u+1),children:Mwn()})})]})}const vAn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bAn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yAn={};function tT(e,n){return(yAn.jsx?bAn:vAn).test(e)}const xAn=/[ \t\n\f\r]/g;function wAn(e){return typeof e=="object"?e.type==="text"?nT(e.value):!1:nT(e)}function nT(e){return e.replace(xAn,"")===""}var Ed={},Iw,rT;function kAn(){if(rT)return Iw;rT=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="/",h="*",f="",p="comment",m="declaration";function w(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var y=1,x=1;function C(U){var Q=U.match(n);Q&&(y+=Q.length);var V=U.lastIndexOf(c);x=~V?U.length-V:x+U.length}function N(){var U={line:y,column:x};return function(Q){return Q.position=new j(U),M(),Q}}function j(U){this.start=U,this.end={line:y,column:x},this.source=b.source}j.prototype.content=v;function A(U){var Q=new Error(b.source+":"+y+":"+x+": "+U);if(Q.reason=U,Q.filename=b.source,Q.line=y,Q.column=x,Q.source=v,!b.silent)throw Q}function z(U){var Q=U.exec(v);if(Q){var V=Q[0];return C(V),v=v.slice(V.length),Q}}function M(){z(t)}function D(U){var Q;for(U=U||[];Q=I();)Q!==!1&&U.push(Q);return U}function I(){var U=N();if(!(u!=v.charAt(0)||h!=v.charAt(1))){for(var Q=2;f!=v.charAt(Q)&&(h!=v.charAt(Q)||u!=v.charAt(Q+1));)++Q;if(Q+=2,f===v.charAt(Q-1))return A("End of comment missing");var V=v.slice(2,Q-2);return x+=2,C(V),v=v.slice(Q),x+=2,U({type:p,comment:V})}}function B(){var U=N(),Q=z(r);if(Q){if(I(),!z(s))return A("property missing ':'");var V=z(i),Z=U({type:m,property:k(Q[0].replace(e,f)),value:V?k(V[0].replace(e,f)):f});return z(a),Z}}function G(){var U=[];D(U);for(var Q;Q=B();)Q!==!1&&(U.push(Q),D(U));return U}return M(),G()}function k(v){return v?v.replace(o,f):f}return Iw=w,Iw}var sT;function SAn(){if(sT)return Ed;sT=1;var e=Ed&&Ed.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.default=t;const n=e(kAn());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:h}=c;o?s(u,h,c):h&&(i=i||{},i[u]=h)}),i}return Ed}var Zp={},iT;function CAn(){if(iT)return Zp;iT=1,Object.defineProperty(Zp,"__esModule",{value:!0}),Zp.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,h){return h.toUpperCase()},o=function(u,h){return"".concat(h,"-")},c=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return Zp.camelCase=c,Zp}var Jp,aT;function EAn(){if(aT)return Jp;aT=1;var e=Jp&&Jp.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(SAn()),t=CAn();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,Jp=r,Jp}var NAn=EAn();const zAn=Em(NAn),RP=MP("end"),nC=MP("start");function MP(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 jAn(e){const n=nC(e),t=RP(e);if(n&&t)return{start:n,end:t}}function w0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?oT(e.position):"start"in e||"end"in e?oT(e):"line"in e||"column"in e?L5(e):""}function L5(e){return cT(e&&e.line)+":"+cT(e&&e.column)}function oT(e){return L5(e&&e.start)+"-"+L5(e&&e.end)}function cT(e){return e&&typeof e=="number"?e:1}class ii 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=w0(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}}ii.prototype.file="";ii.prototype.name="";ii.prototype.reason="";ii.prototype.message="";ii.prototype.stack="";ii.prototype.column=void 0;ii.prototype.line=void 0;ii.prototype.ancestors=void 0;ii.prototype.cause=void 0;ii.prototype.fatal=void 0;ii.prototype.place=void 0;ii.prototype.ruleId=void 0;ii.prototype.source=void 0;const rC={}.hasOwnProperty,AAn=new Map,TAn=/[A-Z]/g,RAn=new Set(["table","tbody","thead","tfoot","tr"]),MAn=new Set(["td","th"]),OP="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function DP(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=FAn(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=PAn(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:kB,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=LP(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function LP(e,n,t){if(n.type==="element")return OAn(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return DAn(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return IAn(e,n,t);if(n.type==="mdxjsEsm")return LAn(e,n);if(n.type==="root")return $An(e,n,t);if(n.type==="text")return BAn(e,n)}function OAn(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=$P(e,n.tagName,!1),a=HAn(e,n);let o=iC(e,n);return RAn.has(n.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!wAn(c):!0})),IP(e,a,i,n),sC(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function DAn(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)}X0(e,n.position)}function LAn(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);X0(e,n.position)}function IAn(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:$P(e,n.name,!0),a=qAn(e,n),o=iC(e,n);return IP(e,a,i,n),sC(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function $An(e,n,t){const r={};return sC(r,iC(e,n)),e.create(n,e.Fragment,r,t)}function BAn(e,n){return n.value}function IP(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function sC(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function PAn(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 FAn(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),c=nC(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 HAn(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&rC.call(n.properties,s)){const i=UAn(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&MAn.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 qAn(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 X0(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 X0(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function iC(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:AAn;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?(va(e,e.length,0,n),e):n}const uT={}.hasOwnProperty;function PP(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 mo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const gi=Ju(/[A-Za-z]/),ti=Ju(/[\dA-Za-z]/),JAn=Ju(/[#-'*+\--9=?A-Z^-~]/);function sb(e){return e!==null&&(e<32||e===127)}const I5=Ju(/\d/),eTn=Ju(/[\dA-Fa-f]/),tTn=Ju(/[!-/:-@[-`{-~]/);function Dt(e){return e!==null&&e<-2}function wr(e){return e!==null&&(e<0||e===32)}function jn(e){return e===-2||e===-1||e===32}const Ey=Ju(new RegExp("\\p{P}|\\p{S}","u")),bf=Ju(/\s/);function Ju(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ep(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 Sn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return jn(c)?(e.enter(t),o(c)):n(c)}function o(c){return jn(c)&&i++a))return;const A=n.events.length;let z=A,M,D;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){if(M){D=n.events[z][1].end;break}M=!0}for(b(r),j=A;jx;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=x}function y(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function aTn(e,n,t){return Sn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Mh(e){if(e===null||wr(e)||bf(e))return 1;if(Ey(e))return 2}function Ny(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};fT(f,-c),fT(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=Ha(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=Ha(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=Ha(u,Ny(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=Ha(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,u=Ha(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,va(e,r-1,t-r+3,u),t=r+u.length-h-2;break}}for(t=-1;++t0&&jn(j)?Sn(e,y,"linePrefix",i+1)(j):y(j)}function y(j){return j===null||Dt(j)?e.check(dT,k,C)(j):(e.enter("codeFlowValue"),x(j))}function x(j){return j===null||Dt(j)?(e.exit("codeFlowValue"),y(j)):(e.consume(j),x)}function C(j){return e.exit("codeFenced"),n(j)}function N(j,A,z){let M=0;return D;function D(Q){return j.enter("lineEnding"),j.consume(Q),j.exit("lineEnding"),I}function I(Q){return j.enter("codeFencedFence"),jn(Q)?Sn(j,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):B(Q)}function B(Q){return Q===o?(j.enter("codeFencedFenceSequence"),G(Q)):z(Q)}function G(Q){return Q===o?(M++,j.consume(Q),G):M>=a?(j.exit("codeFencedFenceSequence"),jn(Q)?Sn(j,U,"whitespace")(Q):U(Q)):z(Q)}function U(Q){return Q===null||Dt(Q)?(j.exit("codeFencedFence"),A(Q)):z(Q)}}}function vTn(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 Bw={name:"codeIndented",tokenize:yTn},bTn={partial:!0,tokenize:xTn};function yTn(e,n,t){const r=this;return s;function s(u){return e.enter("codeIndented"),Sn(e,i,"linePrefix",5)(u)}function i(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Dt(u)?e.attempt(bTn,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||Dt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),n(u)}}function xTn(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):Dt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Sn(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):Dt(a)?s(a):t(a)}}const wTn={name:"codeText",previous:STn,resolve:kTn,tokenize:CTn};function kTn(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&&e0(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),e0(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),e0(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 KP(e,n,t,r,s,i,a,o,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return f;function f(b){return b===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(b),e.exit(i),p):b===null||b===32||b===41||sb(b)?t(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(b))}function p(b){return b===62?(e.enter(i),e.consume(b),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(o),p(b)):b===null||b===60||Dt(b)?t(b):(e.consume(b),b===92?w:m)}function w(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function k(b){return!h&&(b===null||b===41||wr(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(b)):h999||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):Dt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||Dt(m)||o++>999?(e.exit("chunkString"),h(m)):(e.consume(m),c||(c=!jn(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,f):f(m)}}function WP(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):Dt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Sn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===a||p===null||Dt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:h)}function f(p){return p===a||p===92?(e.consume(p),h):h(p)}}function k0(e,n){let t;return r;function r(s){return Dt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):jn(s)?Sn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const MTn={name:"definition",tokenize:DTn},OTn={partial:!0,tokenize:LTn};function DTn(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return VP.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=mo(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)?k0(e,u)(m):u(m)}function u(m){return KP(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(OTn,f,f)(m)}function f(m){return jn(m)?Sn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Dt(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function LTn(e,n,t){return r;function r(o){return wr(o)?k0(e,s)(o):t(o)}function s(o){return WP(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return jn(o)?Sn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Dt(o)?n(o):t(o)}}const ITn={name:"hardBreakEscape",tokenize:$Tn};function $Tn(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return Dt(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const BTn={name:"headingAtx",resolve:PTn,tokenize:FTn};function PTn(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"},va(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function FTn(e,n,t){let r=0;return s;function s(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||wr(h)?(e.exit("atxHeadingSequence"),o(h)):t(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Dt(h)?(e.exit("atxHeading"),n(h)):jn(h)?Sn(e,o,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),o(h))}function u(h){return h===null||h===35||wr(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),u)}}const HTn=["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"],pT=["pre","script","style","textarea"],qTn={concrete:!0,name:"htmlFlow",resolveTo:KTn,tokenize:VTn},UTn={partial:!0,tokenize:QTn},GTn={partial:!0,tokenize:WTn};function KTn(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 VTn(e,n,t){const r=this;let s,i,a,o,c;return u;function u(F){return h(F)}function h(F){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(F),f}function f(F){return F===33?(e.consume(F),p):F===47?(e.consume(F),i=!0,k):F===63?(e.consume(F),s=3,r.interrupt?n:L):gi(F)?(e.consume(F),a=String.fromCharCode(F),v):t(F)}function p(F){return F===45?(e.consume(F),s=2,m):F===91?(e.consume(F),s=5,o=0,w):gi(F)?(e.consume(F),s=4,r.interrupt?n:L):t(F)}function m(F){return F===45?(e.consume(F),r.interrupt?n:L):t(F)}function w(F){const re="CDATA[";return F===re.charCodeAt(o++)?(e.consume(F),o===re.length?r.interrupt?n:B:w):t(F)}function k(F){return gi(F)?(e.consume(F),a=String.fromCharCode(F),v):t(F)}function v(F){if(F===null||F===47||F===62||wr(F)){const re=F===47,ie=a.toLowerCase();return!re&&!i&&pT.includes(ie)?(s=1,r.interrupt?n(F):B(F)):HTn.includes(a.toLowerCase())?(s=6,re?(e.consume(F),b):r.interrupt?n(F):B(F)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(F):i?y(F):x(F))}return F===45||ti(F)?(e.consume(F),a+=String.fromCharCode(F),v):t(F)}function b(F){return F===62?(e.consume(F),r.interrupt?n:B):t(F)}function y(F){return jn(F)?(e.consume(F),y):D(F)}function x(F){return F===47?(e.consume(F),D):F===58||F===95||gi(F)?(e.consume(F),C):jn(F)?(e.consume(F),x):D(F)}function C(F){return F===45||F===46||F===58||F===95||ti(F)?(e.consume(F),C):N(F)}function N(F){return F===61?(e.consume(F),j):jn(F)?(e.consume(F),N):x(F)}function j(F){return F===null||F===60||F===61||F===62||F===96?t(F):F===34||F===39?(e.consume(F),c=F,A):jn(F)?(e.consume(F),j):z(F)}function A(F){return F===c?(e.consume(F),c=null,M):F===null||Dt(F)?t(F):(e.consume(F),A)}function z(F){return F===null||F===34||F===39||F===47||F===60||F===61||F===62||F===96||wr(F)?N(F):(e.consume(F),z)}function M(F){return F===47||F===62||jn(F)?x(F):t(F)}function D(F){return F===62?(e.consume(F),I):t(F)}function I(F){return F===null||Dt(F)?B(F):jn(F)?(e.consume(F),I):t(F)}function B(F){return F===45&&s===2?(e.consume(F),V):F===60&&s===1?(e.consume(F),Z):F===62&&s===4?(e.consume(F),q):F===63&&s===3?(e.consume(F),L):F===93&&s===5?(e.consume(F),$):Dt(F)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(UTn,P,G)(F)):F===null||Dt(F)?(e.exit("htmlFlowData"),G(F)):(e.consume(F),B)}function G(F){return e.check(GTn,U,P)(F)}function U(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),Q}function Q(F){return F===null||Dt(F)?G(F):(e.enter("htmlFlowData"),B(F))}function V(F){return F===45?(e.consume(F),L):B(F)}function Z(F){return F===47?(e.consume(F),a="",J):B(F)}function J(F){if(F===62){const re=a.toLowerCase();return pT.includes(re)?(e.consume(F),q):B(F)}return gi(F)&&a.length<8?(e.consume(F),a+=String.fromCharCode(F),J):B(F)}function $(F){return F===93?(e.consume(F),L):B(F)}function L(F){return F===62?(e.consume(F),q):F===45&&s===2?(e.consume(F),L):B(F)}function q(F){return F===null||Dt(F)?(e.exit("htmlFlowData"),P(F)):(e.consume(F),q)}function P(F){return e.exit("htmlFlow"),n(F)}}function WTn(e,n,t){const r=this;return s;function s(a){return Dt(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 QTn(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Hm,n,t)}}const XTn={name:"htmlText",tokenize:YTn};function YTn(e,n,t){const r=this;let s,i,a;return o;function o(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),N):L===63?(e.consume(L),x):gi(L)?(e.consume(L),z):t(L)}function u(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),i=0,w):gi(L)?(e.consume(L),y):t(L)}function h(L){return L===45?(e.consume(L),m):t(L)}function f(L){return L===null?t(L):L===45?(e.consume(L),p):Dt(L)?(a=f,Z(L)):(e.consume(L),f)}function p(L){return L===45?(e.consume(L),m):f(L)}function m(L){return L===62?V(L):L===45?p(L):f(L)}function w(L){const q="CDATA[";return L===q.charCodeAt(i++)?(e.consume(L),i===q.length?k:w):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),v):Dt(L)?(a=k,Z(L)):(e.consume(L),k)}function v(L){return L===93?(e.consume(L),b):k(L)}function b(L){return L===62?V(L):L===93?(e.consume(L),b):k(L)}function y(L){return L===null||L===62?V(L):Dt(L)?(a=y,Z(L)):(e.consume(L),y)}function x(L){return L===null?t(L):L===63?(e.consume(L),C):Dt(L)?(a=x,Z(L)):(e.consume(L),x)}function C(L){return L===62?V(L):x(L)}function N(L){return gi(L)?(e.consume(L),j):t(L)}function j(L){return L===45||ti(L)?(e.consume(L),j):A(L)}function A(L){return Dt(L)?(a=A,Z(L)):jn(L)?(e.consume(L),A):V(L)}function z(L){return L===45||ti(L)?(e.consume(L),z):L===47||L===62||wr(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),V):L===58||L===95||gi(L)?(e.consume(L),D):Dt(L)?(a=M,Z(L)):jn(L)?(e.consume(L),M):V(L)}function D(L){return L===45||L===46||L===58||L===95||ti(L)?(e.consume(L),D):I(L)}function I(L){return L===61?(e.consume(L),B):Dt(L)?(a=I,Z(L)):jn(L)?(e.consume(L),I):M(L)}function B(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,G):Dt(L)?(a=B,Z(L)):jn(L)?(e.consume(L),B):(e.consume(L),U)}function G(L){return L===s?(e.consume(L),s=void 0,Q):L===null?t(L):Dt(L)?(a=G,Z(L)):(e.consume(L),G)}function U(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||wr(L)?M(L):(e.consume(L),U)}function Q(L){return L===47||L===62||wr(L)?M(L):t(L)}function V(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function Z(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),J}function J(L){return jn(L)?Sn(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):$(L)}function $(L){return e.enter("htmlTextData"),a(L)}}const oC={name:"labelEnd",resolveAll:tRn,resolveTo:nRn,tokenize:rRn},ZTn={tokenize:sRn},JTn={tokenize:iRn},eRn={tokenize:aRn};function tRn(e){let n=-1;const t=[];for(;++n=3&&(u===null||Dt(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),jn(u)?Sn(e,o,"whitespace")(u):o(u))}}const Pi={continuation:{tokenize:mRn},exit:vRn,name:"list",tokenize:pRn},dRn={partial:!0,tokenize:bRn},hRn={partial:!0,tokenize:gRn};function pRn(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:I5(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(_v,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 I5(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(Hm,r.interrupt?t:h,e.attempt(dRn,p,f))}function h(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function f(m){return jn(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 mRn(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Hm,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Sn(e,n,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!jn(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(hRn,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Sn(e,e.attempt(Pi,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function gRn(e,n,t){const r=this;return Sn(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 vRn(e){e.exit(this.containerState.type)}function bRn(e,n,t){const r=this;return Sn(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!jn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const mT={name:"setextUnderline",resolveTo:yRn,tokenize:xRn};function yRn(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 xRn(e,n,t){const r=this;let s;return i;function i(u){let h=r.events.length,f;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){f=r.events[h][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"),jn(u)?Sn(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Dt(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const wRn={tokenize:kRn};function kRn(e){const n=this,t=e.attempt(Hm,r,e.attempt(this.parser.constructs.flowInitial,s,Sn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(zTn,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 SRn={resolveAll:XP()},CRn=QP("string"),ERn=QP("text");function QP(e){return{resolveAll:XP(e==="text"?NRn: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(h){return u(h)?i(h):o(h)}function o(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),c}function c(h){return u(h)?(t.exit("data"),i(h)):(t.consume(h),c)}function u(h){if(h===null)return!0;const f=s[h];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 PRn(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"?FAn:HAn,r=eC(e.map((function(o){return o.changes})),EP).map(t).reduce((function(o,c){var u=In(o,2),h=u[0],f=u[1],p=In(c,2),m=p[0],w=p[1];return[h.concat(m),f.concat(w)]}),[[],[]]),s=In(r,2),i=s[0],a=s[1];return LAn(YA(i),YA(a))}var UAn=["enhancers"],tT=function(e){var n,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},r=t.enhancers,s=r===void 0?[]:r,i=In(xAn(e,qu(t,UAn)),2),a=i[0],o=i[1],c=[WA(a),WA(o)],u=(n=[c[0],c[1]],s.reduce((function(k,v){return v(k)}),n)),h=In(u,2),f=h[0],p=h[1],m=[f.map(QA),p.map(QA)],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 M5=["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(" "),GAn=2e3,VAn={highlight(e,n){return $t.highlight(e,n).children}};function KAn(e){return e.type==="normal"?e.newLineNumber:e.lineNumber}function Sy(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 WAn(e){return e.newPath==="/dev/null"?e.oldPath:(e.oldPath==="/dev/null",e.newPath)}function O5(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 QAn(e){const n=[qAn(e.hunks,{type:"line"})],t=a6(WAn(e));return t&&$t.registered(t)?tT(e.hunks,{enhancers:n,highlight:!0,language:t,refractor:VAn}):tT(e.hunks,{enhancers:n,highlight:!1})}function zP(e,n){if(!e.trim())return{files:[],failed:!1};try{return{files:C5(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:C5(e.slice(0,r),{nearbySequences:"zip"}),failed:!1}}catch{return{files:[],failed:!0}}}return{files:[],failed:!0}}}const XAn=({change:e,side:n})=>n==="old"?null:KAn(e);function jP({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:tQe()}),_.jsx("p",{children:nXe({limit:Ce(_l(n)),read:Ce(_l(e))})})]})}function AP({file:e,defaultExpanded:n}){const[t,r]=T.useState(n),{additions:s,deletions:i}=T.useMemo(()=>Sy(e),[e]),a=t&&s+i<=GAn,o=T.useMemo(()=>{if(a)try{return QAn(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(mc,{size:14}):_.jsx(Va,{size:14})}),_.jsx("span",{className:"path",children:_.jsx("code",{children:O5(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:jQe()}):_.jsx("div",{className:"diff-file-body min-w-0 py-3.5 bg-background",children:_.jsx(_An,{className:"openresearch-diff-file",diffType:e.type,gutterType:"default",hunks:e.hunks,renderGutter:XAn,tokens:o,viewType:"unified"})}))]})}function YAn({files:e,className:n}){return _.jsx("div",{className:n?`${M5} ${n}`:M5,children:e.map((t,r)=>_.jsx(AP,{file:t,defaultExpanded:r===0},`${t.oldPath}→${t.newPath}#${r}`))})}function ZAn(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 TP({diff:e,partial:n=!1}){var p;const t=T.useMemo(()=>zP(e,n),[e,n]),r=t.files,s=T.useMemo(()=>r.map((m,w)=>({file:m,key:`${m.oldPath}→${m.newPath}#${w}`,changes:Sy(m)})),[r]),[i,a]=T.useState(null),[o,c]=T.useState(!1),u=o&&!n,h=s.some(m=>m.key===i)?i:((p=s[0])==null?void 0:p.key)??null,f=s.find(m=>m.key===h)??null;return t.failed?_.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:n?wQe():QQe()}):s.length===0?_.jsx("div",{className:"diff-empty py-2 px-3 text-muted text-sm",children:pQe()}):_.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?HQe():cQe({count:Jt(s.length)}):s.length===1?zL():NL({count:Jt(s.length)})}),!n&&_.jsx("button",{type:"button",onClick:()=>c(m=>!m),children:u?DWe():lXe()})]}),u?_.jsx(YAn,{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":WWe(),children:s.map(m=>_.jsxs("button",{type:"button",className:m.key===h?"active":"","aria-pressed":m.key===h,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:ZAn(m.file)}),_.jsx("code",{title:O5(m.file),children:O5(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:`${M5} diff-explorer-preview min-w-0`,children:f&&_.jsx(AP,{file:f.file,defaultExpanded:!0},f.key)})]})]})}function JAn({expanded:e,experiments:n,runs:t,onOpenExperiment:r,rightOffset:s,activeView:i,projectId:a,onCompute:o,sessionId:c,busy:u,onChanges:h,onFiles:f,onTerminal:p,onArtifacts:m,onExperiments:w,onSideChat:k}){var A,z;const v=LNn(n,t,c),b=T.useRef(null),y=Vi(b),x=ut({...WI(a),enabled:e}),C=((A=x.data)==null?void 0:A.configuredDefaultBackend)??((z=x.data)==null?void 0:z.defaultBackend),N=C?vf[C]():x.isPending?"…":x.isError?fo():B3(),j=[{id:"files",label:N3(),Icon:Fu,onClick:f},{id:"artifacts",label:aL(),Icon:GS,onClick:m},{id:"experiments",label:oL(),Icon:Ah,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":gw(),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:gw()}),j.filter(M=>M.id!=="files").map(({id:M,label:D,Icon:I,onClick:B})=>_.jsx(vn,{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(I,{size:15}),D]})},M)),_.jsx(vn,{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(qS,{size:15,className:"shrink-0"}),Pwn()]}),_.jsxs("span",{className:"flex items-center gap-1.5 ps-[31px] text-menu text-subtext",children:[C&&_.jsx(Xh,{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:C4n()}),_.jsx(vn,{className:"min-h-7 py-1",onClick:f,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(Fu,{size:15}),N3()]})}),_.jsx(vn,{className:"min-h-7 py-1",onClick:p,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(bo,{size:15}),Fv()]})}),k&&_.jsx(vn,{className:"min-h-7 py-1",onClick:k,children:_.jsxs("span",{className:"flex items-center gap-4",children:[_.jsx(P0,{size:15}),F3()]})}),c&&_.jsx(eTn,{sessionId:c,busy:u,onChanges:h},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(Yd,{tone:"success",live:!0})}),_.jsx("span",{children:Mwn()})]}),v.map(M=>_.jsx(vn,{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} · ${G6(pa(M.run))}`,children:M.experiment.title||M.experiment.slug})},M.run.id))]})]})]}):_.jsxs("nav",{"aria-label":gw(),className:"flex items-center justify-end gap-3",children:[j.map(({id:M,label:D,Icon:I,onClick:B})=>_.jsx(It,{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(I,{size:15})},M)),_.jsxs("div",{className:"relative",children:[_.jsx(It,{ref:b,active:i==="terminal"||y.open,className:"text-text [&.active]:text-text","data-tip":y.open?void 0:yj(),"data-tip-align":"end","aria-label":yj(),"aria-expanded":y.open,"aria-haspopup":"menu",onClick:()=>y.setOpen(M=>!M),children:_.jsx(Lm,{size:15})}),y.open&&_.jsxs("div",{ref:y.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(vn,{role:"menuitem",onClick:()=>{y.setOpen(!1),p()},children:_.jsxs("span",{className:"flex items-center gap-2.5",children:[_.jsx(bo,{size:15}),Fv()]})}),k&&_.jsx(vn,{role:"menuitem",onClick:()=>{y.setOpen(!1),k()},children:_.jsxs("span",{className:"flex items-center gap-2.5",children:[_.jsx(P0,{size:15}),F3()]})})]})]})]})})}function eTn({sessionId:e,busy:n,onChanges:t}){var c,u;const r=ut({...tb(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 h=zP(a.diff.diff,!1);return h.failed?null:h.files.map(Sy).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(vn,{className:"min-h-7 py-1",onClick:t,title:a.branch??zS(),children:[_.jsxs("span",{className:"flex min-w-0 items-center gap-4",children:[_.jsx(Im,{size:15,className:"shrink-0"}),_.jsx("span",{children:gL()})]}),o?_.jsxs("span",{className:"flex shrink-0 gap-1 text-xs tabular-nums",children:[_.jsxs("span",{className:"text-accent-green",children:["+",Jt(o.additions)]}),_.jsxs("span",{className:"text-accent-red",children:["−",Jt(o.deletions)]})]}):_.jsx("span",{className:"shrink-0 text-xs text-subtext",children:((c=a.files)==null?void 0:c.length)===1?zL():NL({count:Jt(((u=a.files)==null?void 0:u.length)??0)})})]}):null}function tTn({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 h=Yb(u,!1,!0,"app"),{terminal:f,dispose:p}=h;s.current=h,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 b=C=>{v||(v=!0,f.options.disableStdin=!0,f.blur(),f.writeln(`\r +${C}`),a(C))},y=f.onData(C=>{k.readyState===WebSocket.OPEN&&k.send(new TextEncoder().encode(C))}),x=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}Df(N)&&(N.type==="exit"?b(_4n({code:String(N.code)})):N.type==="error"&&typeof N.error=="string"&&b(N.error))},k.onclose=()=>b(xj()),k.onerror=()=>b(xj()),()=>{k.onopen=null,k.onmessage=null,k.onerror=null,k.onclose=null,y.dispose(),x.dispose(),k.close(),s.current=null,p()}},[e,n,o]),T.useEffect(()=>{if(!t||i!==null)return;const u=requestAnimationFrame(()=>{var h,f;(h=s.current)==null||h.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":Fv(),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(De,{autoFocus:!0,onClick:()=>c(u=>u+1),children:v4n()})})]})}const nTn=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,rTn=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sTn={};function nT(e,n){return(sTn.jsx?rTn:nTn).test(e)}const iTn=/[ \t\n\f\r]/g;function aTn(e){return typeof e=="object"?e.type==="text"?rT(e.value):!1:rT(e)}function rT(e){return e.replace(iTn,"")===""}var Ed={},Lw,sT;function oTn(){if(sT)return Lw;sT=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="/",h="*",f="",p="comment",m="declaration";function w(v,b){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];b=b||{};var y=1,x=1;function C(q){var Q=q.match(n);Q&&(y+=Q.length);var K=q.lastIndexOf(c);x=~K?q.length-K:x+q.length}function N(){var q={line:y,column:x};return function(Q){return Q.position=new j(q),M(),Q}}function j(q){this.start=q,this.end={line:y,column:x},this.source=b.source}j.prototype.content=v;function A(q){var Q=new Error(b.source+":"+y+":"+x+": "+q);if(Q.reason=q,Q.filename=b.source,Q.line=y,Q.column=x,Q.source=v,!b.silent)throw Q}function z(q){var Q=q.exec(v);if(Q){var K=Q[0];return C(K),v=v.slice(K.length),Q}}function M(){z(t)}function D(q){var Q;for(q=q||[];Q=I();)Q!==!1&&q.push(Q);return q}function I(){var q=N();if(!(u!=v.charAt(0)||h!=v.charAt(1))){for(var Q=2;f!=v.charAt(Q)&&(h!=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 x+=2,C(K),v=v.slice(Q),x+=2,q({type:p,comment:K})}}function B(){var q=N(),Q=z(r);if(Q){if(I(),!z(s))return A("property missing ':'");var K=z(i),Z=q({type:m,property:k(Q[0].replace(e,f)),value:K?k(K[0].replace(e,f)):f});return z(a),Z}}function G(){var q=[];D(q);for(var Q;Q=B();)Q!==!1&&(q.push(Q),D(q));return q}return M(),G()}function k(v){return v?v.replace(o,f):f}return Lw=w,Lw}var iT;function cTn(){if(iT)return Ed;iT=1;var e=Ed&&Ed.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ed,"__esModule",{value:!0}),Ed.default=t;const n=e(oTn());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:h}=c;o?s(u,h,c):h&&(i=i||{},i[u]=h)}),i}return Ed}var Zp={},aT;function lTn(){if(aT)return Zp;aT=1,Object.defineProperty(Zp,"__esModule",{value:!0}),Zp.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,h){return h.toUpperCase()},o=function(u,h){return"".concat(h,"-")},c=function(u,h){return h===void 0&&(h={}),i(u)?u:(u=u.toLowerCase(),h.reactCompat?u=u.replace(s,o):u=u.replace(r,o),u.replace(n,a))};return Zp.camelCase=c,Zp}var Jp,oT;function uTn(){if(oT)return Jp;oT=1;var e=Jp&&Jp.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},n=e(cTn()),t=lTn();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,Jp=r,Jp}var _Tn=uTn();const fTn=Em(_Tn),RP=MP("end"),nC=MP("start");function MP(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 dTn(e){const n=nC(e),t=RP(e);if(n&&t)return{start:n,end:t}}function w0(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?cT(e.position):"start"in e||"end"in e?cT(e):"line"in e||"column"in e?D5(e):""}function D5(e){return lT(e&&e.line)+":"+lT(e&&e.column)}function cT(e){return D5(e&&e.start)+"-"+D5(e&&e.end)}function lT(e){return e&&typeof e=="number"?e:1}class ai 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=w0(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}}ai.prototype.file="";ai.prototype.name="";ai.prototype.reason="";ai.prototype.message="";ai.prototype.stack="";ai.prototype.column=void 0;ai.prototype.line=void 0;ai.prototype.ancestors=void 0;ai.prototype.cause=void 0;ai.prototype.fatal=void 0;ai.prototype.place=void 0;ai.prototype.ruleId=void 0;ai.prototype.source=void 0;const rC={}.hasOwnProperty,hTn=new Map,pTn=/[A-Z]/g,mTn=new Set(["table","tbody","thead","tfoot","tr"]),gTn=new Set(["td","th"]),OP="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function DP(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=CTn(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=STn(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"?oy:kB,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},i=LP(s,e,void 0);return i&&typeof i!="string"?i:s.create(e,s.Fragment,{children:i||void 0},void 0)}function LP(e,n,t){if(n.type==="element")return vTn(e,n,t);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return bTn(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return xTn(e,n,t);if(n.type==="mdxjsEsm")return yTn(e,n);if(n.type==="root")return wTn(e,n,t);if(n.type==="text")return kTn(e,n)}function vTn(e,n,t){const r=e.schema;let s=r;n.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=oy,e.schema=s),e.ancestors.push(n);const i=$P(e,n.tagName,!1),a=ETn(e,n);let o=iC(e,n);return mTn.has(n.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!aTn(c):!0})),IP(e,a,i,n),sC(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function bTn(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)}X0(e,n.position)}function yTn(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);X0(e,n.position)}function xTn(e,n,t){const r=e.schema;let s=r;n.name==="svg"&&r.space==="html"&&(s=oy,e.schema=s),e.ancestors.push(n);const i=n.name===null?e.Fragment:$P(e,n.name,!0),a=NTn(e,n),o=iC(e,n);return IP(e,a,i,n),sC(a,o),e.ancestors.pop(),e.schema=r,e.create(n,i,a,t)}function wTn(e,n,t){const r={};return sC(r,iC(e,n)),e.create(n,e.Fragment,r,t)}function kTn(e,n){return n.value}function IP(e,n,t,r){typeof t!="string"&&t!==e.Fragment&&e.passNode&&(n.node=r)}function sC(e,n){if(n.length>0){const t=n.length>1?n:n[0];t&&(e.children=t)}}function STn(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 CTn(e,n){return t;function t(r,s,i,a){const o=Array.isArray(i.children),c=nC(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 ETn(e,n){const t={};let r,s;for(s in n.properties)if(s!=="children"&&rC.call(n.properties,s)){const i=zTn(e,s,n.properties[s]);if(i){const[a,o]=i;e.tableCellAlignToStyle&&a==="align"&&typeof o=="string"&&gTn.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 NTn(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 X0(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 X0(e,n.position);else i=r.value===null?!0:r.value;t[s]=i}return t}function iC(e,n){const t=[];let r=-1;const s=e.passKeys?new Map:hTn;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?(va(e,e.length,0,n),e):n}const _T={}.hasOwnProperty;function PP(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 mo(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const vi=e_(/[A-Za-z]/),ni=e_(/[\dA-Za-z]/),ITn=e_(/[#-'*+\--9=?A-Z^-~]/);function sb(e){return e!==null&&(e<32||e===127)}const L5=e_(/\d/),$Tn=e_(/[\dA-Fa-f]/),BTn=e_(/[!-/:-@[-`{-~]/);function Dt(e){return e!==null&&e<-2}function wr(e){return e!==null&&(e<0||e===32)}function jn(e){return e===-2||e===-1||e===32}const Cy=e_(new RegExp("\\p{P}|\\p{S}","u")),bf=e_(/\s/);function e_(e){return n;function n(t){return t!==null&&t>-1&&e.test(String.fromCharCode(t))}}function ep(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 Sn(e,n,t,r){const s=r?r-1:Number.POSITIVE_INFINITY;let i=0;return a;function a(c){return jn(c)?(e.enter(t),o(c)):n(c)}function o(c){return jn(c)&&i++a))return;const A=n.events.length;let z=A,M,D;for(;z--;)if(n.events[z][0]==="exit"&&n.events[z][1].type==="chunkFlow"){if(M){D=n.events[z][1].end;break}M=!0}for(b(r),j=A;jx;){const N=t[C];n.containerState=N[1],N[0].exit.call(n,e)}t.length=x}function y(){s.write([null]),i=void 0,s=void 0,n.containerState._closeFlow=void 0}}function UTn(e,n,t){return Sn(e,e.attempt(this.parser.constructs.document,n,t),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Mh(e){if(e===null||wr(e)||bf(e))return 1;if(Cy(e))return 2}function Ey(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};dT(f,-c),dT(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=Ha(u,[["enter",e[r][1],n],["exit",e[r][1],n]])),u=Ha(u,[["enter",s,n],["enter",a,n],["exit",a,n],["enter",i,n]]),u=Ha(u,Ey(n.parser.constructs.insideSpan.null,e.slice(r+1,t),n)),u=Ha(u,[["exit",i,n],["enter",o,n],["exit",o,n],["exit",s,n]]),e[t][1].end.offset-e[t][1].start.offset?(h=2,u=Ha(u,[["enter",e[t][1],n],["exit",e[t][1],n]])):h=0,va(e,r-1,t-r+3,u),t=r+u.length-h-2;break}}for(t=-1;++t0&&jn(j)?Sn(e,y,"linePrefix",i+1)(j):y(j)}function y(j){return j===null||Dt(j)?e.check(hT,k,C)(j):(e.enter("codeFlowValue"),x(j))}function x(j){return j===null||Dt(j)?(e.exit("codeFlowValue"),y(j)):(e.consume(j),x)}function C(j){return e.exit("codeFenced"),n(j)}function N(j,A,z){let M=0;return D;function D(Q){return j.enter("lineEnding"),j.consume(Q),j.exit("lineEnding"),I}function I(Q){return j.enter("codeFencedFence"),jn(Q)?Sn(j,B,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Q):B(Q)}function B(Q){return Q===o?(j.enter("codeFencedFenceSequence"),G(Q)):z(Q)}function G(Q){return Q===o?(M++,j.consume(Q),G):M>=a?(j.exit("codeFencedFenceSequence"),jn(Q)?Sn(j,q,"whitespace")(Q):q(Q)):z(Q)}function q(Q){return Q===null||Dt(Q)?(j.exit("codeFencedFence"),A(Q)):z(Q)}}}function nRn(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 $w={name:"codeIndented",tokenize:sRn},rRn={partial:!0,tokenize:iRn};function sRn(e,n,t){const r=this;return s;function s(u){return e.enter("codeIndented"),Sn(e,i,"linePrefix",5)(u)}function i(u){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(u):t(u)}function a(u){return u===null?c(u):Dt(u)?e.attempt(rRn,a,c)(u):(e.enter("codeFlowValue"),o(u))}function o(u){return u===null||Dt(u)?(e.exit("codeFlowValue"),a(u)):(e.consume(u),o)}function c(u){return e.exit("codeIndented"),n(u)}}function iRn(e,n,t){const r=this;return s;function s(a){return r.parser.lazy[r.now().line]?t(a):Dt(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),s):Sn(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):Dt(a)?s(a):t(a)}}const aRn={name:"codeText",previous:cRn,resolve:oRn,tokenize:lRn};function oRn(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&&e0(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),e0(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),e0(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 VP(e,n,t,r,s,i,a,o,c){const u=c||Number.POSITIVE_INFINITY;let h=0;return f;function f(b){return b===60?(e.enter(r),e.enter(s),e.enter(i),e.consume(b),e.exit(i),p):b===null||b===32||b===41||sb(b)?t(b):(e.enter(r),e.enter(a),e.enter(o),e.enter("chunkString",{contentType:"string"}),k(b))}function p(b){return b===62?(e.enter(i),e.consume(b),e.exit(i),e.exit(s),e.exit(r),n):(e.enter(o),e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===62?(e.exit("chunkString"),e.exit(o),p(b)):b===null||b===60||Dt(b)?t(b):(e.consume(b),b===92?w:m)}function w(b){return b===60||b===62||b===92?(e.consume(b),m):m(b)}function k(b){return!h&&(b===null||b===41||wr(b))?(e.exit("chunkString"),e.exit(o),e.exit(a),e.exit(r),n(b)):h999||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):Dt(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===null||m===91||m===93||Dt(m)||o++>999?(e.exit("chunkString"),h(m)):(e.consume(m),c||(c=!jn(m)),m===92?p:f)}function p(m){return m===91||m===92||m===93?(e.consume(m),o++,f):f(m)}}function WP(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):Dt(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),Sn(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(p))}function h(p){return p===a||p===null||Dt(p)?(e.exit("chunkString"),u(p)):(e.consume(p),p===92?f:h)}function f(p){return p===a||p===92?(e.consume(p),h):h(p)}}function k0(e,n){let t;return r;function r(s){return Dt(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t=!0,r):jn(s)?Sn(e,r,t?"linePrefix":"lineSuffix")(s):n(s)}}const gRn={name:"definition",tokenize:bRn},vRn={partial:!0,tokenize:yRn};function bRn(e,n,t){const r=this;let s;return i;function i(m){return e.enter("definition"),a(m)}function a(m){return KP.call(r,e,o,t,"definitionLabel","definitionLabelMarker","definitionLabelString")(m)}function o(m){return s=mo(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)?k0(e,u)(m):u(m)}function u(m){return VP(e,h,t,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(m)}function h(m){return e.attempt(vRn,f,f)(m)}function f(m){return jn(m)?Sn(e,p,"whitespace")(m):p(m)}function p(m){return m===null||Dt(m)?(e.exit("definition"),r.parser.defined.push(s),n(m)):t(m)}}function yRn(e,n,t){return r;function r(o){return wr(o)?k0(e,s)(o):t(o)}function s(o){return WP(e,i,t,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function i(o){return jn(o)?Sn(e,a,"whitespace")(o):a(o)}function a(o){return o===null||Dt(o)?n(o):t(o)}}const xRn={name:"hardBreakEscape",tokenize:wRn};function wRn(e,n,t){return r;function r(i){return e.enter("hardBreakEscape"),e.consume(i),s}function s(i){return Dt(i)?(e.exit("hardBreakEscape"),n(i)):t(i)}}const kRn={name:"headingAtx",resolve:SRn,tokenize:CRn};function SRn(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"},va(e,r,t-r+1,[["enter",s,n],["enter",i,n],["exit",i,n],["exit",s,n]])),e}function CRn(e,n,t){let r=0;return s;function s(h){return e.enter("atxHeading"),i(h)}function i(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||wr(h)?(e.exit("atxHeadingSequence"),o(h)):t(h)}function o(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Dt(h)?(e.exit("atxHeading"),n(h)):jn(h)?Sn(e,o,"whitespace")(h):(e.enter("atxHeadingText"),u(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),o(h))}function u(h){return h===null||h===35||wr(h)?(e.exit("atxHeadingText"),o(h)):(e.consume(h),u)}}const ERn=["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"],mT=["pre","script","style","textarea"],NRn={concrete:!0,name:"htmlFlow",resolveTo:ARn,tokenize:TRn},zRn={partial:!0,tokenize:MRn},jRn={partial:!0,tokenize:RRn};function ARn(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 TRn(e,n,t){const r=this;let s,i,a,o,c;return u;function u(H){return h(H)}function h(H){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(H),f}function f(H){return H===33?(e.consume(H),p):H===47?(e.consume(H),i=!0,k):H===63?(e.consume(H),s=3,r.interrupt?n:L):vi(H)?(e.consume(H),a=String.fromCharCode(H),v):t(H)}function p(H){return H===45?(e.consume(H),s=2,m):H===91?(e.consume(H),s=5,o=0,w):vi(H)?(e.consume(H),s=4,r.interrupt?n:L):t(H)}function m(H){return H===45?(e.consume(H),r.interrupt?n:L):t(H)}function w(H){const oe="CDATA[";return H===oe.charCodeAt(o++)?(e.consume(H),o===oe.length?r.interrupt?n:B:w):t(H)}function k(H){return vi(H)?(e.consume(H),a=String.fromCharCode(H),v):t(H)}function v(H){if(H===null||H===47||H===62||wr(H)){const oe=H===47,ae=a.toLowerCase();return!oe&&!i&&mT.includes(ae)?(s=1,r.interrupt?n(H):B(H)):ERn.includes(a.toLowerCase())?(s=6,oe?(e.consume(H),b):r.interrupt?n(H):B(H)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?t(H):i?y(H):x(H))}return H===45||ni(H)?(e.consume(H),a+=String.fromCharCode(H),v):t(H)}function b(H){return H===62?(e.consume(H),r.interrupt?n:B):t(H)}function y(H){return jn(H)?(e.consume(H),y):D(H)}function x(H){return H===47?(e.consume(H),D):H===58||H===95||vi(H)?(e.consume(H),C):jn(H)?(e.consume(H),x):D(H)}function C(H){return H===45||H===46||H===58||H===95||ni(H)?(e.consume(H),C):N(H)}function N(H){return H===61?(e.consume(H),j):jn(H)?(e.consume(H),N):x(H)}function j(H){return H===null||H===60||H===61||H===62||H===96?t(H):H===34||H===39?(e.consume(H),c=H,A):jn(H)?(e.consume(H),j):z(H)}function A(H){return H===c?(e.consume(H),c=null,M):H===null||Dt(H)?t(H):(e.consume(H),A)}function z(H){return H===null||H===34||H===39||H===47||H===60||H===61||H===62||H===96||wr(H)?N(H):(e.consume(H),z)}function M(H){return H===47||H===62||jn(H)?x(H):t(H)}function D(H){return H===62?(e.consume(H),I):t(H)}function I(H){return H===null||Dt(H)?B(H):jn(H)?(e.consume(H),I):t(H)}function B(H){return H===45&&s===2?(e.consume(H),K):H===60&&s===1?(e.consume(H),Z):H===62&&s===4?(e.consume(H),F):H===63&&s===3?(e.consume(H),L):H===93&&s===5?(e.consume(H),$):Dt(H)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(zRn,U,G)(H)):H===null||Dt(H)?(e.exit("htmlFlowData"),G(H)):(e.consume(H),B)}function G(H){return e.check(jRn,q,U)(H)}function q(H){return e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),Q}function Q(H){return H===null||Dt(H)?G(H):(e.enter("htmlFlowData"),B(H))}function K(H){return H===45?(e.consume(H),L):B(H)}function Z(H){return H===47?(e.consume(H),a="",J):B(H)}function J(H){if(H===62){const oe=a.toLowerCase();return mT.includes(oe)?(e.consume(H),F):B(H)}return vi(H)&&a.length<8?(e.consume(H),a+=String.fromCharCode(H),J):B(H)}function $(H){return H===93?(e.consume(H),L):B(H)}function L(H){return H===62?(e.consume(H),F):H===45&&s===2?(e.consume(H),L):B(H)}function F(H){return H===null||Dt(H)?(e.exit("htmlFlowData"),U(H)):(e.consume(H),F)}function U(H){return e.exit("htmlFlow"),n(H)}}function RRn(e,n,t){const r=this;return s;function s(a){return Dt(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 MRn(e,n,t){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Hm,n,t)}}const ORn={name:"htmlText",tokenize:DRn};function DRn(e,n,t){const r=this;let s,i,a;return o;function o(L){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(L),c}function c(L){return L===33?(e.consume(L),u):L===47?(e.consume(L),N):L===63?(e.consume(L),x):vi(L)?(e.consume(L),z):t(L)}function u(L){return L===45?(e.consume(L),h):L===91?(e.consume(L),i=0,w):vi(L)?(e.consume(L),y):t(L)}function h(L){return L===45?(e.consume(L),m):t(L)}function f(L){return L===null?t(L):L===45?(e.consume(L),p):Dt(L)?(a=f,Z(L)):(e.consume(L),f)}function p(L){return L===45?(e.consume(L),m):f(L)}function m(L){return L===62?K(L):L===45?p(L):f(L)}function w(L){const F="CDATA[";return L===F.charCodeAt(i++)?(e.consume(L),i===F.length?k:w):t(L)}function k(L){return L===null?t(L):L===93?(e.consume(L),v):Dt(L)?(a=k,Z(L)):(e.consume(L),k)}function v(L){return L===93?(e.consume(L),b):k(L)}function b(L){return L===62?K(L):L===93?(e.consume(L),b):k(L)}function y(L){return L===null||L===62?K(L):Dt(L)?(a=y,Z(L)):(e.consume(L),y)}function x(L){return L===null?t(L):L===63?(e.consume(L),C):Dt(L)?(a=x,Z(L)):(e.consume(L),x)}function C(L){return L===62?K(L):x(L)}function N(L){return vi(L)?(e.consume(L),j):t(L)}function j(L){return L===45||ni(L)?(e.consume(L),j):A(L)}function A(L){return Dt(L)?(a=A,Z(L)):jn(L)?(e.consume(L),A):K(L)}function z(L){return L===45||ni(L)?(e.consume(L),z):L===47||L===62||wr(L)?M(L):t(L)}function M(L){return L===47?(e.consume(L),K):L===58||L===95||vi(L)?(e.consume(L),D):Dt(L)?(a=M,Z(L)):jn(L)?(e.consume(L),M):K(L)}function D(L){return L===45||L===46||L===58||L===95||ni(L)?(e.consume(L),D):I(L)}function I(L){return L===61?(e.consume(L),B):Dt(L)?(a=I,Z(L)):jn(L)?(e.consume(L),I):M(L)}function B(L){return L===null||L===60||L===61||L===62||L===96?t(L):L===34||L===39?(e.consume(L),s=L,G):Dt(L)?(a=B,Z(L)):jn(L)?(e.consume(L),B):(e.consume(L),q)}function G(L){return L===s?(e.consume(L),s=void 0,Q):L===null?t(L):Dt(L)?(a=G,Z(L)):(e.consume(L),G)}function q(L){return L===null||L===34||L===39||L===60||L===61||L===96?t(L):L===47||L===62||wr(L)?M(L):(e.consume(L),q)}function Q(L){return L===47||L===62||wr(L)?M(L):t(L)}function K(L){return L===62?(e.consume(L),e.exit("htmlTextData"),e.exit("htmlText"),n):t(L)}function Z(L){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),J}function J(L){return jn(L)?Sn(e,$,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):$(L)}function $(L){return e.enter("htmlTextData"),a(L)}}const oC={name:"labelEnd",resolveAll:BRn,resolveTo:PRn,tokenize:FRn},LRn={tokenize:HRn},IRn={tokenize:qRn},$Rn={tokenize:URn};function BRn(e){let n=-1;const t=[];for(;++n=3&&(u===null||Dt(u))?(e.exit("thematicBreak"),n(u)):t(u)}function c(u){return u===s?(e.consume(u),r++,c):(e.exit("thematicBreakSequence"),jn(u)?Sn(e,o,"whitespace")(u):o(u))}}const Pi={continuation:{tokenize:eMn},exit:nMn,name:"list",tokenize:JRn},YRn={partial:!0,tokenize:rMn},ZRn={partial:!0,tokenize:tMn};function JRn(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:L5(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(_v,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 L5(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(Hm,r.interrupt?t:h,e.attempt(YRn,p,f))}function h(m){return r.containerState.initialBlankLine=!0,i++,p(m)}function f(m){return jn(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 eMn(e,n,t){const r=this;return r.containerState._closeFlow=void 0,e.check(Hm,s,i);function s(o){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Sn(e,n,"listItemIndent",r.containerState.size+1)(o)}function i(o){return r.containerState.furtherBlankLines||!jn(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(ZRn,n,a)(o))}function a(o){return r.containerState._closeFlow=!0,r.interrupt=void 0,Sn(e,e.attempt(Pi,n,t),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function tMn(e,n,t){const r=this;return Sn(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 nMn(e){e.exit(this.containerState.type)}function rMn(e,n,t){const r=this;return Sn(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!jn(i)&&a&&a[1].type==="listItemPrefixWhitespace"?n(i):t(i)}}const gT={name:"setextUnderline",resolveTo:sMn,tokenize:iMn};function sMn(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 iMn(e,n,t){const r=this;let s;return i;function i(u){let h=r.events.length,f;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){f=r.events[h][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"),jn(u)?Sn(e,c,"lineSuffix")(u):c(u))}function c(u){return u===null||Dt(u)?(e.exit("setextHeadingLine"),n(u)):t(u)}}const aMn={tokenize:oMn};function oMn(e){const n=this,t=e.attempt(Hm,r,e.attempt(this.parser.constructs.flowInitial,s,Sn(e,e.attempt(this.parser.constructs.flow,s,e.attempt(fRn,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 cMn={resolveAll:XP()},lMn=QP("string"),uMn=QP("text");function QP(e){return{resolveAll:XP(e==="text"?_Mn: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(h){return u(h)?i(h):o(h)}function o(h){if(h===null){t.consume(h);return}return t.enter("data"),t.consume(h),c}function c(h){return u(h)?(t.exit("data"),i(h)):(t.consume(h),c)}function u(h){if(h===null)return!0;const f=s[h];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 SMn(e,n){let t=-1;const r=[];let s;for(;++t0){const st=qe.tokenStack[qe.tokenStack.length-1];(st[1]||vT).call(qe,void 0,st[0])}for(je.position={start:_u(me.length>0?me[0][1].start:{line:1,column:1,offset:0}),end:_u(me.length>0?me[me.length-2][1].end:{line:1,column:1,offset:0})},dt=-1;++dt0&&(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 JRn(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function eMn(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function tMn(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=ep(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 nMn(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 rMn(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function JP(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 sMn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return JP(e,n);const s={src:ep(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 iMn(e,n){const t={src:ep(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 aMn(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 oMn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return JP(e,n);const s={href:ep(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 cMn(e,n){const t={href:ep(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 lMn(e,n,t){const r=e.all(n),s=t?uMn(t):eF(n),i={},a=[];if(typeof n.checked=="boolean"){const h=r[0];let f;h&&h.type==="element"&&h.tagName==="p"?f=h:(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(;++o0){const st=qe.tokenStack[qe.tokenStack.length-1];(st[1]||bT).call(qe,void 0,st[0])}for(je.position={start:_u(ge.length>0?ge[0][1].start:{line:1,column:1,offset:0}),end:_u(ge.length>0?ge[ge.length-2][1].end:{line:1,column:1,offset:0})},dt=-1;++dt0&&(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 IMn(e,n){const t={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function $Mn(e,n){const t={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,t),e.applyData(n,t)}function BMn(e,n){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(n.identifier).toUpperCase(),s=ep(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 PMn(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 FMn(e,n){if(e.options.allowDangerousHtml){const t={type:"raw",value:n.value};return e.patch(n,t),e.applyData(n,t)}}function JP(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 HMn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return JP(e,n);const s={src:ep(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 qMn(e,n){const t={src:ep(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 UMn(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 GMn(e,n){const t=String(n.identifier).toUpperCase(),r=e.definitionById.get(t);if(!r)return JP(e,n);const s={href:ep(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 VMn(e,n){const t={href:ep(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 KMn(e,n,t){const r=e.all(n),s=t?WMn(t):eF(n),i={},a=[];if(typeof n.checked=="boolean"){const h=r[0];let f;h&&h.type==="element"&&h.tagName==="p"?f=h:(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 _Mn(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=nC(n.children[1]),c=RP(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 mMn(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(xT(n.slice(s),s>0,!1)),i.join("")}function xT(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===bT||i===yT;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===bT||i===yT;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function bMn(e,n){const t={type:"text",value:vMn(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function yMn(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const xMn={blockquote:XRn,break:YRn,code:ZRn,delete:JRn,emphasis:eMn,footnoteReference:tMn,heading:nMn,html:rMn,imageReference:sMn,image:iMn,inlineCode:aMn,linkReference:oMn,link:cMn,listItem:lMn,list:_Mn,paragraph:fMn,root:dMn,strong:hMn,table:pMn,tableCell:gMn,tableRow:mMn,text:bMn,thematicBreak:yMn,toml:S1,yaml:S1,definition:S1,footnoteDefinition:S1};function S1(){}const tF=-1,jy=0,S0=1,ib=2,cC=3,lC=4,uC=5,_C=6,nF=7,rF=8,wMn=typeof self=="object"?self:globalThis,wT=(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 wMn[e](n)},kMn=(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 jy:case tF:return t(a,s);case S0:{const o=t([],s);for(const c of a)o.push(r(c));return o}case ib:{const o=t({},s);for(const[c,u]of a)o[r(c)]=r(u);return o}case cC:return t(new Date(a),s);case lC:{const{source:o,flags:c}=a;return t(new RegExp(o,c),s)}case uC:{const o=t(new Map,s);for(const[c,u]of a)o.set(r(c),r(u));return o}case _C:{const o=t(new Set,s);for(const c of a)o.add(r(c));return o}case nF:{const{name:o,message:c}=a;return t(wT(o,c),s)}case rF: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(wT(i,a),s)};return r},kT=e=>kMn(new Map,e)(0),O_="",{toString:SMn}={},{keys:CMn}=Object,t0=e=>{const n=typeof e;if(n!=="object"||!e)return[jy,n];const t=SMn.call(e).slice(8,-1);switch(t){case"Array":return[S0,O_];case"Object":return[ib,O_];case"Date":return[cC,O_];case"RegExp":return[lC,O_];case"Map":return[uC,O_];case"Set":return[_C,O_];case"DataView":return[S0,t]}return t.includes("Array")?[S0,t]:t.includes("Error")?[nF,t]:[ib,t]},C1=([e,n])=>e===jy&&(n==="function"||n==="symbol"),EMn=(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]=t0(a);switch(o){case jy:{let h=a;switch(c){case"bigint":o=rF,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return s([tF],a)}return s([o,h],a)}case S0:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const h=[],f=s([o,h],a);for(const p of a)h.push(i(p));return f}case ib:{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 h=[],f=s([o,h],a);for(const p of CMn(a))(e||!C1(t0(a[p])))&&h.push([i(p),i(a[p])]);return f}case cC:return s([o,isNaN(a.getTime())?O_:a.toISOString()],a);case lC:{const{source:h,flags:f}=a;return s([o,{source:h,flags:f}],a)}case uC:{const h=[],f=s([o,h],a);for(const[p,m]of a)(e||!(C1(t0(p))||C1(t0(m))))&&h.push([i(p),i(m)]);return f}case _C:{const h=[],f=s([o,h],a);for(const p of a)(e||!C1(t0(p)))&&h.push(i(p));return f}}const{message:u}=a;return s([o,{name:c,message:u}],a)};return i},ST=(e,{json:n,lossy:t}={})=>{const r=[];return EMn(!(n||t),!!n,new Map,r)(e),r},ab=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?kT(ST(e,n)):structuredClone(e):(e,n)=>kT(ST(e,n));function NMn(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 zMn(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function jMn(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||NMn,r=e.options.footnoteBackLabel||zMn,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 y=typeof t=="string"?t:t(c,m);typeof y=="string"&&(y={type:"text",value:y}),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(y)?y:[y]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const y=v.children[v.children.length-1];y&&y.type==="text"?y.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...w)}else h.push(...w);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...ab(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 WMn(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const t=e.children;let r=-1;for(;!n&&++r1}function QMn(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=nC(n.children[1]),c=RP(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 eOn(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(wT(n.slice(s),s>0,!1)),i.join("")}function wT(e,n,t){let r=0,s=e.length;if(n){let i=e.codePointAt(r);for(;i===yT||i===xT;)r++,i=e.codePointAt(r)}if(t){let i=e.codePointAt(s-1);for(;i===yT||i===xT;)s--,i=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function rOn(e,n){const t={type:"text",value:nOn(String(n.value))};return e.patch(n,t),e.applyData(n,t)}function sOn(e,n){const t={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,t),e.applyData(n,t)}const iOn={blockquote:OMn,break:DMn,code:LMn,delete:IMn,emphasis:$Mn,footnoteReference:BMn,heading:PMn,html:FMn,imageReference:HMn,image:qMn,inlineCode:UMn,linkReference:GMn,link:VMn,listItem:KMn,list:QMn,paragraph:XMn,root:YMn,strong:ZMn,table:JMn,tableCell:tOn,tableRow:eOn,text:rOn,thematicBreak:sOn,toml:S1,yaml:S1,definition:S1,footnoteDefinition:S1};function S1(){}const tF=-1,zy=0,S0=1,ib=2,cC=3,lC=4,uC=5,_C=6,nF=7,rF=8,aOn=typeof self=="object"?self:globalThis,kT=(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 aOn[e](n)},oOn=(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 zy:case tF:return t(a,s);case S0:{const o=t([],s);for(const c of a)o.push(r(c));return o}case ib:{const o=t({},s);for(const[c,u]of a)o[r(c)]=r(u);return o}case cC:return t(new Date(a),s);case lC:{const{source:o,flags:c}=a;return t(new RegExp(o,c),s)}case uC:{const o=t(new Map,s);for(const[c,u]of a)o.set(r(c),r(u));return o}case _C:{const o=t(new Set,s);for(const c of a)o.add(r(c));return o}case nF:{const{name:o,message:c}=a;return t(kT(o,c),s)}case rF: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(kT(i,a),s)};return r},ST=e=>oOn(new Map,e)(0),D_="",{toString:cOn}={},{keys:lOn}=Object,t0=e=>{const n=typeof e;if(n!=="object"||!e)return[zy,n];const t=cOn.call(e).slice(8,-1);switch(t){case"Array":return[S0,D_];case"Object":return[ib,D_];case"Date":return[cC,D_];case"RegExp":return[lC,D_];case"Map":return[uC,D_];case"Set":return[_C,D_];case"DataView":return[S0,t]}return t.includes("Array")?[S0,t]:t.includes("Error")?[nF,t]:[ib,t]},C1=([e,n])=>e===zy&&(n==="function"||n==="symbol"),uOn=(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]=t0(a);switch(o){case zy:{let h=a;switch(c){case"bigint":o=rF,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return s([tF],a)}return s([o,h],a)}case S0:{if(c){let p=a;return c==="DataView"?p=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(p=new Uint8Array(a)),s([c,[...p]],a)}const h=[],f=s([o,h],a);for(const p of a)h.push(i(p));return f}case ib:{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 h=[],f=s([o,h],a);for(const p of lOn(a))(e||!C1(t0(a[p])))&&h.push([i(p),i(a[p])]);return f}case cC:return s([o,isNaN(a.getTime())?D_:a.toISOString()],a);case lC:{const{source:h,flags:f}=a;return s([o,{source:h,flags:f}],a)}case uC:{const h=[],f=s([o,h],a);for(const[p,m]of a)(e||!(C1(t0(p))||C1(t0(m))))&&h.push([i(p),i(m)]);return f}case _C:{const h=[],f=s([o,h],a);for(const p of a)(e||!C1(t0(p)))&&h.push(i(p));return f}}const{message:u}=a;return s([o,{name:c,message:u}],a)};return i},CT=(e,{json:n,lossy:t}={})=>{const r=[];return uOn(!(n||t),!!n,new Map,r)(e),r},ab=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?ST(CT(e,n)):structuredClone(e):(e,n)=>ST(CT(e,n));function _On(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 fOn(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function dOn(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",t=e.options.footnoteBackContent||_On,r=e.options.footnoteBackLabel||fOn,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 y=typeof t=="string"?t:t(c,m);typeof y=="string"&&(y={type:"text",value:y}),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(y)?y:[y]})}const v=h[h.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const y=v.children[v.children.length-1];y&&y.type==="text"?y.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(...w)}else h.push(...w);const b={type:"element",tagName:"li",properties:{id:n+"fn-"+p},children:e.wrap(h,!0)};e.patch(u,b),o.push(b)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:{...ab(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 qm=(function(e){if(e==null)return MMn;if(typeof e=="function")return Ay(e);if(typeof e=="object")return Array.isArray(e)?AMn(e):TMn(e);if(typeof e=="string")return RMn(e);throw new Error("Expected function, string, or object as test")});function AMn(e){const n=[];let t=-1;for(;++t":""))+")"})}return p;function p(){let m=sF,w,k,v;if((!n||i(c,u,h[h.length-1]||void 0))&&(m=LMn(t(c,h)),m[0]===B5))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==iF)for(k=(r?b.children.length:-1)+a,v=h.concat(b);k>-1&&k":""))+")"})}return p;function p(){let m=sF,w,k,v;if((!n||i(c,u,h[h.length-1]||void 0))&&(m=yOn(t(c,h)),m[0]===$5))return m;if("children"in c&&c.children){const b=c;if(b.children&&m[0]!==iF)for(k=(r?b.children.length:-1)+a,v=h.concat(b);k>-1&&k0&&t.push({type:"text",value:` -`}),t}function CT(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function ET(e,n){const t=$Mn(e,n),r=t.one(e,void 0),s=jMn(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` -`},s),i}function ob(e,n){return e&&"run"in e?async function(t,r){const s=ET(t,{file:r,...n});await e.run(s,r)}:function(t,r){return ET(t,{file:r,...e||n})}}function NT(e){if(e)throw e}var Fw,zT;function qMn(){if(zT)return Fw;zT=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 h=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!h&&!f)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,h){t&&h.name==="__proto__"?t(u,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):u[h.name]=h.newValue},o=function(u,h){if(h==="__proto__")if(e.call(u,h)){if(r)return r(u,h).value}else return;return u[h]};return Fw=function c(){var u,h,f,p,m,w,k=arguments[0],v=1,b=arguments.length,y=!1;for(typeof k=="boolean"&&(y=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 h=u;if(o&&t)throw h;return s(h)}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 Wo={basename:VMn,dirname:WMn,extname:QMn,join:XMn,sep:"/"};function VMn(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Um(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 WMn(e){if(Um(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 QMn(e){Um(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 XMn(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function ZMn(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 Um(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const JMn={cwd:eOn};function eOn(){return"/"}function H5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function tOn(e){if(typeof e=="string")e=new URL(e);else if(!H5(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 nOn(e)}function nOn(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]=h;const k=r[p][1];F5(k)&&F5(m)&&(m=Hw(!0,k,m)),r[p]=[u,m,...w]}}}}const Ty=new hC().freeze();function Kw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ww(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 AT(e){if(!F5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function TT(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function E1(e){return aOn(e)?e:new aF(e)}function aOn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function oOn(e){return typeof e=="string"||cOn(e)}function cOn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const lOn="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",RT=[],MT={allowDangerousHtml:!0},uOn=/^(https?|ircs?|mailto|xmpp)$/i,_On=[{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 fOn(e){const n=dOn(e),t=hOn(e);return pOn(n.runSync(n.parse(t),t),e)}function dOn(e){const n=e.rehypePlugins||RT,t=e.remarkPlugins||RT,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...MT}:MT;return Ty().use(zy).use(t).use(ob,r).use(n)}function hOn(e){const n=e.children||"",t=new aF;return typeof n=="string"&&(t.value=n),t}function pOn(e,n){const t=n.allowedElements,r=n.allowElement,s=n.components,i=n.disallowedElements,a=n.skipHtml,o=n.unwrapDisallowed,c=n.urlTransform||oF;for(const h of _On)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+lOn+h.id,void 0);return dC(e,u),DP(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function u(h,f,p){if(h.type==="raw"&&p&&typeof f=="number")return a?p.children.splice(f,1):p.children[f]={type:"text",value:h.value},f;if(h.type==="element"){let m;for(m in $w)if(Object.hasOwn($w,m)&&Object.hasOwn(h.properties,m)){const w=h.properties[m],k=$w[m];(k===null||k.includes(h.tagName))&&(h.properties[m]=c(String(w||""),m,h))}}if(h.type==="element"){let m=t?!t.includes(h.tagName):i?i.includes(h.tagName):!1;if(!m&&r&&typeof f=="number"&&(m=!r(h,f,p)),m&&p&&typeof f=="number")return o&&h.children?p.children.splice(f,1,...h.children):p.children.splice(f,1),f}}}function oF(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||uOn.test(e.slice(0,n))?e:""}function pC(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 h=u.startsWith("/"),f=h?[]: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&&(h||e.startsWith("/"))?"/":""}${f.join("/")}`,query:c,hash:i}}function mOn(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function U5(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 gOn(e){const n=Number.parseInt(e.replace(/^L/i,""),10);return n>0?n:void 0}function mC(e){return/^[a-z]:[\\/]/i.test(e)}function cF(e){const n=mC(e);if(!n&&pC(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 vOn(){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"&&U5(i).line!=null&&(t.properties["data-cited-href"]=i),t.properties[s]=s==="src"&&t.tagName==="img"&&mC(i)?i:oF(i)}(r=t.children)==null||r.forEach(n)};n(e)}}function bOn(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[h]!==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 OT(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const yOn=(e,n)=>Math.abs(e-n)<1.01,xOn=(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 n0;const Qw=()=>{if(n0!==void 0)return n0;if(typeof navigator>"u")return n0=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return n0=!0;const e=navigator.maxTouchPoints;return n0=navigator.platform==="MacIntel"&&e!==void 0&&e>0},DT=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},wOn=e=>e,lF=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(DT(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(DT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},cb={passive:!0},SOn=typeof window>"u"?!0:"onscrollend"in window,COn=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&SOn;let a=0;const o=i?null:xOn(s,()=>n(a,!1),e.options.isScrollingResetDelay),c=f=>()=>{a=t(r),o==null||o(),n(a,f)},u=c(!0),h=c(!1);return r.addEventListener("scroll",u,cb),i&&r.addEventListener("scrollend",h,cb),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",h),o==null||o.cancel()}},EOn=(e,n)=>COn(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),NOn=(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"]},zOn=(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})},jOn=zOn;class AOn{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,h]of this.elementsCache)if(h===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:wOn,rangeExtractor:lF,onChange:()=>{},measureElement:NOn,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 x=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;x&&(o=[x.key,this.getScrollOffset()-x.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 h=!1,f=0;if(o&&this.scrollOffset!==null){const[p,m]=o,w=this.getMeasurements(),{count:k,getItemKey:v}=this.options;let b=0;for(;b{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,t)},this.maybeNotify=Nd(()=>(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,!(!Qw()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,cb),i.addEventListener("touchend",o,cb),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&&(Qw()&&(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=Nd(()=>[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},h)=>{const f=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);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(b=>{this.itemSizeCache.set(b.key,b.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 b=t*2;let y=this._flatMeasurements;if(!y||y.length0&&N.set(y.subarray(0,p*2)),y=N,this._flatMeasurements=y}let x;if(p===0)x=r+s;else{const N=p-1;x=y[N*2]+y[N*2+1]+u}for(let N=p;N1){C=x;const D=w[C],I=D!==void 0?m[D]:void 0;N=I?I.end+u:r+s}else if(v===o){let D=0,I=k[0],B=w[0];for(let G=1;Gthis.options.debug}),this.calculateRange=Nd(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,s,i)=>t.length===0||r===0?(this.range=null,null):(this.range=ROn(t,r,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Nd(()=>{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 h=this.itemSizeCache.get(c)??a,f=r-h;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=uF(0,r.length-1,i?o=>s[o*2]:o=>OT(r[o]).start,t);return OT(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(Qw()&&(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&&yOn(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 uF=(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 TOn(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 ROn(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=TOn(s,i,t);let h=u;const f=t+n;for(;he[u].start,t),c=o;if(r===1)for(;c1){const u=Array(r).fill(0);for(;cf=0&&h.some(f=>f>=t);){const f=e[o];h[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 Xw=typeof document<"u"?T.useLayoutEffect:T.useEffect;function MOn({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=T.useReducer(h=>h+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=h=>{const f=i.current;if(!f.enabled||!f.container)return;const p=h.getTotalSize();if(p!==f.lastSize){f.lastSize=p;const m=h.options.horizontal?"width":"height";f.container.style[m]=`${p}px`}},o=h=>{const f=i.current;if(!f.enabled||!f.container)return;a(h);const p=!!h.options.horizontal,m=f.mode==="transform",w=p?"left":"top",k=h.options.scrollMargin,v=h.getVirtualItems();for(const b of v){const y=b.start-k,x=h.elementsCache.get(b.key);x&&f.lastPositions.get(x)!==y&&(f.lastPositions.set(x,y),m?x.style.transform=p?`translate3d(${y}px, 0, 0)`:`translate3d(0, ${y}px, 0)`:x.style[w]=`${y}px`)}},c={...r,onChange:(h,f)=>{var p;const m=i.current;let w=!0;if(m.enabled){o(h);const k=h.range,v=m.prevRange;w=!v||v.isScrolling!==h.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:h.isScrolling}:null)}w&&(e&&f?si.flushSync(s):s()),(p=r.onChange)==null||p.call(r,h,f)}},[u]=T.useState(()=>{const h=new AOn(c);return Object.assign(h,{containerRef:f=>{const p=i.current;if(p.container=f,p.lastSize=null,f&&p.enabled){const m=h.getTotalSize();p.lastSize=m;const w=h.options.horizontal?"width":"height";f.style[w]=`${m}px`}}})});return u.setOptions(c),Xw(()=>u._didMount(),[]),Xw(()=>(a(u),u._willUpdate())),Xw(()=>{o(u)}),u}function OOn(e){return MOn({observeElementRect:kOn,observeElementOffset:EOn,scrollToFn:jOn,...e})}function DOn(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 LOn(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 IOn(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 h=u.parentId??null,f=a.get(h);f?f.push(u):a.set(h,[u])}const o=new Set(n.map(u=>u.id)),c=new Map;for(const u of t){const h=LOn(u,i,a),f=h.findIndex(p=>o.has(p.id));c.set(u.id,{count:h.length,index:f,prevId:f>0?h[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 Oh(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 Gm(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function BOn(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 _F(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||Gm(r)||!Oh(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function fF(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=_F(n.parts);return t?{messageId:n.id,toolId:t}:null}function POn(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"||Gm(r)))return r.type==="text"&&!!r.text}return!1}function FOn(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 dF(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=>Oh(r))||!e.slice(0,t).some(r=>Oh(r))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function hF(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(` +`}),t}function ET(e){let n=0,t=e.charCodeAt(n);for(;t===9||t===32;)n++,t=e.charCodeAt(n);return e.slice(n)}function NT(e,n){const t=wOn(e,n),r=t.one(e,void 0),s=dOn(t),i=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&i.children.push({type:"text",value:` +`},s),i}function ob(e,n){return e&&"run"in e?async function(t,r){const s=NT(t,{file:r,...n});await e.run(s,r)}:function(t,r){return NT(t,{file:r,...e||n})}}function zT(e){if(e)throw e}var Pw,jT;function NOn(){if(jT)return Pw;jT=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 h=e.call(u,"constructor"),f=u.constructor&&u.constructor.prototype&&e.call(u.constructor.prototype,"isPrototypeOf");if(u.constructor&&!h&&!f)return!1;var p;for(p in u);return typeof p>"u"||e.call(u,p)},a=function(u,h){t&&h.name==="__proto__"?t(u,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):u[h.name]=h.newValue},o=function(u,h){if(h==="__proto__")if(e.call(u,h)){if(r)return r(u,h).value}else return;return u[h]};return Pw=function c(){var u,h,f,p,m,w,k=arguments[0],v=1,b=arguments.length,y=!1;for(typeof k=="boolean"&&(y=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 h=u;if(o&&t)throw h;return s(h)}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 Wo={basename:TOn,dirname:ROn,extname:MOn,join:OOn,sep:"/"};function TOn(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');Um(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 ROn(e){if(Um(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 MOn(e){Um(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 OOn(...e){let n=-1,t;for(;++n0&&e.codePointAt(e.length-1)===47&&(t+="/"),n?"/"+t:t}function LOn(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 Um(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const IOn={cwd:$On};function $On(){return"/"}function F5(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function BOn(e){if(typeof e=="string")e=new URL(e);else if(!F5(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 POn(e)}function POn(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]=h;const k=r[p][1];P5(k)&&P5(m)&&(m=Fw(!0,k,m)),r[p]=[u,m,...w]}}}}const Ay=new hC().freeze();function Gw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Vw(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Kw(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 TT(e){if(!P5(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function RT(e,n,t){if(!t)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function E1(e){return UOn(e)?e:new aF(e)}function UOn(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function GOn(e){return typeof e=="string"||VOn(e)}function VOn(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const KOn="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",MT=[],OT={allowDangerousHtml:!0},WOn=/^(https?|ircs?|mailto|xmpp)$/i,QOn=[{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 XOn(e){const n=YOn(e),t=ZOn(e);return JOn(n.runSync(n.parse(t),t),e)}function YOn(e){const n=e.rehypePlugins||MT,t=e.remarkPlugins||MT,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...OT}:OT;return Ay().use(Ny).use(t).use(ob,r).use(n)}function ZOn(e){const n=e.children||"",t=new aF;return typeof n=="string"&&(t.value=n),t}function JOn(e,n){const t=n.allowedElements,r=n.allowElement,s=n.components,i=n.disallowedElements,a=n.skipHtml,o=n.unwrapDisallowed,c=n.urlTransform||oF;for(const h of QOn)Object.hasOwn(n,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+KOn+h.id,void 0);return dC(e,u),DP(e,{Fragment:_.Fragment,components:s,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function u(h,f,p){if(h.type==="raw"&&p&&typeof f=="number")return a?p.children.splice(f,1):p.children[f]={type:"text",value:h.value},f;if(h.type==="element"){let m;for(m in Iw)if(Object.hasOwn(Iw,m)&&Object.hasOwn(h.properties,m)){const w=h.properties[m],k=Iw[m];(k===null||k.includes(h.tagName))&&(h.properties[m]=c(String(w||""),m,h))}}if(h.type==="element"){let m=t?!t.includes(h.tagName):i?i.includes(h.tagName):!1;if(!m&&r&&typeof f=="number"&&(m=!r(h,f,p)),m&&p&&typeof f=="number")return o&&h.children?p.children.splice(f,1,...h.children):p.children.splice(f,1),f}}}function oF(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||WOn.test(e.slice(0,n))?e:""}function pC(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function H5(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 h=u.startsWith("/"),f=h?[]: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&&(h||e.startsWith("/"))?"/":""}${f.join("/")}`,query:c,hash:i}}function eDn(e,n){return`${e}${n.query?`&${n.query}`:""}${n.hash}`}function q5(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 tDn(e){const n=Number.parseInt(e.replace(/^L/i,""),10);return n>0?n:void 0}function mC(e){return/^[a-z]:[\\/]/i.test(e)}function cF(e){const n=mC(e);if(!n&&pC(e))return null;const t=H5("",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 nDn(){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"&&q5(i).line!=null&&(t.properties["data-cited-href"]=i),t.properties[s]=s==="src"&&t.tagName==="img"&&mC(i)?i:oF(i)}(r=t.children)==null||r.forEach(n)};n(e)}}function rDn(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[h]!==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 DT(e,n){if(e===void 0)throw new Error("Unexpected undefined");return e}const sDn=(e,n)=>Math.abs(e-n)<1.01,iDn=(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 n0;const Ww=()=>{if(n0!==void 0)return n0;if(typeof navigator>"u")return n0=!1;if(/iP(hone|od|ad)/.test(navigator.userAgent))return n0=!0;const e=navigator.maxTouchPoints;return n0=navigator.platform==="MacIntel"&&e!==void 0&&e>0},LT=e=>{const{offsetWidth:n,offsetHeight:t}=e;return{width:n,height:t}},aDn=e=>e,lF=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(LT(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(LT(t))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(o):o()});return i.observe(t,{box:"border-box"}),()=>{i.unobserve(t)}},cb={passive:!0},cDn=typeof window>"u"?!0:"onscrollend"in window,lDn=(e,n,t)=>{const r=e.scrollElement;if(!r)return;const s=e.targetWindow;if(!s)return;const i=e.options.useScrollendEvent&&cDn;let a=0;const o=i?null:iDn(s,()=>n(a,!1),e.options.isScrollingResetDelay),c=f=>()=>{a=t(r),o==null||o(),n(a,f)},u=c(!0),h=c(!1);return r.addEventListener("scroll",u,cb),i&&r.addEventListener("scrollend",h,cb),()=>{r.removeEventListener("scroll",u),i&&r.removeEventListener("scrollend",h),o==null||o.cancel()}},uDn=(e,n)=>lDn(e,n,t=>{const{horizontal:r,isRtl:s}=e.options;return r?t.scrollLeft*(s&&-1||1):t.scrollTop}),_Dn=(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"]},fDn=(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})},dDn=fDn;class hDn{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,h]of this.elementsCache)if(h===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:aDn,rangeExtractor:lF,onChange:()=>{},measureElement:_Dn,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 x=p>0?this.getVirtualItemForOffset(this.getScrollOffset())??w[0]:null;x&&(o=[x.key,this.getScrollOffset()-x.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 h=!1,f=0;if(o&&this.scrollOffset!==null){const[p,m]=o,w=this.getMeasurements(),{count:k,getItemKey:v}=this.options;let b=0;for(;b{var r,s;(s=(r=this.options).onChange)==null||s.call(r,this,t)},this.maybeNotify=Nd(()=>(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,!(!Ww()||this.targetWindow==null)&&(this._iosJustTouchEnded=!0,this._iosTouchEndTimerId=this.targetWindow.setTimeout(()=>{this._iosJustTouchEnded=!1,this._iosTouchEndTimerId=null,this._flushIosDeferredIfReady()},150))};i.addEventListener("touchstart",a,cb),i.addEventListener("touchend",o,cb),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&&(Ww()&&(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=Nd(()=>[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},h)=>{const f=this.itemSizeCache;if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),this.laneAssignments.clear(),[];if(this.laneAssignments.size>t)for(const b of this.laneAssignments.keys())b>=t&&this.laneAssignments.delete(b);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(b=>{this.itemSizeCache.set(b.key,b.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 b=t*2;let y=this._flatMeasurements;if(!y||y.length0&&N.set(y.subarray(0,p*2)),y=N,this._flatMeasurements=y}let x;if(p===0)x=r+s;else{const N=p-1;x=y[N*2]+y[N*2+1]+u}for(let N=p;N1){C=x;const D=w[C],I=D!==void 0?m[D]:void 0;N=I?I.end+u:r+s}else if(v===o){let D=0,I=k[0],B=w[0];for(let G=1;Gthis.options.debug}),this.calculateRange=Nd(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(t,r,s,i)=>t.length===0||r===0?(this.range=null,null):(this.range=mDn(t,r,s,i,i===1&&this._flatMeasurements!=null?this._flatMeasurements:null),this.range),{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=Nd(()=>{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 h=this.itemSizeCache.get(c)??a,f=r-h;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=uF(0,r.length-1,i?o=>s[o*2]:o=>DT(r[o]).start,t);return DT(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(Ww()&&(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&&sDn(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 uF=(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 pDn(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 mDn(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=pDn(s,i,t);let h=u;const f=t+n;for(;he[u].start,t),c=o;if(r===1)for(;c1){const u=Array(r).fill(0);for(;cf=0&&h.some(f=>f>=t);){const f=e[o];h[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 Qw=typeof document<"u"?T.useLayoutEffect:T.useEffect;function gDn({useFlushSync:e=!0,directDomUpdates:n=!1,directDomUpdatesMode:t="transform",...r}){const s=T.useReducer(h=>h+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=h=>{const f=i.current;if(!f.enabled||!f.container)return;const p=h.getTotalSize();if(p!==f.lastSize){f.lastSize=p;const m=h.options.horizontal?"width":"height";f.container.style[m]=`${p}px`}},o=h=>{const f=i.current;if(!f.enabled||!f.container)return;a(h);const p=!!h.options.horizontal,m=f.mode==="transform",w=p?"left":"top",k=h.options.scrollMargin,v=h.getVirtualItems();for(const b of v){const y=b.start-k,x=h.elementsCache.get(b.key);x&&f.lastPositions.get(x)!==y&&(f.lastPositions.set(x,y),m?x.style.transform=p?`translate3d(${y}px, 0, 0)`:`translate3d(0, ${y}px, 0)`:x.style[w]=`${y}px`)}},c={...r,onChange:(h,f)=>{var p;const m=i.current;let w=!0;if(m.enabled){o(h);const k=h.range,v=m.prevRange;w=!v||v.isScrolling!==h.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:h.isScrolling}:null)}w&&(e&&f?ii.flushSync(s):s()),(p=r.onChange)==null||p.call(r,h,f)}},[u]=T.useState(()=>{const h=new hDn(c);return Object.assign(h,{containerRef:f=>{const p=i.current;if(p.container=f,p.lastSize=null,f&&p.enabled){const m=h.getTotalSize();p.lastSize=m;const w=h.options.horizontal?"width":"height";f.style[w]=`${m}px`}}})});return u.setOptions(c),Qw(()=>u._didMount(),[]),Qw(()=>(a(u),u._willUpdate())),Qw(()=>{o(u)}),u}function vDn(e){return gDn({observeElementRect:oDn,observeElementOffset:uDn,scrollToFn:dDn,...e})}function bDn(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 yDn(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 xDn(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 h=u.parentId??null,f=a.get(h);f?f.push(u):a.set(h,[u])}const o=new Set(n.map(u=>u.id)),c=new Map;for(const u of t){const h=yDn(u,i,a),f=h.findIndex(p=>o.has(p.id));c.set(u.id,{count:h.length,index:f,prevId:f>0?h[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 Oh(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 Gm(e){return e.id==="turn-retry"||e.id==="turn-recovery"}function kDn(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 _F(e){var n;for(let t=e.length-1;t>=0;t--){const r=e[t];if(!(r.type==="steer"||Gm(r)||!Oh(r)))return r.type!=="tool"||((n=r.state)==null?void 0:n.status)==="error"?null:r.id}return null}function fF(e){const n=e.at(-1);if((n==null?void 0:n.role)!=="assistant")return null;const t=_F(n.parts);return t?{messageId:n.id,toolId:t}:null}function SDn(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"||Gm(r)))return r.type==="text"&&!!r.text}return!1}function CDn(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 dF(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=>Oh(r))||!e.slice(0,t).some(r=>Oh(r))?{work:[],answer:e}:{work:e.slice(0,t),answer:e.slice(t)}}function hF(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 pF(e){return hF(dF(e.parts,!1).answer)}function HOn(e){for(let n=e.length-1;n>=0;n--){if(e[n].role!=="assistant")continue;const t=pF(e[n]);if(t)return t}return""}function qOn(e,n,t){const r=n.flatMap(s=>{const i=hF(s.parts);return i?[`## ${s.role==="user"?t.user:t.assistant} +`)}function pF(e){return hF(dF(e.parts,!1).answer)}function EDn(e){for(let n=e.length-1;n>=0;n--){if(e[n].role!=="assistant")continue;const t=pF(e[n]);if(t)return t}return""}function NDn(e,n,t){const r=n.flatMap(s=>{const i=hF(s.parts);return i?[`## ${s.role==="user"?t.user:t.assistant} ${i}`]:[]});return r.length===0?null:[`# ${e}`,...r].join(` `)+` -`}function UOn(e){return`${e.toLowerCase().replace(/[^\p{L}\p{N}]+/gu,"-").slice(0,80).replace(/^-+|-+$/g,"")||"chat"}.md`}function mF(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 G5(e){var t,r,s;if(mF(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 Ko=e=>new Intl.NumberFormat(E()).format(e);function GOn(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?Pzt():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?Ezt({attempt:Ko(e.attempt),maximum:Ko(e.maximum),seconds:Ko(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?bzt({attempt:Ko(e.attempt),maximum:Ko(e.maximum)}):typeof e.attempt=="number"&&t!=null?Mzt({attempt:Ko(e.attempt),seconds:Ko(t)}):typeof e.attempt=="number"?fzt({attempt:Ko(e.attempt)}):t!=null?Vzt({seconds:Ko(t)}):QL()}function KOn(e,n){if(typeof e!="number")return ejt();const t=Math.max(0,Math.ceil((e-n)/1e3));return ojt({seconds:Ko(t)})}function gF(e){return e==="retry"||e==="continue"?e:null}function VOn(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 Yw={draft:"",attachments:[],annotations:[]};function WOn(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 QOn(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function LT(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"||e==="pubmed"?e:void 0}function XOn(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 gC(e){const n=[];let t="",r=!1,s=null;const i=()=>{r&&n.push(t),t="",r=!1};for(let a=0;anew Intl.NumberFormat(E()).format(e);function jDn(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?Cjt():typeof e.attempt=="number"&&typeof e.maximum=="number"&&t!=null?_jt({attempt:Vo(e.attempt),maximum:Vo(e.maximum),seconds:Vo(t)}):typeof e.attempt=="number"&&typeof e.maximum=="number"?sjt({attempt:Vo(e.attempt),maximum:Vo(e.maximum)}):typeof e.attempt=="number"&&t!=null?vjt({attempt:Vo(e.attempt),seconds:Vo(t)}):typeof e.attempt=="number"?Yzt({attempt:Vo(e.attempt)}):t!=null?Rjt({seconds:Vo(t)}):QL()}function ADn(e,n){if(typeof e!="number")return Bjt();const t=Math.max(0,Math.ceil((e-n)/1e3));return Vjt({seconds:Vo(t)})}function gF(e){return e==="retry"||e==="continue"?e:null}function TDn(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 Xw={draft:"",attachments:[],annotations:[]};function RDn(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 MDn(e){return["*","?","[","]","{","}"].some(n=>e.includes(n))}function IT(e){return e==="alphaxiv"||e==="openalex"||e==="biorxiv"||e==="pubmed"?e:void 0}function ODn(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 gC(e){const n=[];let t="",r=!1,s=null;const i=()=>{r&&n.push(t),t="",r=!1};for(let a=0;a"||o==="&")break;/\s/.test(o)?i():(t+=o,r=!0)}return i(),n}function YOn(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=gC(e);if(t.length===1)return t[0]}return e}function ZOn(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 Dh(e){return ZOn(typeof e=="string"?gC(e):e)}function JOn(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 eDn(e,n){const t=Dh(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function tDn(e){var c;const n=Dh(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;u +`&&(t+=c,r=!0);continue}if(s){o===s?s=null:t+=o,r=!0;continue}if(o==='"'||o==="'"){s=o,r=!0;continue}if(o==="|"||o===";"||o===">"||o==="&")break;/\s/.test(o)?i():(t+=o,r=!0)}return i(),n}function DDn(e){const n=e[0];if((n==='"'||n==="'")&&e.at(-1)===n){const t=gC(e);if(t.length===1)return t[0]}return e}function LDn(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 Dh(e){return LDn(typeof e=="string"?gC(e):e)}function IDn(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 $Dn(e,n){const t=Dh(e);return t===null?!1:n.split("\\s+").every((s,i)=>t[i]!==void 0&&new RegExp(`^(?:${s})$`,"i").test(t[i]))}function BDn(e){var c;const n=Dh(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;u -`,rDn='',sDn=` +`,FDn='',HDn=` -`,iDn=`Pm -`,vF={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv",pubmed:"PubMed"},aDn={alphaxiv:nDn,openalex:sDn,biorxiv:rDn,pubmed:iDn};function bF({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":vF[e]},dangerouslySetInnerHTML:{__html:aDn[e]}})}function oDn(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 cDn(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=oDn(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 lDn=["alphaxiv","openalex","biorxiv","pubmed"];function uDn(){const e=Ukn(),{data:n}=ut(e),t=pn({mutationFn:H5n,onSuccess:i=>Vr(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:lDn.map(i=>{const a=n[i];return _.jsxs(vn,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[_.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[_.jsx(bF,{source:i,size:16,decorative:!0}),vF[i]]}),_.jsx(A6n,{checked:a,"aria-hidden":"true"})]},i)})}):_.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:Vet()})}function Zw(e,n){if(!e)throw new Error("Assertion Error")}function j_(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}var IT=Object.prototype.hasOwnProperty;function $T(e,n,t){for(t of e.keys())if(C0(t,n))return t}function C0(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--&&C0(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=$T(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=$T(n,s),!s)||!C0(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(IT.call(e,t)&&++r&&!IT.call(n,t)||!(t in n)||!C0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const _Dn=new Set(["table","tbody","thead","tfoot","tr"]),fDn=/^[\t\n\f\r ]*$/;function dDn(e,n,t={}){const r=yF(e,n??null,{Fragment:_.Fragment,components:t,jsx:_.jsx,jsxs:_.jsxs},void 0);return{react:r.react,state:r}}function yF(e,n,t,r){var k,v,b,y;if(n&&n.key===r&&e===n.node)return n;if(!("children"in e)||!Array.isArray(e.children))return n&&n.key===r&&Zd(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(x=>x.key).filter(x=>x!==void 0));let u=0;for(;u=e.children.length-h&&(j=s.length-(e.children.length-x)),j>=0&&(N=((b=s[j])==null?void 0:b.key)??N);N&&c.has(N)&&((y=s[j])==null?void 0:y.key)!==N;)N=`${N}+`;N&&c.add(N);const A=yF(C,s[j]??null,t,N);i.push(A),A.react!==void 0&&a.push(A.react)}const f=n!==null&&hDn(e,n.node);if(n&&n.key===r&&f&&s.length===i.length&&i.every((x,C)=>x===s[C]))return n;const p=e.type==="element"&&_Dn.has(e.tagName)?a.filter(x=>typeof x!="string"||!fDn.test(x)):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 x=DP({...e,children:[]},t);w={props:x.props,type:x.type}}return{children:i,key:r,node:e,react:_.jsx(w.type,{...w.props,children:m},r),shell:w}}function hDn(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return C0(s,o)}function Zd(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,ju,le(this,ju)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=BT(t)),le(this,ju)+NDn(t,r)}}ju=new WeakMap;const mDn=new Set(["*","**","_","__"]);function BT(e){const n={commitIndex:0,delims:[],exclusive:null,links:[],pendingDelim:null,pendingHtml:null};for(let t=0;tPm +`,vF={alphaxiv:"alphaXiv",openalex:"OpenAlex",biorxiv:"bioRxiv",pubmed:"PubMed"},UDn={alphaxiv:PDn,openalex:HDn,biorxiv:FDn,pubmed:qDn};function bF({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":vF[e]},dangerouslySetInnerHTML:{__html:UDn[e]}})}function GDn(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 VDn(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=GDn(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 KDn=["alphaxiv","openalex","biorxiv","pubmed"];function WDn(){const e=jSn(),{data:n}=ut(e),t=pn({mutationFn:Nkn,onSuccess:i=>Kr(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:KDn.map(i=>{const a=n[i];return _.jsxs(vn,{type:"button",role:"switch","aria-checked":a,disabled:r,onClick:()=>s(i),children:[_.jsxs("span",{className:"inline-flex items-center gap-[9px]",children:[_.jsx(bF,{source:i,size:16,decorative:!0}),vF[i]]}),_.jsx(pCn,{checked:a,"aria-hidden":"true"})]},i)})}):_.jsx("div",{className:"py-1.5 px-2 text-muted text-sm",children:Rtt()})}function Yw(e,n){if(!e)throw new Error("Assertion Error")}function A_(e,n){if(e==null)throw new Error(`Unexpected ${e}`);return e}var $T=Object.prototype.hasOwnProperty;function BT(e,n,t){for(t of e.keys())if(C0(t,n))return t}function C0(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--&&C0(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=BT(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=BT(n,s),!s)||!C0(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($T.call(e,t)&&++r&&!$T.call(n,t)||!(t in n)||!C0(e[t],n[t]))return!1;return Object.keys(n).length===r}}return e!==e&&n!==n}const QDn=new Set(["table","tbody","thead","tfoot","tr"]),XDn=/^[\t\n\f\r ]*$/;function YDn(e,n,t={}){const r=yF(e,n??null,{Fragment:_.Fragment,components:t,jsx:_.jsx,jsxs:_.jsxs},void 0);return{react:r.react,state:r}}function yF(e,n,t,r){var k,v,b,y;if(n&&n.key===r&&e===n.node)return n;if(!("children"in e)||!Array.isArray(e.children))return n&&n.key===r&&Zd(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(x=>x.key).filter(x=>x!==void 0));let u=0;for(;u=e.children.length-h&&(j=s.length-(e.children.length-x)),j>=0&&(N=((b=s[j])==null?void 0:b.key)??N);N&&c.has(N)&&((y=s[j])==null?void 0:y.key)!==N;)N=`${N}+`;N&&c.add(N);const A=yF(C,s[j]??null,t,N);i.push(A),A.react!==void 0&&a.push(A.react)}const f=n!==null&&ZDn(e,n.node);if(n&&n.key===r&&f&&s.length===i.length&&i.every((x,C)=>x===s[C]))return n;const p=e.type==="element"&&QDn.has(e.tagName)?a.filter(x=>typeof x!="string"||!XDn.test(x)):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 x=DP({...e,children:[]},t);w={props:x.props,type:x.type}}return{children:i,key:r,node:e,react:_.jsx(w.type,{...w.props,children:m},r),shell:w}}function ZDn(e,n){if(e===n)return!0;const{children:t,position:r,...s}=e,{children:i,position:a,...o}=n;return C0(s,o)}function Zd(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,ju,le(this,ju)+t.slice(0,r.commitIndex)),t=t.slice(r.commitIndex),r=PT(t)),le(this,ju)+_Ln(t,r)}}ju=new WeakMap;const eLn=new Set(["*","**","_","__"]);function PT(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(EDn(n)){PT(n,t,r);continue}const i=xDn(n,e,t);if(i>t){t=i-1;continue}const a=wDn(n,e,t);if(a>t){t=a-1;continue}go(e,t)||PT(n,t,r)}return n}function gDn(e,n,t){const r=n[t];return r==="`"?vDn(e,n,t):r==="$"?bDn(e,n,t):r==="~"?yDn(e,n,t):t}function vDn(e,n,t){const r=vC(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&lb(n,t)&&!go(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!go(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||go(n,t)?t+r:r>=3&&lb(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function bDn(e,n,t){const r=vC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!go(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||go(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function yDn(e,n,t){const r=vC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(lb(n,t)&&!go(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!lb(n,t)||go(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function xDn(e,n,t){if(n[t]!=="<"||go(n,t))return t;const r=n[t+1];if(r!==void 0&&!kF(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` -`)return e.pendingHtml=null,s+1;return n.length}function wDn(e,n,t){const r=kDn(n,t);if(!r)return t;if(go(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):(SDn(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function kDn(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 SDn(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!qT(s)||!qT(r)}function PT(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 CDn(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 EDn(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function NDn(e,n){n.pendingHtml!==null&&(e=e.slice(0,ADn(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return Uo(zDn(e,t));const r=jDn(n);if(r)return Uo(qd(e,r));const s=MDn(n);return s?s.kind==="delim"?Uo(K5(e,s.start,s.token.length)?xF(e,s.token):e.slice(0,s.start)):K5(e,s.start,s.token.length)?s.kind==="fence"?Uo(e):s.kind==="code"?Uo(qd(e,s.token)):s.token==="$$"?Uo(qd(e,(e.endsWith(` +`){lLn(n),n.exclusive||(n.commitIndex=t+1);continue}const s=tLn(n,e,t);if(s>t){t=s-1;continue}if(n.exclusive)continue;if(uLn(n)){FT(n,t,r);continue}const i=iLn(n,e,t);if(i>t){t=i-1;continue}const a=aLn(n,e,t);if(a>t){t=a-1;continue}go(e,t)||FT(n,t,r)}return n}function tLn(e,n,t){const r=n[t];return r==="`"?nLn(e,n,t):r==="$"?rLn(e,n,t):r==="~"?sLn(e,n,t):t}function nLn(e,n,t){const r=vC(n,t),s="`".repeat(r),i=e.exclusive;return(i==null?void 0:i.kind)==="fence"?(i.token[0]==="`"&&lb(n,t)&&!go(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):(i==null?void 0:i.kind)==="code"?(!go(n,t)&&r>=i.token.length&&(e.exclusive=null),t+r):i||go(n,t)?t+r:r>=3&&lb(n,t)?(e.exclusive={kind:"fence",start:t,token:s},t+r):(e.exclusive={kind:"code",start:t,token:s},t+r)}function rLn(e,n,t){const r=vC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="math"?(!go(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):(s||go(n,t)||(e.exclusive={kind:"math",start:t,token:r>=2?"$$":"$"}),t+r)}function sLn(e,n,t){const r=vC(n,t),s=e.exclusive;return(s==null?void 0:s.kind)==="fence"&&s.token[0]==="~"?(lb(n,t)&&!go(n,t)&&r>=s.token.length&&(e.exclusive=null),t+r):s||r<3||!lb(n,t)||go(n,t)?t:(e.exclusive={kind:"fence",start:t,token:"~".repeat(r)},t+r)}function iLn(e,n,t){if(n[t]!=="<"||go(n,t))return t;const r=n[t+1];if(r!==void 0&&!kF(r))return t;e.pendingHtml=t;for(let s=t+1;s"||n[s]===` +`)return e.pendingHtml=null,s+1;return n.length}function aLn(e,n,t){const r=oLn(n,t);if(!r)return t;if(go(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):(cLn(n,t,r)&&e.delims.push({start:t,token:r}),t+r.length)}function oLn(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 cLn(e,n,t){const r=e[n+t.length];if(!r||/\s/.test(r))return!1;const s=e[n-1];return!UT(s)||!UT(r)}function FT(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 lLn(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 uLn(e){var t;const n=(t=e.links.at(-1))==null?void 0:t.phase;return n==="url_wait"||n==="url"}function _Ln(e,n){n.pendingHtml!==null&&(e=e.slice(0,hLn(e,n.pendingHtml)));const t=n.links.at(-1);if(t)return Uo(fLn(e,t));const r=dLn(n);if(r)return Uo(qd(e,r));const s=gLn(n);return s?s.kind==="delim"?Uo(G5(e,s.start,s.token.length)?xF(e,s.token):e.slice(0,s.start)):G5(e,s.start,s.token.length)?s.kind==="fence"?Uo(e):s.kind==="code"?Uo(qd(e,s.token)):s.token==="$$"?Uo(qd(e,(e.endsWith(` `)?"":` -`)+"$$")):/\s/.test(e[e.length-1]??"")?Uo(e):Uo(qd(e,"$")):Uo(s.kind==="fence"?e:e.slice(0,s.start)):Uo(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function zDn(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return K5(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 jDn(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(!mDn.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function ADn(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!TDn(e,s,r))break;t=s,r=s}return t}function TDn(e,n,t){if(e[t-1]!==">"||go(e,n))return!1;const r=e[n+1];if(r!==void 0&&!kF(r))return!1;for(let s=n+1;s"||i===` +`)+"$$")):/\s/.test(e[e.length-1]??"")?Uo(e):Uo(qd(e,"$")):Uo(s.kind==="fence"?e:e.slice(0,s.start)):Uo(n.pendingDelim?e.slice(0,n.pendingDelim.start):e)}function fLn(e,n){const t=e.slice(0,n.start);if(n.phase==="text")return G5(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 dLn(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(!eLn.has(r))return;n.push(r)}if(!(n.length<2))return n.join("")}function hLn(e,n){let t=n,r=n;for(;r>0;){const s=e.lastIndexOf("<",r-1);if(s===-1||!pLn(e,s,r))break;t=s,r=s}return t}function pLn(e,n,t){if(e[t-1]!==">"||go(e,n))return!1;const r=e[n+1];if(r!==void 0&&!kF(r))return!1;for(let s=n+1;s"||i===` `)return!1}return!0}function Uo(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(FT(a)<2&&!ODn(a,o))return r;const c=a.trimEnd().endsWith("|")?a:xF(a," |"),u=FT(c),h=u<2?0:c.trimEnd().endsWith("|")?u-1:u;if(h===0)return e;const f=i===-1?"":s.slice(i+1),p=HT(o,Array.from({length:h},()=>"-"));if(f.length===0)return r+c+` +`),a=i===-1?s:s.slice(0,i),o=(v=a.match(/^( *)\|/))==null?void 0:v[1];if(o===void 0)return e;if(HT(a)<2&&!vLn(a,o))return r;const c=a.trimEnd().endsWith("|")?a:xF(a," |"),u=HT(c),h=u<2?0:c.trimEnd().endsWith("|")?u-1:u;if(h===0)return e;const f=i===-1?"":s.slice(i+1),p=qT(o,Array.from({length:h},()=>"-"));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(DDn(w,o,h))return e;if(w.startsWith(o+"|")&&/^[ |:\-\t]*$/.test(w.slice(o.length))){const b=wF(w,o).map(y=>{const x=y.trim();if(x.length===0)return"-";let C=0;for(let N=0;N1&&x.endsWith(":")?":":"")});for(;b.length{const x=y.trim();if(x.length===0)return"-";let C=0;for(let N=0;N1&&x.endsWith(":")?":":"")});for(;b.length0;t-=1)if(e.endsWith(n.slice(0,t)))return t;return 0}function MDn(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 FT(e){let n=0;for(let t=0;t0}function HT(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function wF(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function DDn(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=wF(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function vC(e,n){let t=n+1;for(;tn+t}function lb(e,n){return n===0||e[n-1]===` -`}function go(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function qT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function kF(e){return!!e&&/[A-Za-z]/.test(e)}const SF=Ty().use(zy);var xm,xh,wh,J_,kh,wm,km,Sm,ef,Cm,tf;class LDn{constructor(){lt(this,xm,SF);lt(this,xh,null);lt(this,wh,{});lt(this,J_,null);lt(this,kh,"");lt(this,wm,[]);lt(this,km,[]);lt(this,Sm,[]);lt(this,ef,0);lt(this,Cm,[]);lt(this,tf,[])}reconfigure(n,t,r){le(this,xh)!==null&&le(this,xm)===n&&CF(le(this,wh),r)&&!!le(this,J_)===t||(Ge(this,xm,n),n.attachers.some(s=>s[0]===ob)||(n=n(),n.use(ob),n.freeze()),Ge(this,xh,n),Ge(this,wh,r),Ge(this,kh,""),Ge(this,wm,[]),Ge(this,km,[]),Ge(this,Sm,[]),Ge(this,ef,0),Ge(this,Cm,[]),Ge(this,J_,t?new pDn:null))}update(n){le(this,J_)&&(n=le(this,J_).update(n));let t=le(this,kh);if(n===t)return le(this,tf);const r=le(this,wm),s=IDn(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=j_(le(this,xh)),c=le(this,km),u=c.slice(i).some(j=>j.some(V5));let h=o.parse(n.slice(a)),f=h.children.map(j=>j_(j_(j.position).start.offset)+a);Ge(this,kh,n),Zw(r.length===c.length),r.splice(i,r.length-i,...f);{const j=Jw(h,f,a);Zw(j.length===f.length),c.splice(i,c.length-i,...j)}if(u||V5(h)){i=0,a=0,h=o.parse(n),f=h.children.map(A=>j_(j_(A.position).start.offset)+a),r.splice(0,r.length,...f);const j=Jw(h,f,a);Zw(j.length===f.length),c.splice(0,c.length,...j)}const p=Jw(o.runSync(h),f,a),m=le(this,Sm),w=le(this,Cm),k=le(this,tf),v=w.length;let b=null,y=0;for(;yv&&(m.length=w.length=r.length);for(let j=r.length=C?M=v-(r.length-A):A=v){m[A]=String(le(this,ef)),Ge(this,ef,le(this,ef)+1),w[A]=null,b&&(b[A]=void 0);continue}m[A]=m[M]??String(Hp(this,ef)._++),w[A]=w[M]??null,b&&(b[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=h):h&&(u!==void 0&&u>-1&&c.push(` -`.repeat(u)||" "),u=-1,c.push(h))}return c.join("")}function jF(e,n,t){return e.type==="element"?sLn(e,n,t):e.type==="text"?t.whitespace==="normal"?AF(e,t):iLn(e):[]}function sLn(e,n,t){const r=TF(e,t),s=e.children||[];let i=-1,a=[];if(nLn(e))return a;let o,c;for(W5(e)||XT(e)&&KT(n,e,XT)?c=` -`:tLn(e)?(o=2,c=2):zF(e)&&(o=1,c=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var h;i+15e.replace(uLn,"-$1").toLowerCase(),fLn={"&":"&",">":">","<":"<",'"':""","'":"'"},dLn=/[&><"']/g,ri=e=>String(e).replace(dLn,n=>fLn[n]),fv=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?fv(e.body[0]):e:e.type==="font"?fv(e.body):e,hLn=new Set(["mathord","textord","atom"]),El=e=>hLn.has(fv(e).type),pLn=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"},Q5={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 mLn(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 gLn(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return mLn(n)}function vLn(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:gLn(r)}class yC{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(Q5)){var r=Q5[t];r&&vLn(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 Je("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=pLn(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class fu{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 ec[bLn[this.id]]}sub(){return ec[yLn[this.id]]}fracNum(){return ec[xLn[this.id]]}fracDen(){return ec[wLn[this.id]]}cramp(){return ec[kLn[this.id]]}text(){return ec[SLn[this.id]]}isTight(){return this.size>=2}}var xC=0,ub=1,Jd=2,gl=3,Y0=4,qa=5,Lh=6,vi=7,ec=[new fu(xC,0,!1),new fu(ub,0,!0),new fu(Jd,1,!1),new fu(gl,1,!0),new fu(Y0,2,!1),new fu(qa,2,!0),new fu(Lh,3,!1),new fu(vi,3,!0)],bLn=[Y0,qa,Y0,qa,Lh,vi,Lh,vi],yLn=[qa,qa,qa,qa,vi,vi,vi,vi],xLn=[Jd,gl,Y0,qa,Lh,vi,Lh,vi],wLn=[gl,gl,qa,qa,vi,vi,vi,vi],kLn=[ub,ub,gl,gl,qa,qa,vi,vi],SLn=[xC,ub,Jd,gl,Jd,gl,Jd,gl],nn={DISPLAY:ec[xC],TEXT:ec[Jd],SCRIPT:ec[Y0],SCRIPTSCRIPT:ec[Lh]},X5=[{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 CLn(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var dv=[];X5.forEach(e=>e.blocks.forEach(n=>dv.push(...n)));function RF(e){for(var n=0;n=dv[n]&&e<=dv[n+1])return!0;return!1}var Es=e=>e+" "+e,zd=80,ELn=function(n,t){return"M95,"+(622+n+t)+` +`+f}function qd(e,n){return e+n.slice(mLn(e,n))}function xF(e,n){var s;const t=(s=e.match(/[^\S\n]+$/))==null?void 0:s[0];if(!t)return qd(e,n);const r=e.slice(0,-t.length);return qd(r,n)+t}function mLn(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 gLn(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 HT(e){let n=0;for(let t=0;t0}function qT(e,n){return e+"|"+n.map(t=>` ${t} |`).join("")}function wF(e,n){const t=e.slice(n.length+1).split("|");return e.trimEnd().endsWith("|")&&t.pop(),t}function bLn(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=wF(r,"").map(i=>i.trim());return s.length===t&&s.every(i=>/^:?-+:?$/.test(i))}function vC(e,n){let t=n+1;for(;tn+t}function lb(e,n){return n===0||e[n-1]===` +`}function go(e,n){let t=0;for(let r=n-1;r>=0&&e[r]==="\\";r--)t+=1;return t%2===1}function UT(e){return!!e&&/[A-Za-z0-9]/.test(e)}function kF(e){return!!e&&/[A-Za-z]/.test(e)}const SF=Ay().use(Ny);var xm,xh,wh,ef,kh,wm,km,Sm,tf,Cm,nf;class yLn{constructor(){lt(this,xm,SF);lt(this,xh,null);lt(this,wh,{});lt(this,ef,null);lt(this,kh,"");lt(this,wm,[]);lt(this,km,[]);lt(this,Sm,[]);lt(this,tf,0);lt(this,Cm,[]);lt(this,nf,[])}reconfigure(n,t,r){le(this,xh)!==null&&le(this,xm)===n&&CF(le(this,wh),r)&&!!le(this,ef)===t||(Ge(this,xm,n),n.attachers.some(s=>s[0]===ob)||(n=n(),n.use(ob),n.freeze()),Ge(this,xh,n),Ge(this,wh,r),Ge(this,kh,""),Ge(this,wm,[]),Ge(this,km,[]),Ge(this,Sm,[]),Ge(this,tf,0),Ge(this,Cm,[]),Ge(this,ef,t?new JDn:null))}update(n){le(this,ef)&&(n=le(this,ef).update(n));let t=le(this,kh);if(n===t)return le(this,nf);const r=le(this,wm),s=xLn(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=A_(le(this,xh)),c=le(this,km),u=c.slice(i).some(j=>j.some(V5));let h=o.parse(n.slice(a)),f=h.children.map(j=>A_(A_(j.position).start.offset)+a);Ge(this,kh,n),Yw(r.length===c.length),r.splice(i,r.length-i,...f);{const j=Zw(h,f,a);Yw(j.length===f.length),c.splice(i,c.length-i,...j)}if(u||V5(h)){i=0,a=0,h=o.parse(n),f=h.children.map(A=>A_(A_(A.position).start.offset)+a),r.splice(0,r.length,...f);const j=Zw(h,f,a);Yw(j.length===f.length),c.splice(0,c.length,...j)}const p=Zw(o.runSync(h),f,a),m=le(this,Sm),w=le(this,Cm),k=le(this,nf),v=w.length;let b=null,y=0;for(;yv&&(m.length=w.length=r.length);for(let j=r.length=C?M=v-(r.length-A):A=v){m[A]=String(le(this,tf)),Ge(this,tf,le(this,tf)+1),w[A]=null,b&&(b[A]=void 0);continue}m[A]=m[M]??String(Hp(this,tf)._++),w[A]=w[M]??null,b&&(b[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=h):h&&(u!==void 0&&u>-1&&c.push(` +`.repeat(u)||" "),u=-1,c.push(h))}return c.join("")}function jF(e,n,t){return e.type==="element"?HLn(e,n,t):e.type==="text"?t.whitespace==="normal"?AF(e,t):qLn(e):[]}function HLn(e,n,t){const r=TF(e,t),s=e.children||[];let i=-1,a=[];if(PLn(e))return a;let o,c;for(K5(e)||YT(e)&&KT(n,e,YT)?c=` +`:BLn(e)?(o=2,c=2):zF(e)&&(o=1,c=1);++i15?u="…"+o.slice(s-15,s):u=o.slice(0,s);var h;i+15e.replace(WLn,"-$1").toLowerCase(),XLn={"&":"&",">":">","<":"<",'"':""","'":"'"},YLn=/[&><"']/g,si=e=>String(e).replace(YLn,n=>XLn[n]),fv=e=>e.type==="ordgroup"||e.type==="color"?e.body.length===1?fv(e.body[0]):e:e.type==="font"?fv(e.body):e,ZLn=new Set(["mathord","textord","atom"]),El=e=>ZLn.has(fv(e).type),JLn=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"},W5={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 eIn(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 tIn(e){if(e.default!==void 0)return e.default;var n=Array.isArray(e.type)?e.type[0]:e.type;return eIn(n)}function nIn(e,n,t,r){var s=t[n];e[n]=s!==void 0?r.processor?r.processor(s):s:tIn(r)}class yC{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(W5)){var r=W5[t];r&&nIn(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 Je("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=JLn(n.url);if(t==null)return!1;n.protocol=t}var r=typeof this.trust=="function"?this.trust(n):this.trust;return!!r}}class fu{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 ec[rIn[this.id]]}sub(){return ec[sIn[this.id]]}fracNum(){return ec[iIn[this.id]]}fracDen(){return ec[aIn[this.id]]}cramp(){return ec[oIn[this.id]]}text(){return ec[cIn[this.id]]}isTight(){return this.size>=2}}var xC=0,ub=1,Jd=2,gl=3,Y0=4,qa=5,Lh=6,bi=7,ec=[new fu(xC,0,!1),new fu(ub,0,!0),new fu(Jd,1,!1),new fu(gl,1,!0),new fu(Y0,2,!1),new fu(qa,2,!0),new fu(Lh,3,!1),new fu(bi,3,!0)],rIn=[Y0,qa,Y0,qa,Lh,bi,Lh,bi],sIn=[qa,qa,qa,qa,bi,bi,bi,bi],iIn=[Jd,gl,Y0,qa,Lh,bi,Lh,bi],aIn=[gl,gl,qa,qa,bi,bi,bi,bi],oIn=[ub,ub,gl,gl,qa,qa,bi,bi],cIn=[xC,ub,Jd,gl,Jd,gl,Jd,gl],nn={DISPLAY:ec[xC],TEXT:ec[Jd],SCRIPT:ec[Y0],SCRIPTSCRIPT:ec[Lh]},Q5=[{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 lIn(e){for(var n=0;n=s[0]&&e<=s[1])return t.name}return null}var dv=[];Q5.forEach(e=>e.blocks.forEach(n=>dv.push(...n)));function RF(e){for(var n=0;n=dv[n]&&e<=dv[n+1])return!0;return!1}var Ns=e=>e+" "+e,zd=80,uIn=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 @@ -782,7 +782,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"},NLn=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"},_In=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+` @@ -792,7 +792,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"},zLn=function(n,t){return"M983 "+(10+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},fIn=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 @@ -801,7 +801,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"},jLn=function(n,t){return"M424,"+(2398+n+t)+` +M`+(1001+n)+" "+t+"h400000v"+(40+n)+"h-400000z"},dIn=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 @@ -811,18 +811,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"},ALn=function(n,t){return"M473,"+(2713+n+t)+` +h400000v`+(40+n)+"h-400000z"},hIn=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"},TLn=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},RLn=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"},pIn=function(n){var t=n/2;return"M400000 "+n+" H0 L"+t+" 0 l65 45 L145 "+(n-80)+" H400000z"},mIn=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"},MLn=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=ELn(t,zd);break;case"sqrtSize1":s=NLn(t,zd);break;case"sqrtSize2":s=zLn(t,zd);break;case"sqrtSize3":s=jLn(t,zd);break;case"sqrtSize4":s=ALn(t,zd);break;case"sqrtTall":s=RLn(t,zd,r)}return s},OLn=function(n,t){switch(n){case"⎜":return Es("M291 0 H417 V"+t+" H291z");case"∣":return Es("M145 0 H188 V"+t+" H145z");case"∥":return Es("M145 0 H188 V"+t+" H145z")+Es("M367 0 H410 V"+t+" H367z");case"⎟":return Es("M457 0 H583 V"+t+" H457z");case"⎢":return Es("M319 0 H403 V"+t+" H319z");case"⎥":return Es("M263 0 H347 V"+t+" H263z");case"⎪":return Es("M384 0 H504 V"+t+" H384z");case"⏐":return Es("M312 0 H355 V"+t+" H312z");case"‖":return Es("M257 0 H300 V"+t+" H257z")+Es("M478 0 H521 V"+t+" H478z");default:return""}},YT={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+t+"H400000v"+(40+n)+"H742z"},gIn=function(n,t,r){t=1e3*t;var s="";switch(n){case"sqrtMain":s=uIn(t,zd);break;case"sqrtSize1":s=_In(t,zd);break;case"sqrtSize2":s=fIn(t,zd);break;case"sqrtSize3":s=dIn(t,zd);break;case"sqrtSize4":s=hIn(t,zd);break;case"sqrtTall":s=mIn(t,zd,r)}return s},vIn=function(n,t){switch(n){case"⎜":return Ns("M291 0 H417 V"+t+" H291z");case"∣":return Ns("M145 0 H188 V"+t+" H145z");case"∥":return Ns("M145 0 H188 V"+t+" H145z")+Ns("M367 0 H410 V"+t+" H367z");case"⎟":return Ns("M457 0 H583 V"+t+" H457z");case"⎢":return Ns("M319 0 H403 V"+t+" H319z");case"⎥":return Ns("M263 0 H347 V"+t+" H263z");case"⎪":return Ns("M384 0 H504 V"+t+" H384z");case"⏐":return Ns("M312 0 H355 V"+t+" H312z");case"‖":return Ns("M257 0 H300 V"+t+" H257z")+Ns("M478 0 H521 V"+t+" H478z");default:return""}},ZT={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 @@ -868,10 +868,10 @@ m0 0v40h400000v-40z`,leftharpoondown:`M7 241c-4 4-6.333 8.667-7 14 0 5.333.667 9 v40h399900v-40zM0 241v40h399900v-40zm0 0v40h399900v-40z`,lefthook:`M400000 281 H103s-33-11.2-61-33.5S0 197.3 0 164s14.2-61.2 42.5 -83.5C70.8 58.2 104 47 142 47 c16.7 0 25 6.7 25 20 0 12-8.7 18.7-26 20-40 3.3 -68.7 15.7-86 37-10 12-15 25.3-15 40 0 22.7 9.8 40.7 29.5 54 19.7 13.3 43.5 21 - 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Es("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Es("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Es("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Es("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 + 71.5 23h399859zM103 281v-40h399897v40z`,leftlinesegment:Ns("M40 281 V428 H0 V94 H40 V241 H400000 v40z"),leftbracketunder:Ns("M0 0 h120 V290 H399995 v120 H0z"),leftbracketover:Ns("M0 440 h120 V150 H399995 v-120 H0z"),leftmapsto:Ns("M40 281 V448H0V74H40V241H400000v40z"),leftToFrom:`M0 147h400000v40H0zm0 214c68 40 115.7 95.7 143 167h22c15.3 0 23 -.3 23-1 0-1.3-5.3-13.7-16-37-18-35.3-41.3-69-70-101l-7-8h399905v-40H95l7-8 c28.7-32 52-65.7 70-101 10.7-23.3 16-35.7 16-37 0-.7-7.7-1-23-1h-22C115.7 265.3 - 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Es("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 + 68 321 0 361zm0-174v-40h399900v40zm100 154v40h399900v-40z`,longequal:Ns("M0 50 h400000 v40H0z m0 194h40000v40H0z"),midbrace:`M200428 334 c-100.7-8.3-195.3-44-280-108-55.3-42-101.7-93-139-153l-9-14c-2.7 4-5.7 8.7-9 14 -53.3 86.7-123.7 153-211 199-66.7 36-137.3 56.3-212 62H0V214h199568c178.3-11.7 311.7-78.3 403-201 6-8 9.7-12 11-12 .7-.7 6.7-1 18-1s17.3.3 18 1c1.3 0 5 4 11 @@ -920,7 +920,7 @@ m0 0v40h399900v-40z m100 194v40h399900v-40zm0 0v40h399900v-40z`,rightharpoondown m0-194v40h400000v-40zm0 0v40h400000v-40z`,righthook:`M399859 241c-764 0 0 0 0 0 40-3.3 68.7-15.7 86-37 10-12 15-25.3 15-40 0-22.7-9.8-40.7-29.5-54-19.7-13.3-43.5-21-71.5-23-17.3-1.3-26-8-26-20 0 -13.3 8.7-20 26-20 38 0 71 11.2 99 33.5 0 0 7 5.6 21 16.7 14 11.2 21 33.5 21 - 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Es("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Es("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Es("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 + 66.8s-14 61.2-42 83.5c-28 22.3-61 33.5-99 33.5L0 241z M0 281v-40h399859v40z`,rightlinesegment:Ns("M399960 241 V94 h40 V428 h-40 V281 H0 v-40z"),rightbracketunder:Ns("M399995 0 h-120 V290 H0 v120 H400000z"),rightbracketover:Ns("M399995 440 h-120 V150 H0 v-120 H399995z"),rightToFrom:`M400000 167c-70.7-42-118-97.7-142-167h-23c-15.3 0-23 .3-23 1 0 1.3 5.3 13.7 16 37 18 35.3 41.3 69 70 101l7 8H0v40h399905l-7 8c-28.7 32 -52 65.7-70 101-10.7 23.3-16 35.7-16 37 0 .7 7.7 1 23 1h23c24-69.3 71.3-125 142 -167z M100 147v40h399900v-40zM0 341v40h399900v-40z`,twoheadleftarrow:`M0 167c68 40 @@ -993,7 +993,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`},DLn=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`},bIn=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 @@ -1021,70 +1021,70 @@ 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 LLn(e){return"toText"in e}class tp{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(LLn(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var Y5={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},ILn={ex:!0,em:!0,mu:!0},MF=function(n){return typeof n!="string"&&(n=n.unit),n in Y5||n in ILn||n==="ex"},$r=function(n,t){var r;if(n.unit in Y5)r=Y5[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 Je("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},at=function(n){return+n.toFixed(4)+"em"},qu=function(n){return n.filter(t=>t).join(" ")},wC=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=_Ln(r)+":"+s+";")}return t},OF=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)}},DF=function(n){var t=document.createElement(n);t.className=qu(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]/,LF=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+ri(qu(this.classes))+'"');var r=wC(this.style);r&&(t+=' style="'+ri(r)+'"');for(var s of Object.keys(this.attributes)){if($Ln.test(s))throw new Je("Invalid attribute name '"+s+"'");t+=" "+s+'="'+ri(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class np{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,OF.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return DF.call(this,"span")}toMarkup(){return LF.call(this,"span")}}class Ry{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,OF.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 DF.call(this,"a")}toMarkup(){return LF.call(this,"a")}}class BLn{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=''+ri(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=at(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=qu(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:"+at(this.italic)+";"),r+=wC(this.style),r&&(n=!0,t+=' style="'+ri(r)+'"');var s=ri(this.text);return n?(t+=">",t+=s,t+="",t):s}}class xl{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 Z5{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 qLn=e=>e instanceof np||e instanceof Ry||e instanceof tp,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]}},N1={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]},ZT={Å:"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 ULn(e,n){nc[e]=n}function kC(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 ZT&&(r=ZT[e[0]].charCodeAt(0),s=nc[n][r]),!s&&t==="text"&&RF(r)&&(s=nc[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var t4={};function GLn(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!t4[n]){var t=t4[n]={cssEmPerMu:N1.quad[n]/18};for(var r in N1)N1.hasOwnProperty(r)&&(t[r]=N1[r][n])}return t4[n]}var Ar={math:{},text:{}};function H(e,n,t,r,s,i){Ar[e][s]={font:n,group:t,replace:r},i&&r&&(Ar[e][r]=Ar[e][s])}var W="math",Ke="text",ee="main",fe="ams",Rr="accent-token",ht="bin",ki="close",rp="inner",Kt="mathord",ps="op-token",Ea="open",Km="punct",de="rel",Nl="spacing",ye="textord";H(W,ee,de,"≡","\\equiv",!0);H(W,ee,de,"≺","\\prec",!0);H(W,ee,de,"≻","\\succ",!0);H(W,ee,de,"∼","\\sim",!0);H(W,ee,de,"⊥","\\perp");H(W,ee,de,"⪯","\\preceq",!0);H(W,ee,de,"⪰","\\succeq",!0);H(W,ee,de,"≃","\\simeq",!0);H(W,ee,de,"∣","\\mid",!0);H(W,ee,de,"≪","\\ll",!0);H(W,ee,de,"≫","\\gg",!0);H(W,ee,de,"≍","\\asymp",!0);H(W,ee,de,"∥","\\parallel");H(W,ee,de,"⋈","\\bowtie",!0);H(W,ee,de,"⌣","\\smile",!0);H(W,ee,de,"⊑","\\sqsubseteq",!0);H(W,ee,de,"⊒","\\sqsupseteq",!0);H(W,ee,de,"≐","\\doteq",!0);H(W,ee,de,"⌢","\\frown",!0);H(W,ee,de,"∋","\\ni",!0);H(W,ee,de,"∝","\\propto",!0);H(W,ee,de,"⊢","\\vdash",!0);H(W,ee,de,"⊣","\\dashv",!0);H(W,ee,de,"∋","\\owns");H(W,ee,Km,".","\\ldotp");H(W,ee,Km,"⋅","\\cdotp");H(W,ee,Km,"⋅","·");H(Ke,ee,ye,"⋅","·");H(W,ee,ye,"#","\\#");H(Ke,ee,ye,"#","\\#");H(W,ee,ye,"&","\\&");H(Ke,ee,ye,"&","\\&");H(W,ee,ye,"ℵ","\\aleph",!0);H(W,ee,ye,"∀","\\forall",!0);H(W,ee,ye,"ℏ","\\hbar",!0);H(W,ee,ye,"∃","\\exists",!0);H(W,ee,ye,"∇","\\nabla",!0);H(W,ee,ye,"♭","\\flat",!0);H(W,ee,ye,"ℓ","\\ell",!0);H(W,ee,ye,"♮","\\natural",!0);H(W,ee,ye,"♣","\\clubsuit",!0);H(W,ee,ye,"℘","\\wp",!0);H(W,ee,ye,"♯","\\sharp",!0);H(W,ee,ye,"♢","\\diamondsuit",!0);H(W,ee,ye,"ℜ","\\Re",!0);H(W,ee,ye,"♡","\\heartsuit",!0);H(W,ee,ye,"ℑ","\\Im",!0);H(W,ee,ye,"♠","\\spadesuit",!0);H(W,ee,ye,"§","\\S",!0);H(Ke,ee,ye,"§","\\S");H(W,ee,ye,"¶","\\P",!0);H(Ke,ee,ye,"¶","\\P");H(W,ee,ye,"†","\\dag");H(Ke,ee,ye,"†","\\dag");H(Ke,ee,ye,"†","\\textdagger");H(W,ee,ye,"‡","\\ddag");H(Ke,ee,ye,"‡","\\ddag");H(Ke,ee,ye,"‡","\\textdaggerdbl");H(W,ee,ki,"⎱","\\rmoustache",!0);H(W,ee,Ea,"⎰","\\lmoustache",!0);H(W,ee,ki,"⟯","\\rgroup",!0);H(W,ee,Ea,"⟮","\\lgroup",!0);H(W,ee,ht,"∓","\\mp",!0);H(W,ee,ht,"⊖","\\ominus",!0);H(W,ee,ht,"⊎","\\uplus",!0);H(W,ee,ht,"⊓","\\sqcap",!0);H(W,ee,ht,"∗","\\ast");H(W,ee,ht,"⊔","\\sqcup",!0);H(W,ee,ht,"◯","\\bigcirc",!0);H(W,ee,ht,"∙","\\bullet",!0);H(W,ee,ht,"‡","\\ddagger");H(W,ee,ht,"≀","\\wr",!0);H(W,ee,ht,"⨿","\\amalg");H(W,ee,ht,"&","\\And");H(W,ee,de,"⟵","\\longleftarrow",!0);H(W,ee,de,"⇐","\\Leftarrow",!0);H(W,ee,de,"⟸","\\Longleftarrow",!0);H(W,ee,de,"⟶","\\longrightarrow",!0);H(W,ee,de,"⇒","\\Rightarrow",!0);H(W,ee,de,"⟹","\\Longrightarrow",!0);H(W,ee,de,"↔","\\leftrightarrow",!0);H(W,ee,de,"⟷","\\longleftrightarrow",!0);H(W,ee,de,"⇔","\\Leftrightarrow",!0);H(W,ee,de,"⟺","\\Longleftrightarrow",!0);H(W,ee,de,"↦","\\mapsto",!0);H(W,ee,de,"⟼","\\longmapsto",!0);H(W,ee,de,"↗","\\nearrow",!0);H(W,ee,de,"↩","\\hookleftarrow",!0);H(W,ee,de,"↪","\\hookrightarrow",!0);H(W,ee,de,"↘","\\searrow",!0);H(W,ee,de,"↼","\\leftharpoonup",!0);H(W,ee,de,"⇀","\\rightharpoonup",!0);H(W,ee,de,"↙","\\swarrow",!0);H(W,ee,de,"↽","\\leftharpoondown",!0);H(W,ee,de,"⇁","\\rightharpoondown",!0);H(W,ee,de,"↖","\\nwarrow",!0);H(W,ee,de,"⇌","\\rightleftharpoons",!0);H(W,fe,de,"≮","\\nless",!0);H(W,fe,de,"","\\@nleqslant");H(W,fe,de,"","\\@nleqq");H(W,fe,de,"⪇","\\lneq",!0);H(W,fe,de,"≨","\\lneqq",!0);H(W,fe,de,"","\\@lvertneqq");H(W,fe,de,"⋦","\\lnsim",!0);H(W,fe,de,"⪉","\\lnapprox",!0);H(W,fe,de,"⊀","\\nprec",!0);H(W,fe,de,"⋠","\\npreceq",!0);H(W,fe,de,"⋨","\\precnsim",!0);H(W,fe,de,"⪹","\\precnapprox",!0);H(W,fe,de,"≁","\\nsim",!0);H(W,fe,de,"","\\@nshortmid");H(W,fe,de,"∤","\\nmid",!0);H(W,fe,de,"⊬","\\nvdash",!0);H(W,fe,de,"⊭","\\nvDash",!0);H(W,fe,de,"⋪","\\ntriangleleft");H(W,fe,de,"⋬","\\ntrianglelefteq",!0);H(W,fe,de,"⊊","\\subsetneq",!0);H(W,fe,de,"","\\@varsubsetneq");H(W,fe,de,"⫋","\\subsetneqq",!0);H(W,fe,de,"","\\@varsubsetneqq");H(W,fe,de,"≯","\\ngtr",!0);H(W,fe,de,"","\\@ngeqslant");H(W,fe,de,"","\\@ngeqq");H(W,fe,de,"⪈","\\gneq",!0);H(W,fe,de,"≩","\\gneqq",!0);H(W,fe,de,"","\\@gvertneqq");H(W,fe,de,"⋧","\\gnsim",!0);H(W,fe,de,"⪊","\\gnapprox",!0);H(W,fe,de,"⊁","\\nsucc",!0);H(W,fe,de,"⋡","\\nsucceq",!0);H(W,fe,de,"⋩","\\succnsim",!0);H(W,fe,de,"⪺","\\succnapprox",!0);H(W,fe,de,"≆","\\ncong",!0);H(W,fe,de,"","\\@nshortparallel");H(W,fe,de,"∦","\\nparallel",!0);H(W,fe,de,"⊯","\\nVDash",!0);H(W,fe,de,"⋫","\\ntriangleright");H(W,fe,de,"⋭","\\ntrianglerighteq",!0);H(W,fe,de,"","\\@nsupseteqq");H(W,fe,de,"⊋","\\supsetneq",!0);H(W,fe,de,"","\\@varsupsetneq");H(W,fe,de,"⫌","\\supsetneqq",!0);H(W,fe,de,"","\\@varsupsetneqq");H(W,fe,de,"⊮","\\nVdash",!0);H(W,fe,de,"⪵","\\precneqq",!0);H(W,fe,de,"⪶","\\succneqq",!0);H(W,fe,de,"","\\@nsubseteqq");H(W,fe,ht,"⊴","\\unlhd");H(W,fe,ht,"⊵","\\unrhd");H(W,fe,de,"↚","\\nleftarrow",!0);H(W,fe,de,"↛","\\nrightarrow",!0);H(W,fe,de,"⇍","\\nLeftarrow",!0);H(W,fe,de,"⇏","\\nRightarrow",!0);H(W,fe,de,"↮","\\nleftrightarrow",!0);H(W,fe,de,"⇎","\\nLeftrightarrow",!0);H(W,fe,de,"△","\\vartriangle");H(W,fe,ye,"ℏ","\\hslash");H(W,fe,ye,"▽","\\triangledown");H(W,fe,ye,"◊","\\lozenge");H(W,fe,ye,"Ⓢ","\\circledS");H(W,fe,ye,"®","\\circledR");H(Ke,fe,ye,"®","\\circledR");H(W,fe,ye,"∡","\\measuredangle",!0);H(W,fe,ye,"∄","\\nexists");H(W,fe,ye,"℧","\\mho");H(W,fe,ye,"Ⅎ","\\Finv",!0);H(W,fe,ye,"⅁","\\Game",!0);H(W,fe,ye,"‵","\\backprime");H(W,fe,ye,"▲","\\blacktriangle");H(W,fe,ye,"▼","\\blacktriangledown");H(W,fe,ye,"■","\\blacksquare");H(W,fe,ye,"⧫","\\blacklozenge");H(W,fe,ye,"★","\\bigstar");H(W,fe,ye,"∢","\\sphericalangle",!0);H(W,fe,ye,"∁","\\complement",!0);H(W,fe,ye,"ð","\\eth",!0);H(Ke,ee,ye,"ð","ð");H(W,fe,ye,"╱","\\diagup");H(W,fe,ye,"╲","\\diagdown");H(W,fe,ye,"□","\\square");H(W,fe,ye,"□","\\Box");H(W,fe,ye,"◊","\\Diamond");H(W,fe,ye,"¥","\\yen",!0);H(Ke,fe,ye,"¥","\\yen",!0);H(W,fe,ye,"✓","\\checkmark",!0);H(Ke,fe,ye,"✓","\\checkmark");H(W,fe,ye,"ℶ","\\beth",!0);H(W,fe,ye,"ℸ","\\daleth",!0);H(W,fe,ye,"ℷ","\\gimel",!0);H(W,fe,ye,"ϝ","\\digamma",!0);H(W,fe,ye,"ϰ","\\varkappa");H(W,fe,Ea,"┌","\\@ulcorner",!0);H(W,fe,ki,"┐","\\@urcorner",!0);H(W,fe,Ea,"└","\\@llcorner",!0);H(W,fe,ki,"┘","\\@lrcorner",!0);H(W,fe,de,"≦","\\leqq",!0);H(W,fe,de,"⩽","\\leqslant",!0);H(W,fe,de,"⪕","\\eqslantless",!0);H(W,fe,de,"≲","\\lesssim",!0);H(W,fe,de,"⪅","\\lessapprox",!0);H(W,fe,de,"≊","\\approxeq",!0);H(W,fe,ht,"⋖","\\lessdot");H(W,fe,de,"⋘","\\lll",!0);H(W,fe,de,"≶","\\lessgtr",!0);H(W,fe,de,"⋚","\\lesseqgtr",!0);H(W,fe,de,"⪋","\\lesseqqgtr",!0);H(W,fe,de,"≑","\\doteqdot");H(W,fe,de,"≓","\\risingdotseq",!0);H(W,fe,de,"≒","\\fallingdotseq",!0);H(W,fe,de,"∽","\\backsim",!0);H(W,fe,de,"⋍","\\backsimeq",!0);H(W,fe,de,"⫅","\\subseteqq",!0);H(W,fe,de,"⋐","\\Subset",!0);H(W,fe,de,"⊏","\\sqsubset",!0);H(W,fe,de,"≼","\\preccurlyeq",!0);H(W,fe,de,"⋞","\\curlyeqprec",!0);H(W,fe,de,"≾","\\precsim",!0);H(W,fe,de,"⪷","\\precapprox",!0);H(W,fe,de,"⊲","\\vartriangleleft");H(W,fe,de,"⊴","\\trianglelefteq");H(W,fe,de,"⊨","\\vDash",!0);H(W,fe,de,"⊪","\\Vvdash",!0);H(W,fe,de,"⌣","\\smallsmile");H(W,fe,de,"⌢","\\smallfrown");H(W,fe,de,"≏","\\bumpeq",!0);H(W,fe,de,"≎","\\Bumpeq",!0);H(W,fe,de,"≧","\\geqq",!0);H(W,fe,de,"⩾","\\geqslant",!0);H(W,fe,de,"⪖","\\eqslantgtr",!0);H(W,fe,de,"≳","\\gtrsim",!0);H(W,fe,de,"⪆","\\gtrapprox",!0);H(W,fe,ht,"⋗","\\gtrdot");H(W,fe,de,"⋙","\\ggg",!0);H(W,fe,de,"≷","\\gtrless",!0);H(W,fe,de,"⋛","\\gtreqless",!0);H(W,fe,de,"⪌","\\gtreqqless",!0);H(W,fe,de,"≖","\\eqcirc",!0);H(W,fe,de,"≗","\\circeq",!0);H(W,fe,de,"≜","\\triangleq",!0);H(W,fe,de,"∼","\\thicksim");H(W,fe,de,"≈","\\thickapprox");H(W,fe,de,"⫆","\\supseteqq",!0);H(W,fe,de,"⋑","\\Supset",!0);H(W,fe,de,"⊐","\\sqsupset",!0);H(W,fe,de,"≽","\\succcurlyeq",!0);H(W,fe,de,"⋟","\\curlyeqsucc",!0);H(W,fe,de,"≿","\\succsim",!0);H(W,fe,de,"⪸","\\succapprox",!0);H(W,fe,de,"⊳","\\vartriangleright");H(W,fe,de,"⊵","\\trianglerighteq");H(W,fe,de,"⊩","\\Vdash",!0);H(W,fe,de,"∣","\\shortmid");H(W,fe,de,"∥","\\shortparallel");H(W,fe,de,"≬","\\between",!0);H(W,fe,de,"⋔","\\pitchfork",!0);H(W,fe,de,"∝","\\varpropto");H(W,fe,de,"◀","\\blacktriangleleft");H(W,fe,de,"∴","\\therefore",!0);H(W,fe,de,"∍","\\backepsilon");H(W,fe,de,"▶","\\blacktriangleright");H(W,fe,de,"∵","\\because",!0);H(W,fe,de,"⋘","\\llless");H(W,fe,de,"⋙","\\gggtr");H(W,fe,ht,"⊲","\\lhd");H(W,fe,ht,"⊳","\\rhd");H(W,fe,de,"≂","\\eqsim",!0);H(W,ee,de,"⋈","\\Join");H(W,fe,de,"≑","\\Doteq",!0);H(W,fe,ht,"∔","\\dotplus",!0);H(W,fe,ht,"∖","\\smallsetminus");H(W,fe,ht,"⋒","\\Cap",!0);H(W,fe,ht,"⋓","\\Cup",!0);H(W,fe,ht,"⩞","\\doublebarwedge",!0);H(W,fe,ht,"⊟","\\boxminus",!0);H(W,fe,ht,"⊞","\\boxplus",!0);H(W,fe,ht,"⋇","\\divideontimes",!0);H(W,fe,ht,"⋉","\\ltimes",!0);H(W,fe,ht,"⋊","\\rtimes",!0);H(W,fe,ht,"⋋","\\leftthreetimes",!0);H(W,fe,ht,"⋌","\\rightthreetimes",!0);H(W,fe,ht,"⋏","\\curlywedge",!0);H(W,fe,ht,"⋎","\\curlyvee",!0);H(W,fe,ht,"⊝","\\circleddash",!0);H(W,fe,ht,"⊛","\\circledast",!0);H(W,fe,ht,"⋅","\\centerdot");H(W,fe,ht,"⊺","\\intercal",!0);H(W,fe,ht,"⋒","\\doublecap");H(W,fe,ht,"⋓","\\doublecup");H(W,fe,ht,"⊠","\\boxtimes",!0);H(W,fe,de,"⇢","\\dashrightarrow",!0);H(W,fe,de,"⇠","\\dashleftarrow",!0);H(W,fe,de,"⇇","\\leftleftarrows",!0);H(W,fe,de,"⇆","\\leftrightarrows",!0);H(W,fe,de,"⇚","\\Lleftarrow",!0);H(W,fe,de,"↞","\\twoheadleftarrow",!0);H(W,fe,de,"↢","\\leftarrowtail",!0);H(W,fe,de,"↫","\\looparrowleft",!0);H(W,fe,de,"⇋","\\leftrightharpoons",!0);H(W,fe,de,"↶","\\curvearrowleft",!0);H(W,fe,de,"↺","\\circlearrowleft",!0);H(W,fe,de,"↰","\\Lsh",!0);H(W,fe,de,"⇈","\\upuparrows",!0);H(W,fe,de,"↿","\\upharpoonleft",!0);H(W,fe,de,"⇃","\\downharpoonleft",!0);H(W,ee,de,"⊶","\\origof",!0);H(W,ee,de,"⊷","\\imageof",!0);H(W,fe,de,"⊸","\\multimap",!0);H(W,fe,de,"↭","\\leftrightsquigarrow",!0);H(W,fe,de,"⇉","\\rightrightarrows",!0);H(W,fe,de,"⇄","\\rightleftarrows",!0);H(W,fe,de,"↠","\\twoheadrightarrow",!0);H(W,fe,de,"↣","\\rightarrowtail",!0);H(W,fe,de,"↬","\\looparrowright",!0);H(W,fe,de,"↷","\\curvearrowright",!0);H(W,fe,de,"↻","\\circlearrowright",!0);H(W,fe,de,"↱","\\Rsh",!0);H(W,fe,de,"⇊","\\downdownarrows",!0);H(W,fe,de,"↾","\\upharpoonright",!0);H(W,fe,de,"⇂","\\downharpoonright",!0);H(W,fe,de,"⇝","\\rightsquigarrow",!0);H(W,fe,de,"⇝","\\leadsto");H(W,fe,de,"⇛","\\Rrightarrow",!0);H(W,fe,de,"↾","\\restriction");H(W,ee,ye,"‘","`");H(W,ee,ye,"$","\\$");H(Ke,ee,ye,"$","\\$");H(Ke,ee,ye,"$","\\textdollar");H(W,ee,ye,"%","\\%");H(Ke,ee,ye,"%","\\%");H(W,ee,ye,"_","\\_");H(Ke,ee,ye,"_","\\_");H(Ke,ee,ye,"_","\\textunderscore");H(W,ee,ye,"∠","\\angle",!0);H(W,ee,ye,"∞","\\infty",!0);H(W,ee,ye,"′","\\prime");H(W,ee,ye,"△","\\triangle");H(W,ee,ye,"Γ","\\Gamma",!0);H(W,ee,ye,"Δ","\\Delta",!0);H(W,ee,ye,"Θ","\\Theta",!0);H(W,ee,ye,"Λ","\\Lambda",!0);H(W,ee,ye,"Ξ","\\Xi",!0);H(W,ee,ye,"Π","\\Pi",!0);H(W,ee,ye,"Σ","\\Sigma",!0);H(W,ee,ye,"Υ","\\Upsilon",!0);H(W,ee,ye,"Φ","\\Phi",!0);H(W,ee,ye,"Ψ","\\Psi",!0);H(W,ee,ye,"Ω","\\Omega",!0);H(W,ee,ye,"A","Α");H(W,ee,ye,"B","Β");H(W,ee,ye,"E","Ε");H(W,ee,ye,"Z","Ζ");H(W,ee,ye,"H","Η");H(W,ee,ye,"I","Ι");H(W,ee,ye,"K","Κ");H(W,ee,ye,"M","Μ");H(W,ee,ye,"N","Ν");H(W,ee,ye,"O","Ο");H(W,ee,ye,"P","Ρ");H(W,ee,ye,"T","Τ");H(W,ee,ye,"X","Χ");H(W,ee,ye,"¬","\\neg",!0);H(W,ee,ye,"¬","\\lnot");H(W,ee,ye,"⊤","\\top");H(W,ee,ye,"⊥","\\bot");H(W,ee,ye,"∅","\\emptyset");H(W,fe,ye,"∅","\\varnothing");H(W,ee,Kt,"α","\\alpha",!0);H(W,ee,Kt,"β","\\beta",!0);H(W,ee,Kt,"γ","\\gamma",!0);H(W,ee,Kt,"δ","\\delta",!0);H(W,ee,Kt,"ϵ","\\epsilon",!0);H(W,ee,Kt,"ζ","\\zeta",!0);H(W,ee,Kt,"η","\\eta",!0);H(W,ee,Kt,"θ","\\theta",!0);H(W,ee,Kt,"ι","\\iota",!0);H(W,ee,Kt,"κ","\\kappa",!0);H(W,ee,Kt,"λ","\\lambda",!0);H(W,ee,Kt,"μ","\\mu",!0);H(W,ee,Kt,"ν","\\nu",!0);H(W,ee,Kt,"ξ","\\xi",!0);H(W,ee,Kt,"ο","\\omicron",!0);H(W,ee,Kt,"π","\\pi",!0);H(W,ee,Kt,"ρ","\\rho",!0);H(W,ee,Kt,"σ","\\sigma",!0);H(W,ee,Kt,"τ","\\tau",!0);H(W,ee,Kt,"υ","\\upsilon",!0);H(W,ee,Kt,"ϕ","\\phi",!0);H(W,ee,Kt,"χ","\\chi",!0);H(W,ee,Kt,"ψ","\\psi",!0);H(W,ee,Kt,"ω","\\omega",!0);H(W,ee,Kt,"ε","\\varepsilon",!0);H(W,ee,Kt,"ϑ","\\vartheta",!0);H(W,ee,Kt,"ϖ","\\varpi",!0);H(W,ee,Kt,"ϱ","\\varrho",!0);H(W,ee,Kt,"ς","\\varsigma",!0);H(W,ee,Kt,"φ","\\varphi",!0);H(W,ee,ht,"∗","*",!0);H(W,ee,ht,"+","+");H(W,ee,ht,"−","-",!0);H(W,ee,ht,"⋅","\\cdot",!0);H(W,ee,ht,"∘","\\circ",!0);H(W,ee,ht,"÷","\\div",!0);H(W,ee,ht,"±","\\pm",!0);H(W,ee,ht,"×","\\times",!0);H(W,ee,ht,"∩","\\cap",!0);H(W,ee,ht,"∪","\\cup",!0);H(W,ee,ht,"∖","\\setminus",!0);H(W,ee,ht,"∧","\\land");H(W,ee,ht,"∨","\\lor");H(W,ee,ht,"∧","\\wedge",!0);H(W,ee,ht,"∨","\\vee",!0);H(W,ee,ye,"√","\\surd");H(W,ee,Ea,"⟨","\\langle",!0);H(W,ee,Ea,"∣","\\lvert");H(W,ee,Ea,"∥","\\lVert");H(W,ee,ki,"?","?");H(W,ee,ki,"!","!");H(W,ee,ki,"⟩","\\rangle",!0);H(W,ee,ki,"∣","\\rvert");H(W,ee,ki,"∥","\\rVert");H(W,ee,de,"=","=");H(W,ee,de,":",":");H(W,ee,de,"≈","\\approx",!0);H(W,ee,de,"≅","\\cong",!0);H(W,ee,de,"≥","\\ge");H(W,ee,de,"≥","\\geq",!0);H(W,ee,de,"←","\\gets");H(W,ee,de,">","\\gt",!0);H(W,ee,de,"∈","\\in",!0);H(W,ee,de,"","\\@not");H(W,ee,de,"⊂","\\subset",!0);H(W,ee,de,"⊃","\\supset",!0);H(W,ee,de,"⊆","\\subseteq",!0);H(W,ee,de,"⊇","\\supseteq",!0);H(W,fe,de,"⊈","\\nsubseteq",!0);H(W,fe,de,"⊉","\\nsupseteq",!0);H(W,ee,de,"⊨","\\models");H(W,ee,de,"←","\\leftarrow",!0);H(W,ee,de,"≤","\\le");H(W,ee,de,"≤","\\leq",!0);H(W,ee,de,"<","\\lt",!0);H(W,ee,de,"→","\\rightarrow",!0);H(W,ee,de,"→","\\to");H(W,fe,de,"≱","\\ngeq",!0);H(W,fe,de,"≰","\\nleq",!0);H(W,ee,Nl," ","\\ ");H(W,ee,Nl," ","\\space");H(W,ee,Nl," ","\\nobreakspace");H(Ke,ee,Nl," ","\\ ");H(Ke,ee,Nl," "," ");H(Ke,ee,Nl," ","\\space");H(Ke,ee,Nl," ","\\nobreakspace");H(W,ee,Nl,"","\\nobreak");H(W,ee,Nl,"","\\allowbreak");H(W,ee,Km,",",",");H(W,ee,Km,";",";");H(W,fe,ht,"⊼","\\barwedge",!0);H(W,fe,ht,"⊻","\\veebar",!0);H(W,ee,ht,"⊙","\\odot",!0);H(W,ee,ht,"⊕","\\oplus",!0);H(W,ee,ht,"⊗","\\otimes",!0);H(W,ee,ye,"∂","\\partial",!0);H(W,ee,ht,"⊘","\\oslash",!0);H(W,fe,ht,"⊚","\\circledcirc",!0);H(W,fe,ht,"⊡","\\boxdot",!0);H(W,ee,ht,"△","\\bigtriangleup");H(W,ee,ht,"▽","\\bigtriangledown");H(W,ee,ht,"†","\\dagger");H(W,ee,ht,"⋄","\\diamond");H(W,ee,ht,"⋆","\\star");H(W,ee,ht,"◃","\\triangleleft");H(W,ee,ht,"▹","\\triangleright");H(W,ee,Ea,"{","\\{");H(Ke,ee,ye,"{","\\{");H(Ke,ee,ye,"{","\\textbraceleft");H(W,ee,ki,"}","\\}");H(Ke,ee,ye,"}","\\}");H(Ke,ee,ye,"}","\\textbraceright");H(W,ee,Ea,"{","\\lbrace");H(W,ee,ki,"}","\\rbrace");H(W,ee,Ea,"[","\\lbrack",!0);H(Ke,ee,ye,"[","\\lbrack",!0);H(W,ee,ki,"]","\\rbrack",!0);H(Ke,ee,ye,"]","\\rbrack",!0);H(W,ee,Ea,"(","\\lparen",!0);H(W,ee,ki,")","\\rparen",!0);H(Ke,ee,ye,"<","\\textless",!0);H(Ke,ee,ye,">","\\textgreater",!0);H(W,ee,Ea,"⌊","\\lfloor",!0);H(W,ee,ki,"⌋","\\rfloor",!0);H(W,ee,Ea,"⌈","\\lceil",!0);H(W,ee,ki,"⌉","\\rceil",!0);H(W,ee,ye,"\\","\\backslash");H(W,ee,ye,"∣","|");H(W,ee,ye,"∣","\\vert");H(Ke,ee,ye,"|","\\textbar",!0);H(W,ee,ye,"∥","\\|");H(W,ee,ye,"∥","\\Vert");H(Ke,ee,ye,"∥","\\textbardbl");H(Ke,ee,ye,"~","\\textasciitilde");H(Ke,ee,ye,"\\","\\textbackslash");H(Ke,ee,ye,"^","\\textasciicircum");H(W,ee,de,"↑","\\uparrow",!0);H(W,ee,de,"⇑","\\Uparrow",!0);H(W,ee,de,"↓","\\downarrow",!0);H(W,ee,de,"⇓","\\Downarrow",!0);H(W,ee,de,"↕","\\updownarrow",!0);H(W,ee,de,"⇕","\\Updownarrow",!0);H(W,ee,ps,"∐","\\coprod");H(W,ee,ps,"⋁","\\bigvee");H(W,ee,ps,"⋀","\\bigwedge");H(W,ee,ps,"⨄","\\biguplus");H(W,ee,ps,"⋂","\\bigcap");H(W,ee,ps,"⋃","\\bigcup");H(W,ee,ps,"∫","\\int");H(W,ee,ps,"∫","\\intop");H(W,ee,ps,"∬","\\iint");H(W,ee,ps,"∭","\\iiint");H(W,ee,ps,"∏","\\prod");H(W,ee,ps,"∑","\\sum");H(W,ee,ps,"⨂","\\bigotimes");H(W,ee,ps,"⨁","\\bigoplus");H(W,ee,ps,"⨀","\\bigodot");H(W,ee,ps,"∮","\\oint");H(W,ee,ps,"∯","\\oiint");H(W,ee,ps,"∰","\\oiiint");H(W,ee,ps,"⨆","\\bigsqcup");H(W,ee,ps,"∫","\\smallint");H(Ke,ee,rp,"…","\\textellipsis");H(W,ee,rp,"…","\\mathellipsis");H(Ke,ee,rp,"…","\\ldots",!0);H(W,ee,rp,"…","\\ldots",!0);H(W,ee,rp,"⋯","\\@cdots",!0);H(W,ee,rp,"⋱","\\ddots",!0);H(W,ee,ye,"⋮","\\varvdots");H(Ke,ee,ye,"⋮","\\varvdots");H(W,ee,Rr,"ˊ","\\acute");H(W,ee,Rr,"ˋ","\\grave");H(W,ee,Rr,"¨","\\ddot");H(W,ee,Rr,"~","\\tilde");H(W,ee,Rr,"ˉ","\\bar");H(W,ee,Rr,"˘","\\breve");H(W,ee,Rr,"ˇ","\\check");H(W,ee,Rr,"^","\\hat");H(W,ee,Rr,"⃗","\\vec");H(W,ee,Rr,"˙","\\dot");H(W,ee,Rr,"˚","\\mathring");H(W,ee,Kt,"","\\@imath");H(W,ee,Kt,"","\\@jmath");H(W,ee,ye,"ı","ı");H(W,ee,ye,"ȷ","ȷ");H(Ke,ee,ye,"ı","\\i",!0);H(Ke,ee,ye,"ȷ","\\j",!0);H(Ke,ee,ye,"ß","\\ss",!0);H(Ke,ee,ye,"æ","\\ae",!0);H(Ke,ee,ye,"œ","\\oe",!0);H(Ke,ee,ye,"ø","\\o",!0);H(Ke,ee,ye,"Æ","\\AE",!0);H(Ke,ee,ye,"Œ","\\OE",!0);H(Ke,ee,ye,"Ø","\\O",!0);H(Ke,ee,Rr,"ˊ","\\'");H(Ke,ee,Rr,"ˋ","\\`");H(Ke,ee,Rr,"ˆ","\\^");H(Ke,ee,Rr,"˜","\\~");H(Ke,ee,Rr,"ˉ","\\=");H(Ke,ee,Rr,"˘","\\u");H(Ke,ee,Rr,"˙","\\.");H(Ke,ee,Rr,"¸","\\c");H(Ke,ee,Rr,"˚","\\r");H(Ke,ee,Rr,"ˇ","\\v");H(Ke,ee,Rr,"¨",'\\"');H(Ke,ee,Rr,"˝","\\H");H(Ke,ee,Rr,"◯","\\textcircled");var IF={"--":!0,"---":!0,"``":!0,"''":!0};H(Ke,ee,ye,"–","--",!0);H(Ke,ee,ye,"–","\\textendash");H(Ke,ee,ye,"—","---",!0);H(Ke,ee,ye,"—","\\textemdash");H(Ke,ee,ye,"‘","`",!0);H(Ke,ee,ye,"‘","\\textquoteleft");H(Ke,ee,ye,"’","'",!0);H(Ke,ee,ye,"’","\\textquoteright");H(Ke,ee,ye,"“","``",!0);H(Ke,ee,ye,"“","\\textquotedblleft");H(Ke,ee,ye,"”","''",!0);H(Ke,ee,ye,"”","\\textquotedblright");H(W,ee,ye,"°","\\degree",!0);H(Ke,ee,ye,"°","\\degree");H(Ke,ee,ye,"°","\\textdegree",!0);H(W,ee,ye,"£","\\pounds");H(W,ee,ye,"£","\\mathsterling",!0);H(Ke,ee,ye,"£","\\pounds");H(Ke,ee,ye,"£","\\textsterling",!0);H(W,fe,ye,"✠","\\maltese");H(Ke,fe,ye,"✠","\\maltese");var JT='0123456789/@."';for(var n4=0;n4{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 lR[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return VLn[i]}else{if(r===120485||r===120486)return lR[0];if(120486{if(qu(e.classes)!==qu(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},$F=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},Qe=function(n,t,r,s){var i=new np(n,t,r,s);return CC(i),i},Gu=(e,n,t,r)=>new np(e,n,t,r),Ih=function(n,t,r){var s=Qe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=at(s.height),s.maxFontSize=1,s},YLn=function(n,t,r,s){var i=new Ry(n,t,r,s);return CC(i),i},zl=function(n){var t=new tp(n);return CC(t),t},$h=function(n,t){return n instanceof tp?Qe([],[n],t):n},ZLn=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=Qe(["mspace"],[],n),r=$r(e,n);return t.style.marginRight=at(r),t},A1=(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},sk={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"}},PF={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},FF=function(n,t){var[r,s,i]=PF[n],a=new Uu(r),o=new xl([a],{width:at(s),height:at(i),style:"width:"+at(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=Gu(["overlay"],[o],t);return c.height=i,c.style.height=at(i),c.style.width=at(s),c},Lr={number:3,unit:"mu"},T_={number:4,unit:"mu"},Jc={number:5,unit:"mu"},JLn={mord:{mop:Lr,mbin:T_,mrel:Jc,minner:Lr},mop:{mord:Lr,mop:Lr,mrel:Jc,minner:Lr},mbin:{mord:T_,mop:T_,mopen:T_,minner:T_},mrel:{mord:Jc,mop:Jc,mopen:Jc,minner:Jc},mopen:{},mclose:{mop:Lr,mbin:T_,mrel:Jc,minner:Lr},mpunct:{mord:Lr,mop:Lr,mrel:Jc,mopen:Lr,mclose:Lr,mpunct:Lr,minner:Lr},minner:{mord:Lr,mop:Lr,mbin:T_,mrel:Jc,mopen:Lr,mpunct:Lr,minner:Lr}},eIn={mord:{mop:Lr},mop:{mord:Lr,mop:Lr},mbin:{},mrel:{},mopen:{},mclose:{mop:Lr},mpunct:{},minner:{mop:Lr}},HF={},fb={},db={};function ft(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],b=w.classes[0];v==="mbin"&&nIn.has(b)?k.classes[0]="mord":b==="mbin"&&tIn.has(v)&&(w.classes[0]="mord")},{node:f},p,m),ik(i,(w,k)=>{var v,b,y=ok(k),x=ok(w),C=y&&x?w.hasClass("mtight")?(v=eIn[y])==null?void 0:v[x]:(b=JLn[y])==null?void 0:b[x]:null;if(C)return BF(C,u)},{node:f},p,m),i},ik=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()},qF=function(n){return n instanceof tp||n instanceof Ry||n instanceof np&&n.hasClass("enclosing")?n:null},ak=function(n,t){var r=qF(n);if(r){var s=r.children;if(s.length){if(t==="right")return ak(s[s.length-1],"right");if(t==="left")return ak(s[0],"left")}}return n},ok=function(n,t){if(!n)return null;t&&(n=ak(n,t));var r=n.classes[0];return sIn[r]||null},Z0=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Qe(t.concat(r))},ir=function(n,t,r){if(!n)return Qe();if(fb[n.type]){var s=fb[n.type](n,t);if(r&&t.size!==r.size){s=Qe(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new Je("Got group of unknown type: '"+n.type+"'")};function T1(e,n){var t=Qe(["base"],e,n),r=Qe(["strut"]);return r.style.height=at(t.height+t.depth),t.depth&&(r.style.verticalAlign=at(-t.depth)),t.children.unshift(r),t}function ck(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=zs(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(T1(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(T1(a,n));var u;t?(u=T1(zs(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var h=Qe(["katex-html"],i);if(h.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=at(h.height+h.depth),h.depth&&(f.style.verticalAlign=at(-h.depth))}return h}function UF(e){return new tp(e)}class et{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=qu(this.classes));for(var r=0;r0&&(n+=' class ="'+ri(qu(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class hs{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return ri(this.toText())}toText(){return this.text}}class GF{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",at(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var iIn=new Set(["\\imath","\\jmath"]),aIn=new Set(["mrow","mtable"]),Ga=function(n,t,r){return Ar[t][n]&&Ar[t][n].replace&&n.charCodeAt(0)!==55349&&!(IF.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Ar[t][n].replace),new hs(n)},EC=function(n){return n.length===1?n[0]:new et("mrow",n)},oIn={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"},NC=(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=oIn[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(iIn.has(i))return null;if(Ar[r][i]){var a=Ar[r][i].replace;a&&(i=a)}var o=sk[t].fontName;return kC(i,o,r)?sk[t].variant:null};function a4(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof hs&&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 hs&&t.text===","}else return!1}var Na=function(n,t,r){if(n.length===1){var s=kr(n[0],t);return r&&s instanceof et&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||a4(a))){var u=c.children[0];u instanceof et&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var h=a.children[0];if(h instanceof hs&&h.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var f=c.children[0];f instanceof hs&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(c),a=c}return i},Ku=function(n,t,r){return EC(Na(n,t,r))},kr=function(n,t){if(!n)return new et("mrow");if(db[n.type])return db[n.type](n,t);throw new Je("Got group of unknown type: '"+n.type+"'")};function uR(e,n,t,r,s){var i=Na(e,t),a;i.length===1&&i[0]instanceof et&&aIn.has(i[0].type)?a=i[0]:a=new et("mrow",i);var o=new et("annotation",[new hs(n)]);o.setAttribute("encoding","application/x-tex");var c=new et("semantics",[a,o]),u=new et("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var h=s?"katex":"katex-mathml";return Qe([h],[u])}var cIn=[[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]],_R=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],fR=function(n,t){return t.size<2?n:cIn[n-1][t.size-1]};class sl{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||sl.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=_R[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 sl(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:fR(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:_R[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=fR(sl.BASESIZE,n);return this.size===t&&this.textSize===sl.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!==sl.BASESIZE?["sizing","reset-size"+this.size,"size"+sl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=GLn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}sl.BASESIZE=6;var KF=function(n){return new sl({style:n.displayMode?nn.DISPLAY:nn.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},VF=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Qe(r,[n])}return n},lIn=function(n,t,r){var s=KF(r),i;if(r.output==="mathml")return uR(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=ck(n,s);i=Qe(["katex"],[a])}else{var o=uR(n,t,s,r.displayMode,!1),c=ck(n,s);i=Qe(["katex"],[o,c])}return VF(i,r)},uIn=function(n,t,r){var s=KF(r),i=ck(n,s),a=Qe(["katex"],[i]);return VF(a,r)},_In={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":"="},Dy=function(n){var t=new et("mo",[new hs(_In[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},fIn={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]},dIn=new Set(["widehat","widecheck","widetilde","utilde"]),Ly=function(n,t){function r(){var o=4e5,c=n.label.slice(1);if(dIn.has(c)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,h,f,p;if(u>5)c==="widehat"||c==="widecheck"?(h=420,o=2364,p=.42,f=c+"4"):(h=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],h=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],f=c+m):(o=[0,600,1033,2339,2340][m],h=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],f="tilde"+m)}var w=new Uu(f),k=new xl([w],{width:"100%",height:at(p),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:Gu([],[k],t),minWidth:0,height:p}}else{var v=[],b=fIn[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[y,x,C]=b,N=C/1e3,j=y.length,A,z;if(j===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');A=["hide-tail"],z=[b[3]]}else if(j===2)A=["halfarrow-left","halfarrow-right"],z=["xMinYMin","xMaxYMin"];else if(j===3)A=["brace-left","brace-center","brace-right"],z=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support - `+j+" children.");for(var M=0;M0&&(s.style.minWidth=at(i)),s},hIn=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=Qe(["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 Z5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new Z5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new xl(u,{width:"100%",height:at(o)});a=Gu([],[h],i)}return a.height=o,a.style.height=at(o),a},pIn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},mIn={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function gIn(e){return e in pIn}function mn(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 Iy(e){var n=$y(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 $y(e){return e&&(e.type==="atom"||mIn.hasOwnProperty(e.type))?e:null}var WF=e=>{if(e instanceof wa)return e;if(qLn(e)&&e.children.length===1)return WF(e.children[0])},zC=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=mn(e.base,"accent"),t=r.base,e.base=t,s=HLn(ir(e,n)),e.base=r):(r=mn(e,"accent"),t=r.base);var i=ir(t,n.havingCrampedStyle()),a=r.isShifty&&El(t),o=0;if(a){var c,u;o=(c=(u=WF(i))==null?void 0:u.skew)!=null?c:0}var h=r.label==="\\c",f=h?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=Ly(r,n),p=rr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+at(2*o)+")",marginLeft:at(2*o)}:void 0}]});else{var m,w;r.label==="\\vec"?(m=FF("vec",n),w=PF.vec[1]):(m=Oy({mode:r.mode,text:r.label},n,"textord"),m=FLn(m),m.italic=0,w=m.width,h&&(f+=m.depth)),p=Qe(["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=at(v),r.label==="\\textcircled"&&(p.style.top=".2em"),p=rr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]})}var b=Qe(["mord","accent"],[p],n);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},QF=(e,n)=>{var t=e.isStretchy?Dy(e.label):new et("mo",[Ga(e.label,e.mode)]),r=new et("mover",[kr(e.base,n),t]);return r.setAttribute("accent","true"),r},vIn=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));ft({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=hb(n[0]),r=!vIn.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:zC,mathmlBuilder:QF});ft({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:zC,mathmlBuilder:QF});ft({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=ir(e.base,n),r=Ly(e,n),s=e.label==="\\utilde"?.12:0,i=rr({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Qe(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=Dy(e.label),r=new et("munder",[kr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var R1=e=>{var n=new et("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};ft({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=$h(ir(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=$h(ir(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=Ly(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 h;if(a){var f=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;h=rr({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 h=rr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return Qe(["mrel","x-arrow"],[h],n)},mathmlBuilder(e,n){var t=Dy(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=R1(kr(e.body,n));if(e.below){var i=R1(kr(e.below,n));r=new et("munderover",[t,i,s])}else r=new et("mover",[t,s])}else if(e.below){var a=R1(kr(e.below,n));r=new et("munder",[t,a])}else r=R1(),r=new et("mover",[t,r]);return r}});function XF(e,n){var t=zs(e.body,n,!0);return Qe([e.mclass],t,n)}function YF(e,n){var t,r=Na(e.body,n);return e.mclass==="minner"?t=new et("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new et("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new et("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}ft({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:ds(s),isCharacterBox:El(s)}},htmlBuilder:XF,mathmlBuilder:YF});var By=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"};ft({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:By(n[0]),body:ds(n[1]),isCharacterBox:El(n[1])}}});ft({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=By(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:ds(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:El(c)}},htmlBuilder:XF,mathmlBuilder:YF});ft({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:By(n[0]),body:ds(n[0])}},htmlBuilder(e,n){var t=zs(e.body,n,!0),r=Qe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=Na(e.body,n),r=new et("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var bIn={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},dR=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),hR=e=>e.type==="textord"&&e.text==="@",yIn=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function xIn(e,n,t){var r=bIn[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 wIn(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 Je("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=xIn(u,h,e),k={type:"styling",body:[w],mode:"math",style:"display",resetFont:!0};r.push(k),o=dR()}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([])}}ft({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=$h(ir(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=at(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new et("mrow",[kr(e.label,n)]);return t=new et("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new et("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});ft({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=$h(ir(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new et("mrow",[kr(e.fragment,n)])}});ft({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=mn(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new Je("\\@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 ZF=(e,n)=>{var t=zs(e.body,n.withColor(e.color),!1);return zl(t)},JF=(e,n)=>{var t=Na(e.body,n.withColor(e.color)),r=new et("mstyle",t);return r.setAttribute("mathcolor",e.color),r};ft({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=mn(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:ds(s)}},htmlBuilder:ZF,mathmlBuilder:JF});ft({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=mn(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:ZF,mathmlBuilder:JF});ft({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&&mn(s,"size").value}},htmlBuilder(e,n){var t=Qe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=at($r(e.size,n)))),t},mathmlBuilder(e,n){var t=new et("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",at($r(e.size,n)))),t}});var lk={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},eH=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Je("Expected a control sequence",e);return n},kIn=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},tH=(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)};ft({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(lk[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=lk[r.text]),mn(n.parseFunction(),"internal");throw new Je("Invalid token after macro prefix",r)}});ft({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 Je("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 Je('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Je('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new Je("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===lk[t]),{type:"internal",mode:n.mode}}});ft({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=eH(n.gullet.popToken());n.gullet.consumeSpaces();var s=kIn(n);return tH(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});ft({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=eH(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return tH(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var f0=function(n,t,r){var s=Ar.math[n]&&Ar.math[n].replace,i=kC(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},jC=function(n,t,r,s){var i=r.havingBaseStyle(t),a=Qe(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},nH=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=at(i),n.height-=i,n.depth+=i},SIn=function(n,t,r,s,i,a){var o=mi(n,"Main-Regular",i,s),c=jC(o,t,s,a);return nH(c,s,t),c},CIn=function(n,t,r,s){return mi(n,"Size"+t+"-Regular",r,s)},rH=function(n,t,r,s,i,a){var o=CIn(n,t,i,s),c=jC(Qe(["delimsizing","size"+t],[o],s),nn.TEXT,s,a);return r&&nH(c,s,nn.TEXT),c},o4=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=Qe(["delimsizinginner",s],[Qe([],[mi(n,t,r)])]);return{type:"elem",elem:i}},c4=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 Uu("inner",OLn(n,Math.round(1e3*t))),a=new xl([i],{width:at(s),height:at(t),style:"width:"+at(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Gu([],[a],r);return o.height=t,o.style.height=at(t),o.style.width=at(s),{type:"elem",elem:o}},uk=.008,M1={type:"kern",size:-1*uk},EIn=new Set(["|","\\lvert","\\rvert","\\vert"]),NIn=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),sH=function(n,t,r,s,i,a){var o,c,u,h,f="",p=0;o=u=h=n,c=null;var m="Size1-Regular";n==="\\uparrow"?u=h="⏐":n==="\\Uparrow"?u=h="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",h="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",h="\\Downarrow"):EIn.has(n)?(u="∣",f="vert",p=333):NIn.has(n)?(u="∥",f="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",h="⎣",m="Size4-Regular",f="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",h="⎦",m="Size4-Regular",f="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",h="⎣",m="Size4-Regular",f="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=h="⎢",m="Size4-Regular",f="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",h="⎦",m="Size4-Regular",f="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=h="⎥",m="Size4-Regular",f="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",h="⎝",m="Size4-Regular",f="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",h="⎠",m="Size4-Regular",f="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",c="⎨",h="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",c="⎬",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",h="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",h="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",h="⎩",u="⎪",m="Size4-Regular");var w=f0(o,m,i),k=w.height+w.depth,v=f0(u,m,i),b=v.height+v.depth,y=f0(h,m,i),x=y.height+y.depth,C=0,N=1;if(c!==null){var j=f0(c,m,i);C=j.height+j.depth,N=2}var A=k+x+C,z=Math.max(0,Math.ceil((t-A)/(N*b))),M=A+z*N*b,D=s.fontMetrics().axisHeight;r&&(D*=s.sizeMultiplier);var I=M/2-D,B=[];if(f.length>0){var G=M-k-x,U=Math.round(M*1e3),Q=DLn(f,Math.round(G*1e3)),V=new Uu(f,Q),Z=at(p/1e3),J=at(U/1e3),$=new xl([V],{width:Z,height:J,viewBox:"0 0 "+p+" "+U}),L=Gu([],[$],s);L.height=U/1e3,L.style.width=Z,L.style.height=J,B.push({type:"elem",elem:L})}else{if(B.push(o4(h,m,i)),B.push(M1),c===null){var q=M-k-x+2*uk;B.push(c4(u,q,s))}else{var P=(M-k-x-C)/2+2*uk;B.push(c4(u,P,s)),B.push(M1),B.push(o4(c,m,i)),B.push(M1),B.push(c4(u,P,s))}B.push(M1),B.push(o4(o,m,i))}var F=s.havingBaseStyle(nn.TEXT),re=rr({positionType:"bottom",positionData:I,children:B});return jC(Qe(["delimsizing","mult"],[re],F),nn.TEXT,s,a)},l4=80,u4=.08,_4=function(n,t,r,s,i){var a=MLn(n,s,r),o=new Uu(n,a),c=new xl([o],{width:"400em",height:at(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Gu(["hide-tail"],[c],i)},zIn=function(n,t){var r=t.havingBaseSizing(),s=lH("\\surd",n*r.sizeMultiplier,cH,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,c,u,h,f;return s.type==="small"?(h=1e3+1e3*a+l4,n<1?i=1:n<1.4&&(i=.7),c=(1+a+u4)/i,u=(1+a)/i,o=_4("sqrtMain",c,h,a,t),o.style.minWidth="0.853em",f=.833/i):s.type==="large"?(h=(1e3+l4)*E0[s.size],u=(E0[s.size]+a)/i,c=(E0[s.size]+a+u4)/i,o=_4("sqrtSize"+s.size,c,h,a,t),o.style.minWidth="1.02em",f=1/i):(c=n+a+u4,u=n+a,h=Math.floor(1e3*n+a)+l4,o=_4("sqrtTall",c,h,a,t),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=at(c),{span:o,advanceWidth:f,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},iH=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),jIn=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),aH=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),E0=[0,1.2,1.8,2.4,3],oH=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),iH.has(n)||aH.has(n))return rH(n,t,!1,r,s,i);if(jIn.has(n))return sH(n,E0[t],!1,r,s,i);throw new Je("Illegal delimiter: '"+n+"'")},AIn=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],TIn=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"stack"}],cH=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],RIn=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.")},lH=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]},_k=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;aH.has(n)?o=AIn:iH.has(n)?o=cH:o=TIn;var c=lH(n,t,o,s);return c.type==="small"?SIn(n,c.style,r,s,i,a):c.type==="large"?rH(n,c.size,r,s,i,a):sH(n,t,r,s,i,a)},f4=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,h=Math.max(t-o,r+o),f=Math.max(h/500*c,2*h-u);return _k(n,f,!0,s,i,a)},pR={"\\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}},MIn=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 mR(e){return"isMiddle"in e}function Py(e,n){var t=$y(e);if(t&&MIn.has(t.text))return t;throw t?new Je("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Je("Invalid delimiter type '"+e.type+"'",e)}ft({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=Py(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:pR[e.funcName].size,mclass:pR[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Qe([e.mclass]):oH(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Ga(e.delim,e.mode));var t=new et("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=at(E0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function gR(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ft({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 Je("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:Py(n[0],e).text,color:t}}});ft({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=Py(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=mn(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{gR(e);for(var t=zs(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{gR(e);var t=Na(e.body,n);if(e.left!=="."){var r=new et("mo",[Ga(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new et("mo",[Ga(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return EC(t)}});ft({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=Py(n[0],e);if(!e.parser.leftrightDepth)throw new Je("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=Z0(n,[]):(t=oH(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Ga("|","text"):Ga(e.delim,e.mode),r=new et("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Fy=(e,n)=>{var t=$h(ir(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=El(e.body);if(r==="sout")i=Qe(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=$r({number:.6,unit:"pt"},n),u=$r({number:.35,unit:"ex"},n),h=n.havingBaseSizing();s=s/h.sizeMultiplier;var f=t.height+t.depth+c+u;t.style.paddingLeft=at(f/2+c);var p=Math.floor(1e3*f*s),m=TLn(p),w=new xl([new Uu("phase",m)],{width:"400em",height:at(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=Gu(["hide-tail"],[w],n),i.style.height=at(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,b=0;/box/.test(r)?(b=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:b),v=k):r==="angl"?(b=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*b,v=Math.max(0,.25-t.depth)):(k=o?.2:0,v=k),i=hIn(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=at(b)):r==="angl"&&b!==.049&&(i.style.borderTopWidth=at(b),i.style.borderRightWidth=at(b)),a=t.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var y;if(e.backgroundColor)y=rr({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var x=/cancel|phase/.test(r)?["svg-align"]:[];y=rr({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:x}]})}return/cancel/.test(r)&&(y.height=t.height,y.depth=t.depth),/cancel/.test(r)&&!o?Qe(["mord","cancel-lap"],[y],n):Qe(["mord"],[y],n)},Hy=(e,n)=>{var t,r=new et(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: "+at(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};ft({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=mn(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:Fy,mathmlBuilder:Hy});ft({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=mn(n[0],"color-token").color,a=mn(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:Fy,mathmlBuilder:Hy});ft({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]}}});ft({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:Fy,mathmlBuilder:Hy});ft({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:Fy,mathmlBuilder:Hy});ft({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 uH={};function vc(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 Je("{"+e.envName+"} can be used only in display mode.")},OIn=new Set(["gather","gather*"]);function AC(e){if(!e.includes("ed"))return!e.includes("*")}function e_(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:c,singleRow:u,emptySingleRow:h,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 Je("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var w=[],k=[w],v=[],b=[],y=c!=null?[]:void 0;function x(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new ba("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(x(),b.push(vR(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var j={type:"ordgroup",mode:e.mode,body:N};t&&(j={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[j]}),w.push(j);var A=e.fetch().text;if(A==="&"){if(f&&w.length===f){if(u||o)throw new Je("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&&j.type==="styling"&&j.body.length===1&&j.body[0].type==="ordgroup"&&j.body[0].body.length===0&&(k.length>1||!h)&&k.pop(),b.length0&&(x+=.25),u.push({pos:x,isDashed:qe[rt]})}for(C(a[0]),r=0;r0&&(I+=y,Aqe))for(r=0;r=o)){var oe=void 0;if(s>0||n.hskipBeforeAndAfter){var ce,pe;oe=(ce=(pe=F)==null?void 0:pe.pregap)!=null?ce:p,oe!==0&&(Q=Qe(["arraycolsep"],[]),Q.style.width=at(oe),U.push(Q))}var ve=[];for(r=0;r0){for(var jt=Ih("hline",t,h),Pt=Ih("hdashline",t,h),Le=[{type:"elem",elem:Mt,shift:0}];u.length>0;){var nt=u.pop(),ke=nt.pos-B;nt.isDashed?Le.push({type:"elem",elem:Pt,shift:ke}):Le.push({type:"elem",elem:jt,shift:ke})}Mt=rr({positionType:"individualShift",children:Le})}if(Z.length===0)return Qe(["mord"],[Mt],t);var me=rr({positionType:"individualShift",children:Z}),je=Qe(["tag"],[me],t);return zl([Mt,je])},DIn={c:"center ",l:"left ",r:"right "},yc=function(n,t){for(var r=[],s=new et("mtd",[],["mtr-glue"]),i=new et("mtd",[],["mml-eqn-num"]),a=0;a0){var w=n.cols,k="",v=!1,b=0,y=w.length;w[0].type==="separator"&&(p+="top ",b=1),w[w.length-1].type==="separator"&&(p+="bottom ",y-=1);for(var x=b;x0?"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};vc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=$y(n[0]),r=t?[n[0]]:mn(n[0],"ordgroup").body,s=r.map(function(a){var o=Iy(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 Je("Unknown column alignment: "+c,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return e_(e.parser,i,TC(e.envName))},htmlBuilder:bc,mathmlBuilder:yc});vc({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 Je("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=e_(e.parser,r,TC(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:bc,mathmlBuilder:yc});vc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=e_(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=$y(n[0]),r=t?[n[0]]:mn(n[0],"ordgroup").body,s=r.map(function(o){var c=Iy(o),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new Je("Unknown column alignment: "+u,o)});if(s.length>1)throw new Je("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=e_(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new Je("{subarray} can contain only one column");return a},htmlBuilder:bc,mathmlBuilder:yc});vc({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=e_(e.parser,n,TC(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:fH,htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){OIn.has(e.envName)&&qy(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:AC(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return e_(e.parser,n,"display")},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:fH,htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){qy(e);var n={autoTag:AC(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return e_(e.parser,n,"display")},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return qy(e),wIn(e.parser)},htmlBuilder:bc,mathmlBuilder:yc});ae("\\nonumber","\\gdef\\@eqnsw{0}");ae("\\notag","\\nonumber");ft({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Je(e.funcName+" valid only within array environment")}});var bR=uH;ft({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 Je("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return ir(e.body,r)},hH=(e,n)=>{var t=e.font,r=n.withFont(t);return kr(e.body,r)},yR={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};ft({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=hb(n[0]),i=r;return i in yR&&(i=yR[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:dH,mathmlBuilder:hH});ft({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:By(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:El(r)}}});ft({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:dH,mathmlBuilder:hH});var LIn=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var a=ir(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(h){var y=n.fontMetrics().axisHeight;m-a.depth-(y+.5*f){var t=new et("mfrac",[kr(e.numer,n),kr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=$r(e.barSize,n);t.setAttribute("linethickness",at(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new et("mo",[new hs(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new et("mo",[new hs(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return EC(s)}return t},pH=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};ft({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",h=null;return u||r.startsWith("\\d")?h="display":r.startsWith("\\t")&&(h="text"),pH({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:c,barSize:null},h)},htmlBuilder:LIn,mathmlBuilder:IIn});ft({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 xR=["display","text","script","scriptscript"],wR=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};ft({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=hb(n[0]),a=i.type==="atom"&&i.family==="open"?wR(i.text):null,o=hb(n[1]),c=o.type==="atom"&&o.family==="close"?wR(o.text):null,u=mn(n[2],"size"),h,f=null;u.isBlank?h=!0:(f=u.value,h=f.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var w=mn(m.body[0],"textord");p=xR[Number(w.text)]}}else m=mn(m,"textord"),p=xR[Number(m.text)];return pH({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:h,barSize:f,leftDelim:a,rightDelim:c},p)}});ft({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:mn(n[0],"size").value,token:s}}});ft({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=mn(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 mH=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?ir(e.sup,n.havingStyle(t.sup()),n):ir(e.sub,n.havingStyle(t.sub()),n),s=mn(e.base,"horizBrace")):s=mn(e,"horizBrace");var i=ir(s.base,n.havingBaseStyle(nn.DISPLAY)),a=Ly(s,n),o;if(s.isOver?o=rr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=rr({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=Qe(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=rr({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=rr({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Qe(["minner",s.isOver?"mover":"munder"],[o],n)},$In=(e,n)=>{var t=Dy(e.label);return new et(e.isOver?"mover":"munder",[kr(e.base,n),t])};ft({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:mH,mathmlBuilder:$In});ft({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=mn(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:ds(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=zs(e.body,n,!1);return YLn(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=Ku(e.body,n);return t instanceof et||(t=new et("mrow",[t])),t.setAttribute("href",e.href),t}});ft({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=mn(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=mn(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(","),h=0;h{var t=zs(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Qe(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)=>Ku(e.body,n)});ft({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:ds(n[0]),mathml:ds(n[1])}},htmlBuilder:(e,n)=>{var t=zs(e.html,n,!1);return zl(t)},mathmlBuilder:(e,n)=>Ku(e.mathml,n)});var d4=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 Je("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!MF(r))throw new Je("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ft({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=mn(t[0],"raw").string,u=c.split(","),h=0;h{var t=$r(e.height,n),r=0;e.totalheight.number>0&&(r=$r(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=$r(e.width,n));var i={height:at(t+r)};s>0&&(i.width=at(s)),r>0&&(i.verticalAlign=at(-r));var a=new BLn(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new et("mglyph",[]);t.setAttribute("alt",e.alt);var r=$r(e.height,n),s=0;if(e.totalheight.number>0&&(s=$r(e.totalheight,n)-r,t.setAttribute("valign",at(-s))),t.setAttribute("height",at(r+s)),e.width.number>0){var i=$r(e.width,n);t.setAttribute("width",at(i))}return t.setAttribute("src",e.src),t}});ft({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=mn(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 BF(e.dimension,n)},mathmlBuilder(e,n){var t=$r(e.dimension,n);return new GF(t)}});ft({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=Qe([],[ir(e.body,n)]),t=Qe(["inner"],[t],n)):t=Qe(["inner"],[ir(e.body,n)]);var r=Qe(["fix"],[]),s=Qe([e.alignment],[t,r],n),i=Qe(["strut"]);return i.style.height=at(s.height+s.depth),s.depth&&(i.style.verticalAlign=at(-s.depth)),s.children.unshift(i),s=Qe(["thinbox"],[s],n),Qe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new et("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}});ft({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}}});ft({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Je("Mismatched "+e.funcName)}});var kR=(e,n)=>{switch(n.style.size){case nn.DISPLAY.size:return e.display;case nn.TEXT.size:return e.text;case nn.SCRIPT.size:return e.script;case nn.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ft({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:ds(n[0]),text:ds(n[1]),script:ds(n[2]),scriptscript:ds(n[3])}},htmlBuilder:(e,n)=>{var t=kR(e,n),r=zs(t,n,!1);return zl(r)},mathmlBuilder:(e,n)=>{var t=kR(e,n);return Ku(t,n)}});var gH=(e,n,t,r,s,i,a)=>{e=Qe([],[e]);var o=t&&El(t),c,u;if(n){var h=ir(n,r.havingStyle(s.sup()),r);u={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(t){var f=ir(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=rr({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:at(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:at(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var w=e.height-a;p=rr({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:at(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var k=e.depth+a;p=rr({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:at(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&i!==0&&!o){var b=Qe(["mspace"],[],r);b.style.marginRight=at(i),v.unshift(b)}return Qe(["mop","op-limits"],v,r)},vH=new Set(["\\smallint"]),sp=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=mn(e.base,"op"),s=!0):i=mn(e,"op");var a=n.style,o=!1;a.size===nn.DISPLAY.size&&i.symbol&&!vH.has(i.name)&&(o=!0);var c,u;if(i.symbol){var h=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=mi(i.name,h,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=c.italic,f.length>0){var p=FF(f+"Size"+(o?"2":"1"),n);c=rr({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=zs(i.body,n,!0);m.length===1&&m[0]instanceof wa?(c=m[0],c.classes[0]="mop"):c=Qe(["mop"],m,n)}else{for(var w=[],k=1;k{var t;if(e.symbol)t=new et("mo",[Ga(e.name,e.mode)]),vH.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new et("mo",Na(e.body,n));else{t=new et("mi",[new hs(e.name.slice(1))]);var r=new et("mo",[Ga("⁡","text")]);e.parentIsSupSub?t=new et("mrow",[t,r]):t=UF([t,r])}return t},BIn={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ft({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=BIn[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:sp,mathmlBuilder:Vm});ft({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:ds(r)}},htmlBuilder:sp,mathmlBuilder:Vm});var PIn={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ft({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:sp,mathmlBuilder:Vm});ft({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:sp,mathmlBuilder:Vm});ft({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=PIn[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:sp,mathmlBuilder:Vm});var bH=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=mn(e.base,"operatorname"),s=!0):i=mn(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=zs(o,n.withFont("mathrm"),!0),u=0;u{for(var t=Na(e.body,n.withFont("mathrm")),r=!0,s=0;sh.toText()).join("");t=[new hs(o)]}var c=new et("mi",t);c.setAttribute("mathvariant","normal");var u=new et("mo",[Ga("⁡","text")]);return e.parentIsSupSub?new et("mrow",[c,u]):UF([c,u])};ft({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:ds(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:bH,mathmlBuilder:FIn});ae("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Pf({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?zl(zs(e.body,n,!1)):Qe(["mord"],zs(e.body,n,!0),n)},mathmlBuilder(e,n){return Ku(e.body,n,!0)}});ft({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=ir(e.body,n.havingCrampedStyle()),r=Ih("overline-line",n),s=n.fontMetrics().defaultRuleThickness,i=rr({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Qe(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new et("mo",[new hs("‾")]);t.setAttribute("stretchy","true");var r=new et("mover",[kr(e.body,n),t]);return r.setAttribute("accent","true"),r}});ft({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:ds(r)}},htmlBuilder:(e,n)=>{var t=zs(e.body,n.withPhantom(),!1);return zl(t)},mathmlBuilder:(e,n)=>{var t=Na(e.body,n);return new et("mphantom",t)}});ae("\\hphantom","\\smash{\\phantom{#1}}");ft({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=Qe(["inner"],[ir(e.body,n.withPhantom())]),r=Qe(["fix"],[]);return Qe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=Na(ds(e.body),n),r=new et("mphantom",t),s=new et("mpadded",[r]);return s.setAttribute("width","0px"),s}});ft({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=mn(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=ir(e.body,n),r=$r(e.dy,n);return rr({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new et("mpadded",[kr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});ft({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});ft({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=mn(n[0],"size"),a=mn(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&mn(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=Qe(["mord","rule"],[],n),r=$r(e.width,n),s=$r(e.height,n),i=e.shift?$r(e.shift,n):0;return t.style.borderRightWidth=at(r),t.style.borderTopWidth=at(s),t.style.bottom=at(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=$r(e.width,n),r=$r(e.height,n),s=e.shift?$r(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new et("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",at(t)),a.setAttribute("height",at(r));var o=new et("mpadded",[a]);return s>=0?o.setAttribute("height",at(s)):(o.setAttribute("height",at(s)),o.setAttribute("depth",at(-s))),o.setAttribute("voffset",at(s)),o}});function yH(e,n,t){for(var r=zs(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return yH(e.body,t,n)};ft({type:"sizing",names:SR,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:SR.indexOf(r)+1,body:i}},htmlBuilder:HIn,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=Na(e.body,t),s=new et("mstyle",r);return s.setAttribute("mathsize",at(t.sizeMultiplier)),s}});ft({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]&&mn(t[0],"ordgroup");if(a)for(var o,c=0;c{var t=Qe([],[ir(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 Qe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new et("mpadded",[kr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});ft({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=ir(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=$h(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=at(h);var m=rr({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(nn.SCRIPTSCRIPT),k=ir(e.index,w,n),v=.6*(m.height-m.depth),b=rr({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),y=Qe(["root"],[b]);return Qe(["mord","sqrt"],[y,m],n)}else return Qe(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new et("mroot",[kr(t,n),kr(r,n)]):new et("msqrt",[kr(t,n)])}});var fk={display:nn.DISPLAY,text:nn.TEXT,script:nn.SCRIPT,scriptscript:nn.SCRIPTSCRIPT};function qIn(e){return e in fk}ft({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(!qIn(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=fk[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),yH(e.body,r,n)},mathmlBuilder(e,n){var t=fk[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=Na(e.body,r),i=new et("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 UIn=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===nn.DISPLAY.size||r.alwaysHandleSupSub);return s?sp:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===nn.DISPLAY.size||r.limits);return i?bH:null}else{if(r.type==="accent")return El(r.base)?zC:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?mH:null}else return null}else return null};Pf({type:"supsub",htmlBuilder(e,n){var t=UIn(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,a=ir(r,n),o,c,u=n.fontMetrics(),h=0,f=0,p=r&&El(r);if(s){var m=n.havingStyle(n.style.sup());o=ir(s,m,n),p||(h=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var w=n.havingStyle(n.style.sub());c=ir(i,w,n),p||(f=a.depth+w.fontMetrics().subDrop*w.sizeMultiplier/n.sizeMultiplier)}var k;n.style===nn.DISPLAY?k=u.sup1:n.style.cramped?k=u.sup3:k=u.sup2;var v=n.sizeMultiplier,b=at(.5/u.ptPerEm/v),y=null;if(c){var x=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof wa||x){var C;y=at(-((C=a.italic)!=null?C:0))}}var N;if(o&&c){h=Math.max(h,k,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var j=u.defaultRuleThickness,A=4*j;if(h-o.depth-(c.height-f)0&&(h+=z,f-=z)}var M=[{type:"elem",elem:c,shift:f,marginRight:b,marginLeft:y},{type:"elem",elem:o,shift:-h,marginRight:b}];N=rr({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:y,marginRight:b}];N=rr({positionType:"shift",positionData:f,children:D})}else if(o)h=Math.max(h,k,o.depth+.25*u.xHeight),N=rr({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var I=ok(a,"right")||"mord";return Qe([I],[a,Qe(["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===nn.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===nn.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===nn.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===nn.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===nn.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===nn.DISPLAY)?a="mover":a="msup"}return new et(a,i)}});Pf({type:"atom",htmlBuilder(e,n){return SC(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new et("mo",[Ga(e.text,e.mode)]);if(e.family==="bin"){var r=NC(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 xH={mi:"italic",mn:"normal",mtext:"normal"};Pf({type:"mathord",htmlBuilder(e,n){return Oy(e,n,"mathord")},mathmlBuilder(e,n){var t=new et("mi",[Ga(e.text,e.mode,n)]),r=NC(e,n)||"italic";return r!==xH[t.type]&&t.setAttribute("mathvariant",r),t}});Pf({type:"textord",htmlBuilder(e,n){return Oy(e,n,"textord")},mathmlBuilder(e,n){var t=Ga(e.text,e.mode,n),r=NC(e,n)||"normal",s;return e.mode==="text"?s=new et("mtext",[t]):/[0-9]/.test(e.text)?s=new et("mn",[t]):e.text==="\\prime"?s=new et("mo",[t]):s=new et("mi",[t]),r!==xH[s.type]&&s.setAttribute("mathvariant",r),s}});var h4={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},p4={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Pf({type:"spacing",htmlBuilder(e,n){if(p4.hasOwnProperty(e.text)){var t=p4[e.text].className||"";if(e.mode==="text"){var r=Oy(e,n,"textord");return r.classes.push(t),r}else return Qe(["mspace",t],[SC(e.text,e.mode,n)],n)}else{if(h4.hasOwnProperty(e.text))return Qe(["mspace",h4[e.text]],[],n);throw new Je('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(p4.hasOwnProperty(e.text))t=new et("mtext",[new hs(" ")]);else{if(h4.hasOwnProperty(e.text))return new et("mspace");throw new Je('Unknown type of space "'+e.text+'"')}return t}});var CR=()=>{var e=new et("mtd",[]);return e.setAttribute("width","50%"),e};Pf({type:"tag",mathmlBuilder(e,n){var t=new et("mtable",[new et("mtr",[CR(),new et("mtd",[Ku(e.body,n)]),CR(),new et("mtd",[Ku(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var ER={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},NR={"\\textbf":"textbf","\\textmd":"textmd"},GIn={"\\textit":"textit","\\textup":"textup"},zR=(e,n)=>{var t=e.font;if(t){if(ER[t])return n.withTextFontFamily(ER[t]);if(NR[t])return n.withTextFontWeight(NR[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(GIn[t])};ft({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:ds(s),font:r}},htmlBuilder(e,n){var t=zR(e,n),r=zs(e.body,t,!0);return Qe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=zR(e,n);return Ku(e.body,t)}});ft({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=ir(e.body,n),r=Ih("underline-line",n),s=n.fontMetrics().defaultRuleThickness,i=rr({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Qe(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new et("mo",[new hs("‾")]);t.setAttribute("stretchy","true");var r=new et("munder",[kr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});ft({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=ir(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return rr({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new et("mpadded",[kr(e.body,n)],["vcenter"]);return new et("mrow",[t])}});ft({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Je("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=jR(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),Mu=HF,wH=`[ \r - ]`,KIn="\\\\[a-zA-Z@]+",VIn="\\\\[^\uD800-\uDFFF]",WIn="("+KIn+")"+wH+"*",QIn=`\\\\( +-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 yIn(e){return"toText"in e}class tp{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(yIn(n))return n.toText();throw new Error("Expected MathDomNode with toText, got "+n.constructor.name)}).join("")}}var X5={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},xIn={ex:!0,em:!0,mu:!0},MF=function(n){return typeof n!="string"&&(n=n.unit),n in X5||n in xIn||n==="ex"},$r=function(n,t){var r;if(n.unit in X5)r=X5[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 Je("Invalid unit: '"+n.unit+"'");s!==t&&(r*=s.sizeMultiplier/t.sizeMultiplier)}return Math.min(n.number*r,t.maxSize)},at=function(n){return+n.toFixed(4)+"em"},Uu=function(n){return n.filter(t=>t).join(" ")},wC=function(n){var t="";for(var r of Object.keys(n)){var s=n[r];s!==void 0&&(t+=QLn(r)+":"+s+";")}return t},OF=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)}},DF=function(n){var t=document.createElement(n);t.className=Uu(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]/,LF=function(n){var t="<"+n;this.classes.length&&(t+=' class="'+si(Uu(this.classes))+'"');var r=wC(this.style);r&&(t+=' style="'+si(r)+'"');for(var s of Object.keys(this.attributes)){if(wIn.test(s))throw new Je("Invalid attribute name '"+s+"'");t+=" "+s+'="'+si(this.attributes[s])+'"'}t+=">";for(var i=0;i",t};class np{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,OF.call(this,n,r,s),this.children=t||[]}setAttribute(n,t){this.attributes[n]=t}hasClass(n){return this.classes.includes(n)}toNode(){return DF.call(this,"span")}toMarkup(){return LF.call(this,"span")}}class Ty{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,OF.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 DF.call(this,"a")}toMarkup(){return LF.call(this,"a")}}class kIn{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=''+si(this.alt)+'0&&(t=document.createElement("span"),t.style.marginRight=at(this.italic)),this.classes.length>0&&(t=t||document.createElement("span"),t.className=Uu(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:"+at(this.italic)+";"),r+=wC(this.style),r&&(n=!0,t+=' style="'+si(r)+'"');var s=si(this.text);return n?(t+=">",t+=s,t+="",t):s}}class xl{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 Y5{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 NIn=e=>e instanceof np||e instanceof Ty||e instanceof tp,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]}},N1={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]},JT={Å:"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 zIn(e,n){nc[e]=n}function kC(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 JT&&(r=JT[e[0]].charCodeAt(0),s=nc[n][r]),!s&&t==="text"&&RF(r)&&(s=nc[n][77]),s)return{depth:s[0],height:s[1],italic:s[2],skew:s[3],width:s[4]}}var e4={};function jIn(e){var n;if(e>=5?n=0:e>=3?n=1:n=2,!e4[n]){var t=e4[n]={cssEmPerMu:N1.quad[n]/18};for(var r in N1)N1.hasOwnProperty(r)&&(t[r]=N1[r][n])}return e4[n]}var Ar={math:{},text:{}};function P(e,n,t,r,s,i){Ar[e][s]={font:n,group:t,replace:r},i&&r&&(Ar[e][r]=Ar[e][s])}var W="math",Ve="text",ee="main",fe="ams",Rr="accent-token",ht="bin",ki="close",rp="inner",Vt="mathord",ms="op-token",Ea="open",Vm="punct",de="rel",Nl="spacing",ye="textord";P(W,ee,de,"≡","\\equiv",!0);P(W,ee,de,"≺","\\prec",!0);P(W,ee,de,"≻","\\succ",!0);P(W,ee,de,"∼","\\sim",!0);P(W,ee,de,"⊥","\\perp");P(W,ee,de,"⪯","\\preceq",!0);P(W,ee,de,"⪰","\\succeq",!0);P(W,ee,de,"≃","\\simeq",!0);P(W,ee,de,"∣","\\mid",!0);P(W,ee,de,"≪","\\ll",!0);P(W,ee,de,"≫","\\gg",!0);P(W,ee,de,"≍","\\asymp",!0);P(W,ee,de,"∥","\\parallel");P(W,ee,de,"⋈","\\bowtie",!0);P(W,ee,de,"⌣","\\smile",!0);P(W,ee,de,"⊑","\\sqsubseteq",!0);P(W,ee,de,"⊒","\\sqsupseteq",!0);P(W,ee,de,"≐","\\doteq",!0);P(W,ee,de,"⌢","\\frown",!0);P(W,ee,de,"∋","\\ni",!0);P(W,ee,de,"∝","\\propto",!0);P(W,ee,de,"⊢","\\vdash",!0);P(W,ee,de,"⊣","\\dashv",!0);P(W,ee,de,"∋","\\owns");P(W,ee,Vm,".","\\ldotp");P(W,ee,Vm,"⋅","\\cdotp");P(W,ee,Vm,"⋅","·");P(Ve,ee,ye,"⋅","·");P(W,ee,ye,"#","\\#");P(Ve,ee,ye,"#","\\#");P(W,ee,ye,"&","\\&");P(Ve,ee,ye,"&","\\&");P(W,ee,ye,"ℵ","\\aleph",!0);P(W,ee,ye,"∀","\\forall",!0);P(W,ee,ye,"ℏ","\\hbar",!0);P(W,ee,ye,"∃","\\exists",!0);P(W,ee,ye,"∇","\\nabla",!0);P(W,ee,ye,"♭","\\flat",!0);P(W,ee,ye,"ℓ","\\ell",!0);P(W,ee,ye,"♮","\\natural",!0);P(W,ee,ye,"♣","\\clubsuit",!0);P(W,ee,ye,"℘","\\wp",!0);P(W,ee,ye,"♯","\\sharp",!0);P(W,ee,ye,"♢","\\diamondsuit",!0);P(W,ee,ye,"ℜ","\\Re",!0);P(W,ee,ye,"♡","\\heartsuit",!0);P(W,ee,ye,"ℑ","\\Im",!0);P(W,ee,ye,"♠","\\spadesuit",!0);P(W,ee,ye,"§","\\S",!0);P(Ve,ee,ye,"§","\\S");P(W,ee,ye,"¶","\\P",!0);P(Ve,ee,ye,"¶","\\P");P(W,ee,ye,"†","\\dag");P(Ve,ee,ye,"†","\\dag");P(Ve,ee,ye,"†","\\textdagger");P(W,ee,ye,"‡","\\ddag");P(Ve,ee,ye,"‡","\\ddag");P(Ve,ee,ye,"‡","\\textdaggerdbl");P(W,ee,ki,"⎱","\\rmoustache",!0);P(W,ee,Ea,"⎰","\\lmoustache",!0);P(W,ee,ki,"⟯","\\rgroup",!0);P(W,ee,Ea,"⟮","\\lgroup",!0);P(W,ee,ht,"∓","\\mp",!0);P(W,ee,ht,"⊖","\\ominus",!0);P(W,ee,ht,"⊎","\\uplus",!0);P(W,ee,ht,"⊓","\\sqcap",!0);P(W,ee,ht,"∗","\\ast");P(W,ee,ht,"⊔","\\sqcup",!0);P(W,ee,ht,"◯","\\bigcirc",!0);P(W,ee,ht,"∙","\\bullet",!0);P(W,ee,ht,"‡","\\ddagger");P(W,ee,ht,"≀","\\wr",!0);P(W,ee,ht,"⨿","\\amalg");P(W,ee,ht,"&","\\And");P(W,ee,de,"⟵","\\longleftarrow",!0);P(W,ee,de,"⇐","\\Leftarrow",!0);P(W,ee,de,"⟸","\\Longleftarrow",!0);P(W,ee,de,"⟶","\\longrightarrow",!0);P(W,ee,de,"⇒","\\Rightarrow",!0);P(W,ee,de,"⟹","\\Longrightarrow",!0);P(W,ee,de,"↔","\\leftrightarrow",!0);P(W,ee,de,"⟷","\\longleftrightarrow",!0);P(W,ee,de,"⇔","\\Leftrightarrow",!0);P(W,ee,de,"⟺","\\Longleftrightarrow",!0);P(W,ee,de,"↦","\\mapsto",!0);P(W,ee,de,"⟼","\\longmapsto",!0);P(W,ee,de,"↗","\\nearrow",!0);P(W,ee,de,"↩","\\hookleftarrow",!0);P(W,ee,de,"↪","\\hookrightarrow",!0);P(W,ee,de,"↘","\\searrow",!0);P(W,ee,de,"↼","\\leftharpoonup",!0);P(W,ee,de,"⇀","\\rightharpoonup",!0);P(W,ee,de,"↙","\\swarrow",!0);P(W,ee,de,"↽","\\leftharpoondown",!0);P(W,ee,de,"⇁","\\rightharpoondown",!0);P(W,ee,de,"↖","\\nwarrow",!0);P(W,ee,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,ht,"⊴","\\unlhd");P(W,fe,ht,"⊵","\\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(Ve,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(Ve,ee,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(Ve,fe,ye,"¥","\\yen",!0);P(W,fe,ye,"✓","\\checkmark",!0);P(Ve,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,Ea,"┌","\\@ulcorner",!0);P(W,fe,ki,"┐","\\@urcorner",!0);P(W,fe,Ea,"└","\\@llcorner",!0);P(W,fe,ki,"┘","\\@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,ht,"⋖","\\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,ht,"⋗","\\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,ht,"⊲","\\lhd");P(W,fe,ht,"⊳","\\rhd");P(W,fe,de,"≂","\\eqsim",!0);P(W,ee,de,"⋈","\\Join");P(W,fe,de,"≑","\\Doteq",!0);P(W,fe,ht,"∔","\\dotplus",!0);P(W,fe,ht,"∖","\\smallsetminus");P(W,fe,ht,"⋒","\\Cap",!0);P(W,fe,ht,"⋓","\\Cup",!0);P(W,fe,ht,"⩞","\\doublebarwedge",!0);P(W,fe,ht,"⊟","\\boxminus",!0);P(W,fe,ht,"⊞","\\boxplus",!0);P(W,fe,ht,"⋇","\\divideontimes",!0);P(W,fe,ht,"⋉","\\ltimes",!0);P(W,fe,ht,"⋊","\\rtimes",!0);P(W,fe,ht,"⋋","\\leftthreetimes",!0);P(W,fe,ht,"⋌","\\rightthreetimes",!0);P(W,fe,ht,"⋏","\\curlywedge",!0);P(W,fe,ht,"⋎","\\curlyvee",!0);P(W,fe,ht,"⊝","\\circleddash",!0);P(W,fe,ht,"⊛","\\circledast",!0);P(W,fe,ht,"⋅","\\centerdot");P(W,fe,ht,"⊺","\\intercal",!0);P(W,fe,ht,"⋒","\\doublecap");P(W,fe,ht,"⋓","\\doublecup");P(W,fe,ht,"⊠","\\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,ee,de,"⊶","\\origof",!0);P(W,ee,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,ee,ye,"‘","`");P(W,ee,ye,"$","\\$");P(Ve,ee,ye,"$","\\$");P(Ve,ee,ye,"$","\\textdollar");P(W,ee,ye,"%","\\%");P(Ve,ee,ye,"%","\\%");P(W,ee,ye,"_","\\_");P(Ve,ee,ye,"_","\\_");P(Ve,ee,ye,"_","\\textunderscore");P(W,ee,ye,"∠","\\angle",!0);P(W,ee,ye,"∞","\\infty",!0);P(W,ee,ye,"′","\\prime");P(W,ee,ye,"△","\\triangle");P(W,ee,ye,"Γ","\\Gamma",!0);P(W,ee,ye,"Δ","\\Delta",!0);P(W,ee,ye,"Θ","\\Theta",!0);P(W,ee,ye,"Λ","\\Lambda",!0);P(W,ee,ye,"Ξ","\\Xi",!0);P(W,ee,ye,"Π","\\Pi",!0);P(W,ee,ye,"Σ","\\Sigma",!0);P(W,ee,ye,"Υ","\\Upsilon",!0);P(W,ee,ye,"Φ","\\Phi",!0);P(W,ee,ye,"Ψ","\\Psi",!0);P(W,ee,ye,"Ω","\\Omega",!0);P(W,ee,ye,"A","Α");P(W,ee,ye,"B","Β");P(W,ee,ye,"E","Ε");P(W,ee,ye,"Z","Ζ");P(W,ee,ye,"H","Η");P(W,ee,ye,"I","Ι");P(W,ee,ye,"K","Κ");P(W,ee,ye,"M","Μ");P(W,ee,ye,"N","Ν");P(W,ee,ye,"O","Ο");P(W,ee,ye,"P","Ρ");P(W,ee,ye,"T","Τ");P(W,ee,ye,"X","Χ");P(W,ee,ye,"¬","\\neg",!0);P(W,ee,ye,"¬","\\lnot");P(W,ee,ye,"⊤","\\top");P(W,ee,ye,"⊥","\\bot");P(W,ee,ye,"∅","\\emptyset");P(W,fe,ye,"∅","\\varnothing");P(W,ee,Vt,"α","\\alpha",!0);P(W,ee,Vt,"β","\\beta",!0);P(W,ee,Vt,"γ","\\gamma",!0);P(W,ee,Vt,"δ","\\delta",!0);P(W,ee,Vt,"ϵ","\\epsilon",!0);P(W,ee,Vt,"ζ","\\zeta",!0);P(W,ee,Vt,"η","\\eta",!0);P(W,ee,Vt,"θ","\\theta",!0);P(W,ee,Vt,"ι","\\iota",!0);P(W,ee,Vt,"κ","\\kappa",!0);P(W,ee,Vt,"λ","\\lambda",!0);P(W,ee,Vt,"μ","\\mu",!0);P(W,ee,Vt,"ν","\\nu",!0);P(W,ee,Vt,"ξ","\\xi",!0);P(W,ee,Vt,"ο","\\omicron",!0);P(W,ee,Vt,"π","\\pi",!0);P(W,ee,Vt,"ρ","\\rho",!0);P(W,ee,Vt,"σ","\\sigma",!0);P(W,ee,Vt,"τ","\\tau",!0);P(W,ee,Vt,"υ","\\upsilon",!0);P(W,ee,Vt,"ϕ","\\phi",!0);P(W,ee,Vt,"χ","\\chi",!0);P(W,ee,Vt,"ψ","\\psi",!0);P(W,ee,Vt,"ω","\\omega",!0);P(W,ee,Vt,"ε","\\varepsilon",!0);P(W,ee,Vt,"ϑ","\\vartheta",!0);P(W,ee,Vt,"ϖ","\\varpi",!0);P(W,ee,Vt,"ϱ","\\varrho",!0);P(W,ee,Vt,"ς","\\varsigma",!0);P(W,ee,Vt,"φ","\\varphi",!0);P(W,ee,ht,"∗","*",!0);P(W,ee,ht,"+","+");P(W,ee,ht,"−","-",!0);P(W,ee,ht,"⋅","\\cdot",!0);P(W,ee,ht,"∘","\\circ",!0);P(W,ee,ht,"÷","\\div",!0);P(W,ee,ht,"±","\\pm",!0);P(W,ee,ht,"×","\\times",!0);P(W,ee,ht,"∩","\\cap",!0);P(W,ee,ht,"∪","\\cup",!0);P(W,ee,ht,"∖","\\setminus",!0);P(W,ee,ht,"∧","\\land");P(W,ee,ht,"∨","\\lor");P(W,ee,ht,"∧","\\wedge",!0);P(W,ee,ht,"∨","\\vee",!0);P(W,ee,ye,"√","\\surd");P(W,ee,Ea,"⟨","\\langle",!0);P(W,ee,Ea,"∣","\\lvert");P(W,ee,Ea,"∥","\\lVert");P(W,ee,ki,"?","?");P(W,ee,ki,"!","!");P(W,ee,ki,"⟩","\\rangle",!0);P(W,ee,ki,"∣","\\rvert");P(W,ee,ki,"∥","\\rVert");P(W,ee,de,"=","=");P(W,ee,de,":",":");P(W,ee,de,"≈","\\approx",!0);P(W,ee,de,"≅","\\cong",!0);P(W,ee,de,"≥","\\ge");P(W,ee,de,"≥","\\geq",!0);P(W,ee,de,"←","\\gets");P(W,ee,de,">","\\gt",!0);P(W,ee,de,"∈","\\in",!0);P(W,ee,de,"","\\@not");P(W,ee,de,"⊂","\\subset",!0);P(W,ee,de,"⊃","\\supset",!0);P(W,ee,de,"⊆","\\subseteq",!0);P(W,ee,de,"⊇","\\supseteq",!0);P(W,fe,de,"⊈","\\nsubseteq",!0);P(W,fe,de,"⊉","\\nsupseteq",!0);P(W,ee,de,"⊨","\\models");P(W,ee,de,"←","\\leftarrow",!0);P(W,ee,de,"≤","\\le");P(W,ee,de,"≤","\\leq",!0);P(W,ee,de,"<","\\lt",!0);P(W,ee,de,"→","\\rightarrow",!0);P(W,ee,de,"→","\\to");P(W,fe,de,"≱","\\ngeq",!0);P(W,fe,de,"≰","\\nleq",!0);P(W,ee,Nl," ","\\ ");P(W,ee,Nl," ","\\space");P(W,ee,Nl," ","\\nobreakspace");P(Ve,ee,Nl," ","\\ ");P(Ve,ee,Nl," "," ");P(Ve,ee,Nl," ","\\space");P(Ve,ee,Nl," ","\\nobreakspace");P(W,ee,Nl,"","\\nobreak");P(W,ee,Nl,"","\\allowbreak");P(W,ee,Vm,",",",");P(W,ee,Vm,";",";");P(W,fe,ht,"⊼","\\barwedge",!0);P(W,fe,ht,"⊻","\\veebar",!0);P(W,ee,ht,"⊙","\\odot",!0);P(W,ee,ht,"⊕","\\oplus",!0);P(W,ee,ht,"⊗","\\otimes",!0);P(W,ee,ye,"∂","\\partial",!0);P(W,ee,ht,"⊘","\\oslash",!0);P(W,fe,ht,"⊚","\\circledcirc",!0);P(W,fe,ht,"⊡","\\boxdot",!0);P(W,ee,ht,"△","\\bigtriangleup");P(W,ee,ht,"▽","\\bigtriangledown");P(W,ee,ht,"†","\\dagger");P(W,ee,ht,"⋄","\\diamond");P(W,ee,ht,"⋆","\\star");P(W,ee,ht,"◃","\\triangleleft");P(W,ee,ht,"▹","\\triangleright");P(W,ee,Ea,"{","\\{");P(Ve,ee,ye,"{","\\{");P(Ve,ee,ye,"{","\\textbraceleft");P(W,ee,ki,"}","\\}");P(Ve,ee,ye,"}","\\}");P(Ve,ee,ye,"}","\\textbraceright");P(W,ee,Ea,"{","\\lbrace");P(W,ee,ki,"}","\\rbrace");P(W,ee,Ea,"[","\\lbrack",!0);P(Ve,ee,ye,"[","\\lbrack",!0);P(W,ee,ki,"]","\\rbrack",!0);P(Ve,ee,ye,"]","\\rbrack",!0);P(W,ee,Ea,"(","\\lparen",!0);P(W,ee,ki,")","\\rparen",!0);P(Ve,ee,ye,"<","\\textless",!0);P(Ve,ee,ye,">","\\textgreater",!0);P(W,ee,Ea,"⌊","\\lfloor",!0);P(W,ee,ki,"⌋","\\rfloor",!0);P(W,ee,Ea,"⌈","\\lceil",!0);P(W,ee,ki,"⌉","\\rceil",!0);P(W,ee,ye,"\\","\\backslash");P(W,ee,ye,"∣","|");P(W,ee,ye,"∣","\\vert");P(Ve,ee,ye,"|","\\textbar",!0);P(W,ee,ye,"∥","\\|");P(W,ee,ye,"∥","\\Vert");P(Ve,ee,ye,"∥","\\textbardbl");P(Ve,ee,ye,"~","\\textasciitilde");P(Ve,ee,ye,"\\","\\textbackslash");P(Ve,ee,ye,"^","\\textasciicircum");P(W,ee,de,"↑","\\uparrow",!0);P(W,ee,de,"⇑","\\Uparrow",!0);P(W,ee,de,"↓","\\downarrow",!0);P(W,ee,de,"⇓","\\Downarrow",!0);P(W,ee,de,"↕","\\updownarrow",!0);P(W,ee,de,"⇕","\\Updownarrow",!0);P(W,ee,ms,"∐","\\coprod");P(W,ee,ms,"⋁","\\bigvee");P(W,ee,ms,"⋀","\\bigwedge");P(W,ee,ms,"⨄","\\biguplus");P(W,ee,ms,"⋂","\\bigcap");P(W,ee,ms,"⋃","\\bigcup");P(W,ee,ms,"∫","\\int");P(W,ee,ms,"∫","\\intop");P(W,ee,ms,"∬","\\iint");P(W,ee,ms,"∭","\\iiint");P(W,ee,ms,"∏","\\prod");P(W,ee,ms,"∑","\\sum");P(W,ee,ms,"⨂","\\bigotimes");P(W,ee,ms,"⨁","\\bigoplus");P(W,ee,ms,"⨀","\\bigodot");P(W,ee,ms,"∮","\\oint");P(W,ee,ms,"∯","\\oiint");P(W,ee,ms,"∰","\\oiiint");P(W,ee,ms,"⨆","\\bigsqcup");P(W,ee,ms,"∫","\\smallint");P(Ve,ee,rp,"…","\\textellipsis");P(W,ee,rp,"…","\\mathellipsis");P(Ve,ee,rp,"…","\\ldots",!0);P(W,ee,rp,"…","\\ldots",!0);P(W,ee,rp,"⋯","\\@cdots",!0);P(W,ee,rp,"⋱","\\ddots",!0);P(W,ee,ye,"⋮","\\varvdots");P(Ve,ee,ye,"⋮","\\varvdots");P(W,ee,Rr,"ˊ","\\acute");P(W,ee,Rr,"ˋ","\\grave");P(W,ee,Rr,"¨","\\ddot");P(W,ee,Rr,"~","\\tilde");P(W,ee,Rr,"ˉ","\\bar");P(W,ee,Rr,"˘","\\breve");P(W,ee,Rr,"ˇ","\\check");P(W,ee,Rr,"^","\\hat");P(W,ee,Rr,"⃗","\\vec");P(W,ee,Rr,"˙","\\dot");P(W,ee,Rr,"˚","\\mathring");P(W,ee,Vt,"","\\@imath");P(W,ee,Vt,"","\\@jmath");P(W,ee,ye,"ı","ı");P(W,ee,ye,"ȷ","ȷ");P(Ve,ee,ye,"ı","\\i",!0);P(Ve,ee,ye,"ȷ","\\j",!0);P(Ve,ee,ye,"ß","\\ss",!0);P(Ve,ee,ye,"æ","\\ae",!0);P(Ve,ee,ye,"œ","\\oe",!0);P(Ve,ee,ye,"ø","\\o",!0);P(Ve,ee,ye,"Æ","\\AE",!0);P(Ve,ee,ye,"Œ","\\OE",!0);P(Ve,ee,ye,"Ø","\\O",!0);P(Ve,ee,Rr,"ˊ","\\'");P(Ve,ee,Rr,"ˋ","\\`");P(Ve,ee,Rr,"ˆ","\\^");P(Ve,ee,Rr,"˜","\\~");P(Ve,ee,Rr,"ˉ","\\=");P(Ve,ee,Rr,"˘","\\u");P(Ve,ee,Rr,"˙","\\.");P(Ve,ee,Rr,"¸","\\c");P(Ve,ee,Rr,"˚","\\r");P(Ve,ee,Rr,"ˇ","\\v");P(Ve,ee,Rr,"¨",'\\"');P(Ve,ee,Rr,"˝","\\H");P(Ve,ee,Rr,"◯","\\textcircled");var IF={"--":!0,"---":!0,"``":!0,"''":!0};P(Ve,ee,ye,"–","--",!0);P(Ve,ee,ye,"–","\\textendash");P(Ve,ee,ye,"—","---",!0);P(Ve,ee,ye,"—","\\textemdash");P(Ve,ee,ye,"‘","`",!0);P(Ve,ee,ye,"‘","\\textquoteleft");P(Ve,ee,ye,"’","'",!0);P(Ve,ee,ye,"’","\\textquoteright");P(Ve,ee,ye,"“","``",!0);P(Ve,ee,ye,"“","\\textquotedblleft");P(Ve,ee,ye,"”","''",!0);P(Ve,ee,ye,"”","\\textquotedblright");P(W,ee,ye,"°","\\degree",!0);P(Ve,ee,ye,"°","\\degree");P(Ve,ee,ye,"°","\\textdegree",!0);P(W,ee,ye,"£","\\pounds");P(W,ee,ye,"£","\\mathsterling",!0);P(Ve,ee,ye,"£","\\pounds");P(Ve,ee,ye,"£","\\textsterling",!0);P(W,fe,ye,"✠","\\maltese");P(Ve,fe,ye,"✠","\\maltese");var eR='0123456789/@."';for(var t4=0;t4{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 uR[s]}else if(120782<=r&&r<=120831){var i=Math.floor((r-120782)/10);return TIn[i]}else{if(r===120485||r===120486)return uR[0];if(120486{if(Uu(e.classes)!==Uu(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},$F=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},Qe=function(n,t,r,s){var i=new np(n,t,r,s);return CC(i),i},Vu=(e,n,t,r)=>new np(e,n,t,r),Ih=function(n,t,r){var s=Qe([n],[],t);return s.height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),s.style.borderBottomWidth=at(s.height),s.maxFontSize=1,s},DIn=function(n,t,r,s){var i=new Ty(n,t,r,s);return CC(i),i},zl=function(n){var t=new tp(n);return CC(t),t},$h=function(n,t){return n instanceof tp?Qe([],[n],t):n},LIn=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=Qe(["mspace"],[],n),r=$r(e,n);return t.style.marginRight=at(r),t},A1=(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},rk={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"}},PF={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},FF=function(n,t){var[r,s,i]=PF[n],a=new Gu(r),o=new xl([a],{width:at(s),height:at(i),style:"width:"+at(s),viewBox:"0 0 "+1e3*s+" "+1e3*i,preserveAspectRatio:"xMinYMin"}),c=Vu(["overlay"],[o],t);return c.height=i,c.style.height=at(i),c.style.width=at(s),c},Lr={number:3,unit:"mu"},R_={number:4,unit:"mu"},Jc={number:5,unit:"mu"},IIn={mord:{mop:Lr,mbin:R_,mrel:Jc,minner:Lr},mop:{mord:Lr,mop:Lr,mrel:Jc,minner:Lr},mbin:{mord:R_,mop:R_,mopen:R_,minner:R_},mrel:{mord:Jc,mop:Jc,mopen:Jc,minner:Jc},mopen:{},mclose:{mop:Lr,mbin:R_,mrel:Jc,minner:Lr},mpunct:{mord:Lr,mop:Lr,mrel:Jc,mopen:Lr,mclose:Lr,mpunct:Lr,minner:Lr},minner:{mord:Lr,mop:Lr,mbin:R_,mrel:Jc,mopen:Lr,mpunct:Lr,minner:Lr}},$In={mord:{mop:Lr},mop:{mord:Lr,mop:Lr},mbin:{},mrel:{},mopen:{},mclose:{mop:Lr},mpunct:{},minner:{mop:Lr}},HF={},fb={},db={};function ft(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],b=w.classes[0];v==="mbin"&&PIn.has(b)?k.classes[0]="mord":b==="mbin"&&BIn.has(v)&&(w.classes[0]="mord")},{node:f},p,m),sk(i,(w,k)=>{var v,b,y=ak(k),x=ak(w),C=y&&x?w.hasClass("mtight")?(v=$In[y])==null?void 0:v[x]:(b=IIn[y])==null?void 0:b[x]:null;if(C)return BF(C,u)},{node:f},p,m),i},sk=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()},qF=function(n){return n instanceof tp||n instanceof Ty||n instanceof np&&n.hasClass("enclosing")?n:null},ik=function(n,t){var r=qF(n);if(r){var s=r.children;if(s.length){if(t==="right")return ik(s[s.length-1],"right");if(t==="left")return ik(s[0],"left")}}return n},ak=function(n,t){if(!n)return null;t&&(n=ik(n,t));var r=n.classes[0];return HIn[r]||null},Z0=function(n,t){var r=["nulldelimiter"].concat(n.baseSizingClasses());return Qe(t.concat(r))},ir=function(n,t,r){if(!n)return Qe();if(fb[n.type]){var s=fb[n.type](n,t);if(r&&t.size!==r.size){s=Qe(t.sizingClasses(r),[s],t);var i=t.sizeMultiplier/r.sizeMultiplier;s.height*=i,s.depth*=i}return s}else throw new Je("Got group of unknown type: '"+n.type+"'")};function T1(e,n){var t=Qe(["base"],e,n),r=Qe(["strut"]);return r.style.height=at(t.height+t.depth),t.depth&&(r.style.verticalAlign=at(-t.depth)),t.children.unshift(r),t}function ok(e,n){var t=null;e.length===1&&e[0].type==="tag"&&(t=e[0].tag,e=e[0].body);var r=js(e,n,"root"),s;r.length===2&&r[1].hasClass("tag")&&(s=r.pop());for(var i=[],a=[],o=0;o0&&(i.push(T1(a,n)),a=[]),i.push(r[o]));a.length>0&&i.push(T1(a,n));var u;t?(u=T1(js(t,n,!0),n),u.classes=["tag"],i.push(u)):s&&i.push(s);var h=Qe(["katex-html"],i);if(h.setAttribute("aria-hidden","true"),u){var f=u.children[0];f.style.height=at(h.height+h.depth),h.depth&&(f.style.verticalAlign=at(-h.depth))}return h}function UF(e){return new tp(e)}class et{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=Uu(this.classes));for(var r=0;r0&&(n+=' class ="'+si(Uu(this.classes))+'"'),n+=">";for(var r=0;r",n}toText(){return this.children.map(n=>n.toText()).join("")}}class ps{constructor(n){this.text=void 0,this.text=n}toNode(){return document.createTextNode(this.text)}toMarkup(){return si(this.toText())}toText(){return this.text}}class GF{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",at(this.width)),n}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character?this.character:" "}}var qIn=new Set(["\\imath","\\jmath"]),UIn=new Set(["mrow","mtable"]),Ga=function(n,t,r){return Ar[t][n]&&Ar[t][n].replace&&n.charCodeAt(0)!==55349&&!(IF.hasOwnProperty(n)&&r&&(r.fontFamily&&r.fontFamily.slice(4,6)==="tt"||r.font&&r.font.slice(4,6)==="tt"))&&(n=Ar[t][n].replace),new ps(n)},EC=function(n){return n.length===1?n[0]:new et("mrow",n)},GIn={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"},NC=(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=GIn[t];if(s)return typeof s=="function"?s(e):s;var i=e.text;if(qIn.has(i))return null;if(Ar[r][i]){var a=Ar[r][i].replace;a&&(i=a)}var o=rk[t].fontName;return kC(i,o,r)?rk[t].variant:null};function i4(e){if(!e)return!1;if(e.type==="mi"&&e.children.length===1){var n=e.children[0];return n instanceof ps&&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 ps&&t.text===","}else return!1}var Na=function(n,t,r){if(n.length===1){var s=kr(n[0],t);return r&&s instanceof et&&s.type==="mo"&&(s.setAttribute("lspace","0em"),s.setAttribute("rspace","0em")),[s]}for(var i=[],a,o=0;o=1&&(a.type==="mn"||i4(a))){var u=c.children[0];u instanceof et&&u.type==="mn"&&(u.children=[...a.children,...u.children],i.pop())}else if(a.type==="mi"&&a.children.length===1){var h=a.children[0];if(h instanceof ps&&h.text==="̸"&&(c.type==="mo"||c.type==="mi"||c.type==="mn")){var f=c.children[0];f instanceof ps&&f.text.length>0&&(f.text=f.text.slice(0,1)+"̸"+f.text.slice(1),i.pop())}}}i.push(c),a=c}return i},Ku=function(n,t,r){return EC(Na(n,t,r))},kr=function(n,t){if(!n)return new et("mrow");if(db[n.type])return db[n.type](n,t);throw new Je("Got group of unknown type: '"+n.type+"'")};function _R(e,n,t,r,s){var i=Na(e,t),a;i.length===1&&i[0]instanceof et&&UIn.has(i[0].type)?a=i[0]:a=new et("mrow",i);var o=new et("annotation",[new ps(n)]);o.setAttribute("encoding","application/x-tex");var c=new et("semantics",[a,o]),u=new et("math",[c]);u.setAttribute("xmlns","http://www.w3.org/1998/Math/MathML"),r&&u.setAttribute("display","block");var h=s?"katex":"katex-mathml";return Qe([h],[u])}var VIn=[[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]],fR=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],dR=function(n,t){return t.size<2?n:VIn[n-1][t.size-1]};class sl{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||sl.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=fR[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 sl(t)}havingStyle(n){return this.style===n?this:this.extend({style:n,size:dR(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:fR[n-1]})}havingBaseStyle(n){n=n||this.style.text();var t=dR(sl.BASESIZE,n);return this.size===t&&this.textSize===sl.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!==sl.BASESIZE?["sizing","reset-size"+this.size,"size"+sl.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=jIn(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}sl.BASESIZE=6;var VF=function(n){return new sl({style:n.displayMode?nn.DISPLAY:nn.TEXT,maxSize:n.maxSize,minRuleThickness:n.minRuleThickness})},KF=function(n,t){if(t.displayMode){var r=["katex-display"];t.leqno&&r.push("leqno"),t.fleqn&&r.push("fleqn"),n=Qe(r,[n])}return n},KIn=function(n,t,r){var s=VF(r),i;if(r.output==="mathml")return _R(n,t,s,r.displayMode,!0);if(r.output==="html"){var a=ok(n,s);i=Qe(["katex"],[a])}else{var o=_R(n,t,s,r.displayMode,!1),c=ok(n,s);i=Qe(["katex"],[o,c])}return KF(i,r)},WIn=function(n,t,r){var s=VF(r),i=ok(n,s),a=Qe(["katex"],[i]);return KF(a,r)},QIn={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":"="},Oy=function(n){var t=new et("mo",[new ps(QIn[n.replace(/^\\/,"")])]);return t.setAttribute("stretchy","true"),t},XIn={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]},YIn=new Set(["widehat","widecheck","widetilde","utilde"]),Dy=function(n,t){function r(){var o=4e5,c=n.label.slice(1);if(YIn.has(c)&&"base"in n){var u=n.base.type==="ordgroup"?n.base.body.length:1,h,f,p;if(u>5)c==="widehat"||c==="widecheck"?(h=420,o=2364,p=.42,f=c+"4"):(h=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],h=[0,239,300,360,420][m],p=[0,.24,.3,.3,.36,.42][m],f=c+m):(o=[0,600,1033,2339,2340][m],h=[0,260,286,306,312][m],p=[0,.26,.286,.3,.306,.34][m],f="tilde"+m)}var w=new Gu(f),k=new xl([w],{width:"100%",height:at(p),viewBox:"0 0 "+o+" "+h,preserveAspectRatio:"none"});return{span:Vu([],[k],t),minWidth:0,height:p}}else{var v=[],b=XIn[c];if(!b)throw new Error('No SVG data for "'+c+'".');var[y,x,C]=b,N=C/1e3,j=y.length,A,z;if(j===1){if(b.length!==4)throw new Error('Expected 4-tuple for single-path SVG data "'+c+'".');A=["hide-tail"],z=[b[3]]}else if(j===2)A=["halfarrow-left","halfarrow-right"],z=["xMinYMin","xMaxYMin"];else if(j===3)A=["brace-left","brace-center","brace-right"],z=["xMinYMin","xMidYMin","xMaxYMin"];else throw new Error(`Correct katexImagesData or update code here to support + `+j+" children.");for(var M=0;M0&&(s.style.minWidth=at(i)),s},ZIn=function(n,t,r,s,i){var a,o=n.height+n.depth+r+s;if(/fbox|color|angl/.test(t)){if(a=Qe(["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 Y5({x1:"0",y1:"0",x2:"100%",y2:"100%","stroke-width":"0.046em"})),/^x?cancel$/.test(t)&&u.push(new Y5({x1:"0",y1:"100%",x2:"100%",y2:"0","stroke-width":"0.046em"}));var h=new xl(u,{width:"100%",height:at(o)});a=Vu([],[h],i)}return a.height=o,a.style.height=at(o),a},JIn={bin:1,close:1,inner:1,open:1,punct:1,rel:1},e$n={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1};function t$n(e){return e in JIn}function mn(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 Ly(e){var n=Iy(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 Iy(e){return e&&(e.type==="atom"||e$n.hasOwnProperty(e.type))?e:null}var WF=e=>{if(e instanceof wa)return e;if(NIn(e)&&e.children.length===1)return WF(e.children[0])},zC=(e,n)=>{var t,r,s;e&&e.type==="supsub"?(r=mn(e.base,"accent"),t=r.base,e.base=t,s=EIn(ir(e,n)),e.base=r):(r=mn(e,"accent"),t=r.base);var i=ir(t,n.havingCrampedStyle()),a=r.isShifty&&El(t),o=0;if(a){var c,u;o=(c=(u=WF(i))==null?void 0:u.skew)!=null?c:0}var h=r.label==="\\c",f=h?i.height+i.depth:Math.min(i.height,n.fontMetrics().xHeight),p;if(r.isStretchy)p=Dy(r,n),p=rr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"elem",elem:p,wrapperClasses:["svg-align"],wrapperStyle:o>0?{width:"calc(100% - "+at(2*o)+")",marginLeft:at(2*o)}:void 0}]});else{var m,w;r.label==="\\vec"?(m=FF("vec",n),w=PF.vec[1]):(m=My({mode:r.mode,text:r.label},n,"textord"),m=CIn(m),m.italic=0,w=m.width,h&&(f+=m.depth)),p=Qe(["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=at(v),r.label==="\\textcircled"&&(p.style.top=".2em"),p=rr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:-f},{type:"elem",elem:p}]})}var b=Qe(["mord","accent"],[p],n);return s?(s.children[0]=b,s.height=Math.max(b.height,s.height),s.classes[0]="mord",s):b},QF=(e,n)=>{var t=e.isStretchy?Oy(e.label):new et("mo",[Ga(e.label,e.mode)]),r=new et("mover",[kr(e.base,n),t]);return r.setAttribute("accent","true"),r},n$n=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|"));ft({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=hb(n[0]),r=!n$n.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:zC,mathmlBuilder:QF});ft({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:zC,mathmlBuilder:QF});ft({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=ir(e.base,n),r=Dy(e,n),s=e.label==="\\utilde"?.12:0,i=rr({positionType:"top",positionData:t.height,children:[{type:"elem",elem:r,wrapperClasses:["svg-align"]},{type:"kern",size:s},{type:"elem",elem:t}]});return Qe(["mord","accentunder"],[i],n)},mathmlBuilder:(e,n)=>{var t=Oy(e.label),r=new et("munder",[kr(e.base,n),t]);return r.setAttribute("accentunder","true"),r}});var R1=e=>{var n=new et("mpadded",e?[e]:[]);return n.setAttribute("width","+0.6em"),n.setAttribute("lspace","0.3em"),n};ft({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=$h(ir(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=$h(ir(e.below,r,n),n),a.classes.push(i+"-arrow-pad"));var o=Dy(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 h;if(a){var f=-n.fontMetrics().axisHeight+a.height+.5*o.height+.111;h=rr({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 h=rr({positionType:"individualShift",children:[{type:"elem",elem:s,shift:u},{type:"elem",elem:o,shift:c,wrapperClasses:["svg-align"]}]});return Qe(["mrel","x-arrow"],[h],n)},mathmlBuilder(e,n){var t=Oy(e.label);t.setAttribute("minsize",e.label.charAt(0)==="x"?"1.75em":"3.0em");var r;if(e.body){var s=R1(kr(e.body,n));if(e.below){var i=R1(kr(e.below,n));r=new et("munderover",[t,i,s])}else r=new et("mover",[t,s])}else if(e.below){var a=R1(kr(e.below,n));r=new et("munder",[t,a])}else r=R1(),r=new et("mover",[t,r]);return r}});function XF(e,n){var t=js(e.body,n,!0);return Qe([e.mclass],t,n)}function YF(e,n){var t,r=Na(e.body,n);return e.mclass==="minner"?t=new et("mpadded",r):e.mclass==="mord"?e.isCharacterBox?(t=r[0],t.type="mi"):t=new et("mi",r):(e.isCharacterBox?(t=r[0],t.type="mo"):t=new et("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}ft({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:hs(s),isCharacterBox:El(s)}},htmlBuilder:XF,mathmlBuilder:YF});var $y=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"};ft({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,n){var{parser:t}=e;return{type:"mclass",mode:t.mode,mclass:$y(n[0]),body:hs(n[1]),isCharacterBox:El(n[1])}}});ft({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=$y(s):a="mrel";var o={type:"op",mode:s.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:r!=="\\stackrel",body:hs(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:El(c)}},htmlBuilder:XF,mathmlBuilder:YF});ft({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,n){var{parser:t}=e;return{type:"pmb",mode:t.mode,mclass:$y(n[0]),body:hs(n[0])}},htmlBuilder(e,n){var t=js(e.body,n,!0),r=Qe([e.mclass],t,n);return r.style.textShadow="0.02em 0.01em 0.04px",r},mathmlBuilder(e,n){var t=Na(e.body,n),r=new et("mstyle",t);return r.setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),r}});var r$n={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},hR=()=>({type:"styling",body:[],mode:"math",style:"display",resetFont:!0}),pR=e=>e.type==="textord"&&e.text==="@",s$n=(e,n)=>(e.type==="mathord"||e.type==="atom")&&e.text===n;function i$n(e,n,t){var r=r$n[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 a$n(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 Je("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=i$n(u,h,e),k={type:"styling",body:[w],mode:"math",style:"display",resetFont:!0};r.push(k),o=hR()}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([])}}ft({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=$h(ir(e.label,t,n),n);return r.classes.push("cd-label-"+e.side),r.style.bottom=at(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(e,n){var t=new et("mrow",[kr(e.label,n)]);return t=new et("mpadded",[t]),t.setAttribute("width","0"),e.side==="left"&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),t=new et("mstyle",[t]),t.setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}});ft({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=$h(ir(e.fragment,n),n);return t.classes.push("cd-vert-arrow"),t},mathmlBuilder(e,n){return new et("mrow",[kr(e.fragment,n)])}});ft({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,n){for(var{parser:t}=e,r=mn(n[0],"ordgroup"),s=r.body,i="",a=0;a=1114111)throw new Je("\\@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 ZF=(e,n)=>{var t=js(e.body,n.withColor(e.color),!1);return zl(t)},JF=(e,n)=>{var t=Na(e.body,n.withColor(e.color)),r=new et("mstyle",t);return r.setAttribute("mathcolor",e.color),r};ft({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,n){var{parser:t}=e,r=mn(n[0],"color-token").color,s=n[1];return{type:"color",mode:t.mode,color:r,body:hs(s)}},htmlBuilder:ZF,mathmlBuilder:JF});ft({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,n){var{parser:t,breakOnTokenText:r}=e,s=mn(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:ZF,mathmlBuilder:JF});ft({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&&mn(s,"size").value}},htmlBuilder(e,n){var t=Qe(["mspace"],[],n);return e.newLine&&(t.classes.push("newline"),e.size&&(t.style.marginTop=at($r(e.size,n)))),t},mathmlBuilder(e,n){var t=new et("mspace");return e.newLine&&(t.setAttribute("linebreak","newline"),e.size&&t.setAttribute("height",at($r(e.size,n)))),t}});var ck={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},eH=e=>{var n=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new Je("Expected a control sequence",e);return n},o$n=e=>{var n=e.gullet.popToken();return n.text==="="&&(n=e.gullet.popToken(),n.text===" "&&(n=e.gullet.popToken())),n},tH=(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)};ft({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(ck[r.text])return(t==="\\global"||t==="\\\\globallong")&&(r.text=ck[r.text]),mn(n.parseFunction(),"internal");throw new Je("Invalid token after macro prefix",r)}});ft({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 Je("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 Je('Invalid argument number "'+r.text+'"');if(parseInt(r.text)!==i+1)throw new Je('Argument number "'+r.text+'" out of order');i++,o.push([])}else{if(r.text==="EOF")throw new Je("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===ck[t]),{type:"internal",mode:n.mode}}});ft({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=eH(n.gullet.popToken());n.gullet.consumeSpaces();var s=o$n(n);return tH(n,r,s,t==="\\\\globallet"),{type:"internal",mode:n.mode}}});ft({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:n,funcName:t}=e,r=eH(n.gullet.popToken()),s=n.gullet.popToken(),i=n.gullet.popToken();return tH(n,r,i,t==="\\\\globalfuture"),n.gullet.pushToken(i),n.gullet.pushToken(s),{type:"internal",mode:n.mode}}});var f0=function(n,t,r){var s=Ar.math[n]&&Ar.math[n].replace,i=kC(s||n,t,r);if(!i)throw new Error("Unsupported symbol "+n+" and font size "+t+".");return i},jC=function(n,t,r,s){var i=r.havingBaseStyle(t),a=Qe(s.concat(i.sizingClasses(r)),[n],r),o=i.sizeMultiplier/r.sizeMultiplier;return a.height*=o,a.depth*=o,a.maxFontSize=i.sizeMultiplier,a},nH=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=at(i),n.height-=i,n.depth+=i},c$n=function(n,t,r,s,i,a){var o=gi(n,"Main-Regular",i,s),c=jC(o,t,s,a);return nH(c,s,t),c},l$n=function(n,t,r,s){return gi(n,"Size"+t+"-Regular",r,s)},rH=function(n,t,r,s,i,a){var o=l$n(n,t,i,s),c=jC(Qe(["delimsizing","size"+t],[o],s),nn.TEXT,s,a);return r&&nH(c,s,nn.TEXT),c},a4=function(n,t,r){var s;t==="Size1-Regular"?s="delim-size1":s="delim-size4";var i=Qe(["delimsizinginner",s],[Qe([],[gi(n,t,r)])]);return{type:"elem",elem:i}},o4=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 Gu("inner",vIn(n,Math.round(1e3*t))),a=new xl([i],{width:at(s),height:at(t),style:"width:"+at(s),viewBox:"0 0 "+1e3*s+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"}),o=Vu([],[a],r);return o.height=t,o.style.height=at(t),o.style.width=at(s),{type:"elem",elem:o}},lk=.008,M1={type:"kern",size:-1*lk},u$n=new Set(["|","\\lvert","\\rvert","\\vert"]),_$n=new Set(["\\|","\\lVert","\\rVert","\\Vert"]),sH=function(n,t,r,s,i,a){var o,c,u,h,f="",p=0;o=u=h=n,c=null;var m="Size1-Regular";n==="\\uparrow"?u=h="⏐":n==="\\Uparrow"?u=h="‖":n==="\\downarrow"?o=u="⏐":n==="\\Downarrow"?o=u="‖":n==="\\updownarrow"?(o="\\uparrow",u="⏐",h="\\downarrow"):n==="\\Updownarrow"?(o="\\Uparrow",u="‖",h="\\Downarrow"):u$n.has(n)?(u="∣",f="vert",p=333):_$n.has(n)?(u="∥",f="doublevert",p=556):n==="["||n==="\\lbrack"?(o="⎡",u="⎢",h="⎣",m="Size4-Regular",f="lbrack",p=667):n==="]"||n==="\\rbrack"?(o="⎤",u="⎥",h="⎦",m="Size4-Regular",f="rbrack",p=667):n==="\\lfloor"||n==="⌊"?(u=o="⎢",h="⎣",m="Size4-Regular",f="lfloor",p=667):n==="\\lceil"||n==="⌈"?(o="⎡",u=h="⎢",m="Size4-Regular",f="lceil",p=667):n==="\\rfloor"||n==="⌋"?(u=o="⎥",h="⎦",m="Size4-Regular",f="rfloor",p=667):n==="\\rceil"||n==="⌉"?(o="⎤",u=h="⎥",m="Size4-Regular",f="rceil",p=667):n==="("||n==="\\lparen"?(o="⎛",u="⎜",h="⎝",m="Size4-Regular",f="lparen",p=875):n===")"||n==="\\rparen"?(o="⎞",u="⎟",h="⎠",m="Size4-Regular",f="rparen",p=875):n==="\\{"||n==="\\lbrace"?(o="⎧",c="⎨",h="⎩",u="⎪",m="Size4-Regular"):n==="\\}"||n==="\\rbrace"?(o="⎫",c="⎬",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lgroup"||n==="⟮"?(o="⎧",h="⎩",u="⎪",m="Size4-Regular"):n==="\\rgroup"||n==="⟯"?(o="⎫",h="⎭",u="⎪",m="Size4-Regular"):n==="\\lmoustache"||n==="⎰"?(o="⎧",h="⎭",u="⎪",m="Size4-Regular"):(n==="\\rmoustache"||n==="⎱")&&(o="⎫",h="⎩",u="⎪",m="Size4-Regular");var w=f0(o,m,i),k=w.height+w.depth,v=f0(u,m,i),b=v.height+v.depth,y=f0(h,m,i),x=y.height+y.depth,C=0,N=1;if(c!==null){var j=f0(c,m,i);C=j.height+j.depth,N=2}var A=k+x+C,z=Math.max(0,Math.ceil((t-A)/(N*b))),M=A+z*N*b,D=s.fontMetrics().axisHeight;r&&(D*=s.sizeMultiplier);var I=M/2-D,B=[];if(f.length>0){var G=M-k-x,q=Math.round(M*1e3),Q=bIn(f,Math.round(G*1e3)),K=new Gu(f,Q),Z=at(p/1e3),J=at(q/1e3),$=new xl([K],{width:Z,height:J,viewBox:"0 0 "+p+" "+q}),L=Vu([],[$],s);L.height=q/1e3,L.style.width=Z,L.style.height=J,B.push({type:"elem",elem:L})}else{if(B.push(a4(h,m,i)),B.push(M1),c===null){var F=M-k-x+2*lk;B.push(o4(u,F,s))}else{var U=(M-k-x-C)/2+2*lk;B.push(o4(u,U,s)),B.push(M1),B.push(a4(c,m,i)),B.push(M1),B.push(o4(u,U,s))}B.push(M1),B.push(a4(o,m,i))}var H=s.havingBaseStyle(nn.TEXT),oe=rr({positionType:"bottom",positionData:I,children:B});return jC(Qe(["delimsizing","mult"],[oe],H),nn.TEXT,s,a)},c4=80,l4=.08,u4=function(n,t,r,s,i){var a=gIn(n,s,r),o=new Gu(n,a),c=new xl([o],{width:"400em",height:at(t),viewBox:"0 0 400000 "+r,preserveAspectRatio:"xMinYMin slice"});return Vu(["hide-tail"],[c],i)},f$n=function(n,t){var r=t.havingBaseSizing(),s=lH("\\surd",n*r.sizeMultiplier,cH,r),i=r.sizeMultiplier,a=Math.max(0,t.minRuleThickness-t.fontMetrics().sqrtRuleThickness),o,c,u,h,f;return s.type==="small"?(h=1e3+1e3*a+c4,n<1?i=1:n<1.4&&(i=.7),c=(1+a+l4)/i,u=(1+a)/i,o=u4("sqrtMain",c,h,a,t),o.style.minWidth="0.853em",f=.833/i):s.type==="large"?(h=(1e3+c4)*E0[s.size],u=(E0[s.size]+a)/i,c=(E0[s.size]+a+l4)/i,o=u4("sqrtSize"+s.size,c,h,a,t),o.style.minWidth="1.02em",f=1/i):(c=n+a+l4,u=n+a,h=Math.floor(1e3*n+a)+c4,o=u4("sqrtTall",c,h,a,t),o.style.minWidth="0.742em",f=1.056),o.height=u,o.style.height=at(c),{span:o,advanceWidth:f,ruleWidth:(t.fontMetrics().sqrtRuleThickness+a)*i}},iH=new Set(["(","\\lparen",")","\\rparen","[","\\lbrack","]","\\rbrack","\\{","\\lbrace","\\}","\\rbrace","\\lfloor","\\rfloor","⌊","⌋","\\lceil","\\rceil","⌈","⌉","\\surd"]),d$n=new Set(["\\uparrow","\\downarrow","\\updownarrow","\\Uparrow","\\Downarrow","\\Updownarrow","|","\\|","\\vert","\\Vert","\\lvert","\\rvert","\\lVert","\\rVert","\\lgroup","\\rgroup","⟮","⟯","\\lmoustache","\\rmoustache","⎰","⎱"]),aH=new Set(["<",">","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"]),E0=[0,1.2,1.8,2.4,3],oH=function(n,t,r,s,i){if(n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle"),iH.has(n)||aH.has(n))return rH(n,t,!1,r,s,i);if(d$n.has(n))return sH(n,E0[t],!1,r,s,i);throw new Je("Illegal delimiter: '"+n+"'")},h$n=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],p$n=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"stack"}],cH=[{type:"small",style:nn.SCRIPTSCRIPT},{type:"small",style:nn.SCRIPT},{type:"small",style:nn.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],m$n=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.")},lH=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]},uk=function(n,t,r,s,i,a){n==="<"||n==="\\lt"||n==="⟨"?n="\\langle":(n===">"||n==="\\gt"||n==="⟩")&&(n="\\rangle");var o;aH.has(n)?o=h$n:iH.has(n)?o=cH:o=p$n;var c=lH(n,t,o,s);return c.type==="small"?c$n(n,c.style,r,s,i,a):c.type==="large"?rH(n,c.size,r,s,i,a):sH(n,t,r,s,i,a)},_4=function(n,t,r,s,i,a){var o=s.fontMetrics().axisHeight*s.sizeMultiplier,c=901,u=5/s.fontMetrics().ptPerEm,h=Math.max(t-o,r+o),f=Math.max(h/500*c,2*h-u);return uk(n,f,!0,s,i,a)},mR={"\\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}},g$n=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 gR(e){return"isMiddle"in e}function By(e,n){var t=Iy(e);if(t&&g$n.has(t.text))return t;throw t?new Je("Invalid delimiter '"+t.text+"' after '"+n.funcName+"'",e):new Je("Invalid delimiter type '"+e.type+"'",e)}ft({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=By(n[0],e);return{type:"delimsizing",mode:e.parser.mode,size:mR[e.funcName].size,mclass:mR[e.funcName].mclass,delim:t.text}},htmlBuilder:(e,n)=>e.delim==="."?Qe([e.mclass]):oH(e.delim,e.size,n,e.mode,[e.mclass]),mathmlBuilder:e=>{var n=[];e.delim!=="."&&n.push(Ga(e.delim,e.mode));var t=new et("mo",n);e.mclass==="mopen"||e.mclass==="mclose"?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true");var r=at(E0[e.size]);return t.setAttribute("minsize",r),t.setAttribute("maxsize",r),t}});function vR(e){if(!e.body)throw new Error("Bug: The leftright ParseNode wasn't fully parsed.")}ft({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 Je("\\current@color set to non-string in \\right");return{type:"leftright-right",mode:e.parser.mode,delim:By(n[0],e).text,color:t}}});ft({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=By(n[0],e),r=e.parser;++r.leftrightDepth;var s=r.parseExpression(!1);--r.leftrightDepth,r.expect("\\right",!1);var i=mn(r.parseFunction(),"leftright-right");return{type:"leftright",mode:r.mode,body:s,left:t.text,right:i.delim,rightColor:i.color}},htmlBuilder:(e,n)=>{vR(e);for(var t=js(e.body,n,!0,["mopen","mclose"]),r=0,s=0,i=!1,a=0;a{vR(e);var t=Na(e.body,n);if(e.left!=="."){var r=new et("mo",[Ga(e.left,e.mode)]);r.setAttribute("fence","true"),t.unshift(r)}if(e.right!=="."){var s=new et("mo",[Ga(e.right,e.mode)]);s.setAttribute("fence","true"),e.rightColor&&s.setAttribute("mathcolor",e.rightColor),t.push(s)}return EC(t)}});ft({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:(e,n)=>{var t=By(n[0],e);if(!e.parser.leftrightDepth)throw new Je("\\middle without preceding \\left",t);return{type:"middle",mode:e.parser.mode,delim:t.text}},htmlBuilder:(e,n)=>{var t;return e.delim==="."?t=Z0(n,[]):(t=oH(e.delim,1,n,e.mode,[]),t.isMiddle={delim:e.delim,options:n}),t},mathmlBuilder:(e,n)=>{var t=e.delim==="\\vert"||e.delim==="|"?Ga("|","text"):Ga(e.delim,e.mode),r=new et("mo",[t]);return r.setAttribute("fence","true"),r.setAttribute("lspace","0.05em"),r.setAttribute("rspace","0.05em"),r}});var Py=(e,n)=>{var t=$h(ir(e.body,n),n),r=e.label.slice(1),s=n.sizeMultiplier,i,a,o=El(e.body);if(r==="sout")i=Qe(["stretchy","sout"]),i.height=n.fontMetrics().defaultRuleThickness/s,a=-.5*n.fontMetrics().xHeight;else if(r==="phase"){var c=$r({number:.6,unit:"pt"},n),u=$r({number:.35,unit:"ex"},n),h=n.havingBaseSizing();s=s/h.sizeMultiplier;var f=t.height+t.depth+c+u;t.style.paddingLeft=at(f/2+c);var p=Math.floor(1e3*f*s),m=pIn(p),w=new xl([new Gu("phase",m)],{width:"400em",height:at(p/1e3),viewBox:"0 0 400000 "+p,preserveAspectRatio:"xMinYMin slice"});i=Vu(["hide-tail"],[w],n),i.style.height=at(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,b=0;/box/.test(r)?(b=Math.max(n.fontMetrics().fboxrule,n.minRuleThickness),k=n.fontMetrics().fboxsep+(r==="colorbox"?0:b),v=k):r==="angl"?(b=Math.max(n.fontMetrics().defaultRuleThickness,n.minRuleThickness),k=4*b,v=Math.max(0,.25-t.depth)):(k=o?.2:0,v=k),i=ZIn(t,r,k,v,n),/fbox|boxed|fcolorbox/.test(r)?(i.style.borderStyle="solid",i.style.borderWidth=at(b)):r==="angl"&&b!==.049&&(i.style.borderTopWidth=at(b),i.style.borderRightWidth=at(b)),a=t.depth+v,e.backgroundColor&&(i.style.backgroundColor=e.backgroundColor,e.borderColor&&(i.style.borderColor=e.borderColor))}var y;if(e.backgroundColor)y=rr({positionType:"individualShift",children:[{type:"elem",elem:i,shift:a},{type:"elem",elem:t,shift:0}]});else{var x=/cancel|phase/.test(r)?["svg-align"]:[];y=rr({positionType:"individualShift",children:[{type:"elem",elem:t,shift:0},{type:"elem",elem:i,shift:a,wrapperClasses:x}]})}return/cancel/.test(r)&&(y.height=t.height,y.depth=t.depth),/cancel/.test(r)&&!o?Qe(["mord","cancel-lap"],[y],n):Qe(["mord"],[y],n)},Fy=(e,n)=>{var t,r=new et(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: "+at(s)+" solid "+e.borderColor)}break;case"\\xcancel":r.setAttribute("notation","updiagonalstrike downdiagonalstrike");break}return e.backgroundColor&&r.setAttribute("mathbackground",e.backgroundColor),r};ft({type:"enclose",names:["\\colorbox"],props:{numArgs:2,allowedInText:!0,argTypes:["color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=mn(n[0],"color-token").color,a=n[1];return{type:"enclose",mode:r.mode,label:s,backgroundColor:i,body:a}},htmlBuilder:Py,mathmlBuilder:Fy});ft({type:"enclose",names:["\\fcolorbox"],props:{numArgs:3,allowedInText:!0,argTypes:["color","color","hbox"]},handler(e,n,t){var{parser:r,funcName:s}=e,i=mn(n[0],"color-token").color,a=mn(n[1],"color-token").color,o=n[2];return{type:"enclose",mode:r.mode,label:s,backgroundColor:a,borderColor:i,body:o}},htmlBuilder:Py,mathmlBuilder:Fy});ft({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]}}});ft({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:Py,mathmlBuilder:Fy});ft({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:Py,mathmlBuilder:Fy});ft({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 uH={};function vc(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 Je("{"+e.envName+"} can be used only in display mode.")},v$n=new Set(["gather","gather*"]);function AC(e){if(!e.includes("ed"))return!e.includes("*")}function t_(e,n,t){var{hskipBeforeAndAfter:r,addJot:s,cols:i,arraystretch:a,colSeparationType:o,autoTag:c,singleRow:u,emptySingleRow:h,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 Je("Invalid \\arraystretch: "+m)}e.gullet.beginGroup();var w=[],k=[w],v=[],b=[],y=c!=null?[]:void 0;function x(){c&&e.gullet.macros.set("\\@eqnsw","1",!0)}function C(){y&&(e.gullet.macros.get("\\df@tag")?(y.push(e.subparse([new ba("\\df@tag")])),e.gullet.macros.set("\\df@tag",void 0,!0)):y.push(!!c&&e.gullet.macros.get("\\@eqnsw")==="1"))}for(x(),b.push(bR(e));;){var N=e.parseExpression(!1,u?"\\end":"\\\\");e.gullet.endGroup(),e.gullet.beginGroup();var j={type:"ordgroup",mode:e.mode,body:N};t&&(j={type:"styling",mode:e.mode,style:t,resetFont:!0,body:[j]}),w.push(j);var A=e.fetch().text;if(A==="&"){if(f&&w.length===f){if(u||o)throw new Je("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&&j.type==="styling"&&j.body.length===1&&j.body[0].type==="ordgroup"&&j.body[0].body.length===0&&(k.length>1||!h)&&k.pop(),b.length0&&(x+=.25),u.push({pos:x,isDashed:qe[rt]})}for(C(a[0]),r=0;r0&&(I+=y,Aqe))for(r=0;r=o)){var ne=void 0;if(s>0||n.hskipBeforeAndAfter){var ce,he;ne=(ce=(he=H)==null?void 0:he.pregap)!=null?ce:p,ne!==0&&(Q=Qe(["arraycolsep"],[]),Q.style.width=at(ne),q.push(Q))}var me=[];for(r=0;r0){for(var jt=Ih("hline",t,h),Pt=Ih("hdashline",t,h),Ie=[{type:"elem",elem:Mt,shift:0}];u.length>0;){var nt=u.pop(),ke=nt.pos-B;nt.isDashed?Ie.push({type:"elem",elem:Pt,shift:ke}):Ie.push({type:"elem",elem:jt,shift:ke})}Mt=rr({positionType:"individualShift",children:Ie})}if(Z.length===0)return Qe(["mord"],[Mt],t);var ge=rr({positionType:"individualShift",children:Z}),je=Qe(["tag"],[ge],t);return zl([Mt,je])},b$n={c:"center ",l:"left ",r:"right "},yc=function(n,t){for(var r=[],s=new et("mtd",[],["mtr-glue"]),i=new et("mtd",[],["mml-eqn-num"]),a=0;a0){var w=n.cols,k="",v=!1,b=0,y=w.length;w[0].type==="separator"&&(p+="top ",b=1),w[w.length-1].type==="separator"&&(p+="bottom ",y-=1);for(var x=b;x0?"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};vc({type:"array",names:["array","darray"],props:{numArgs:1},handler(e,n){var t=Iy(n[0]),r=t?[n[0]]:mn(n[0],"ordgroup").body,s=r.map(function(a){var o=Ly(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 Je("Unknown column alignment: "+c,a)}),i={cols:s,hskipBeforeAndAfter:!0,maxNumCols:s.length};return t_(e.parser,i,TC(e.envName))},htmlBuilder:bc,mathmlBuilder:yc});vc({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 Je("Expected l or c or r",s.nextToken);s.consume(),s.consumeSpaces(),s.expect("]"),s.consume(),r.cols=[{type:"align",align:t}]}}var i=t_(e.parser,r,TC(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:bc,mathmlBuilder:yc});vc({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){var n={arraystretch:.5},t=t_(e.parser,n,"script");return t.colSeparationType="small",t},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["subarray"],props:{numArgs:1},handler(e,n){var t=Iy(n[0]),r=t?[n[0]]:mn(n[0],"ordgroup").body,s=r.map(function(o){var c=Ly(o),u=c.text;if("lc".includes(u))return{type:"align",align:u};throw new Je("Unknown column alignment: "+u,o)});if(s.length>1)throw new Je("{subarray} can contain only one column");var i={cols:s,hskipBeforeAndAfter:!1,arraystretch:.5},a=t_(e.parser,i,"script");if(a.body.length>0&&a.body[0].length>1)throw new Je("{subarray} can contain only one column");return a},htmlBuilder:bc,mathmlBuilder:yc});vc({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=t_(e.parser,n,TC(e.envName));return{type:"leftright",mode:e.mode,body:[t],left:e.envName.includes("r")?".":"\\{",right:e.envName.includes("r")?"\\}":".",rightColor:void 0}},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["align","align*","aligned","split"],props:{numArgs:0},handler:fH,htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["gathered","gather","gather*"],props:{numArgs:0},handler(e){v$n.has(e.envName)&&Hy(e);var n={cols:[{type:"align",align:"c"}],addJot:!0,colSeparationType:"gather",autoTag:AC(e.envName),emptySingleRow:!0,leqno:e.parser.settings.leqno};return t_(e.parser,n,"display")},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["alignat","alignat*","alignedat"],props:{numArgs:1},handler:fH,htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["equation","equation*"],props:{numArgs:0},handler(e){Hy(e);var n={autoTag:AC(e.envName),emptySingleRow:!0,singleRow:!0,maxNumCols:1,leqno:e.parser.settings.leqno};return t_(e.parser,n,"display")},htmlBuilder:bc,mathmlBuilder:yc});vc({type:"array",names:["CD"],props:{numArgs:0},handler(e){return Hy(e),a$n(e.parser)},htmlBuilder:bc,mathmlBuilder:yc});ie("\\nonumber","\\gdef\\@eqnsw{0}");ie("\\notag","\\nonumber");ft({type:"text",names:["\\hline","\\hdashline"],props:{numArgs:0,allowedInText:!0,allowedInMath:!0},handler(e,n){throw new Je(e.funcName+" valid only within array environment")}});var yR=uH;ft({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 Je("Invalid environment name",s);for(var i="",a=0;a{var t=e.font,r=n.withFont(t);return ir(e.body,r)},hH=(e,n)=>{var t=e.font,r=n.withFont(t);return kr(e.body,r)},xR={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak"};ft({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=hb(n[0]),i=r;return i in xR&&(i=xR[i]),{type:"font",mode:t.mode,font:i.slice(1),body:s}},htmlBuilder:dH,mathmlBuilder:hH});ft({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:$y(r),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:r}],isCharacterBox:El(r)}}});ft({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:dH,mathmlBuilder:hH});var y$n=(e,n)=>{var t=n.style,r=t.fracNum(),s=t.fracDen(),i;i=n.havingStyle(r);var a=ir(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(h){var y=n.fontMetrics().axisHeight;m-a.depth-(y+.5*f){var t=new et("mfrac",[kr(e.numer,n),kr(e.denom,n)]);if(!e.hasBarLine)t.setAttribute("linethickness","0px");else if(e.barSize){var r=$r(e.barSize,n);t.setAttribute("linethickness",at(r))}if(e.leftDelim!=null||e.rightDelim!=null){var s=[];if(e.leftDelim!=null){var i=new et("mo",[new ps(e.leftDelim.replace("\\",""))]);i.setAttribute("fence","true"),s.push(i)}if(s.push(t),e.rightDelim!=null){var a=new et("mo",[new ps(e.rightDelim.replace("\\",""))]);a.setAttribute("fence","true"),s.push(a)}return EC(s)}return t},pH=(e,n)=>{if(!n)return e;var t={type:"styling",mode:e.mode,style:n,body:[e]};return t};ft({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",h=null;return u||r.startsWith("\\d")?h="display":r.startsWith("\\t")&&(h="text"),pH({type:"genfrac",mode:t.mode,numer:s,denom:i,continued:u,hasBarLine:a,leftDelim:o,rightDelim:c,barSize:null},h)},htmlBuilder:y$n,mathmlBuilder:x$n});ft({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 wR=["display","text","script","scriptscript"],kR=function(n){var t=null;return n.length>0&&(t=n,t=t==="."?null:t),t};ft({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=hb(n[0]),a=i.type==="atom"&&i.family==="open"?kR(i.text):null,o=hb(n[1]),c=o.type==="atom"&&o.family==="close"?kR(o.text):null,u=mn(n[2],"size"),h,f=null;u.isBlank?h=!0:(f=u.value,h=f.number>0);var p=null,m=n[3];if(m.type==="ordgroup"){if(m.body.length>0){var w=mn(m.body[0],"textord");p=wR[Number(w.text)]}}else m=mn(m,"textord"),p=wR[Number(m.text)];return pH({type:"genfrac",mode:t.mode,numer:r,denom:s,continued:!1,hasBarLine:h,barSize:f,leftDelim:a,rightDelim:c},p)}});ft({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:mn(n[0],"size").value,token:s}}});ft({type:"genfrac",names:["\\\\abovefrac"],props:{numArgs:3,argTypes:["math","size","math"]},handler:(e,n)=>{var{parser:t,funcName:r}=e,s=n[0],i=mn(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 mH=(e,n)=>{var t=n.style,r,s;e.type==="supsub"?(r=e.sup?ir(e.sup,n.havingStyle(t.sup()),n):ir(e.sub,n.havingStyle(t.sub()),n),s=mn(e.base,"horizBrace")):s=mn(e,"horizBrace");var i=ir(s.base,n.havingBaseStyle(nn.DISPLAY)),a=Dy(s,n),o;if(s.isOver?o=rr({positionType:"firstBaseline",children:[{type:"elem",elem:i},{type:"kern",size:.1},{type:"elem",elem:a,wrapperClasses:["svg-align"]}]}):o=rr({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=Qe(["minner",s.isOver?"mover":"munder"],[o],n);s.isOver?o=rr({positionType:"firstBaseline",children:[{type:"elem",elem:c},{type:"kern",size:.2},{type:"elem",elem:r}]}):o=rr({positionType:"bottom",positionData:c.depth+.2+r.height+r.depth,children:[{type:"elem",elem:r},{type:"kern",size:.2},{type:"elem",elem:c}]})}return Qe(["minner",s.isOver?"mover":"munder"],[o],n)},w$n=(e,n)=>{var t=Oy(e.label);return new et(e.isOver?"mover":"munder",[kr(e.base,n),t])};ft({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:mH,mathmlBuilder:w$n});ft({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=n[1],s=mn(n[0],"url").url;return t.settings.isTrusted({command:"\\href",url:s})?{type:"href",mode:t.mode,href:s,body:hs(r)}:t.formatUnsupportedCmd("\\href")},htmlBuilder:(e,n)=>{var t=js(e.body,n,!1);return DIn(e.href,[],t,n)},mathmlBuilder:(e,n)=>{var t=Ku(e.body,n);return t instanceof et||(t=new et("mrow",[t])),t.setAttribute("href",e.href),t}});ft({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:(e,n)=>{var{parser:t}=e,r=mn(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=mn(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(","),h=0;h{var t=js(e.body,n,!1),r=["enclosing"];e.attributes.class&&r.push(...e.attributes.class.trim().split(/\s+/));var s=Qe(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)=>Ku(e.body,n)});ft({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:hs(n[0]),mathml:hs(n[1])}},htmlBuilder:(e,n)=>{var t=js(e.html,n,!1);return zl(t)},mathmlBuilder:(e,n)=>Ku(e.mathml,n)});var f4=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 Je("Invalid size: '"+n+"' in \\includegraphics");var r={number:+(t[1]+t[2]),unit:t[3]};if(!MF(r))throw new Je("Invalid unit: '"+r.unit+"' in \\includegraphics.");return r};ft({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=mn(t[0],"raw").string,u=c.split(","),h=0;h{var t=$r(e.height,n),r=0;e.totalheight.number>0&&(r=$r(e.totalheight,n)-t);var s=0;e.width.number>0&&(s=$r(e.width,n));var i={height:at(t+r)};s>0&&(i.width=at(s)),r>0&&(i.verticalAlign=at(-r));var a=new kIn(e.src,e.alt,i);return a.height=t,a.depth=r,a},mathmlBuilder:(e,n)=>{var t=new et("mglyph",[]);t.setAttribute("alt",e.alt);var r=$r(e.height,n),s=0;if(e.totalheight.number>0&&(s=$r(e.totalheight,n)-r,t.setAttribute("valign",at(-s))),t.setAttribute("height",at(r+s)),e.width.number>0){var i=$r(e.width,n);t.setAttribute("width",at(i))}return t.setAttribute("src",e.src),t}});ft({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=mn(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 BF(e.dimension,n)},mathmlBuilder(e,n){var t=$r(e.dimension,n);return new GF(t)}});ft({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=Qe([],[ir(e.body,n)]),t=Qe(["inner"],[t],n)):t=Qe(["inner"],[ir(e.body,n)]);var r=Qe(["fix"],[]),s=Qe([e.alignment],[t,r],n),i=Qe(["strut"]);return i.style.height=at(s.height+s.depth),s.depth&&(i.style.verticalAlign=at(-s.depth)),s.children.unshift(i),s=Qe(["thinbox"],[s],n),Qe(["mord","vbox"],[s],n)},mathmlBuilder:(e,n)=>{var t=new et("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}});ft({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}}});ft({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,n){throw new Je("Mismatched "+e.funcName)}});var SR=(e,n)=>{switch(n.style.size){case nn.DISPLAY.size:return e.display;case nn.TEXT.size:return e.text;case nn.SCRIPT.size:return e.script;case nn.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}};ft({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:(e,n)=>{var{parser:t}=e;return{type:"mathchoice",mode:t.mode,display:hs(n[0]),text:hs(n[1]),script:hs(n[2]),scriptscript:hs(n[3])}},htmlBuilder:(e,n)=>{var t=SR(e,n),r=js(t,n,!1);return zl(r)},mathmlBuilder:(e,n)=>{var t=SR(e,n);return Ku(t,n)}});var gH=(e,n,t,r,s,i,a)=>{e=Qe([],[e]);var o=t&&El(t),c,u;if(n){var h=ir(n,r.havingStyle(s.sup()),r);u={elem:h,kern:Math.max(r.fontMetrics().bigOpSpacing1,r.fontMetrics().bigOpSpacing3-h.depth)}}if(t){var f=ir(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=rr({positionType:"bottom",positionData:m,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:at(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:at(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else if(c){var w=e.height-a;p=rr({positionType:"top",positionData:w,children:[{type:"kern",size:r.fontMetrics().bigOpSpacing5},{type:"elem",elem:c.elem,marginLeft:at(-i)},{type:"kern",size:c.kern},{type:"elem",elem:e}]})}else if(u){var k=e.depth+a;p=rr({positionType:"bottom",positionData:k,children:[{type:"elem",elem:e},{type:"kern",size:u.kern},{type:"elem",elem:u.elem,marginLeft:at(i)},{type:"kern",size:r.fontMetrics().bigOpSpacing5}]})}else return e;var v=[p];if(c&&i!==0&&!o){var b=Qe(["mspace"],[],r);b.style.marginRight=at(i),v.unshift(b)}return Qe(["mop","op-limits"],v,r)},vH=new Set(["\\smallint"]),sp=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=mn(e.base,"op"),s=!0):i=mn(e,"op");var a=n.style,o=!1;a.size===nn.DISPLAY.size&&i.symbol&&!vH.has(i.name)&&(o=!0);var c,u;if(i.symbol){var h=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=gi(i.name,h,"math",n,["mop","op-symbol",o?"large-op":"small-op"]),u=c.italic,f.length>0){var p=FF(f+"Size"+(o?"2":"1"),n);c=rr({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=js(i.body,n,!0);m.length===1&&m[0]instanceof wa?(c=m[0],c.classes[0]="mop"):c=Qe(["mop"],m,n)}else{for(var w=[],k=1;k{var t;if(e.symbol)t=new et("mo",[Ga(e.name,e.mode)]),vH.has(e.name)&&t.setAttribute("largeop","false");else if(e.body)t=new et("mo",Na(e.body,n));else{t=new et("mi",[new ps(e.name.slice(1))]);var r=new et("mo",[Ga("⁡","text")]);e.parentIsSupSub?t=new et("mrow",[t,r]):t=UF([t,r])}return t},k$n={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"};ft({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=k$n[s]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:s}},htmlBuilder:sp,mathmlBuilder:Km});ft({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:hs(r)}},htmlBuilder:sp,mathmlBuilder:Km});var S$n={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"};ft({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:sp,mathmlBuilder:Km});ft({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:sp,mathmlBuilder:Km});ft({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=S$n[r]),{type:"op",mode:n.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:r}},htmlBuilder:sp,mathmlBuilder:Km});var bH=(e,n)=>{var t,r,s=!1,i;e.type==="supsub"?(t=e.sup,r=e.sub,i=mn(e.base,"operatorname"),s=!0):i=mn(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=js(o,n.withFont("mathrm"),!0),u=0;u{for(var t=Na(e.body,n.withFont("mathrm")),r=!0,s=0;sh.toText()).join("");t=[new ps(o)]}var c=new et("mi",t);c.setAttribute("mathvariant","normal");var u=new et("mo",[Ga("⁡","text")]);return e.parentIsSupSub?new et("mrow",[c,u]):UF([c,u])};ft({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:hs(s),alwaysHandleSupSub:r==="\\operatornamewithlimits",limits:!1,parentIsSupSub:!1}},htmlBuilder:bH,mathmlBuilder:C$n});ie("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@");Pf({type:"ordgroup",htmlBuilder(e,n){return e.semisimple?zl(js(e.body,n,!1)):Qe(["mord"],js(e.body,n,!0),n)},mathmlBuilder(e,n){return Ku(e.body,n,!0)}});ft({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=ir(e.body,n.havingCrampedStyle()),r=Ih("overline-line",n),s=n.fontMetrics().defaultRuleThickness,i=rr({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*s},{type:"elem",elem:r},{type:"kern",size:s}]});return Qe(["mord","overline"],[i],n)},mathmlBuilder(e,n){var t=new et("mo",[new ps("‾")]);t.setAttribute("stretchy","true");var r=new et("mover",[kr(e.body,n),t]);return r.setAttribute("accent","true"),r}});ft({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:hs(r)}},htmlBuilder:(e,n)=>{var t=js(e.body,n.withPhantom(),!1);return zl(t)},mathmlBuilder:(e,n)=>{var t=Na(e.body,n);return new et("mphantom",t)}});ie("\\hphantom","\\smash{\\phantom{#1}}");ft({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=Qe(["inner"],[ir(e.body,n.withPhantom())]),r=Qe(["fix"],[]);return Qe(["mord","rlap"],[t,r],n)},mathmlBuilder:(e,n)=>{var t=Na(hs(e.body),n),r=new et("mphantom",t),s=new et("mpadded",[r]);return s.setAttribute("width","0px"),s}});ft({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,n){var{parser:t}=e,r=mn(n[0],"size").value,s=n[1];return{type:"raisebox",mode:t.mode,dy:r,body:s}},htmlBuilder(e,n){var t=ir(e.body,n),r=$r(e.dy,n);return rr({positionType:"shift",positionData:-r,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new et("mpadded",[kr(e.body,n)]),r=e.dy.number+e.dy.unit;return t.setAttribute("voffset",r),t}});ft({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0,allowedInArgument:!0},handler(e){var{parser:n}=e;return{type:"internal",mode:n.mode}}});ft({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=mn(n[0],"size"),a=mn(n[1],"size");return{type:"rule",mode:r.mode,shift:s&&mn(s,"size").value,width:i.value,height:a.value}},htmlBuilder(e,n){var t=Qe(["mord","rule"],[],n),r=$r(e.width,n),s=$r(e.height,n),i=e.shift?$r(e.shift,n):0;return t.style.borderRightWidth=at(r),t.style.borderTopWidth=at(s),t.style.bottom=at(i),t.width=r,t.height=s+i,t.depth=-i,t.maxFontSize=s*1.125*n.sizeMultiplier,t},mathmlBuilder(e,n){var t=$r(e.width,n),r=$r(e.height,n),s=e.shift?$r(e.shift,n):0,i=n.color&&n.getColor()||"black",a=new et("mspace");a.setAttribute("mathbackground",i),a.setAttribute("width",at(t)),a.setAttribute("height",at(r));var o=new et("mpadded",[a]);return s>=0?o.setAttribute("height",at(s)):(o.setAttribute("height",at(s)),o.setAttribute("depth",at(-s))),o.setAttribute("voffset",at(s)),o}});function yH(e,n,t){for(var r=js(e,n,!1),s=n.sizeMultiplier/t.sizeMultiplier,i=0;i{var t=n.havingSize(e.size);return yH(e.body,t,n)};ft({type:"sizing",names:CR,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:CR.indexOf(r)+1,body:i}},htmlBuilder:E$n,mathmlBuilder:(e,n)=>{var t=n.havingSize(e.size),r=Na(e.body,t),s=new et("mstyle",r);return s.setAttribute("mathsize",at(t.sizeMultiplier)),s}});ft({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]&&mn(t[0],"ordgroup");if(a)for(var o,c=0;c{var t=Qe([],[ir(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 Qe(["mord","smash"],[t],n);if(t.children)for(var r=0;r{var t=new et("mpadded",[kr(e.body,n)]);return e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t}});ft({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=ir(e.body,n.havingCrampedStyle());t.height===0&&(t.height=n.fontMetrics().xHeight),t=$h(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=at(h);var m=rr({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(nn.SCRIPTSCRIPT),k=ir(e.index,w,n),v=.6*(m.height-m.depth),b=rr({positionType:"shift",positionData:-v,children:[{type:"elem",elem:k}]}),y=Qe(["root"],[b]);return Qe(["mord","sqrt"],[y,m],n)}else return Qe(["mord","sqrt"],[m],n)},mathmlBuilder(e,n){var{body:t,index:r}=e;return r?new et("mroot",[kr(t,n),kr(r,n)]):new et("msqrt",[kr(t,n)])}});var _k={display:nn.DISPLAY,text:nn.TEXT,script:nn.SCRIPT,scriptscript:nn.SCRIPTSCRIPT};function N$n(e){return e in _k}ft({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(!N$n(a))throw new Error("Unknown style: "+a);return{type:"styling",mode:s.mode,style:a,body:i}},htmlBuilder(e,n){var t=_k[e.style],r=n.havingStyle(t);return e.resetFont&&(r=r.withFont("")),yH(e.body,r,n)},mathmlBuilder(e,n){var t=_k[e.style],r=n.havingStyle(t);e.resetFont&&(r=r.withFont(""));var s=Na(e.body,r),i=new et("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 z$n=function(n,t){var r=n.base;if(r)if(r.type==="op"){var s=r.limits&&(t.style.size===nn.DISPLAY.size||r.alwaysHandleSupSub);return s?sp:null}else if(r.type==="operatorname"){var i=r.alwaysHandleSupSub&&(t.style.size===nn.DISPLAY.size||r.limits);return i?bH:null}else{if(r.type==="accent")return El(r.base)?zC:null;if(r.type==="horizBrace"){var a=!n.sub;return a===r.isOver?mH:null}else return null}else return null};Pf({type:"supsub",htmlBuilder(e,n){var t=z$n(e,n);if(t)return t(e,n);var{base:r,sup:s,sub:i}=e,a=ir(r,n),o,c,u=n.fontMetrics(),h=0,f=0,p=r&&El(r);if(s){var m=n.havingStyle(n.style.sup());o=ir(s,m,n),p||(h=a.height-m.fontMetrics().supDrop*m.sizeMultiplier/n.sizeMultiplier)}if(i){var w=n.havingStyle(n.style.sub());c=ir(i,w,n),p||(f=a.depth+w.fontMetrics().subDrop*w.sizeMultiplier/n.sizeMultiplier)}var k;n.style===nn.DISPLAY?k=u.sup1:n.style.cramped?k=u.sup3:k=u.sup2;var v=n.sizeMultiplier,b=at(.5/u.ptPerEm/v),y=null;if(c){var x=e.base&&e.base.type==="op"&&e.base.name&&(e.base.name==="\\oiint"||e.base.name==="\\oiiint");if(a instanceof wa||x){var C;y=at(-((C=a.italic)!=null?C:0))}}var N;if(o&&c){h=Math.max(h,k,o.depth+.25*u.xHeight),f=Math.max(f,u.sub2);var j=u.defaultRuleThickness,A=4*j;if(h-o.depth-(c.height-f)0&&(h+=z,f-=z)}var M=[{type:"elem",elem:c,shift:f,marginRight:b,marginLeft:y},{type:"elem",elem:o,shift:-h,marginRight:b}];N=rr({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:y,marginRight:b}];N=rr({positionType:"shift",positionData:f,children:D})}else if(o)h=Math.max(h,k,o.depth+.25*u.xHeight),N=rr({positionType:"shift",positionData:-h,children:[{type:"elem",elem:o,marginRight:b}]});else throw new Error("supsub must have either sup or sub.");var I=ak(a,"right")||"mord";return Qe([I],[a,Qe(["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===nn.DISPLAY||u&&u.type==="operatorname"&&u.alwaysHandleSupSub&&(n.style===nn.DISPLAY||u.limits)?a="munderover":a="msubsup"}else{var c=e.base;c&&c.type==="op"&&c.limits&&(n.style===nn.DISPLAY||c.alwaysHandleSupSub)||c&&c.type==="operatorname"&&c.alwaysHandleSupSub&&(c.limits||n.style===nn.DISPLAY)?a="munder":a="msub"}else{var o=e.base;o&&o.type==="op"&&o.limits&&(n.style===nn.DISPLAY||o.alwaysHandleSupSub)||o&&o.type==="operatorname"&&o.alwaysHandleSupSub&&(o.limits||n.style===nn.DISPLAY)?a="mover":a="msup"}return new et(a,i)}});Pf({type:"atom",htmlBuilder(e,n){return SC(e.text,e.mode,n,["m"+e.family])},mathmlBuilder(e,n){var t=new et("mo",[Ga(e.text,e.mode)]);if(e.family==="bin"){var r=NC(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 xH={mi:"italic",mn:"normal",mtext:"normal"};Pf({type:"mathord",htmlBuilder(e,n){return My(e,n,"mathord")},mathmlBuilder(e,n){var t=new et("mi",[Ga(e.text,e.mode,n)]),r=NC(e,n)||"italic";return r!==xH[t.type]&&t.setAttribute("mathvariant",r),t}});Pf({type:"textord",htmlBuilder(e,n){return My(e,n,"textord")},mathmlBuilder(e,n){var t=Ga(e.text,e.mode,n),r=NC(e,n)||"normal",s;return e.mode==="text"?s=new et("mtext",[t]):/[0-9]/.test(e.text)?s=new et("mn",[t]):e.text==="\\prime"?s=new et("mo",[t]):s=new et("mi",[t]),r!==xH[s.type]&&s.setAttribute("mathvariant",r),s}});var d4={"\\nobreak":"nobreak","\\allowbreak":"allowbreak"},h4={" ":{},"\\ ":{},"~":{className:"nobreak"},"\\space":{},"\\nobreakspace":{className:"nobreak"}};Pf({type:"spacing",htmlBuilder(e,n){if(h4.hasOwnProperty(e.text)){var t=h4[e.text].className||"";if(e.mode==="text"){var r=My(e,n,"textord");return r.classes.push(t),r}else return Qe(["mspace",t],[SC(e.text,e.mode,n)],n)}else{if(d4.hasOwnProperty(e.text))return Qe(["mspace",d4[e.text]],[],n);throw new Je('Unknown type of space "'+e.text+'"')}},mathmlBuilder(e,n){var t;if(h4.hasOwnProperty(e.text))t=new et("mtext",[new ps(" ")]);else{if(d4.hasOwnProperty(e.text))return new et("mspace");throw new Je('Unknown type of space "'+e.text+'"')}return t}});var ER=()=>{var e=new et("mtd",[]);return e.setAttribute("width","50%"),e};Pf({type:"tag",mathmlBuilder(e,n){var t=new et("mtable",[new et("mtr",[ER(),new et("mtd",[Ku(e.body,n)]),ER(),new et("mtd",[Ku(e.tag,n)])])]);return t.setAttribute("width","100%"),t}});var NR={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},zR={"\\textbf":"textbf","\\textmd":"textmd"},j$n={"\\textit":"textit","\\textup":"textup"},jR=(e,n)=>{var t=e.font;if(t){if(NR[t])return n.withTextFontFamily(NR[t]);if(zR[t])return n.withTextFontWeight(zR[t]);if(t==="\\emph")return n.fontShape==="textit"?n.withTextFontShape("textup"):n.withTextFontShape("textit")}else return n;return n.withTextFontShape(j$n[t])};ft({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:hs(s),font:r}},htmlBuilder(e,n){var t=jR(e,n),r=js(e.body,t,!0);return Qe(["mord","text"],r,t)},mathmlBuilder(e,n){var t=jR(e,n);return Ku(e.body,t)}});ft({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=ir(e.body,n),r=Ih("underline-line",n),s=n.fontMetrics().defaultRuleThickness,i=rr({positionType:"top",positionData:t.height,children:[{type:"kern",size:s},{type:"elem",elem:r},{type:"kern",size:3*s},{type:"elem",elem:t}]});return Qe(["mord","underline"],[i],n)},mathmlBuilder(e,n){var t=new et("mo",[new ps("‾")]);t.setAttribute("stretchy","true");var r=new et("munder",[kr(e.body,n),t]);return r.setAttribute("accentunder","true"),r}});ft({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=ir(e.body,n),r=n.fontMetrics().axisHeight,s=.5*(t.height-r-(t.depth+r));return rr({positionType:"shift",positionData:s,children:[{type:"elem",elem:t}]})},mathmlBuilder(e,n){var t=new et("mpadded",[kr(e.body,n)],["vcenter"]);return new et("mrow",[t])}});ft({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(e,n,t){throw new Je("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(e,n){for(var t=AR(e),r=[],s=n.havingStyle(n.style.text()),i=0;ie.body.replace(/ /g,e.star?"␣":" "),Mu=HF,wH=`[ \r + ]`,A$n="\\\\[a-zA-Z@]+",T$n="\\\\[^\uD800-\uDFFF]",R$n="("+A$n+")"+wH+"*",M$n=`\\\\( |[ \r ]+ -?)[ \r ]*`,dk="[̀-ͯ]",XIn=new RegExp(dk+"+$"),YIn="("+wH+"+)|"+(QIn+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(dk+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(dk+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+WIn)+("|"+VIn+")");class AR{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(YIn,"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 ba("EOF",new Hi(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Je("Unexpected character: '"+n[t]+"'",new ba(n[t],new Hi(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 ba(s,new Hi(this,t,this.tokenRegex.lastIndex))}}class ZIn{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 Je("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 JIn=_H;ae("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ae("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ae("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ae("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ae("\\@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}});ae("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ae("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var TR={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};ae("\\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 Je("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=TR[n.text],r==null||r>=t)throw new Je("Invalid base-"+t+" digit "+n.text);for(var s;(s=TR[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Je("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new Je("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new Je("\\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 Je("Invalid number of arguments: "+c);o=parseInt(c),s=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:s,numArgs:o}),""};ae("\\newcommand",e=>RC(e,!1,!0,!1));ae("\\renewcommand",e=>RC(e,!0,!1,!1));ae("\\providecommand",e=>RC(e,!0,!0,!0));ae("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ae("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ae("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),Mu[t],Ar.math[t],Ar.text[t]),""});ae("\\bgroup","{");ae("\\egroup","}");ae("~","\\nobreakspace");ae("\\lq","`");ae("\\rq","'");ae("\\aa","\\r a");ae("\\AA","\\r A");ae("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ae("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ae("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ae("ℬ","\\mathscr{B}");ae("ℰ","\\mathscr{E}");ae("ℱ","\\mathscr{F}");ae("ℋ","\\mathscr{H}");ae("ℐ","\\mathscr{I}");ae("ℒ","\\mathscr{L}");ae("ℳ","\\mathscr{M}");ae("ℛ","\\mathscr{R}");ae("ℭ","\\mathfrak{C}");ae("ℌ","\\mathfrak{H}");ae("ℨ","\\mathfrak{Z}");ae("\\Bbbk","\\Bbb{k}");ae("\\llap","\\mathllap{\\textrm{#1}}");ae("\\rlap","\\mathrlap{\\textrm{#1}}");ae("\\clap","\\mathclap{\\textrm{#1}}");ae("\\mathstrut","\\vphantom{(}");ae("\\underbar","\\underline{\\text{#1}}");ae("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ae("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ae("\\ne","\\neq");ae("≠","\\neq");ae("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ae("∉","\\notin");ae("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ae("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ae("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ae("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ae("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ae("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ae("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ae("⟂","\\perp");ae("‼","\\mathclose{!\\mkern-0.8mu!}");ae("∌","\\notni");ae("⌜","\\ulcorner");ae("⌝","\\urcorner");ae("⌞","\\llcorner");ae("⌟","\\lrcorner");ae("©","\\copyright");ae("®","\\textregistered");ae("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ae("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ae("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ae("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ae("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ae("⋮","\\vdots");ae("\\varGamma","\\mathit{\\Gamma}");ae("\\varDelta","\\mathit{\\Delta}");ae("\\varTheta","\\mathit{\\Theta}");ae("\\varLambda","\\mathit{\\Lambda}");ae("\\varXi","\\mathit{\\Xi}");ae("\\varPi","\\mathit{\\Pi}");ae("\\varSigma","\\mathit{\\Sigma}");ae("\\varUpsilon","\\mathit{\\Upsilon}");ae("\\varPhi","\\mathit{\\Phi}");ae("\\varPsi","\\mathit{\\Psi}");ae("\\varOmega","\\mathit{\\Omega}");ae("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ae("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ae("\\boxed","\\fbox{$\\displaystyle{#1}$}");ae("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ae("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ae("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ae("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ae("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var RR={",":"\\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"},e$n=new Set(["bin","rel"]);ae("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in RR?n=RR[t]:(t.slice(0,4)==="\\not"||t in Ar.math&&e$n.has(Ar.math[t].group))&&(n="\\dotsb"),n});var MC={")":!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};ae("\\dotso",function(e){var n=e.future().text;return n in MC?"\\ldots\\,":"\\ldots"});ae("\\dotsc",function(e){var n=e.future().text;return n in MC&&n!==","?"\\ldots\\,":"\\ldots"});ae("\\cdots",function(e){var n=e.future().text;return n in MC?"\\@cdots\\,":"\\@cdots"});ae("\\dotsb","\\cdots");ae("\\dotsm","\\cdots");ae("\\dotsi","\\!\\cdots");ae("\\dotsx","\\ldots\\,");ae("\\DOTSI","\\relax");ae("\\DOTSB","\\relax");ae("\\DOTSX","\\relax");ae("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ae("\\,","\\tmspace+{3mu}{.1667em}");ae("\\thinspace","\\,");ae("\\>","\\mskip{4mu}");ae("\\:","\\tmspace+{4mu}{.2222em}");ae("\\medspace","\\:");ae("\\;","\\tmspace+{5mu}{.2777em}");ae("\\thickspace","\\;");ae("\\!","\\tmspace-{3mu}{.1667em}");ae("\\negthinspace","\\!");ae("\\negmedspace","\\tmspace-{4mu}{.2222em}");ae("\\negthickspace","\\tmspace-{5mu}{.277em}");ae("\\enspace","\\kern.5em ");ae("\\enskip","\\hskip.5em\\relax");ae("\\quad","\\hskip1em\\relax");ae("\\qquad","\\hskip2em\\relax");ae("\\tag","\\@ifstar\\tag@literal\\tag@paren");ae("\\tag@paren","\\tag@literal{({#1})}");ae("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Je("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ae("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ae("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ae("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ae("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ae("\\newline","\\\\\\relax");ae("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var kH=at(nc["Main-Regular"][84][1]-.7*nc["Main-Regular"][65][1]);ae("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+kH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ae("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+kH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ae("\\hspace","\\@ifstar\\@hspacer\\@hspace");ae("\\@hspace","\\hskip #1\\relax");ae("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ae("\\ordinarycolon",":");ae("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ae("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ae("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ae("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ae("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ae("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ae("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ae("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ae("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ae("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ae("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ae("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ae("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ae("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ae("∷","\\dblcolon");ae("∹","\\eqcolon");ae("≔","\\coloneqq");ae("≕","\\eqqcolon");ae("⩴","\\Coloneqq");ae("\\ratio","\\vcentcolon");ae("\\coloncolon","\\dblcolon");ae("\\colonequals","\\coloneqq");ae("\\coloncolonequals","\\Coloneqq");ae("\\equalscolon","\\eqqcolon");ae("\\equalscoloncolon","\\Eqqcolon");ae("\\colonminus","\\coloneq");ae("\\coloncolonminus","\\Coloneq");ae("\\minuscolon","\\eqcolon");ae("\\minuscoloncolon","\\Eqcolon");ae("\\coloncolonapprox","\\Colonapprox");ae("\\coloncolonsim","\\Colonsim");ae("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ae("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ae("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ae("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ae("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ae("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ae("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ae("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ae("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ae("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ae("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ae("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ae("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ae("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ae("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ae("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ae("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ae("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ae("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ae("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ae("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ae("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ae("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ae("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ae("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ae("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ae("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ae("\\imath","\\html@mathml{\\@imath}{ı}");ae("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ae("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ae("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ae("⟦","\\llbracket");ae("⟧","\\rrbracket");ae("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ae("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ae("⦃","\\lBrace");ae("⦄","\\rBrace");ae("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ae("⦵","\\minuso");ae("\\darr","\\downarrow");ae("\\dArr","\\Downarrow");ae("\\Darr","\\Downarrow");ae("\\lang","\\langle");ae("\\rang","\\rangle");ae("\\uarr","\\uparrow");ae("\\uArr","\\Uparrow");ae("\\Uarr","\\Uparrow");ae("\\N","\\mathbb{N}");ae("\\R","\\mathbb{R}");ae("\\Z","\\mathbb{Z}");ae("\\alef","\\aleph");ae("\\alefsym","\\aleph");ae("\\Alpha","\\mathrm{A}");ae("\\Beta","\\mathrm{B}");ae("\\bull","\\bullet");ae("\\Chi","\\mathrm{X}");ae("\\clubs","\\clubsuit");ae("\\cnums","\\mathbb{C}");ae("\\Complex","\\mathbb{C}");ae("\\Dagger","\\ddagger");ae("\\diamonds","\\diamondsuit");ae("\\empty","\\emptyset");ae("\\Epsilon","\\mathrm{E}");ae("\\Eta","\\mathrm{H}");ae("\\exist","\\exists");ae("\\harr","\\leftrightarrow");ae("\\hArr","\\Leftrightarrow");ae("\\Harr","\\Leftrightarrow");ae("\\hearts","\\heartsuit");ae("\\image","\\Im");ae("\\infin","\\infty");ae("\\Iota","\\mathrm{I}");ae("\\isin","\\in");ae("\\Kappa","\\mathrm{K}");ae("\\larr","\\leftarrow");ae("\\lArr","\\Leftarrow");ae("\\Larr","\\Leftarrow");ae("\\lrarr","\\leftrightarrow");ae("\\lrArr","\\Leftrightarrow");ae("\\Lrarr","\\Leftrightarrow");ae("\\Mu","\\mathrm{M}");ae("\\natnums","\\mathbb{N}");ae("\\Nu","\\mathrm{N}");ae("\\Omicron","\\mathrm{O}");ae("\\plusmn","\\pm");ae("\\rarr","\\rightarrow");ae("\\rArr","\\Rightarrow");ae("\\Rarr","\\Rightarrow");ae("\\real","\\Re");ae("\\reals","\\mathbb{R}");ae("\\Reals","\\mathbb{R}");ae("\\Rho","\\mathrm{P}");ae("\\sdot","\\cdot");ae("\\sect","\\S");ae("\\spades","\\spadesuit");ae("\\sub","\\subset");ae("\\sube","\\subseteq");ae("\\supe","\\supseteq");ae("\\Tau","\\mathrm{T}");ae("\\thetasym","\\vartheta");ae("\\weierp","\\wp");ae("\\Zeta","\\mathrm{Z}");ae("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ae("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ae("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ae("\\bra","\\mathinner{\\langle{#1}|}");ae("\\ket","\\mathinner{|{#1}\\rangle}");ae("\\braket","\\mathinner{\\langle{#1}\\rangle}");ae("\\Bra","\\left\\langle#1\\right|");ae("\\Ket","\\left|#1\\right\\rangle");var SH=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,h=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};ae("\\bra@ket",SH(!1));ae("\\bra@set",SH(!0));ae("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ae("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ae("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ae("\\angln","{\\angl n}");ae("\\blue","\\textcolor{##6495ed}{#1}");ae("\\orange","\\textcolor{##ffa500}{#1}");ae("\\pink","\\textcolor{##ff00af}{#1}");ae("\\red","\\textcolor{##df0030}{#1}");ae("\\green","\\textcolor{##28ae7b}{#1}");ae("\\gray","\\textcolor{gray}{#1}");ae("\\purple","\\textcolor{##9d38bd}{#1}");ae("\\blueA","\\textcolor{##ccfaff}{#1}");ae("\\blueB","\\textcolor{##80f6ff}{#1}");ae("\\blueC","\\textcolor{##63d9ea}{#1}");ae("\\blueD","\\textcolor{##11accd}{#1}");ae("\\blueE","\\textcolor{##0c7f99}{#1}");ae("\\tealA","\\textcolor{##94fff5}{#1}");ae("\\tealB","\\textcolor{##26edd5}{#1}");ae("\\tealC","\\textcolor{##01d1c1}{#1}");ae("\\tealD","\\textcolor{##01a995}{#1}");ae("\\tealE","\\textcolor{##208170}{#1}");ae("\\greenA","\\textcolor{##b6ffb0}{#1}");ae("\\greenB","\\textcolor{##8af281}{#1}");ae("\\greenC","\\textcolor{##74cf70}{#1}");ae("\\greenD","\\textcolor{##1fab54}{#1}");ae("\\greenE","\\textcolor{##0d923f}{#1}");ae("\\goldA","\\textcolor{##ffd0a9}{#1}");ae("\\goldB","\\textcolor{##ffbb71}{#1}");ae("\\goldC","\\textcolor{##ff9c39}{#1}");ae("\\goldD","\\textcolor{##e07d10}{#1}");ae("\\goldE","\\textcolor{##a75a05}{#1}");ae("\\redA","\\textcolor{##fca9a9}{#1}");ae("\\redB","\\textcolor{##ff8482}{#1}");ae("\\redC","\\textcolor{##f9685d}{#1}");ae("\\redD","\\textcolor{##e84d39}{#1}");ae("\\redE","\\textcolor{##bc2612}{#1}");ae("\\maroonA","\\textcolor{##ffbde0}{#1}");ae("\\maroonB","\\textcolor{##ff92c6}{#1}");ae("\\maroonC","\\textcolor{##ed5fa6}{#1}");ae("\\maroonD","\\textcolor{##ca337c}{#1}");ae("\\maroonE","\\textcolor{##9e034e}{#1}");ae("\\purpleA","\\textcolor{##ddd7ff}{#1}");ae("\\purpleB","\\textcolor{##c6b9fc}{#1}");ae("\\purpleC","\\textcolor{##aa87ff}{#1}");ae("\\purpleD","\\textcolor{##7854ab}{#1}");ae("\\purpleE","\\textcolor{##543b78}{#1}");ae("\\mintA","\\textcolor{##f5f9e8}{#1}");ae("\\mintB","\\textcolor{##edf2df}{#1}");ae("\\mintC","\\textcolor{##e0e5cc}{#1}");ae("\\grayA","\\textcolor{##f6f7f7}{#1}");ae("\\grayB","\\textcolor{##f0f1f2}{#1}");ae("\\grayC","\\textcolor{##e3e5e6}{#1}");ae("\\grayD","\\textcolor{##d6d8da}{#1}");ae("\\grayE","\\textcolor{##babec2}{#1}");ae("\\grayF","\\textcolor{##888d93}{#1}");ae("\\grayG","\\textcolor{##626569}{#1}");ae("\\grayH","\\textcolor{##3b3e40}{#1}");ae("\\grayI","\\textcolor{##21242c}{#1}");ae("\\kaBlue","\\textcolor{##314453}{#1}");ae("\\kaGreen","\\textcolor{##71B307}{#1}");var CH={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class t$n{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 ZIn(JIn,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new AR(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 ba("EOF",r.loc)),this.pushTokens(s),new ba("",Hi.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 Je("Extra }",i)}else if(i.text==="EOF")throw new Je("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 Je("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Je("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 Je("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 Je("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 Je("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 ba(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 AR(s,this.settings),c=[],u=o.lex();u.text!=="EOF";)c.push(u),u=o.lex();c.reverse();var h={tokens:c,numArgs:i};return h}return s}isDefined(n){return this.macros.has(n)||Mu.hasOwnProperty(n)||Ar.math.hasOwnProperty(n)||Ar.text.hasOwnProperty(n)||CH.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Mu.hasOwnProperty(n)&&!Mu[n].primitive}}var MR=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,O1=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),m4={"́":{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"}},OR={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class Uy{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 t$n(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 Je("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 ba("}")),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(Uy.endOfExpression.has(s.text)||t&&s.text===t||n&&Mu[s.text]&&Mu[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&&(RF(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:Hi.range(n),text:t};else return null;if(this.consume(),i)for(var h=0;h0?{type:"text",value:j}:void 0),j===!1?p.lastIndex=C+1:(w!==C&&y.push({type:"text",value:u.value.slice(w,C)}),Array.isArray(j)?y.push(...j):j&&y.push(j),w=C+x[0].length,b=!0),!p.global)break;x=p.exec(u.value)}return b?(w?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=LR(e,"(");let i=LR(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 jH(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||bf(t)||Ey(t))&&(!n||t!==47)}AH.peek=O$n;function E$n(){this.buffer()}function N$n(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function z$n(){this.buffer()}function j$n(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function A$n(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=mo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function T$n(e){this.exit(e)}function R$n(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=mo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function M$n(e){this.exit(e)}function O$n(){return"["}function AH(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 D$n(){return{enter:{gfmFootnoteCallString:E$n,gfmFootnoteCall:N$n,gfmFootnoteDefinitionLabelString:z$n,gfmFootnoteDefinition:j$n},exit:{gfmFootnoteCallString:A$n,gfmFootnoteCall:T$n,gfmFootnoteDefinitionLabelString:R$n,gfmFootnoteDefinition:M$n}}}function L$n(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:AH},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"),h=i.enter("label");return c+=o.move(i.safe(i.associationId(r),{before:c,after:"]"})),h(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((n?` -`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?TH:I$n))),u(),c}}function I$n(e,n,t){return n===0?e:TH(e,n,t)}function TH(e,n,t){return(t?"":" ")+e}const $$n=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];RH.peek=q$n;function B$n(){return{canContainEols:["delete"],enter:{strikethrough:F$n},exit:{strikethrough:H$n}}}function P$n(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$$n}],handlers:{delete:RH}}}function F$n(e){this.enter({type:"delete",children:[]},e)}function H$n(e){this.exit(e)}function RH(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 q$n(){return"~"}function U$n(e){return e.length}function G$n(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||U$n,i=[],a=[],o=[],c=[];let u=0,h=-1;for(;++hu&&(u=e[h].length);++bc[b])&&(c[b]=x)}k.push(y)}a[h]=k,o[h]=v}let f=-1;if(typeof r=="object"&&"length"in r)for(;++fc[f]&&(c[f]=y),m[f]=y),p[f]=x}a.splice(1,0,p),o.splice(1,0,m),h=-1;const w=[];for(;++h "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),W$n);return s(),a}function W$n(e,n,t){return">"+(t?"":" ")+e}function Q$n(e,n){return $R(e,n.inConstruct,!0)&&!$R(e,n.notInConstruct,!1)}function $R(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 X$n(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 Y$n(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 Z$n(e,n,t,r){const s=Y$n(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(X$n(e,t)){const f=t.enter("codeIndented"),p=t.indentLines(i,J$n);return f(),p}const o=t.createTracker(r),c=s.repeat(Math.max(MH(i,s)+1,3)),u=t.enter("codeFenced");let h=o.move(c);if(e.lang){const f=t.enter(`codeFencedLang${a}`);h+=o.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=t.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(t.safe(e.meta,{before:h,after:` +?)[ \r ]*`,fk="[̀-ͯ]",O$n=new RegExp(fk+"+$"),D$n="("+wH+"+)|"+(M$n+"|")+"([!-\\[\\]-‧‪-퟿豈-￿]"+(fk+"*")+"|[\uD800-\uDBFF][\uDC00-\uDFFF]"+(fk+"*")+"|\\\\verb\\*([^]).*?\\4|\\\\verb([^*a-zA-Z]).*?\\5"+("|"+R$n)+("|"+T$n+")");class TR{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(D$n,"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 ba("EOF",new Hi(this,t,t));var r=this.tokenRegex.exec(n);if(r===null||r.index!==t)throw new Je("Unexpected character: '"+n[t]+"'",new ba(n[t],new Hi(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 ba(s,new Hi(this,t,this.tokenRegex.lastIndex))}}class L$n{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 Je("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 I$n=_H;ie("\\noexpand",function(e){var n=e.popToken();return e.isExpandable(n.text)&&(n.noexpand=!0,n.treatAsRelax=!0),{tokens:[n],numArgs:0}});ie("\\expandafter",function(e){var n=e.popToken();return e.expandOnce(!0),{tokens:[n],numArgs:0}});ie("\\@firstoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[0],numArgs:0}});ie("\\@secondoftwo",function(e){var n=e.consumeArgs(2);return{tokens:n[1],numArgs:0}});ie("\\@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}});ie("\\@ifstar","\\@ifnextchar *{\\@firstoftwo{#1}}");ie("\\TextOrMath",function(e){var n=e.consumeArgs(2);return e.mode==="text"?{tokens:n[0],numArgs:0}:{tokens:n[1],numArgs:0}});var RR={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};ie("\\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 Je("\\char` missing argument");r=n.text.charCodeAt(0)}else t=10;if(t){if(r=RR[n.text],r==null||r>=t)throw new Je("Invalid base-"+t+" digit "+n.text);for(var s;(s=RR[e.future().text])!=null&&s{var s=e.consumeArg().tokens;if(s.length!==1)throw new Je("\\newcommand's first argument must be a macro name");var i=s[0].text,a=e.isDefined(i);if(a&&!n)throw new Je("\\newcommand{"+i+"} attempting to redefine "+(i+"; use \\renewcommand"));if(!a&&!t)throw new Je("\\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 Je("Invalid number of arguments: "+c);o=parseInt(c),s=e.consumeArg().tokens}return a&&r||e.macros.set(i,{tokens:s,numArgs:o}),""};ie("\\newcommand",e=>RC(e,!1,!0,!1));ie("\\renewcommand",e=>RC(e,!0,!1,!1));ie("\\providecommand",e=>RC(e,!0,!0,!0));ie("\\message",e=>{var n=e.consumeArgs(1)[0];return console.log(n.reverse().map(t=>t.text).join("")),""});ie("\\errmessage",e=>{var n=e.consumeArgs(1)[0];return console.error(n.reverse().map(t=>t.text).join("")),""});ie("\\show",e=>{var n=e.popToken(),t=n.text;return console.log(n,e.macros.get(t),Mu[t],Ar.math[t],Ar.text[t]),""});ie("\\bgroup","{");ie("\\egroup","}");ie("~","\\nobreakspace");ie("\\lq","`");ie("\\rq","'");ie("\\aa","\\r a");ie("\\AA","\\r A");ie("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}");ie("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}");ie("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}");ie("ℬ","\\mathscr{B}");ie("ℰ","\\mathscr{E}");ie("ℱ","\\mathscr{F}");ie("ℋ","\\mathscr{H}");ie("ℐ","\\mathscr{I}");ie("ℒ","\\mathscr{L}");ie("ℳ","\\mathscr{M}");ie("ℛ","\\mathscr{R}");ie("ℭ","\\mathfrak{C}");ie("ℌ","\\mathfrak{H}");ie("ℨ","\\mathfrak{Z}");ie("\\Bbbk","\\Bbb{k}");ie("\\llap","\\mathllap{\\textrm{#1}}");ie("\\rlap","\\mathrlap{\\textrm{#1}}");ie("\\clap","\\mathclap{\\textrm{#1}}");ie("\\mathstrut","\\vphantom{(}");ie("\\underbar","\\underline{\\text{#1}}");ie("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}\\nobreak}{\\char"338}');ie("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}");ie("\\ne","\\neq");ie("≠","\\neq");ie("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}");ie("∉","\\notin");ie("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}");ie("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}");ie("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}");ie("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}");ie("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}");ie("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}");ie("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}");ie("⟂","\\perp");ie("‼","\\mathclose{!\\mkern-0.8mu!}");ie("∌","\\notni");ie("⌜","\\ulcorner");ie("⌝","\\urcorner");ie("⌞","\\llcorner");ie("⌟","\\lrcorner");ie("©","\\copyright");ie("®","\\textregistered");ie("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}');ie("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}');ie("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}');ie("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}');ie("\\vdots","{\\varvdots\\rule{0pt}{15pt}}");ie("⋮","\\vdots");ie("\\varGamma","\\mathit{\\Gamma}");ie("\\varDelta","\\mathit{\\Delta}");ie("\\varTheta","\\mathit{\\Theta}");ie("\\varLambda","\\mathit{\\Lambda}");ie("\\varXi","\\mathit{\\Xi}");ie("\\varPi","\\mathit{\\Pi}");ie("\\varSigma","\\mathit{\\Sigma}");ie("\\varUpsilon","\\mathit{\\Upsilon}");ie("\\varPhi","\\mathit{\\Phi}");ie("\\varPsi","\\mathit{\\Psi}");ie("\\varOmega","\\mathit{\\Omega}");ie("\\substack","\\begin{subarray}{c}#1\\end{subarray}");ie("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax");ie("\\boxed","\\fbox{$\\displaystyle{#1}$}");ie("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;");ie("\\implies","\\DOTSB\\;\\Longrightarrow\\;");ie("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;");ie("\\dddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ...}}{#1}}");ie("\\ddddot","{\\overset{\\raisebox{-0.1ex}{\\normalsize ....}}{#1}}");var MR={",":"\\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"},$$n=new Set(["bin","rel"]);ie("\\dots",function(e){var n="\\dotso",t=e.expandAfterFuture().text;return t in MR?n=MR[t]:(t.slice(0,4)==="\\not"||t in Ar.math&&$$n.has(Ar.math[t].group))&&(n="\\dotsb"),n});var MC={")":!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};ie("\\dotso",function(e){var n=e.future().text;return n in MC?"\\ldots\\,":"\\ldots"});ie("\\dotsc",function(e){var n=e.future().text;return n in MC&&n!==","?"\\ldots\\,":"\\ldots"});ie("\\cdots",function(e){var n=e.future().text;return n in MC?"\\@cdots\\,":"\\@cdots"});ie("\\dotsb","\\cdots");ie("\\dotsm","\\cdots");ie("\\dotsi","\\!\\cdots");ie("\\dotsx","\\ldots\\,");ie("\\DOTSI","\\relax");ie("\\DOTSB","\\relax");ie("\\DOTSX","\\relax");ie("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax");ie("\\,","\\tmspace+{3mu}{.1667em}");ie("\\thinspace","\\,");ie("\\>","\\mskip{4mu}");ie("\\:","\\tmspace+{4mu}{.2222em}");ie("\\medspace","\\:");ie("\\;","\\tmspace+{5mu}{.2777em}");ie("\\thickspace","\\;");ie("\\!","\\tmspace-{3mu}{.1667em}");ie("\\negthinspace","\\!");ie("\\negmedspace","\\tmspace-{4mu}{.2222em}");ie("\\negthickspace","\\tmspace-{5mu}{.277em}");ie("\\enspace","\\kern.5em ");ie("\\enskip","\\hskip.5em\\relax");ie("\\quad","\\hskip1em\\relax");ie("\\qquad","\\hskip2em\\relax");ie("\\tag","\\@ifstar\\tag@literal\\tag@paren");ie("\\tag@paren","\\tag@literal{({#1})}");ie("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new Je("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"});ie("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}");ie("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)");ie("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}");ie("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1");ie("\\newline","\\\\\\relax");ie("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}");var kH=at(nc["Main-Regular"][84][1]-.7*nc["Main-Regular"][65][1]);ie("\\LaTeX","\\textrm{\\html@mathml{"+("L\\kern-.36em\\raisebox{"+kH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{LaTeX}}");ie("\\KaTeX","\\textrm{\\html@mathml{"+("K\\kern-.17em\\raisebox{"+kH+"}{\\scriptstyle A}")+"\\kern-.15em\\TeX}{KaTeX}}");ie("\\hspace","\\@ifstar\\@hspacer\\@hspace");ie("\\@hspace","\\hskip #1\\relax");ie("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax");ie("\\ordinarycolon",":");ie("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}");ie("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}');ie("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}');ie("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}');ie("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}');ie("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}');ie("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}');ie("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}');ie("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}');ie("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}');ie("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}');ie("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}');ie("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}');ie("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}');ie("∷","\\dblcolon");ie("∹","\\eqcolon");ie("≔","\\coloneqq");ie("≕","\\eqqcolon");ie("⩴","\\Coloneqq");ie("\\ratio","\\vcentcolon");ie("\\coloncolon","\\dblcolon");ie("\\colonequals","\\coloneqq");ie("\\coloncolonequals","\\Coloneqq");ie("\\equalscolon","\\eqqcolon");ie("\\equalscoloncolon","\\Eqqcolon");ie("\\colonminus","\\coloneq");ie("\\coloncolonminus","\\Coloneq");ie("\\minuscolon","\\eqcolon");ie("\\minuscoloncolon","\\Eqcolon");ie("\\coloncolonapprox","\\Colonapprox");ie("\\coloncolonsim","\\Colonsim");ie("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ie("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}");ie("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}");ie("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}");ie("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}");ie("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}");ie("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}");ie("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}");ie("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}");ie("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}");ie("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}");ie("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}");ie("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}");ie("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}");ie("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}");ie("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}");ie("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}");ie("\\nleqq","\\html@mathml{\\@nleqq}{≰}");ie("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}");ie("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}");ie("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}");ie("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}");ie("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}");ie("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}");ie("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}");ie("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}");ie("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}");ie("\\imath","\\html@mathml{\\@imath}{ı}");ie("\\jmath","\\html@mathml{\\@jmath}{ȷ}");ie("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}");ie("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}");ie("⟦","\\llbracket");ie("⟧","\\rrbracket");ie("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}");ie("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}");ie("⦃","\\lBrace");ie("⦄","\\rBrace");ie("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}");ie("⦵","\\minuso");ie("\\darr","\\downarrow");ie("\\dArr","\\Downarrow");ie("\\Darr","\\Downarrow");ie("\\lang","\\langle");ie("\\rang","\\rangle");ie("\\uarr","\\uparrow");ie("\\uArr","\\Uparrow");ie("\\Uarr","\\Uparrow");ie("\\N","\\mathbb{N}");ie("\\R","\\mathbb{R}");ie("\\Z","\\mathbb{Z}");ie("\\alef","\\aleph");ie("\\alefsym","\\aleph");ie("\\Alpha","\\mathrm{A}");ie("\\Beta","\\mathrm{B}");ie("\\bull","\\bullet");ie("\\Chi","\\mathrm{X}");ie("\\clubs","\\clubsuit");ie("\\cnums","\\mathbb{C}");ie("\\Complex","\\mathbb{C}");ie("\\Dagger","\\ddagger");ie("\\diamonds","\\diamondsuit");ie("\\empty","\\emptyset");ie("\\Epsilon","\\mathrm{E}");ie("\\Eta","\\mathrm{H}");ie("\\exist","\\exists");ie("\\harr","\\leftrightarrow");ie("\\hArr","\\Leftrightarrow");ie("\\Harr","\\Leftrightarrow");ie("\\hearts","\\heartsuit");ie("\\image","\\Im");ie("\\infin","\\infty");ie("\\Iota","\\mathrm{I}");ie("\\isin","\\in");ie("\\Kappa","\\mathrm{K}");ie("\\larr","\\leftarrow");ie("\\lArr","\\Leftarrow");ie("\\Larr","\\Leftarrow");ie("\\lrarr","\\leftrightarrow");ie("\\lrArr","\\Leftrightarrow");ie("\\Lrarr","\\Leftrightarrow");ie("\\Mu","\\mathrm{M}");ie("\\natnums","\\mathbb{N}");ie("\\Nu","\\mathrm{N}");ie("\\Omicron","\\mathrm{O}");ie("\\plusmn","\\pm");ie("\\rarr","\\rightarrow");ie("\\rArr","\\Rightarrow");ie("\\Rarr","\\Rightarrow");ie("\\real","\\Re");ie("\\reals","\\mathbb{R}");ie("\\Reals","\\mathbb{R}");ie("\\Rho","\\mathrm{P}");ie("\\sdot","\\cdot");ie("\\sect","\\S");ie("\\spades","\\spadesuit");ie("\\sub","\\subset");ie("\\sube","\\subseteq");ie("\\supe","\\supseteq");ie("\\Tau","\\mathrm{T}");ie("\\thetasym","\\vartheta");ie("\\weierp","\\wp");ie("\\Zeta","\\mathrm{Z}");ie("\\argmin","\\DOTSB\\operatorname*{arg\\,min}");ie("\\argmax","\\DOTSB\\operatorname*{arg\\,max}");ie("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits");ie("\\bra","\\mathinner{\\langle{#1}|}");ie("\\ket","\\mathinner{|{#1}\\rangle}");ie("\\braket","\\mathinner{\\langle{#1}\\rangle}");ie("\\Bra","\\left\\langle#1\\right|");ie("\\Ket","\\left|#1\\right\\rangle");var SH=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,h=n.expandTokens([...i,...u,...t]);return n.macros.endGroup(),{tokens:h.reverse(),numArgs:0}};ie("\\bra@ket",SH(!1));ie("\\bra@set",SH(!0));ie("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}");ie("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}");ie("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}");ie("\\angln","{\\angl n}");ie("\\blue","\\textcolor{##6495ed}{#1}");ie("\\orange","\\textcolor{##ffa500}{#1}");ie("\\pink","\\textcolor{##ff00af}{#1}");ie("\\red","\\textcolor{##df0030}{#1}");ie("\\green","\\textcolor{##28ae7b}{#1}");ie("\\gray","\\textcolor{gray}{#1}");ie("\\purple","\\textcolor{##9d38bd}{#1}");ie("\\blueA","\\textcolor{##ccfaff}{#1}");ie("\\blueB","\\textcolor{##80f6ff}{#1}");ie("\\blueC","\\textcolor{##63d9ea}{#1}");ie("\\blueD","\\textcolor{##11accd}{#1}");ie("\\blueE","\\textcolor{##0c7f99}{#1}");ie("\\tealA","\\textcolor{##94fff5}{#1}");ie("\\tealB","\\textcolor{##26edd5}{#1}");ie("\\tealC","\\textcolor{##01d1c1}{#1}");ie("\\tealD","\\textcolor{##01a995}{#1}");ie("\\tealE","\\textcolor{##208170}{#1}");ie("\\greenA","\\textcolor{##b6ffb0}{#1}");ie("\\greenB","\\textcolor{##8af281}{#1}");ie("\\greenC","\\textcolor{##74cf70}{#1}");ie("\\greenD","\\textcolor{##1fab54}{#1}");ie("\\greenE","\\textcolor{##0d923f}{#1}");ie("\\goldA","\\textcolor{##ffd0a9}{#1}");ie("\\goldB","\\textcolor{##ffbb71}{#1}");ie("\\goldC","\\textcolor{##ff9c39}{#1}");ie("\\goldD","\\textcolor{##e07d10}{#1}");ie("\\goldE","\\textcolor{##a75a05}{#1}");ie("\\redA","\\textcolor{##fca9a9}{#1}");ie("\\redB","\\textcolor{##ff8482}{#1}");ie("\\redC","\\textcolor{##f9685d}{#1}");ie("\\redD","\\textcolor{##e84d39}{#1}");ie("\\redE","\\textcolor{##bc2612}{#1}");ie("\\maroonA","\\textcolor{##ffbde0}{#1}");ie("\\maroonB","\\textcolor{##ff92c6}{#1}");ie("\\maroonC","\\textcolor{##ed5fa6}{#1}");ie("\\maroonD","\\textcolor{##ca337c}{#1}");ie("\\maroonE","\\textcolor{##9e034e}{#1}");ie("\\purpleA","\\textcolor{##ddd7ff}{#1}");ie("\\purpleB","\\textcolor{##c6b9fc}{#1}");ie("\\purpleC","\\textcolor{##aa87ff}{#1}");ie("\\purpleD","\\textcolor{##7854ab}{#1}");ie("\\purpleE","\\textcolor{##543b78}{#1}");ie("\\mintA","\\textcolor{##f5f9e8}{#1}");ie("\\mintB","\\textcolor{##edf2df}{#1}");ie("\\mintC","\\textcolor{##e0e5cc}{#1}");ie("\\grayA","\\textcolor{##f6f7f7}{#1}");ie("\\grayB","\\textcolor{##f0f1f2}{#1}");ie("\\grayC","\\textcolor{##e3e5e6}{#1}");ie("\\grayD","\\textcolor{##d6d8da}{#1}");ie("\\grayE","\\textcolor{##babec2}{#1}");ie("\\grayF","\\textcolor{##888d93}{#1}");ie("\\grayG","\\textcolor{##626569}{#1}");ie("\\grayH","\\textcolor{##3b3e40}{#1}");ie("\\grayI","\\textcolor{##21242c}{#1}");ie("\\kaBlue","\\textcolor{##314453}{#1}");ie("\\kaGreen","\\textcolor{##71B307}{#1}");var CH={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0};class B$n{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 L$n(I$n,t.macros),this.mode=r,this.stack=[]}feed(n){this.lexer=new TR(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 ba("EOF",r.loc)),this.pushTokens(s),new ba("",Hi.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 Je("Extra }",i)}else if(i.text==="EOF")throw new Je("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 Je("The length of delimiters doesn't match the number of args!");for(var r=t[0],s=0;sthis.settings.maxExpand)throw new Je("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 Je("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 Je("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 Je("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 ba(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 TR(s,this.settings),c=[],u=o.lex();u.text!=="EOF";)c.push(u),u=o.lex();c.reverse();var h={tokens:c,numArgs:i};return h}return s}isDefined(n){return this.macros.has(n)||Mu.hasOwnProperty(n)||Ar.math.hasOwnProperty(n)||Ar.text.hasOwnProperty(n)||CH.hasOwnProperty(n)}isExpandable(n){var t=this.macros.get(n);return t!=null?typeof t=="string"||typeof t=="function"||!t.unexpandable:Mu.hasOwnProperty(n)&&!Mu[n].primitive}}var OR=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,O1=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),p4={"́":{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"}},DR={á:"á",à:"à",ä:"ä",ǟ:"ǟ",ã:"ã",ā:"ā",ă:"ă",ắ:"ắ",ằ:"ằ",ẵ:"ẵ",ǎ:"ǎ",â:"â",ấ:"ấ",ầ:"ầ",ẫ:"ẫ",ȧ:"ȧ",ǡ:"ǡ",å:"å",ǻ:"ǻ",ḃ:"ḃ",ć:"ć",ḉ:"ḉ",č:"č",ĉ:"ĉ",ċ:"ċ",ç:"ç",ď:"ď",ḋ:"ḋ",ḑ:"ḑ",é:"é",è:"è",ë:"ë",ẽ:"ẽ",ē:"ē",ḗ:"ḗ",ḕ:"ḕ",ĕ:"ĕ",ḝ:"ḝ",ě:"ě",ê:"ê",ế:"ế",ề:"ề",ễ:"ễ",ė:"ė",ȩ:"ȩ",ḟ:"ḟ",ǵ:"ǵ",ḡ:"ḡ",ğ:"ğ",ǧ:"ǧ",ĝ:"ĝ",ġ:"ġ",ģ:"ģ",ḧ:"ḧ",ȟ:"ȟ",ĥ:"ĥ",ḣ:"ḣ",ḩ:"ḩ",í:"í",ì:"ì",ï:"ï",ḯ:"ḯ",ĩ:"ĩ",ī:"ī",ĭ:"ĭ",ǐ:"ǐ",î:"î",ǰ:"ǰ",ĵ:"ĵ",ḱ:"ḱ",ǩ:"ǩ",ķ:"ķ",ĺ:"ĺ",ľ:"ľ",ļ:"ļ",ḿ:"ḿ",ṁ:"ṁ",ń:"ń",ǹ:"ǹ",ñ:"ñ",ň:"ň",ṅ:"ṅ",ņ:"ņ",ó:"ó",ò:"ò",ö:"ö",ȫ:"ȫ",õ:"õ",ṍ:"ṍ",ṏ:"ṏ",ȭ:"ȭ",ō:"ō",ṓ:"ṓ",ṑ:"ṑ",ŏ:"ŏ",ǒ:"ǒ",ô:"ô",ố:"ố",ồ:"ồ",ỗ:"ỗ",ȯ:"ȯ",ȱ:"ȱ",ő:"ő",ṕ:"ṕ",ṗ:"ṗ",ŕ:"ŕ",ř:"ř",ṙ:"ṙ",ŗ:"ŗ",ś:"ś",ṥ:"ṥ",š:"š",ṧ:"ṧ",ŝ:"ŝ",ṡ:"ṡ",ş:"ş",ẗ:"ẗ",ť:"ť",ṫ:"ṫ",ţ:"ţ",ú:"ú",ù:"ù",ü:"ü",ǘ:"ǘ",ǜ:"ǜ",ǖ:"ǖ",ǚ:"ǚ",ũ:"ũ",ṹ:"ṹ",ū:"ū",ṻ:"ṻ",ŭ:"ŭ",ǔ:"ǔ",û:"û",ů:"ů",ű:"ű",ṽ:"ṽ",ẃ:"ẃ",ẁ:"ẁ",ẅ:"ẅ",ŵ:"ŵ",ẇ:"ẇ",ẘ:"ẘ",ẍ:"ẍ",ẋ:"ẋ",ý:"ý",ỳ:"ỳ",ÿ:"ÿ",ỹ:"ỹ",ȳ:"ȳ",ŷ:"ŷ",ẏ:"ẏ",ẙ:"ẙ",ź:"ź",ž:"ž",ẑ:"ẑ",ż:"ż",Á:"Á",À:"À",Ä:"Ä",Ǟ:"Ǟ",Ã:"Ã",Ā:"Ā",Ă:"Ă",Ắ:"Ắ",Ằ:"Ằ",Ẵ:"Ẵ",Ǎ:"Ǎ",Â:"Â",Ấ:"Ấ",Ầ:"Ầ",Ẫ:"Ẫ",Ȧ:"Ȧ",Ǡ:"Ǡ",Å:"Å",Ǻ:"Ǻ",Ḃ:"Ḃ",Ć:"Ć",Ḉ:"Ḉ",Č:"Č",Ĉ:"Ĉ",Ċ:"Ċ",Ç:"Ç",Ď:"Ď",Ḋ:"Ḋ",Ḑ:"Ḑ",É:"É",È:"È",Ë:"Ë",Ẽ:"Ẽ",Ē:"Ē",Ḗ:"Ḗ",Ḕ:"Ḕ",Ĕ:"Ĕ",Ḝ:"Ḝ",Ě:"Ě",Ê:"Ê",Ế:"Ế",Ề:"Ề",Ễ:"Ễ",Ė:"Ė",Ȩ:"Ȩ",Ḟ:"Ḟ",Ǵ:"Ǵ",Ḡ:"Ḡ",Ğ:"Ğ",Ǧ:"Ǧ",Ĝ:"Ĝ",Ġ:"Ġ",Ģ:"Ģ",Ḧ:"Ḧ",Ȟ:"Ȟ",Ĥ:"Ĥ",Ḣ:"Ḣ",Ḩ:"Ḩ",Í:"Í",Ì:"Ì",Ï:"Ï",Ḯ:"Ḯ",Ĩ:"Ĩ",Ī:"Ī",Ĭ:"Ĭ",Ǐ:"Ǐ",Î:"Î",İ:"İ",Ĵ:"Ĵ",Ḱ:"Ḱ",Ǩ:"Ǩ",Ķ:"Ķ",Ĺ:"Ĺ",Ľ:"Ľ",Ļ:"Ļ",Ḿ:"Ḿ",Ṁ:"Ṁ",Ń:"Ń",Ǹ:"Ǹ",Ñ:"Ñ",Ň:"Ň",Ṅ:"Ṅ",Ņ:"Ņ",Ó:"Ó",Ò:"Ò",Ö:"Ö",Ȫ:"Ȫ",Õ:"Õ",Ṍ:"Ṍ",Ṏ:"Ṏ",Ȭ:"Ȭ",Ō:"Ō",Ṓ:"Ṓ",Ṑ:"Ṑ",Ŏ:"Ŏ",Ǒ:"Ǒ",Ô:"Ô",Ố:"Ố",Ồ:"Ồ",Ỗ:"Ỗ",Ȯ:"Ȯ",Ȱ:"Ȱ",Ő:"Ő",Ṕ:"Ṕ",Ṗ:"Ṗ",Ŕ:"Ŕ",Ř:"Ř",Ṙ:"Ṙ",Ŗ:"Ŗ",Ś:"Ś",Ṥ:"Ṥ",Š:"Š",Ṧ:"Ṧ",Ŝ:"Ŝ",Ṡ:"Ṡ",Ş:"Ş",Ť:"Ť",Ṫ:"Ṫ",Ţ:"Ţ",Ú:"Ú",Ù:"Ù",Ü:"Ü",Ǘ:"Ǘ",Ǜ:"Ǜ",Ǖ:"Ǖ",Ǚ:"Ǚ",Ũ:"Ũ",Ṹ:"Ṹ",Ū:"Ū",Ṻ:"Ṻ",Ŭ:"Ŭ",Ǔ:"Ǔ",Û:"Û",Ů:"Ů",Ű:"Ű",Ṽ:"Ṽ",Ẃ:"Ẃ",Ẁ:"Ẁ",Ẅ:"Ẅ",Ŵ:"Ŵ",Ẇ:"Ẇ",Ẍ:"Ẍ",Ẋ:"Ẋ",Ý:"Ý",Ỳ:"Ỳ",Ÿ:"Ÿ",Ỹ:"Ỹ",Ȳ:"Ȳ",Ŷ:"Ŷ",Ẏ:"Ẏ",Ź:"Ź",Ž:"Ž",Ẑ:"Ẑ",Ż:"Ż",ά:"ά",ὰ:"ὰ",ᾱ:"ᾱ",ᾰ:"ᾰ",έ:"έ",ὲ:"ὲ",ή:"ή",ὴ:"ὴ",ί:"ί",ὶ:"ὶ",ϊ:"ϊ",ΐ:"ΐ",ῒ:"ῒ",ῑ:"ῑ",ῐ:"ῐ",ό:"ό",ὸ:"ὸ",ύ:"ύ",ὺ:"ὺ",ϋ:"ϋ",ΰ:"ΰ",ῢ:"ῢ",ῡ:"ῡ",ῠ:"ῠ",ώ:"ώ",ὼ:"ὼ",Ύ:"Ύ",Ὺ:"Ὺ",Ϋ:"Ϋ",Ῡ:"Ῡ",Ῠ:"Ῠ",Ώ:"Ώ",Ὼ:"Ὼ"};class qy{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 B$n(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 Je("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 ba("}")),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(qy.endOfExpression.has(s.text)||t&&s.text===t||n&&Mu[s.text]&&Mu[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&&(RF(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:Hi.range(n),text:t};else return null;if(this.consume(),i)for(var h=0;h0?{type:"text",value:j}:void 0),j===!1?p.lastIndex=C+1:(w!==C&&y.push({type:"text",value:u.value.slice(w,C)}),Array.isArray(j)?y.push(...j):j&&y.push(j),w=C+x[0].length,b=!0),!p.global)break;x=p.exec(u.value)}return b?(w?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let t=n[0],r=t.indexOf(")");const s=IR(e,"(");let i=IR(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 jH(e,n){const t=e.input.charCodeAt(e.index-1);return(e.index===0||bf(t)||Cy(t))&&(!n||t!==47)}AH.peek=vBn;function uBn(){this.buffer()}function _Bn(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function fBn(){this.buffer()}function dBn(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hBn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=mo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function pBn(e){this.exit(e)}function mBn(e){const n=this.resume(),t=this.stack[this.stack.length-1];t.type,t.identifier=mo(this.sliceSerialize(e)).toLowerCase(),t.label=n}function gBn(e){this.exit(e)}function vBn(){return"["}function AH(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 bBn(){return{enter:{gfmFootnoteCallString:uBn,gfmFootnoteCall:_Bn,gfmFootnoteDefinitionLabelString:fBn,gfmFootnoteDefinition:dBn},exit:{gfmFootnoteCallString:hBn,gfmFootnoteCall:pBn,gfmFootnoteDefinitionLabelString:mBn,gfmFootnoteDefinition:gBn}}}function yBn(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:t,footnoteReference:AH},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"),h=i.enter("label");return c+=o.move(i.safe(i.associationId(r),{before:c,after:"]"})),h(),c+=o.move("]:"),r.children&&r.children.length>0&&(o.shift(4),c+=o.move((n?` +`:" ")+i.indentLines(i.containerFlow(r,o.current()),n?TH:xBn))),u(),c}}function xBn(e,n,t){return n===0?e:TH(e,n,t)}function TH(e,n,t){return(t?"":" ")+e}const wBn=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];RH.peek=NBn;function kBn(){return{canContainEols:["delete"],enter:{strikethrough:CBn},exit:{strikethrough:EBn}}}function SBn(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wBn}],handlers:{delete:RH}}}function CBn(e){this.enter({type:"delete",children:[]},e)}function EBn(e){this.exit(e)}function RH(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 NBn(){return"~"}function zBn(e){return e.length}function jBn(e,n){const t=n||{},r=(t.align||[]).concat(),s=t.stringLength||zBn,i=[],a=[],o=[],c=[];let u=0,h=-1;for(;++hu&&(u=e[h].length);++bc[b])&&(c[b]=x)}k.push(y)}a[h]=k,o[h]=v}let f=-1;if(typeof r=="object"&&"length"in r)for(;++fc[f]&&(c[f]=y),m[f]=y),p[f]=x}a.splice(1,0,p),o.splice(1,0,m),h=-1;const w=[];for(;++h "),i.shift(2);const a=t.indentLines(t.containerFlow(e,i.current()),RBn);return s(),a}function RBn(e,n,t){return">"+(t?"":" ")+e}function MBn(e,n){return BR(e,n.inConstruct,!0)&&!BR(e,n.notInConstruct,!1)}function BR(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 OBn(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 DBn(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 LBn(e,n,t,r){const s=DBn(t),i=e.value||"",a=s==="`"?"GraveAccent":"Tilde";if(OBn(e,t)){const f=t.enter("codeIndented"),p=t.indentLines(i,IBn);return f(),p}const o=t.createTracker(r),c=s.repeat(Math.max(MH(i,s)+1,3)),u=t.enter("codeFenced");let h=o.move(c);if(e.lang){const f=t.enter(`codeFencedLang${a}`);h+=o.move(t.safe(e.lang,{before:h,after:" ",encode:["`"],...o.current()})),f()}if(e.lang&&e.meta){const f=t.enter(`codeFencedMeta${a}`);h+=o.move(" "),h+=o.move(t.safe(e.meta,{before:h,after:` `,encode:["`"],...o.current()})),f()}return h+=o.move(` `),i&&(h+=o.move(i+` -`)),h+=o.move(c),u(),h}function J$n(e,n,t){return(t?"":" ")+e}function LC(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 eBn(e,n,t,r){const s=LC(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 tBn(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 J0(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pb(e,n,t){const r=Mh(e),s=Mh(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}}OH.peek=nBn;function OH(e,n,t,r){const s=tBn(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),h=pb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=J0(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=pb(r.after.charCodeAt(0),f,s);p.inside&&(c=c.slice(0,-1)+J0(f));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function nBn(e,n,t){return t.options.emphasis||"*"}function rBn(e,n){let t=!1;return dC(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,B5}),!!((!e.depth||e.depth<3)&&aC(e)&&(n.options.setext||t))}function sBn(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(rBn(e,t)){const h=t.enter("headingSetext"),f=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` +`)),h+=o.move(c),u(),h}function IBn(e,n,t){return(t?"":" ")+e}function LC(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 $Bn(e,n,t,r){const s=LC(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 BBn(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 J0(e){return"&#x"+e.toString(16).toUpperCase()+";"}function pb(e,n,t){const r=Mh(e),s=Mh(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}}OH.peek=PBn;function OH(e,n,t,r){const s=BBn(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),h=pb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=J0(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=pb(r.after.charCodeAt(0),f,s);p.inside&&(c=c.slice(0,-1)+J0(f));const m=a.move(s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function PBn(e,n,t){return t.options.emphasis||"*"}function FBn(e,n){let t=!1;return dC(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return t=!0,$5}),!!((!e.depth||e.depth<3)&&aC(e)&&(n.options.setext||t))}function HBn(e,n,t,r){const s=Math.max(Math.min(6,e.depth||1),1),i=t.createTracker(r);if(FBn(e,t)){const h=t.enter("headingSetext"),f=t.enter("phrasing"),p=t.containerPhrasing(e,{...i.current(),before:` `,after:` `});return f(),h(),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=J0(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),c(),o(),u}DH.peek=iBn;function DH(e){return e.value||""}function iBn(){return"<"}LH.peek=aBn;function LH(e,n,t,r){const s=LC(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 aBn(){return"!"}IH.peek=oBn;function IH(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 h=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==f?c+=o.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function oBn(){return"!"}$H.peek=cBn;function $H(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))}PH.peek=lBn;function PH(e,n,t,r){const s=LC(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,c;if(BH(e,t)){const h=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=h,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 lBn(e,n,t){return BH(e,t)?"<":"["}FH.peek=uBn;function FH(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 h=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==f?c+=o.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function uBn(){return"["}function IC(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 _Bn(e){const n=IC(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 fBn(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 HH(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 dBn(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?fBn(t):IC(t);const o=e.ordered?a==="."?")":".":_Bn(t);let c=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.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),HH(t)===a&&h){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()),h);return c(),u;function h(f,p,m){return p?(m?"":" ".repeat(a))+f:(m?i:i+" ".repeat(a-i.length))+f}}function mBn(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const gBn=qm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vBn(e,n,t,r){return(e.children.some(function(a){return gBn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function bBn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}qH.peek=yBn;function qH(e,n,t,r){const s=bBn(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),h=pb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=J0(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=pb(r.after.charCodeAt(0),f,s);p.inside&&(c=c.slice(0,-1)+J0(f));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function yBn(e,n,t){return t.options.strong||"*"}function xBn(e,n,t,r){return t.safe(e.value,r)}function wBn(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 kBn(e,n,t){const r=(HH(t)+(t.options.ruleSpaces?" ":"")).repeat(wBn(t));return t.options.ruleSpaces?r.slice(0,-1):r}const UH={blockquote:V$n,break:BR,code:Z$n,definition:eBn,emphasis:OH,hardBreak:BR,heading:sBn,html:DH,image:LH,imageReference:IH,inlineCode:$H,link:PH,linkReference:FH,list:dBn,listItem:pBn,paragraph:mBn,root:vBn,strong:qH,text:xBn,thematicBreak:kBn};function SBn(){return{enter:{table:CBn,tableData:PR,tableHeader:PR,tableRow:NBn},exit:{codeText:zBn,table:EBn,tableData:y4,tableHeader:y4,tableRow:y4}}}function CBn(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 EBn(e){this.exit(e),this.data.inTable=void 0}function NBn(e){this.enter({type:"tableRow",children:[]},e)}function y4(e){this.exit(e)}function PR(e){this.enter({type:"tableCell",children:[]},e)}function zBn(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,jBn));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function jBn(e,n){return n==="|"?n:e}function ABn(e){const n=e||{},t=n.tableCellPadding,r=n.tablePipeAlign,s=n.stringLength,i=t?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:` +`,...i.current()});return/^[\t ]/.test(u)&&(u=J0(u.charCodeAt(0))+u.slice(1)),u=u?a+" "+u:a,t.options.closeAtx&&(u+=" "+a),c(),o(),u}DH.peek=qBn;function DH(e){return e.value||""}function qBn(){return"<"}LH.peek=UBn;function LH(e,n,t,r){const s=LC(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 UBn(){return"!"}IH.peek=GBn;function IH(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 h=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==f?c+=o.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function GBn(){return"!"}$H.peek=VBn;function $H(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))}PH.peek=KBn;function PH(e,n,t,r){const s=LC(t),i=s==='"'?"Quote":"Apostrophe",a=t.createTracker(r);let o,c;if(BH(e,t)){const h=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=h,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 KBn(e,n,t){return BH(e,t)?"<":"["}FH.peek=WBn;function FH(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 h=t.stack;t.stack=[],a=t.enter("reference");const f=t.safe(t.associationId(e),{before:c,after:"]",...o.current()});return a(),t.stack=h,i(),s==="full"||!u||u!==f?c+=o.move(f+"]"):s==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function WBn(){return"["}function IC(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 QBn(e){const n=IC(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 XBn(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 HH(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 YBn(e,n,t,r){const s=t.enter("list"),i=t.bulletCurrent;let a=e.ordered?XBn(t):IC(t);const o=e.ordered?a==="."?")":".":QBn(t);let c=n&&t.bulletLastUsed?a===t.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.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),HH(t)===a&&h){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()),h);return c(),u;function h(f,p,m){return p?(m?"":" ".repeat(a))+f:(m?i:i+" ".repeat(a-i.length))+f}}function ePn(e,n,t,r){const s=t.enter("paragraph"),i=t.enter("phrasing"),a=t.containerPhrasing(e,r);return i(),s(),a}const tPn=qm(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function nPn(e,n,t,r){return(e.children.some(function(a){return tPn(a)})?t.containerPhrasing:t.containerFlow).call(t,e,r)}function rPn(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}qH.peek=sPn;function qH(e,n,t,r){const s=rPn(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),h=pb(r.before.charCodeAt(r.before.length-1),u,s);h.inside&&(c=J0(u)+c.slice(1));const f=c.charCodeAt(c.length-1),p=pb(r.after.charCodeAt(0),f,s);p.inside&&(c=c.slice(0,-1)+J0(f));const m=a.move(s+s);return i(),t.attentionEncodeSurroundingInfo={after:p.outside,before:h.outside},o+c+m}function sPn(e,n,t){return t.options.strong||"*"}function iPn(e,n,t,r){return t.safe(e.value,r)}function aPn(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 oPn(e,n,t){const r=(HH(t)+(t.options.ruleSpaces?" ":"")).repeat(aPn(t));return t.options.ruleSpaces?r.slice(0,-1):r}const UH={blockquote:TBn,break:PR,code:LBn,definition:$Bn,emphasis:OH,hardBreak:PR,heading:HBn,html:DH,image:LH,imageReference:IH,inlineCode:$H,link:PH,linkReference:FH,list:YBn,listItem:JBn,paragraph:ePn,root:nPn,strong:qH,text:iPn,thematicBreak:oPn};function cPn(){return{enter:{table:lPn,tableData:FR,tableHeader:FR,tableRow:_Pn},exit:{codeText:fPn,table:uPn,tableData:b4,tableHeader:b4,tableRow:b4}}}function lPn(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 uPn(e){this.exit(e),this.data.inTable=void 0}function _Pn(e){this.enter({type:"tableRow",children:[]},e)}function b4(e){this.exit(e)}function FR(e){this.enter({type:"tableCell",children:[]},e)}function fPn(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,dPn));const t=this.stack[this.stack.length-1];t.type,t.value=n,this.exit(e)}function dPn(e,n){return n==="|"?n:e}function hPn(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(h(m,k,v),m.align)}function o(m,w,k,v){const b=f(m,k,v),y=u([b]);return y.slice(0,y.indexOf(` -`))}function c(m,w,k,v){const b=k.enter("tableCell"),y=k.enter("phrasing"),x=k.containerPhrasing(m,{...v,before:i,after:i});return y(),b(),x}function u(m,w){return G$n(m,{align:w,alignDelimiters:r,padding:t,stringLength:s})}function h(m,w,k){const v=m.children;let b=-1;const y=[],x=w.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const WBn={tokenize:nPn,partial:!0};function QBn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:JBn,continuation:{tokenize:ePn},exit:tPn}},text:{91:{name:"gfmFootnoteCall",tokenize:ZBn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:XBn,resolveTo:YBn}}}}function XBn(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=mo(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 YBn(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 ZBn(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(mo(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?h:u}function h(f){return f===91||f===92||f===93?(e.consume(f),i++,u):u(f)}}function JBn(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",h):t(w)}function h(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=mo(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:h}function f(w){return w===91||w===92||w===93?(e.consume(w),a++,h):h(w)}function p(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),s.includes(i)||s.push(i),Sn(e,m,"gfmFootnoteDefinitionWhitespace")):t(w)}function m(w){return n(w)}}function ePn(e,n,t){return e.check(Hm,n,e.attempt(WBn,n,t))}function tPn(e){e.exit("gfmFootnoteDefinition")}function nPn(e,n,t){const r=this;return Sn(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 rPn(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"),b=Mh(w);return v._open=!b||b===2&&!!k,v._close=!k||k===2&&!!b,o(w)}}}class sPn{constructor(){this.map=[]}add(n,t,r){iPn(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 iPn(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const U=r.events[I][1].type;if(U==="lineEnding"||U==="linePrefix")I--;else break}const B=I>-1?r.events[I][1].type:null,G=B==="tableHead"||B==="tableRow"?j:c;return G===j&&r.parser.lazy[r.now().line]?t(D):G(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(a=!0,i+=1),h(D)}function h(D){return D===null?t(D):Dt(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),m):t(D):jn(D)?Sn(e,h,"whitespace")(D):(i+=1,a&&(a=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),f(D)))}function f(D){return D===null||D===124||wr(D)?(e.exit("data"),h(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,jn(D)?Sn(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 jn(D)?Sn(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"),b):D===45?(i+=1,b(D)):D===null||Dt(D)?C(D):N(D)}function b(D){return D===45?(e.enter("tableDelimiterFiller"),y(D)):N(D)}function y(D){return D===45?(e.consume(D),y):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(D))}function x(D){return jn(D)?Sn(e,C,"whitespace")(D):C(D)}function C(D){return D===124?w(D):D===null||Dt(D)?!a||s!==i?N(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):N(D)}function N(D){return t(D)}function j(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||Dt(D)?(e.exit("tableRow"),n(D)):jn(D)?Sn(e,A,"whitespace")(D):(e.enter("data"),z(D))}function z(D){return D===null||D===124||wr(D)?(e.exit("data"),A(D)):(e.consume(D),D===92?M:z)}function M(D){return D===92||D===124?(e.consume(D),z):z(D)}}function lPn(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,h,f;const p=new sPn;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({},Bd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function HR(e,n,t,r,s){const i=[],a=Bd(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 Bd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const uPn={name:"tasklistCheck",tokenize:fPn};function _Pn(){return{text:{91:uPn}}}function fPn(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 Dt(c)?n(c):jn(c)?e.check({tokenize:dPn},n,t)(c):t(c)}}function dPn(e,n,t){return Sn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function hPn(e){return PP([BBn(),QBn(),rPn(e),oPn(),_Pn()])}const pPn={};function JH(e){const n=this,t=e||pPn,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(hPn(t)),i.push(DBn()),a.push(LBn(t))}function mPn(){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,""),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u;const f=h.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(),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u,h.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 gPn(e){let n=(e||{}).singleDollarTextMath;return n==null&&(n=!0),r.peek=s,{unsafe:[{character:"\r",inConstruct:"mathFlowMeta"},{character:` +`))}function c(m,w,k,v){const b=k.enter("tableCell"),y=k.enter("phrasing"),x=k.containerPhrasing(m,{...v,before:i,after:i});return y(),b(),x}function u(m,w){return jBn(m,{align:w,alignDelimiters:r,padding:t,stringLength:s})}function h(m,w,k){const v=m.children;let b=-1;const y=[],x=w.enter("table");for(;++b0&&!t&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),t}const RPn={tokenize:PPn,partial:!0};function MPn(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:IPn,continuation:{tokenize:$Pn},exit:BPn}},text:{91:{name:"gfmFootnoteCall",tokenize:LPn},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:OPn,resolveTo:DPn}}}}function OPn(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=mo(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 DPn(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 LPn(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(mo(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?h:u}function h(f){return f===91||f===92||f===93?(e.consume(f),i++,u):u(f)}}function IPn(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",h):t(w)}function h(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=mo(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:h}function f(w){return w===91||w===92||w===93?(e.consume(w),a++,h):h(w)}function p(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),s.includes(i)||s.push(i),Sn(e,m,"gfmFootnoteDefinitionWhitespace")):t(w)}function m(w){return n(w)}}function $Pn(e,n,t){return e.check(Hm,n,e.attempt(RPn,n,t))}function BPn(e){e.exit("gfmFootnoteDefinition")}function PPn(e,n,t){const r=this;return Sn(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 FPn(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"),b=Mh(w);return v._open=!b||b===2&&!!k,v._close=!k||k===2&&!!b,o(w)}}}class HPn{constructor(){this.map=[]}add(n,t,r){qPn(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 qPn(e,n,t,r){let s=0;if(!(t===0&&r.length===0)){for(;s-1;){const q=r.events[I][1].type;if(q==="lineEnding"||q==="linePrefix")I--;else break}const B=I>-1?r.events[I][1].type:null,G=B==="tableHead"||B==="tableRow"?j:c;return G===j&&r.parser.lazy[r.now().line]?t(D):G(D)}function c(D){return e.enter("tableHead"),e.enter("tableRow"),u(D)}function u(D){return D===124||(a=!0,i+=1),h(D)}function h(D){return D===null?t(D):Dt(D)?i>1?(i=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),m):t(D):jn(D)?Sn(e,h,"whitespace")(D):(i+=1,a&&(a=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),f(D)))}function f(D){return D===null||D===124||wr(D)?(e.exit("data"),h(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,jn(D)?Sn(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 jn(D)?Sn(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"),b):D===45?(i+=1,b(D)):D===null||Dt(D)?C(D):N(D)}function b(D){return D===45?(e.enter("tableDelimiterFiller"),y(D)):N(D)}function y(D){return D===45?(e.consume(D),y):D===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),x):(e.exit("tableDelimiterFiller"),x(D))}function x(D){return jn(D)?Sn(e,C,"whitespace")(D):C(D)}function C(D){return D===124?w(D):D===null||Dt(D)?!a||s!==i?N(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(D)):N(D)}function N(D){return t(D)}function j(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||Dt(D)?(e.exit("tableRow"),n(D)):jn(D)?Sn(e,A,"whitespace")(D):(e.enter("data"),z(D))}function z(D){return D===null||D===124||wr(D)?(e.exit("data"),A(D)):(e.consume(D),D===92?M:z)}function M(D){return D===92||D===124?(e.consume(D),z):z(D)}}function KPn(e,n){let t=-1,r=!0,s=0,i=[0,0,0,0],a=[0,0,0,0],o=!1,c=0,u,h,f;const p=new HPn;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({},Bd(n.events,s)),e.add(s,0,[["exit",i,n]]),i=void 0),i}function qR(e,n,t,r,s){const i=[],a=Bd(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 Bd(e,n){const t=e[n],r=t[0]==="enter"?"start":"end";return t[1][r]}const WPn={name:"tasklistCheck",tokenize:XPn};function QPn(){return{text:{91:WPn}}}function XPn(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 Dt(c)?n(c):jn(c)?e.check({tokenize:YPn},n,t)(c):t(c)}}function YPn(e,n,t){return Sn(e,r,"whitespace");function r(s){return s===null?t(s):n(s)}}function ZPn(e){return PP([kPn(),MPn(),FPn(e),GPn(),QPn()])}const JPn={};function JH(e){const n=this,t=e||JPn,r=n.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),i=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(ZPn(t)),i.push(bPn()),a.push(yPn(t))}function eFn(){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,""),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u;const f=h.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(),h=this.stack[this.stack.length-1];h.type,this.exit(c),h.value=u,h.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 tFn(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||"",h=o.createTracker(c),f="$".repeat(Math.max(MH(u,"$")+1,2)),p=o.enter("mathFlow");let m=h.move(f);if(i.meta){const w=o.enter("mathFlowMeta");m+=h.move(o.safe(i.meta,{after:` `,before:m,encode:["$"],...h.current()})),w()}return m+=h.move(` `),u&&(m+=h.move(u+` -`)),m+=h.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 h="$".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 pk(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 zPn(e,n){const t=e[n];if(t!=="`"&&t!=="~"||em(e,n)||Bh(e,n,t)<3)return!1;const r=e.lastIndexOf(` +`)),m+=h.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 h="$".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 hk(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 fFn(e,n){const t=e[n];if(t!=="`"&&t!=="~"||em(e,n)||Bh(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=pk(i);return a.indentation<=3&&r+a.offset===n}function jPn(e,n){const t=e[n],r=Bh(e,n,t),s=e.lastIndexOf(` +`,n),i=e.slice(r,s===-1?e.length:s),a=hk(i);return a.indentation<=3&&r+a.offset===n}function dFn(e,n){const t=e[n],r=Bh(e,n,t),s=e.lastIndexOf(` `,n-1)+1,i=e.indexOf(` -`,n),a=pk(e.slice(s,i===-1?e.length:i));let o=e.indexOf(` +`,n),a=hk(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&&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 APn(e,n,t){const r=Bh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function RPn(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 OPn(e,{predictMath:n=!1}={}){const t=RPn(e),r=new Set,s=new Set;for(let u=0;u=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 hFn(e,n,t){const r=Bh(e,n,"`");let s=n+r;for(;s")return s+1}return t?e.length:null}function mFn(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 vFn(e,{predictMath:n=!1}={}){const t=mFn(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}`)),OPn(t,n)}function nq(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 IPn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function Wr(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=IPn(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const rq=T.createContext(void 0);function sq({projectId:e,sessionId:n,children:t}){const r=T.useMemo(()=>(i,a=!1)=>{if(/^(https?:)?\/\//i.test(i))return i;const o=cF(i);return o?(o.source==="absolute"?DI(o.path):o.source==="artifact"&&!a?df(e,o.path):K3(e,o.source==="artifact"?`artifacts/${o.path}`:o.path,{sessionId:n??void 0}))+o.hash:null},[e,n]),s=T.useMemo(()=>({sessionId:n??void 0}),[n]);return _.jsx(rq,{value:r,children:_.jsx(uy,{value:s,children:t})})}function $Pn({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}),[h,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=h.width&&c.width?Math.min(1,c.width*.9/h.width,c.height*.9/h.height):1;return si.createPortal(_.jsxs("dialog",{ref:s,tabIndex:-1,"aria-label":n||hL(),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:h.width?{width:h.width*p*a,height:h.height*p*a}:void 0,className:`pointer-events-auto block m-auto shrink-0 max-w-none rounded-lg shadow-modal ${h.width&&c.width?"visible":"invisible"}`})})}),_.jsxs("div",{className:"absolute top-5 right-5 flex gap-2",children:[_.jsx(Wh,{shape:"circle",href:e,download:t||!0,"aria-label":M3(),title:M3(),className:"bg-background shadow-popover",children:_.jsx(Wb,{size:16})}),_.jsx(It,{shape:"circle",onClick:r,"aria-label":q3(),title:q3(),className:"bg-background shadow-popover",children:_.jsx(xr,{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(It,{shape:"circle",disabled:a<=.25,onClick:()=>o(m=>Math.max(.25,m-.25)),"aria-label":Cz(),title:Cz(),children:_.jsx(I7n,{size:16})}),_.jsxs(Ie,{variant:"ghost",className:"min-w-16 tabular-nums",onClick:()=>o(1),title:Ez(),"aria-label":Ez(),children:[Math.round(a*100),"%"]}),_.jsx(It,{shape:"circle",disabled:a>=4,onClick:()=>o(m=>Math.min(4,m+.25)),"aria-label":Sz(),title:Sz(),children:_.jsx(Qh,{size:16})})]})]})]}),document.body)}function BPn({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:h=>{h.preventDefault(),h.stopPropagation(),c(!0)},onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),h.stopPropagation(),c(!0))},onError:!i&&n&&n!==e?()=>a(!0):void 0}),o&&u&&_.jsx($Pn,{src:u,alt:r,name:t,onClose:()=>c(!1)})]})}const PPn=1e5;function FPn({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(It,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:SS(),"aria-label":frt(),onClick:s,children:t?_.jsx(bi,{size:13}):_.jsx(Yu,{size:13})}),_.jsx("pre",{children:_.jsx("code",{children:AEn(e,n,PPn)})})]})}function HPn(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 KR(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=HPn(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:w4(e,s,a.index)});const h=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:c},position:w4(e,a.index,h),type:o==="run"?"runMention":"fileMention"}),s=h}return i?(siq(e)}function WR({path:e,line:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,i=n!=null?`${s}:${n}`:s,a=XEn(e,t),o=Wr(c=>r==null?void 0:r(e,n,t,void 0,c));return _.jsxs(_.Fragment,{children:[_.jsxs("button",{className:"file-chip",title:r?HZ({path:Ce(e)}):e,...o,...a.handlers,onKeyDown:c=>{var u,h;(h=(u=a.handlers).onKeyDown)==null||h.call(u,c),c.defaultPrevented||o.onKeyDown(c)},disabled:!r,children:[_.jsx(O$,{size:12}),_.jsx("span",{className:"file-chip-label",children:i}),_.jsx(F$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]}),a.menu&&_.jsx(YEn,{...a.menu,onOpen:()=>r==null?void 0:r(e,n,t,void 0,"keepOpen")})]})}function UPn({id:e,label:n,onOpenRun:t}){return _.jsxs("button",{className:"file-chip run-chip",title:t?pJ({id:Ce(e)}):mee({id:Ce(e)}),...Wr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[_.jsx(VS,{size:12}),_.jsx("span",{className:"file-chip-label",children:n||NI()}),_.jsx(F$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const aq={singleDollarTextMath:!0},GPn=Ty().use(zy).use(JH).use(eq,aq).use(NPn).use(qPn).use(ob).use(vOn).use(zH);function KPn(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const oq={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?v5(i[1]):null;return _.jsx(FPn,{code:a,lang:c})},pre:({children:e})=>_.jsx(_.Fragment,{children:e})};function VPn({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}){Qu();const o=T.useContext(rq),c=i??o,u=T.useMemo(()=>({"file-mention":h=>{const f=U5(h.path),p=h.lines&&gOn(h.lines)||f.line;return _.jsx(WR,{path:f.path,line:p,exp:h.exp,onOpenFile:t})},"run-mention":h=>_.jsx(UPn,{id:h.id,label:h.label,onOpenRun:r}),a:({node:h,href:f,children:p,"data-figure-src":m,"data-cited-href":w,...k})=>{const v=typeof m=="string"?cF(m):null;if(v&&t){const x=v.source==="artifact"?`artifacts/${v.path}`:v.path,C=s?s(x):x;if(C)return _.jsx("button",{type:"button",className:"text-primary underline cursor-pointer text-start",...Wr(N=>t(C,void 0,void 0,void 0,N)),children:p})}const b=typeof w=="string"?w:f,y=b?U5(b):null;if(y&&KPn(y.path)&&t){let x;try{x=decodeURI(y.path)}catch{return _.jsx("span",{children:p})}const C=s?s(x):x;return C?_.jsx(WR,{path:C,line:y.line,onOpenFile:t}):_.jsx("span",{children:p})}return _.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",...k,children:p})},figure:({children:h})=>_.jsx(VPn,{children:h}),figcaption:({children:h})=>_.jsx("figcaption",{className:"mt-3 text-sm italic leading-relaxed text-text",children:h}),th:({node:h,...f})=>_.jsx("th",{dir:"auto",...f}),td:({node:h,...f})=>_.jsx("td",{dir:"auto",...f}),img:({node:h,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(BPn,{...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},...oq}),[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(BDn,{content:nq(n,{predictMath:a}),processor:GPn,components:u,predict:a})})}),QR="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function WPn({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,c]=T.useState(!1),u=T.useRef(null),[h,f]=T.useState(!1),[p,m]=T.useState(""),w=T.useRef(null);T.useEffect(()=>{if(!o)return;const v=b=>{u.current&&!u.current.contains(b.target)&&c(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),T.useEffect(()=>{var v;h&&((v=w.current)==null||v.focus())},[h]);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(VS,{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?z4t({agent:Ce(n)}):x4t({agent:Ce(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",...Wr(t),children:W4t()})]}),h?_.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:w3t(),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:QR,children:[_.jsx(Ie,{size:"small",onClick:()=>{m(""),f(!1)},children:GL()}),_.jsx("span",{className:"plan-strip-spacer flex-1"}),_.jsxs(Ie,{size:"small",variant:"primary",onClick:k,children:[c3t(),_.jsx(M$,{size:13})]})]})]}):_.jsxs("div",{className:QR,children:[_.jsx(Ie,{size:"small",onClick:i,children:t3t()}),_.jsx(Ie,{size:"small",onClick:()=>f(!0),children:p3t()}),_.jsx("span",{className:"plan-strip-spacer flex-1"}),s?_.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[_.jsx(Ie,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:e4t()}),_.jsx(Ie,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":F4t(),onClick:()=>c(v=>!v),children:_.jsx(mc,{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(vn,{onClick:()=>{c(!1),r("bypassPermissions")},children:o4t()})})]}):_.jsx(Ie,{size:"small",variant:"primary",onClick:()=>r(),children:h4t()})]})]})}function XR({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,h]=T.useState(null);async function f(p){if(p.preventDefault(),!(o||!i.trim())){c(!0),h(null);try{n(await e(i.trim())),a("")}catch(m){h(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(Ie,{type:"submit",disabled:o||!i.trim(),children:o?Sa():pc()}),_.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??TQe()}),u&&_.jsx("div",{className:"error",children:u})]})}function cq({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 QPn({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:[Adn(),_.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:oI()},...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),d5n(r||null).catch(s=>{Zt(s instanceof Error?s.message:String(s),"error")}).finally(()=>t(!1))}})})]})}function XPn({host:e,connecting:n,reference:t,onChange:r}){const s=T.useId(),i=pn({mutationFn:f5n,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:LL()}),_.jsxs("div",{className:"mt-3 grid max-w-xl gap-3",children:[_.jsxs("label",{className:"text-sm text-subtext",children:[Ydn(),_.jsx(lc,{variant:"field",dropDown:!0,value:t!==null?"container":"host",disabled:n,choices:[{id:"host",label:Idn()},{id:"container",label:Udn()}],onSelect:o=>a(o==="container"?"":null)})]}),t!==null&&_.jsxs("label",{className:"text-sm text-subtext",htmlFor:`${s}-container`,children:[kdn(),_.jsx(Br,{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 fc=["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(" "),yf=["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(" "),YPn=["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(" "),Gy="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",Ua=["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(" "),BC=["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(" "),dl=["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(" "),mk=["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(" "),N0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),jd=["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(" "),ZPn=new Set(["gh auth login","hf auth login","claude auth status"]);function lq(e){return ZPn.has(e)?`/api/settings/commands/run?command=${encodeURIComponent(e)}`:void 0}function Ky(){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 PC({note:e,className:n,disabled:t,resolve:r=lq,onRun:s}){return e?_.jsx("p",{className:n,children:Fu(e,{canRun:i=>!t&&r(i)!==void 0,onRun:i=>{const a=r(i);a&&s(i,a)}})}):null}function Vy({run:e,onComplete:n,onClose:t}){return e?_.jsx($8n,{path:e.path,label:e.command,onComplete:n,onError:r=>Zt(r,"error"),onClose:t},`${e.command}-${e.attempt}`):null}function k4(e){return e.catalogPending?{cls:"warn",variant:"warning",label:_f()}:e.authCheckFailed?{cls:"warn",variant:"warning",label:Bv()}:e.agentReady&&!e.authenticated&&e.authMethod!=="local"?{cls:"warn",variant:"warning",label:$L()}:e.agentReady?{cls:"ok",variant:"success",label:e.authMethod==="thirdParty"||ny(e)?Rm():e.authMethod==="local"?ES():kJt()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:EUt()}:e.authMethod==="local"?{cls:"warn",variant:"warning",label:BL()}:e.needsConfigRepair||e.authState==="unknown"?{cls:"warn",variant:"warning",label:Bv()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:Itn()}:{cls:"warn",variant:"warning",label:cI()}:{cls:"warn",variant:"warning",label:YWt()}}function JPn({h:e}){if(e.id==="opencode"&&e.agentReady&&!e.authenticated&&!e.authMethod)return _.jsx(_.Fragment,{children:oMt()});const n=ny(e);return n?_.jsx(_.Fragment,{children:n}):e.authMethod?e.authMethod==="local"?_.jsx(_.Fragment,{children:$v()}):e.authMethod==="thirdParty"?_.jsx(_.Fragment,{children:pI()}):_.jsx(_.Fragment,{children:e.authMethod==="oauth"?h$t():CS()}):_.jsx(_.Fragment,{children:"—"})}function eFn(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 tFn({remote:e}){const n=Bu(),{data:t=null}=ut(n),[r,s]=T.useState(null),[i,a]=T.useState(!1),o=Ky(),[c,u]=T.useState(null),h=ut(XI()),f=(w,k=!1)=>{a(!0),hf(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:F3()}),!e&&c&&h.data&&_.jsx(iB,{harness:c,commands:h.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:F3(),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(Th,{harness:k.id})},renderLabel:w=>{const k=p.find(b=>b.id===w.id),v=k&&k4(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:fc,children:[_.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[_.jsx(Wt,{variant:k4(m).variant,children:k4(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(Ie,{size:"small",onClick:()=>u(m),disabled:!h.data,"aria-haspopup":"dialog",children:[_.jsx(Mf,{size:14})," ",AL()]}),_.jsxs(Ie,{size:"small",onClick:()=>f(!0,!0),disabled:i,children:[_.jsx(Va,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),_.jsxs("div",{className:Ns(yf,"[&_.v]:text-sm"),children:[_.jsx("span",{className:"k",children:VBt()}),_.jsx("span",{className:"v",children:m.binPath??FIt()}),_.jsx("span",{className:"k",children:hI()}),_.jsx("span",{className:"v",children:m.version??"—"}),_.jsx("span",{className:"k",children:hBt()}),_.jsx("span",{className:"v",children:_.jsx(JPn,{h:m})}),m.account&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:m.id==="opencode"?pI():AS()}),_.jsx("span",{className:"v",children:m.account})]}),m.org&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:lXt()}),_.jsx("span",{className:"v",children:m.org})]}),m.plan&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:uYt()}),_.jsx("span",{className:"v",children:m.plan})]}),_.jsx("span",{className:"k",children:tBt()}),_.jsx("span",{className:"v",children:m.catalogPending?_f():m.models.length>0?OLt({count:Jt(m.models.length),models:new Intl.ListFormat(E()).format(m.models.slice(0,4).map(w=>Ce(nv(w))))}):m.agentReady?O3():jS()})]}),_.jsx(PC,{note:m.agentNote,className:Ns(Ua,"text-sm"),disabled:e,resolve:w=>{var k;return eFn(m,(k=h.data)==null?void 0:k[m.id],w)??lq(w)},onRun:(w,k)=>o.start(w,k,m.id)}),o.run&&_.jsx("div",{hidden:o.run.owner!==m.id,children:_.jsx(Vy,{run:o.run,onComplete:()=>f(!0,!0),onClose:o.clear})}),m.id==="opencode"&&_.jsx(uB,{installed:m.installed})]}):null:_.jsxs(Pr,{children:[_.jsx(St,{})," ",FHt()]})]})}function nFn({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?_.jsx(Wt,{variant:"success",children:bFt()}):_.jsx(Wt,{variant:"error",children:YVt()}):_.jsx(Wt,{variant:"error",children:JPt()}):_.jsx(Wt,{variant:"error",children:dGt()})}function rFn({onEditState:e}){var A;const n=pn({mutationFn:r5n}),t=Sj(),r=ut(t),s=r.data??null,i=z=>{Vr(t.queryKey,M=>(typeof z=="function"?z(M??null):z)??void 0)},a=s?null:((A=r.error)==null?void 0:A.message)??null,[o,c]=T.useState(""),[u,h]=T.useState(""),[f,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(null),b=z=>{i(z),c(z.context??""),h(z.namespace)},y=T.useRef(null);T.useEffect(()=>{const z=y.current;y.current=s,s&&(!z||o===(z.context??"")&&u.trim()===z.namespace)&&(c(s.context??""),h(s.namespace??""))},[s,o,u]);const x=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!x;T.useEffect(()=>{e==null||e({dirty:C,saving:f})},[C,f,e]);async function N(){if(!(m||f||!x)){w(!0);try{await tt.fetchQuery({...Sj(),staleTime:0})}catch(z){Zt(z instanceof Error?z.message:String(z),"error")}finally{w(!1)}}}async function j(z){if(z.preventDefault(),!(f||m)){p(!0),v(null);try{b(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:Vh()}),_.jsx("dd",{className:"m-0",children:m||f?_.jsx(Wt,{children:ya()}):C?_.jsx(Wt,{children:EL()}):_.jsx(nFn,{s})})]}),x&&!m&&!f&&s.preflight.error&&_.jsx("p",{className:`${Gy} break-words`,children:s.preflight.error}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:j,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[EFt(),_.jsx(lc,{choices:[{id:"",label:s.currentContext?vDt({context:Ce(s.currentContext)}):_Dt()},...o&&!s.contexts.includes(o)?[{id:o,label:WIt({context:Ce(o)})}]:[],...s.contexts.map(z=>({id:z,label:z}))],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:[nVt(),_.jsx(Br,{type:"text",value:u,disabled:f||m,onChange:z=>h(z.target.value),placeholder:hHt(),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(Ie,{type:"button",onClick:()=>void N(),disabled:f||m||!x,children:[_.jsx(Va,{size:13})," ",m?ya():Am()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:f||m||x,children:f?Sa():pc()})]})]})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",yPt()]})})}function sFn(){var x;const e=pn({mutationFn:C=>i5n(...C)}),n=Cj(),t=ut(n),r=t.data??null,s=C=>{Vr(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,a]=T.useState(null),o=i??((x=t.error)==null?void 0:x.message)??null,[c,u]=T.useState(""),[h,f]=T.useState(""),[p,m]=T.useState(!1),w=t.isPending||p,[k,v]=T.useState(!1);async function b(){if(!(w||k)){m(!0),a(null);try{await tt.fetchQuery({...Cj(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function y(C){if(C.preventDefault(),!(!c.trim()||!h.trim()||w||k||r!=null&&r.processEnv)){v(!0),a(null);try{s(await e.mutateAsync([c.trim(),h.trim()])),u(""),f("")}catch(N){a(N instanceof Error?N.message:String(N))}finally{v(!1)}}}return _.jsxs(_.Fragment,{children:[!r&&w?_.jsxs(Pr,{children:[_.jsx(St,{})," ",NPt()]}):r&&_.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[_.jsx("dt",{className:"font-medium text-subtext",children:Vh()}),_.jsx("dd",{className:"m-0",children:_.jsx(Wt,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?Rm():Hb()})})]}),(r==null?void 0:r.processEnv)&&_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:KDt()}),_.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:[r!=null&&r.tokenConfigured?JDt():yLt(),_.jsx(Br,{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?aLt():NLt(),_.jsx(Br,{type:"password",value:h,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:dLt()}),o&&_.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(Ie,{type:"button",disabled:w||k,onClick:()=>void b(),children:[_.jsx(Va,{size:13})," ",Mm()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!c.trim()||!h.trim()||w||k||(r==null?void 0:r.processEnv),children:k?Sa():pc()})]})]})]})}const uq="rounded-sm border-border-strong bg-surface text-subtext",_q="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",iFn=5e3;function fq(e){const n=yi(),t=e.map(a=>Ej(a)),r=YV({queries:t.map(a=>({...a,refetchInterval:iFn}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{zn(n)&&Vr(Ej(a).queryKey,{running:!0})}]}function aFn({test:e,connecting:n,masterRunning:t,containerFailed:r=!1}){if(n)return _.jsx("span",{role:"status",children:_.jsx(Wt,{className:_q,children:YL()})});if(e===void 0)return _.jsx(Wt,{className:uq,children:aI()});const s=e.missingTools??[],i=e.reachable&&e.toolsFound&&t===!1,a=!e.reachable||r?_.jsx(Wt,{className:"rounded-sm",variant:"error",children:TS()}):e.toolsFound?i?_.jsx(Wt,{className:"rounded-sm",variant:"warning",children:ZL()}):_.jsx(Wt,{className:"rounded-sm",variant:"success",children:Tm()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:s.length===1?FLt({tool:Ce(s[0])}):WLt()});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:vo(e.testedAt)})]})}function oFn(){var D;const e=QI(),n=ut(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),[h,f]=T.useState(!1),[p,m]=T.useState({}),[w,k]=T.useState(null),[v,b]=T.useState(!1),[y,x]=T.useState(0),C=(t==null?void 0:t.filter(I=>{const B=i[I.host]??I.lastTest;return(B==null?void 0:B.reachable)&&B.toolsFound}).map(I=>I.host))??[],[N,j]=fq(C);function A(I){u.current+=1,f(!1),b(!1),x(B=>B+1),k(I),m(B=>({...B,[I]:!0}))}function z(){u.current+=1,f(!1),b(!1),k(null)}function M(I,B){m(G=>({...G,[I]:!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(QPn,{settings:n.data}),_.jsxs(Ie,{variant:"ghost",className:"ms-auto",onClick:()=>s(!0),children:[_.jsx(WS,{size:14})," ",wI()]})]}),t===null?_.jsxs(Pr,{children:[_.jsx(St,{})," ",uI()]}):t.length===0?_.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:UVt()}):_.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:t.map(I=>{var F,re,ie;const B=o[I.host]===void 0?I.container??null:o[I.host],G=i[I.host],U=B!==null&&((F=G==null?void 0:G.container)==null?void 0:F.reference)===B.trim()?G:void 0,Q=B!==null?U:G!=null&&G.container?I.lastTest:G??I.lastTest,V=(re=U==null?void 0:U.container)==null?void 0:re.error,Z=((ie=U==null?void 0:U.container)==null?void 0:ie.ready)===!1,J=(Q==null?void 0:Q.error)||V,$=w===I.host,L=p[I.host]??!1,q=$||!!J,P=`${I.user?`${I.user}@`:""}${I.hostname??I.host}${I.port?`:${I.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:I.host,children:I.host}),_.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:P,children:P})]})}),_.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(aFn,{test:Q,connecting:$&&!v,masterRunning:N[I.host],containerFailed:Z}),q&&_.jsx("button",{type:"button",className:"flex-none inline-flex items-center p-0.5 rounded-sm [&:hover]:bg-panel","aria-expanded":L,"aria-label":L?cY({name:Ce(I.host)}):WY({name:Ce(I.host)}),onClick:ue=>{ue.stopPropagation(),M(I.host,L)},children:_.jsx(mc,{size:18,className:`text-muted transition-transform duration-120 ease-standard${L?" rotate-180":""}`})})]}),_.jsx(Ie,{size:"small",type:"button",className:"justify-self-end",onClick:ue=>{ue.stopPropagation(),$&&!v?z():A(I.host)},disabled:!$&&(w!==null&&!v||B!==null&&!B.trim()),children:$?v?ni():ff():(Q==null?void 0:Q.reachable)===!1||Z?ni():Q?mI():NS()})]})]}),_.jsx(XPn,{host:I,connecting:$&&!v,reference:B,onChange:ue=>{$&&z(),c(se=>({...se,[I.host]:ue})),a(se=>{const K={...se};return delete K[I.host],K})}}),q&&(L||$)&&_.jsxs("div",{className:`border-t border-t-border-variant py-3${L?"":" hidden"}`,children:[!$&&J&&_.jsx(B8n,{host:I.host,transcript:J}),$&&!h&&_.jsx(ZS,{host:I.host,backend:"ssh",active:L,onComplete:ue=>{if(ue.backend!=="ssh")return;j(I.host);const se=u.current;if(B===null){a(K=>({...K,[I.host]:{...ue.result,container:null}})),b(!1),k(null);return}f(!0),h5n(I.host,B.trim()).then(K=>{u.current===se&&a(oe=>({...oe,[I.host]:{...K,container:K.container??{reference:B.trim(),ready:!1,error:K.error??null}}}))}).catch(K=>{u.current===se&&a(oe=>({...oe,[I.host]:{...ue.result,container:{reference:B.trim(),ready:!1,error:K instanceof Error?K.message:String(K)}}}))}).finally(()=>{u.current===se&&(f(!1),b(!1),k(null))})},onError:ue=>{b(!0),a(se=>({...se,[I.host]:{container:B===null?null:{reference:B.trim(),ready:!1,error:ue},reachable:!1,toolsFound:!1,missingTools:[],error:ue,testedAt:Date.now()}}))}},y)]})]},I.host)})}),r&&_.jsx(DB,{onClose:()=>s(!1)})]})}function cFn({test:e,connecting:n,masterRunning:t}){return n?_.jsx(Wt,{className:_q,children:YL()}):e===null?_.jsx(Wt,{className:uq,children:aI()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?_.jsx(Wt,{className:"rounded-sm",variant:"warning",children:ZL()}):_.jsx(Wt,{className:"rounded-sm",variant:"success",children:Tm()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:zKt()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:CWt()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:TS()})}function lFn(){var J;const e=pn({mutationFn:C5n}),n=Okn(),t=ut(n),r=t.data??null,s=$=>{Vr(n.queryKey,L=>(typeof $=="function"?$(L??null):$)??void 0)},i=r?null:((J=t.error)==null?void 0:J.message)??null,[a,o]=T.useState(""),[c,u]=T.useState(""),[h,f]=T.useState(""),[p,m]=T.useState(""),[w,k]=T.useState(!1),[v,b]=T.useState(null),[y,x]=T.useState(null),[C,N]=T.useState(!1),[j,A]=T.useState(!1),[z,M]=T.useState(0),D=a&&(y!=null&&y.reachable)&&y.slurmFound&&y.toolsFound?[a]:[],[I,B]=fq(D);function G(){A(!1),M($=>$+1),N(!0)}const U=$=>{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??"")&&h.trim()===($.account??"")&&p.trim()===($.timeLimit??""))&&(o(r.host??""),u(r.partition??""),f(r.account??""),m(r.timeLimit??""))},[r,a,c,h,p]);const V=r!==null&&a===(r.host??"")&&c.trim()===(r.partition??"")&&h.trim()===(r.account??"")&&p.trim()===(r.timeLimit??"");async function Z($){if($.preventDefault(),!w){k(!0),b(null);try{U(await e.mutateAsync({host:a,partition:c.trim(),account:h.trim(),timeLimit:p.trim()}))}catch(L){b(L instanceof Error?L.message:String(L))}finally{k(!1)}}}return _.jsx(_.Fragment,{children:i?_.jsx("div",{className:"error",children:i}):r?_.jsxs(_.Fragment,{children:[!C&&(y==null?void 0:y.error)&&_.jsx("p",{className:Gy,children:y.error}),_.jsxs("form",{className:BC,onSubmit:Z,children:[_.jsx("div",{className:"max-w-xl",children:_.jsxs("label",{children:[hKt(),_.jsx(lc,{choices:[{id:"",label:oI()},...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($),x(null),N(!1),A(!1)}})]})}),_.jsxs("div",{className:"actions",children:[_.jsx(Ie,{type:"button",onClick:()=>{C&&!j?(A(!1),N(!1)):G()},disabled:!a,title:a?void 0:Lnn(),children:C?j?ni():ff():y?mI():NS()}),_.jsx("span",{role:"status",children:_.jsx(cFn,{test:y,connecting:C&&!j,masterRunning:I[a]})})]}),_.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[_.jsxs("div",{className:"row2",children:[_.jsxs("label",{children:[XXt(),_.jsx(Br,{type:"text",list:"slurm-partitions",value:c,onChange:$=>u($.target.value),placeholder:cj(),autoComplete:"off",spellCheck:!1}),_.jsx("datalist",{id:"slurm-partitions",children:y==null?void 0:y.partitions.map($=>_.jsx("option",{value:$},$))})]}),_.jsxs("label",{children:[AS(),_.jsx(Br,{type:"text",value:h,onChange:$=>f($.target.value),placeholder:cj(),autoComplete:"off",spellCheck:!1})]})]}),_.jsxs("label",{className:"mt-3 block max-w-xl",children:[vtn(),_.jsx(Br,{type:"text",value:p,onChange:$=>m($.target.value),placeholder:KPt(),autoComplete:"off",spellCheck:!1})]})]}),v&&_.jsx("div",{className:"error",children:v}),_.jsx("div",{className:"actions",children:_.jsx(Ie,{variant:"primary",type:"submit",disabled:w||V||C,children:w?Sa():pc()})})]}),C&&_.jsx(ZS,{host:a,backend:"slurm",onComplete:$=>{$.backend==="slurm"&&(x($.result),B(a),A(!1),N(!1))},onError:$=>{A(!0),x({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:$})}},z)]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",PGt()]})})}function uFn(){var C;const e=pn({mutationFn:N5n}),n=Dkn(),t=ut(n),r=t.data??null,s=N=>{Vr(n.queryKey,j=>(typeof N=="function"?N(j??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),[h,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 b=r!==null&&a===(r.address??"");async function y(N){if(N.preventDefault(),!c){u(!0),f(null);try{k(await e.mutateAsync({address:a}))}catch(j){f(j instanceof Error?j.message:String(j))}finally{u(!1)}}}async function x(){m("testing");try{m(await z5n(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:Gy,children:w.error}),_.jsxs("form",{className:BC,onSubmit:y,children:[_.jsxs("label",{children:[aGt(),_.jsx(Br,{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:[tqt(),": ",Ce(r.resolvedAddress)," · ",_I(),": ",r.source]}),h&&_.jsx("div",{className:"error",children:h}),_.jsxs("div",{className:"actions",children:[_.jsx(Ie,{variant:"primary",type:"submit",disabled:c||b,children:c?Sa():pc()}),_.jsx(Ie,{type:"button",onClick:()=>void x(),disabled:p==="testing",children:Aen()}),_.jsx(_Fn,{test:p})]}),(w==null?void 0:w.reachable)&&w.rayVersion&&_.jsxs("p",{className:"m-0 text-sm text-subtext",children:[SYt(),": ",w.rayVersion]})]})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",MGt()]})})}function _Fn({test:e}){return e===null?null:e==="testing"?_.jsx(Wt,{children:Ien()}):e.reachable?_.jsx(Wt,{variant:"success",children:TYt()}):_.jsx(Wt,{variant:"error",children:TS()})}function fFn(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:_l(e.memBytes),r=e.gpus.length===0?null:HMt({count:e.gpus.length});return[n,e.cpuCount>0?hRt({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function dFn({remote:e}){var p;const n=ut(Ikn()),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,h]=T.useState(!1),f=()=>n.refetch();return _.jsxs(_.Fragment,{children:[r&&!t?_.jsx("div",{className:"error",children:r}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:YPn,children:[_.jsx("span",{className:"k",children:Vh()}),_.jsx("span",{className:"v",children:!t&&s||u?_.jsxs(Wt,{className:"gap-1.5",role:"status",children:[_.jsx(St,{}),u?z$t():ya()]}):r?_.jsx(Wt,{variant:"warning",children:Bv()}):t?t.loggedIn?t.sshKeyStatus==="matched"?_.jsx(Wt,{variant:"success",children:Tm()}):t.sshKeyStatus==="unknown"?_.jsx(Wt,{variant:"warning",children:Bv()}):_.jsx(Wt,{variant:"warning",children:Hb()}):_.jsx(Wt,{variant:"warning",children:cI()}):null}),_.jsx("span",{className:"k",children:mXt()}),_.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),_.jsx("span",{className:"k",children:LJt()}),_.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?_.jsx(Wt,{variant:"success",children:AQt()}):t.sshKeyStatus==="no_local_match"?_.jsx(Wt,{variant:"warning",children:_Qt()}):t.sshKeyStatus==="none_registered"?_.jsx(Wt,{variant:"error",children:RWt()}):_.jsx(Wt,{children:fI()}):"—"})]}),e&&t&&!t.loggedIn&&_.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:RDt({command:Ce("orx login")})}),!e&&i>0&&_.jsx(I8n,{login:o,onComplete:()=>{h(!1),a(0),f()},onError:m=>{h(!1),Zt(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?_.jsxs("p",{dir:"auto",className:Ua,children:[F$t()," ",_.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):_.jsxs("p",{dir:"auto",className:Ua,children:[vWt()," ",_.jsx("code",{children:"ssh-keygen -t ed25519"}),Uen()," ",_.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:Ua,children:trn({register:Ce(`orx ssh-key add ${t.sshKeyPath}`),load:Ce("ssh-add")})}):_.jsxs("p",{dir:"auto",className:Ua,children:[_Wt()," ",_.jsx("code",{children:"ssh-add"}),nXt()," ",_.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(Ie,{onClick:()=>void f(),disabled:s||u,children:[_.jsx(Va,{size:13})," ",s?ya():Am()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&_.jsxs(Ie,{variant:"primary",disabled:s||u,onClick:()=>{c(!t.loggedIn),h(!0),a(m=>m+1)},children:[u?_.jsx(St,{}):_.jsx(Mf,{size:13})," ",t.loggedIn?Qsn():vI()]})]})]})}const hFn={local:lRe,ssh:URe,tinker:YRe,hf:QTe,modal:mRe,k8s:nRe,slurm:IRe,ray:ARe,openresearch:kRe},Wy={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"},YR=["hf","modal","slurm","ray","openresearch"],S4=["hf","modal","openresearch"],dq={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"]},gk=["tinker","hf","modal","ray","k8s"],pFn={tinker:MOe,hf:fOe,modal:bOe,openresearch:EOe},ZR="__custom__";function r0(e,n){return!!(n&&!(dq[e]??[]).includes(n))}function mFn({settings:e,projectId:n,onSaved:t}){const r=pn({mutationFn:A5n}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=T.useState(s),[c,u]=T.useState(i),[h,f]=T.useState(r0(s,i)),[p,m]=T.useState(!1),[w,k]=T.useState(null),v=e.targets.find(B=>B.id===a),b=e.targets.filter(B=>B.configured||B.id===s),y=YR.includes(a),x=S4.includes(a),C=dq[a]??[],N=a===s&&(!y||c.trim()===i),j=vf[a](),A=pFn[a],z=p?non():x&&!c.trim()?HAt({destination:j}):a==="ssh"?cIt():tIt({destination:j});T.useEffect(()=>{o(s),u(i),f(r0(s,i))},[s,i]);async function M(B,G){const U=YR.includes(B);if(!(p||S4.includes(B)&&!G.trim())){m(!0),k(null);try{t(await r.mutateAsync({backend:B,flavor:U&&G.trim()||null,projectId:n}))}catch(Q){k(Q instanceof Error?Q.message:String(Q)),o(s),u(i),f(r0(s,i))}finally{m(!1)}}}function D(B){const G=e.targets.find(Q=>Q.id===B);if(!G)return;o(G.id);const U=G.id===s?i:"";u(U),f(r0(G.id,U)),S4.includes(G.id)||M(G.id,U)}function I(B){if(B===ZR){f(!0);return}f(!1),u(B),(!x||B)&&M(a,B)}return _.jsxs("section",{className:"mb-8",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:NHt()}),_.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:b.map(B=>({id:B.id,label:vf[B.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:B=>{const G=e.targets.find(U=>U.id===B.id);return G?_.jsx(Xh,{kind:Wy[G.id],size:16}):null},onSelect:D}),y&&_.jsx("div",{children:h?_.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(x&&!c.trim()){a===s&&(u(i),f(r0(s,i)));return}N||M(a,c)},placeholder:VFt(),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":oj(),title:oj(),onMouseDown:B=>B.preventDefault(),onClick:()=>f(!1),children:_.jsx(mc,{size:12})})]}):_.jsx(lc,{choices:[{id:"",label:x?DAt():wIt()},...c&&!C.includes(c)?[{id:c,label:DRt({value:Ce(c)})}]:[],...C.map(B=>({id:B,label:B})),{id:ZR,label:eHt()}],value:c,variant:"field",dropDown:!0,disabled:p,onSelect:I})})]}),w&&_.jsx("div",{className:"error mt-2.5",children:w}),v&&!v.configured&&_.jsx("p",{className:Ua,children:stn()})]}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:z}),A&&_.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:A()})]})}function gFn({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?xAt():e.id==="openresearch"?vI():e.id==="ray"?NS():Hsn();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":vf[e.id](),"aria-describedby":i,"aria-haspopup":gk.includes(e.id)?"dialog":void 0}),_.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:_.jsx(Xh,{kind:Wy[e.id],size:48})}),_.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:vf[e.id]()}),_.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:hFn[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"?sDt():zan()," ",_.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:eMt()})]}):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?rI():e.configured?!r||gk.includes(e.id)?Rm():won():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 vFn({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(B0,{size:16})," ",tI()]}),_.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(Xh,{kind:Wy[e.id],size:36})}),_.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:vf[e.id]()})]}),n&&_.jsx(Wt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:rI()})]}),_.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(oFn,{}),e.id==="slurm"&&_.jsx(lFn,{}),e.id==="openresearch"&&_.jsx(dFn,{remote:r})]})]})}function bFn({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(YOt())||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(Xh,{kind:Wy[e.id],size:32}),_.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:vf[e.id]()})]}),_.jsx(It,{title:I0(),"aria-label":I0(),onClick:a,disabled:s.saving,children:_.jsx(xr,{size:14})})]}),e.id==="tinker"&&_.jsx(xFn,{target:e}),e.id==="hf"&&_.jsx(kFn,{remote:n}),e.id==="modal"&&_.jsx(sFn,{}),e.id==="ray"&&_.jsx(uFn,{}),e.id==="k8s"&&_.jsx(rFn,{onEditState:i})]})}function yFn({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,D;const s=WI(e==null?void 0:e.id),i=ut(s),a=i.data??null,o=I=>{Vr(s.queryKey,B=>(typeof I=="function"?I(B??null):I)??void 0)},c=a?null:((M=i.error)==null?void 0:M.message)??null,[u,h]=T.useState(null),[f,p]=T.useState(null),m=Lkn(),w=ut(m),k=w.data??null,v=((D=w.error)==null?void 0:D.message)??null;T.useEffect(()=>{h(null),p(null)},[e==null?void 0:e.id]);const b=I=>{o(I),p(null)},y=a?a.targets:null,x=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=y?[...y].sort((I,B)=>+(B.id===x)-+(I.id===x)):null,N=(C==null?void 0:C.filter(I=>I.configured))??[],j=(C==null?void 0:C.filter(I=>!I.configured))??[],A=I=>_.jsx(gFn,{target:I,isDefault:x===I.id,summary:I.id==="local"?k?fFn(k):v??OHt():void 0,onOpen:I.id==="local"?void 0:()=>h(I.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${I.id}`),z=u?a==null?void 0:a.targets.find(I=>I.id===u):null;return z&&!gk.includes(z.id)?_.jsx(vFn,{target:z,isDefault:x===z.id,onBack:()=>h(null),remote:r}):_.jsxs(_.Fragment,{children:[_.jsx("h1",{children:nI()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:fFt()}),_.jsx(PFn,{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(mFn,{settings:a,projectId:e==null?void 0:e.id,onSaved:b}),_.jsxs("section",{className:"mb-8",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:Rm()}),_.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(A)})]}),j.length>0&&_.jsxs("section",{className:"mb-3.5",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:DKt()}),_.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:j.map(A)})]}),z&&_.jsx(bFn,{target:z,remote:r,onClose:()=>h(null)})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",dPt()]})]})}function xFn({target:e}){var y;const n=pn({mutationFn:X3n}),[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(null),c=kj(),u=ut(c),h=u.data??null,f=a??((y=u.error)==null?void 0:y.message)??null,p=x=>{Vr(c.queryKey,C=>(typeof x=="function"?x(C??null):x)??void 0)},[m,w]=T.useState(!1),k=u.isPending||m;async function v(){if(!(k||s)){w(!0),o(null);try{await tt.fetchQuery({...kj(),staleTime:0})}catch(x){o(x instanceof Error?x.message:String(x))}finally{w(!1)}}}async function b(x){if(x.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:[!h&&k?_.jsxs(Pr,{children:[_.jsx(St,{})," ",ya()]}):h&&_.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[_.jsx("dt",{className:"font-medium text-subtext",children:Vh()}),_.jsx("dd",{className:"m-0",children:_.jsx(Wt,{variant:h.validationStatus==="valid"?"success":h.validationStatus==="invalid"?"error":"warning",children:h.validationStatus==="valid"?Tm():h.validationStatus==="invalid"?xan():h.validationStatus==="billingRequired"?oan():Hb()})})]}),(h==null?void 0:h.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:ean()})}),(h==null?void 0:h.processEnv)&&_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:han()}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||h!==null&&h.validationStatus!=="missing"?tsn():CS(),_.jsx(Br,{type:"password",value:t,placeholder:(h==null?void 0:h.maskedKey)??"",onChange:x=>r(x.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(Ie,{type:"button",disabled:s||k,onClick:()=>void v(),children:[_.jsx(Va,{size:13})," ",k?ya():Am()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!t.trim()||s||k,children:s?yI():pc()})]})]})]})}function wFn({settings:e}){return e.validationStatus==="missing"?_.jsx(Wt,{variant:"warning",children:Hb()}):e.validationStatus==="invalid"?_.jsx(Wt,{variant:"error",children:JUt()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?_.jsx(Wt,{variant:"success",children:Tm()}):e.jobsWrite===!1?_.jsxs("span",{className:"inline-flex items-center gap-2",children:[_.jsx(Wt,{variant:"warning",children:sWt()}),_.jsx(FS,{content:lOt(),className:"text-subtext",children:_.jsx(US,{size:15})})]}):null}function kFn({remote:e}){var y;const n=pn({mutationFn:W3n}),t=wj(),r=ut(t),s=r.data??null,i=x=>{Vr(t.queryKey,C=>(typeof x=="function"?x(C??null):x)??void 0)},a=s?null:((y=r.error)==null?void 0:y.message)??null,[o,c]=T.useState(""),[u,h]=T.useState(!1),[f,p]=T.useState(!1),[m,w]=T.useState(null),k=Ky();async function v(){if(!(u||f||!s&&!a)){p(!0),w(null);try{await tt.fetchQuery({...wj(),staleTime:0})}catch(x){w(x instanceof Error?x.message:String(x))}finally{p(!1)}}}async function b(x){if(x.preventDefault(),!(!o.trim()||u||f||!s&&!a)){h(!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{h(!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:AS()}),_.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:Vh()}),_.jsx("dd",{className:"m-0 text-text",children:_.jsx(wFn,{settings:s})})]})]}),s.validationStatus==="unreachable"&&s.validationError&&_.jsx("p",{className:Gy,children:s.validationError}),s.source==="env"&&_.jsx("p",{className:Ua,children:aUt()}),s.validationStatus==="valid"&&s.jobsWrite===null&&_.jsx(PC,{note:nOt({login:"`hf auth login`",url:Ce("huggingface.co/settings/tokens")}),className:Ua,disabled:e,onRun:k.start}),_.jsx(Vy,{run:k.run,onComplete:()=>void r.refetch(),onClose:k.clear})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",VGt()]}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[s!=null&&s.configured?csn():pIt(),_.jsx(Br,{type:"password",value:o,onChange:x=>c(x.target.value),placeholder:(s==null?void 0:s.maskedToken)??Jqt(),autoComplete:"off"})]}),m&&_.jsx("div",{className:"error",children:m}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(Ie,{type:"button",disabled:u||f||!s&&!a,onClick:()=>void v(),children:[_.jsx(Va,{size:13})," ",f?ya():Am()]}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!o.trim()||u||f||!s&&!a,children:u?yI():pc()})]})]})]})}const hq=/^hf_[A-Za-z0-9]{10,}$/;function pq(){return _.jsx("tr",{children:_.jsx("td",{colSpan:3,children:_.jsxs("p",{dir:"auto",className:Ua,children:[_tn()," ",_.jsx("code",{children:"HF_TOKEN"}),XZt()]})})})}const JR=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function vk(e,n){const t=n instanceof Error?n.message:String(n);Zt(t.includes(e)?t:`${e}: ${t}`,"error")}function SFn({name:e,entry:n,onVars:t}){const r=pn({mutationFn:f=>$I(...f)}),s=pn({mutationFn:o5n}),[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){vk(e,f)}finally{c(!1)}}}async function h(){if(!o){c(!0);try{t(await s.mutateAsync(e))}catch(f){vk(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(Wt,{children:qXt()})]}):_.jsx(Br,{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:dI(),"aria-label":Uee({name:Ce(e)}),autoComplete:"new-password",disabled:o})}),_.jsx("td",{children:n?_.jsx(It,{className:"[&:hover:not(:disabled)]:text-accent-red",title:N3({name:Ce(e)}),"aria-label":N3({name:Ce(e)}),onClick:()=>void h(),disabled:o,children:_.jsx(Of,{size:13})}):i.trim()&&_.jsx(Ie,{size:"small",onClick:()=>void u(),disabled:o,children:o?Sa():pc()})})]}),!n&&e!=="HF_TOKEN"&&hq.test(i.trim())&&_.jsx(pq,{})]})}function CFn({onVars:e,onDone:n}){const t=pn({mutationFn:f=>$I(...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){vk(r.trim(),f)}finally{c(!1)}}}const h=f=>{f.key==="Enter"&&(f.preventDefault(),u()),f.key==="Escape"&&!o&&n()};return _.jsxs(_.Fragment,{children:[_.jsxs("tr",{children:[_.jsx("td",{children:_.jsx(Br,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:f=>s(f.target.value),onKeyDown:h,placeholder:"MY_API_KEY","aria-label":kVt(),autoComplete:"off",spellCheck:!1,disabled:o})}),_.jsx("td",{children:_.jsx(Br,{variant:"inline",className:"text-base",type:"password",value:i,onChange:f=>a(f.target.value),onKeyDown:h,placeholder:dI(),"aria-label":AVt(),autoComplete:"new-password",disabled:o})}),_.jsxs("td",{children:[_.jsx(Ie,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?Sa():pc()}),_.jsx(It,{title:ff(),"aria-label":aPt(),onClick:n,disabled:o,children:_.jsx(xr,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&hq.test(i.trim())&&_.jsx(pq,{})]})}function EFn(){var u;const e=$kn(),n=ut(e),t=n.data??null,r=h=>{Vr(e.queryKey,f=>(typeof h=="function"?h(f??null):h)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=T.useState(!1),o=t===null?[]:t.map(h=>h.key).filter(h=>!JR.includes(h)),c=[...JR,...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:lnn()}),_.jsxs(Ie,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[_.jsx(Qh,{size:12})," ",W$t()]})]}),_.jsx("div",{className:fc,children:s?_.jsx("div",{className:"error",children:s}):t===null?_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]}):_.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(h=>_.jsx(SFn,{name:h,entry:t.find(f=>f.key===h),onVars:r},h)),i&&_.jsx(CFn,{onVars:r,onDone:()=>a(!1)})]})})})]})}const s0=[{value:"system",label:Vin,icon:B7n},{value:"light",label:Pin,icon:_8n},{value:"dark",label:Nin,icon:F7n}],NFn=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"},{id:"ar",label:"العربية"},{id:"es",label:"Español"},{id:"hi",label:"हिन्दी"}];function zFn(){const e=Qu(),[n,t]=c$(),r=s=>{var h;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?s0.findIndex(f=>f.value===n):o)+i+s0.length)%s0.length;t(s0[u].value),(h=a[u])==null||h.focus()};return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:Fjt()}),_.jsxs("div",{className:`${fc} mt-3`,children:[_.jsxs("div",{className:`${dl} pb-3.5`,children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:mj()}),_.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":mj(),onKeyDown:r,children:s0.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:dl,children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:CDt()}),_.jsx("div",{className:"w-52 flex-none",children:_.jsx(lc,{choices:NFn,value:e,variant:"field",dropDown:!0,onSelect:s=>{eL(s)&&s$(s)}})})]})]})]})}const jFn={installer:Cxn,"app-bundle":Yyn,appimage:sxn,portable:Bxn,cargo:_xn,homebrew:vxn,nix:Rxn,unknown:Kxn},C4={cargo:Jxn,homebrew:a2n,nix:d2n};function AFn(){var f;const e=pn({mutationFn:p=>e5n(...p)}),{status:n,error:t,apply:r}=I6(),[s,i]=T.useState(null),[a,o]=T.useState(null),c=$B(n),u=s!==null||c.restarting;if(!n)return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:dj()}),t?_.jsx("div",{className:fc,children:_.jsx("div",{className:"error",children:t})}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]})]});const h=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:dj()}),_.jsxs("div",{className:`${fc} mt-3`,children:[_.jsxs("div",{className:`${yf} pb-3.5`,children:[_.jsx("div",{className:"k",children:hI()}),_.jsx("div",{className:"v",children:n.current}),_.jsx("div",{className:"k",children:yGt()}),_.jsx("div",{className:"v",children:n.latest??"—"}),_.jsx("div",{className:"k",children:iI()}),_.jsx("div",{className:"v",children:jFn[n.channel]()})]}),n.restartRequired&&_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:jZt()}),_.jsx("p",{children:c.error?jI({error:c.error}):wsn({installed:Ce(n.installedVersion??"—"),current:Ce(n.current??n.installedVersion??"—")})})]}),n.canRestart&&_.jsx(Ie,{size:"small",type:"button",disabled:u,onClick:c.restart,children:c.restarting?AI():zI()})]}),n.selfUpdates?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:uj()}),_.jsxs("p",{children:[mVt(),n.envDisabled&&Qan()]})]}),_.jsx(PS,{type:"button",checked:n.autoUpdate,"aria-label":uj(),disabled:u,onClick:()=>void h("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?Han({version:Ce(n.latest??"—")}):oAt()}),_.jsxs("p",{children:[n.updateAvailable?UOt():zAt(),n.updateAvailable&&n.latestTag&&_.jsxs(_.Fragment,{children:[" ",_.jsx("a",{href:IB(n.latestTag),target:"_blank",rel:"noreferrer",className:"underline",children:gI()})]})]})]}),_.jsx(Ie,{size:"small",type:"button",disabled:u,onClick:()=>void h("apply",()=>Z3n().then(r)),children:s==="apply"?bS():n.updateAvailable?Dan():hAt()})]})]}):_.jsx("div",{className:dl,children:_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:kXt()}),_.jsx("p",{children:((f=C4[n.channel])==null?void 0:f.call(C4))??crn()})]})}),n.channel==="app-bundle"&&_.jsx(RFn,{busy:s,disabled:u,run:h}),a&&_.jsx("div",{className:"error",children:a})]})]})}function TFn(){var f;const e=pn({mutationFn:Q5n}),n=Kkn(),t=ut(n),r=t.data??null,s=p=>{Vr(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,h=()=>{!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:Xtn()}),r?_.jsxs("div",{className:`${fc} mt-3`,children:[_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[aj(),r.locked&&r.reason&&_.jsx(FS,{content:`${PFt()} ${r.reason}.`,className:"text-subtext",children:_.jsx(US,{size:15})})]}),_.jsx("p",{children:IVt()})]}),_.jsx(PS,{type:"button",checked:r.enabled,"aria-label":aj(),disabled:i||r.locked,onClick:h})]}),u&&_.jsx("div",{className:"error",children:u})]}):u?_.jsx("div",{className:"error",children:u}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]})]})}function RFn({busy:e,disabled:n,run:t}){const r=pn({mutationFn:t5n}),[s,i]=T.useState(null),[a,o]=T.useState(!1),c=u=>void t("cli",()=>r.mutateAsync(u).then(h=>{i(h),o(!1)}).catch(h=>{throw o(!u&&String((h==null?void 0:h.message)??h).includes("--force")),h}));return _.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:AOt({command:Ce("orx")})}),s?_.jsxs("p",{children:[s.alreadyCurrent?nTt({link:Ce(s.link)}):lTt({link:Ce(s.link)}),!s.onPath&&Ojt({directory:Ce(s.dir)})]}):_.jsx("p",{children:kOt({command:Ce("orx")})})]}),_.jsx(Ie,{size:"small",type:"button",disabled:n,onClick:()=>c(a),children:e==="cli"?bS():a?Wrn():s?xrn():mOt()})]})}function MFn({remote:e}){var w;const n=pn({mutationFn:k=>qI(...k)}),t=DS(),r=ut(t),s=r.data??null,i=k=>{Vr(t.queryKey,v=>(typeof k=="function"?k(v??null):k)??void 0)},[a,o]=T.useState(!1),[c,u]=T.useState(null),h=c??((w=r.error)==null?void 0:w.message)??null,f=async()=>{await r.refetch({cancelRefetch:!1})},p=Ky(),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:Eqt()}),s?_.jsxs("div",{className:`${fc} 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:Mqt()}),_.jsx(Wt,{variant:s.githubAuthenticated?"success":s.ghInstalled?"warning":"error",children:s.githubAuthenticated?XL():JL()})]}),_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:lj()}),_.jsx("p",{children:wnn()})]}),_.jsx(PS,{type:"button",checked:s.githubForNewProjects,"aria-label":lj(),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(mq,{ghInstalled:s.ghInstalled,remote:e,onCheck:f,onRun:p.start})}),_.jsx(Vy,{run:p.run,onComplete:()=>void f(),onClose:p.clear}),h&&_.jsx("div",{className:"error",children:h})]}):h?_.jsx("div",{className:"error",children:h}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]})]})}function mq({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(PC,{note:e?jsn():IOt(),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(jh,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[MUt()," ",_.jsx(mf,{size:12})]}),_.jsx(Ie,{type:"button",variant:e?"warning":"default",disabled:s,onClick:a,children:s?ya():Am()})]})]})}function OFn(){var m,w,k;const e=pn({mutationFn:O3n}),n=pn({mutationFn:D3n}),t=GEn(),r=ut(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((w=r.data)==null?void 0:w.hasSession)??null,a=v=>Vr(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...v}),o=v=>a({hasToken:v}),[c,u]=T.useState(!1),[h,f]=T.useState(null),p=h??((k=r.error)==null?void 0:k.message);return _.jsxs("div",{className:mk,children:[_.jsx("h3",{children:lI()}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:Pqt()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:s?"success":"default",children:s===null?p?fo():ya():s?pj():P3()})})]}),_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:jnn()}),s?_.jsx("div",{className:N0,children:_.jsx(Ie,{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?hj():Drn()})}):_.jsx(XR,{save:LI,onSaved:v=>o(v.hasToken),placeholder:LXt(),createHref:"https://www.overleaf.com/user/settings"}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:rJt()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:i?"success":"default",children:i===null?p?fo():ya():i?pj():P3()})})]}),_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:uJt()}),i?_.jsx("div",{className:N0,children:_.jsx(Ie,{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?hj():zrn()})}):_.jsx(XR,{save:v=>II(v),onSaved:v=>a({hasSession:v.hasSession}),placeholder:L3(),createHref:"https://www.overleaf.com/project",createLabel:Nyt()}),p&&_.jsx("div",{className:"error",children:p})]})}function DFn({project:e,onProjectUpdate:n,remote:t}){var M;const r=pn({mutationFn:D=>qI(...D)}),s={...Gkn((e==null?void 0:e.id)??""),enabled:!!e},i=ut(s),a=Ky(),o=i.data??null,c=D=>{Vr(s.queryKey,I=>(typeof D=="function"?D(I??null):D)??void 0)},[u,h]=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,b]=T.useState(!1),[y,x]=T.useState(null),C=!!(o!=null&&o.github.owner&&o.github.repo),N=async()=>{await i.refetch({cancelRefetch:!1})},j=D=>{const I=D instanceof Error?D.message:String(D);return I.toLowerCase().includes("archived")?xMt():I.includes("(fetch first)")||I.includes("non-fast-forward")?zMt():I.includes("403")||I.toLowerCase().includes("permission denied")?DMt():I},A=()=>{e&&(h(!0),p(null),K5n(e.id).then(D=>{c(D.git),n(D.project),tt.fetchQuery(DS()).then(I=>{!I.githubForNewProjects&&!I.githubDefaultPromptSeen&&k(!0)}).catch(()=>{})}).catch(D=>p(j(D))).finally(()=>h(!1)))},z=D=>{b(!0),x(null),r.mutateAsync([D,!0]).then(()=>k(!1)).catch(I=>x(I instanceof Error?I.message:String(I))).finally(()=>b(!1))};return _.jsxs(_.Fragment,{children:[_.jsx("h1",{children:wZt()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:psn({project:(e==null?void 0:e.name)??zRt()})}),e?m&&!o?_.jsx("div",{className:"error",children:m}):o?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:mk,children:[_.jsx("h3",{children:oKt()}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:rYt()}),_.jsx("span",{className:"v",children:o.path}),_.jsx("span",{className:"k",children:"Git"}),_.jsx("span",{className:"v",children:o.gitVersion??IL()}),_.jsx("span",{className:"k",children:XJt()}),_.jsx("span",{className:"v",children:o.initialized?hMt({branch:Ce(o.currentBranch??zS()),state:o.clean?QAt():QMt()}):t$t()}),_.jsx("span",{className:"k",children:PBt()}),_.jsx("span",{className:"v",children:o.baselineBranch}),_.jsx("span",{className:"k",children:pZt()}),_.jsx("span",{className:"v",children:o.remotes.length?o.remotes.map(D=>`${D.name}: ${D.url}`).join(" · "):jS()})]}),!o.initialized&&_.jsx("div",{className:N0,children:_.jsx(Ie,{variant:"primary",onClick:()=>void G5n(e.id).then(c).catch(D=>p(String(D))),children:dUt()})})]}),_.jsxs("div",{className:mk,children:[_.jsx("h3",{children:"GitHub"}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:eI()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:o.github.authenticated?"success":o.github.ghInstalled?"warning":"error",children:o.github.authenticated?XL():JL()})}),_.jsx("span",{className:"k",children:gYt()}),_.jsx("span",{className:"v",children:C?_.jsxs(_.Fragment,{children:[_.jsxs("span",{children:[o.github.owner,"/",o.github.repo]}),!o.github.enabled&&_.jsx(Wt,{children:ken()})]}):_.jsx(Wt,{children:eKt()})}),o.github.enabled&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:men()}),_.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(mq,{ghInstalled:o.github.ghInstalled,remote:t,onCheck:()=>N(),onRun:a.start})}),_.jsx(Vy,{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?lon():xRt()}),_.jsxs("div",{className:N0,children:[C&&o.github.url&&_.jsxs(jh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[fj()," ",_.jsx(mf,{size:12})]}),_.jsx(Ie,{variant:"primary",disabled:u,onClick:A,children:u?yNt():dNt()})]})]}),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:WHt()}),_.jsxs("div",{className:N0,children:[o.github.url&&_.jsxs(jh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[fj()," ",_.jsx(mf,{size:12})]}),_.jsx(Ie,{disabled:u,onClick:()=>{h(!0),V5n(e.id).then(D=>{c(D.git),n(D.project)}).catch(D=>p(D instanceof Error?D.message:String(D))).finally(()=>h(!1))},children:u?NNt():aNt()})]})]})]}),_.jsx(OFn,{}),m&&_.jsx("div",{className:"error",children:j(m)})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]}):_.jsx("div",{className:fc,children:_.jsx("p",{className:Ua,children:IQt()})}),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:()=>z(!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:xKt()}),_.jsx("p",{children:Yen()}),y&&_.jsx("div",{className:"error",children:y}),_.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[_.jsx(Ie,{disabled:v,onClick:()=>z(!1),children:sQt()}),_.jsx(Ie,{variant:"primary",disabled:v,onClick:()=>z(!0),children:v?Sa():BDt()})]})]})})]})}const LFn={env:h0n,config:x0n,xdg:z0n,default:o0n},E4={preparing:Vpn,copying:ipn,verifying:D0n,finalizing:fpn},IFn=e=>{var n;return((n=E4[e])==null?void 0:n.call(E4))??e};function $Fn(){var x;const e=Bkn(),n=ut(e),t=n.data??null,r=t?null:((x=n.error)==null?void 0:x.message)??null,[s,i]=T.useState(""),[a,o]=T.useState(!1),[c,u]=T.useState(null),[h,f]=T.useState({kind:"idle"}),[p,m]=T.useState(null);T.useEffect(()=>{t&&i(C=>C||t.current)},[t]),T.useEffect(()=>n$(C=>{C.type==="progress"?f(N=>{const j=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||j}}):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 b(){if(!(a||!k)){o(!0),m(null),u(null);try{u(await l5n(k))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function y(C){if(C.preventDefault(),!(h.kind==="moving"||!k||v)&&(m(null),!!window.confirm(Epn({path:Ce(k)})))){f({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await u5n(k)}catch(N){f({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:len()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:hin()}),r?_.jsx("div",{className:fc,children:_.jsx("div",{className:"error",children:r})}):t?_.jsxs("div",{className:fc,children:[_.jsx("div",{className:"settings-card-head mb-3",children:_.jsx("h3",{children:oHt()})}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:MFt()}),_.jsx("span",{className:"v",children:t.current}),_.jsx("span",{className:"k",children:_I()}),_.jsx("span",{className:"v",children:LFn[t.source]()})]}),!w&&_.jsxs("form",{className:BC,onSubmit:y,children:[_.jsxs("label",{children:[lVt(),_.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:h.kind==="moving"})]}),c&&!c.error&&c.ok&&_.jsxs("p",{className:Ua,children:[XYt()," ",_l(c.treeBytes??0),c.freeBytes!=null&&` — ${bpn({size:Ce(_l(c.freeBytes))})}`,c.sameFilesystem?e0n():"","."]}),c&&c.ok===!1&&c.error&&_.jsx("div",{className:"error",children:c.error}),p&&_.jsx("div",{className:"error",children:p}),h.kind==="moving"&&_.jsx(cq,{value:h.copied,max:h.total,label:IFn(h.phase),caption:h.total>0?_.jsxs("span",{className:"text-sm",children:[_l(h.copied)," / ",_l(h.total)]}):void 0}),h.kind==="done"&&_.jsxs("p",{className:Ua,children:[QKt(),h.oldPathLeft&&_.jsxs(_.Fragment,{children:[" ",x$t({path:Ce(h.oldPathLeft)})]})]}),h.kind==="error"&&_.jsxs("div",{className:"error",children:[HKt()," ",h.message]}),_.jsxs("div",{className:"actions",children:[_.jsx(Ie,{type:"button",onClick:b,disabled:a||!k||v||h.kind==="moving",children:a?ya():Wjt()}),_.jsx(Ie,{variant:"primary",type:"submit",disabled:!k||v||h.kind==="moving",children:h.kind==="moving"?Ppn():Mpn()})]})]})]}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]})]})}const bk=e=>e==="running"||e==="starting";function BFn(e){return bk(e.status)?$0(Date.now()-e.createdAt):e.endedAt?$0(e.endedAt-e.createdAt):"—"}function gq({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:MBt()}),_.jsx("th",{children:Vh()}),_.jsx("th",{children:qJt()}),_.jsx("th",{children:qZt()})]})}),_.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(i6,{backend:t.backend}),r&&_.jsx(Wh,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:_j(),"aria-label":_j(),onClick:i=>i.stopPropagation(),children:_.jsx(mf,{size:12})})]})}),_.jsx("td",{children:_.jsx(ml,{status:pa(t)})}),_.jsx("td",{children:vo(t.createdAt)}),_.jsx("td",{children:BFn(t)})]},t.id)})})]})})}function PFn({projectId:e,onViewHistory:n}){var f;const t=ut({...Tu(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=>bk(p.status)).sort(c),h=r==null?void 0:r.filter(p=>!bk(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:[LZt(),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(Ie,{size:"small",onClick:o,disabled:i,children:[_.jsx(Va,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]}),_.jsx(Ie,{size:"small",onClick:n,children:h!=null&&h.length?Met({count:Jt(h.length)}):Eet()})]})]}),s&&_.jsx("div",{className:"error",children:s}),!u||!h?_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]}):_.jsx(gq,{instances:u,emptyLabel:e?ret():vet()})]})}function FFn({projectId:e,onBack:n}){var c;const t=ut({...Tu(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(h=>h+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(B0,{size:14})," ",tI()]}),_.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[_.jsx("h1",{children:KUt()}),_.jsxs(Ie,{size:"small",onClick:o,disabled:i,children:[_.jsx(Va,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),s&&_.jsx("div",{className:"error",children:s}),r?_.jsx(gq,{instances:[...r].sort((u,h)=>h.createdAt-u.createdAt),emptyLabel:e?XJe():_et()}):_.jsxs(Pr,{children:[_.jsx(St,{})," ",Wu()]})]})}const vq=["projects","harnesses","storage"],HFn=[{id:"compute",label:nI,icon:_.jsx(qS,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:sI,icon:_.jsx(Mf,{size:15}),activeTabs:["environment"]},{id:"settings",label:RS,icon:_.jsx(WS,{size:15}),activeTabs:["settings",...vq]}];function qFn(e){return vq.includes(e)}function UFn({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||qFn(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"}),h=new ResizeObserver(u);h.observe(c),u();const f=()=>h.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:RS()}),_.jsxs("div",{className:"settings-stack mt-4.5",children:[_.jsx("section",{className:jd,children:_.jsx(zFn,{})}),_.jsx("section",{ref:e==="projects"?a:void 0,className:jd,children:_.jsx(MFn,{remote:s})}),_.jsx("section",{ref:e==="harnesses"?a:void 0,className:jd,children:_.jsx(tFn,{remote:s})}),!s&&_.jsx("section",{ref:e==="storage"?a:void 0,className:jd,children:_.jsx($Fn,{})}),_.jsx("section",{className:jd,children:_.jsx(TFn,{})}),!s&&_.jsx("section",{className:jd,children:_.jsx(AFn,{})})]})]}),e==="compute"&&_.jsx(yFn,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&_.jsx(FFn,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&_.jsxs(_.Fragment,{children:[_.jsx("h1",{children:sI()}),_.jsx(EFn,{})]}),e==="git"&&_.jsx(DFn,{project:n,onProjectUpdate:t,remote:s})]})}function tm(e){const n=e.split("@")[0].replace(/[~^]$/,"");return n.charAt(0).toUpperCase()+n.slice(1).replaceAll("-"," ")}function FC(e){return e.replace(/@personal$|\^$/,"@u").replace(/@project$|~$/,"@p")}function yk(e){return`${e.plugin?`${tm(e.plugin)}: `:""}${tm(e.name)}`}const bq=["plan","goal","new","resume","model","compact","copy","export","side"],GFn={plan:()=>Vwt(),goal:()=>$Qe(),new:()=>Iat(),resume:()=>ONt(),model:()=>Rrt(),compact:()=>HTe(),copy:()=>hDe(),export:()=>cPe(),side:()=>pcn()};function KFn(e){return{name:e,get description(){return GFn[e]()},source:"command"}}function Qy(e){return bq.some(n=>n===e)}const mb={clear:"new",summarize:"compact"};function xk(e){const n=e.toLowerCase();return Qy(n)?n:Object.hasOwn(mb,n)?mb[n]:null}function yq(e){return Object.keys(mb).filter(n=>mb[n]===e)}function VFn(e,n){return e.name.toLowerCase().startsWith(n)||e.plugin&&`${e.plugin}:${e.name}`.toLowerCase().startsWith(n)?!0:e.source==="command"&&Qy(e.name)&&yq(e.name).some(t=>t.startsWith(n))}function N4(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?h:s}${a.slice(h.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 eM(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 xq(e){return bq.filter(n=>n!=="plan"||e)}function XFn(e,n){const t=e.filter(r=>!xk(r.name));for(const r of xq(n))t.push(KFn(r));return t.sort((r,s)=>+(s.source==="command")-+(r.source==="command")||yk(r).localeCompare(yk(s),void 0,{sensitivity:"base"}))}function z4(e){return e==="plan"||e==="goal"||e==="side"}function YFn(e,n){for(const t of xq(n).sort((r,s)=>+(r==="plan")-+(s==="plan"))){const r=[t,...yq(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 j4(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const ZFn=["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 JFn=null;function tM(e,n){const t=JFn??(JFn=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(tm(e)).width-t.measureText(`/${e}`).width;return Math.max(1,Math.ceil((s+6)/t.measureText(" ").width))}const eHn={plan:z7n,goal:L$,new:c8n,resume:I$,model:qS,compact:s7n,copy:Yu,export:Wb,side:P0};function wq({name:e,className:n}){const t=Qy(e)?eHn[e]:x8n;return _.jsx(t,{size:16,strokeWidth:1.5,className:n,"aria-hidden":"true"})}function kq({name:e}){return _.jsxs(_.Fragment,{children:[_.jsx(wq,{name:e,className:"me-1 inline-block align-middle"}),tm(e)]})}function Sq(e,n,t,r,s,i=!1){let a=0;return WFn(e,n).map((o,c,u)=>{var m,w;const h=a+o.text.length;a=h;const f=o.text.slice(1).toLowerCase();if(o.command&&s)return s(o.text,f,h,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(kq,{name:f})},c):i?_.jsx("span",{"aria-hidden":"true",children:o.text},c):_.jsx(T.Fragment,{children:p},c)})}function tHn({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(),[h,f]=T.useState(!1),p=ut({...Wkn(n,s,r.harness),enabled:h,subscribed:h}),m=p.data??null,w=p.isFetching,[k,v]=T.useState({}),b=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},y=()=>{const N=a.current;if(!N)return;const j=N.getBoundingClientRect(),A=Math.min(420,window.innerWidth-32),z=Math.max(16,Math.min(j.left-4,window.innerWidth-A-16));v(j.top>300?{bottom:window.innerHeight-j.top+12,left:z,width:A}:{left:z,top:j.bottom+12,width:A})},x=()=>{b(),y(),f(!0)},C=()=>{b(),c.current=window.setTimeout(()=>f(!1),120)};return T.useEffect(()=>()=>b(),[]),T.useEffect(()=>{if(!h)return;const N=()=>y();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[h]),_.jsxs(T.Fragment,{children:[_.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":h,"aria-label":jJ({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:x,onMouseLeave:C,onFocus:x,onBlur:C,onKeyDown:N=>{var j,A;if(N.key==="Escape"){f(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),x();return}h&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(j=o.current)==null||j.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),h&&(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 j,A;N.preventDefault(),(j=i.current)==null||j.focus(),(A=i.current)==null||A.setSelectionRange(t,t),b()},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(kq,{name:n})})]})})]}),h&&si.createPortal(_.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":Iee({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:b,onMouseLeave:C,onFocus:b,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:tm(n)}),_.jsx(Wt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:wcn()})]}),_.jsx("div",{className:"p-4 text-sm text-text",children:w&&m===null?_.jsx("span",{className:"text-muted",children:jcn()}):_.jsx(_c,{text:m??r.description})})]}),document.body)]})}function nHn({text:e,isCommand:n}){return _.jsx(_.Fragment,{children:Sq(e,n,"skill-chip me-0.5 whitespace-nowrap font-normal text-skill-blue")})}function rHn({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 ZFn)c.style.setProperty(p,f.getPropertyValue(p));c.style.width=`${o.clientWidth+parseFloat(f.borderLeftWidth)+parseFloat(f.borderRightWidth)}px`};u();const h=new ResizeObserver(u);return h.observe(o),()=>h.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:[Sq(e,t,"",void 0,(o,c,u,h)=>{if(u===n)return _.jsx("span",{"aria-hidden":"true",children:o},`${h}:${u}`);const f=r.find(p=>p.name===FC(c));return f&&f.source!=="command"?_.jsx(tHn,{label:o,name:c,end:u,skill:f,projectId:s,textareaRef:i},`${h}:${u}`):_.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[_.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${h}:${u}`)},!0),"​"]})}function sHn({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(wq,{name:i.name,className:"shrink-0"}),_.jsx("span",{className:"skill-name shrink-0",children:yk(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:Lcn()}),i.source==="project"&&_.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:RL()})]},i.name))})}function iHn(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const wk=6.5,nM=2*Math.PI*wk;function aHn({usage:e}){return!e||e.usedTokens<=0?null:_.jsx(oHn,{usage:e})}function oHn({usage:e}){const{open:n,setOpen:t,ref:r}=Ki(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":iHn(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:VOe(),onClick:()=>t(u=>!u),children:a===null?c1(s):_.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[_.jsx("circle",{cx:"8",cy:"8",r:wk,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),_.jsx("circle",{cx:"8",cy:"8",r:wk,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${nM*Math.max(a,2)/100} ${nM}`,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:POe()}),_.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?eDe({value:Ce(c1(s))}):oDe({used:Ce(c1(s)),total:Ce(c1(i)),percent:Ce(c)})})]}),a!==null&&_.jsx(cq,{value:s,max:i,fillColor:o})]})]})}function cHn(e,n,t){const r=e.map(t);return n<0?r:[...r.slice(0,n),_.jsxs("div",{role:"group","aria-label":nj(),children:[_.jsx("div",{className:"px-2.5 pb-1 pt-2.5 text-sm font-medium text-subtext",children:nj()}),r.slice(n)]},"from-terminal")]}function lHn({activeSessionId:e,onClose:n,onResume:t,onImport:r}){const s=T.useRef(null),i=T.useRef(null),{data:a,isPending:o,error:c}=ut(Zkn()),{data:u=[]}=ut(zh()),{data:h=[]}=ut(YI()),[f,p]=T.useState(""),[m,w]=T.useState(0);Dm(s,n);const k=T.useMemo(()=>new Map(u.map(N=>[N.id,N.name])),[u]),v=T.useMemo(()=>{const N=f.trim().toLowerCase(),j=M=>!N||M.toLowerCase().includes(N),A=(a??[]).filter(M=>M.id!==e).filter(M=>j(`${M.title??""} ${k.get(M.projectId)??""} ${bu[M.harness]}`)).map(M=>({kind:"session",key:M.id,session:M})),z=h.filter(M=>j(`${M.title??""} ${M.cwd??""} ${bu[M.harness]}`)).map(M=>({kind:"native",key:`${M.harness}:${M.nativeId}`,chat:M}));return[...A,...z]},[a,h,f,e,k]),b=T.useMemo(()=>v.findIndex(N=>N.kind==="native"),[v]),y=Math.min(m,Math.max(0,v.length-1));T.useLayoutEffect(()=>{var N;(N=i.current)==null||N.scrollIntoView({block:"nearest"})},[y,v]);const x=N=>(N==null?void 0:N.split("/").filter(Boolean).at(-1))??"",C=N=>N.kind==="native"?r(N.chat):t(N.session);return si.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":sj(),tabIndex:-1,children:[_.jsx("div",{className:"border-b border-border p-3",children:_.jsx(Br,{"data-initial-focus":!0,value:f,placeholder:rj(),"aria-label":rj(),role:"combobox","aria-autocomplete":"list","aria-expanded":v.length>0,"aria-controls":"resume-options","aria-activedescendant":v[y]?`resume-option-${v[y].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 j=N.key==="ArrowDown"?1:-1;w((y+j+v.length)%v.length)}else N.key==="Enter"&&v[y]&&(N.preventDefault(),C(v[y]))}})}),_.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?sj():void 0,children:o?_.jsxs(Pr,{className:"px-2.5 py-2",role:"status",children:[_.jsx(St,{})," ",xS()]}):c&&!a?_.jsx("div",{className:"px-2.5 py-2 text-sm text-accent-red",role:"alert",children:yS({error:Ce(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:FNt()}):cHn(v,b,(N,j)=>{var D;const A=N.kind==="native"?N.chat:null,z=N.kind==="session"?N.session:null;return _.jsxs(vn,{id:`resume-option-${N.key}`,ref:j===y?i:void 0,type:"button",role:"option","aria-selected":j===y,active:j===y,tabIndex:-1,className:"gap-2.5 text-text",onMouseEnter:()=>w(j),onClick:()=>C(N),children:[_.jsx(Th,{harness:(A==null?void 0:A.harness)??(z==null?void 0:z.harness)??"claude-code"}),_.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",children:((D=(A==null?void 0:A.title)??(z==null?void 0:z.title))==null?void 0:D.trim())||Md()}),_.jsx("span",{dir:"auto",className:"max-w-40 shrink-0 truncate text-muted",title:(A==null?void 0:A.cwd)??void 0,children:A?x(A.cwd):k.get((z==null?void 0:z.projectId)??"")??""}),_.jsx("span",{className:"shrink-0 text-muted tabular-nums",children:vo((A==null?void 0:A.updatedAt)??(z==null?void 0:z.updatedAt)??0)})]},N.key)})})]})}),document.body)}const gb="!";function rM(e){return e.startsWith(gb)?e.slice(gb.length).trim():null}function uHn(e){return e.startsWith(gb)?e.slice(gb.length):e}function _Hn(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 fHn(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 dHn(e){const n=Math.max(0,...Array.from(e.matchAll(/`+/g),r=>r[0].length)),t="`".repeat(Math.max(3,n+1));return` +`,u+3),p=f===-1?e.length:f;/^[ \t]*$/.test(e.slice(h,u))&&/^[ \t\r]*$/.test(e.slice(u+3,p))&&a.push(u)}for(let u=0;u+1`$$${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}`)),vFn(t,n)}function nq(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 xFn(e){return e==="Enter"?"keepOpen":e===" "?"preview":null}function Wr(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=xFn(r.key);s&&(r.preventDefault(),t(r),e(s))}}}const rq=T.createContext(void 0);function sq({projectId:e,sessionId:n,children:t}){const r=T.useMemo(()=>(i,a=!1)=>{if(/^(https?:)?\/\//i.test(i))return i;const o=cF(i);return o?(o.source==="absolute"?DI(o.path):o.source==="artifact"&&!a?Bu(e,o.path):G3(e,o.source==="artifact"?`artifacts/${o.path}`:o.path,{sessionId:n??void 0}))+o.hash:null},[e,n]),s=T.useMemo(()=>({sessionId:n??void 0}),[n]);return _.jsx(rq,{value:r,children:_.jsx(ly,{value:s,children:t})})}function wFn({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}),[h,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=h.width&&c.width?Math.min(1,c.width*.9/h.width,c.height*.9/h.height):1;return ii.createPortal(_.jsxs("dialog",{ref:s,tabIndex:-1,"aria-label":n||hL(),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:h.width?{width:h.width*p*a,height:h.height*p*a}:void 0,className:`pointer-events-auto block m-auto shrink-0 max-w-none rounded-lg shadow-modal ${h.width&&c.width?"visible":"invisible"}`})})}),_.jsxs("div",{className:"absolute top-5 right-5 flex gap-2",children:[_.jsx(Wh,{shape:"circle",href:e,download:t||!0,"aria-label":R3(),title:R3(),className:"bg-background shadow-popover",children:_.jsx(Kb,{size:16})}),_.jsx(It,{shape:"circle",onClick:r,"aria-label":H3(),title:H3(),className:"bg-background shadow-popover",children:_.jsx(xr,{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(It,{shape:"circle",disabled:a<=.25,onClick:()=>o(m=>Math.max(.25,m-.25)),"aria-label":Ez(),title:Ez(),children:_.jsx(w8n,{size:16})}),_.jsxs(De,{variant:"ghost",className:"min-w-16 tabular-nums",onClick:()=>o(1),title:Nz(),"aria-label":Nz(),children:[Math.round(a*100),"%"]}),_.jsx(It,{shape:"circle",disabled:a>=4,onClick:()=>o(m=>Math.min(4,m+.25)),"aria-label":Cz(),title:Cz(),children:_.jsx(Qh,{size:16})})]})]})]}),document.body)}function kFn({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:h=>{h.preventDefault(),h.stopPropagation(),c(!0)},onKeyDown:h=>{(h.key==="Enter"||h.key===" ")&&(h.preventDefault(),h.stopPropagation(),c(!0))},onError:!i&&n&&n!==e?()=>a(!0):void 0}),o&&u&&_.jsx(wFn,{src:u,alt:r,name:t,onClose:()=>c(!1)})]})}const SFn=1e5;function CFn({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(It,{size:"small",className:"md-code-copy absolute top-1.5 end-1.5 bg-background opacity-0",title:SS(),"aria-label":Yrt(),onClick:s,children:t?_.jsx(yi,{size:13}):_.jsx(Zu,{size:13})}),_.jsx("pre",{children:_.jsx("code",{children:pNn(e,n,SFn)})})]})}function EFn(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 KR(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=EFn(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:x4(e,s,a.index)});const h=a.index+a[0].length;r.push({children:[],data:{hName:o==="run"?"run-mention":"file-mention",hProperties:c},position:x4(e,a.index,h),type:o==="run"?"runMention":"fileMention"}),s=h}return i?(siq(e)}function QR({path:e,line:n,exp:t,onOpenFile:r}){const s=e.split("/").pop()||e,i=n!=null?`${s}:${n}`:s,a=ONn(e,t),o=Wr(c=>r==null?void 0:r(e,n,t,void 0,c));return _.jsxs(_.Fragment,{children:[_.jsxs("button",{className:"file-chip",title:r?PZ({path:Ce(e)}):e,...o,...a.handlers,onKeyDown:c=>{var u,h;(h=(u=a.handlers).onKeyDown)==null||h.call(u,c),c.defaultPrevented||o.onKeyDown(c)},disabled:!r,children:[_.jsx(O$,{size:12}),_.jsx("span",{className:"file-chip-label",children:i}),_.jsx(F$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]}),a.menu&&_.jsx(DNn,{...a.menu,onOpen:()=>r==null?void 0:r(e,n,t,void 0,"keepOpen")})]})}function zFn({id:e,label:n,onOpenRun:t}){return _.jsxs("button",{className:"file-chip run-chip",title:t?dJ({id:Ce(e)}):hee({id:Ce(e)}),...Wr(r=>t==null?void 0:t(e,r)),disabled:!t,children:[_.jsx(KS,{size:12}),_.jsx("span",{className:"file-chip-label",children:n||NI()}),_.jsx(F$,{className:"file-chip-open",size:12,"aria-hidden":"true"})]})}const aq={singleDollarTextMath:!0},jFn=Ay().use(Ny).use(JH).use(eq,aq).use(_Fn).use(NFn).use(ob).use(nDn).use(zH);function AFn(e){return!(/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("#")||e.startsWith("//"))}const oq={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?g5(i[1]):null;return _.jsx(CFn,{code:a,lang:c})},pre:({children:e})=>_.jsx(_.Fragment,{children:e})};function TFn({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}){Xu();const o=T.useContext(rq),c=i??o,u=T.useMemo(()=>({"file-mention":h=>{const f=q5(h.path),p=h.lines&&tDn(h.lines)||f.line;return _.jsx(QR,{path:f.path,line:p,exp:h.exp,onOpenFile:t})},"run-mention":h=>_.jsx(zFn,{id:h.id,label:h.label,onOpenRun:r}),a:({node:h,href:f,children:p,"data-figure-src":m,"data-cited-href":w,...k})=>{const v=typeof m=="string"?cF(m):null;if(v&&t){const x=v.source==="artifact"?`artifacts/${v.path}`:v.path,C=s?s(x):x;if(C)return _.jsx("button",{type:"button",className:"text-primary underline cursor-pointer text-start",...Wr(N=>t(C,void 0,void 0,void 0,N)),children:p})}const b=typeof w=="string"?w:f,y=b?q5(b):null;if(y&&AFn(y.path)&&t){let x;try{x=decodeURI(y.path)}catch{return _.jsx("span",{children:p})}const C=s?s(x):x;return C?_.jsx(QR,{path:C,line:y.line,onOpenFile:t}):_.jsx("span",{children:p})}return _.jsx("a",{href:f,target:"_blank",rel:"noopener noreferrer",...k,children:p})},figure:({children:h})=>_.jsx(TFn,{children:h}),figcaption:({children:h})=>_.jsx("figcaption",{className:"mt-3 text-sm italic leading-relaxed text-text",children:h}),th:({node:h,...f})=>_.jsx("th",{dir:"auto",...f}),td:({node:h,...f})=>_.jsx("td",{dir:"auto",...f}),img:({node:h,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(kFn,{...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},...oq}),[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(kLn,{content:nq(n,{predictMath:a}),processor:jFn,components:u,predict:a})})}),XR="prompt-actions plan-strip-actions flex flex-wrap justify-end gap-x-2 gap-y-1.5";function RFn({synthesized:e,agentLabel:n,onView:t,onApprove:r,showResumeModes:s,onReject:i,onRevise:a}){const[o,c]=T.useState(!1),u=T.useRef(null),[h,f]=T.useState(!1),[p,m]=T.useState(""),w=T.useRef(null);T.useEffect(()=>{if(!o)return;const v=b=>{u.current&&!u.current.contains(b.target)&&c(!1)};return window.addEventListener("pointerdown",v),()=>window.removeEventListener("pointerdown",v)},[o]),T.useEffect(()=>{var v;h&&((v=w.current)==null||v.focus())},[h]);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(KS,{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?d3t({agent:Ce(n)}):a3t({agent:Ce(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",...Wr(t),children:M3t()})]}),h?_.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:o5t(),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:XR,children:[_.jsx(De,{size:"small",onClick:()=>{m(""),f(!1)},children:GL()}),_.jsx("span",{className:"plan-strip-spacer flex-1"}),_.jsxs(De,{size:"small",variant:"primary",onClick:k,children:[K3t(),_.jsx(M$,{size:13})]})]})]}):_.jsxs("div",{className:XR,children:[_.jsx(De,{size:"small",onClick:i,children:P3t()}),_.jsx(De,{size:"small",onClick:()=>f(!0),children:e5t()}),_.jsx("span",{className:"plan-strip-spacer flex-1"}),s?_.jsxs("div",{className:"plan-strip-approve relative flex",ref:u,children:[_.jsx(De,{size:"small",variant:"primary",className:"rounded-e-none",onClick:()=>r("auto"),children:B4t()}),_.jsx(De,{size:"small",variant:"primary",className:"rounded-s-none border-s-plan-caret px-1.5","aria-label":E3t(),onClick:()=>c(v=>!v),children:_.jsx(mc,{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(vn,{onClick:()=>{c(!1),r("bypassPermissions")},children:V4t()})})]}):_.jsx(De,{size:"small",variant:"primary",onClick:()=>r(),children:J4t()})]})]})}function YR({save:e,onSaved:n,placeholder:t,createHref:r,createLabel:s}){const[i,a]=T.useState(""),[o,c]=T.useState(!1),[u,h]=T.useState(null);async function f(p){if(p.preventDefault(),!(o||!i.trim())){c(!0),h(null);try{n(await e(i.trim())),a("")}catch(m){h(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(De,{type:"submit",disabled:o||!i.trim(),children:o?Sa():pc()}),_.jsx("a",{href:r,target:"_blank",rel:"noreferrer",children:s??mXe()}),u&&_.jsx("div",{className:"error",children:u})]})}function cq({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 MFn({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:[phn(),_.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:oI()},...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),Z5n(r||null).catch(s=>{Zt(s instanceof Error?s.message:String(s),"error")}).finally(()=>t(!1))}})})]})}function OFn({host:e,connecting:n,reference:t,onChange:r}){const s=T.useId(),i=pn({mutationFn:Y5n,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:LL()}),_.jsxs("div",{className:"mt-3 grid max-w-xl gap-3",children:[_.jsxs("label",{className:"text-sm text-subtext",children:[Lhn(),_.jsx(lc,{variant:"field",dropDown:!0,value:t!==null?"container":"host",disabled:n,choices:[{id:"host",label:whn()},{id:"container",label:jhn()}],onSelect:o=>a(o==="container"?"":null)})]}),t!==null&&_.jsxs("label",{className:"text-sm text-subtext",htmlFor:`${s}-container`,children:[chn(),_.jsx(Br,{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 fc=["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(" "),yf=["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(" "),DFn=["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(" "),Uy="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",Ua=["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(" "),BC=["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(" "),dl=["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(" "),pk=["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(" "),N0=["git-card-actions flex flex-wrap gap-2 mt-3.5 pt-3.5","border-t border-t-border-variant"].join(" "),jd=["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(" "),LFn=new Set(["gh auth login","hf auth login","claude auth status"]);function lq(e){return LFn.has(e)?`/api/settings/commands/run?command=${encodeURIComponent(e)}`:void 0}function Gy(){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 PC({note:e,className:n,disabled:t,resolve:r=lq,onRun:s}){return e?_.jsx("p",{className:n,children:Hu(e,{canRun:i=>!t&&r(i)!==void 0,onRun:i=>{const a=r(i);a&&s(i,a)}})}):null}function Vy({run:e,onComplete:n,onClose:t}){return e?_.jsx(k9n,{path:e.path,label:e.command,onComplete:n,onError:r=>Zt(r,"error"),onClose:t},`${e.command}-${e.attempt}`):null}function w4(e){return e.catalogPending?{cls:"warn",variant:"warning",label:ff()}:e.authCheckFailed?{cls:"warn",variant:"warning",label:Bv()}:e.agentReady&&!e.authenticated&&e.authMethod!=="local"?{cls:"warn",variant:"warning",label:$L()}:e.agentReady?{cls:"ok",variant:"success",label:e.authMethod==="thirdParty"||ty(e)?Rm():e.authMethod==="local"?ES():cen()}:e.installed?e.installBroken?{cls:"warn",variant:"warning",label:_Gt()}:e.authMethod==="local"?{cls:"warn",variant:"warning",label:BL()}:e.needsConfigRepair||e.authState==="unknown"?{cls:"warn",variant:"warning",label:Bv()}:e.authState==="unsupported"?{cls:"warn",variant:"warning",label:wnn()}:{cls:"warn",variant:"warning",label:cI()}:{cls:"warn",variant:"warning",label:LQt()}}function IFn({h:e}){if(e.id==="opencode"&&e.agentReady&&!e.authenticated&&!e.authMethod)return _.jsx(_.Fragment,{children:VMt()});const n=ty(e);return n?_.jsx(_.Fragment,{children:n}):e.authMethod?e.authMethod==="local"?_.jsx(_.Fragment,{children:$v()}):e.authMethod==="thirdParty"?_.jsx(_.Fragment,{children:pI()}):_.jsx(_.Fragment,{children:e.authMethod==="oauth"?J$t():CS()}):_.jsx(_.Fragment,{children:"—"})}function $Fn(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 BFn({remote:e}){const n=Pu(),{data:t=null}=ut(n),[r,s]=T.useState(null),[i,a]=T.useState(!1),o=Gy(),[c,u]=T.useState(null),h=ut(XI()),f=(w,k=!1)=>{a(!0),hf(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:P3()}),!e&&c&&h.data&&_.jsx(iB,{harness:c,commands:h.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:P3(),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(Th,{harness:k.id})},renderLabel:w=>{const k=p.find(b=>b.id===w.id),v=k&&w4(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:fc,children:[_.jsxs("div",{className:"settings-card-head flex items-center gap-2.5 mb-3",children:[_.jsx(Wt,{variant:w4(m).variant,children:w4(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(De,{size:"small",onClick:()=>u(m),disabled:!h.data,"aria-haspopup":"dialog",children:[_.jsx(Mf,{size:14})," ",AL()]}),_.jsxs(De,{size:"small",onClick:()=>f(!0,!0),disabled:i,children:[_.jsx(Ka,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),_.jsxs("div",{className:zs(yf,"[&_.v]:text-sm"),children:[_.jsx("span",{className:"k",children:RPt()}),_.jsx("span",{className:"v",children:m.binPath??E$t()}),_.jsx("span",{className:"k",children:hI()}),_.jsx("span",{className:"v",children:m.version??"—"}),_.jsx("span",{className:"k",children:JBt()}),_.jsx("span",{className:"v",children:_.jsx(IFn,{h:m})}),m.account&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:m.id==="opencode"?pI():AS()}),_.jsx("span",{className:"v",children:m.account})]}),m.org&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:WXt()}),_.jsx("span",{className:"v",children:m.org})]}),m.plan&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:QYt()}),_.jsx("span",{className:"v",children:m.plan})]}),_.jsx("span",{className:"k",children:PBt()}),_.jsx("span",{className:"v",children:m.catalogPending?ff():m.models.length>0?bIt({count:Jt(m.models.length),models:new Intl.ListFormat(E()).format(m.models.slice(0,4).map(w=>Ce(nv(w))))}):m.agentReady?M3():jS()})]}),_.jsx(PC,{note:m.agentNote,className:zs(Ua,"text-sm"),disabled:e,resolve:w=>{var k;return $Fn(m,(k=h.data)==null?void 0:k[m.id],w)??lq(w)},onRun:(w,k)=>o.start(w,k,m.id)}),o.run&&_.jsx("div",{hidden:o.run.owner!==m.id,children:_.jsx(Vy,{run:o.run,onComplete:()=>f(!0,!0),onClose:o.clear})}),m.id==="opencode"&&_.jsx(uB,{installed:m.installed})]}):null:_.jsxs(Pr,{children:[_.jsx(kt,{})," ",Eqt()]})]})}function PFn({s:e}){const n=e.preflight;return n.kubectlFound?n.reachable?n.canCreateJobs?_.jsx(Wt,{variant:"success",children:sHt()}):_.jsx(Wt,{variant:"error",children:LWt()}):_.jsx(Wt,{variant:"error",children:$Ft()}):_.jsx(Wt,{variant:"error",children:ZGt()})}function FFn({onEditState:e}){var A;const n=pn({mutationFn:H5n}),t=Cj(),r=ut(t),s=r.data??null,i=z=>{Kr(t.queryKey,M=>(typeof z=="function"?z(M??null):z)??void 0)},a=s?null:((A=r.error)==null?void 0:A.message)??null,[o,c]=T.useState(""),[u,h]=T.useState(""),[f,p]=T.useState(!1),[m,w]=T.useState(!1),[k,v]=T.useState(null),b=z=>{i(z),c(z.context??""),h(z.namespace)},y=T.useRef(null);T.useEffect(()=>{const z=y.current;y.current=s,s&&(!z||o===(z.context??"")&&u.trim()===z.namespace)&&(c(s.context??""),h(s.namespace??""))},[s,o,u]);const x=s!==null&&o===(s.context??"")&&u.trim()===s.namespace,C=s!==null&&!x;T.useEffect(()=>{e==null||e({dirty:C,saving:f})},[C,f,e]);async function N(){if(!(m||f||!x)){w(!0);try{await tt.fetchQuery({...Cj(),staleTime:0})}catch(z){Zt(z instanceof Error?z.message:String(z),"error")}finally{w(!1)}}}async function j(z){if(z.preventDefault(),!(f||m)){p(!0),v(null);try{b(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:Kh()}),_.jsx("dd",{className:"m-0",children:m||f?_.jsx(Wt,{children:ya()}):C?_.jsx(Wt,{children:EL()}):_.jsx(PFn,{s})})]}),x&&!m&&!f&&s.preflight.error&&_.jsx("p",{className:`${Uy} break-words`,children:s.preflight.error}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:j,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[_Ht(),_.jsx(lc,{choices:[{id:"",label:s.currentContext?rLt({context:Ce(s.currentContext)}):XDt()},...o&&!s.contexts.includes(o)?[{id:o,label:M$t({context:Ce(o)})}]:[],...s.contexts.map(z=>({id:z,label:z}))],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:[FKt(),_.jsx(Br,{type:"text",value:u,disabled:f||m,onChange:z=>h(z.target.value),placeholder:JHt(),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(De,{type:"button",onClick:()=>void N(),disabled:f||m||!x,children:[_.jsx(Ka,{size:13})," ",m?ya():Am()]}),_.jsx(De,{variant:"primary",type:"submit",disabled:f||m||x,children:f?Sa():pc()})]})]})]}):_.jsxs(Pr,{children:[_.jsx(kt,{})," ",iFt()]})})}function HFn(){var x;const e=pn({mutationFn:C=>U5n(...C)}),n=Ej(),t=ut(n),r=t.data??null,s=C=>{Kr(n.queryKey,N=>(typeof C=="function"?C(N??null):C)??void 0)},[i,a]=T.useState(null),o=i??((x=t.error)==null?void 0:x.message)??null,[c,u]=T.useState(""),[h,f]=T.useState(""),[p,m]=T.useState(!1),w=t.isPending||p,[k,v]=T.useState(!1);async function b(){if(!(w||k)){m(!0),a(null);try{await tt.fetchQuery({...Ej(),staleTime:0})}catch(C){a(C instanceof Error?C.message:String(C))}finally{m(!1)}}}async function y(C){if(C.preventDefault(),!(!c.trim()||!h.trim()||w||k||r!=null&&r.processEnv)){v(!0),a(null);try{s(await e.mutateAsync([c.trim(),h.trim()])),u(""),f("")}catch(N){a(N instanceof Error?N.message:String(N))}finally{v(!1)}}}return _.jsxs(_.Fragment,{children:[!r&&w?_.jsxs(Pr,{children:[_.jsx(kt,{})," ",fFt()]}):r&&_.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[_.jsx("dt",{className:"font-medium text-subtext",children:Kh()}),_.jsx("dd",{className:"m-0",children:_.jsx(Wt,{variant:r.tokenConfigured?"success":"warning",children:r.tokenConfigured?Rm():Fb()})})]}),(r==null?void 0:r.processEnv)&&_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:TLt()}),_.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:[r!=null&&r.tokenConfigured?$Lt():iIt(),_.jsx(Br,{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?GLt():fIt(),_.jsx(Br,{type:"password",value:h,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:ZLt()}),o&&_.jsx("p",{className:"m-0 text-sm text-accent-red",children:o}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(De,{type:"button",disabled:w||k,onClick:()=>void b(),children:[_.jsx(Ka,{size:13})," ",Mm()]}),_.jsx(De,{variant:"primary",type:"submit",disabled:!c.trim()||!h.trim()||w||k||(r==null?void 0:r.processEnv),children:k?Sa():pc()})]})]})]})}const uq="rounded-sm border-border-strong bg-surface text-subtext",_q="rounded-sm border-accent-blue bg-accent-blue-subtle text-accent-blue",qFn=5e3;function fq(e){const n=xi(),t=e.map(a=>Nj(a)),r=XK({queries:t.map(a=>({...a,refetchInterval:qFn}))});return[Object.fromEntries(e.flatMap((a,o)=>r[o].data?[[a,r[o].data.running]]:[])),a=>{zn(n)&&Kr(Nj(a).queryKey,{running:!0})}]}function UFn({test:e,connecting:n,masterRunning:t,containerFailed:r=!1}){if(n)return _.jsx("span",{role:"status",children:_.jsx(Wt,{className:_q,children:YL()})});if(e===void 0)return _.jsx(Wt,{className:uq,children:aI()});const s=e.missingTools??[],i=e.reachable&&e.toolsFound&&t===!1,a=!e.reachable||r?_.jsx(Wt,{className:"rounded-sm",variant:"error",children:TS()}):e.toolsFound?i?_.jsx(Wt,{className:"rounded-sm",variant:"warning",children:ZL()}):_.jsx(Wt,{className:"rounded-sm",variant:"success",children:Tm()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:s.length===1?EIt({tool:Ce(s[0])}):MIt()});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:vo(e.testedAt)})]})}function GFn(){var D;const e=QI(),n=ut(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),[h,f]=T.useState(!1),[p,m]=T.useState({}),[w,k]=T.useState(null),[v,b]=T.useState(!1),[y,x]=T.useState(0),C=(t==null?void 0:t.filter(I=>{const B=i[I.host]??I.lastTest;return(B==null?void 0:B.reachable)&&B.toolsFound}).map(I=>I.host))??[],[N,j]=fq(C);function A(I){u.current+=1,f(!1),b(!1),x(B=>B+1),k(I),m(B=>({...B,[I]:!0}))}function z(){u.current+=1,f(!1),b(!1),k(null)}function M(I,B){m(G=>({...G,[I]:!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(MFn,{settings:n.data}),_.jsxs(De,{variant:"ghost",className:"ms-auto",onClick:()=>s(!0),children:[_.jsx(WS,{size:14})," ",wI()]})]}),t===null?_.jsxs(Pr,{children:[_.jsx(kt,{})," ",uI()]}):t.length===0?_.jsx("p",{className:"settings-empty mt-1 mx-0 mb-0 text-base text-subtext",children:jWt()}):_.jsx("div",{className:"border-y border-border-variant divide-y divide-border-variant",children:t.map(I=>{var H,oe,ae;const B=o[I.host]===void 0?I.container??null:o[I.host],G=i[I.host],q=B!==null&&((H=G==null?void 0:G.container)==null?void 0:H.reference)===B.trim()?G:void 0,Q=B!==null?q:G!=null&&G.container?I.lastTest:G??I.lastTest,K=(oe=q==null?void 0:q.container)==null?void 0:oe.error,Z=((ae=q==null?void 0:q.container)==null?void 0:ae.ready)===!1,J=(Q==null?void 0:Q.error)||K,$=w===I.host,L=p[I.host]??!1,F=$||!!J,U=`${I.user?`${I.user}@`:""}${I.hostname??I.host}${I.port?`:${I.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:I.host,children:I.host}),_.jsx("div",{className:"mt-1 truncate text-sm text-subtext",title:U,children:U})]})}),_.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(UFn,{test:Q,connecting:$&&!v,masterRunning:N[I.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":L,"aria-label":L?aY({name:Ce(I.host)}):VY({name:Ce(I.host)}),onClick:ue=>{ue.stopPropagation(),M(I.host,L)},children:_.jsx(mc,{size:18,className:`text-muted transition-transform duration-120 ease-standard${L?" rotate-180":""}`})})]}),_.jsx(De,{size:"small",type:"button",className:"justify-self-end",onClick:ue=>{ue.stopPropagation(),$&&!v?z():A(I.host)},disabled:!$&&(w!==null&&!v||B!==null&&!B.trim()),children:$?v?ri():df():(Q==null?void 0:Q.reachable)===!1||Z?ri():Q?mI():NS()})]})]}),_.jsx(OFn,{host:I,connecting:$&&!v,reference:B,onChange:ue=>{$&&z(),c(se=>({...se,[I.host]:ue})),a(se=>{const V={...se};return delete V[I.host],V})}}),F&&(L||$)&&_.jsxs("div",{className:`border-t border-t-border-variant py-3${L?"":" hidden"}`,children:[!$&&J&&_.jsx(S9n,{host:I.host,transcript:J}),$&&!h&&_.jsx(ZS,{host:I.host,backend:"ssh",active:L,onComplete:ue=>{if(ue.backend!=="ssh")return;j(I.host);const se=u.current;if(B===null){a(V=>({...V,[I.host]:{...ue.result,container:null}})),b(!1),k(null);return}f(!0),J5n(I.host,B.trim()).then(V=>{u.current===se&&a(ne=>({...ne,[I.host]:{...V,container:V.container??{reference:B.trim(),ready:!1,error:V.error??null}}}))}).catch(V=>{u.current===se&&a(ne=>({...ne,[I.host]:{...ue.result,container:{reference:B.trim(),ready:!1,error:V instanceof Error?V.message:String(V)}}}))}).finally(()=>{u.current===se&&(f(!1),b(!1),k(null))})},onError:ue=>{b(!0),a(se=>({...se,[I.host]:{container:B===null?null:{reference:B.trim(),ready:!1,error:ue},reachable:!1,toolsFound:!1,missingTools:[],error:ue,testedAt:Date.now()}}))}},y)]})]},I.host)})}),r&&_.jsx(DB,{onClose:()=>s(!1)})]})}function VFn({test:e,connecting:n,masterRunning:t}){return n?_.jsx(Wt,{className:_q,children:YL()}):e===null?_.jsx(Wt,{className:uq,children:aI()}):e.reachable?e.slurmFound?e.toolsFound?t===!1?_.jsx(Wt,{className:"rounded-sm",variant:"warning",children:ZL()}):_.jsx(Wt,{className:"rounded-sm",variant:"success",children:Tm()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:dKt()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:uQt()}):_.jsx(Wt,{className:"rounded-sm",variant:"error",children:TS()})}function KFn(){var J;const e=pn({mutationFn:ukn}),n=bSn(),t=ut(n),r=t.data??null,s=$=>{Kr(n.queryKey,L=>(typeof $=="function"?$(L??null):$)??void 0)},i=r?null:((J=t.error)==null?void 0:J.message)??null,[a,o]=T.useState(""),[c,u]=T.useState(""),[h,f]=T.useState(""),[p,m]=T.useState(""),[w,k]=T.useState(!1),[v,b]=T.useState(null),[y,x]=T.useState(null),[C,N]=T.useState(!1),[j,A]=T.useState(!1),[z,M]=T.useState(0),D=a&&(y!=null&&y.reachable)&&y.slurmFound&&y.toolsFound?[a]:[],[I,B]=fq(D);function G(){A(!1),M($=>$+1),N(!0)}const q=$=>{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??"")&&h.trim()===($.account??"")&&p.trim()===($.timeLimit??""))&&(o(r.host??""),u(r.partition??""),f(r.account??""),m(r.timeLimit??""))},[r,a,c,h,p]);const K=r!==null&&a===(r.host??"")&&c.trim()===(r.partition??"")&&h.trim()===(r.account??"")&&p.trim()===(r.timeLimit??"");async function Z($){if($.preventDefault(),!w){k(!0),b(null);try{q(await e.mutateAsync({host:a,partition:c.trim(),account:h.trim(),timeLimit:p.trim()}))}catch(L){b(L instanceof Error?L.message:String(L))}finally{k(!1)}}}return _.jsx(_.Fragment,{children:i?_.jsx("div",{className:"error",children:i}):r?_.jsxs(_.Fragment,{children:[!C&&(y==null?void 0:y.error)&&_.jsx("p",{className:Uy,children:y.error}),_.jsxs("form",{className:BC,onSubmit:Z,children:[_.jsx("div",{className:"max-w-xl",children:_.jsxs("label",{children:[JVt(),_.jsx(lc,{choices:[{id:"",label:oI()},...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($),x(null),N(!1),A(!1)}})]})}),_.jsxs("div",{className:"actions",children:[_.jsx(De,{type:"button",onClick:()=>{C&&!j?(A(!1),N(!1)):G()},disabled:!a,title:a?void 0:xrn(),children:C?j?ri():df():y?mI():NS()}),_.jsx("span",{role:"status",children:_.jsx(VFn,{test:y,connecting:C&&!j,masterRunning:I[a]})})]}),_.jsxs("div",{className:"mt-5 border-t border-border pt-5",children:[_.jsxs("div",{className:"row2",children:[_.jsxs("label",{children:[DYt(),_.jsx(Br,{type:"text",list:"slurm-partitions",value:c,onChange:$=>u($.target.value),placeholder:lj(),autoComplete:"off",spellCheck:!1}),_.jsx("datalist",{id:"slurm-partitions",children:y==null?void 0:y.partitions.map($=>_.jsx("option",{value:$},$))})]}),_.jsxs("label",{children:[AS(),_.jsx(Br,{type:"text",value:h,onChange:$=>f($.target.value),placeholder:lj(),autoComplete:"off",spellCheck:!1})]})]}),_.jsxs("label",{className:"mt-3 block max-w-xl",children:[rnn(),_.jsx(Br,{type:"text",value:p,onChange:$=>m($.target.value),placeholder:TFt(),autoComplete:"off",spellCheck:!1})]})]}),v&&_.jsx("div",{className:"error",children:v}),_.jsx("div",{className:"actions",children:_.jsx(De,{variant:"primary",type:"submit",disabled:w||K||C,children:w?Sa():pc()})})]}),C&&_.jsx(ZS,{host:a,backend:"slurm",onComplete:$=>{$.backend==="slurm"&&(x($.result),B(a),A(!1),N(!1))},onError:$=>{A(!0),x({reachable:!1,slurmFound:!1,toolsFound:!1,partitions:[],error:$})}},z)]}):_.jsxs(Pr,{children:[_.jsx(kt,{})," ",CVt()]})})}function WFn(){var C;const e=pn({mutationFn:fkn}),n=ySn(),t=ut(n),r=t.data??null,s=N=>{Kr(n.queryKey,j=>(typeof N=="function"?N(j??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),[h,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 b=r!==null&&a===(r.address??"");async function y(N){if(N.preventDefault(),!c){u(!0),f(null);try{k(await e.mutateAsync({address:a}))}catch(j){f(j instanceof Error?j.message:String(j))}finally{u(!1)}}}async function x(){m("testing");try{m(await dkn(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:Uy,children:w.error}),_.jsxs("form",{className:BC,onSubmit:y,children:[_.jsxs("label",{children:[GGt(),_.jsx(Br,{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:[Pqt(),": ",Ce(r.resolvedAddress)," · ",_I(),": ",r.source]}),h&&_.jsx("div",{className:"error",children:h}),_.jsxs("div",{className:"actions",children:[_.jsx(De,{variant:"primary",type:"submit",disabled:c||b,children:c?Sa():pc()}),_.jsx(De,{type:"button",onClick:()=>void x(),disabled:p==="testing",children:ptn()}),_.jsx(QFn,{test:p})]}),(w==null?void 0:w.reachable)&&w.rayVersion&&_.jsxs("p",{className:"m-0 text-sm text-subtext",children:[lZt(),": ",w.rayVersion]})]})]}):_.jsxs(Pr,{children:[_.jsx(kt,{})," ",vVt()]})})}function QFn({test:e}){return e===null?null:e==="testing"?_.jsx(Wt,{children:wtn()}):e.reachable?_.jsx(Wt,{variant:"success",children:mZt()}):_.jsx(Wt,{variant:"error",children:TS()})}function XFn(e){const n=e.chip??`${e.os}/${e.arch}`,t=e.memBytes===null?null:_l(e.memBytes),r=e.gpus.length===0?null:NOt({count:e.gpus.length});return[n,e.cpuCount>0?JRt({count:e.cpuCount}):null,t,r].filter(Boolean).join(" · ")}function YFn({remote:e}){var p;const n=ut(wSn()),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,h]=T.useState(!1),f=()=>n.refetch();return _.jsxs(_.Fragment,{children:[r&&!t?_.jsx("div",{className:"error",children:r}):_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:DFn,children:[_.jsx("span",{className:"k",children:Kh()}),_.jsx("span",{className:"v",children:!t&&s||u?_.jsxs(Wt,{className:"gap-1.5",role:"status",children:[_.jsx(kt,{}),u?dBt():ya()]}):r?_.jsx(Wt,{variant:"warning",children:Bv()}):t?t.loggedIn?t.sshKeyStatus==="matched"?_.jsx(Wt,{variant:"success",children:Tm()}):t.sshKeyStatus==="unknown"?_.jsx(Wt,{variant:"warning",children:Bv()}):_.jsx(Wt,{variant:"warning",children:Fb()}):_.jsx(Wt,{variant:"warning",children:cI()}):null}),_.jsx("span",{className:"k",children:tYt()}),_.jsx("span",{className:"v",children:t!=null&&t.loggedIn&&t.orgs.length>0?t.orgs.join(", "):"—"}),_.jsx("span",{className:"k",children:xen()}),_.jsx("span",{className:"v",children:t!=null&&t.loggedIn?t.sshKeyStatus==="matched"?_.jsx(Wt,{variant:"success",children:pXt()}):t.sshKeyStatus==="no_local_match"?_.jsx(Wt,{variant:"warning",children:XQt()}):t.sshKeyStatus==="none_registered"?_.jsx(Wt,{variant:"error",children:gQt()}):_.jsx(Wt,{children:fI()}):"—"})]}),e&&t&&!t.loggedIn&&_.jsx("p",{className:"mt-4 mb-0 text-sm text-subtext",children:gLt({command:Ce("orx login")})}),!e&&i>0&&_.jsx(w9n,{login:o,onComplete:()=>{h(!1),a(0),f()},onError:m=>{h(!1),Zt(m,"error")}},i),e&&(t==null?void 0:t.loggedIn)&&t.sshKeyStatus==="none_registered"&&(t.sshKeyPath?_.jsxs("p",{dir:"auto",className:Ua,children:[EBt()," ",_.jsxs("code",{children:["orx ssh-key add ",t.sshKeyPath]}),"."]}):_.jsxs("p",{dir:"auto",className:Ua,children:[rQt()," ",_.jsx("code",{children:"ssh-keygen -t ed25519"}),jtn()," ",_.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:Ua,children:Prn({register:Ce(`orx ssh-key add ${t.sshKeyPath}`),load:Ce("ssh-add")})}):_.jsxs("p",{dir:"auto",className:Ua,children:[XWt()," ",_.jsx("code",{children:"ssh-add"}),FXt()," ",_.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(De,{onClick:()=>void f(),disabled:s||u,children:[_.jsx(Ka,{size:13})," ",s?ya():Am()]}),!e&&t&&(!t.loggedIn||t.sshKeyStatus!=="matched")&&_.jsxs(De,{variant:"primary",disabled:s||u,onClick:()=>{c(!t.loggedIn),h(!0),a(m=>m+1)},children:[u?_.jsx(kt,{}):_.jsx(Mf,{size:13})," ",t.loggedIn?Oin():vI()]})]})]})}const ZFn={local:WRe,ssh:jMe,tinker:LMe,hf:ORe,modal:tMe,k8s:FRe,slurm:wMe,ray:pMe,openresearch:cMe},Ky={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"},ZR=["hf","modal","slurm","ray","openresearch"],k4=["hf","modal","openresearch"],dq={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"]},mk=["tinker","hf","modal","ray","k8s"],JFn={tinker:vDe,hf:YOe,modal:sDe,openresearch:_De},JR="__custom__";function r0(e,n){return!!(n&&!(dq[e]??[]).includes(n))}function eHn({settings:e,projectId:n,onSaved:t}){const r=pn({mutationFn:pkn}),s=e.configuredDefaultBackend??e.defaultBackend??"local",i=e.defaultFlavor??"",[a,o]=T.useState(s),[c,u]=T.useState(i),[h,f]=T.useState(r0(s,i)),[p,m]=T.useState(!1),[w,k]=T.useState(null),v=e.targets.find(B=>B.id===a),b=e.targets.filter(B=>B.configured||B.id===s),y=ZR.includes(a),x=k4.includes(a),C=dq[a]??[],N=a===s&&(!y||c.trim()===i),j=vf[a](),A=JFn[a],z=p?Fon():x&&!c.trim()?NTt({destination:j}):a==="ssh"?KIt():PIt({destination:j});T.useEffect(()=>{o(s),u(i),f(r0(s,i))},[s,i]);async function M(B,G){const q=ZR.includes(B);if(!(p||k4.includes(B)&&!G.trim())){m(!0),k(null);try{t(await r.mutateAsync({backend:B,flavor:q&&G.trim()||null,projectId:n}))}catch(Q){k(Q instanceof Error?Q.message:String(Q)),o(s),u(i),f(r0(s,i))}finally{m(!1)}}}function D(B){const G=e.targets.find(Q=>Q.id===B);if(!G)return;o(G.id);const q=G.id===s?i:"";u(q),f(r0(G.id,q)),k4.includes(G.id)||M(G.id,q)}function I(B){if(B===JR){f(!0);return}f(!1),u(B),(!x||B)&&M(a,B)}return _.jsxs("section",{className:"mb-8",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:fqt()}),_.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:b.map(B=>({id:B.id,label:vf[B.id]()})),value:a,variant:"field",dropDown:!0,disabled:p,renderIcon:B=>{const G=e.targets.find(q=>q.id===B.id);return G?_.jsx(Xh,{kind:Ky[G.id],size:16}):null},onSelect:D}),y&&_.jsx("div",{children:h?_.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(x&&!c.trim()){a===s&&(u(i),f(r0(s,i)));return}N||M(a,c)},placeholder:RHt(),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":cj(),title:cj(),onMouseDown:B=>B.preventDefault(),onClick:()=>f(!1),children:_.jsx(mc,{size:12})})]}):_.jsx(lc,{choices:[{id:"",label:x?yTt():o$t()},...c&&!C.includes(c)?[{id:c,label:yMt({value:Ce(c)})}]:[],...C.map(B=>({id:B,label:B})),{id:JR,label:BHt()}],value:c,variant:"field",dropDown:!0,disabled:p,onSelect:I})})]}),w&&_.jsx("div",{className:"error mt-2.5",children:w}),v&&!v.configured&&_.jsx("p",{className:Ua,children:qtn()})]}),_.jsx("p",{className:"mt-2 mb-0 text-sm leading-relaxed text-subtext",children:z}),A&&_.jsx("p",{className:"mt-1 mb-0 text-sm leading-relaxed text-subtext",children:A()})]})}function tHn({target:e,isDefault:n,summary:t,onOpen:r,onOpenEnvironment:s}){const i=`compute-${e.id}-summary`,a=e.unverified?aTt():e.id==="openresearch"?vI():e.id==="ray"?NS():Nin();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":vf[e.id](),"aria-describedby":i,"aria-haspopup":mk.includes(e.id)?"dialog":void 0}),_.jsx("span",{className:"flex h-16 w-40 flex-none items-center justify-start",children:_.jsx(Xh,{kind:Ky[e.id],size:48})}),_.jsx("span",{className:"mt-5 text-lg font-semibold text-text",children:vf[e.id]()}),_.jsx("span",{className:"mt-1 line-clamp-2 min-h-9 text-sm leading-normal text-text",children:ZFn[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"?qDt():don()," ",_.jsx("button",{type:"button",className:"relative z-20 text-primary underline-offset-2 hover:text-primary-hover hover:underline",onClick:s,children:BMt()})]}):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?rI():e.configured?!r||mk.includes(e.id)?Rm():ocn():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 nHn({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(B0,{size:16})," ",tI()]}),_.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(Xh,{kind:Ky[e.id],size:36})}),_.jsx("h1",{className:"m-0 min-w-0 text-2xl",children:vf[e.id]()})]}),n&&_.jsx(Wt,{className:"flex-none border-primary bg-primary-subtle text-primary",children:rI()})]}),_.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(GFn,{}),e.id==="slurm"&&_.jsx(KFn,{}),e.id==="openresearch"&&_.jsx(YFn,{remote:r})]})]})}function rHn({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(LDt())||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(Xh,{kind:Ky[e.id],size:32}),_.jsx("h2",{id:"compute-quick-setup-title",className:"m-0 text-xl font-medium text-text",children:vf[e.id]()})]}),_.jsx(It,{title:I0(),"aria-label":I0(),onClick:a,disabled:s.saving,children:_.jsx(xr,{size:14})})]}),e.id==="tinker"&&_.jsx(iHn,{target:e}),e.id==="hf"&&_.jsx(oHn,{remote:n}),e.id==="modal"&&_.jsx(HFn,{}),e.id==="ray"&&_.jsx(WFn,{}),e.id==="k8s"&&_.jsx(FFn,{onEditState:i})]})}function sHn({project:e,onViewHistory:n,onOpenEnvironment:t,remote:r}){var M,D;const s=WI(e==null?void 0:e.id),i=ut(s),a=i.data??null,o=I=>{Kr(s.queryKey,B=>(typeof I=="function"?I(B??null):I)??void 0)},c=a?null:((M=i.error)==null?void 0:M.message)??null,[u,h]=T.useState(null),[f,p]=T.useState(null),m=xSn(),w=ut(m),k=w.data??null,v=((D=w.error)==null?void 0:D.message)??null;T.useEffect(()=>{h(null),p(null)},[e==null?void 0:e.id]);const b=I=>{o(I),p(null)},y=a?a.targets:null,x=(a==null?void 0:a.configuredDefaultBackend)??(a==null?void 0:a.defaultBackend),C=y?[...y].sort((I,B)=>+(B.id===x)-+(I.id===x)):null,N=(C==null?void 0:C.filter(I=>I.configured))??[],j=(C==null?void 0:C.filter(I=>!I.configured))??[],A=I=>_.jsx(tHn,{target:I,isDefault:x===I.id,summary:I.id==="local"?k?XFn(k):v??bqt():void 0,onOpen:I.id==="local"?void 0:()=>h(I.id),onOpenEnvironment:t},`${(e==null?void 0:e.id)??"none"}:${I.id}`),z=u?a==null?void 0:a.targets.find(I=>I.id===u):null;return z&&!mk.includes(z.id)?_.jsx(nHn,{target:z,isDefault:x===z.id,onBack:()=>h(null),remote:r}):_.jsxs(_.Fragment,{children:[_.jsx("h1",{children:nI()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:YFt()}),_.jsx(SHn,{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(eHn,{settings:a,projectId:e==null?void 0:e.id,onSaved:b}),_.jsxs("section",{className:"mb-8",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:Rm()}),_.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:N.map(A)})]}),j.length>0&&_.jsxs("section",{className:"mb-3.5",children:[_.jsx("h2",{className:"mt-0 mx-0 mb-2 text-lg",children:yKt()}),_.jsx("div",{className:"grid grid-cols-1 gap-4 sm:grid-cols-2 lg:grid-cols-3",children:j.map(A)})]}),z&&_.jsx(rHn,{target:z,remote:r,onClose:()=>h(null)})]}):_.jsxs(Pr,{children:[_.jsx(kt,{})," ",ZPt()]})]})}function iHn({target:e}){var y;const n=pn({mutationFn:D5n}),[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(null),c=Sj(),u=ut(c),h=u.data??null,f=a??((y=u.error)==null?void 0:y.message)??null,p=x=>{Kr(c.queryKey,C=>(typeof x=="function"?x(C??null):x)??void 0)},[m,w]=T.useState(!1),k=u.isPending||m;async function v(){if(!(k||s)){w(!0),o(null);try{await tt.fetchQuery({...Sj(),staleTime:0})}catch(x){o(x instanceof Error?x.message:String(x))}finally{w(!1)}}}async function b(x){if(x.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:[!h&&k?_.jsxs(Pr,{children:[_.jsx(kt,{})," ",ya()]}):h&&_.jsxs("dl",{className:"m-0 flex items-center justify-between gap-4 text-sm",children:[_.jsx("dt",{className:"font-medium text-subtext",children:Kh()}),_.jsx("dd",{className:"m-0",children:_.jsx(Wt,{variant:h.validationStatus==="valid"?"success":h.validationStatus==="invalid"?"error":"warning",children:h.validationStatus==="valid"?Tm():h.validationStatus==="invalid"?aon():h.validationStatus==="billingRequired"?Van():Fb()})})]}),(h==null?void 0:h.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:Ban()})}),(h==null?void 0:h.processEnv)&&_.jsx("p",{className:"mt-2 mb-0 text-sm text-subtext",children:Jan()}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[e.configured||h!==null&&h.validationStatus!=="missing"?Psn():CS(),_.jsx(Br,{type:"password",value:t,placeholder:(h==null?void 0:h.maskedKey)??"",onChange:x=>r(x.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(De,{type:"button",disabled:s||k,onClick:()=>void v(),children:[_.jsx(Ka,{size:13})," ",k?ya():Am()]}),_.jsx(De,{variant:"primary",type:"submit",disabled:!t.trim()||s||k,children:s?yI():pc()})]})]})]})}function aHn({settings:e}){return e.validationStatus==="missing"?_.jsx(Wt,{variant:"warning",children:Fb()}):e.validationStatus==="invalid"?_.jsx(Wt,{variant:"error",children:$Gt()}):e.validationStatus!=="valid"?null:e.jobsWrite===!0?_.jsx(Wt,{variant:"success",children:Tm()}):e.jobsWrite===!1?_.jsxs("span",{className:"inline-flex items-center gap-2",children:[_.jsx(Wt,{variant:"warning",children:qWt()}),_.jsx(FS,{content:WOt(),className:"text-subtext",children:_.jsx(US,{size:15})})]}):null}function oHn({remote:e}){var y;const n=pn({mutationFn:M5n}),t=kj(),r=ut(t),s=r.data??null,i=x=>{Kr(t.queryKey,C=>(typeof x=="function"?x(C??null):x)??void 0)},a=s?null:((y=r.error)==null?void 0:y.message)??null,[o,c]=T.useState(""),[u,h]=T.useState(!1),[f,p]=T.useState(!1),[m,w]=T.useState(null),k=Gy();async function v(){if(!(u||f||!s&&!a)){p(!0),w(null);try{await tt.fetchQuery({...kj(),staleTime:0})}catch(x){w(x instanceof Error?x.message:String(x))}finally{p(!1)}}}async function b(x){if(x.preventDefault(),!(!o.trim()||u||f||!s&&!a)){h(!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{h(!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:AS()}),_.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:Kh()}),_.jsx("dd",{className:"m-0 text-text",children:_.jsx(aHn,{settings:s})})]})]}),s.validationStatus==="unreachable"&&s.validationError&&_.jsx("p",{className:Uy,children:s.validationError}),s.source==="env"&&_.jsx("p",{className:Ua,children:GUt()}),s.validationStatus==="valid"&&s.jobsWrite===null&&_.jsx(PC,{note:FOt({login:"`hf auth login`",url:Ce("huggingface.co/settings/tokens")}),className:Ua,disabled:e,onRun:k.start}),_.jsx(Vy,{run:k.run,onComplete:()=>void r.refetch(),onClose:k.clear})]}):_.jsxs(Pr,{children:[_.jsx(kt,{})," ",RVt()]}),_.jsxs("form",{className:"mt-5 flex flex-col gap-4",onSubmit:b,children:[_.jsxs("label",{className:"flex flex-col gap-2 text-sm font-medium text-subtext",children:[s!=null&&s.configured?Ksn():e$t(),_.jsx(Br,{type:"password",value:o,onChange:x=>c(x.target.value),placeholder:(s==null?void 0:s.maskedToken)??$Ut(),autoComplete:"off"})]}),m&&_.jsx("div",{className:"error",children:m}),_.jsxs("div",{className:"flex justify-end gap-2",children:[_.jsxs(De,{type:"button",disabled:u||f||!s&&!a,onClick:()=>void v(),children:[_.jsx(Ka,{size:13})," ",f?ya():Am()]}),_.jsx(De,{variant:"primary",type:"submit",disabled:!o.trim()||u||f||!s&&!a,children:u?yI():pc()})]})]})]})}const hq=/^hf_[A-Za-z0-9]{10,}$/;function pq(){return _.jsx("tr",{children:_.jsx("td",{colSpan:3,children:_.jsxs("p",{dir:"auto",className:Ua,children:[Xtn()," ",_.jsx("code",{children:"HF_TOKEN"}),DJt()]})})})}const eM=["TINKER_API_KEY","HF_TOKEN","WANDB_API_KEY"];function gk(e,n){const t=n instanceof Error?n.message:String(n);Zt(t.includes(e)?t:`${e}: ${t}`,"error")}function cHn({name:e,entry:n,onVars:t}){const r=pn({mutationFn:f=>$I(...f)}),s=pn({mutationFn:V5n}),[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){gk(e,f)}finally{c(!1)}}}async function h(){if(!o){c(!0);try{t(await s.mutateAsync(e))}catch(f){gk(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(Wt,{children:zYt()})]}):_.jsx(Br,{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:dI(),"aria-label":Hee({name:Ce(e)}),autoComplete:"new-password",disabled:o})}),_.jsx("td",{children:n?_.jsx(It,{className:"[&:hover:not(:disabled)]:text-accent-red",title:E3({name:Ce(e)}),"aria-label":E3({name:Ce(e)}),onClick:()=>void h(),disabled:o,children:_.jsx(Of,{size:13})}):i.trim()&&_.jsx(De,{size:"small",onClick:()=>void u(),disabled:o,children:o?Sa():pc()})})]}),!n&&e!=="HF_TOKEN"&&hq.test(i.trim())&&_.jsx(pq,{})]})}function lHn({onVars:e,onDone:n}){const t=pn({mutationFn:f=>$I(...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){gk(r.trim(),f)}finally{c(!1)}}}const h=f=>{f.key==="Enter"&&(f.preventDefault(),u()),f.key==="Escape"&&!o&&n()};return _.jsxs(_.Fragment,{children:[_.jsxs("tr",{children:[_.jsx("td",{children:_.jsx(Br,{autoFocus:!0,variant:"inline",className:"font-mono text-sm",type:"text",value:r,onChange:f=>s(f.target.value),onKeyDown:h,placeholder:"MY_API_KEY","aria-label":cWt(),autoComplete:"off",spellCheck:!1,disabled:o})}),_.jsx("td",{children:_.jsx(Br,{variant:"inline",className:"text-base",type:"password",value:i,onChange:f=>a(f.target.value),onKeyDown:h,placeholder:dI(),"aria-label":pWt(),autoComplete:"new-password",disabled:o})}),_.jsxs("td",{children:[_.jsx(De,{size:"small",onClick:()=>void u(),disabled:o||!r.trim()||!i.trim(),children:o?Sa():pc()}),_.jsx(It,{title:df(),"aria-label":GPt(),onClick:n,disabled:o,children:_.jsx(xr,{size:13})})]})]}),r.trim()!=="HF_TOKEN"&&hq.test(i.trim())&&_.jsx(pq,{})]})}function uHn(){var u;const e=kSn(),n=ut(e),t=n.data??null,r=h=>{Kr(e.queryKey,f=>(typeof h=="function"?h(f??null):h)??void 0)},s=t?null:((u=n.error)==null?void 0:u.message)??null,[i,a]=T.useState(!1),o=t===null?[]:t.map(h=>h.key).filter(h=>!eM.includes(h)),c=[...eM,...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:Wnn()}),_.jsxs(De,{size:"small",className:"shrink-0",onClick:()=>a(!0),disabled:i||t===null,children:[_.jsx(Qh,{size:12})," ",MBt()]})]}),_.jsx("div",{className:fc,children:s?_.jsx("div",{className:"error",children:s}):t===null?_.jsxs(Pr,{children:[_.jsx(kt,{})," ",Qu()]}):_.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(h=>_.jsx(cHn,{name:h,entry:t.find(f=>f.key===h),onVars:r},h)),i&&_.jsx(lHn,{onVars:r,onDone:()=>a(!1)})]})})})]})}const s0=[{value:"system",label:Ran,icon:S8n},{value:"light",label:Can,icon:X8n},{value:"dark",label:fan,icon:E8n}],_Hn=[{id:"en",label:"English"},{id:"zh-CN",label:"简体中文"},{id:"fa",label:"فارسی"},{id:"ar",label:"العربية"},{id:"es",label:"Español"},{id:"hi",label:"हिन्दी"}];function fHn(){const e=Xu(),[n,t]=c$(),r=s=>{var h;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?s0.findIndex(f=>f.value===n):o)+i+s0.length)%s0.length;t(s0[u].value),(h=a[u])==null||h.focus()};return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:EAt()}),_.jsxs("div",{className:`${fc} mt-3`,children:[_.jsxs("div",{className:`${dl} pb-3.5`,children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:gj()}),_.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":gj(),onKeyDown:r,children:s0.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:dl,children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:uLt()}),_.jsx("div",{className:"w-52 flex-none",children:_.jsx(lc,{choices:_Hn,value:e,variant:"field",dropDown:!0,onSelect:s=>{eL(s)&&s$(s)}})})]})]})]})}const dHn={installer:u2n,"app-bundle":Lxn,appimage:qxn,portable:S2n,cargo:Xxn,homebrew:r2n,nix:g2n,unknown:T2n},S4={cargo:$2n,homebrew:G2n,nix:Z2n};function hHn(){var f;const e=pn({mutationFn:p=>B5n(...p)}),{status:n,error:t,apply:r}=I6(),[s,i]=T.useState(null),[a,o]=T.useState(null),c=$B(n),u=s!==null||c.restarting;if(!n)return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:hj()}),t?_.jsx("div",{className:fc,children:_.jsx("div",{className:"error",children:t})}):_.jsxs(Pr,{children:[_.jsx(kt,{})," ",Qu()]})]});const h=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:hj()}),_.jsxs("div",{className:`${fc} mt-3`,children:[_.jsxs("div",{className:`${yf} pb-3.5`,children:[_.jsx("div",{className:"k",children:hI()}),_.jsx("div",{className:"v",children:n.current}),_.jsx("div",{className:"k",children:iVt()}),_.jsx("div",{className:"v",children:n.latest??"—"}),_.jsx("div",{className:"k",children:iI()}),_.jsx("div",{className:"v",children:dHn[n.channel]()})]}),n.restartRequired&&_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:hJt()}),_.jsx("p",{children:c.error?jI({error:c.error}):oin({installed:Ce(n.installedVersion??"—"),current:Ce(n.current??n.installedVersion??"—")})})]}),n.canRestart&&_.jsx(De,{size:"small",type:"button",disabled:u,onClick:c.restart,children:c.restarting?AI():zI()})]}),n.selfUpdates?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:_j()}),_.jsxs("p",{children:[tWt(),n.envDisabled&&Oon()]})]}),_.jsx(PS,{type:"button",checked:n.autoUpdate,"aria-label":_j(),disabled:u,onClick:()=>void h("auto",()=>e.mutateAsync([!n.autoUpdate]).then(r))})]}),_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:n.updateAvailable?Non({version:Ce(n.latest??"—")}):VAt()}),_.jsxs("p",{children:[n.updateAvailable?jDt():dTt(),n.updateAvailable&&n.latestTag&&_.jsxs(_.Fragment,{children:[" ",_.jsx("a",{href:IB(n.latestTag),target:"_blank",rel:"noreferrer",className:"underline",children:gI()})]})]})]}),_.jsx(De,{size:"small",type:"button",disabled:u,onClick:()=>void h("apply",()=>I5n().then(r)),children:s==="apply"?bS():n.updateAvailable?yon():JAt()})]})]}):_.jsx("div",{className:dl,children:_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:cYt()}),_.jsx("p",{children:((f=S4[n.channel])==null?void 0:f.call(S4))??Krn()})]})}),n.channel==="app-bundle"&&_.jsx(mHn,{busy:s,disabled:u,run:h}),a&&_.jsx("div",{className:"error",children:a})]})]})}function pHn(){var f;const e=pn({mutationFn:Okn}),n=TSn(),t=ut(n),r=t.data??null,s=p=>{Kr(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,h=()=>{!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:Dnn()}),r?_.jsxs("div",{className:`${fc} mt-3`,children:[_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsxs("div",{className:"project-default-title inline-flex items-center gap-1.5 text-base font-medium",children:[oj(),r.locked&&r.reason&&_.jsx(FS,{content:`${CHt()} ${r.reason}.`,className:"text-subtext",children:_.jsx(US,{size:15})})]}),_.jsx("p",{children:wWt()})]}),_.jsx(PS,{type:"button",checked:r.enabled,"aria-label":oj(),disabled:i||r.locked,onClick:h})]}),u&&_.jsx("div",{className:"error",children:u})]}):u?_.jsx("div",{className:"error",children:u}):_.jsxs(Pr,{children:[_.jsx(kt,{})," ",Qu()]})]})}function mHn({busy:e,disabled:n,run:t}){const r=pn({mutationFn:P5n}),[s,i]=T.useState(null),[a,o]=T.useState(!1),c=u=>void t("cli",()=>r.mutateAsync(u).then(h=>{i(h),o(!1)}).catch(h=>{throw o(!u&&String((h==null?void 0:h.message)??h).includes("--force")),h}));return _.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:pDt({command:Ce("orx")})}),s?_.jsxs("p",{children:[s.alreadyCurrent?FTt({link:Ce(s.link)}):WTt({link:Ce(s.link)}),!s.onPath&&bAt({directory:Ce(s.dir)})]}):_.jsx("p",{children:cDt({command:Ce("orx")})})]}),_.jsx(De,{size:"small",type:"button",disabled:n,onClick:()=>c(a),children:e==="cli"?bS():a?Msn():s?asn():tDt()})]})}function gHn({remote:e}){var w;const n=pn({mutationFn:k=>qI(...k)}),t=DS(),r=ut(t),s=r.data??null,i=k=>{Kr(t.queryKey,v=>(typeof k=="function"?k(v??null):k)??void 0)},[a,o]=T.useState(!1),[c,u]=T.useState(null),h=c??((w=r.error)==null?void 0:w.message)??null,f=async()=>{await r.refetch({cancelRefetch:!1})},p=Gy(),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:_Ut()}),s?_.jsxs("div",{className:`${fc} 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:vUt()}),_.jsx(Wt,{variant:s.githubAuthenticated?"success":s.ghInstalled?"warning":"error",children:s.githubAuthenticated?XL():JL()})]}),_.jsxs("div",{className:dl,children:[_.jsxs("div",{children:[_.jsx("div",{className:"project-default-title text-base font-medium",children:uj()}),_.jsx("p",{children:orn()})]}),_.jsx(PS,{type:"button",checked:s.githubForNewProjects,"aria-label":uj(),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(mq,{ghInstalled:s.ghInstalled,remote:e,onCheck:f,onRun:p.start})}),_.jsx(Vy,{run:p.run,onComplete:()=>void f(),onClose:p.clear}),h&&_.jsx("div",{className:"error",children:h})]}):h?_.jsx("div",{className:"error",children:h}):_.jsxs(Pr,{children:[_.jsx(kt,{})," ",Qu()]})]})}function mq({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(PC,{note:e?hin():wDt(),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(jh,{variant:"primary",href:"https://cli.github.com/",target:"_blank",rel:"noreferrer",children:[vGt()," ",_.jsx(mf,{size:12})]}),_.jsx(De,{type:"button",variant:e?"warning":"default",disabled:s,onClick:a,children:s?ya():Am()})]})]})}function vHn(){var m,w,k;const e=pn({mutationFn:b5n}),n=pn({mutationFn:y5n}),t=jNn(),r=ut(t),s=((m=r.data)==null?void 0:m.hasToken)??null,i=((w=r.data)==null?void 0:w.hasSession)??null,a=v=>Kr(t.queryKey,{hasToken:s??!1,hasSession:i??!1,...v}),o=v=>a({hasToken:v}),[c,u]=T.useState(!1),[h,f]=T.useState(null),p=h??((k=r.error)==null?void 0:k.message);return _.jsxs("div",{className:pk,children:[_.jsx("h3",{children:lI()}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:CUt()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:s?"success":"default",children:s===null?p?fo():ya():s?mj():B3()})})]}),_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:hrn()}),s?_.jsx("div",{className:N0,children:_.jsx(De,{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?pj():ysn()})}):_.jsx(YR,{save:LI,onSaved:v=>o(v.hasToken),placeholder:xYt(),createHref:"https://www.overleaf.com/user/settings"}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:HJt()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:i?"success":"default",children:i===null?p?fo():ya():i?mj():B3()})})]}),_.jsx("p",{className:"git-card-helper mt-3.5 mx-0 mb-0 text-sm leading-relaxed text-text",children:QJt()}),i?_.jsx("div",{className:N0,children:_.jsx(De,{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?pj():dsn()})}):_.jsx(YR,{save:v=>II(v),onSaved:v=>a({hasSession:v.hasSession}),placeholder:D3(),createHref:"https://www.overleaf.com/project",createLabel:fxt()}),p&&_.jsx("div",{className:"error",children:p})]})}function bHn({project:e,onProjectUpdate:n,remote:t}){var M;const r=pn({mutationFn:D=>qI(...D)}),s={...ASn((e==null?void 0:e.id)??""),enabled:!!e},i=ut(s),a=Gy(),o=i.data??null,c=D=>{Kr(s.queryKey,I=>(typeof D=="function"?D(I??null):D)??void 0)},[u,h]=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,b]=T.useState(!1),[y,x]=T.useState(null),C=!!(o!=null&&o.github.owner&&o.github.repo),N=async()=>{await i.refetch({cancelRefetch:!1})},j=D=>{const I=D instanceof Error?D.message:String(D);return I.toLowerCase().includes("archived")?aOt():I.includes("(fetch first)")||I.includes("non-fast-forward")?dOt():I.includes("403")||I.toLowerCase().includes("permission denied")?yOt():I},A=()=>{e&&(h(!0),p(null),Tkn(e.id).then(D=>{c(D.git),n(D.project),tt.fetchQuery(DS()).then(I=>{!I.githubForNewProjects&&!I.githubDefaultPromptSeen&&k(!0)}).catch(()=>{})}).catch(D=>p(j(D))).finally(()=>h(!1)))},z=D=>{b(!0),x(null),r.mutateAsync([D,!0]).then(()=>k(!1)).catch(I=>x(I instanceof Error?I.message:String(I))).finally(()=>b(!1))};return _.jsxs(_.Fragment,{children:[_.jsx("h1",{children:oJt()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-base leading-relaxed text-text",children:ein({project:(e==null?void 0:e.name)??dMt()})}),e?m&&!o?_.jsx("div",{className:"error",children:m}):o?_.jsxs(_.Fragment,{children:[_.jsxs("div",{className:pk,children:[_.jsx("h3",{children:VVt()}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:HYt()}),_.jsx("span",{className:"v",children:o.path}),_.jsx("span",{className:"k",children:"Git"}),_.jsx("span",{className:"v",children:o.gitVersion??IL()}),_.jsx("span",{className:"k",children:Den()}),_.jsx("span",{className:"v",children:o.initialized?JMt({branch:Ce(o.currentBranch??zS()),state:o.clean?OTt():OOt()}):P$t()}),_.jsx("span",{className:"k",children:CPt()}),_.jsx("span",{className:"v",children:o.baselineBranch}),_.jsx("span",{className:"k",children:eJt()}),_.jsx("span",{className:"v",children:o.remotes.length?o.remotes.map(D=>`${D.name}: ${D.url}`).join(" · "):jS()})]}),!o.initialized&&_.jsx("div",{className:N0,children:_.jsx(De,{variant:"primary",onClick:()=>void Akn(e.id).then(c).catch(D=>p(String(D))),children:ZUt()})})]}),_.jsxs("div",{className:pk,children:[_.jsx("h3",{children:"GitHub"}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:eI()}),_.jsx("span",{className:"v",children:_.jsx(Wt,{variant:o.github.authenticated?"success":o.github.ghInstalled?"warning":"error",children:o.github.authenticated?XL():JL()})}),_.jsx("span",{className:"k",children:nZt()}),_.jsx("span",{className:"v",children:C?_.jsxs(_.Fragment,{children:[_.jsxs("span",{children:[o.github.owner,"/",o.github.repo]}),!o.github.enabled&&_.jsx(Wt,{children:ctn()})]}):_.jsx(Wt,{children:BVt()})}),o.github.enabled&&_.jsxs(_.Fragment,{children:[_.jsx("span",{className:"k",children:ttn()}),_.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(mq,{ghInstalled:o.github.ghInstalled,remote:t,onCheck:()=>N(),onRun:a.start})}),_.jsx(Vy,{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?Won():aMt()}),_.jsxs("div",{className:N0,children:[C&&o.github.url&&_.jsxs(jh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[dj()," ",_.jsx(mf,{size:12})]}),_.jsx(De,{variant:"primary",disabled:u,onClick:A,children:u?izt():ZNt()})]})]}),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:Mqt()}),_.jsxs("div",{className:N0,children:[o.github.url&&_.jsxs(jh,{href:o.github.url,target:"_blank",rel:"noreferrer",children:[dj()," ",_.jsx(mf,{size:12})]}),_.jsx(De,{disabled:u,onClick:()=>{h(!0),Rkn(e.id).then(D=>{c(D.git),n(D.project)}).catch(D=>p(D instanceof Error?D.message:String(D))).finally(()=>h(!1))},children:u?fzt():GNt()})]})]})]}),_.jsx(vHn,{}),m&&_.jsx("div",{className:"error",children:j(m)})]}):_.jsxs(Pr,{children:[_.jsx(kt,{})," ",Qu()]}):_.jsx("div",{className:fc,children:_.jsx("p",{className:Ua,children:wXt()})}),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:()=>z(!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:aKt()}),_.jsx("p",{children:Ltn()}),y&&_.jsx("div",{className:"error",children:y}),_.jsxs("div",{className:"github-default-actions flex justify-end gap-2.5 mt-5.5",children:[_.jsx(De,{disabled:v,onClick:()=>z(!1),children:qQt()}),_.jsx(De,{variant:"primary",disabled:v,onClick:()=>z(!0),children:v?Sa():SLt()})]})]})})]})}const yHn={env:J0n,config:amn,xdg:dmn,default:V0n},C4={preparing:R0n,copying:Upn,verifying:ymn,finalizing:Ypn},xHn=e=>{var n;return((n=C4[e])==null?void 0:n.call(C4))??e};function wHn(){var x;const e=SSn(),n=ut(e),t=n.data??null,r=t?null:((x=n.error)==null?void 0:x.message)??null,[s,i]=T.useState(""),[a,o]=T.useState(!1),[c,u]=T.useState(null),[h,f]=T.useState({kind:"idle"}),[p,m]=T.useState(null);T.useEffect(()=>{t&&i(C=>C||t.current)},[t]),T.useEffect(()=>n$(C=>{C.type==="progress"?f(N=>{const j=N.kind==="moving"?N.total:0;return{kind:"moving",phase:C.phase,copied:C.copiedBytes,total:C.totalBytes||j}}):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 b(){if(!(a||!k)){o(!0),m(null),u(null);try{u(await W5n(k))}catch(C){m(C instanceof Error?C.message:String(C))}finally{o(!1)}}}async function y(C){if(C.preventDefault(),!(h.kind==="moving"||!k||v)&&(m(null),!!window.confirm(_0n({path:Ce(k)})))){f({kind:"moving",phase:"preparing",copied:0,total:(c==null?void 0:c.treeBytes)??0});try{await Q5n(k)}catch(N){f({kind:"idle"}),m(N instanceof Error?N.message:String(N))}}}return _.jsxs(_.Fragment,{children:[_.jsx("h2",{children:Wen()}),_.jsx("p",{className:"settings-sub mt-0 mx-0 mb-4.5 text-sm leading-relaxed text-subtext",children:Jin()}),r?_.jsx("div",{className:fc,children:_.jsx("div",{className:"error",children:r})}):t?_.jsxs("div",{className:fc,children:[_.jsx("div",{className:"settings-card-head mb-3",children:_.jsx("h3",{children:VHt()})}),_.jsxs("div",{className:yf,children:[_.jsx("span",{className:"k",children:vHt()}),_.jsx("span",{className:"v",children:t.current}),_.jsx("span",{className:"k",children:_I()}),_.jsx("span",{className:"v",children:yHn[t.source]()})]}),!w&&_.jsxs("form",{className:BC,onSubmit:y,children:[_.jsxs("label",{children:[WKt(),_.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:h.kind==="moving"})]}),c&&!c.error&&c.ok&&_.jsxs("p",{className:Ua,children:[DZt()," ",_l(c.treeBytes??0),c.freeBytes!=null&&` — ${s0n({size:Ce(_l(c.freeBytes))})}`,c.sameFilesystem?B0n():"","."]}),c&&c.ok===!1&&c.error&&_.jsx("div",{className:"error",children:c.error}),p&&_.jsx("div",{className:"error",children:p}),h.kind==="moving"&&_.jsx(cq,{value:h.copied,max:h.total,label:xHn(h.phase),caption:h.total>0?_.jsxs("span",{className:"text-sm",children:[_l(h.copied)," / ",_l(h.total)]}):void 0}),h.kind==="done"&&_.jsxs("p",{className:Ua,children:[OKt(),h.oldPathLeft&&_.jsxs(_.Fragment,{children:[" ",aBt({path:Ce(h.oldPathLeft)})]})]}),h.kind==="error"&&_.jsxs("div",{className:"error",children:[NKt()," ",h.message]}),_.jsxs("div",{className:"actions",children:[_.jsx(De,{type:"button",onClick:b,disabled:a||!k||v||h.kind==="moving",children:a?ya():MAt()}),_.jsx(De,{variant:"primary",type:"submit",disabled:!k||v||h.kind==="moving",children:h.kind==="moving"?C0n():v0n()})]})]})]}):_.jsxs(Pr,{children:[_.jsx(kt,{})," ",Qu()]})]})}const vk=e=>e==="running"||e==="starting";function kHn(e){return vk(e.status)?$0(Date.now()-e.createdAt):e.endedAt?$0(e.endedAt-e.createdAt):"—"}function gq({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:vPt()}),_.jsx("th",{children:Kh()}),_.jsx("th",{children:zen()}),_.jsx("th",{children:zJt()})]})}),_.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(i6,{backend:t.backend}),r&&_.jsx(Wh,{size:"small",href:r,target:"_blank",rel:"noreferrer",title:fj(),"aria-label":fj(),onClick:i=>i.stopPropagation(),children:_.jsx(mf,{size:12})})]})}),_.jsx("td",{children:_.jsx(ml,{status:pa(t)})}),_.jsx("td",{children:vo(t.createdAt)}),_.jsx("td",{children:kHn(t)})]},t.id)})})]})})}function SHn({projectId:e,onViewHistory:n}){var f;const t=ut({...Tu(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=>vk(p.status)).sort(c),h=r==null?void 0:r.filter(p=>!vk(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:[xJt(),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(De,{size:"small",onClick:o,disabled:i,children:[_.jsx(Ka,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]}),_.jsx(De,{size:"small",onClick:n,children:h!=null&&h.length?vtt({count:Jt(h.length)}):_tt()})]})]}),s&&_.jsx("div",{className:"error",children:s}),!u||!h?_.jsxs(Pr,{children:[_.jsx(kt,{})," ",Qu()]}):_.jsx(gq,{instances:u,emptyLabel:e?Uet():stt()})]})}function CHn({projectId:e,onBack:n}){var c;const t=ut({...Tu(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(h=>h+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(B0,{size:14})," ",tI()]}),_.jsxs("div",{className:"settings-head-row flex items-center justify-between gap-2.5 [&_h1]:m-0",children:[_.jsx("h1",{children:TGt()}),_.jsxs(De,{size:"small",onClick:o,disabled:i,children:[_.jsx(Ka,{size:12,className:i?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),s&&_.jsx("div",{className:"error",children:s}),r?_.jsx(gq,{instances:[...r].sort((u,h)=>h.createdAt-u.createdAt),emptyLabel:e?Iet():Yet()}):_.jsxs(Pr,{children:[_.jsx(kt,{})," ",Qu()]})]})}const vq=["projects","harnesses","storage"],EHn=[{id:"compute",label:nI,icon:_.jsx(qS,{size:15}),activeTabs:["compute","instances"]},{id:"environment",label:sI,icon:_.jsx(Mf,{size:15}),activeTabs:["environment"]},{id:"settings",label:RS,icon:_.jsx(WS,{size:15}),activeTabs:["settings",...vq]}];function NHn(e){return vq.includes(e)}function zHn({tab:e,project:n,onProjectUpdate:t,onSelectTab:r,remote:s=!1}){const i=e==="settings"||NHn(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"}),h=new ResizeObserver(u);h.observe(c),u();const f=()=>h.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:RS()}),_.jsxs("div",{className:"settings-stack mt-4.5",children:[_.jsx("section",{className:jd,children:_.jsx(fHn,{})}),_.jsx("section",{ref:e==="projects"?a:void 0,className:jd,children:_.jsx(gHn,{remote:s})}),_.jsx("section",{ref:e==="harnesses"?a:void 0,className:jd,children:_.jsx(BFn,{remote:s})}),!s&&_.jsx("section",{ref:e==="storage"?a:void 0,className:jd,children:_.jsx(wHn,{})}),_.jsx("section",{className:jd,children:_.jsx(pHn,{})}),!s&&_.jsx("section",{className:jd,children:_.jsx(hHn,{})})]})]}),e==="compute"&&_.jsx(sHn,{project:n,onViewHistory:()=>r("instances"),onOpenEnvironment:()=>r("environment"),remote:s}),e==="instances"&&_.jsx(CHn,{projectId:n==null?void 0:n.id,onBack:()=>r("compute")}),e==="environment"&&_.jsxs(_.Fragment,{children:[_.jsx("h1",{children:sI()}),_.jsx(uHn,{})]}),e==="git"&&_.jsx(bHn,{project:n,onProjectUpdate:t,remote:s})]})}function tm(e){const n=e.split("@")[0].replace(/[~^]$/,"");return n.charAt(0).toUpperCase()+n.slice(1).replaceAll("-"," ")}function FC(e){return e.replace(/@personal$|\^$/,"@u").replace(/@project$|~$/,"@p")}function bk(e){return`${e.plugin?`${tm(e.plugin)}: `:""}${tm(e.name)}`}const bq=["plan","goal","new","resume","model","compact","copy","export","side"],jHn={plan:()=>R4t(),goal:()=>kXe(),new:()=>wot(),resume:()=>bzt(),model:()=>gst(),compact:()=>NRe(),copy:()=>JDe(),export:()=>KPe(),side:()=>eln()};function AHn(e){return{name:e,get description(){return jHn[e]()},source:"command"}}function Wy(e){return bq.some(n=>n===e)}const mb={clear:"new",summarize:"compact"};function yk(e){const n=e.toLowerCase();return Wy(n)?n:Object.hasOwn(mb,n)?mb[n]:null}function yq(e){return Object.keys(mb).filter(n=>mb[n]===e)}function THn(e,n){return e.name.toLowerCase().startsWith(n)||e.plugin&&`${e.plugin}:${e.name}`.toLowerCase().startsWith(n)?!0:e.source==="command"&&Wy(e.name)&&yq(e.name).some(t=>t.startsWith(n))}function E4(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?h:s}${a.slice(h.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 tM(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 xq(e){return bq.filter(n=>n!=="plan"||e)}function OHn(e,n){const t=e.filter(r=>!yk(r.name));for(const r of xq(n))t.push(AHn(r));return t.sort((r,s)=>+(s.source==="command")-+(r.source==="command")||bk(r).localeCompare(bk(s),void 0,{sensitivity:"base"}))}function N4(e){return e==="plan"||e==="goal"||e==="side"}function DHn(e,n){for(const t of xq(n).sort((r,s)=>+(r==="plan")-+(s==="plan"))){const r=[t,...yq(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 z4(e,n,t){if(e==="command")return n!==void 0?n:t??void 0}const LHn=["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 IHn=null;function nM(e,n){const t=IHn??(IHn=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(tm(e)).width-t.measureText(`/${e}`).width;return Math.max(1,Math.ceil((s+6)/t.measureText(" ").width))}const $Hn={plan:d8n,goal:L$,new:K8n,resume:I$,model:qS,compact:q7n,copy:Zu,export:Kb,side:P0};function wq({name:e,className:n}){const t=Wy(e)?$Hn[e]:a9n;return _.jsx(t,{size:16,strokeWidth:1.5,className:n,"aria-hidden":"true"})}function kq({name:e}){return _.jsxs(_.Fragment,{children:[_.jsx(wq,{name:e,className:"me-1 inline-block align-middle"}),tm(e)]})}function Sq(e,n,t,r,s,i=!1){let a=0;return RHn(e,n).map((o,c,u)=>{var m,w;const h=a+o.text.length;a=h;const f=o.text.slice(1).toLowerCase();if(o.command&&s)return s(o.text,f,h,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(kq,{name:f})},c):i?_.jsx("span",{"aria-hidden":"true",children:o.text},c):_.jsx(T.Fragment,{children:p},c)})}function BHn({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(),[h,f]=T.useState(!1),p=ut({...MSn(n,s,r.harness),enabled:h,subscribed:h}),m=p.data??null,w=p.isFetching,[k,v]=T.useState({}),b=()=>{c.current!==null&&window.clearTimeout(c.current),c.current=null},y=()=>{const N=a.current;if(!N)return;const j=N.getBoundingClientRect(),A=Math.min(420,window.innerWidth-32),z=Math.max(16,Math.min(j.left-4,window.innerWidth-A-16));v(j.top>300?{bottom:window.innerHeight-j.top+12,left:z,width:A}:{left:z,top:j.bottom+12,width:A})},x=()=>{b(),y(),f(!0)},C=()=>{b(),c.current=window.setTimeout(()=>f(!1),120)};return T.useEffect(()=>()=>b(),[]),T.useEffect(()=>{if(!h)return;const N=()=>y();return window.addEventListener("resize",N),window.addEventListener("scroll",N,!0),()=>{window.removeEventListener("resize",N),window.removeEventListener("scroll",N,!0)}},[h]),_.jsxs(T.Fragment,{children:[_.jsxs("span",{ref:a,role:"button",tabIndex:0,"aria-controls":u,"aria-expanded":h,"aria-label":NJ({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:x,onMouseLeave:C,onFocus:x,onBlur:C,onKeyDown:N=>{var j,A;if(N.key==="Escape"){f(!1);return}if(N.key==="Enter"||N.key===" "){N.preventDefault(),x();return}h&&(N.key==="ArrowDown"||N.key==="PageDown")&&(N.preventDefault(),(j=o.current)==null||j.scrollBy({top:N.key==="PageDown"?240:48,behavior:"smooth"})),h&&(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 j,A;N.preventDefault(),(j=i.current)==null||j.focus(),(A=i.current)==null||A.setSelectionRange(t,t),b()},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(kq,{name:n})})]})})]}),h&&ii.createPortal(_.jsxs("div",{id:u,ref:o,role:"dialog","aria-label":Dee({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:b,onMouseLeave:C,onFocus:b,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:tm(n)}),_.jsx(Wt,{className:"h-5 border-border-variant bg-canvas px-1.5 tracking-[0.05em]",children:oln()})]}),_.jsx("div",{className:"p-4 text-sm text-text",children:w&&m===null?_.jsx("span",{className:"text-muted",children:hln()}):_.jsx(_c,{text:m??r.description})})]}),document.body)]})}function PHn({text:e,isCommand:n}){return _.jsx(_.Fragment,{children:Sq(e,n,"skill-chip me-0.5 whitespace-nowrap font-normal text-skill-blue")})}function FHn({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 LHn)c.style.setProperty(p,f.getPropertyValue(p));c.style.width=`${o.clientWidth+parseFloat(f.borderLeftWidth)+parseFloat(f.borderRightWidth)}px`};u();const h=new ResizeObserver(u);return h.observe(o),()=>h.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:[Sq(e,t,"",void 0,(o,c,u,h)=>{if(u===n)return _.jsx("span",{"aria-hidden":"true",children:o},`${h}:${u}`);const f=r.find(p=>p.name===FC(c));return f&&f.source!=="command"?_.jsx(BHn,{label:o,name:c,end:u,skill:f,projectId:s,textareaRef:i},`${h}:${u}`):_.jsxs("span",{"aria-hidden":"true",className:"bg-background text-skill-blue",children:[_.jsx("span",{className:"text-skill-blue-slash",children:"/"}),o.slice(1)]},`${h}:${u}`)},!0),"​"]})}function HHn({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(wq,{name:i.name,className:"shrink-0"}),_.jsx("span",{className:"skill-name shrink-0",children:bk(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:xln()}),i.source==="project"&&_.jsx("span",{className:"ms-auto shrink-0 ps-2 text-muted",children:RL()})]},i.name))})}function qHn(e){return e>=95?"var(--accent-red)":e>=80?"var(--accent-amber)":"var(--accent)"}const xk=6.5,rM=2*Math.PI*xk;function UHn({usage:e}){return!e||e.usedTokens<=0?null:_.jsx(GHn,{usage:e})}function GHn({usage:e}){const{open:n,setOpen:t,ref:r}=Vi(),{usedTokens:s,contextWindow:i}=e,a=i&&i>0?Math.min(100,Math.round(s/i*100)):null,o=a===null?"var(--accent)":qHn(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:RDe(),onClick:()=>t(u=>!u),children:a===null?c1(s):_.jsxs("svg",{viewBox:"0 0 16 16",width:"16",height:"16","aria-hidden":"true",children:[_.jsx("circle",{cx:"8",cy:"8",r:xk,fill:"none",stroke:"var(--border)",strokeWidth:"2.5"}),_.jsx("circle",{cx:"8",cy:"8",r:xk,fill:"none",stroke:o,strokeWidth:"2.5",strokeLinecap:"round",strokeDasharray:`${rM*Math.max(a,2)/100} ${rM}`,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:CDe()}),_.jsx("span",{className:"context-meter-value text-text tabular-nums",children:a===null?BDe({value:Ce(c1(s))}):VDe({used:Ce(c1(s)),total:Ce(c1(i)),percent:Ce(c)})})]}),a!==null&&_.jsx(cq,{value:s,max:i,fillColor:o})]})]})}function VHn(e,n,t){const r=e.map(t);return n<0?r:[...r.slice(0,n),_.jsxs("div",{role:"group","aria-label":rj(),children:[_.jsx("div",{className:"px-2.5 pb-1 pt-2.5 text-sm font-medium text-subtext",children:rj()}),r.slice(n)]},"from-terminal")]}function KHn({activeSessionId:e,onClose:n,onResume:t,onImport:r}){const s=T.useRef(null),i=T.useRef(null),{data:a,isPending:o,error:c}=ut(ISn()),{data:u=[]}=ut(zh()),{data:h=[]}=ut(YI()),[f,p]=T.useState(""),[m,w]=T.useState(0);Dm(s,n);const k=T.useMemo(()=>new Map(u.map(N=>[N.id,N.name])),[u]),v=T.useMemo(()=>{const N=f.trim().toLowerCase(),j=M=>!N||M.toLowerCase().includes(N),A=(a??[]).filter(M=>M.id!==e).filter(M=>j(`${M.title??""} ${k.get(M.projectId)??""} ${bu[M.harness]}`)).map(M=>({kind:"session",key:M.id,session:M})),z=h.filter(M=>j(`${M.title??""} ${M.cwd??""} ${bu[M.harness]}`)).map(M=>({kind:"native",key:`${M.harness}:${M.nativeId}`,chat:M}));return[...A,...z]},[a,h,f,e,k]),b=T.useMemo(()=>v.findIndex(N=>N.kind==="native"),[v]),y=Math.min(m,Math.max(0,v.length-1));T.useLayoutEffect(()=>{var N;(N=i.current)==null||N.scrollIntoView({block:"nearest"})},[y,v]);const x=N=>(N==null?void 0:N.split("/").filter(Boolean).at(-1))??"",C=N=>N.kind==="native"?r(N.chat):t(N.session);return ii.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":ij(),tabIndex:-1,children:[_.jsx("div",{className:"border-b border-border p-3",children:_.jsx(Br,{"data-initial-focus":!0,value:f,placeholder:sj(),"aria-label":sj(),role:"combobox","aria-autocomplete":"list","aria-expanded":v.length>0,"aria-controls":"resume-options","aria-activedescendant":v[y]?`resume-option-${v[y].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 j=N.key==="ArrowDown"?1:-1;w((y+j+v.length)%v.length)}else N.key==="Enter"&&v[y]&&(N.preventDefault(),C(v[y]))}})}),_.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?ij():void 0,children:o?_.jsxs(Pr,{className:"px-2.5 py-2",role:"status",children:[_.jsx(kt,{})," ",xS()]}):c&&!a?_.jsx("div",{className:"px-2.5 py-2 text-sm text-accent-red",role:"alert",children:yS({error:Ce(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:Ezt()}):VHn(v,b,(N,j)=>{var D;const A=N.kind==="native"?N.chat:null,z=N.kind==="session"?N.session:null;return _.jsxs(vn,{id:`resume-option-${N.key}`,ref:j===y?i:void 0,type:"button",role:"option","aria-selected":j===y,active:j===y,tabIndex:-1,className:"gap-2.5 text-text",onMouseEnter:()=>w(j),onClick:()=>C(N),children:[_.jsx(Th,{harness:(A==null?void 0:A.harness)??(z==null?void 0:z.harness)??"claude-code"}),_.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",children:((D=(A==null?void 0:A.title)??(z==null?void 0:z.title))==null?void 0:D.trim())||Md()}),_.jsx("span",{dir:"auto",className:"max-w-40 shrink-0 truncate text-muted",title:(A==null?void 0:A.cwd)??void 0,children:A?x(A.cwd):k.get((z==null?void 0:z.projectId)??"")??""}),_.jsx("span",{className:"shrink-0 text-muted tabular-nums",children:vo((A==null?void 0:A.updatedAt)??(z==null?void 0:z.updatedAt)??0)})]},N.key)})})]})}),document.body)}const gb="!";function sM(e){return e.startsWith(gb)?e.slice(gb.length).trim():null}function WHn(e){return e.startsWith(gb)?e.slice(gb.length):e}function QHn(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 XHn(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 YHn(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,"")} ${t} -`}function kk(e,n){return n?` +`}function wk(e,n){return n?` \\[ ${e} \\] -`:`\\(${e}\\)`}function hHn(e,n){const t=n.trim().split(` +`:`\\(${e}\\)`}function ZHn(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 pHn(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 mHn(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function gHn(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function vHn(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const Cq="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",HC="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",Vu=256,Eq=1024,Nq=2e4,A4=8,bHn="chat-annotations",yHn="side-chat-annotations";function P_(e){return e instanceof Element?e:e.parentElement}function sM(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function T4(e,n){return sM(e).compareBoundaryPoints(Range.START_TO_START,sM(n))<0}function iM(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const xHn=new Set(["A","B","CODE","EM","I","STRONG"]);function wHn(e,n){var s,i;const t=P_(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=P_(e.startContainer);for(;a&&a.matches(".md *")&&a.contains(t);){if(xHn.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=P_(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 kHn(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 SHn(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},h={container:c.endContainer,offset:c.endOffset};if(T4(s,u)&&t.append(iM(s,u)),t.append(o.cloneNode(!0)),s=h,!T4(s,r))break}return i.length===0?t.append(e.cloneContents()):T4(s,r)&&t.append(iM(s,r)),wHn(e,t),kHn(t),t}function CHn(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>nm(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` +`)}function JHn(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 eqn(e,n){const t=Number(e.slice(1));return Number.isInteger(t)&&t>=1&&t<=6?`${"#".repeat(t)} ${n.trim()}`:void 0}function tqn(e){return!e.includes("\\(")&&!e.includes("\\[")&&!e.includes("$$")}function nqn(e,n){return Math.min(e.length,n.length)/Math.max(e.length,n.length)>=.8&&(e.includes(n)||n.includes(e))}const Cq="tool-line flex-1 min-w-0 line-clamp-2 break-words text-base leading-6",HC="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",Wu=256,Eq=1024,Nq=2e4,j4=8,rqn="chat-annotations",sqn="side-chat-annotations";function F_(e){return e instanceof Element?e:e.parentElement}function iM(e){const n=document.createRange();return n.setStart(e.container,e.offset),n.collapse(!0),n}function A4(e,n){return iM(e).compareBoundaryPoints(Range.START_TO_START,iM(n))<0}function aM(e,n){const t=document.createRange();return t.setStart(e.container,e.offset),t.setEnd(n.container,n.offset),t.cloneContents()}const iqn=new Set(["A","B","CODE","EM","I","STRONG"]);function aqn(e,n){var s,i;const t=F_(e.endContainer);if(Array.from(n.childNodes).every(a=>a.nodeType===Node.TEXT_NODE)){let a=F_(e.startContainer);for(;a&&a.matches(".md *")&&a.contains(t);){if(iqn.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=F_(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 oqn(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 cqn(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},h={container:c.endContainer,offset:c.endOffset};if(A4(s,u)&&t.append(aM(s,u)),t.append(o.cloneNode(!0)),s=h,!A4(s,r))break}return i.length===0?t.append(e.cloneContents()):A4(s,r)&&t.append(aM(s,r)),aqn(e,t),oqn(t),t}function lqn(e){const n=Array.from(e.querySelectorAll("tr")).map(t=>Array.from(t.querySelectorAll(":scope > th, :scope > td")).map(r=>nm(r).trim().replaceAll("|","\\|"))).filter(t=>t.length>0);return n.length>0?` -${pHn(n,!!e.querySelector("tr:first-child th"))} +${JHn(n,!!e.querySelector("tr:first-child th"))} `:""}function zq(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 h=Array.from(a.childNodes).map(f=>f instanceof HTMLElement&&f.matches("UL, OL")?` ${zq(f).trim()} -`:nm(f)).join("").trim();i.push(hHn(n?`${u}.`:"-",h))}return` +`:nm(f)).join("").trim();i.push(ZHn(n?`${u}.`:"-",h))}return` ${i.join(` `)} -`}function nm(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return _Hn(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(nm).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?kk(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?kk(c,!1):""}if(e.tagName==="BR")return` -`;if(e.tagName==="TABLE")return CHn(e);if(e.matches("UL, OL"))return zq(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return fHn(e.textContent??"");if(e.tagName==="PRE")return dHn(e.textContent??"");const n=Array.from(e.childNodes).map(nm).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 nm(e){var r,s,i,a,o;if(e.nodeType===Node.TEXT_NODE)return QHn(e.textContent??"");if(!(e instanceof HTMLElement))return Array.from(e.childNodes).map(nm).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?wk(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?wk(c,!1):""}if(e.tagName==="BR")return` +`;if(e.tagName==="TABLE")return lqn(e);if(e.matches("UL, OL"))return zq(e);if(e.tagName==="CODE"&&((o=e.parentElement)==null?void 0:o.tagName)!=="PRE")return XHn(e.textContent??"");if(e.tagName==="PRE")return YHn(e.textContent??"");const n=Array.from(e.childNodes).map(nm).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` @@ -1092,7 +1092,7 @@ ${n.trim().split(` `).map(c=>`> ${c}`).join(` `)} -`;const t=mHn(e.tagName,n);return t?` +`;const t=eqn(e.tagName,n);return t?` ${t} @@ -1100,37 +1100,37 @@ ${t} ${n.trim()} -`:n}function EHn(e,n){return nm(e).replace(/\r\n?/g,` +`:n}function uqn(e,n){return nm(e).replace(/\r\n?/g,` `).replace(/[ \t]+\n/g,` `).replace(/\n{3,}/g,` -`).trim()||n}function aM(e){return e.normalize("NFKC").replace(/[\s\u200B-\u200D\u2060\uFEFF]/g,"").toLowerCase()}function NHn(e,n){var s,i,a,o;if(!gHn(e))return;const t=aM(e);if(t.length<8)return;let r;for(const c of n.querySelectorAll(".msg-assistant > .md .katex")){const h=[(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(aM).find(w=>vHn(w,t));if(!h)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:kk(f,p).trim(),delta:Math.abs(h.length-t.length)};(!r||m.delta .md .katex")){const h=[(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(oM).find(w=>nqn(w,t));if(!h)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:wk(f,p).trim(),delta:Math.abs(h.length-t.length)};(!r||m.deltaz.width>0&&z.height>0),w=m[0]??t.getBoundingClientRect(),k=m.filter(z=>z.topw.top),v=k.length>0?k:[w],b=Math.min(...v.map(z=>z.left)),y=Math.max(...v.map(z=>z.right)),x=Math.min(...v.map(z=>z.top)),C=Math.max(...v.map(z=>z.bottom)),N=34,j=74,A=x>=N+A4?x-N-A4:C+A4;return{text:EHn(p,f),range:t.cloneRange(),x:Math.min(window.innerWidth-j,Math.max(j,b+(y-b)/2)),top:A}}function jHn(e,n){const[t,r]=T.useState(null),s=T.useRef(!1),i=T.useCallback(()=>{const c=e.current;r(c?zHn(c):null)},[e]);T.useEffect(()=>{let c=null;const u=()=>{s.current||i()},h=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",h,!0),window.addEventListener("pointerup",f,!0),window.addEventListener("pointercancel",f,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",h,!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 h=u.target;h instanceof Element&&h.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 AHn(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 THn({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?NHn(e.text,s):void 0)},[e.id,e.text]),_.jsx("div",{ref:n,children:_.jsx(_c,{text:t??e.text})})}function RHn({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:x6e()}),_.jsx(THn,{annotation:t})]}),n&&_.jsx(It,{type:"button",size:"small","data-annotation-remove":!0,title:SSe(),"aria-label":LJ({number:Jt(r+1)}),onClick:()=>n(t.id),children:_.jsx(xr,{size:13})})]},t.id))}function qC({annotations:e,variant:n,onClear:t,onRemove:r}){const s=T.useRef(null),i=T.useRef(null),a=T.useId(),o=Ki(s),c=n==="sent",u=T.useRef(null),h=()=>{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,b;(b=((v=i.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||b.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?h: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(B$,{size:c?13:14,className:"text-muted"}),e.length===1?nye():rme({count:Jt(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:FN(),"aria-label":FN(),onClick:t,children:_.jsx(xr,{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":h6e(),children:_.jsx(RHn,{annotations:e,onRemove:r?m:void 0})})]})}function MHn(e){return _.jsx(qC,{...e,variant:"composer"})}const OHn=["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(" "),oM=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),DHn=["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(" "),LHn=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),Sk="prompt-actions flex flex-wrap gap-2",cM=[],IHn=[],i0={};function D_(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function R4(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 $Hn(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 Js(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function M4(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 O4(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Vu));s++);return r}function BHn(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 eh(...e){const n=new Set,t=new RegExp(`^${af}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=Vu||r++>=Eq)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function Xy(e){return e.replace(/^Exit code \d+\s*/i,"").split(` +`).trim();if(!f)return null;const p=cqn(t,e),m=Array.from(t.getClientRects()).filter(z=>z.width>0&&z.height>0),w=m[0]??t.getBoundingClientRect(),k=m.filter(z=>z.topw.top),v=k.length>0?k:[w],b=Math.min(...v.map(z=>z.left)),y=Math.max(...v.map(z=>z.right)),x=Math.min(...v.map(z=>z.top)),C=Math.max(...v.map(z=>z.bottom)),N=34,j=74,A=x>=N+j4?x-N-j4:C+j4;return{text:uqn(p,f),range:t.cloneRange(),x:Math.min(window.innerWidth-j,Math.max(j,b+(y-b)/2)),top:A}}function dqn(e,n){const[t,r]=T.useState(null),s=T.useRef(!1),i=T.useCallback(()=>{const c=e.current;r(c?fqn(c):null)},[e]);T.useEffect(()=>{let c=null;const u=()=>{s.current||i()},h=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",h,!0),window.addEventListener("pointerup",f,!0),window.addEventListener("pointercancel",f,!0),()=>{document.removeEventListener("selectionchange",u),document.removeEventListener("pointerdown",h,!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 h=u.target;h instanceof Element&&h.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 hqn(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 pqn({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?_qn(e.text,s):void 0)},[e.id,e.text]),_.jsx("div",{ref:n,children:_.jsx(_c,{text:t??e.text})})}function mqn({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:aCe()}),_.jsx(pqn,{annotation:t})]}),n&&_.jsx(It,{type:"button",size:"small","data-annotation-remove":!0,title:l6e(),"aria-label":OJ({number:Jt(r+1)}),onClick:()=>n(t.id),children:_.jsx(xr,{size:13})})]},t.id))}function qC({annotations:e,variant:n,onClear:t,onRemove:r}){const s=T.useRef(null),i=T.useRef(null),a=T.useId(),o=Vi(s),c=n==="sent",u=T.useRef(null),h=()=>{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,b;(b=((v=i.current)==null?void 0:v.querySelector("button[data-annotation-remove]"))??i.current??s.current)==null||b.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?h: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(B$,{size:c?13:14,className:"text-muted"}),e.length===1?Fye():Hme({count:Jt(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:HN(),"aria-label":HN(),onClick:t,children:_.jsx(xr,{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":J6e(),children:_.jsx(mqn,{annotations:e,onRemove:r?m:void 0})})]})}function gqn(e){return _.jsx(qC,{...e,variant:"composer"})}const vqn=["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(" "),cM=["prompt-collapsed-body mt-1.5 ps-3 border-s-2 border-s-border","text-sm text-subtext"].join(" "),bqn=["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(" "),yqn=["prompt-head text-sm font-medium text-text","[&_code]:font-mono [&_code]:text-sm [&_code]:text-text"].join(" "),kk="prompt-actions flex flex-wrap gap-2",lM=[],xqn=[],i0={};function L_(e){const n=e.replace(/\/+$/,"");return n.slice(n.lastIndexOf("/")+1)||n}function T4(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 wqn(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 ei(e,...n){for(const t of n){const r=e[t];if(typeof r=="string"&&r)return r}return null}function R4(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 M4(e,n){const t=e[n];if(!Array.isArray(t))return[];const r=[];for(let s=0;s=Wu));s++);return r}function kqn(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 eh(...e){const n=new Set,t=new RegExp(`^${of}$`,"i");let r=0;for(const s of e)for(const i of s){if(n.size>=Wu||r++>=Eq)return[...n];t.test(i)&&n.add(i.toLowerCase())}return[...n]}function Qy(e){return e.replace(/^Exit code \d+\s*/i,"").split(` `).filter(n=>!/^\s*\[orx-(?:run|experiment):[^\]]+\]\s*$/.test(n)).join(` -`).trim()}function PHn(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 FHn(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=YOn(r),jq(r)}function jq(e){return qHn(e).replace(/[\t\r ]+/g," ").trim()}function HHn(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&&Tq(s)?{ref:r,path:s}:null}function KHn(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 lM(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 VHn(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=lM(s,o);if(!c)return null;s=c}return s?lM(s,e):e}const Qo="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",WHn=new RegExp(`\\bchat_(${Qo})\\b`,"gi"),af=`(?:${Qo}|[0-9a-f]{8})`;function th(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 h=1,f=null,p=!1;for(let m=u;m{let h=!1;for(let f=u;feDn(t.raw,n))}function Ba(e,n){return Yy(e,n).length>0}function QHn(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,Nq).matchAll(WHn))if(n.add(t[0].toLowerCase()),n.size>=Vu)break;return[...n]}function Ck(e,n){if(!e)return[];const t=new Set,r=e.slice(0,Nq),s=n==="runs"?[new RegExp(`/runs/(${Qo})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${Qo})`,"gi"),new RegExp(`^\\s*RUN\\s+(${Qo})\\b`,"gim"),new RegExp(`={3,}\\s*(${Qo})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${Qo})`,"gi"),new RegExp(`^\\s*id:\\s*(${Qo})`,"gim"),new RegExp(`={3,}\\s*(${Qo})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=Vu)return[...t];const i=new RegExp(`^\\s*(${Qo})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=Vu)break;return[...t]}function Mq(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 Oq(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 Dq(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 XHn(e,n,t=[],r=[]){const s=Yy(e,"logs"),i=new Set;if(s.length===0){if(!Ba(e,"logs"))return[];const o=t.length>0?[]:Ck(n,"runs");for(const c of t.length>0?t:o.length>0?o:r)if(i.add(c),i.size>=Vu)break;return eh([...i])}let a=!1;for(const{invocation:o,offset:c}of Mq(e,s)){const u=Dh(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const h=u.slice(1);let f=null;for(let v=0;v0?[]:Ck(n,"runs"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Vu)break}return eh([...i])}function Ad(e,n,t=[],r=[]){const s=Yy(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:c}of Mq(e,s)){const u=Dh(o.raw),h=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let f=!1;h&&new RegExp(`^${af}$`,"i").test(h)&&(i.add(h),f=!0);const p=h?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(h):null;if(p){const m=p[1],w=Oq(e,m,c,af);if(w.length>0){for(const v of w)i.add(v);f=!0}const k=Dq(e,m,c,af);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?[]:Ck(n,"experiments"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Vu)break}return eh([...i])}const uM=new WeakMap;function xf(e){const n=E(),t=uM.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=YHn(e);return uM.set(e,{locale:n,activity:r}),r}function YHn(e){var b,y,x,C,N,j;const n=e.tool??"tool",t=((b=e.state)==null?void 0:b.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=Js(i,"command","cmd"),o=BHn(i,"commandArgv"),c=((y=e.state)==null?void 0:y.output)||((x=e.state)==null?void 0:x.error),u=eh(O4(i,"targetIds")),h=eh(O4(i,"runTargetIds")),f=eh(O4(i,"experimentTargetIds")),p=Js(i,"filePath","file_path","notebookPath","notebook_path","path"),m=Js(i,"description"),w=n.toLowerCase().split(/(?::|\.|__)+/),k=w.at(-1)??n.toLowerCase();if(k==="run"&&w.includes("web")){const A=M4(i,"search_query","q"),z=M4(i,"image_query","q"),M=M4(i,"find","pattern");return A?{kind:"web",label:wN({query:A})}:z?{kind:"web",label:qae({query:z})}:M?{kind:"web",label:joe({pattern:M})}:Array.isArray(i.open)?{kind:"web",label:D5e()}:Array.isArray(i.weather)?{kind:"web",label:nwe()}:Array.isArray(i.finance)?{kind:"web",label:H2e()}:Array.isArray(i.sports)?{kind:"web",label:Q2e()}:Array.isArray(i.time)?{kind:"web",label:D2e()}:{kind:"web",label:BN()}}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:jke()};const A=FHn(a??(o==null?void 0:o.join(" "))??""),z=th(A);let M=z.map(K=>K.raw);if(o!=null&&o.length){const K=JOn(o);M=K===null?[o]:th(jq(K)).map(oe=>oe.raw)}let D=null;for(const K of M)if(D=tDn(K),D)break;const I=M.some(K=>{const oe=Dh(K);return oe!==null&&oe[0]!=="discover"&&oe[0]!=="paper"});if(D&&!I){const K=D.kind==="discover"?{keyword:uae(),embedding:gae(),openalex:loe(),biorxiv:Sae(),pubmed:moe()}[D.strategy]:null,oe=D.kind==="discover"?D.query?Vne({activity:K??xN(),query:D.query}):K??xN():D.id?Vp({target:Ce(D.id)}):kse();return{kind:D.kind==="paper"?"read":"search",label:oe,litCall:D}}if(Ba(A,"agent\\s+spawn"))return{kind:"agent",label:Fwe(),spawnedSessionIds:QHn(c),litCall:D??void 0};const B=z.map(K=>Rq(K.raw)),G=Ba(A,"exp\\s+status"),U=Ba(A,"exp\\s+desc"),Q=Yy(A,"exp\\s+desc").some(K=>(Dh(K.raw)??[]).some(ce=>ce==="--set"||ce.startsWith("--set=")||ce==="--stdin")),V=Q?Sce():mse(),Z=Q?vte():Aie();if(Ba(A,"logs")){const K=XHn(A,c,h,u);return{kind:"project",label:K.length===1?mie():kie(),runIds:K,litCall:D??void 0}}if(Ba(A,"exp\\s+run"))return{kind:"project",label:J6e(),litCall:D??void 0};if(Ba(A,"exp\\s+wait"))return{kind:"project",label:t8e(),litCall:D??void 0};if(Ba(A,"exp\\s+cancel"))return{kind:"project",label:t2e(),litCall:D??void 0};const J=Ba(A,"project\\s+view");if(J&&G&&U)return{kind:"project",label:Z,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(J&&U)return{kind:"project",label:V,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(J&&G)return{kind:"project",label:PN(),experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(J)return{kind:"project",label:rSe(),litCall:D??void 0};if(G&&U)return{kind:"project",label:Z,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(G)return{kind:"project",label:PN(),experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(U)return{kind:"project",label:V,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(Ba(A,"runs?"))return{kind:"project",label:W3e(),litCall:D??void 0};if(Ba(A,"projects"))return{kind:"project",label:t5e(),litCall:D??void 0};if(Ba(A,"compute"))return{kind:"project",label:p2e(),litCall:D??void 0};const $=B.map(GHn).find(K=>K!=null);if($){const K=R4($.path);return{kind:K?"skill":"read",label:K?lw({name:Ce(K)}):Vp({target:Ce(D_($.path))}),filePath:$.path,fileRef:$.ref,labelTarget:K?`${K} skill`:D_($.path)}}const L=B.findIndex(K=>K!=null&&["sed","cat","head","tail"].includes(K.name)),q=L>=0?B[L]:null,P=q?UHn(q):null,F=P?VHn(P,z,L,Js(i,"cwd","workdir")):null;if(P&&F){const K=R4(F);return{kind:K?"skill":"read",label:K?lw({name:Ce(K)}):Vp({target:Ce(D_(P))}),filePath:F,labelTarget:K?`${K} skill`:D_(P)}}if(B.some(K=>(K==null?void 0:K.name)==="find"||(K==null?void 0:K.name)==="ls"||(K==null?void 0:K.name)==="rg"&&K.args.includes("--files")))return{kind:"search",label:XN()};const re=B.findIndex(K=>(K==null?void 0:K.name)==="rg"||(K==null?void 0:K.name)==="grep");if(re>=0){const K=KHn(z[re].raw);return{kind:"search",label:K?_w({pattern:Ce(K)}):uw(),searchPattern:K??void 0}}const ie=B.find(K=>(K==null?void 0:K.name)==="git"),ue=ie==null?void 0:ie.args[0];if(ue==="grep"){const K=ie==null?void 0:ie.args.slice(1).find(oe=>!oe.startsWith("-"));return{kind:"search",label:K?_w({pattern:Ce(K)}):uw(),searchPattern:K}}if(ue==="status")return{kind:"command",label:z2e()};if(ue==="diff")return{kind:"command",label:t6e()};if(ue==="log")return{kind:"command",label:Xke()};const se=K=>B.some(oe=>!oe||!["cargo","pnpm","npm","yarn"].includes(oe.name)?!1:oe.args[0]===K||oe.args[0]==="run"&&oe.args[1]===K);return se("test")?{kind:"command",label:Lke()}:B.some(K=>(K==null?void 0:K.name)==="tsc")||se("typecheck")?{kind:"command",label:lwe()}:se("lint")?{kind:"command",label:c2e()}:se("build")?{kind:"command",label:Fxe()}:{kind:"command",label:Qre({command:Ce(A)})}}case"skill":{const A=Js(i,"skill","name"),z=A?$Hn(n,A):null;return{kind:"skill",label:A?zre({name:Ce(A)}):xre(),filePath:z??void 0,labelTarget:z&&A?`${A} skill`:void 0}}case"read":{const A=p?D_(p):null,z=p?R4(p):null;return z?{kind:"skill",label:lw({name:Ce(z)}),filePath:p??void 0,labelTarget:`${z} skill`}:A?{kind:"read",label:Vp({target:Ce(A)}),filePath:p??void 0,labelTarget:A}:{kind:"read",label:qke()}}case"edit":case"write":case"notebookedit":{const A=PHn(i),z=p??(A==null?void 0:A.path)??null,M=z?D_(z):null,D=M?(A==null?void 0:A.type)==="add"?Zte({target:Ce(M)}):(A==null?void 0:A.type)==="delete"?bne({target:Ce(M)}):Mne({target:Ce(M)}):null;return M?{kind:"edit",label:D??KN(),filePath:z??void 0,labelTarget:M}:{kind:"edit",label:KN()}}case"grep":{const A=Js(i,"pattern");return{kind:"search",label:A?_w({pattern:Ce(A)}):uw(),searchPattern:A??void 0}}case"glob":{const A=Js(i,"pattern");return{kind:"search",label:A?ore({pattern:Ce(A)}):XN()}}case"websearch":{const A=Js(i,"query"),z=Js(i,"url"),M=Js(i,"pattern");return A?{kind:"web",label:wN({query:A})}:M&&z?{kind:"web",label:noe({pattern:M})}:z?{kind:"web",label:Hre({target:Ce(z)})}:{kind:"web",label:m??BN()}}case"webfetch":{const A=Js(i,"url");return{kind:"web",label:A?Vp({target:Ce(A)}):m??Hse()}}case"task":return{kind:"agent",label:m??nse()};case"subagent":return{kind:"agent",label:ZHn(i)};case"error":return{kind:"command",label:D7e()};case"importedchat":return{kind:"project",label:ere()};case"contextcompaction":return{kind:"command",label:((C=e.state)==null?void 0:C.status)==="error"?Gte():((N=e.state)==null?void 0:N.status)==="running"?yN():Rte(),progressLabel:yN()};default:{const A=m??p??a??((j=e.state)==null?void 0:j.title)??"";return{kind:"command",label:A?`${n}: ${A}`:n}}}}function ZHn(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 Cte()}switch(typeof e.kind=="string"?e.kind:""){case"started":return gce();case"interacted":return Yee();case"interrupted":return uce()}return rce()}function vb({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=_.jsx(Mf,{...t});if(e.litCall)r=_.jsx(bF,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=_.jsx(z$,{...t});break;case"read":case"project":r=_.jsx(j$,{...t});break;case"search":r=_.jsx(H$,{...t});break;case"edit":r=_.jsx(KS,{...t});break;case"web":r=_.jsx(b7n,{...t});break;case"agent":r=_.jsx(XS,{...t});break}return _.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function D4({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?Wr(h=>n(c.id,h),{stopPropagation:!0}):{onClick:h=>{h.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?tZ({target:r}):Aee({count:Jt(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),o.current=!s&&c.detail===0,i(u=>!u)},children:s?vL():BAe({count:Jt(e.length)})})]})}function Ek({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,c,u,h;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:cDn(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,_.jsx(kCn,{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,...Wr(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:TN({number:Jt(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:z5e(),onClick:v=>{v.preventDefault(),v.stopPropagation(),r(w)},children:TN({number:Jt(k+1)})})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(D4,{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))||rl()}));return _.jsxs(_.Fragment,{children:[e.label," — ",p.map((w,k)=>_.jsxs("span",{children:[k>0&&", ",t?_.jsx("button",{className:"tool-target",title:nJ({run:Ce(w)}),...Wr(v=>t(w,v),{stopPropagation:!0}),children:(s==null?void 0:s(w))||rl()}):_.jsx("span",{children:(s==null?void 0:s(w))||rl()})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(D4,{items:m,onOpen:t,targetType:cEe()})]})]})}if((h=e.experimentIds)!=null&&h.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))||rl()}));return _.jsxs(_.Fragment,{children:[e.label," — ",p.map((w,k)=>_.jsxs("span",{children:[k>0&&", ",i?_.jsx("button",{className:"tool-target",title:DZ({name:(a==null?void 0:a(w))||Ce(w)}),...Wr(v=>i(w,v),{stopPropagation:!0}),children:(a==null?void 0:a(w))||rl()}):_.jsx("span",{children:(a==null?void 0:a(w))||rl()})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(D4,{items:m,onOpen:i,targetType:E1e()})]})]})}return e.label}function UC(e){const n=e.progressLabel??{skill:Dre(),read:Qse(),search:Loe(),edit:Pne(),project:Iie(),web:_te(),agent:fne(),command:iL()}[e.kind];return{...e,label:n}}function Lq(e,n){const t=xf({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:hre(),read:lse(),search:rae(),edit:Ene(),project:lie(),web:ste(),agent:ine(),command:Uie()}[t.kind]}function JHn(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const eqn=250;function tqn(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=eqn-(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 nqn=160;function Iq(e){const[n,t]=T.useState(!1);return T.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),nqn);return()=>window.clearTimeout(r)},[e]),e&&n}function rqn(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:dL()}}function sqn(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])}function iqn(e){const n=[];let t=null;for(const r of e){const s=xf(r),i=sqn(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 $q({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 b=Date.now();c(b),b>=a&&window.clearInterval(v)},1e3);return()=>window.clearInterval(v)},[a]),e.id==="turn-retry"){const v=GOn(i??{},o);return _.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[_.jsx(St,{}),_.jsx("span",{children:v})]})}const u=gF(i==null?void 0:i.recoveryAction),h=i==null?void 0:i.turnId,f=mF(e)?Wve():s?NEe():lz(),p=s?d7n:QS,m=Xy(((k=e.state)==null?void 0:k.error)||lz());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(Ka,{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&&h&&(u==="retry"||u==="continue")&&_.jsx(Ie,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(h,u),children:t?tNe():u==="retry"?ni():Bge()})]})}function _M({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}){const u=e.state,h=(u==null?void 0:u.status)==="error",f=Xy((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=h&&!!f,[m,w]=T.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return _.jsx($q,{part:e,busy:!1,recovering:!1,usageLimited:G5(e)});const v=_.jsxs(_.Fragment,{children:[h&&_.jsxs("span",{className:"sr-only",children:[vS()," "]}),h?_.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:_.jsx(R$,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):_.jsx(vb,{activity:n,className:"text-muted"}),_.jsxs("span",{className:`${Cq} ${h?"text-accent-red":"text-subtext"}`,children:[_.jsx(Ek,{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:pZ({count:Jt(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?cZ({activity:n.label}):kee({activity:n.label}),onClick:()=>w(b=>!b),children:_.jsx(Ka,{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:HC,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 aqn({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var z,M,D,I;const[c,u]=T.useState(!1),[h,f]=T.useState(!1),p=()=>{f(!0),u(B=>!B)},m=iqn(e),w=m.map(({activity:B})=>B),k=n?m.at(-1):void 0,v=k==null?void 0:k.part,b=k==null?void 0:k.activity,y=((z=v==null?void 0:v.state)==null?void 0:z.status)!=="error"?(b&&UC(b))??null:null,x=!!v&&((M=v.state)==null?void 0:M.status)==="running"&&!(y!=null&&y.progressLabel)&&(JHn((D=v.state)==null?void 0:D.input)||(y==null?void 0:y.kind)==="command"&&!Js(((I=v.state)==null?void 0:I.input)??{},"command","cmd")),C=tqn(y,x),N=Iq(C!=null),j=C??rqn(w),A=C?C.label:dL();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(vb,{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(Ek,{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(_M,{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(vb,{activity:j,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(Ek,{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?vge():b1e(),children:_.jsx(Ka,{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:h&&m.map(({part:B,count:G,activity:U})=>_.jsx(_M,{part:B,repeatCount:G,activity:U,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o},B.id))})})})]})}function oqn({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var h;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:Q5e(),icon:bi,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:mke(),icon:KS,iconClass:"text-accent-amber"}:s.approved===!1?{label:nke(),icon:xr,iconClass:"text-accent-red"}:{label:lke(),icon:Qb,iconClass:"text-muted"},w=m.icon;return _.jsxs("details",{className:DHn,children:[_.jsxs("summary",{children:[_.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?pL():az()}),_.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(Ka,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),_.jsxs("div",{className:`${oM} 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(qC,{annotations:p,variant:"sent"}),_.jsxs("details",{className:OHn,children:[_.jsxs("summary",{children:[_.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||e9e()}),_.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||W9e()})]}),_.jsxs("div",{className:oM,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?F8e():az()}),_.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",...Wr(p=>r(s.plan??"",e.id,p)),children:W7e()}),!o&&!f&&_.jsxs("div",{className:Sk,children:[_.jsx(Ie,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:wye()}),_.jsx(Ie,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:jye()}),_.jsx(Ie,{size:"small",onClick:()=>c({approve:!1}),children:uSe()})]})]})}if(s.kind==="permission"){const f=s.toolInput??{},p=Js(f,"command","cmd","filePath","file_path","path")||"",m=typeof((h=s.toolInput)==null?void 0:h.reason)=="string"&&s.toolInput.reason||"",w=Js(f,"description")||"",k=m||w||Lq(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(QS,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),_.jsx("span",{id:v,className:"text-base font-semibold text-text",children:rxe()})]}),_.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(Ie,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:b4e()}),_.jsx(Ie,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:Xye()})]})]})]})}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:LHn,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:Sk,children:_.jsx(Ie,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>c({answers:i}),children:z7e()})})]})}function cqn(e,n){return e.role==="user"?!0:e.parts.some(t=>Oh(t,n))}function lqn(e){const n=e.text??"",t=n.startsWith("data:")?n:ykn(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 GC(e){try{if(!navigator.clipboard)throw new Error(kL());await navigator.clipboard.writeText(e),Zt(uf(),"success")}catch(n){Zt(n instanceof Error?n.message:String(n),"error")}}function uqn(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 _qn({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:i,onSelect:a,pagerDisabled:o,onEdit:c,editDisabled:u}){const h=t>1,f=new Date(n),p=()=>GC(e);return _.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${h?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[h&&_.jsxs(_.Fragment,{children:[_.jsx(It,{size:"small",title:ZN(),"aria-label":ZN(),disabled:o||!s,onClick:()=>s&&a(s),children:_.jsx(A$,{size:14})}),_.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),_.jsx(It,{size:"small",title:YN(),"aria-label":YN(),disabled:o||!i,onClick:()=>i&&a(i),children:_.jsx(Ka,{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(It,{size:"small","aria-label":SS(),disabled:!e,onClick:p,children:_.jsx(Yu,{size:13})})]}),_.jsx(It,{size:"small",title:GN(),"aria-label":GN(),disabled:u,onClick:c,children:_.jsx(KS,{size:13})})]})}const fqn=T.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,busy:m=!1,recoveringTurnId:w,onRecover:k,skills:v,predictTextTail:b=!1,forkCount:y,forkIndex:x=0,forkPrevId:C,forkNextId:N,forkDisabled:j,branchDisabled:A,onFork:z,onSelectFork:M}){var Z,J;Qu();const[D,I]=T.useState(null),B=hqn(n);if(B)return _.jsx(pqn,{part:B});if(n.role==="user"){const $=n.parts.filter(ie=>ie.type==="text").map(ie=>ie.text??"").join(` -`),L=ie=>!!(v!=null&&v.some(ue=>ue.name===FC(ie))),q=n.parts.filter(ie=>ie.type==="image"&&ie.text).map(lqn),P=q.filter(ie=>!ie.isPdf),F=q.filter(ie=>ie.isPdf),re=n.parts.filter(ie=>ie.type==="annotation"&&ie.text).map(ie=>({id:ie.id,text:ie.text??""}));if(D!==null){const ie=()=>{const ue=D.trim();!ue||j||(I(null),z(n.id,ue))};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":$4e(),value:D,autoFocus:!0,onChange:ue=>I(ue.target.value),onKeyDown:ue=>{ue.key==="Escape"?(ue.preventDefault(),I(null)):ue.key==="Enter"&&!ue.shiftKey&&!ue.nativeEvent.isComposing&&(ue.preventDefault(),ie())}}),_.jsxs("div",{className:`${Sk} justify-end`,children:[_.jsx(Ie,{size:"small",onClick:()=>I(null),children:Wxe()}),_.jsx(Ie,{size:"small",variant:"primary",onClick:ie,disabled:j||!D.trim(),children:j3()})]})]})})}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:[re.length>0&&_.jsx(qC,{annotations:re,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(nHn,{text:$,isCommand:L}),P.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:P.map((ie,ue)=>_.jsx("a",{href:ie.src,target:"_blank",rel:"noreferrer",children:_.jsx("img",{src:ie.src,alt:Tme()})},ue))}),F.length>0&&_.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:F.map((ie,ue)=>_.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:ie.src,target:"_blank",rel:"noreferrer",children:[_.jsx(Qb,{size:15}),_.jsx("span",{children:ie.name})]},ue))})]}),y!==void 0&&_.jsx(_qn,{text:$,createdAt:n.createdAt,count:y,index:x,prevId:C,nextId:N,onSelect:M,pagerDisabled:A,onEdit:()=>I($),editDisabled:j})]})}const G=n.parts.find($=>$.type==="tool"&&G5($)),U=n.parts.find(Gm)??G,Q=BOn(n.parts.filter($=>$!==U&&!(G&&G5($))),U),V=b&&!n.completedAt?"":pF(n);return _.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[_.jsx(dqn,{message:n,parts:Q,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,predictTextTail:b}}),U&&_.jsx($q,{part:U,usageLimited:!!G,busy:m,recovering:w===((J=(Z=U.state)==null?void 0:Z.input)==null?void 0:J.turnId),onRecover:k}),V&&_.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(It,{size:"small",title:MN(),"aria-label":MN(),onClick:()=>void GC(V),children:_.jsx(Yu,{size:13})})})]})});function dqn({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:i}=dF(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:hv(i,t)});const u=e.completedAt??(r?Date.now():null),h=u===null?null:u-e.createdAt,f=h===null?null:h<6e4||h>=36e5?$0(h):Hze({minutes:Jt(Math.floor(h/6e4)),seconds:Jt(Math.floor(h/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?Dze():Qze({duration:f})}),_.jsx(Ka,{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:hv(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),_.jsx("div",{className:"turn-answer",children:hv(i,t)})]})}function hqn(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===ZI?n:null}function pqn({part:e}){var c;const n=e.state,t=Js((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?iL():s&&i!==null?ige({code:Jt(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:[uL()," "]}),_.jsx(Mf,{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:`${HC} 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 hv(e,n){var y,x;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,predictTextTail:m=!1}=n,w=e.filter(C=>C.type!=="steer"&&Oh(C,t)).at(-1),k=[];let v=[];const b=()=>{v.length!==0&&(k.push(_.jsx(aqn,{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(Oh(C,t)){if(C.type==="tool"&&(gqn(C.tool)||(((y=C.children)==null?void 0:y.length)??0)>0)){b(),k.push(_.jsx(bqn,{part:C,pendingTail:m&&((x=C.state)==null?void 0:x.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){v.push(C);continue}b(),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":w8e(),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(oqn,{part:C,onRespond:h,onOpenFile:s,onOpenPlan:f},C.id))}return b(),k}function mqn(e){return xf(e).label}function gqn(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function Bq(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 bb(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&bb(t.children,n);if(r)return r}return null}function vqn({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var w,k,v,b;const o=e.children??[],c=((w=e.state)==null?void 0:w.status)==="running",u=((k=e.state)==null?void 0:k.status)==="error",h=u?Xy(((v=e.state)==null?void 0:v.error)||((b=e.state)==null?void 0:b.output)||""):"",f=hv(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:c,pendingTailToolId:c?_F(o):null}),m=o.some(y=>y.type==="text"&&!!y.text)?"":Bq(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:[vS()," "]}),h&&_.jsx("div",{className:HC,children:h.slice(0,2e4)}),f.length===0&&!m&&!h?_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?bS():hbe()}):_.jsxs(_.Fragment,{children:[f,m&&_.jsx(_c,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function bqn({part:e,pendingTail:n,onOpenSubagent:t}){var u,h,f,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=Xy(((h=e.state)==null?void 0:h.error)||((f=e.state)==null?void 0:f.output)||""),i=n&&!r?UC(xf(e)):xf(e),a=Iq(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!Bq(e),c=_.jsxs(_.Fragment,{children:[r&&_.jsxs("span",{className:"sr-only",children:[vS()," "]}),r?_.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:_.jsx(R$,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):_.jsx(vb,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),_.jsx("span",{className:`${Cq} ${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:lye(),...Wr(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(Ka,{size:12})})]})}function yqn(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 KC(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=Js(o,"reason","description")||Lq(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 xqn(e){const[n,t]=T.useState({text:"",sequence:0}),r=T.useRef(null);return T.useEffect(()=>{var w,k,v,b,y;const s=((w=e[0])==null?void 0:w.id)??"",{messageId:i,states:a}=yqn(e),o=KC(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(x=>({text:o?kN({label:_a(o.label)}):"",sequence:x.sequence+1}));return}const c=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,h=[...a].filter(([x,C])=>{var N;return((N=c.get(x))==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(x=>({text:kN({label:_a(o.label)}),sequence:x.sequence+1}));return}const f=(k=h.find(([,x])=>Gm(x.part)))==null?void 0:k[1].part;if((f==null?void 0:f.id)==="turn-recovery"){const x=gF((b=(v=f.state)==null?void 0:v.input)==null?void 0:b.recoveryAction);t(C=>({text:`${Ble()}${x?` ${x==="retry"?sle():Yce()}`:""}`,sequence:C.sequence+1}));return}if((f==null?void 0:f.id)==="turn-retry"){t(x=>({text:Uce(),sequence:x.sequence+1}));return}const p=h.filter(([,x])=>x.status==="error");if(p.length>0){const x=p.slice(0,2).map(([,C])=>xf(C.part).label).join(", ");t(C=>({text:p.length===1?Cle({labels:x}):Rle({count:Jt(p.length),labels:x}),sequence:C.sequence+1}));return}const m=h.filter(([,x])=>x.status==="running");if(m.length>0){const x=(y=m.at(-1))==null?void 0:y[1].part;t(C=>({text:x?UC(xf(x)).label:_le(),sequence:C.sequence+1}));return}h.some(([,x])=>x.status==="completed")&&t(x=>({text:vle(),sequence:x.sequence+1}))},[e]),n}const wqn=T.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:i,allMessages:a,canFork:o,onFork:c,onSelectFork:u,busy:h,onOpenFile:f,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:y,onOpenSubagent:x,recoveringTurnId:C,onRecover:N,skills:j}){var $,L,q;Qu();const A=(($=KC(n))==null?void 0:$.id)??null,z=T.useMemo(()=>n.filter(P=>cqn(P,A)),[n,A]),M=T.useMemo(()=>{const P=z.filter(F=>F.role==="user"&&!F.id.startsWith(rf));return IOn(a,n,P,F=>F.startsWith(rf))},[n,z,a]),D=T.useRef(new Set),[I,B]=T.useState(!1),G=T.useCallback(P=>z[P].id,[z]),U=T.useCallback(P=>{if(I)return z.map((re,ie)=>ie);const F=new Set(lF(P));return z.forEach((re,ie)=>{D.current.has(re.id)&&F.add(ie)}),[...F].sort((re,ie)=>re-ie)},[z,I]),Q=OOn({count:z.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:G,estimateSize:()=>400,overscan:1,initialRect:{width:((L=t.current)==null?void 0:L.clientWidth)??0,height:((q=t.current)==null?void 0:q.clientHeight)??0},initialOffset:()=>{var P;return Math.max(0,z.length*400-(((P=t.current)==null?void 0:P.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:U});T.useLayoutEffect(()=>{const P=()=>Q.scrollToEnd();return r.current=P,i(),()=>{r.current=null}},[Q,r,i]),T.useEffect(()=>{const P=()=>{var ie;const F=window.getSelection();if(!F||F.isCollapsed||!F.rangeCount)return;const re=F.getRangeAt(0);for(const ue of((ie=t.current)==null?void 0:ie.querySelectorAll("[data-message-id]"))??[])re.intersectsNode(ue)&&ue.dataset.messageId&&D.current.add(ue.dataset.messageId)};return document.addEventListener("selectionchange",P),()=>document.removeEventListener("selectionchange",P)},[t]);const V=z.at(-1),Z=xqn(n),J=h?fF(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":I,onClick:()=>B(P=>!P),children:FEe()}),_.jsx("div",{className:"relative",style:{height:Q.getTotalSize()},children:Q.getVirtualItems().map(P=>{var se,K,oe,ce,pe,ve;const F=z[P.index],re=F.parts.find(Gm),ie=(K=(se=re==null?void 0:re.state)==null?void 0:se.input)==null?void 0:K.turnId,ue=re?h||C!==null:!1;return _.jsx("div",{"data-index":P.index,"data-message-id":F.id,ref:Q.measureElement,className:"absolute left-0 w-full pb-4",style:{top:P.start},onClickCapture:Me=>{!(Me.target instanceof Element)||!Me.target.closest("[data-work-toggle]")||(s.current=!1,Q.setOptions({...Q.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(F.id),onFocusCapture:()=>D.current.add(F.id),children:_.jsx(fqn,{message:F,forkCount:(oe=M.get(F.id))==null?void 0:oe.count,forkIndex:(ce=M.get(F.id))==null?void 0:ce.index,forkPrevId:(pe=M.get(F.id))==null?void 0:pe.prevId,forkNextId:(ve=M.get(F.id))==null?void 0:ve.nextId,forkDisabled:!o,branchDisabled:h,onFork:c,onSelectFork:u,activePermissionId:A,pendingTailToolId:(J==null?void 0:J.messageId)===F.id?J.toolId:null,onOpenFile:f,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:y,onOpenSubagent:x,busy:ue,recoveringTurnId:ie===C?C:null,onRecover:N,skills:j,predictTextTail:h&&F===V&&F.role==="assistant"})},F.id)})})]})}),kqn=(e,n)=>e==="all"?!0:e==="archived"?n:!n;function L4(e){return e instanceof Element&&e.closest("[data-side-chat]")!==null}const Pq=[{id:"active",label:Lye,railLabel:mL},{id:"archived",label:IN,railLabel:IN},{id:"all",label:qye,railLabel:lL}];function Sqn({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=Ki();return _.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[_.jsx(It,{size:"small",className:"rail-filter-btn",active:e!=="active",title:QN(),"aria-label":QN(),onClick:()=>r(i=>!i),children:_.jsx(q$,{size:13})}),t&&_.jsx("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",children:Pq.map(i=>_.jsxs(vn,{onClick:()=>{n(i.id),r(!1)},children:[_.jsx("span",{children:i.label()}),e===i.id&&_.jsx(bi,{size:13})]},i.id))})]})}const Cqn=14,Eqn=500,Nqn=1200;function Fq({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*Cqn,Eqn)}ms`},children:t},r))}):_.jsx(_.Fragment,{children:e})}function zqn({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:c,onDelete:u}){var N;const{open:h,setOpen:f,ref:p}=Ki(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[w,k]=T.useState(!1),[v,b]=T.useState(""),y=T.useRef(null);function x(){var j;b(((j=e.title)==null?void 0:j.trim())||""),k(!0)}function C(){var A;const j=v.trim();k(!1),j&&j!==(((A=e.title)==null?void 0:A.trim())||"")&&o(j)}return T.useEffect(()=>{var j,A;w&&((j=y.current)==null||j.focus(),(A=y.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] px-2.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":""} ${h?"menu-open":""} ${w?"editing":""}`,title:`${bu[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?WEe():""}`,onClick:()=>{w||(h?f(!1):a())},onKeyDown:j=>{j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),h?f(!1):a())},children:[e.parentSessionId&&!w&&_.jsx(XS,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),w?_.jsx("input",{ref:y,className:"session-title-input","aria-label":P6e(),value:v,onChange:j=>b(j.target.value),onClick:j=>j.stopPropagation(),onBlur:C,onKeyDown:j=>{j.stopPropagation(),j.key==="Enter"?(j.preventDefault(),C()):j.key==="Escape"&&(j.preventDefault(),k(!1))}}):_.jsx("span",{className:"session-title",children:_.jsx(Fq,{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:rz(),"aria-label":rz(),onClick:j=>{j.stopPropagation(),f(A=>!A)},children:_.jsx(Lm,{size:14})}),h&&_.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(vn,{onClick:j=>{j.stopPropagation(),f(!1),x()},children:_.jsx("span",{children:fL()})}),_.jsx(vn,{onClick:j=>{j.stopPropagation(),f(!1),c(!e.archived)},children:_.jsx("span",{children:e.archived?cze():ume()})}),_.jsx(vn,{danger:!0,onClick:j=>{j.stopPropagation(),f(!1),u()},children:_.jsx("span",{children:_L()})})]})]})}const fM=[j$,H$,Mf,Ah],jqn=()=>[{title:dCe(),prompt:aCe()},{title:NCe(),prompt:yCe()},{title:FCe(),prompt:OCe()},{title:t7e(),prompt:WCe()}],I4=[{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"}],dM="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function Aqn(e,n){if(!e)return null;const t=e.model??null;return{...e,model:t,serviceTier:qv(n,t,e.serviceTier),reasoningLevel:KI(n,t,e.reasoningLevel)}}function hM({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:i,onSelectMainView:a,onOpenFile:o,onOpenRun:c,runExperimentName:u,onOpenExperiment:h,experimentName:f,onOpenPlan:p,onOpenSubagent:m,runtime:w,onOpenDemoWelcome:k,composerFocusNonce:v=0,demoRunningRunId:b=null,activeSessionId:y,onActiveSessionChange:x,preferredAgent:C,onPreferredAgentChange:N,preferredAutonomy:j,onPreferredAutonomyChange:A,embedded:z=!1,onOpenSideChat:M,children:D}){var ui,to,Pl,Mc,Io,ys,xs;const I=pn({mutationFn:te=>mkn(...te)}),B=pn({mutationFn:te=>fkn(...te)}),G=pn({mutationFn:te=>pkn(...te)}),U=pn({mutationFn:te=>hkn(...te)}),Q=pn({mutationFn:te=>okn(...te)}),V=pn({mutationFn:te=>lkn(...te)}),Z=pn({mutationFn:te=>ukn(...te)}),J=pn({mutationFn:te=>_kn(...te)}),$=pn({mutationFn:Q3}),L=T.useMemo(()=>Gi(e),[e]),{data:q=IHn}=ut(L),P=T.useCallback(te=>{Vr(L.queryKey,ge=>{if(!ge)return;const Se=typeof te=="function"?te(ge):te,Oe=new Map(ge.map(Pe=>[Pe.id,Pe]));for(const Pe of Se)Oe.get(Pe.id)!==Pe&&oo(tt,L.queryKey,Pe.id),Oe.delete(Pe.id);for(const Pe of Oe.keys())oo(tt,L.queryKey,Pe);return Se})},[L]),F=y,re=T.useRef(x);re.current=x;const ie=T.useRef({projectId:e});ie.current.projectId!==e&&(ie.current={projectId:e});const[ue,se]=T.useState(new Set),[K,oe]=T.useState("active"),[ce,pe]=T.useState(""),[ve,Me]=T.useState(!1),[Fe,Ye]=T.useState(!1),[Te,$e]=T.useState([]),yt=T.useRef(0),ot=T.useRef({projectId:e,activeId:F,mainView:i});(ot.current.projectId!==e||ot.current.activeId!==F||ot.current.mainView!==i)&&(ot.current={projectId:e,activeId:F,mainView:i});const[Mt,jt]=T.useState([]),[Pt,Le]=T.useState(null),nt=F??"new",ke=T.useRef(new Map),me=T.useRef(Yw);me.current={draft:ce,attachments:Mt,annotations:Te};const je=e===Wp&&!z&&q.length>0&&q.every(te=>te.sideParentSessionId||X4n[te.id]===te.activeLeafId)?xj:null,qe=T.useRef(null);je!==null&&qe.current===null&&F!==null&&(qe.current=nt);const rt=nt===qe.current?je:null;T.useLayoutEffect(()=>{const te=ke.current.get(nt)??Yw;return me.current=te,pe(te.draft),jt(te.attachments),$e(te.annotations),()=>{const ge=WOn(me.current,rt);ge?ke.current.set(nt,ge):ke.current.delete(nt)}},[nt,rt]);const[dt,st]=T.useState(null),Ut=T.useRef(Promise.resolve()),Xt=T.useRef(0),en=T.useRef(0),[an,At]=T.useState(null),gn=T.useRef(null),on=T.useRef(!1),Ot=T.useRef(null),[dn,cn,kn]=rSn(e,i==="chat"?F:null),{data:Wn=Rqn}=ut(Bu()),[gs,ns]=T.useState(C);T.useEffect(()=>ns(C),[C]);const[gt,ln]=T.useState({}),[bn,un]=T.useState(i0),[_r,Mn]=T.useState(null),Qn=T.useRef(!1),ar=T.useRef(null),[wt,Ht]=T.useState(null),vr=T.useRef(!1),Pn=T.useRef(null),[Qr,Xn]=T.useState(new Map),Yn=T.useRef(new Map),Xr=T.useRef(null),As=T.useRef(null),Fr=T.useRef(null),We=T.useRef(!0),[vt,fr]=T.useState(!0),yn=T.useRef(null),[Hn,Zn]=T.useState(!1),Fn=Ki(),Yr=T.useCallback(te=>{var ge;yt.current+=1,$e(Se=>[...Se,{id:`annotation-${yt.current}`,...te}]),(ge=yn.current)==null||ge.focus()},[]),An=jHn(As,Yr);AHn(Te,z?yHn:bHn),T.useEffect(()=>{Zn(!1),An.dismiss()},[F,e,An.dismiss]);const[wo,ai]=T.useState(0),[Ds,Hr]=T.useState(!1),[t_,ko]=T.useState(0),[So,qs]=T.useState(0),Us=T.useRef(!1);function Wi(te){if(!Or)return;if(!li&&te.source==="command"&&Qy(te.name)&&te.name!=="goal"){Cc(te.name,ce,Or);return}const ge=te.name.replace(/@u$/,"^").replace(/@p$/,"~"),Se=te.source==="command"?1:tM(ge,yn.current),Oe=QFn(ce,Or,ge,Se);pe(Oe.text),window.requestAnimationFrame(()=>{var Pe,Et;(Pe=yn.current)==null||Pe.focus(),(Et=yn.current)==null||Et.setSelectionRange(Oe.cursor,Oe.cursor),qs(Oe.cursor)})}function Gs(te){if(Qi)return!1;const ge=te.selectionStart;if(Us.current||ge!==te.selectionEnd)return!1;const Se=ce.slice(0,ge).replace(/[ \t]+$/,"").length,Oe=N4(ce,Se);if(!Oe||Oe.end!==Se||!Ol(Oe.query)||ge>Se&&ge-Se!==tM(Oe.query,te))return!1;const Pe=eM(ce,{...Oe,end:ge});return pe(Pe.text),qs(Pe.cursor),window.requestAnimationFrame(()=>te.setSelectionRange(Pe.cursor,Pe.cursor)),!0}function cr(te){Le(null);let Oe=Mt.reduce((Pe,Et)=>Pe+Et.size,0);for(const Pe of te){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Pe.type))continue;if(Pe.size>31457280){Le($me({name:Ce(Pe.name)}));continue}if(Oe+Pe.size>41943040){Le(Gme());continue}Oe+=Pe.size;const Et=F,qt=new FileReader;qt.onload=()=>{const xn={dataUrl:qt.result,mediaType:Pe.type,name:Pe.name,size:Pe.size};if(ot.current.activeId===Et){jt(or=>[...or,xn]);return}const rn=ke.current.get(Et??"new")??Yw;ke.current.set(Et??"new",{...rn,attachments:[...rn.attachments,xn]})},qt.readAsDataURL(Pe)}}function Si(te){const ge=Array.from(te.clipboardData.items).filter(Se=>Se.kind==="file"&&(Se.type.startsWith("image/")||Se.type==="application/pdf")).map(Se=>Se.getAsFile()).filter(Se=>Se!==null);ge.length>0&&(te.preventDefault(),cr(ge))}const Ct=q.find(te=>te.id===F),za=gs??U9n(Wn),rs=Ct?{harness:Ct.harness,model:gt.model!==void 0?gt.model:Ct.model,serviceTier:gt.serviceTier!==void 0?gt.serviceTier:Ct.serviceTier,permissionMode:gt.permissionMode??Ct.permissionMode,reasoningLevel:gt.reasoningLevel??Ct.reasoningLevel}:za?{...za,...gt}:null,{data:Ks=Tqn}=ut(Vkn(rs==null?void 0:rs.harness,e)),_t=rs?Wn.find(te=>te.id===rs.harness):void 0,Bt=_t==null?void 0:_t.options,oi=T.useMemo(()=>XFn(Ks,Bt==null?void 0:Bt.planActivation),[Ks,Bt==null?void 0:Bt.planActivation]),Ci=rM(ce),Ei=Ci!==null,Or=N4(ce,So),ci=(Or==null?void 0:Or.query)??null,kc=ci===null?[]:oi.filter(te=>VFn(te,ci)),Qi=!Ei&&ci!==null&&(Or==null?void 0:Or.end)===So&&kc.length>0,ss=Qi&&!Ds?kc:[],Wa=ss.length>0,Ni=Math.min(wo,Math.max(0,ss.length-1));T.useEffect(()=>ai(0),[ci]);const Yt=Aqn(rs,_t),zi=Kb(_t,Yt==null?void 0:Yt.model),Tl=te=>{if(!Yt)return;const ge={...Yt,...te},Se={};te.model!==void 0&&te.model!==Yt.model&&(Se.model=te.model),te.serviceTier!==void 0&&te.serviceTier!==Yt.serviceTier&&(Se.serviceTier=te.serviceTier),te.permissionMode!==void 0&&te.permissionMode!==Yt.permissionMode&&(Se.permissionMode=te.permissionMode),te.reasoningLevel!==void 0&&te.reasoningLevel!==Yt.reasoningLevel&&(Se.reasoningLevel=te.reasoningLevel),un(Oe=>({...Oe,...Se})),ns(ge),N(ge).catch(()=>{}),Ct?ln(Oe=>({...Oe,...te})):te.harness&&te.harness!==Yt.harness&&ln({})},$n=T.useCallback(te=>{const ge=Ut.current.catch(()=>{}).then(()=>{if(!zn(L.queryKey))throw new DOMException("Workspace changed","AbortError");return te()});return Ut.current=ge.then(()=>{},()=>{}),ge},[L]),dr=te=>{if(te==="plan"&&(_t==null?void 0:_t.id)==="claude-code"?(un(Oe=>({...Oe,permissionMode:te})),ln(Oe=>({...Oe,permissionMode:te}))):(ln(Oe=>{const Pe={...Oe};return delete Pe.permissionMode,Pe}),Tl({permissionMode:te})),!Ct)return;const ge=Ct.id,Se=++Xt.current;st(null),$n(()=>I.mutateAsync([ge,te])).then(Oe=>{P(Pe=>Pe.map(Et=>Et.id===Oe.id?Oe:Et)),Xt.current===Se&&ln(Pe=>{const Et={...Pe};return delete Et.permissionMode,Et})}).catch(()=>{Xt.current===Se&&(ln(Oe=>{const Pe={...Oe};return delete Pe.permissionMode,Pe}),st(zze()))})},Ls=te=>Tl({reasoningLevel:te}),is=te=>{if(!Ct){A(te);return}const ge=Ct.id,Se=Ct.autonomy,Oe=++Xt.current,Pe=Et=>P(qt=>qt.map(xn=>xn.id===Et.id?Et:xn));Pe({...Ct,autonomy:te}),st(null),$n(()=>G.mutateAsync([ge,te])).then(Et=>{Pe(Et),A(Et.autonomy)}).catch(()=>{P(Et=>Et.map(qt=>qt.id===ge&&qt.autonomy===te?{...qt,autonomy:Se}:qt)),Xt.current===Oe&&st(xze())})},Vs=((ui=Ct==null?void 0:Ct.goal)==null?void 0:ui.trim())||"",Xi=(Yt==null?void 0:Yt.harness)==="claude-code"?Yt.permissionMode==="plan":(Bt==null?void 0:Bt.planActivation)==="command"?an??(Ct==null?void 0:Ct.planMode)??!1:!1;T.useEffect(()=>{an===null||(Ct==null?void 0:Ct.planMode)!==an||(gn.current=null,At(null))},[Ct==null?void 0:Ct.planMode,an]);async function Rl(te){if(un(Oe=>({...Oe,planMode:te})),gn.current=te,At(te),!Ct)return;const ge=Ct.id,Se=++en.current;st(null);try{const Oe=await $n(()=>B.mutateAsync([ge,te]));P(Pe=>Pe.map(Et=>Et.id===Oe.id?Oe:Et)),en.current===Se&&(gn.current=null,At(null),st(null))}catch(Oe){throw en.current===Se&&(gn.current=null,At(null)),Oe}}async function Sc(){if((Yt==null?void 0:Yt.harness)==="claude-code"){dr("auto");return}if(Ct)try{await Rl(!1)}catch{st(f1e())}}async function Ff(){const te=!Xi;try{if((Yt==null?void 0:Yt.harness)==="claude-code")dr(te?"plan":"auto");else if((Bt==null?void 0:Bt.planActivation)==="command")await Rl(te);else throw new Error(i1())}catch{st(cz())}}function Co(te,ge=""){var Se;switch(te){case"plan":return Ff(),!1;case"new":return z?Ct!=null&&Ct.sideParentSessionId&&(M==null||M(Ct.sideParentSessionId,"")):Lo(),!1;case"resume":return Zn(!0),!0;case"model":return ko(Oe=>Oe+1),!0;case"compact":return Zi(),!1;case"goal":return Yi(ge),!1;case"side":return as(ge),!1;case"copy":{const Oe=Zr.at(-1),Pe=Jn&&(Oe==null?void 0:Oe.role)==="assistant"&&!Oe.completedAt,Et=HOn(Pe?Zr.slice(0,-1):Zr);return Et?GC(Et):Zt(Hbe(),"info"),!1}case"export":{const Oe=((Se=Ct==null?void 0:Ct.title)==null?void 0:Se.trim())||Md(),Pe=Ct?qOn(Oe,Zr,{user:M1e(),assistant:bu[Ct.harness]}):null;return Pe?uqn(UOn(Oe),Pe):Zt(Qbe(),"info"),!1}}}function as(te){z?Zt(Qon(),"info"):!Ct||!M?Zt(Hon(),"info"):M(Ct.id,te)}async function n_(te){st(null);const ge=ie.current;try{const Se=await Q.mutateAsync([e,te]);if(tt.invalidateQueries({queryKey:YI().queryKey}),ie.current!==ge)return;P(Oe=>[Se,...Oe.filter(Pe=>Pe.id!==Se.id)]),oe("all"),x(Se.id,{projectId:Se.projectId})}catch(Se){if(ie.current!==ge)return;st(Nve({error:Ce(Se instanceof Error?Se.message:String(Se))}))}}async function Yi(te){var qt;const ge=te.trim();if(!ge){const xn=(qt=Ct==null?void 0:Ct.goal)==null?void 0:qt.trim();Zt(xn?V1e({goal:_a(xn)}):ave(),"info");return}const Se=ot.current,Oe=()=>ot.current.activeId===Se.activeId;st(null);let Pe=F;if(!Pe){if(!(_t!=null&&_t.agentReady)||!Yt){st(i1());return}try{Pe=(await Tc(Yt,j4(Bt==null?void 0:Bt.planActivation,void 0,gn.current))).id}catch(xn){st(ON({error:Ce(xn instanceof Error?xn.message:String(xn))}));return}}const Et=/^(clear|none|off)$/i.test(ge);try{const xn=await $n(()=>U.mutateAsync([Pe,Et?null:ge]));P(rn=>rn.map(or=>or.id===xn.id?xn:or)),Zt(Et?P1e():dve(),"success")}catch(xn){if(!Oe())return;st(ON({error:Ce(xn instanceof Error?xn.message:String(xn))}))}}async function Zi(){const te=F;if(!te){Zt(Dbe(),"info");return}if(Jn){st(Cge());return}st(null),K==="archived"&&oe("active");const ge=ot.current;try{const{message:Se}=await xkn(te);cn({type:"upsertMessage",sessionId:te,message:Se})}catch(Se){if(ot.current.activeId!==ge.activeId)return;st(Rge({error:Ce(Se instanceof Error?Se.message:String(Se))}))}}function Cc(te,ge,Se){const Oe=eM(ge,Se);pe(Oe.text),Hr(!0),!Co(te)&&window.requestAnimationFrame(()=>{var Pe,Et;(Pe=yn.current)==null||Pe.focus(),(Et=yn.current)==null||Et.setSelectionRange(Oe.cursor,Oe.cursor),qs(Oe.cursor)})}const Ts=T.useCallback(async(te=!1)=>{const ge=ie.current;if(ge.projectId!==e||!zn(L.queryKey))return null;const Se=(tt.getQueryData(L.queryKey)??[]).map(Oe=>Oe.id);try{const Oe=await tt.fetchQuery({...L,...te?{staleTime:0}:{}});if(ie.current!==ge||!zn(L.queryKey))return null;const Pe=Oe.filter(qt=>!bl.has(qt.id)),Et=new Set(Pe.map(qt=>qt.id));for(const qt of Se)Et.has(qt)||Ta(qt);return Yn.current=new Map(Pe.map(qt=>[qt.id,qt.title])),Pe}catch{return null}},[e]),ja=T.useCallback(async te=>{ie.current.projectId!==e||!zn(L.queryKey)||await Promise.all([tt.fetchQuery({...ac(te),staleTime:0}),Ts(!0)]).catch(()=>{})},[e,Ts]);T.useEffect(()=>{const te=nB();se(e===Wp?new Set([qb,Ub].filter(Se=>!te.has(Se))):new Set),Me(!1),Ye(!1),Xn(new Map),Yn.current=new Map,Ts();const ge=ie.current;return()=>{ie.current===ge&&(ie.current={projectId:e})}},[e,Ts]),T.useEffect(()=>{un(i0),Pn.current=null},[F]),T.useEffect(()=>Gv(te=>{switch(te.type){case"session":{if(te.session.projectId!==e||bl.has(te.session.id))return;const ge=Yn.current.has(te.session.id),Se=Yn.current.get(te.session.id)!==te.session.title;Yn.current.set(te.session.id,te.session.title),ge&&Se&&te.session.titleSource==="generated"&&(Xn(Oe=>{const Pe=new Map(Oe);return Pe.set(te.session.id,(Oe.get(te.session.id)??0)+1),Pe}),window.setTimeout(()=>{Xn(Oe=>{if(!Oe.has(te.session.id))return Oe;const Pe=new Map(Oe);return Pe.delete(te.session.id),Pe})},Nqn));break}case"sessionDeleted":Ta(te.sessionId);break}}),[e]),T.useEffect(()=>Gv(te=>{te.type==="reconnected"&&Ts(!0)}),[Ts]);const Qa=F?dn.messagesBySession[F]??cM:cM,Xa=F?dn.activeLeafBySession[F]??null:null;ar.current=Xa;const Zr=T.useMemo(()=>DOn(Qa,Xa),[Qa,Xa]),vs=T.useRef({projectId:e,ids:dn.busySessions});T.useEffect(()=>{const te=vs.current;vs.current={projectId:e,ids:dn.busySessions},te.projectId===e&&se(ge=>FOn(ge,te.ids,dn.busySessions,q,i==="chat"?F:null))},[e,dn.busySessions,q,F,i]);const Jn=F?dn.busySessions.has(F):!1,Ml=!Jn&&!!(_t!=null&&_t.agentReady),Eo=Jn&&fF(Zr)!=null,ap=Jn&&POn(Zr),ji=F?dn.queuedBySession[F]??[]:[],No=ji.some(te=>te.dispatchState==="retrying"),Ya=ji.findIndex(te=>te.dispatchState==="blocked"),Za=ji.reduce((te,ge)=>ge.dispatchState!=="retrying"||typeof ge.nextRetryAt!="number"?te:te===null?ge.nextRetryAt:Math.min(te,ge.nextRetryAt),null),[_n,Aa]=T.useState(()=>Date.now());T.useEffect(()=>{if(!No||Za===null||(Aa(Date.now()),Za<=Date.now()))return;const te=window.setInterval(()=>{const ge=Date.now();Aa(ge),ge>=Za&&window.clearInterval(te)},1e3);return()=>window.clearInterval(te)},[No,Za]),T.useEffect(()=>{const te=ji.reduce((ge,Se)=>Se.planMode??ge,void 0);te!==void 0?(on.current=!0,gn.current=te,At(te)):on.current&&(on.current=!1,gn.current=null,At(null))},[ji]);const zo=!!F&&!(F in dn.messagesBySession)&&kn.isPending,Ec=T.useMemo(()=>{const te=new Set;for(const ge of dn.busySessions)(dn.messagesBySession[ge]??[]).some(Se=>Se.parts.some(Oe=>Oe.type==="prompt"&&Oe.prompt&&!Oe.prompt.resolved&&Oe.prompt.nativeId))&&te.add(ge);return te},[dn.busySessions,dn.messagesBySession]),Nc=F?Ec.has(F):!1,hr=Ct,r_=hr?Qr.get(hr.id):void 0,bs=T.useMemo(()=>{var te;for(let ge=Zr.length-1;ge>=0;ge--)for(const Se of Zr[ge].parts)if(Se.type==="prompt"&&((te=Se.prompt)==null?void 0:te.kind)==="plan"&&!Se.prompt.resolved)return{promptId:Se.id,plan:Se.prompt.plan??"",synthesized:!!Se.prompt.synthesized};return null},[Zr]),li=T.useMemo(()=>F?$On(Zr,hr==null?void 0:hr.harness,dn.busySessions.has(F)):null,[Zr,hr==null?void 0:hr.harness,F,dn.busySessions]),Ji=Ei&&!li,Ol=te=>{if(li||Ei)return!1;const ge=xk(te),Se=oi.find(Oe=>Oe.name===FC(ge??te));return!Se||Se.source!=="command"?!!Se:ge&&z4(ge)?ge==="plan"||ce.trim().toLowerCase().startsWith(`/${te}`):ce.trim().toLowerCase()===`/${te}`},Hf=T.useMemo(()=>oi.filter(te=>te.source!=="command"),[oi]),[Ai,qf]=T.useState(null),Uf=Ai&&Ai.sessionId===F?Ai:null;T.useEffect(()=>{if(!Ai)return;const te=dn.busySessions.has(Ai.sessionId),ge=Ai.sessionId===F&&bs&&bs.promptId!==Ai.promptId;(!te||ge)&&qf(null)},[Ai,bs,dn.busySessions,F]);const Ja=T.useMemo(()=>KC(Zr),[Zr]),Gf=Jn&&!!(_t!=null&&_t.supportsSteering)&&!!(_t!=null&&_t.agentReady)&&!bs&&!li&&!Ja&&Mt.length===0&&Te.length===0,Ws=T.useMemo(()=>p&&F?(te,ge,Se)=>p(te,F,ge,Se):void 0,[p,F]),s_=T.useMemo(()=>m&&F?(te,ge,Se)=>m(F,te,ge,Se):void 0,[m,F]),Kf=T.useMemo(()=>o&&((te,ge,Se,Oe,Pe)=>o(te,F??void 0,ge,Se,Oe,Pe)),[o,F]);T.useEffect(()=>{Xt.current+=1,en.current+=1;const te=(F?dn.queuedBySession[F]??[]:[]).reduce((ge,Se)=>Se.planMode??ge,void 0);on.current=te!==void 0,gn.current=te??null,At(te??null),ln({}),st(null)},[F]);const ea=i==="chat"&&(Zr.length>0||Jn),Dl=(Yt==null?void 0:Yt.harness)??null,i_=(Yt==null?void 0:Yt.model)??null,zc=kn.data?null:kn.error,Ll=i==="chat"&&!z&&!ea&&!zo&&!zc,jc=ut({...xSn(e,Dl??"claude-code",i_,E()),enabled:Ll&&Dl!==null,subscribed:Ll&&Dl!==null}),a_=(to=jc.data)!=null&&to.blank?jqn():((Pl=jc.data)==null?void 0:Pl.prompts)??null,jo=Dl!==null&&jc.isPending,eo=e===Wp?"demo":"project",Ao=te=>{pe(te),Hr(!1),window.requestAnimationFrame(()=>{const ge=yn.current;ge&&(ge.focus(),ge.setSelectionRange(te.length,te.length),qs(te.length))})};T.useEffect(()=>{rt&&(pe(te=>te||rt),Hr(!1),qs(rt.length))},[rt]),T.useEffect(()=>{if(v===0)return;const te=window.requestAnimationFrame(()=>{const ge=yn.current;ge&&(ge.focus(),ge.setSelectionRange(ge.value.length,ge.value.length),ge.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(te)},[v]);const To=T.useId(),Ac=e===Wp&&ce===xj&&!ve,Vf=T.useCallback(te=>{const ge=te.scrollHeight-te.scrollTop-te.clientHeight<60;We.current=ge,fr(ge)},[]),Sr=T.useCallback(()=>{var te;We.current=!0,fr(!0),(te=Fr.current)==null||te.call(Fr)},[]);T.useEffect(()=>{const te=Xr.current,ge=As.current;if(!te||!ge)return;const Se=new ResizeObserver(()=>{var Oe;We.current?(Oe=Fr.current)==null||Oe.call(Fr):fr(te.scrollHeight-te.scrollTop-te.clientHeight<60)});return Se.observe(te),Se.observe(ge),()=>Se.disconnect()},[ea]);const Wf=T.useCallback(te=>{te.currentTarget.blur(),Sr()},[Sr]);async function o_({queue:te=!1}={}){var Lt,Un,ws,Rs,Jr,ta;const ge=ce.trim(),Se=li?null:YFn(ge,Bt==null?void 0:Bt.planActivation);if(Se&&Se.name!=="plan"){pe(z4(Se.name)?"":Se.prompt),Hr(!1),Co(Se.name,Se.prompt);return}if(vu({name:"first_action",surface:eo,action:"typed_prompt"}),vr.current)return;const Oe=!!Se,Pe=!Xi,Et=j4(Bt==null?void 0:Bt.planActivation,Oe?Pe:void 0,gn.current),qt=Oe&&(_t==null?void 0:_t.id)==="claude-code"?Pe?"plan":"auto":void 0,xn=Se?Se.prompt:ge,rn=Mt,or=Te,Oc=or.map(Cn=>({text:Cn.text})),Zf=e,f_=i;let d_=F;const Ri=()=>{const Cn=ot.current;return zn(L.queryKey)&&Cn.projectId===Zf&&Cn.activeId===d_&&Cn.mainView===f_},Dc=()=>{Ri()&&(pe(Cn=>Cn||ge),jt(Cn=>Cn.length?Cn:rn),$e(Cn=>Cn.length?Cn:or))};if(Oe&&!xn&&rn.length===0&&or.length===0){pe(""),Hr(!1);try{if((_t==null?void 0:_t.id)==="claude-code")dr(Pe?"plan":"auto");else if((Bt==null?void 0:Bt.planActivation)==="command")await Rl(Pe);else throw new Error(i1())}catch{st(cz()),Dc()}return}const Y=Yt?{...Yt,...qt?{permissionMode:qt}:{}}:null;qt&&dr(qt);let _e=null;const xe=gn.current;Oe&&(Bt==null?void 0:Bt.planActivation)==="command"&&(_e=++en.current,gn.current=Pe,At(Pe));const ze=()=>{!Ri()||_e===null||en.current!==_e||(gn.current=xe,At(xe))};if(!xn&&rn.length===0&&or.length===0)return;if((xn||or.length>0)&&li&&rn.length===0){pe(""),$e([]),Ti({promptId:li,answers:[],note:xn||void 0,annotations:Oc}).then(Cn=>{Cn||Dc()});return}const Re=JSON.stringify({text:xn,images:rn.map(Cn=>({mediaType:Cn.mediaType,name:Cn.name,dataUrl:Cn.dataUrl})),annotations:Oc,settings:Y?{model:Y.model,serviceTier:Y.serviceTier,permissionMode:Y.permissionMode,planMode:Et,reasoningLevel:Y.reasoningLevel}:null}),Xe=((Lt=Pn.current)==null?void 0:Lt.signature)===Re?Pn.current.id:`ct_${crypto.randomUUID()}`;if(Pn.current={signature:Re,id:Xe},Jn){if(!F||!(_t!=null&&_t.agentReady)){ze();return}const Cn=F;pe(""),jt([]),$e([]),Le(null);const os=Y?{model:Y.model,serviceTier:Y.serviceTier,permissionMode:Y.permissionMode,planMode:(Bt==null?void 0:Bt.planActivation)==="command"?Et??(Ct==null?void 0:Ct.planMode):Et,reasoningLevel:Y.reasoningLevel}:{};Ri()&&ln({});const na=rn.map(On=>({mediaType:On.mediaType,dataBase64:On.dataUrl.slice(On.dataUrl.indexOf(",")+1),name:On.name}));try{(Un=(await $n(()=>X3(Cn,xn,os,na.length?na:void 0,Oc,Xe,Gf&&!te&&!Oe?"steer":void 0))).turn)!=null&&Un.existing&&await ja(Cn),Ri()&&un(i0),((ws=Pn.current)==null?void 0:ws.id)===Xe&&(Pn.current=null)}catch{ze(),Dc()}return}if(!(_t!=null&&_t.agentReady)){ze();return}if(!Y){ze();return}let Ve=F;try{pe(Gn=>Gn===ce?"":Gn),jt(Gn=>Gn===rn?[]:Gn),$e(Gn=>Gn===or?[]:Gn),Le(null),vr.current=!0;try{if(!Ve){const lp=await Tc(Y,Et);Ve=lp.id,d_=lp.id}if(!zn(L.queryKey))return;const Gn=ac(Ve);await tt.fetchQuery({...Gn,...((Rs=tt.getQueryState(Gn.queryKey))==null?void 0:Rs.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{vr.current=!1}if(!zn(L.queryKey))return;cn({type:"optimisticUser",sessionId:Ve,text:xn||Sme(),attachments:rn.map(Gn=>({url:Gn.dataUrl,mediaType:Gn.mediaType,name:Gn.name})),annotations:or}),cn({type:"busy",sessionId:Ve,busy:!0}),Ri()&&Sr(),Ri()&&K==="archived"&&oe("active");const Cn=Y?{model:Y.model,serviceTier:Y.serviceTier,permissionMode:Y.permissionMode,planMode:Et,reasoningLevel:Y.reasoningLevel}:{};Ri()&&ln({});const os=rn.map(Gn=>({mediaType:Gn.mediaType,dataBase64:Gn.dataUrl.slice(Gn.dataUrl.indexOf(",")+1),name:Gn.name})),na=Ve;if(!na)throw new Error(OEe());(Jr=(await $n(()=>X3(na,xn,Cn,os.length?os:void 0,Oc,Xe))).turn)!=null&&Jr.existing&&await ja(na),Ri()&&un(i0),((ta=Pn.current)==null?void 0:ta.id)===Xe&&(Pn.current=null)}catch(Cn){if(!zn(L.queryKey)||(Dc(),ze(),!Ve))return;const os=Cn instanceof Error?Cn.message:String(Cn);if(!/session is busy/i.test(os)&&await tt.fetchQuery({...Gi(e),staleTime:0}).then(On=>{var Fl;return!!((Fl=On.find(Gn=>Gn.id===Ve))!=null&&Fl.busy)}).catch(()=>!1)){Ri()&&(pe(On=>On===xn?"":On),jt(On=>On===rn?[]:On),$e(On=>On===or?[]:On));return}cn({type:"busy",sessionId:Ve,busy:!1}),cn({type:"localError",sessionId:Ve,text:Fve({error:Ce(os)})})}}async function Tc(te,ge){const Se=ot.current,Oe=ie.current,Pe=await V.mutateAsync([e,te.harness,{model:te.model,serviceTier:te.serviceTier,permissionMode:te.permissionMode,planMode:ge,reasoningLevel:te.reasoningLevel,autonomy:j}]);return ie.current===Oe&&(P(Et=>[Pe,...Et.filter(qt=>qt.id!==Pe.id)]),tt.getQueryData(L.queryKey)||Ts(!0)),ie.current===Oe&&ot.current===Se&&(re.current(Pe.id,{replace:!0}),ot.current={...Se,activeId:Pe.id}),Pe}function Ro(){const te=uHn(ce);pe(te),window.requestAnimationFrame(()=>{var ge,Se;(ge=yn.current)==null||ge.focus(),(Se=yn.current)==null||Se.setSelectionRange(te.length,te.length),qs(te.length)})}async function Il(){const te=Ci;if(!te)return;if(st(null),Jn){st(Zme());return}const ge=ce,Se=ot.current;let Oe=F;const Pe=()=>{const rn=ot.current;return rn.projectId===Se.projectId&&rn.activeId===Oe&&rn.mainView===Se.mainView},Et=()=>{Pe()&&pe(rn=>rn||ge)};pe(""),Hr(!1);let qt=F;if(!qt){if(!(_t!=null&&_t.agentReady)||!Yt){Et(),st(i1());return}try{const rn=j4(Bt==null?void 0:Bt.planActivation,void 0,gn.current);qt=(await Tc(Yt,rn)).id,Oe=qt,Pe()&&ln({})}catch(rn){Et();const or=rn instanceof Error?rn.message:String(rn);Pe()&&st(RN({error:Ce(or)}));return}}Pe()&&K==="archived"&&oe("active");const xn=`${rf}shell-${Date.now()}`;cn({type:"localShell",sessionId:qt,id:xn,command:te}),Pe()&&Sr();try{const{message:rn}=await wkn(qt,te);cn({type:"upsertMessage",sessionId:qt,message:rn})}catch(rn){const or=rn instanceof Error?rn.message:String(rn);cn({type:"localShell",sessionId:qt,id:xn,command:te,error:RN({error:Ce(or)})})}}function Qf(){F&&Ekn(F).catch(()=>{st(pNe())})}const Xf=T.useCallback(async(te,ge)=>{if(!(!F||Qn.current)){Qn.current=!0,st(null),Mn(te);try{const Se=VOn({model:bn.model,serviceTier:bn.serviceTier,permissionMode:bn.permissionMode,planMode:bn.planMode,reasoningLevel:bn.reasoningLevel}),Oe=F;(await kkn(Oe,te,ge,Se)).turn.existing&&await ja(Oe),un(i0)}catch{st(N9e())}finally{Qn.current=!1,Mn(null)}}},[F,bn,ja]),Mo=T.useCallback((te,ge)=>{if(!F||Jn||!(_t!=null&&_t.agentReady))return;const Se=F;cn({type:"busy",sessionId:Se,busy:!0}),Sr(),$n(()=>Skn(Se,te,ge)).catch(Oe=>{cn({type:"busy",sessionId:Se,busy:!1});const Pe=Oe instanceof Error?Oe.message:String(Oe);cn({type:"localError",sessionId:Se,text:F9e({error:Ce(Pe)})})})},[F,Jn,_t==null?void 0:_t.agentReady,Sr,$n]),$l=T.useCallback(te=>{if(!F||Jn)return;const ge=F,Se=ar.current;cn({type:"activeLeaf",sessionId:ge,leafId:te}),$n(()=>Ckn(ge,te)).catch(Oe=>{cn({type:"activeLeaf",sessionId:ge,leafId:Se});const Pe=Oe instanceof Error?Oe.message:String(Oe);cn({type:"localError",sessionId:ge,text:wNe({error:Ce(Pe)})})})},[F,Jn,$n]);function Oo(te){if(!F)return;const ge=F;vkn(ge,te).then(({removed:Se})=>{if(Se)return ja(ge)}).catch(()=>st(O9e()))}async function Do(te){if(!F||wt)return;const ge=F;st(null),Ht(te);try{await bkn(ge,te),await ja(ge)}catch{st(tEe())}finally{Ht(null)}}const c_=T.useRef(!1);T.useEffect(()=>{const te=ge=>{c_.current=L4(ge.target)};return document.addEventListener("pointerdown",te,!0),()=>document.removeEventListener("pointerdown",te,!0)},[]),T.useEffect(()=>{if(!Jn||i!=="chat")return;function te(ge){var Oe;ge.key!=="Escape"||ge.defaultPrevented||(ge.target===document.body?c_.current:L4(ge.target))!==z||(ge.preventDefault(),Qf(),(Oe=yn.current)==null||Oe.focus())}return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Jn,F,i,z]);function Ta(te){Fb(te),ke.current.delete(te),qe.current===te&&(qe.current=null),ot.current.projectId===e&&ot.current.activeId===te&&ot.current.mainView==="chat"&&(pe(""),jt([]),$e([]),re.current(null,{replace:!0})),se(ge=>{if(!ge.has(te))return ge;const Se=new Set(ge);return Se.delete(te),Se}),Yn.current.delete(te)}function l_(te,ge){const Se=te.archived;P(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,archived:ge}:Pe)),Z.mutateAsync([te.id,ge]).catch(()=>{P(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,archived:Se}:Pe))})}function Yf(te,ge){const Se=te.title;P(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,title:ge}:Pe)),J.mutateAsync([te.id,ge]).catch(()=>{P(Oe=>Oe.map(Pe=>Pe.id===te.id?{...Pe,title:Se}:Pe))})}async function Bl(te){var Se;const ge=((Se=te.title)==null?void 0:Se.trim())||Md();if(window.confirm(Zge({title:_a(ge)}))){try{await $.mutateAsync(te.id)}catch(Oe){Zt(i1e({title:_a(ge),error:Ce(Oe instanceof Error?Oe.message:String(Oe))}),"error");return}Ta(te.id)}}const Ti=T.useCallback(te=>{if(!F)return Promise.resolve(!1);const ge=F;return cn({type:"busy",sessionId:ge,busy:!0}),$n(()=>Nkn(ge,te)).then(()=>!0).catch(()=>!1).finally(()=>{zn(L.queryKey)&&(tt.fetchQuery({...ac(ge),staleTime:0}).catch(()=>{}),tt.fetchQuery({...Gi(e),staleTime:0}).catch(()=>{}))})},[F,e,$n,L]),u_=q.filter(te=>!te.sideParentSessionId&&kqn(K,te.archived)),__=/Mac|iPhone|iPad/.test(navigator.platform),Is=__?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",er=__?"⌘ Enter":"Ctrl + Enter",Lo=T.useCallback(()=>{oe("active"),x(null)},[x]),op=T.useCallback(te=>{oe("all"),x(te)},[x]);T.useEffect(()=>{if(z)return;const te=ge=>{ge.repeat||ge.key!=="Enter"||!ge.metaKey&&!ge.ctrlKey||ge.altKey||!ge.shiftKey||L4(ge.target)||(ge.preventDefault(),Lo())};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Lo,z]);const Rc=_.jsxs("aside",{className:"session-rail w-68 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]:overflow-y-auto [&_.rail-body]:pt-0 [&_.rail-body]:pb-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,_.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":Is,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Lo,children:[_.jsx(Qh,{size:15}),p5e()]}),_.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 ${i==="skills"?"active":""}`,onClick:()=>a("skills"),children:[_.jsx(z$,{size:15}),zwe()]}),HFn.map(te=>_.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 ${i!=="chat"&&i!=="skills"&&te.activeTabs.includes(i)?"active":""}`,"data-onboarding":te.id==="compute"?"nav-compute":void 0,onClick:()=>a(te.id),children:[te.icon,te.label()]},te.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:((Mc=Pq.find(te=>te.id===K))==null?void 0:Mc.railLabel())??mL()}),_.jsx("div",{className:"rail-section-actions flex items-center gap-0.5",children:_.jsx(Sqn,{value:K,onChange:oe})})]}),_.jsxs("div",{className:"rail-body",children:[u_.map(te=>_.jsx(zqn,{session:te,active:te.id===F&&i==="chat",unread:ue.has(te.id),busy:dn.busySessions.has(te.id),waiting:Ec.has(te.id),revealTitle:Qr.get(te.id),onOpen:()=>{if(x(te.id),e===Wp){t9n(te.id);const ge=Q4n[te.id];ge&&(vu({name:"demo_experiment_started",kind:"curated",experiment:ge}),vu({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:ge=>Yf(te,ge),onSetArchived:ge=>l_(te,ge),onDelete:()=>void Bl(te)},te.id)),u_.length===0&&_.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:K==="archived"?xbe():q.length>0?obe():zbe()})]}),_.jsx(LB,{runtime:w})]}),cp="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",qn=!r&&!z&&_.jsx(It,{title:sz(),"aria-label":sz(),onClick:s,className:"mac-titlebar:ms-16",children:_.jsx(P$,{size:20})});return i!=="chat"?_.jsxs(_.Fragment,{children:[r&&Rc,_.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&_.jsx("div",{className:"flex h-12 shrink-0 items-center",children:qn}),_.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:D})]})]}):_.jsxs(_.Fragment,{children:[r&&Rc,_.jsxs("section",{"data-side-chat":z||void 0,className:`chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 ${z?"":"mt-5"}`,children:[_.jsxs("div",{className:r||z?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] mac-titlebar:grid-cols-[6rem_minmax(0,1fr)_6rem] items-center",children:[qn,_.jsxs("div",{className:cp,children:[_.jsx(q0,{variant:"header",title:hr?((Io=hr.title)==null?void 0:Io.trim())||Md():DN(),children:hr?_.jsx(Fq,{title:((ys=hr.title)==null?void 0:ys.trim())||Md(),animate:r_!==void 0},r_??"static"):DN()}),k&&_.jsx(It,{"data-tip":LN(),"aria-label":LN(),onClick:k,children:_.jsx(LCn,{size:15})})]})]}),zc?_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[_.jsx("p",{children:zc.message}),_.jsx(Ie,{onClick:()=>void kn.refetch(),children:ni()})]}):zo?_.jsxs("div",{className:"chat-loading flex-1 flex items-center justify-center gap-3 text-subtext text-xl p-5 [&_.spinner]:w-5.5 [&_.spinner]:h-5.5 [&_.spinner]:border-[3px]","aria-live":"polite","aria-busy":"true",children:[_.jsx(St,{}),_.jsx("span",{children:c5e()})]}):!ea&&(hr!=null&&hr.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(P0,{size:22}),_.jsx("p",{className:"m-0 text-balance",children:Don()})]}):ea?_.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:Xr,tabIndex:0,role:"region","aria-label":((xs=hr==null?void 0:hr.title)==null?void 0:xs.trim())||Md(),onScroll:te=>{Vf(te.currentTarget),An.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:As,children:[_.jsx(sq,{projectId:e,sessionId:F,children:_.jsx(wqn,{scrollRef:Xr,scrollToEndRef:Fr,stickToBottom:We,onPinToBottom:Sr,messages:Zr,allMessages:Qa,canFork:Ml,onFork:Mo,onSelectFork:$l,busy:Jn,onOpenFile:Kf,onOpenRun:c,onOpenSpawnedSession:op,runExperimentName:u,onOpenExperiment:h,experimentName:f,onRespond:Ti,onOpenPlan:Ws,onOpenSubagent:s_,recoveringTurnId:_r,onRecover:Xf,skills:Hf},F)}),Jn&&Nc&&_.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:c8e()}),Jn&&!Nc&&!Eo&&!ap&&_.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:_.jsx("span",{className:"tool-running-shimmer",children:LNe()})})]})}):_.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(s6,{})}),_.jsx("h2",{children:p8e()}),_.jsxs("div",{className:"chat-empty-project inline-flex items-center gap-[7px] mt-3 py-1.5 px-3 border border-border rounded-full text-subtext bg-surface text-lg font-medium",children:[_.jsx(Pu,{size:19}),_.jsx("span",{children:n})]}),jo&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:dM,"aria-hidden":"true",children:fM.map((te,ge)=>_.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 ${I4[ge].box}`,children:[_.jsxs("span",{className:`flex w-full items-center gap-2.5 ${I4[ge].icon}`,children:[_.jsx(te,{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"})]},ge))}),_.jsxs(Pr,{className:"mt-3",role:"status",children:[_.jsx(St,{}),_.jsx("span",{children:c7e()})]})]}),a_&&a_.length>0&&_.jsx("div",{className:dM,role:"group","aria-label":p7e(),children:a_.map((te,ge)=>{const Se=fM[ge],Oe=I4[ge];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 ${Oe.box}`,onClick:()=>{vu({name:"project_starter_clicked",slot:ge+1}),vu({name:"first_action",surface:eo,action:"starter_click"}),Ao(te.prompt)},children:[_.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[_.jsx(Se,{size:17,className:Oe.icon}),te.title]}),_.jsx("span",{className:"w-full truncate text-sm text-subtext",children:te.prompt})]},ge)})})]}),An.action&&_.jsxs(Ie,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:An.action.x,top:An.action.top,transform:"translateX(-50%)"},onMouseDown:te=>te.preventDefault(),onClick:An.add,children:[_.jsx(B$,{size:14}),mxe()]}),_.jsxs("div",{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:[ea&&_.jsx(It,{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 ${vt?"opacity-0":"opacity-100"}`,title:oz(),"aria-label":oz(),inert:vt,onClick:Wf,children:Jn&&!Nc?_.jsx(Lm,{size:18,className:"tool-running-shimmer-icon"}):_.jsx(bCn,{size:16})}),bs&&!(Uf&&bs.promptId===Uf.promptId)&&_.jsx(WPn,{synthesized:bs.synthesized,agentLabel:hr?bu[hr.harness]:jNe(),showResumeModes:(hr==null?void 0:hr.harness)==="claude-code",onView:te=>Ws==null?void 0:Ws(bs.plan,bs.promptId,te),onApprove:te=>Ti({promptId:bs.promptId,approve:!0,...te?{resumeMode:te}:{}}),onReject:()=>Ti({promptId:bs.promptId,approve:!1}),onRevise:te=>{F&&qf({sessionId:F,promptId:bs.promptId}),Ti({promptId:bs.promptId,approve:!1,note:te})}}),ji.length>0&&_.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:ji.map((te,ge)=>_.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:te.error?`${te.text} +`).trim()}function Sqn(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 Cqn(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=DDn(r),jq(r)}function jq(e){return Nqn(e).replace(/[\t\r ]+/g," ").trim()}function Eqn(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&&Tq(s)?{ref:r,path:s}:null}function Aqn(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 uM(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 Tqn(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=uM(s,o);if(!c)return null;s=c}return s?uM(s,e):e}const Qo="[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}",Rqn=new RegExp(`\\bchat_(${Qo})\\b`,"gi"),of=`(?:${Qo}|[0-9a-f]{8})`;function th(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 h=1,f=null,p=!1;for(let m=u;m{let h=!1;for(let f=u;f$Dn(t.raw,n))}function Ba(e,n){return Xy(e,n).length>0}function Mqn(e){if(!e)return[];const n=new Set;for(const t of e.slice(0,Nq).matchAll(Rqn))if(n.add(t[0].toLowerCase()),n.size>=Wu)break;return[...n]}function Sk(e,n){if(!e)return[];const t=new Set,r=e.slice(0,Nq),s=n==="runs"?[new RegExp(`/runs/(${Qo})`,"gi"),new RegExp(`\\brun(?:_|\\s+)id:\\s*(${Qo})`,"gi"),new RegExp(`^\\s*RUN\\s+(${Qo})\\b`,"gim"),new RegExp(`={3,}\\s*(${Qo})\\s*={3,}`,"gi")]:[new RegExp(`/experiments/(${Qo})`,"gi"),new RegExp(`^\\s*id:\\s*(${Qo})`,"gim"),new RegExp(`={3,}\\s*(${Qo})\\s*={3,}`,"gi")];for(const a of s)for(const o of r.matchAll(a))if(t.add(o[1]),t.size>=Wu)return[...t];const i=new RegExp(`^\\s*(${Qo})(?:\\s|$)`,"gim");for(const a of r.matchAll(i))if(t.add(a[1]),t.size>=Wu)break;return[...t]}function Mq(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 Oq(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 Dq(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 Oqn(e,n,t=[],r=[]){const s=Xy(e,"logs"),i=new Set;if(s.length===0){if(!Ba(e,"logs"))return[];const o=t.length>0?[]:Sk(n,"runs");for(const c of t.length>0?t:o.length>0?o:r)if(i.add(c),i.size>=Wu)break;return eh([...i])}let a=!1;for(const{invocation:o,offset:c}of Mq(e,s)){const u=Dh(o.raw);if((u==null?void 0:u[0])!=="logs")continue;const h=u.slice(1);let f=null;for(let v=0;v0?[]:Sk(n,"runs"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Wu)break}return eh([...i])}function Ad(e,n,t=[],r=[]){const s=Xy(e,"exp\\s+(?:status|desc)");if(s.length===0)return[];const i=new Set;let a=!1;for(const{invocation:o,offset:c}of Mq(e,s)){const u=Dh(o.raw),h=(u==null?void 0:u[0])==="exp"&&(u[1]==="status"||u[1]==="desc")?u[2]:null;let f=!1;h&&new RegExp(`^${of}$`,"i").test(h)&&(i.add(h),f=!0);const p=h?/^\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?$/.exec(h):null;if(p){const m=p[1],w=Oq(e,m,c,of);if(w.length>0){for(const v of w)i.add(v);f=!0}const k=Dq(e,m,c,of);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?[]:Sk(n,"experiments"),c=t.length>0?t:o.length>0?o:r;for(const u of c)if(i.add(u),i.size>=Wu)break}return eh([...i])}const _M=new WeakMap;function xf(e){const n=E(),t=_M.get(e);if((t==null?void 0:t.locale)===n)return t.activity;const r=Dqn(e);return _M.set(e,{locale:n,activity:r}),r}function Dqn(e){var b,y,x,C,N,j;const n=e.tool??"tool",t=((b=e.state)==null?void 0:b.input)??{},r=t.arguments,s=r&&typeof r=="object"&&!Array.isArray(r)?Object.fromEntries(Object.entries(r)):{},i={...t,...s},a=ei(i,"command","cmd"),o=kqn(i,"commandArgv"),c=((y=e.state)==null?void 0:y.output)||((x=e.state)==null?void 0:x.error),u=eh(M4(i,"targetIds")),h=eh(M4(i,"runTargetIds")),f=eh(M4(i,"experimentTargetIds")),p=ei(i,"filePath","file_path","notebookPath","notebook_path","path"),m=ei(i,"description"),w=n.toLowerCase().split(/(?::|\.|__)+/),k=w.at(-1)??n.toLowerCase();if(k==="run"&&w.includes("web")){const A=R4(i,"search_query","q"),z=R4(i,"image_query","q"),M=R4(i,"find","pattern");return A?{kind:"web",label:wN({query:A})}:z?{kind:"web",label:Fae({query:z})}:M?{kind:"web",label:Noe({pattern:M})}:Array.isArray(i.open)?{kind:"web",label:yke()}:Array.isArray(i.weather)?{kind:"web",label:Fwe()}:Array.isArray(i.finance)?{kind:"web",label:Nwe()}:Array.isArray(i.sports)?{kind:"web",label:Owe()}:Array.isArray(i.time)?{kind:"web",label:ywe()}:{kind:"web",label:PN()}}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:hSe()};const A=Cqn(a??(o==null?void 0:o.join(" "))??""),z=th(A);let M=z.map(V=>V.raw);if(o!=null&&o.length){const V=IDn(o);M=V===null?[o]:th(jq(V)).map(ne=>ne.raw)}let D=null;for(const V of M)if(D=BDn(V),D)break;const I=M.some(V=>{const ne=Dh(V);return ne!==null&&ne[0]!=="discover"&&ne[0]!=="paper"});if(D&&!I){const V=D.kind==="discover"?{keyword:cae(),embedding:pae(),openalex:ooe(),biorxiv:wae(),pubmed:hoe()}[D.strategy]:null,ne=D.kind==="discover"?D.query?Gne({activity:V??xN(),query:D.query}):V??xN():D.id?Kp({target:Ce(D.id)}):xse();return{kind:D.kind==="paper"?"read":"search",label:ne,litCall:D}}if(Ba(A,"agent\\s+spawn"))return{kind:"agent",label:E4e(),spawnedSessionIds:Mqn(c),litCall:D??void 0};const B=z.map(V=>Rq(V.raw)),G=Ba(A,"exp\\s+status"),q=Ba(A,"exp\\s+desc"),Q=Xy(A,"exp\\s+desc").some(V=>(Dh(V.raw)??[]).some(ce=>ce==="--set"||ce.startsWith("--set=")||ce==="--stdin")),K=Q?wce():hse(),Z=Q?mte():zie();if(Ba(A,"logs")){const V=Oqn(A,c,h,u);return{kind:"project",label:V.length===1?hie():xie(),runIds:V,litCall:D??void 0}}if(Ba(A,"exp\\s+run"))return{kind:"project",label:$Ce(),litCall:D??void 0};if(Ba(A,"exp\\s+wait"))return{kind:"project",label:P8e(),litCall:D??void 0};if(Ba(A,"exp\\s+cancel"))return{kind:"project",label:P2e(),litCall:D??void 0};const J=Ba(A,"project\\s+view");if(J&&G&&q)return{kind:"project",label:Z,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(J&&q)return{kind:"project",label:K,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(J&&G)return{kind:"project",label:FN(),experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(J)return{kind:"project",label:HSe(),litCall:D??void 0};if(G&&q)return{kind:"project",label:Z,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(G)return{kind:"project",label:FN(),experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(q)return{kind:"project",label:K,experimentIds:Ad(A,c,f,u),litCall:D??void 0};if(Ba(A,"runs?"))return{kind:"project",label:M5e(),litCall:D??void 0};if(Ba(A,"projects"))return{kind:"project",label:P5e(),litCall:D??void 0};if(Ba(A,"compute"))return{kind:"project",label:ewe(),litCall:D??void 0};const $=B.map(jqn).find(V=>V!=null);if($){const V=T4($.path);return{kind:V?"skill":"read",label:V?cw({name:Ce(V)}):Kp({target:Ce(L_($.path))}),filePath:$.path,fileRef:$.ref,labelTarget:V?`${V} skill`:L_($.path)}}const L=B.findIndex(V=>V!=null&&["sed","cat","head","tail"].includes(V.name)),F=L>=0?B[L]:null,U=F?zqn(F):null,H=U?Tqn(U,z,L,ei(i,"cwd","workdir")):null;if(U&&H){const V=T4(H);return{kind:V?"skill":"read",label:V?cw({name:Ce(V)}):Kp({target:Ce(L_(U))}),filePath:H,labelTarget:V?`${V} skill`:L_(U)}}if(B.some(V=>(V==null?void 0:V.name)==="find"||(V==null?void 0:V.name)==="ls"||(V==null?void 0:V.name)==="rg"&&V.args.includes("--files")))return{kind:"search",label:YN()};const oe=B.findIndex(V=>(V==null?void 0:V.name)==="rg"||(V==null?void 0:V.name)==="grep");if(oe>=0){const V=Aqn(z[oe].raw);return{kind:"search",label:V?uw({pattern:Ce(V)}):lw(),searchPattern:V??void 0}}const ae=B.find(V=>(V==null?void 0:V.name)==="git"),ue=ae==null?void 0:ae.args[0];if(ue==="grep"){const V=ae==null?void 0:ae.args.slice(1).find(ne=>!ne.startsWith("-"));return{kind:"search",label:V?uw({pattern:Ce(V)}):lw(),searchPattern:V}}if(ue==="status")return{kind:"command",label:dwe()};if(ue==="diff")return{kind:"command",label:P6e()};if(ue==="log")return{kind:"command",label:DSe()};const se=V=>B.some(ne=>!ne||!["cargo","pnpm","npm","yarn"].includes(ne.name)?!1:ne.args[0]===V||ne.args[0]==="run"&&ne.args[1]===V);return se("test")?{kind:"command",label:xSe()}:B.some(V=>(V==null?void 0:V.name)==="tsc")||se("typecheck")?{kind:"command",label:Wwe()}:se("lint")?{kind:"command",label:K2e()}:se("build")?{kind:"command",label:E2e()}:{kind:"command",label:Kre({command:Ce(A)})}}case"skill":{const A=ei(i,"skill","name"),z=A?wqn(n,A):null;return{kind:"skill",label:A?Ere({name:Ce(A)}):bre(),filePath:z??void 0,labelTarget:z&&A?`${A} skill`:void 0}}case"read":{const A=p?L_(p):null,z=p?T4(p):null;return z?{kind:"skill",label:cw({name:Ce(z)}),filePath:p??void 0,labelTarget:`${z} skill`}:A?{kind:"read",label:Kp({target:Ce(A)}),filePath:p??void 0,labelTarget:A}:{kind:"read",label:zSe()}}case"edit":case"write":case"notebookedit":{const A=Sqn(i),z=p??(A==null?void 0:A.path)??null,M=z?L_(z):null,D=M?(A==null?void 0:A.type)==="add"?Xte({target:Ce(M)}):(A==null?void 0:A.type)==="delete"?gne({target:Ce(M)}):Tne({target:Ce(M)}):null;return M?{kind:"edit",label:D??KN(),filePath:z??void 0,labelTarget:M}:{kind:"edit",label:KN()}}case"grep":{const A=ei(i,"pattern");return{kind:"search",label:A?uw({pattern:Ce(A)}):lw(),searchPattern:A??void 0}}case"glob":{const A=ei(i,"pattern");return{kind:"search",label:A?ire({pattern:Ce(A)}):YN()}}case"websearch":{const A=ei(i,"query"),z=ei(i,"url"),M=ei(i,"pattern");return A?{kind:"web",label:wN({query:A})}:M&&z?{kind:"web",label:eoe({pattern:M})}:z?{kind:"web",label:Pre({target:Ce(z)})}:{kind:"web",label:m??PN()}}case"webfetch":{const A=ei(i,"url");return{kind:"web",label:A?Kp({target:Ce(A)}):m??Pse()}}case"task":return{kind:"agent",label:m??ese()};case"subagent":return{kind:"agent",label:Lqn(i)};case"error":return{kind:"command",label:y8e()};case"importedchat":return{kind:"project",label:Zne()};case"contextcompaction":return{kind:"command",label:((C=e.state)==null?void 0:C.status)==="error"?qte():((N=e.state)==null?void 0:N.status)==="running"?yN():Ate(),progressLabel:yN()};default:{const A=m??p??a??((j=e.state)==null?void 0:j.title)??"";return{kind:"command",label:A?`${n}: ${A}`:n}}}}function Lqn(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 Woe();case"sendInput":return Foe();case"resumeAgent":return eie();case"wait":return jce();case"closeAgent":return kte()}switch(typeof e.kind=="string"?e.kind:""){case"started":return pce();case"interacted":return Qee();case"interrupted":return cce()}return tce()}function vb({activity:e,className:n=""}){const t={size:16,strokeWidth:1.75,className:"tool-kind-icon"};let r=_.jsx(Mf,{...t});if(e.litCall)r=_.jsx(bF,{source:e.litCall.source,size:16,className:"tool-kind-icon"});else switch(e.kind){case"skill":r=_.jsx(z$,{...t});break;case"read":case"project":r=_.jsx(j$,{...t});break;case"search":r=_.jsx(H$,{...t});break;case"edit":r=_.jsx(VS,{...t});break;case"web":r=_.jsx(s8n,{...t});break;case"agent":r=_.jsx(XS,{...t});break}return _.jsx("span",{className:`flex h-6 shrink-0 items-center ${n}`,children:r})}function O4({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?Wr(h=>n(c.id,h),{stopPropagation:!0}):{onClick:h=>{h.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?JY({target:r}):zee({count:Jt(e.length),target:r}),onClick:c=>{c.preventDefault(),c.stopPropagation(),o.current=!s&&c.detail===0,i(u=>!u)},children:s?vL():STe({count:Jt(e.length)})})]})}function Ck({activity:e,onOpenFile:n,onOpenRun:t,onOpenSpawnedSession:r,runExperimentName:s,onOpenExperiment:i,experimentName:a}){var o,c,u,h;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:VDn(e.litCall.source,e.litCall.id),target:"_blank",rel:"noopener noreferrer",children:[e.label,_.jsx(c7n,{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,...Wr(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:RN({number:Jt(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:dke(),onClick:v=>{v.preventDefault(),v.stopPropagation(),r(w)},children:RN({number:Jt(k+1)})})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(O4,{items:m,onSelect:r,targetType:jme()})]})]})}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))||rl()}));return _.jsxs(_.Fragment,{children:[e.label," — ",p.map((w,k)=>_.jsxs("span",{children:[k>0&&", ",t?_.jsx("button",{className:"tool-target",title:eJ({run:Ce(w)}),...Wr(v=>t(w,v),{stopPropagation:!0}),children:(s==null?void 0:s(w))||rl()}):_.jsx("span",{children:(s==null?void 0:s(w))||rl()})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(O4,{items:m,onOpen:t,targetType:KEe()})]})]})}if((h=e.experimentIds)!=null&&h.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))||rl()}));return _.jsxs(_.Fragment,{children:[e.label," — ",p.map((w,k)=>_.jsxs("span",{children:[k>0&&", ",i?_.jsx("button",{className:"tool-target",title:MZ({name:(a==null?void 0:a(w))||Ce(w)}),...Wr(v=>i(w,v),{stopPropagation:!0}),children:(a==null?void 0:a(w))||rl()}):_.jsx("span",{children:(a==null?void 0:a(w))||rl()})]},w)),m.length>0&&_.jsxs(_.Fragment,{children:[", ",_.jsx(O4,{items:m,onOpen:i,targetType:_ve()})]})]})}return e.label}function UC(e){const n=e.progressLabel??{skill:Mre(),read:Kse(),search:Ooe(),edit:$ne(),project:Die(),web:lte(),agent:une(),command:iL()}[e.kind];return{...e,label:n}}function Lq(e,n){const t=xf({id:"permission-preview",type:"tool",tool:e,state:{status:"running",input:n}});return{skill:fre(),read:ose(),search:tae(),edit:Sne(),project:oie(),web:nte(),agent:rne(),command:Hie()}[t.kind]}function Iqn(e){return e==null?!0:typeof e=="object"&&!Array.isArray(e)&&Object.keys(e).length===0}const $qn=250;function Bqn(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=$qn-(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 Pqn=160;function Iq(e){const[n,t]=T.useState(!1);return T.useEffect(()=>{if(!e){t(!1);return}const r=window.setTimeout(()=>t(!0),Pqn);return()=>window.clearTimeout(r)},[e]),e&&n}function Fqn(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:dL()}}function Hqn(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])}function qqn(e){const n=[];let t=null;for(const r of e){const s=xf(r),i=Hqn(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 $q({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 b=Date.now();c(b),b>=a&&window.clearInterval(v)},1e3);return()=>window.clearInterval(v)},[a]),e.id==="turn-retry"){const v=jDn(i??{},o);return _.jsxs("div",{className:"turn-retry-row flex items-center gap-2 py-1 px-1 text-sm text-subtext",children:[_.jsx(kt,{}),_.jsx("span",{children:v})]})}const u=gF(i==null?void 0:i.recoveryAction),h=i==null?void 0:i.turnId,f=mF(e)?Mbe():s?fNe():uz(),p=s?Z7n:QS,m=Qy(((k=e.state)==null?void 0:k.error)||uz());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(Va,{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&&h&&(u==="retry"||u==="continue")&&_.jsx(De,{type:"button",size:"small",className:"mt-2",disabled:n||t,onClick:()=>r(h,u),children:t?PNe():u==="retry"?ri():S1e()})]})}function fM({part:e,activity:n,repeatCount:t=1,onOpenFile:r,onOpenRun:s,onOpenSpawnedSession:i,runExperimentName:a,onOpenExperiment:o,experimentName:c}){const u=e.state,h=(u==null?void 0:u.status)==="error",f=Qy((u==null?void 0:u.error)||(u==null?void 0:u.output)||""),p=h&&!!f,[m,w]=T.useState(!1),k=`tool-error-${e.id.replace(/[^A-Za-z0-9_-]/g,"-")}`;if(e.tool==="error")return _.jsx($q,{part:e,busy:!1,recovering:!1,usageLimited:U5(e)});const v=_.jsxs(_.Fragment,{children:[h&&_.jsxs("span",{className:"sr-only",children:[vS()," "]}),h?_.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:_.jsx(R$,{size:16,strokeWidth:1.75,className:"tool-kind-icon","aria-hidden":"true"})}):_.jsx(vb,{activity:n,className:"text-muted"}),_.jsxs("span",{className:`${Cq} ${h?"text-accent-red":"text-subtext"}`,children:[_.jsx(Ck,{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:dZ({count:Jt(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?aZ({activity:n.label}):xee({activity:n.label}),onClick:()=>w(b=>!b),children:_.jsx(Va,{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:HC,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 Uqn({parts:e,pendingTail:n,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o}){var z,M,D,I;const[c,u]=T.useState(!1),[h,f]=T.useState(!1),p=()=>{f(!0),u(B=>!B)},m=qqn(e),w=m.map(({activity:B})=>B),k=n?m.at(-1):void 0,v=k==null?void 0:k.part,b=k==null?void 0:k.activity,y=((z=v==null?void 0:v.state)==null?void 0:z.status)!=="error"?(b&&UC(b))??null:null,x=!!v&&((M=v.state)==null?void 0:M.status)==="running"&&!(y!=null&&y.progressLabel)&&(Iqn((D=v.state)==null?void 0:D.input)||(y==null?void 0:y.kind)==="command"&&!ei(((I=v.state)==null?void 0:I.input)??{},"command","cmd")),C=Bqn(y,x),N=Iq(C!=null),j=C??Fqn(w),A=C?C.label:dL();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(vb,{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(Ck,{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(fM,{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(vb,{activity:j,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(Ck,{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?r1e():sve(),children:_.jsx(Va,{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:h&&m.map(({part:B,count:G,activity:q})=>_.jsx(fM,{part:B,repeatCount:G,activity:q,onOpenFile:t,onOpenRun:r,onOpenSpawnedSession:s,runExperimentName:i,onOpenExperiment:a,experimentName:o},B.id))})})})]})}function Gqn({part:e,onRespond:n,onOpenFile:t,onOpenPlan:r}){var h;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:Oke(),icon:yi,iconClass:"text-accent-green"}:s.approved===!1&&s.note?{label:tSe(),icon:VS,iconClass:"text-accent-amber"}:s.approved===!1?{label:Fke(),icon:xr,iconClass:"text-accent-red"}:{label:Wke(),icon:Wb,iconClass:"text-muted"},w=m.icon;return _.jsxs("details",{className:bqn,children:[_.jsxs("summary",{children:[_.jsx("span",{className:"plan-resolved-label text-base font-[375] wrap-anywhere",children:s.synthesized?pL():oz()}),_.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(Va,{size:12,className:"plan-chevron shrink-0 text-muted"})]}),_.jsxs("div",{className:`${cM} 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(qC,{annotations:p,variant:"sent"}),_.jsxs("details",{className:vqn,children:[_.jsxs("summary",{children:[_.jsx("span",{className:"prompt-collapsed-title font-[375] wrap-anywhere",children:s.header||s.question||B9e()}),_.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||MEe()})]}),_.jsxs("div",{className:cM,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?E9e():oz()}),_.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",...Wr(p=>r(s.plan??"",e.id,p)),children:M8e()}),!o&&!f&&_.jsxs("div",{className:kk,children:[_.jsx(De,{size:"small",variant:"primary",onClick:()=>c({approve:!0,resumeMode:"auto"}),children:oxe()}),_.jsx(De,{size:"small",onClick:()=>c({approve:!0,resumeMode:"bypassPermissions"}),children:hxe()}),_.jsx(De,{size:"small",onClick:()=>c({approve:!1}),children:QSe()})]})]})}if(s.kind==="permission"){const f=s.toolInput??{},p=ei(f,"command","cmd","filePath","file_path","path")||"",m=typeof((h=s.toolInput)==null?void 0:h.reason)=="string"&&s.toolInput.reason||"",w=ei(f,"description")||"",k=m||w||Lq(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(QS,{size:15,strokeWidth:1.8,"aria-hidden":"true"})}),_.jsx("span",{id:v,className:"text-base font-semibold text-text",children:Hxe()})]}),_.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(De,{size:"small",variant:"ghost",onClick:()=>c({approve:!1}),children:s3e()}),_.jsx(De,{size:"small",variant:"primary",onClick:()=>c({approve:!0}),children:Dxe()})]})]})]})}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:yqn,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:kk,children:_.jsx(De,{size:"small",variant:"primary",disabled:i.length===0,onClick:()=>c({answers:i}),children:d8e()})})]})}function Vqn(e,n){return e.role==="user"?!0:e.parts.some(t=>Oh(t,n))}function Kqn(e){const n=e.text??"",t=n.startsWith("data:")?n:iSn(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 GC(e){try{if(!navigator.clipboard)throw new Error(kL());await navigator.clipboard.writeText(e),Zt(_f(),"success")}catch(n){Zt(n instanceof Error?n.message:String(n),"error")}}function Wqn(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 Qqn({text:e,createdAt:n,count:t,index:r,prevId:s,nextId:i,onSelect:a,pagerDisabled:o,onEdit:c,editDisabled:u}){const h=t>1,f=new Date(n),p=()=>GC(e);return _.jsxs("div",{className:`fork-controls flex items-center gap-0.5 transition-opacity duration-80 ease-standard ${h?"opacity-100":"opacity-0 group-hover/turn:opacity-100 group-focus-within/turn:opacity-100"}`,children:[h&&_.jsxs(_.Fragment,{children:[_.jsx(It,{size:"small",title:JN(),"aria-label":JN(),disabled:o||!s,onClick:()=>s&&a(s),children:_.jsx(A$,{size:14})}),_.jsxs("span",{className:"fork-count text-xs text-subtext tabular-nums select-none",children:[r+1,"/",t]}),_.jsx(It,{size:"small",title:ZN(),"aria-label":ZN(),disabled:o||!i,onClick:()=>i&&a(i),children:_.jsx(Va,{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(It,{size:"small","aria-label":SS(),disabled:!e,onClick:p,children:_.jsx(Zu,{size:13})})]}),_.jsx(It,{size:"small",title:VN(),"aria-label":VN(),disabled:u,onClick:c,children:_.jsx(VS,{size:13})})]})}const Xqn=T.memo(function({message:n,activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,busy:m=!1,recoveringTurnId:w,onRecover:k,skills:v,predictTextTail:b=!1,forkCount:y,forkIndex:x=0,forkPrevId:C,forkNextId:N,forkDisabled:j,branchDisabled:A,onFork:z,onSelectFork:M}){var Z,J;Xu();const[D,I]=T.useState(null),B=Zqn(n);if(B)return _.jsx(Jqn,{part:B});if(n.role==="user"){const $=n.parts.filter(ae=>ae.type==="text").map(ae=>ae.text??"").join(` +`),L=ae=>!!(v!=null&&v.some(ue=>ue.name===FC(ae))),F=n.parts.filter(ae=>ae.type==="image"&&ae.text).map(Kqn),U=F.filter(ae=>!ae.isPdf),H=F.filter(ae=>ae.isPdf),oe=n.parts.filter(ae=>ae.type==="annotation"&&ae.text).map(ae=>({id:ae.id,text:ae.text??""}));if(D!==null){const ae=()=>{const ue=D.trim();!ue||j||(I(null),z(n.id,ue))};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":k3e(),value:D,autoFocus:!0,onChange:ue=>I(ue.target.value),onKeyDown:ue=>{ue.key==="Escape"?(ue.preventDefault(),I(null)):ue.key==="Enter"&&!ue.shiftKey&&!ue.nativeEvent.isComposing&&(ue.preventDefault(),ae())}}),_.jsxs("div",{className:`${kk} justify-end`,children:[_.jsx(De,{size:"small",onClick:()=>I(null),children:M2e()}),_.jsx(De,{size:"small",variant:"primary",onClick:ae,disabled:j||!D.trim(),children:z3()})]})]})})}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:[oe.length>0&&_.jsx(qC,{annotations:oe,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(PHn,{text:$,isCommand:L}),U.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:U.map((ae,ue)=>_.jsx("a",{href:ae.src,target:"_blank",rel:"noreferrer",children:_.jsx("img",{src:ae.src,alt:mge()})},ue))}),H.length>0&&_.jsx("div",{className:"msg-files flex flex-wrap gap-1.5 mt-2",children:H.map((ae,ue)=>_.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:ae.src,target:"_blank",rel:"noreferrer",children:[_.jsx(Wb,{size:15}),_.jsx("span",{children:ae.name})]},ue))})]}),y!==void 0&&_.jsx(Qqn,{text:$,createdAt:n.createdAt,count:y,index:x,prevId:C,nextId:N,onSelect:M,pagerDisabled:A,onEdit:()=>I($),editDisabled:j})]})}const G=n.parts.find($=>$.type==="tool"&&U5($)),q=n.parts.find(Gm)??G,Q=kDn(n.parts.filter($=>$!==q&&!(G&&U5($))),q),K=b&&!n.completedAt?"":pF(n);return _.jsxs("div",{className:"msg-assistant group/turn text-base leading-[1.62] text-text min-w-0",children:[_.jsx(Yqn,{message:n,parts:Q,options:{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,predictTextTail:b}}),q&&_.jsx($q,{part:q,usageLimited:!!G,busy:m,recovering:w===((J=(Z=q.state)==null?void 0:Z.input)==null?void 0:J.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(It,{size:"small",title:ON(),"aria-label":ON(),onClick:()=>void GC(K),children:_.jsx(Zu,{size:13})})})]})});function Yqn({message:e,parts:n,options:t}){const r=t.predictTextTail??!1,{work:s,answer:i}=dF(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:hv(i,t)});const u=e.completedAt??(r?Date.now():null),h=u===null?null:u-e.createdAt,f=h===null?null:h<6e4||h>=36e5?$0(h):Nje({minutes:Jt(Math.floor(h/6e4)),seconds:Jt(Math.floor(h/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?yje():Oje({duration:f})}),_.jsx(Va,{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:hv(s,{...t,predictTextTail:!1,pendingTailToolId:null})})})})]}),_.jsx("div",{className:"turn-answer",children:hv(i,t)})]})}function Zqn(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===ZI?n:null}function Jqn({part:e}){var c;const n=e.state,t=ei((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?iL():s&&i!==null?Uge({code:Jt(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:[uL()," "]}),_.jsx(Mf,{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:`${HC} 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 hv(e,n){var y,x;const{activePermissionId:t,pendingTailToolId:r,onOpenFile:s,onOpenRun:i,onOpenSpawnedSession:a,runExperimentName:o,onOpenExperiment:c,experimentName:u,onRespond:h,onOpenPlan:f,onOpenSubagent:p,predictTextTail:m=!1}=n,w=e.filter(C=>C.type!=="steer"&&Oh(C,t)).at(-1),k=[];let v=[];const b=()=>{v.length!==0&&(k.push(_.jsx(Uqn,{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(Oh(C,t)){if(C.type==="tool"&&(tUn(C.tool)||(((y=C.children)==null?void 0:y.length)??0)>0)){b(),k.push(_.jsx(rUn,{part:C,pendingTail:m&&((x=C.state)==null?void 0:x.status)==="running"||C.id===r,onOpenSubagent:p},C.id));continue}if(C.type==="tool"){v.push(C);continue}b(),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":o9e(),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(Gqn,{part:C,onRespond:h,onOpenFile:s,onOpenPlan:f},C.id))}return b(),k}function eUn(e){return xf(e).label}function tUn(e){const n=(e??"").toLowerCase();return n==="subagent"||n==="task"||n==="agent"}function Bq(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 bb(e,n){for(const t of e){if(t.id===n)return t;const r=t.children&&bb(t.children,n);if(r)return r}return null}function nUn({spawn:e,onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a}){var w,k,v,b;const o=e.children??[],c=((w=e.state)==null?void 0:w.status)==="running",u=((k=e.state)==null?void 0:k.status)==="error",h=u?Qy(((v=e.state)==null?void 0:v.error)||((b=e.state)==null?void 0:b.output)||""):"",f=hv(o,{onOpenFile:n,onOpenRun:t,runExperimentName:r,onOpenExperiment:s,experimentName:i,onOpenSubagent:a,predictTextTail:c,pendingTailToolId:c?_F(o):null}),m=o.some(y=>y.type==="text"&&!!y.text)?"":Bq(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:[vS()," "]}),h&&_.jsx("div",{className:HC,children:h.slice(0,2e4)}),f.length===0&&!m&&!h?_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:c?bS():Jbe()}):_.jsxs(_.Fragment,{children:[f,m&&_.jsx(_c,{text:m,onOpenFile:n,onOpenRun:t})]})]})}function rUn({part:e,pendingTail:n,onOpenSubagent:t}){var u,h,f,p;const r=((u=e.state)==null?void 0:u.status)==="error",s=Qy(((h=e.state)==null?void 0:h.error)||((f=e.state)==null?void 0:f.output)||""),i=n&&!r?UC(xf(e)):xf(e),a=Iq(!!(n&&!r)),o=(((p=e.children)==null?void 0:p.length)??0)===0&&!r&&!Bq(e),c=_.jsxs(_.Fragment,{children:[r&&_.jsxs("span",{className:"sr-only",children:[vS()," "]}),r?_.jsx("span",{className:"flex h-6 shrink-0 items-center text-accent-red",children:_.jsx(R$,{size:16,strokeWidth:1.75,className:"subagent-icon","aria-hidden":"true"})}):_.jsx(vb,{activity:i,className:`subagent-icon ${a?"tool-running-shimmer-icon":"text-muted"}`}),_.jsx("span",{className:`${Cq} ${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:Wye(),...Wr(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(Va,{size:12})})]})}function sUn(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 VC(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=ei(o,"reason","description")||Lq(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 iUn(e){const[n,t]=T.useState({text:"",sequence:0}),r=T.useRef(null);return T.useEffect(()=>{var w,k,v,b,y;const s=((w=e[0])==null?void 0:w.id)??"",{messageId:i,states:a}=sUn(e),o=VC(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(x=>({text:o?kN({label:_a(o.label)}):"",sequence:x.sequence+1}));return}const c=r.current.messageId===i?r.current.states:new Map,u=r.current.permissionPath,h=[...a].filter(([x,C])=>{var N;return((N=c.get(x))==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(x=>({text:kN({label:_a(o.label)}),sequence:x.sequence+1}));return}const f=(k=h.find(([,x])=>Gm(x.part)))==null?void 0:k[1].part;if((f==null?void 0:f.id)==="turn-recovery"){const x=gF((b=(v=f.state)==null?void 0:v.input)==null?void 0:b.recoveryAction);t(C=>({text:`${Ile()}${x?` ${x==="retry"?nle():Qce()}`:""}`,sequence:C.sequence+1}));return}if((f==null?void 0:f.id)==="turn-retry"){t(x=>({text:Hce(),sequence:x.sequence+1}));return}const p=h.filter(([,x])=>x.status==="error");if(p.length>0){const x=p.slice(0,2).map(([,C])=>xf(C.part).label).join(", ");t(C=>({text:p.length===1?kle({labels:x}):Ale({count:Jt(p.length),labels:x}),sequence:C.sequence+1}));return}const m=h.filter(([,x])=>x.status==="running");if(m.length>0){const x=(y=m.at(-1))==null?void 0:y[1].part;t(C=>({text:x?UC(xf(x)).label:lle(),sequence:C.sequence+1}));return}h.some(([,x])=>x.status==="completed")&&t(x=>({text:mle(),sequence:x.sequence+1}))},[e]),n}const aUn=T.memo(function({messages:n,scrollRef:t,scrollToEndRef:r,stickToBottom:s,onPinToBottom:i,allMessages:a,canFork:o,onFork:c,onSelectFork:u,busy:h,onOpenFile:f,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:y,onOpenSubagent:x,recoveringTurnId:C,onRecover:N,skills:j}){var $,L,F;Xu();const A=(($=VC(n))==null?void 0:$.id)??null,z=T.useMemo(()=>n.filter(U=>Vqn(U,A)),[n,A]),M=T.useMemo(()=>{const U=z.filter(H=>H.role==="user"&&!H.id.startsWith(sf));return xDn(a,n,U,H=>H.startsWith(sf))},[n,z,a]),D=T.useRef(new Set),[I,B]=T.useState(!1),G=T.useCallback(U=>z[U].id,[z]),q=T.useCallback(U=>{if(I)return z.map((oe,ae)=>ae);const H=new Set(lF(U));return z.forEach((oe,ae)=>{D.current.has(oe.id)&&H.add(ae)}),[...H].sort((oe,ae)=>oe-ae)},[z,I]),Q=vDn({count:z.length,useFlushSync:!1,getScrollElement:()=>t.current,getItemKey:G,estimateSize:()=>400,overscan:1,initialRect:{width:((L=t.current)==null?void 0:L.clientWidth)??0,height:((F=t.current)==null?void 0:F.clientHeight)??0},initialOffset:()=>{var U;return Math.max(0,z.length*400-(((U=t.current)==null?void 0:U.clientHeight)??0))},anchorTo:s.current?"end":"start",followOnAppend:!0,scrollEndThreshold:60,rangeExtractor:q});T.useLayoutEffect(()=>{const U=()=>Q.scrollToEnd();return r.current=U,i(),()=>{r.current=null}},[Q,r,i]),T.useEffect(()=>{const U=()=>{var ae;const H=window.getSelection();if(!H||H.isCollapsed||!H.rangeCount)return;const oe=H.getRangeAt(0);for(const ue of((ae=t.current)==null?void 0:ae.querySelectorAll("[data-message-id]"))??[])oe.intersectsNode(ue)&&ue.dataset.messageId&&D.current.add(ue.dataset.messageId)};return document.addEventListener("selectionchange",U),()=>document.removeEventListener("selectionchange",U)},[t]);const K=z.at(-1),Z=iUn(n),J=h?fF(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":I,onClick:()=>B(U=>!U),children:ENe()}),_.jsx("div",{className:"relative",style:{height:Q.getTotalSize()},children:Q.getVirtualItems().map(U=>{var se,V,ne,ce,he,me;const H=z[U.index],oe=H.parts.find(Gm),ae=(V=(se=oe==null?void 0:oe.state)==null?void 0:se.input)==null?void 0:V.turnId,ue=oe?h||C!==null:!1;return _.jsx("div",{"data-index":U.index,"data-message-id":H.id,ref:Q.measureElement,className:"absolute left-0 w-full pb-4",style:{top:U.start},onClickCapture:Ae=>{!(Ae.target instanceof Element)||!Ae.target.closest("[data-work-toggle]")||(s.current=!1,Q.setOptions({...Q.options,anchorTo:"start"}))},onPointerDownCapture:()=>D.current.add(H.id),onFocusCapture:()=>D.current.add(H.id),children:_.jsx(Xqn,{message:H,forkCount:(ne=M.get(H.id))==null?void 0:ne.count,forkIndex:(ce=M.get(H.id))==null?void 0:ce.index,forkPrevId:(he=M.get(H.id))==null?void 0:he.prevId,forkNextId:(me=M.get(H.id))==null?void 0:me.nextId,forkDisabled:!o,branchDisabled:h,onFork:c,onSelectFork:u,activePermissionId:A,pendingTailToolId:(J==null?void 0:J.messageId)===H.id?J.toolId:null,onOpenFile:f,onOpenRun:p,onOpenSpawnedSession:m,runExperimentName:w,onOpenExperiment:k,experimentName:v,onRespond:b,onOpenPlan:y,onOpenSubagent:x,busy:ue,recoveringTurnId:ae===C?C:null,onRecover:N,skills:j,predictTextTail:h&&H===K&&H.role==="assistant"})},H.id)})})]})}),oUn=(e,n)=>e==="all"?!0:e==="archived"?n:!n;function D4(e){return e instanceof Element&&e.closest("[data-side-chat]")!==null}const Pq=[{id:"active",label:xxe,railLabel:mL},{id:"archived",label:$N,railLabel:$N},{id:"all",label:zxe,railLabel:lL}];function cUn({value:e,onChange:n}){const{open:t,setOpen:r,ref:s}=Vi();return _.jsxs("div",{className:"rail-filter relative inline-flex",ref:s,children:[_.jsx(It,{size:"small",className:"rail-filter-btn",active:e!=="active",title:XN(),"aria-label":XN(),onClick:()=>r(i=>!i),children:_.jsx(q$,{size:13})}),t&&_.jsx("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",children:Pq.map(i=>_.jsxs(vn,{onClick:()=>{n(i.id),r(!1)},children:[_.jsx("span",{children:i.label()}),e===i.id&&_.jsx(yi,{size:13})]},i.id))})]})}const lUn=14,uUn=500,_Un=1200;function Fq({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*lUn,uUn)}ms`},children:t},r))}):_.jsx(_.Fragment,{children:e})}function fUn({session:e,active:n,unread:t,busy:r,waiting:s,revealTitle:i,onOpen:a,onRename:o,onSetArchived:c,onDelete:u}){var N;const{open:h,setOpen:f,ref:p}=Vi(),m=((N=e.title)==null?void 0:N.trim())||"Untitled",[w,k]=T.useState(!1),[v,b]=T.useState(""),y=T.useRef(null);function x(){var j;b(((j=e.title)==null?void 0:j.trim())||""),k(!0)}function C(){var A;const j=v.trim();k(!1),j&&j!==(((A=e.title)==null?void 0:A.trim())||"")&&o(j)}return T.useEffect(()=>{var j,A;w&&((j=y.current)==null||j.focus(),(A=y.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] px-2.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":""} ${h?"menu-open":""} ${w?"editing":""}`,title:`${bu[e.harness]}${e.model?` · ${e.model}`:""}${e.parentSessionId?MNe():""}`,onClick:()=>{w||(h?f(!1):a())},onKeyDown:j=>{j.target===j.currentTarget&&(j.key==="Enter"||j.key===" ")&&(j.preventDefault(),h?f(!1):a())},children:[e.parentSessionId&&!w&&_.jsx(XS,{className:"text-muted shrink-0",size:12,"aria-hidden":!0}),w?_.jsx("input",{ref:y,className:"session-title-input","aria-label":CCe(),value:v,onChange:j=>b(j.target.value),onClick:j=>j.stopPropagation(),onBlur:C,onKeyDown:j=>{j.stopPropagation(),j.key==="Enter"?(j.preventDefault(),C()):j.key==="Escape"&&(j.preventDefault(),k(!1))}}):_.jsx("span",{className:"session-title",children:_.jsx(Fq,{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:sz(),"aria-label":sz(),onClick:j=>{j.stopPropagation(),f(A=>!A)},children:_.jsx(Lm,{size:14})}),h&&_.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(vn,{onClick:j=>{j.stopPropagation(),f(!1),x()},children:_.jsx("span",{children:fL()})}),_.jsx(vn,{onClick:j=>{j.stopPropagation(),f(!1),c(!e.archived)},children:_.jsx("span",{children:e.archived?Kze():Qme()})}),_.jsx(vn,{danger:!0,onClick:j=>{j.stopPropagation(),f(!1),u()},children:_.jsx("span",{children:_L()})})]})]})}const dM=[j$,H$,Mf,Ah],dUn=()=>[{title:ZCe(),prompt:GCe()},{title:f7e(),prompt:i7e()},{title:E7e(),prompt:b7e()},{title:P7e(),prompt:M7e()}],L4=[{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"}],hM="mt-7 grid w-full max-w-readable grid-cols-1 gap-3 sm:grid-cols-2";function hUn(e,n){if(!e)return null;const t=e.model??null;return{...e,model:t,serviceTier:qv(n,t,e.serviceTier),reasoningLevel:VI(n,t,e.reasoningLevel)}}function pM({projectId:e,projectName:n,railHeader:t,railOpen:r,onShowRail:s,mainView:i,onSelectMainView:a,onOpenFile:o,onOpenRun:c,runExperimentName:u,onOpenExperiment:h,experimentName:f,onOpenPlan:p,onOpenSubagent:m,runtime:w,onOpenDemoWelcome:k,composerFocusNonce:v=0,demoRunningRunId:b=null,activeSessionId:y,onActiveSessionChange:x,preferredAgent:C,onPreferredAgentChange:N,preferredAutonomy:j,onPreferredAutonomyChange:A,embedded:z=!1,onOpenSideChat:M,children:D}){var _i,to,Pl,Mc,Io,xs,ws;const I=pn({mutationFn:te=>tSn(...te)}),B=pn({mutationFn:te=>Ykn(...te)}),G=pn({mutationFn:te=>eSn(...te)}),q=pn({mutationFn:te=>Jkn(...te)}),Q=pn({mutationFn:te=>Vkn(...te)}),K=pn({mutationFn:te=>Wkn(...te)}),Z=pn({mutationFn:te=>Qkn(...te)}),J=pn({mutationFn:te=>Xkn(...te)}),$=pn({mutationFn:W3}),L=T.useMemo(()=>Gi(e),[e]),{data:F=xqn}=ut(L),U=T.useCallback(te=>{Kr(L.queryKey,ve=>{if(!ve)return;const Se=typeof te=="function"?te(ve):te,Oe=new Map(ve.map(Fe=>[Fe.id,Fe]));for(const Fe of Se)Oe.get(Fe.id)!==Fe&&oo(tt,L.queryKey,Fe.id),Oe.delete(Fe.id);for(const Fe of Oe.keys())oo(tt,L.queryKey,Fe);return Se})},[L]),H=y,oe=T.useRef(x);oe.current=x;const ae=T.useRef({projectId:e});ae.current.projectId!==e&&(ae.current={projectId:e});const[ue,se]=T.useState(new Set),[V,ne]=T.useState("active"),[ce,he]=T.useState(""),[me,Ae]=T.useState(!1),[Pe,Ye]=T.useState(!1),[Re,$e]=T.useState([]),yt=T.useRef(0),ot=T.useRef({projectId:e,activeId:H,mainView:i});(ot.current.projectId!==e||ot.current.activeId!==H||ot.current.mainView!==i)&&(ot.current={projectId:e,activeId:H,mainView:i});const[Mt,jt]=T.useState([]),[Pt,Ie]=T.useState(null),nt=H??"new",ke=T.useRef(new Map),ge=T.useRef(Xw);ge.current={draft:ce,attachments:Mt,annotations:Re};const je=e===Wp&&!z&&F.length>0&&F.every(te=>te.sideParentSessionId||D3n[te.id]===te.activeLeafId)?wj:null,qe=T.useRef(null);je!==null&&qe.current===null&&H!==null&&(qe.current=nt);const rt=nt===qe.current?je:null;T.useLayoutEffect(()=>{const te=ke.current.get(nt)??Xw;return ge.current=te,he(te.draft),jt(te.attachments),$e(te.annotations),()=>{const ve=RDn(ge.current,rt);ve?ke.current.set(nt,ve):ke.current.delete(nt)}},[nt,rt]);const[dt,st]=T.useState(null),Ut=T.useRef(Promise.resolve()),Xt=T.useRef(0),en=T.useRef(0),[an,At]=T.useState(null),gn=T.useRef(null),on=T.useRef(!1),Ot=T.useRef(null),[dn,cn,kn]=HSn(e,i==="chat"?H:null),{data:Wn=mUn}=ut(Pu()),[vs,ns]=T.useState(C);T.useEffect(()=>ns(C),[C]);const[gt,ln]=T.useState({}),[bn,un]=T.useState(i0),[_r,Mn]=T.useState(null),Qn=T.useRef(!1),ar=T.useRef(null),[wt,Ht]=T.useState(null),vr=T.useRef(!1),Pn=T.useRef(null),[Qr,Xn]=T.useState(new Map),Yn=T.useRef(new Map),Xr=T.useRef(null),Ts=T.useRef(null),Fr=T.useRef(null),We=T.useRef(!0),[vt,fr]=T.useState(!0),yn=T.useRef(null),[Hn,Zn]=T.useState(!1),Fn=Vi(),Yr=T.useCallback(te=>{var ve;yt.current+=1,$e(Se=>[...Se,{id:`annotation-${yt.current}`,...te}]),(ve=yn.current)==null||ve.focus()},[]),An=dqn(Ts,Yr);hqn(Re,z?sqn:rqn),T.useEffect(()=>{Zn(!1),An.dismiss()},[H,e,An.dismiss]);const[wo,oi]=T.useState(0),[Is,Hr]=T.useState(!1),[n_,ko]=T.useState(0),[So,Gs]=T.useState(0),Vs=T.useRef(!1);function Wi(te){if(!Or)return;if(!ui&&te.source==="command"&&Wy(te.name)&&te.name!=="goal"){Cc(te.name,ce,Or);return}const ve=te.name.replace(/@u$/,"^").replace(/@p$/,"~"),Se=te.source==="command"?1:nM(ve,yn.current),Oe=MHn(ce,Or,ve,Se);he(Oe.text),window.requestAnimationFrame(()=>{var Fe,Et;(Fe=yn.current)==null||Fe.focus(),(Et=yn.current)==null||Et.setSelectionRange(Oe.cursor,Oe.cursor),Gs(Oe.cursor)})}function Ks(te){if(Qi)return!1;const ve=te.selectionStart;if(Vs.current||ve!==te.selectionEnd)return!1;const Se=ce.slice(0,ve).replace(/[ \t]+$/,"").length,Oe=E4(ce,Se);if(!Oe||Oe.end!==Se||!Ol(Oe.query)||ve>Se&&ve-Se!==nM(Oe.query,te))return!1;const Fe=tM(ce,{...Oe,end:ve});return he(Fe.text),Gs(Fe.cursor),window.requestAnimationFrame(()=>te.setSelectionRange(Fe.cursor,Fe.cursor)),!0}function cr(te){Ie(null);let Oe=Mt.reduce((Fe,Et)=>Fe+Et.size,0);for(const Fe of te){if(!/^(image\/(png|jpeg|gif|webp)|application\/pdf)$/.test(Fe.type))continue;if(Fe.size>31457280){Ie(kge({name:Ce(Fe.name)}));continue}if(Oe+Fe.size>41943040){Ie(Age());continue}Oe+=Fe.size;const Et=H,qt=new FileReader;qt.onload=()=>{const xn={dataUrl:qt.result,mediaType:Fe.type,name:Fe.name,size:Fe.size};if(ot.current.activeId===Et){jt(or=>[...or,xn]);return}const rn=ke.current.get(Et??"new")??Xw;ke.current.set(Et??"new",{...rn,attachments:[...rn.attachments,xn]})},qt.readAsDataURL(Fe)}}function Si(te){const ve=Array.from(te.clipboardData.items).filter(Se=>Se.kind==="file"&&(Se.type.startsWith("image/")||Se.type==="application/pdf")).map(Se=>Se.getAsFile()).filter(Se=>Se!==null);ve.length>0&&(te.preventDefault(),cr(ve))}const Ct=F.find(te=>te.id===H),za=vs??jEn(Wn),rs=Ct?{harness:Ct.harness,model:gt.model!==void 0?gt.model:Ct.model,serviceTier:gt.serviceTier!==void 0?gt.serviceTier:Ct.serviceTier,permissionMode:gt.permissionMode??Ct.permissionMode,reasoningLevel:gt.reasoningLevel??Ct.reasoningLevel}:za?{...za,...gt}:null,{data:Ws=pUn}=ut(RSn(rs==null?void 0:rs.harness,e)),_t=rs?Wn.find(te=>te.id===rs.harness):void 0,Bt=_t==null?void 0:_t.options,ci=T.useMemo(()=>OHn(Ws,Bt==null?void 0:Bt.planActivation),[Ws,Bt==null?void 0:Bt.planActivation]),Ci=sM(ce),Ei=Ci!==null,Or=E4(ce,So),li=(Or==null?void 0:Or.query)??null,kc=li===null?[]:ci.filter(te=>THn(te,li)),Qi=!Ei&&li!==null&&(Or==null?void 0:Or.end)===So&&kc.length>0,ss=Qi&&!Is?kc:[],Wa=ss.length>0,Ni=Math.min(wo,Math.max(0,ss.length-1));T.useEffect(()=>oi(0),[li]);const Yt=hUn(rs,_t),zi=Gb(_t,Yt==null?void 0:Yt.model),Tl=te=>{if(!Yt)return;const ve={...Yt,...te},Se={};te.model!==void 0&&te.model!==Yt.model&&(Se.model=te.model),te.serviceTier!==void 0&&te.serviceTier!==Yt.serviceTier&&(Se.serviceTier=te.serviceTier),te.permissionMode!==void 0&&te.permissionMode!==Yt.permissionMode&&(Se.permissionMode=te.permissionMode),te.reasoningLevel!==void 0&&te.reasoningLevel!==Yt.reasoningLevel&&(Se.reasoningLevel=te.reasoningLevel),un(Oe=>({...Oe,...Se})),ns(ve),N(ve).catch(()=>{}),Ct?ln(Oe=>({...Oe,...te})):te.harness&&te.harness!==Yt.harness&&ln({})},$n=T.useCallback(te=>{const ve=Ut.current.catch(()=>{}).then(()=>{if(!zn(L.queryKey))throw new DOMException("Workspace changed","AbortError");return te()});return Ut.current=ve.then(()=>{},()=>{}),ve},[L]),dr=te=>{if(te==="plan"&&(_t==null?void 0:_t.id)==="claude-code"?(un(Oe=>({...Oe,permissionMode:te})),ln(Oe=>({...Oe,permissionMode:te}))):(ln(Oe=>{const Fe={...Oe};return delete Fe.permissionMode,Fe}),Tl({permissionMode:te})),!Ct)return;const ve=Ct.id,Se=++Xt.current;st(null),$n(()=>I.mutateAsync([ve,te])).then(Oe=>{U(Fe=>Fe.map(Et=>Et.id===Oe.id?Oe:Et)),Xt.current===Se&&ln(Fe=>{const Et={...Fe};return delete Et.permissionMode,Et})}).catch(()=>{Xt.current===Se&&(ln(Oe=>{const Fe={...Oe};return delete Fe.permissionMode,Fe}),st(dje()))})},$s=te=>Tl({reasoningLevel:te}),is=te=>{if(!Ct){A(te);return}const ve=Ct.id,Se=Ct.autonomy,Oe=++Xt.current,Fe=Et=>U(qt=>qt.map(xn=>xn.id===Et.id?Et:xn));Fe({...Ct,autonomy:te}),st(null),$n(()=>G.mutateAsync([ve,te])).then(Et=>{Fe(Et),A(Et.autonomy)}).catch(()=>{U(Et=>Et.map(qt=>qt.id===ve&&qt.autonomy===te?{...qt,autonomy:Se}:qt)),Xt.current===Oe&&st(aje())})},Qs=((_i=Ct==null?void 0:Ct.goal)==null?void 0:_i.trim())||"",Xi=(Yt==null?void 0:Yt.harness)==="claude-code"?Yt.permissionMode==="plan":(Bt==null?void 0:Bt.planActivation)==="command"?an??(Ct==null?void 0:Ct.planMode)??!1:!1;T.useEffect(()=>{an===null||(Ct==null?void 0:Ct.planMode)!==an||(gn.current=null,At(null))},[Ct==null?void 0:Ct.planMode,an]);async function Rl(te){if(un(Oe=>({...Oe,planMode:te})),gn.current=te,At(te),!Ct)return;const ve=Ct.id,Se=++en.current;st(null);try{const Oe=await $n(()=>B.mutateAsync([ve,te]));U(Fe=>Fe.map(Et=>Et.id===Oe.id?Oe:Et)),en.current===Se&&(gn.current=null,At(null),st(null))}catch(Oe){throw en.current===Se&&(gn.current=null,At(null)),Oe}}async function Sc(){if((Yt==null?void 0:Yt.harness)==="claude-code"){dr("auto");return}if(Ct)try{await Rl(!1)}catch{st(Y1e())}}async function Ff(){const te=!Xi;try{if((Yt==null?void 0:Yt.harness)==="claude-code")dr(te?"plan":"auto");else if((Bt==null?void 0:Bt.planActivation)==="command")await Rl(te);else throw new Error(i1())}catch{st(lz())}}function Co(te,ve=""){var Se;switch(te){case"plan":return Ff(),!1;case"new":return z?Ct!=null&&Ct.sideParentSessionId&&(M==null||M(Ct.sideParentSessionId,"")):Lo(),!1;case"resume":return Zn(!0),!0;case"model":return ko(Oe=>Oe+1),!0;case"compact":return Zi(),!1;case"goal":return Yi(ve),!1;case"side":return as(ve),!1;case"copy":{const Oe=Zr.at(-1),Fe=Jn&&(Oe==null?void 0:Oe.role)==="assistant"&&!Oe.completedAt,Et=EDn(Fe?Zr.slice(0,-1):Zr);return Et?GC(Et):Zt(Nye(),"info"),!1}case"export":{const Oe=((Se=Ct==null?void 0:Ct.title)==null?void 0:Se.trim())||Md(),Fe=Ct?NDn(Oe,Zr,{user:vve(),assistant:bu[Ct.harness]}):null;return Fe?Wqn(zDn(Oe),Fe):Zt(Oye(),"info"),!1}}}function as(te){z?Zt(Ocn(),"info"):!Ct||!M?Zt(Ncn(),"info"):M(Ct.id,te)}async function r_(te){st(null);const ve=ae.current;try{const Se=await Q.mutateAsync([e,te]);if(tt.invalidateQueries({queryKey:YI().queryKey}),ae.current!==ve)return;U(Oe=>[Se,...Oe.filter(Fe=>Fe.id!==Se.id)]),ne("all"),x(Se.id,{projectId:Se.projectId})}catch(Se){if(ae.current!==ve)return;st(fbe({error:Ce(Se instanceof Error?Se.message:String(Se))}))}}async function Yi(te){var qt;const ve=te.trim();if(!ve){const xn=(qt=Ct==null?void 0:Ct.goal)==null?void 0:qt.trim();Zt(xn?Rve({goal:_a(xn)}):Gve(),"info");return}const Se=ot.current,Oe=()=>ot.current.activeId===Se.activeId;st(null);let Fe=H;if(!Fe){if(!(_t!=null&&_t.agentReady)||!Yt){st(i1());return}try{Fe=(await Tc(Yt,z4(Bt==null?void 0:Bt.planActivation,void 0,gn.current))).id}catch(xn){st(DN({error:Ce(xn instanceof Error?xn.message:String(xn))}));return}}const Et=/^(clear|none|off)$/i.test(ve);try{const xn=await $n(()=>q.mutateAsync([Fe,Et?null:ve]));U(rn=>rn.map(or=>or.id===xn.id?xn:or)),Zt(Et?Cve():Zve(),"success")}catch(xn){if(!Oe())return;st(DN({error:Ce(xn instanceof Error?xn.message:String(xn))}))}}async function Zi(){const te=H;if(!te){Zt(yye(),"info");return}if(Jn){st(u1e());return}st(null),V==="archived"&&ne("active");const ve=ot.current;try{const{message:Se}=await aSn(te);cn({type:"upsertMessage",sessionId:te,message:Se})}catch(Se){if(ot.current.activeId!==ve.activeId)return;st(g1e({error:Ce(Se instanceof Error?Se.message:String(Se))}))}}function Cc(te,ve,Se){const Oe=tM(ve,Se);he(Oe.text),Hr(!0),!Co(te)&&window.requestAnimationFrame(()=>{var Fe,Et;(Fe=yn.current)==null||Fe.focus(),(Et=yn.current)==null||Et.setSelectionRange(Oe.cursor,Oe.cursor),Gs(Oe.cursor)})}const Rs=T.useCallback(async(te=!1)=>{const ve=ae.current;if(ve.projectId!==e||!zn(L.queryKey))return null;const Se=(tt.getQueryData(L.queryKey)??[]).map(Oe=>Oe.id);try{const Oe=await tt.fetchQuery({...L,...te?{staleTime:0}:{}});if(ae.current!==ve||!zn(L.queryKey))return null;const Fe=Oe.filter(qt=>!bl.has(qt.id)),Et=new Set(Fe.map(qt=>qt.id));for(const qt of Se)Et.has(qt)||Ta(qt);return Yn.current=new Map(Fe.map(qt=>[qt.id,qt.title])),Fe}catch{return null}},[e]),ja=T.useCallback(async te=>{ae.current.projectId!==e||!zn(L.queryKey)||await Promise.all([tt.fetchQuery({...ac(te),staleTime:0}),Rs(!0)]).catch(()=>{})},[e,Rs]);T.useEffect(()=>{const te=nB();se(e===Wp?new Set([Hb,qb].filter(Se=>!te.has(Se))):new Set),Ae(!1),Ye(!1),Xn(new Map),Yn.current=new Map,Rs();const ve=ae.current;return()=>{ae.current===ve&&(ae.current={projectId:e})}},[e,Rs]),T.useEffect(()=>{un(i0),Pn.current=null},[H]),T.useEffect(()=>Gv(te=>{switch(te.type){case"session":{if(te.session.projectId!==e||bl.has(te.session.id))return;const ve=Yn.current.has(te.session.id),Se=Yn.current.get(te.session.id)!==te.session.title;Yn.current.set(te.session.id,te.session.title),ve&&Se&&te.session.titleSource==="generated"&&(Xn(Oe=>{const Fe=new Map(Oe);return Fe.set(te.session.id,(Oe.get(te.session.id)??0)+1),Fe}),window.setTimeout(()=>{Xn(Oe=>{if(!Oe.has(te.session.id))return Oe;const Fe=new Map(Oe);return Fe.delete(te.session.id),Fe})},_Un));break}case"sessionDeleted":Ta(te.sessionId);break}}),[e]),T.useEffect(()=>Gv(te=>{te.type==="reconnected"&&Rs(!0)}),[Rs]);const Qa=H?dn.messagesBySession[H]??lM:lM,Xa=H?dn.activeLeafBySession[H]??null:null;ar.current=Xa;const Zr=T.useMemo(()=>bDn(Qa,Xa),[Qa,Xa]),bs=T.useRef({projectId:e,ids:dn.busySessions});T.useEffect(()=>{const te=bs.current;bs.current={projectId:e,ids:dn.busySessions},te.projectId===e&&se(ve=>CDn(ve,te.ids,dn.busySessions,F,i==="chat"?H:null))},[e,dn.busySessions,F,H,i]);const Jn=H?dn.busySessions.has(H):!1,Ml=!Jn&&!!(_t!=null&&_t.agentReady),Eo=Jn&&fF(Zr)!=null,ap=Jn&&SDn(Zr),ji=H?dn.queuedBySession[H]??[]:[],No=ji.some(te=>te.dispatchState==="retrying"),Ya=ji.findIndex(te=>te.dispatchState==="blocked"),Za=ji.reduce((te,ve)=>ve.dispatchState!=="retrying"||typeof ve.nextRetryAt!="number"?te:te===null?ve.nextRetryAt:Math.min(te,ve.nextRetryAt),null),[_n,Aa]=T.useState(()=>Date.now());T.useEffect(()=>{if(!No||Za===null||(Aa(Date.now()),Za<=Date.now()))return;const te=window.setInterval(()=>{const ve=Date.now();Aa(ve),ve>=Za&&window.clearInterval(te)},1e3);return()=>window.clearInterval(te)},[No,Za]),T.useEffect(()=>{const te=ji.reduce((ve,Se)=>Se.planMode??ve,void 0);te!==void 0?(on.current=!0,gn.current=te,At(te)):on.current&&(on.current=!1,gn.current=null,At(null))},[ji]);const zo=!!H&&!(H in dn.messagesBySession)&&kn.isPending,Ec=T.useMemo(()=>{const te=new Set;for(const ve of dn.busySessions)(dn.messagesBySession[ve]??[]).some(Se=>Se.parts.some(Oe=>Oe.type==="prompt"&&Oe.prompt&&!Oe.prompt.resolved&&Oe.prompt.nativeId))&&te.add(ve);return te},[dn.busySessions,dn.messagesBySession]),Nc=H?Ec.has(H):!1,hr=Ct,s_=hr?Qr.get(hr.id):void 0,ys=T.useMemo(()=>{var te;for(let ve=Zr.length-1;ve>=0;ve--)for(const Se of Zr[ve].parts)if(Se.type==="prompt"&&((te=Se.prompt)==null?void 0:te.kind)==="plan"&&!Se.prompt.resolved)return{promptId:Se.id,plan:Se.prompt.plan??"",synthesized:!!Se.prompt.synthesized};return null},[Zr]),ui=T.useMemo(()=>H?wDn(Zr,hr==null?void 0:hr.harness,dn.busySessions.has(H)):null,[Zr,hr==null?void 0:hr.harness,H,dn.busySessions]),Ji=Ei&&!ui,Ol=te=>{if(ui||Ei)return!1;const ve=yk(te),Se=ci.find(Oe=>Oe.name===FC(ve??te));return!Se||Se.source!=="command"?!!Se:ve&&N4(ve)?ve==="plan"||ce.trim().toLowerCase().startsWith(`/${te}`):ce.trim().toLowerCase()===`/${te}`},Hf=T.useMemo(()=>ci.filter(te=>te.source!=="command"),[ci]),[Ai,qf]=T.useState(null),Uf=Ai&&Ai.sessionId===H?Ai:null;T.useEffect(()=>{if(!Ai)return;const te=dn.busySessions.has(Ai.sessionId),ve=Ai.sessionId===H&&ys&&ys.promptId!==Ai.promptId;(!te||ve)&&qf(null)},[Ai,ys,dn.busySessions,H]);const Ja=T.useMemo(()=>VC(Zr),[Zr]),Gf=Jn&&!!(_t!=null&&_t.supportsSteering)&&!!(_t!=null&&_t.agentReady)&&!ys&&!ui&&!Ja&&Mt.length===0&&Re.length===0,Xs=T.useMemo(()=>p&&H?(te,ve,Se)=>p(te,H,ve,Se):void 0,[p,H]),i_=T.useMemo(()=>m&&H?(te,ve,Se)=>m(H,te,ve,Se):void 0,[m,H]),Vf=T.useMemo(()=>o&&((te,ve,Se,Oe,Fe)=>o(te,H??void 0,ve,Se,Oe,Fe)),[o,H]);T.useEffect(()=>{Xt.current+=1,en.current+=1;const te=(H?dn.queuedBySession[H]??[]:[]).reduce((ve,Se)=>Se.planMode??ve,void 0);on.current=te!==void 0,gn.current=te??null,At(te??null),ln({}),st(null)},[H]);const ea=i==="chat"&&(Zr.length>0||Jn),Dl=(Yt==null?void 0:Yt.harness)??null,a_=(Yt==null?void 0:Yt.model)??null,zc=kn.data?null:kn.error,Ll=i==="chat"&&!z&&!ea&&!zo&&!zc,jc=ut({...a6n(e,Dl??"claude-code",a_,E()),enabled:Ll&&Dl!==null,subscribed:Ll&&Dl!==null}),o_=(to=jc.data)!=null&&to.blank?dUn():((Pl=jc.data)==null?void 0:Pl.prompts)??null,jo=Dl!==null&&jc.isPending,eo=e===Wp?"demo":"project",Ao=te=>{he(te),Hr(!1),window.requestAnimationFrame(()=>{const ve=yn.current;ve&&(ve.focus(),ve.setSelectionRange(te.length,te.length),Gs(te.length))})};T.useEffect(()=>{rt&&(he(te=>te||rt),Hr(!1),Gs(rt.length))},[rt]),T.useEffect(()=>{if(v===0)return;const te=window.requestAnimationFrame(()=>{const ve=yn.current;ve&&(ve.focus(),ve.setSelectionRange(ve.value.length,ve.value.length),ve.scrollIntoView({block:"nearest"}))});return()=>window.cancelAnimationFrame(te)},[v]);const To=T.useId(),Ac=e===Wp&&ce===wj&&!me,Kf=T.useCallback(te=>{const ve=te.scrollHeight-te.scrollTop-te.clientHeight<60;We.current=ve,fr(ve)},[]),Sr=T.useCallback(()=>{var te;We.current=!0,fr(!0),(te=Fr.current)==null||te.call(Fr)},[]);T.useEffect(()=>{const te=Xr.current,ve=Ts.current;if(!te||!ve)return;const Se=new ResizeObserver(()=>{var Oe;We.current?(Oe=Fr.current)==null||Oe.call(Fr):fr(te.scrollHeight-te.scrollTop-te.clientHeight<60)});return Se.observe(te),Se.observe(ve),()=>Se.disconnect()},[ea]);const Wf=T.useCallback(te=>{te.currentTarget.blur(),Sr()},[Sr]);async function c_({queue:te=!1}={}){var Lt,Un,ks,Ms,Jr,ta;const ve=ce.trim(),Se=ui?null:DHn(ve,Bt==null?void 0:Bt.planActivation);if(Se&&Se.name!=="plan"){he(N4(Se.name)?"":Se.prompt),Hr(!1),Co(Se.name,Se.prompt);return}if(vu({name:"first_action",surface:eo,action:"typed_prompt"}),vr.current)return;const Oe=!!Se,Fe=!Xi,Et=z4(Bt==null?void 0:Bt.planActivation,Oe?Fe:void 0,gn.current),qt=Oe&&(_t==null?void 0:_t.id)==="claude-code"?Fe?"plan":"auto":void 0,xn=Se?Se.prompt:ve,rn=Mt,or=Re,Oc=or.map(Cn=>({text:Cn.text})),Zf=e,d_=i;let h_=H;const Ri=()=>{const Cn=ot.current;return zn(L.queryKey)&&Cn.projectId===Zf&&Cn.activeId===h_&&Cn.mainView===d_},Dc=()=>{Ri()&&(he(Cn=>Cn||ve),jt(Cn=>Cn.length?Cn:rn),$e(Cn=>Cn.length?Cn:or))};if(Oe&&!xn&&rn.length===0&&or.length===0){he(""),Hr(!1);try{if((_t==null?void 0:_t.id)==="claude-code")dr(Fe?"plan":"auto");else if((Bt==null?void 0:Bt.planActivation)==="command")await Rl(Fe);else throw new Error(i1())}catch{st(lz()),Dc()}return}const Y=Yt?{...Yt,...qt?{permissionMode:qt}:{}}:null;qt&&dr(qt);let _e=null;const xe=gn.current;Oe&&(Bt==null?void 0:Bt.planActivation)==="command"&&(_e=++en.current,gn.current=Fe,At(Fe));const ze=()=>{!Ri()||_e===null||en.current!==_e||(gn.current=xe,At(xe))};if(!xn&&rn.length===0&&or.length===0)return;if((xn||or.length>0)&&ui&&rn.length===0){he(""),$e([]),Ti({promptId:ui,answers:[],note:xn||void 0,annotations:Oc}).then(Cn=>{Cn||Dc()});return}const Me=JSON.stringify({text:xn,images:rn.map(Cn=>({mediaType:Cn.mediaType,name:Cn.name,dataUrl:Cn.dataUrl})),annotations:Oc,settings:Y?{model:Y.model,serviceTier:Y.serviceTier,permissionMode:Y.permissionMode,planMode:Et,reasoningLevel:Y.reasoningLevel}:null}),Xe=((Lt=Pn.current)==null?void 0:Lt.signature)===Me?Pn.current.id:`ct_${crypto.randomUUID()}`;if(Pn.current={signature:Me,id:Xe},Jn){if(!H||!(_t!=null&&_t.agentReady)){ze();return}const Cn=H;he(""),jt([]),$e([]),Ie(null);const os=Y?{model:Y.model,serviceTier:Y.serviceTier,permissionMode:Y.permissionMode,planMode:(Bt==null?void 0:Bt.planActivation)==="command"?Et??(Ct==null?void 0:Ct.planMode):Et,reasoningLevel:Y.reasoningLevel}:{};Ri()&&ln({});const na=rn.map(On=>({mediaType:On.mediaType,dataBase64:On.dataUrl.slice(On.dataUrl.indexOf(",")+1),name:On.name}));try{(Un=(await $n(()=>Q3(Cn,xn,os,na.length?na:void 0,Oc,Xe,Gf&&!te&&!Oe?"steer":void 0))).turn)!=null&&Un.existing&&await ja(Cn),Ri()&&un(i0),((ks=Pn.current)==null?void 0:ks.id)===Xe&&(Pn.current=null)}catch{ze(),Dc()}return}if(!(_t!=null&&_t.agentReady)){ze();return}if(!Y){ze();return}let Ke=H;try{he(Gn=>Gn===ce?"":Gn),jt(Gn=>Gn===rn?[]:Gn),$e(Gn=>Gn===or?[]:Gn),Ie(null),vr.current=!0;try{if(!Ke){const lp=await Tc(Y,Et);Ke=lp.id,h_=lp.id}if(!zn(L.queryKey))return;const Gn=ac(Ke);await tt.fetchQuery({...Gn,...((Ms=tt.getQueryState(Gn.queryKey))==null?void 0:Ms.fetchStatus)==="fetching"?{staleTime:0}:{}})}finally{vr.current=!1}if(!zn(L.queryKey))return;cn({type:"optimisticUser",sessionId:Ke,text:xn||lge(),attachments:rn.map(Gn=>({url:Gn.dataUrl,mediaType:Gn.mediaType,name:Gn.name})),annotations:or}),cn({type:"busy",sessionId:Ke,busy:!0}),Ri()&&Sr(),Ri()&&V==="archived"&&ne("active");const Cn=Y?{model:Y.model,serviceTier:Y.serviceTier,permissionMode:Y.permissionMode,planMode:Et,reasoningLevel:Y.reasoningLevel}:{};Ri()&&ln({});const os=rn.map(Gn=>({mediaType:Gn.mediaType,dataBase64:Gn.dataUrl.slice(Gn.dataUrl.indexOf(",")+1),name:Gn.name})),na=Ke;if(!na)throw new Error(bNe());(Jr=(await $n(()=>Q3(na,xn,Cn,os.length?os:void 0,Oc,Xe))).turn)!=null&&Jr.existing&&await ja(na),Ri()&&un(i0),((ta=Pn.current)==null?void 0:ta.id)===Xe&&(Pn.current=null)}catch(Cn){if(!zn(L.queryKey)||(Dc(),ze(),!Ke))return;const os=Cn instanceof Error?Cn.message:String(Cn);if(!/session is busy/i.test(os)&&await tt.fetchQuery({...Gi(e),staleTime:0}).then(On=>{var Fl;return!!((Fl=On.find(Gn=>Gn.id===Ke))!=null&&Fl.busy)}).catch(()=>!1)){Ri()&&(he(On=>On===xn?"":On),jt(On=>On===rn?[]:On),$e(On=>On===or?[]:On));return}cn({type:"busy",sessionId:Ke,busy:!1}),cn({type:"localError",sessionId:Ke,text:Ebe({error:Ce(os)})})}}async function Tc(te,ve){const Se=ot.current,Oe=ae.current,Fe=await K.mutateAsync([e,te.harness,{model:te.model,serviceTier:te.serviceTier,permissionMode:te.permissionMode,planMode:ve,reasoningLevel:te.reasoningLevel,autonomy:j}]);return ae.current===Oe&&(U(Et=>[Fe,...Et.filter(qt=>qt.id!==Fe.id)]),tt.getQueryData(L.queryKey)||Rs(!0)),ae.current===Oe&&ot.current===Se&&(oe.current(Fe.id,{replace:!0}),ot.current={...Se,activeId:Fe.id}),Fe}function Ro(){const te=WHn(ce);he(te),window.requestAnimationFrame(()=>{var ve,Se;(ve=yn.current)==null||ve.focus(),(Se=yn.current)==null||Se.setSelectionRange(te.length,te.length),Gs(te.length)})}async function Il(){const te=Ci;if(!te)return;if(st(null),Jn){st(Ige());return}const ve=ce,Se=ot.current;let Oe=H;const Fe=()=>{const rn=ot.current;return rn.projectId===Se.projectId&&rn.activeId===Oe&&rn.mainView===Se.mainView},Et=()=>{Fe()&&he(rn=>rn||ve)};he(""),Hr(!1);let qt=H;if(!qt){if(!(_t!=null&&_t.agentReady)||!Yt){Et(),st(i1());return}try{const rn=z4(Bt==null?void 0:Bt.planActivation,void 0,gn.current);qt=(await Tc(Yt,rn)).id,Oe=qt,Fe()&&ln({})}catch(rn){Et();const or=rn instanceof Error?rn.message:String(rn);Fe()&&st(MN({error:Ce(or)}));return}}Fe()&&V==="archived"&&ne("active");const xn=`${sf}shell-${Date.now()}`;cn({type:"localShell",sessionId:qt,id:xn,command:te}),Fe()&&Sr();try{const{message:rn}=await oSn(qt,te);cn({type:"upsertMessage",sessionId:qt,message:rn})}catch(rn){const or=rn instanceof Error?rn.message:String(rn);cn({type:"localShell",sessionId:qt,id:xn,command:te,error:MN({error:Ce(or)})})}}function Qf(){H&&_Sn(H).catch(()=>{st(eze())})}const Xf=T.useCallback(async(te,ve)=>{if(!(!H||Qn.current)){Qn.current=!0,st(null),Mn(te);try{const Se=TDn({model:bn.model,serviceTier:bn.serviceTier,permissionMode:bn.permissionMode,planMode:bn.planMode,reasoningLevel:bn.reasoningLevel}),Oe=H;(await cSn(Oe,te,ve,Se)).turn.existing&&await ja(Oe),un(i0)}catch{st(fEe())}finally{Qn.current=!1,Mn(null)}}},[H,bn,ja]),Mo=T.useCallback((te,ve)=>{if(!H||Jn||!(_t!=null&&_t.agentReady))return;const Se=H;cn({type:"busy",sessionId:Se,busy:!0}),Sr(),$n(()=>lSn(Se,te,ve)).catch(Oe=>{cn({type:"busy",sessionId:Se,busy:!1});const Fe=Oe instanceof Error?Oe.message:String(Oe);cn({type:"localError",sessionId:Se,text:EEe({error:Ce(Fe)})})})},[H,Jn,_t==null?void 0:_t.agentReady,Sr,$n]),$l=T.useCallback(te=>{if(!H||Jn)return;const ve=H,Se=ar.current;cn({type:"activeLeaf",sessionId:ve,leafId:te}),$n(()=>uSn(ve,te)).catch(Oe=>{cn({type:"activeLeaf",sessionId:ve,leafId:Se});const Fe=Oe instanceof Error?Oe.message:String(Oe);cn({type:"localError",sessionId:ve,text:oze({error:Ce(Fe)})})})},[H,Jn,$n]);function Oo(te){if(!H)return;const ve=H;rSn(ve,te).then(({removed:Se})=>{if(Se)return ja(ve)}).catch(()=>st(bEe()))}async function Do(te){if(!H||wt)return;const ve=H;st(null),Ht(te);try{await sSn(ve,te),await ja(ve)}catch{st(PEe())}finally{Ht(null)}}const l_=T.useRef(!1);T.useEffect(()=>{const te=ve=>{l_.current=D4(ve.target)};return document.addEventListener("pointerdown",te,!0),()=>document.removeEventListener("pointerdown",te,!0)},[]),T.useEffect(()=>{if(!Jn||i!=="chat")return;function te(ve){var Oe;ve.key!=="Escape"||ve.defaultPrevented||(ve.target===document.body?l_.current:D4(ve.target))!==z||(ve.preventDefault(),Qf(),(Oe=yn.current)==null||Oe.focus())}return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Jn,H,i,z]);function Ta(te){Pb(te),ke.current.delete(te),qe.current===te&&(qe.current=null),ot.current.projectId===e&&ot.current.activeId===te&&ot.current.mainView==="chat"&&(he(""),jt([]),$e([]),oe.current(null,{replace:!0})),se(ve=>{if(!ve.has(te))return ve;const Se=new Set(ve);return Se.delete(te),Se}),Yn.current.delete(te)}function u_(te,ve){const Se=te.archived;U(Oe=>Oe.map(Fe=>Fe.id===te.id?{...Fe,archived:ve}:Fe)),Z.mutateAsync([te.id,ve]).catch(()=>{U(Oe=>Oe.map(Fe=>Fe.id===te.id?{...Fe,archived:Se}:Fe))})}function Yf(te,ve){const Se=te.title;U(Oe=>Oe.map(Fe=>Fe.id===te.id?{...Fe,title:ve}:Fe)),J.mutateAsync([te.id,ve]).catch(()=>{U(Oe=>Oe.map(Fe=>Fe.id===te.id?{...Fe,title:Se}:Fe))})}async function Bl(te){var Se;const ve=((Se=te.title)==null?void 0:Se.trim())||Md();if(window.confirm(I1e({title:_a(ve)}))){try{await $.mutateAsync(te.id)}catch(Oe){Zt(U1e({title:_a(ve),error:Ce(Oe instanceof Error?Oe.message:String(Oe))}),"error");return}Ta(te.id)}}const Ti=T.useCallback(te=>{if(!H)return Promise.resolve(!1);const ve=H;return cn({type:"busy",sessionId:ve,busy:!0}),$n(()=>fSn(ve,te)).then(()=>!0).catch(()=>!1).finally(()=>{zn(L.queryKey)&&(tt.fetchQuery({...ac(ve),staleTime:0}).catch(()=>{}),tt.fetchQuery({...Gi(e),staleTime:0}).catch(()=>{}))})},[H,e,$n,L]),__=F.filter(te=>!te.sideParentSessionId&&oUn(V,te.archived)),f_=/Mac|iPhone|iPad/.test(navigator.platform),Bs=f_?"⌘ ⇧ ↵":"Ctrl + Shift + ↵",er=f_?"⌘ Enter":"Ctrl + Enter",Lo=T.useCallback(()=>{ne("active"),x(null)},[x]),op=T.useCallback(te=>{ne("all"),x(te)},[x]);T.useEffect(()=>{if(z)return;const te=ve=>{ve.repeat||ve.key!=="Enter"||!ve.metaKey&&!ve.ctrlKey||ve.altKey||!ve.shiftKey||D4(ve.target)||(ve.preventDefault(),Lo())};return document.addEventListener("keydown",te),()=>document.removeEventListener("keydown",te)},[Lo,z]);const Rc=_.jsxs("aside",{className:"session-rail w-68 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]:overflow-y-auto [&_.rail-body]:pt-0 [&_.rail-body]:pb-1 [&_.rail-body]:px-2 border border-border rounded-lg overflow-visible shadow-elevated",children:[t,_.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":Bs,"aria-keyshortcuts":"Meta+Shift+Enter Control+Shift+Enter",onClick:Lo,children:[_.jsx(Qh,{size:15}),eke()]}),_.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 ${i==="skills"?"active":""}`,onClick:()=>a("skills"),children:[_.jsx(z$,{size:15}),d4e()]}),EHn.map(te=>_.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 ${i!=="chat"&&i!=="skills"&&te.activeTabs.includes(i)?"active":""}`,"data-onboarding":te.id==="compute"?"nav-compute":void 0,onClick:()=>a(te.id),children:[te.icon,te.label()]},te.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:((Mc=Pq.find(te=>te.id===V))==null?void 0:Mc.railLabel())??mL()}),_.jsx("div",{className:"rail-section-actions flex items-center gap-0.5",children:_.jsx(cUn,{value:V,onChange:ne})})]}),_.jsxs("div",{className:"rail-body",children:[__.map(te=>_.jsx(fUn,{session:te,active:te.id===H&&i==="chat",unread:ue.has(te.id),busy:dn.busySessions.has(te.id),waiting:Ec.has(te.id),revealTitle:Qr.get(te.id),onOpen:()=>{if(x(te.id),e===Wp){P9n(te.id);const ve=O3n[te.id];ve&&(vu({name:"demo_experiment_started",kind:"curated",experiment:ve}),vu({name:"first_action",surface:"demo",action:"open_experiment"}))}},onRename:ve=>Yf(te,ve),onSetArchived:ve=>u_(te,ve),onDelete:()=>void Bl(te)},te.id)),__.length===0&&_.jsx("div",{className:"rail-empty py-1.5 px-2.5 text-sm text-muted",children:V==="archived"?aye():F.length>0?Vbe():dye()})]}),_.jsx(LB,{runtime:w})]}),cp="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",qn=!r&&!z&&_.jsx(It,{title:iz(),"aria-label":iz(),onClick:s,className:"mac-titlebar:ms-16",children:_.jsx(P$,{size:20})});return i!=="chat"?_.jsxs(_.Fragment,{children:[r&&Rc,_.jsxs("section",{className:"chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0",children:[!r&&_.jsx("div",{className:"flex h-12 shrink-0 items-center",children:qn}),_.jsx("div",{className:"settings-view-scroll flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",children:D})]})]}):_.jsxs(_.Fragment,{children:[r&&Rc,_.jsxs("section",{"data-side-chat":z||void 0,className:`chat-pane flex-1 min-w-0 flex flex-col bg-background min-h-0 ${z?"":"mt-5"}`,children:[_.jsxs("div",{className:r||z?"contents":"grid shrink-0 grid-cols-[2rem_minmax(0,1fr)_2rem] mac-titlebar:grid-cols-[6rem_minmax(0,1fr)_6rem] items-center",children:[qn,_.jsxs("div",{className:cp,children:[_.jsx(q0,{variant:"header",title:hr?((Io=hr.title)==null?void 0:Io.trim())||Md():LN(),children:hr?_.jsx(Fq,{title:((xs=hr.title)==null?void 0:xs.trim())||Md(),animate:s_!==void 0},s_??"static"):LN()}),k&&_.jsx(It,{"data-tip":IN(),"aria-label":IN(),onClick:k,children:_.jsx(x7n,{size:15})})]})]}),zc?_.jsxs("div",{className:"flex flex-1 flex-col items-center justify-center gap-3 p-5 text-subtext",role:"alert",children:[_.jsx("p",{children:zc.message}),_.jsx(De,{onClick:()=>void kn.refetch(),children:ri()})]}):zo?_.jsxs("div",{className:"chat-loading flex-1 flex items-center justify-center gap-3 text-subtext text-xl p-5 [&_.spinner]:w-5.5 [&_.spinner]:h-5.5 [&_.spinner]:border-[3px]","aria-live":"polite","aria-busy":"true",children:[_.jsx(kt,{}),_.jsx("span",{children:K5e()})]}):!ea&&(hr!=null&&hr.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(P0,{size:22}),_.jsx("p",{className:"m-0 text-balance",children:ycn()})]}):ea?_.jsx("div",{className:"chat-thread flex-1 min-h-0 overflow-y-auto [scrollbar-gutter:stable_both-edges]",ref:Xr,tabIndex:0,role:"region","aria-label":((ws=hr==null?void 0:hr.title)==null?void 0:ws.trim())||Md(),onScroll:te=>{Kf(te.currentTarget),An.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:Ts,children:[_.jsx(sq,{projectId:e,sessionId:H,children:_.jsx(aUn,{scrollRef:Xr,scrollToEndRef:Fr,stickToBottom:We,onPinToBottom:Sr,messages:Zr,allMessages:Qa,canFork:Ml,onFork:Mo,onSelectFork:$l,busy:Jn,onOpenFile:Vf,onOpenRun:c,onOpenSpawnedSession:op,runExperimentName:u,onOpenExperiment:h,experimentName:f,onRespond:Ti,onOpenPlan:Xs,onOpenSubagent:i_,recoveringTurnId:_r,onRecover:Xf,skills:Hf},H)}),Jn&&Nc&&_.jsx("div",{className:"flex items-center gap-2 text-subtext text-sm pt-0.5 px-0 pb-2 italic",children:K8e()}),Jn&&!Nc&&!Eo&&!ap&&_.jsx("div",{className:"text-base pt-0.5 px-1 pb-2",children:_.jsx("span",{className:"tool-running-shimmer",children:xze()})})]})}):_.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(s6,{})}),_.jsx("h2",{children:e9e()}),_.jsxs("div",{className:"chat-empty-project inline-flex items-center gap-[7px] mt-3 py-1.5 px-3 border border-border rounded-full text-subtext bg-surface text-lg font-medium",children:[_.jsx(Fu,{size:19}),_.jsx("span",{children:n})]}),jo&&_.jsxs(_.Fragment,{children:[_.jsx("div",{className:hM,"aria-hidden":"true",children:dM.map((te,ve)=>_.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 ${L4[ve].box}`,children:[_.jsxs("span",{className:`flex w-full items-center gap-2.5 ${L4[ve].icon}`,children:[_.jsx(te,{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"})]},ve))}),_.jsxs(Pr,{className:"mt-3",role:"status",children:[_.jsx(kt,{}),_.jsx("span",{children:K7e()})]})]}),o_&&o_.length>0&&_.jsx("div",{className:hM,role:"group","aria-label":e8e(),children:o_.map((te,ve)=>{const Se=dM[ve],Oe=L4[ve];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 ${Oe.box}`,onClick:()=>{vu({name:"project_starter_clicked",slot:ve+1}),vu({name:"first_action",surface:eo,action:"starter_click"}),Ao(te.prompt)},children:[_.jsxs("span",{className:"flex items-center gap-2.5 text-base font-medium text-text",children:[_.jsx(Se,{size:17,className:Oe.icon}),te.title]}),_.jsx("span",{className:"w-full truncate text-sm text-subtext",children:te.prompt})]},ve)})})]}),An.action&&_.jsxs(De,{type:"button",size:"small",className:"chat-selection-action fixed z-50 shadow-control",style:{left:An.action.x,top:An.action.top,transform:"translateX(-50%)"},onMouseDown:te=>te.preventDefault(),onClick:An.add,children:[_.jsx(B$,{size:14}),t2e()]}),_.jsxs("div",{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:[ea&&_.jsx(It,{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 ${vt?"opacity-0":"opacity-100"}`,title:cz(),"aria-label":cz(),inert:vt,onClick:Wf,children:Jn&&!Nc?_.jsx(Lm,{size:18,className:"tool-running-shimmer-icon"}):_.jsx(s7n,{size:16})}),ys&&!(Uf&&ys.promptId===Uf.promptId)&&_.jsx(RFn,{synthesized:ys.synthesized,agentLabel:hr?bu[hr.harness]:hze(),showResumeModes:(hr==null?void 0:hr.harness)==="claude-code",onView:te=>Xs==null?void 0:Xs(ys.plan,ys.promptId,te),onApprove:te=>Ti({promptId:ys.promptId,approve:!0,...te?{resumeMode:te}:{}}),onReject:()=>Ti({promptId:ys.promptId,approve:!1}),onRevise:te=>{H&&qf({sessionId:H,promptId:ys.promptId}),Ti({promptId:ys.promptId,approve:!1,note:te})}}),ji.length>0&&_.jsx("div",{className:"composer-queued flex flex-col gap-1 mb-1.5",children:ji.map((te,ve)=>_.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:te.error?`${te.text} -${te.error}`:te.text,children:[te.dispatchState==="blocked"?_.jsx(QS,{size:13,className:"shrink-0 text-accent-amber"}):_.jsx(HCn,{size:13,className:"shrink-0 text-muted"}),_.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:te.text}),te.dispatchState!=="blocked"&&_.jsx("span",{className:"shrink-0 text-sm text-muted",children:te.dispatchState==="retrying"?KOn(te.nextRetryAt,_n):o9e()}),te.dispatchState==="blocked"?_.jsxs(_.Fragment,{children:[_.jsx("button",{onClick:()=>void Do(te.id),"aria-label":ree({text:te.text}),disabled:wt!==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:wt===te.id?QL():ni()}),_.jsx("button",{onClick:()=>Oo(te.id),"aria-label":XJ({text:te.text}),disabled:wt!==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:gSe()}),ge===Ya&&geOo(te.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(xr,{size:11})})]},te.id))}),Ac&&_.jsxs("div",{id:To,role:"note",className:`composer-demo-hint ${pM}`,children:[_.jsx(Ah,{size:16,className:"shrink-0 text-primary"}),_.jsx("span",{className:"flex-1",dir:"auto",children:e4e()}),_.jsx(It,{size:"small","aria-label":s1(),title:s1(),onClick:()=>{var te;Me(!0),(te=yn.current)==null||te.focus()},children:_.jsx(xr,{size:14})})]}),b&&!Fe&&c&&_.jsxs("div",{role:"note",className:`composer-demo-run-hint ${pM}`,children:[_.jsx(Ah,{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:UN()}),_.jsxs(Ie,{size:"small",onClick:()=>c(b,"keepOpen"),children:[_.jsx(bo,{size:14}),A3()]}),_.jsx("span",{children:qN()})]}),_.jsx(It,{size:"small","aria-label":s1(),title:s1(),onClick:()=>{var te;Ye(!0),(te=yn.current)==null||te.focus()},children:_.jsx(xr,{size:14})})]}),_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:b?`${UN()} ${A3()} ${qN()}`:""}),_.jsxs("div",{className:`composer-box relative flex flex-col border ${Ji?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[_t&&!_t.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:_t.catalogPending?_.jsxs("span",{children:[_t.name," — ",_f()]}):_.jsxs(_.Fragment,{children:[_.jsxs("strong",{children:[_t.name," ",z3e()]})," ",_t.agentNote?Fu(_t.agentNote):y9e()]})}),Wa&&_.jsx(sHn,{skills:ss,activeIndex:Ni,onPick:Wi,onHover:ai}),Hn&&_.jsx(lHn,{activeSessionId:F,onClose:()=>Zn(!1),onResume:te=>{Zn(!1),oe("all"),x(te.id,{projectId:te.projectId})},onImport:te=>{Zn(!1),n_(te)}}),Te.length>0&&_.jsx(MHn,{annotations:Te,onClear:()=>{$e([]),window.requestAnimationFrame(()=>{var te;return(te=yn.current)==null?void 0:te.focus()})},onRemove:te=>{const ge=Te.filter(Se=>Se.id!==te);$e(ge),ge.length===0&&window.requestAnimationFrame(()=>{var Se;return(Se=yn.current)==null?void 0:Se.focus()})}}),Mt.length>0&&_.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:Mt.map((te,ge)=>{const Se=()=>jt(Oe=>Oe.filter((Pe,Et)=>Et!==ge));return te.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:te.name,children:[_.jsx(Qb,{size:22}),_.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:te.name??"document.pdf"}),_.jsx("button",{title:JN(),"aria-label":JN(),onClick:Se,children:_.jsx(xr,{size:11})})]},ge):_.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:te.dataUrl,alt:hL()}),_.jsx("button",{title:ez(),"aria-label":ez(),onClick:Se,children:_.jsx(xr,{size:11})})]},ge)})}),Pt&&_.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Pt}),dt&&_.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:dt}),_.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${Ji?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[_.jsx("textarea",{dir:"auto",ref:yn,"aria-describedby":Ac?To:void 0,className:"relative z-1 bg-transparent",value:ce,placeholder:li?tze():Gf&&_t?cNe({harness:Ce(bu[_t.id]),shortcut:Ce(er)}):Yt?_t!=null&&_t.agentReady?Ove({harness:Ce(bu[Yt.harness])}):yve({harness:Ce(bu[Yt.harness])}):gme(),rows:2,onPaste:Si,onDragOver:te=>{te.dataTransfer.types.includes("Files")&&te.preventDefault()},onDrop:te=>{te.dataTransfer.files.length!==0&&(te.preventDefault(),cr(Array.from(te.dataTransfer.files)))},onChange:te=>{const ge=te.target.value,Se=te.target.selectionStart;qs(Se);const Oe=Se>0&&/\s/.test(ge[Se-1])&&!li&&!Us.current&&rM(ge)===null?N4(ge,Se-1):null,Pe=Oe&&xk(Oe.query),Et=Oe?(ge.slice(0,Oe.start)+ge.slice(Oe.end)).trim():"";if(Oe&&Pe&&(Pe==="plan"||!z4(Pe)&&!Et)&&oi.some(qt=>qt.name===Pe)){Cc(Pe,ge,Oe);return}pe(ge),Hr(!1)},onSelect:te=>qs(te.currentTarget.selectionStart),onCompositionStart:()=>{Us.current=!0},onCompositionEnd:()=>{Us.current=!1},onKeyDown:te=>{if(Wa){if(te.key==="ArrowDown"||te.key==="ArrowUp"){te.preventDefault();const ge=te.key==="ArrowDown"?1:-1;ai((Ni+ge+ss.length)%ss.length);return}if(te.key==="Tab"||te.key==="Enter"){te.preventDefault(),Wi(ss[Ni]);return}if(te.key==="Escape"){te.preventDefault(),Hr(!0);return}}if(te.key==="Backspace"&&Gs(te.currentTarget)){te.preventDefault();return}if(te.key==="Enter"&&!te.shiftKey&&!te.nativeEvent.isComposing){if(te.preventDefault(),Ji){Il();return}o_({queue:te.metaKey||te.ctrlKey})}}}),_.jsx(rHn,{text:ce,editingTokenEnd:Or==null?void 0:Or.end,isCommand:Ol,skills:oi,projectId:e,textareaRef:yn})]}),_.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:Fn.ref,children:[_.jsx(It,{type:"button",className:"composer-bare",title:fw(),"aria-label":fw(),"aria-haspopup":"dialog","aria-expanded":Fn.open,onClick:()=>Fn.setOpen(te=>!te),children:_.jsx(h8n,{size:16})}),Fn.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:fw()}),_.jsx(uDn,{})]})]}),_.jsx("input",{ref:Ot,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:te=>{cr(Array.from(te.target.files??[])),te.target.value=""}}),_.jsx(It,{type:"button",className:"composer-attach",title:$N(),"aria-label":$N(),onClick:()=>{var te;return(te=Ot.current)==null?void 0:te.click()},children:_.jsx(W7n,{size:16})}),Vs&&_.jsxs(Ie,{type:"button",variant:"ghost",active:!0,className:"group max-w-60",title:HN({goal:_a(Vs)}),"aria-label":HN({goal:_a(Vs)}),onClick:()=>void Yi("clear"),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(L$,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(xr,{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:x3e()})]}),Xi&&_.jsxs(Ie,{type:"button",variant:"ghost",active:!0,className:"group",title:WN(),"aria-label":WN(),onClick:()=>void Sc(),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(C7n,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(xr,{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:H5e()})]}),Ji&&_.jsxs(Ie,{type:"button",variant:"ghost",active:!0,className:"group",title:VN(),"aria-label":VN(),onClick:Ro,children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(Mf,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(xr,{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:uL()})]}),_.jsx("div",{className:"min-w-0 flex-1"}),_.jsxs("div",{className:"flex min-w-0 items-center",children:[_.jsx(G9n,{value:Yt,onSelect:Tl,onOpenSettings:()=>a("harnesses"),permissionChoices:_t!=null&&_t.agentReady?(Bt==null?void 0:Bt.permissionModes)??[]:[],defaultPermissionId:(Bt==null?void 0:Bt.defaultPermissionMode)??null,onSelectPermission:dr,reasoningChoices:_t!=null&&_t.agentReady?zi.choices:[],defaultReasoningId:zi.defaultId,onSelectReasoning:Ls,autonomy:(Ct==null?void 0:Ct.autonomy)??j,onSelectAutonomy:is,lockHarness:!!Ct,openRequest:t_}),_.jsx(aHn,{usage:Ct==null?void 0:Ct.contextUsage})]}),Jn&&!li?_.jsx(It,{className:"send-btn",variant:"stop",title:iz(),"aria-label":iz(),onClick:Qf,children:_.jsx(xr,{size:16})}):_.jsx(It,{className:`send-btn ${Ac&&(_t!=null&&_t.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:Ji?nz():j3(),"aria-label":Ji?nz():j3(),onClick:()=>void(Ji?Il():o_()),disabled:Ji?!Ci||!F&&!(_t!=null&&_t.agentReady):!(_t!=null&&_t.agentReady)||!ce.trim()&&Mt.length===0&&Te.length===0,children:_.jsx(M$,{size:16})})]})]})]})]})]})}const pM="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",Tqn=[],Rqn=[];function la({className:e,...n}){return _.jsx("div",{className:Ns("relative flex min-h-0 flex-1 flex-col",e),...n})}function nh({className:e,...n}){return _.jsx("div",{className:Ns("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function rc({className:e,...n}){return _.jsx("div",{className:Ns("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const mM=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function Mqn({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c}){var k;const u=ut(ac(n)),h=((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)},[h]),T.useEffect(()=>{const v=f.current,b=p.current;if(!v||!b)return;const y=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return y.observe(b),y.observe(v),()=>y.disconnect()},[h===null]),h===null)return _.jsx(la,{children:_.jsx("div",{className:mM,children:_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:SI()})})});let w=null;for(const v of h)if(w=bb(v.parts,t),w)break;return _.jsx(la,{children:_.jsx("div",{className:mM,ref:f,onScroll:v=>{const b=v.currentTarget;m.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:_.jsx("div",{ref:p,children:w?_.jsx(sq,{projectId:e,sessionId:n,children:_.jsx(vqn,{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:W0n()})})})})}function Oqn({experiment:e}){var s;const n=ut(HB(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return _.jsx(nh,{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(rc,{children:[g0e()," ",Ce(r)]}):t?t.diff.trim()?_.jsxs(_.Fragment,{children:[t.truncated&&_.jsx(jP,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),_.jsx(TP,{diff:t.diff,partial:t.truncated})]}):_.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?T0e():u0e()}):_.jsx(rc,{children:S0e()})})}function Hq({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":xje(),children:[_.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:zje()}),_.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:gL()})]}),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(Im,{size:12}),_.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&_.jsx(Wh,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:_.jsx(ry,{size:13})}),_.jsx("span",{className:"flex-1"}),_.jsx(It,{title:uz(),"aria-label":uz(),onClick:c,children:o?_.jsx(St,{}):_.jsx(t8n,{size:13})})]})}const Dqn=/\.(md|mdx|markdown)$/i,Lqn=/\.tex$/i,Iqn=/\.html?$/i,$qn=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,Bqn=/\.(csv|tsv|xlsx?|ods)$/i,Pqn=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,Fqn=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,Hqn=/\.pdf$/i,qqn=/\.(docx?|log|rtf|txt)$/i;function Uqn(e){return $qn.test(e)}function VC(e){return Dqn.test(e)}function qq(e){return Lqn.test(e)}function Gqn(e){return Iqn.test(e)}function wf({name:e}){const n=VC(e)?"markdown":Uqn(e)?"image":Bqn.test(e)?"spreadsheet":Pqn.test(e)?"code":Fqn.test(e)?"archive":Hqn.test(e)?"pdf":qqn.test(e)||qq(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})}const Nk=["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(" "),gM=["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 vM(){return{dirs:new Map,files:[]}}function Uq(e){const n=vM();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?_.jsx(mc,{size:13,className:gM}):_.jsx(Ka,{size:13,className:gM}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&_.jsx(WC,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:c,onRename:u,onCancelRename:h})]})}function WC({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u}){const h=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),f=[...e.files].sort((p,m)=>p.localeCompare(m));return _.jsxs(_.Fragment,{children:[h.map(p=>{const m=n?`${n}/${p}`:p;return _.jsx(Kqn,{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:Nk,style:{paddingInlineStart:8+t*14},children:[_.jsx(wf,{name:p}),_.jsx(KB,{name:p,onCommit:k=>c(m,k),onCancel:u})]},`f:${m}`);const w=Wr(k=>i(m,k));return _.jsxs("button",{type:"button",className:Nk,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:wZ({name:Ce(m)}),children:[_.jsx(wf,{name:p}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function Vqn({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var N,j;const c=t.branchName,u=ut({...UB(e,{ref:c}),enabled:r==="files",subscribed:r==="files"}),h=ut({...tb(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=HB(t.id),k=ZV({queryKey:w.queryKey})>0,v=(j=h.data)!=null&&j.exists&&h.data.branch===c?t.chatSessionId??void 0:void 0,b=()=>{u.refetch()},y=T.useMemo(()=>f?Uq(f.entries):null,[f]),x=r==="files"?m:k,C=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(Hq,{view:r,onViewChange:i,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?Gb(n.githubOwner,n.githubRepo,c):void 0,githubTitle:sL({branch:Ce(c)}),refreshing:x,onRefresh:()=>r==="files"?b():void tt.invalidateQueries(w)}),r==="changes"?_.jsx(Oqn,{experiment:t},t.id):_.jsxs(_.Fragment,{children:[(f==null?void 0:f.truncated)&&_.jsx(rc,{children:Fje()}),p&&y&&_.jsxs(rc,{children:[tAe()," ",Ce(p)]}),_.jsx(nh,{children:y?y.dirs.size===0&&y.files.length===0?_.jsx(rc,{children:Wje()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(WC,{node:y,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(A,z)=>v?o(A,v,void 0,z):o(A,void 0,c,z)})}):_.jsx(rc,{children:p?yS({error:Ce(p)}):xS()})})]})]})}function QC({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 Wqn({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var $,L,q;const c=n.id,h=(($=ut(Gi(c)).data)==null?void 0:$.some(P=>P.id===e&&P.busy))??!1,f=ut({...tb(e??""),enabled:!!e,refetchInterval:h?5e3:!1}),p=f.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},w=ut({...UB(c,m),enabled:!e||f.isSuccess,refetchInterval:h?5e3:!1}),k=w.data,v=(L=f.error??w.error)==null?void 0:L.message,b=f.isFetching||w.isFetching,[y,x]=T.useState(null),[C,N]=T.useState(null),j=T.useCallback(()=>{e&&tt.invalidateQueries(tb(e)),tt.invalidateQueries({queryKey:kt("getCodeTree",c),predicate:P=>!XD(P)})},[e,c]),A=T.useRef(h);T.useEffect(()=>{A.current&&!h&&j(),A.current=h},[h,j]);const z=T.useMemo(()=>k?Uq(k.entries):null,[k]),M=T.useCallback(P=>{const F=new Set(r);F.has(P)?F.delete(P):F.add(P),i(F)},[r,i]),D=e&&(p!=null&&p.exists)?p:null,I=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?d4n({branch:Ce(D.baselineBranch)}):zS()),B=((q=D==null?void 0:D.files)==null?void 0:q.length)??0,G=D?Jwn({branch:Ce(`${I}${B>0?"*":""}`)}):a4n({branch:Ce(n.baselineBranch)}),U=D?D.branch:n.baselineBranch,Q=(P,F)=>D?a(P,e,void 0,F):a(P,void 0,n.baselineBranch,F),V=(k==null?void 0:k.root)==="worktree",Z=async(P,F)=>{try{await N3n(c,P,F,{sessionId:e}),j()}catch(re){Zt(re instanceof Error?re.message:String(re),"error")}},J=P=>{const F=(k==null?void 0:k.path)??n.repoPath;QEn(F,P)};return _.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[_.jsx(Hq,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:G,branchTitle:G,githubHref:n.githubEnabled&&U?Gb(n.githubOwner,n.githubRepo,U):void 0,githubTitle:U?sL({branch:Ce(U)}):void 0,refreshing:b,onRefresh:j}),v&&(p||k)&&_.jsxs(rc,{children:[W4n()," ",Ce(v)]}),!k||e&&!p?_.jsx(nh,{children:_.jsx(rc,{children:v?yS({error:Ce(v)}):xS()})}):D&&t==="changes"?_.jsx(nh,{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:O4n()}):_.jsxs(_.Fragment,{children:[D.diff.truncated&&_.jsx(jP,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),_.jsx(TP,{diff:D.diff.diff,partial:D.diff.truncated})]})}):_.jsxs(nh,{children:[k.truncated&&_.jsx(rc,{children:y4n()}),z?z.dirs.size===0&&z.files.length===0?_.jsx(QC,{icon:Pu,title:F4n(),description:qVe()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(WC,{node:z,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:Q,renamingPath:C,onContextMenu:(P,F)=>{x(q6(P,F))},onRename:(P,F)=>{N(null),Z(P,{action:"rename",newName:F})},onCancelRename:()=>N(null)})}):_.jsx(rc,{children:N4n()})]}),y&&_.jsx(U6,{target:y,onOpen:()=>Q(y.path,"keepOpen"),onRename:V&&o(y.path)?()=>N(y.path):void 0,onDuplicate:V?()=>void Z(y.path,{action:"duplicate"}):void 0,onCopyPath:()=>J(y.path),onDelete:V?()=>{window.confirm(KPe({path:Ce(y.path)}))&&Z(y.path,{action:"delete"})}:void 0,onClose:()=>x(null)})]})}function Gq({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=T.useMemo(()=>{if(!e)return[];const h=e.replace(/\r\n?/g,` +${te.error}`:te.text,children:[te.dispatchState==="blocked"?_.jsx(QS,{size:13,className:"shrink-0 text-accent-amber"}):_.jsx(N7n,{size:13,className:"shrink-0 text-muted"}),_.jsx("span",{className:"flex-1 overflow-hidden text-ellipsis whitespace-nowrap text-text",children:te.text}),te.dispatchState!=="blocked"&&_.jsx("span",{className:"shrink-0 text-sm text-muted",children:te.dispatchState==="retrying"?ADn(te.nextRetryAt,_n):V9e()}),te.dispatchState==="blocked"?_.jsxs(_.Fragment,{children:[_.jsx("button",{onClick:()=>void Do(te.id),"aria-label":tee({text:te.text}),disabled:wt!==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:wt===te.id?QL():ri()}),_.jsx("button",{onClick:()=>Oo(te.id),"aria-label":WJ({text:te.text}),disabled:wt!==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:n6e()}),ve===Ya&&veOo(te.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(xr,{size:11})})]},te.id))}),Ac&&_.jsxs("div",{id:To,role:"note",className:`composer-demo-hint ${mM}`,children:[_.jsx(Ah,{size:16,className:"shrink-0 text-primary"}),_.jsx("span",{className:"flex-1",dir:"auto",children:B4e()}),_.jsx(It,{size:"small","aria-label":s1(),title:s1(),onClick:()=>{var te;Ae(!0),(te=yn.current)==null||te.focus()},children:_.jsx(xr,{size:14})})]}),b&&!Pe&&c&&_.jsxs("div",{role:"note",className:`composer-demo-run-hint ${mM}`,children:[_.jsx(Ah,{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:GN()}),_.jsxs(De,{size:"small",onClick:()=>c(b,"keepOpen"),children:[_.jsx(bo,{size:14}),j3()]}),_.jsx("span",{children:UN()})]}),_.jsx(It,{size:"small","aria-label":s1(),title:s1(),onClick:()=>{var te;Ye(!0),(te=yn.current)==null||te.focus()},children:_.jsx(xr,{size:14})})]}),_.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:b?`${GN()} ${j3()} ${UN()}`:""}),_.jsxs("div",{className:`composer-box relative flex flex-col border ${Ji?"border-accent-amber":"border-border"} rounded-lg bg-background shadow-elevated`,"data-onboarding":"composer",children:[_t&&!_t.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:_t.catalogPending?_.jsxs("span",{children:[_t.name," — ",ff()]}):_.jsxs(_.Fragment,{children:[_.jsxs("strong",{children:[_t.name," ",d5e()]})," ",_t.agentNote?Hu(_t.agentNote):iEe()]})}),Wa&&_.jsx(HHn,{skills:ss,activeIndex:Ni,onPick:Wi,onHover:oi}),Hn&&_.jsx(KHn,{activeSessionId:H,onClose:()=>Zn(!1),onResume:te=>{Zn(!1),ne("all"),x(te.id,{projectId:te.projectId})},onImport:te=>{Zn(!1),r_(te)}}),Re.length>0&&_.jsx(gqn,{annotations:Re,onClear:()=>{$e([]),window.requestAnimationFrame(()=>{var te;return(te=yn.current)==null?void 0:te.focus()})},onRemove:te=>{const ve=Re.filter(Se=>Se.id!==te);$e(ve),ve.length===0&&window.requestAnimationFrame(()=>{var Se;return(Se=yn.current)==null?void 0:Se.focus()})}}),Mt.length>0&&_.jsx("div",{className:"composer-attachments flex flex-wrap gap-1.5 pt-2 px-3 pb-0",children:Mt.map((te,ve)=>{const Se=()=>jt(Oe=>Oe.filter((Fe,Et)=>Et!==ve));return te.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:te.name,children:[_.jsx(Wb,{size:22}),_.jsx("span",{className:"attachment-file-name overflow-hidden text-ellipsis whitespace-nowrap text-sm",children:te.name??"document.pdf"}),_.jsx("button",{title:ez(),"aria-label":ez(),onClick:Se,children:_.jsx(xr,{size:11})})]},ve):_.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:te.dataUrl,alt:hL()}),_.jsx("button",{title:tz(),"aria-label":tz(),onClick:Se,children:_.jsx(xr,{size:11})})]},ve)})}),Pt&&_.jsx("div",{className:"composer-attach-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:Pt}),dt&&_.jsx("div",{className:"composer-settings-error pt-1.5 px-3 pb-0 text-sm text-accent-red",role:"alert",children:dt}),_.jsxs("div",{className:`composer-input relative flex overflow-hidden [&_textarea]:flex-1 ${Ji?"[&_textarea]:font-mono [&_textarea]:text-sm":""}`,children:[_.jsx("textarea",{dir:"auto",ref:yn,"aria-describedby":Ac?To:void 0,className:"relative z-1 bg-transparent",value:ce,placeholder:ui?Pze():Gf&&_t?KNe({harness:Ce(bu[_t.id]),shortcut:Ce(er)}):Yt?_t!=null&&_t.agentReady?bbe({harness:Ce(bu[Yt.harness])}):ibe({harness:Ce(bu[Yt.harness])}):nge(),rows:2,onPaste:Si,onDragOver:te=>{te.dataTransfer.types.includes("Files")&&te.preventDefault()},onDrop:te=>{te.dataTransfer.files.length!==0&&(te.preventDefault(),cr(Array.from(te.dataTransfer.files)))},onChange:te=>{const ve=te.target.value,Se=te.target.selectionStart;Gs(Se);const Oe=Se>0&&/\s/.test(ve[Se-1])&&!ui&&!Vs.current&&sM(ve)===null?E4(ve,Se-1):null,Fe=Oe&&yk(Oe.query),Et=Oe?(ve.slice(0,Oe.start)+ve.slice(Oe.end)).trim():"";if(Oe&&Fe&&(Fe==="plan"||!N4(Fe)&&!Et)&&ci.some(qt=>qt.name===Fe)){Cc(Fe,ve,Oe);return}he(ve),Hr(!1)},onSelect:te=>Gs(te.currentTarget.selectionStart),onCompositionStart:()=>{Vs.current=!0},onCompositionEnd:()=>{Vs.current=!1},onKeyDown:te=>{if(Wa){if(te.key==="ArrowDown"||te.key==="ArrowUp"){te.preventDefault();const ve=te.key==="ArrowDown"?1:-1;oi((Ni+ve+ss.length)%ss.length);return}if(te.key==="Tab"||te.key==="Enter"){te.preventDefault(),Wi(ss[Ni]);return}if(te.key==="Escape"){te.preventDefault(),Hr(!0);return}}if(te.key==="Backspace"&&Ks(te.currentTarget)){te.preventDefault();return}if(te.key==="Enter"&&!te.shiftKey&&!te.nativeEvent.isComposing){if(te.preventDefault(),Ji){Il();return}c_({queue:te.metaKey||te.ctrlKey})}}}),_.jsx(FHn,{text:ce,editingTokenEnd:Or==null?void 0:Or.end,isCommand:Ol,skills:ci,projectId:e,textareaRef:yn})]}),_.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:Fn.ref,children:[_.jsx(It,{type:"button",className:"composer-bare",title:_w(),"aria-label":_w(),"aria-haspopup":"dialog","aria-expanded":Fn.open,onClick:()=>Fn.setOpen(te=>!te),children:_.jsx(J8n,{size:16})}),Fn.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:_w()}),_.jsx(WDn,{})]})]}),_.jsx("input",{ref:Ot,type:"file",accept:"application/pdf,image/png,image/jpeg,image/gif,image/webp",multiple:!0,hidden:!0,onChange:te=>{cr(Array.from(te.target.files??[])),te.target.value=""}}),_.jsx(It,{type:"button",className:"composer-attach",title:BN(),"aria-label":BN(),onClick:()=>{var te;return(te=Ot.current)==null?void 0:te.click()},children:_.jsx(M8n,{size:16})}),Qs&&_.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group max-w-60",title:qN({goal:_a(Qs)}),"aria-label":qN({goal:_a(Qs)}),onClick:()=>void Yi("clear"),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(L$,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(xr,{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:a5e()})]}),Xi&&_.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group",title:QN(),"aria-label":QN(),onClick:()=>void Sc(),children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(u8n,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(xr,{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:Nke()})]}),Ji&&_.jsxs(De,{type:"button",variant:"ghost",active:!0,className:"group",title:WN(),"aria-label":WN(),onClick:Ro,children:[_.jsxs("span",{className:"relative size-4","aria-hidden":"true",children:[_.jsx(Mf,{className:"absolute inset-0 transition-opacity group-hover:opacity-0 group-focus-visible:opacity-0",size:16,strokeWidth:1.6}),_.jsx(xr,{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:uL()})]}),_.jsx("div",{className:"min-w-0 flex-1"}),_.jsxs("div",{className:"flex min-w-0 items-center",children:[_.jsx(AEn,{value:Yt,onSelect:Tl,onOpenSettings:()=>a("harnesses"),permissionChoices:_t!=null&&_t.agentReady?(Bt==null?void 0:Bt.permissionModes)??[]:[],defaultPermissionId:(Bt==null?void 0:Bt.defaultPermissionMode)??null,onSelectPermission:dr,reasoningChoices:_t!=null&&_t.agentReady?zi.choices:[],defaultReasoningId:zi.defaultId,onSelectReasoning:$s,autonomy:(Ct==null?void 0:Ct.autonomy)??j,onSelectAutonomy:is,lockHarness:!!Ct,openRequest:n_}),_.jsx(UHn,{usage:Ct==null?void 0:Ct.contextUsage})]}),Jn&&!ui?_.jsx(It,{className:"send-btn",variant:"stop",title:az(),"aria-label":az(),onClick:Qf,children:_.jsx(xr,{size:16})}):_.jsx(It,{className:`send-btn ${Ac&&(_t!=null&&_t.agentReady)?"ring-2 ring-primary ring-offset-2 ring-offset-background":""}`,variant:"primary",title:Ji?rz():z3(),"aria-label":Ji?rz():z3(),onClick:()=>void(Ji?Il():c_()),disabled:Ji?!Ci||!H&&!(_t!=null&&_t.agentReady):!(_t!=null&&_t.agentReady)||!ce.trim()&&Mt.length===0&&Re.length===0,children:_.jsx(M$,{size:16})})]})]})]})]})]})}const mM="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",pUn=[],mUn=[];function la({className:e,...n}){return _.jsx("div",{className:zs("relative flex min-h-0 flex-1 flex-col",e),...n})}function nh({className:e,...n}){return _.jsx("div",{className:zs("min-h-0 flex-1 overflow-auto bg-background",e),...n})}function rc({className:e,...n}){return _.jsx("div",{className:zs("shrink-0 border-b border-b-border-variant px-4 py-2 text-sm text-muted",e),...n})}const gM=["pane-content flex-1 min-h-0 relative subagent-tab-content overflow-y-auto","bg-background py-8 px-4"].join(" ");function gUn({projectId:e,sessionId:n,spawnPartId:t,onOpenFile:r,onOpenRun:s,runExperimentName:i,onOpenExperiment:a,experimentName:o,onOpenSubagent:c}){var k;const u=ut(ac(n)),h=((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)},[h]),T.useEffect(()=>{const v=f.current,b=p.current;if(!v||!b)return;const y=new ResizeObserver(()=>{m.current&&(v.scrollTop=v.scrollHeight)});return y.observe(b),y.observe(v),()=>y.disconnect()},[h===null]),h===null)return _.jsx(la,{children:_.jsx("div",{className:gM,children:_.jsx("div",{className:"subagent-empty py-[3px] px-1 text-sm text-muted",children:SI()})})});let w=null;for(const v of h)if(w=bb(v.parts,t),w)break;return _.jsx(la,{children:_.jsx("div",{className:gM,ref:f,onScroll:v=>{const b=v.currentTarget;m.current=b.scrollHeight-b.scrollTop-b.clientHeight<60},children:_.jsx("div",{ref:p,children:w?_.jsx(sq,{projectId:e,sessionId:n,children:_.jsx(nUn,{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:Mmn()})})})})}function vUn({experiment:e}){var s;const n=ut(HB(e.id)),t=n.data,r=(s=n.error)==null?void 0:s.message;return _.jsx(nh,{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(rc,{children:[nme()," ",Ce(r)]}):t?t.diff.trim()?_.jsxs(_.Fragment,{children:[t.truncated&&_.jsx(jP,{bytesRead:t.bytesRead,byteLimit:t.byteLimit}),_.jsx(TP,{diff:t.diff,partial:t.truncated})]}):_.jsx("div",{className:"changes-note text-sm text-muted",children:e.parentExperimentId?mme():Q0e()}):_.jsx(rc,{children:lme()})})}function Hq({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":aAe(),children:[_.jsx("button",{type:"button",className:e==="files"?"active":"","aria-pressed":e==="files",onClick:()=>n("files"),children:dAe()}),_.jsx("button",{type:"button",className:e==="changes"?"active":"","aria-pressed":e==="changes",onClick:()=>n("changes"),children:gL()})]}),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(Im,{size:12}),_.jsx("span",{className:"wt-branch-name overflow-hidden text-ellipsis whitespace-nowrap",children:r})]}),i&&_.jsx(Wh,{href:i,target:"_blank",rel:"noopener noreferrer",title:a,"aria-label":a,children:_.jsx(ny,{size:13})}),_.jsx("span",{className:"flex-1"}),_.jsx(It,{title:_z(),"aria-label":_z(),onClick:c,children:o?_.jsx(kt,{}):_.jsx(P8n,{size:13})})]})}const bUn=/\.(md|mdx|markdown)$/i,yUn=/\.tex$/i,xUn=/\.html?$/i,wUn=/\.(apng|avif|bmp|gif|heic|heif|ico|jpe?g|jfif|jxl|pbm|pgm|png|pnm|ppm|svg|tiff?|webp)$/i,kUn=/\.(csv|tsv|xlsx?|ods)$/i,SUn=/\.(c|cc|cpp|css|go|html?|java|js|jsx|json|mjs|py|rs|sh|toml|ts|tsx|ya?ml)$/i,CUn=/\.(7z|bz2|gz|rar|tar|tgz|zip)$/i,EUn=/\.pdf$/i,NUn=/\.(docx?|log|rtf|txt)$/i;function zUn(e){return wUn.test(e)}function KC(e){return bUn.test(e)}function qq(e){return yUn.test(e)}function jUn(e){return xUn.test(e)}function wf({name:e}){const n=KC(e)?"markdown":zUn(e)?"image":kUn.test(e)?"spreadsheet":SUn.test(e)?"code":CUn.test(e)?"archive":EUn.test(e)?"pdf":NUn.test(e)||qq(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})}const Ek=["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(" "),vM=["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 bM(){return{dirs:new Map,files:[]}}function Uq(e){const n=bM();for(const t of e){const r=t.split("/");let s=n;for(let i=0;ii(t),title:t,children:[p?_.jsx(mc,{size:13,className:vM}):_.jsx(Va,{size:13,className:vM}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:e})]}),p&&_.jsx(WC,{node:n,parentPath:t,depth:r+1,toggled:s,onToggle:i,onOpenFile:a,renamingPath:o,onContextMenu:c,onRename:u,onCancelRename:h})]})}function WC({node:e,parentPath:n,depth:t,toggled:r,onToggle:s,onOpenFile:i,renamingPath:a,onContextMenu:o,onRename:c,onCancelRename:u}){const h=[...e.dirs.keys()].sort((p,m)=>p.localeCompare(m)),f=[...e.files].sort((p,m)=>p.localeCompare(m));return _.jsxs(_.Fragment,{children:[h.map(p=>{const m=n?`${n}/${p}`:p;return _.jsx(AUn,{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:Ek,style:{paddingInlineStart:8+t*14},children:[_.jsx(wf,{name:p}),_.jsx(VB,{name:p,onCommit:k=>c(m,k),onCancel:u})]},`f:${m}`);const w=Wr(k=>i(m,k));return _.jsxs("button",{type:"button",className:Ek,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:yZ({name:Ce(m)}),children:[_.jsx(wf,{name:p}),_.jsx("span",{className:"file-tree-name flex-1 min-w-0 overflow-hidden text-ellipsis whitespace-nowrap",children:p})]},`f:${m}`)})]})}function TUn({projectId:e,project:n,experiment:t,view:r,toggled:s,onViewChange:i,onToggledChange:a,onOpenFile:o}){var N,j;const c=t.branchName,u=ut({...UB(e,{ref:c}),enabled:r==="files",subscribed:r==="files"}),h=ut({...tb(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=HB(t.id),k=ZK({queryKey:w.queryKey})>0,v=(j=h.data)!=null&&j.exists&&h.data.branch===c?t.chatSessionId??void 0:void 0,b=()=>{u.refetch()},y=T.useMemo(()=>f?Uq(f.entries):null,[f]),x=r==="files"?m:k,C=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(Hq,{view:r,onViewChange:i,branchLabel:c,branchTitle:`Committed branch ${c}`,githubHref:n.githubEnabled?Ub(n.githubOwner,n.githubRepo,c):void 0,githubTitle:sL({branch:Ce(c)}),refreshing:x,onRefresh:()=>r==="files"?b():void tt.invalidateQueries(w)}),r==="changes"?_.jsx(vUn,{experiment:t},t.id):_.jsxs(_.Fragment,{children:[(f==null?void 0:f.truncated)&&_.jsx(rc,{children:EAe()}),p&&y&&_.jsxs(rc,{children:[PAe()," ",Ce(p)]}),_.jsx(nh,{children:y?y.dirs.size===0&&y.files.length===0?_.jsx(rc,{children:MAe()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(WC,{node:y,parentPath:"",depth:0,toggled:s,onToggle:C,onOpenFile:(A,z)=>v?o(A,v,void 0,z):o(A,void 0,c,z)})}):_.jsx(rc,{children:p?yS({error:Ce(p)}):xS()})})]})]})}function QC({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 RUn({sessionId:e,project:n,view:t,toggled:r,onViewChange:s,onToggledChange:i,onOpenFile:a,canRenameFile:o}){var $,L,F;const c=n.id,h=(($=ut(Gi(c)).data)==null?void 0:$.some(U=>U.id===e&&U.busy))??!1,f=ut({...tb(e??""),enabled:!!e,refetchInterval:h?5e3:!1}),p=f.data,m=e&&(p!=null&&p.exists)?{sessionId:e}:{ref:n.baselineBranch},w=ut({...UB(c,m),enabled:!e||f.isSuccess,refetchInterval:h?5e3:!1}),k=w.data,v=(L=f.error??w.error)==null?void 0:L.message,b=f.isFetching||w.isFetching,[y,x]=T.useState(null),[C,N]=T.useState(null),j=T.useCallback(()=>{e&&tt.invalidateQueries(tb(e)),tt.invalidateQueries({queryKey:St("getCodeTree",c),predicate:U=>!XD(U)})},[e,c]),A=T.useRef(h);T.useEffect(()=>{A.current&&!h&&j(),A.current=h},[h,j]);const z=T.useMemo(()=>k?Uq(k.entries):null,[k]),M=T.useCallback(U=>{const H=new Set(r);H.has(U)?H.delete(U):H.add(U),i(H)},[r,i]),D=e&&(p!=null&&p.exists)?p:null,I=(D==null?void 0:D.branch)??(D!=null&&D.baselineBranch?Z4n({branch:Ce(D.baselineBranch)}):zS()),B=((F=D==null?void 0:D.files)==null?void 0:F.length)??0,G=D?$4n({branch:Ce(`${I}${B>0?"*":""}`)}):G4n({branch:Ce(n.baselineBranch)}),q=D?D.branch:n.baselineBranch,Q=(U,H)=>D?a(U,e,void 0,H):a(U,void 0,n.baselineBranch,H),K=(k==null?void 0:k.root)==="worktree",Z=async(U,H)=>{try{await f5n(c,U,H,{sessionId:e}),j()}catch(oe){Zt(oe instanceof Error?oe.message:String(oe),"error")}},J=U=>{const H=(k==null?void 0:k.path)??n.repoPath;MNn(H,U)};return _.jsxs("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:[_.jsx(Hq,{view:D?t:"files",onViewChange:s,showViewToggle:!!D,branchLabel:G,branchTitle:G,githubHref:n.githubEnabled&&q?Ub(n.githubOwner,n.githubRepo,q):void 0,githubTitle:q?sL({branch:Ce(q)}):void 0,refreshing:b,onRefresh:j}),v&&(p||k)&&_.jsxs(rc,{children:[M3n()," ",Ce(v)]}),!k||e&&!p?_.jsx(nh,{children:_.jsx(rc,{children:v?yS({error:Ce(v)}):xS()})}):D&&t==="changes"?_.jsx(nh,{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:b3n()}):_.jsxs(_.Fragment,{children:[D.diff.truncated&&_.jsx(jP,{bytesRead:D.diff.bytesRead,byteLimit:D.diff.byteLimit}),_.jsx(TP,{diff:D.diff.diff,partial:D.diff.truncated})]})}):_.jsxs(nh,{children:[k.truncated&&_.jsx(rc,{children:i3n()}),z?z.dirs.size===0&&z.files.length===0?_.jsx(QC,{icon:Fu,title:E3n(),description:zWe()}):_.jsx("div",{className:"file-tree py-1.5 px-0 text-sm",children:_.jsx(WC,{node:z,parentPath:"",depth:0,toggled:r,onToggle:M,onOpenFile:Q,renamingPath:C,onContextMenu:(U,H)=>{x(q6(U,H))},onRename:(U,H)=>{N(null),Z(U,{action:"rename",newName:H})},onCancelRename:()=>N(null)})}):_.jsx(rc,{children:f3n()})]}),y&&_.jsx(U6,{target:y,onOpen:()=>Q(y.path,"keepOpen"),onRename:K&&o(y.path)?()=>N(y.path):void 0,onDuplicate:K?()=>void Z(y.path,{action:"duplicate"}):void 0,onCopyPath:()=>J(y.path),onDelete:K?()=>{window.confirm(TFe({path:Ce(y.path)}))&&Z(y.path,{action:"delete"})}:void 0,onClose:()=>x(null)})]})}class MUn{constructor(n,t,r){fs(this,"job",null);fs(this,"disposed",!1);fs(this,"version",0);fs(this,"timer");this.client=n,this.publish=t,this.fail=r}async start(n,t){try{const r=await this.client.start(n,t);if(this.job=r,this.disposed){this.client.cancel(r.id).catch(()=>{});return}this.accept(r)}catch(r){this.failed(r)}}accept(n){this.disposed||(this.job=n,this.publish(n),clearTimeout(this.timer),(n.status==="running"||n.status==="paused")&&(this.timer=setTimeout(()=>void this.poll(),n.status==="paused"?2e3:250)))}async poll(){if(!this.job||this.disposed)return;const n=this.version;try{const t=await this.client.status(this.job.id);n===this.version&&this.accept(t)}catch(t){n===this.version&&this.failed(t)}}async resume(){if(!(!this.job||this.disposed||this.job.status!=="paused")){this.version++,clearTimeout(this.timer),this.job={...this.job,status:"running"},this.publish(this.job);try{this.accept(await this.client.resume(this.job.id))}catch(n){this.failed(n)}}}cancel(){this.job&&!this.disposed&&this.publish({...this.job,status:"cancelled"}),this.dispose()}dispose(){this.disposed||(this.disposed=!0,this.version++,clearTimeout(this.timer),this.job&&this.client.cancel(this.job.id).catch(()=>{}))}failed(n){this.disposed||(this.fail(n instanceof Error?n:new Error(String(n))),this.dispose())}}function OUn(e,n){const t=T.useSyncExternalStore(g3,pD),r=JSON.stringify([e,n,t]),[s,i]=T.useState(r),[a,o]=T.useState([]),[c,u]=T.useState(null),[h,f]=T.useState(null),p=T.useRef(null),m=T.useRef(()=>{});T.useEffect(()=>{let k=!0;i(r);const v=p5n(e);return m.current=b=>{var x;if(!k||!n)return;(x=p.current)==null||x.dispose(),u(null),f(null);const y=new MUn(v,C=>{k&&(u(C),C.status==="complete"&&C.result&&o(N=>[...N,C.result]),C.status==="failed"&&f(new Error(C.error??"Search failed")))},C=>{k&&f(C)});p.current=y,y.start(n,b)},o([]),u(null),f(null),m.current(),()=>{var b;k=!1,(b=p.current)==null||b.dispose(),p.current=null}},[e,n,t,r]);const w=s===r;return{pages:w?a:[],job:w?c:null,error:w?h:null,pending:!!n&&(!w||!h&&(!c||c.status==="running")),resume:()=>{var k;return void((k=p.current)==null?void 0:k.resume())},cancel:()=>{var k;return(k=p.current)==null?void 0:k.cancel()},loadMore:()=>{var k;return m.current(((k=a.at(-1))==null?void 0:k.nextCursor)??void 0)}}}function Gq({text:e,path:n,highlightLine:t,scrollRequest:r,onScrollRequestHandled:s}){const i=T.useMemo(()=>{if(!e)return[];const h=e.replace(/\r\n?/g,` `),f=RB(h,a6(n));return h.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 h;r!==void 0&&(a?((h=o.current)==null||h.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:c}=hB(i.length),u=T.useMemo(()=>i.map((h,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:`${dB} 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 ${Jv} ${fB}`,children:MB(h)?_.jsx("br",{}):h})]},f)),[i,c,a]);return _.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${Jv}`,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 Qqn="modulepreload",Xqn=function(e){return"/"+e},bM={},Yqn=function(n,t,r){let s=Promise.resolve();if(t&&t.length>0){let a=function(u){return Promise.all(u.map(h=>Promise.resolve(h).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=Xqn(u),u in bM)return;bM[u]=!0;const h=u.endsWith(".css"),f=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const p=document.createElement("link");if(p.rel=h?"stylesheet":Qqn,h||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),h)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)})},yb=T.createContext(null);function Zqn({url:e,name:n}){return _.jsx(Wh,{size:"small",href:e,download:n,"aria-label":Mv({name:Ce(n)}),"data-tip":Mv({name:Ce(n)}),"data-tip-align":"end",children:_.jsx(Wb,{size:13})})}const Jqn=T.lazy(()=>Yqn(()=>import("./PdfPreview--NppkCR0.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:[Crt()," ",_.jsxs("a",{href:e,download:n,children:[M3()," ",Ce(n)]})]})}function zk({kind:e,url:n,name:t,download:r=!0}){const[s,i]=T.useState(!1),a=T.useContext(yb);if(T.useEffect(()=>i(!1),[e,n]),s)return _.jsx(Vq,{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(St,{})}),children:_.jsx(Jqn,{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&&si.createPortal(_.jsx(Zqn,{url:n,name:t}),a)]})}const eUn=e=>({queryKey:kt("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 ut({...eUn(e),enabled:n,subscribed:n}).data??null}function XC({projectId:e,request:n,remote:t}){var a,o,c;const r=ut(P6(e,n)),s=yi(),i=!r.isError&&!r.isFetching?(a=r.data)==null?void 0:a.absolutePath:null;return _.jsxs("div",{className:"flex shrink-0 min-w-0 items-center gap-1 border-b border-border-variant px-3 py-1 text-xs text-subtext",children:[_.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",title:i??((o=r.error)==null?void 0:o.message),children:((c=r.error)==null?void 0:c.message)??(i?t?xL({path:Ce(i)}):Ce(i):n.ref?wS({branch:Ce(n.ref)}):wL())}),r.isPending&&_.jsx(St,{}),i&&_.jsxs(_.Fragment,{children:[_.jsx(It,{size:"small","aria-label":T3(),"data-tip":T3(),onClick:()=>{zn(s)&&ly(i)},children:_.jsx(Yu,{size:13})}),!t&&_.jsx(It,{size:"small","aria-label":R3(),"data-tip":R3(),onClick:()=>{zn(s)&&MS(e,n.path,n).catch(u=>Zt(u instanceof Error?u.message:String(u),"error"))},children:_.jsx(Pu,{size:13})})]})]})}function tUn(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function nUn(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 h=u.join("/");if(!h)return null;const f=new URLSearchParams(c);f.delete("path");const p=f.toString();return{path:h,url:`${df(e,h)}${p?`&${p}`:""}${i}`}}function rUn(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,sUn=8,iUn=280;function aUn(){try{const e=Number(localStorage.getItem(Qq));if(Number.isFinite(e)&&e>=Yq&&e<=Zq)return e}catch{}return iUn}function oUn(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 rh(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=rh(t.children??[],n);if(r)return r}}return null}function Jq({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(tUn(i))return i;const a=nUn(e,n,i);if(!a)return null;const o=rh(r,a.path);if(!o)return a.url;const c=a.url.indexOf("#"),u=c===-1?a.url:a.url.slice(0,c),h=c===-1?"":a.url.slice(c);return`${u}&v=${o.modifiedAt}:${o.size}${h}`};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(fOn,{remarkPlugins:[JH,[eq,aq]],rehypePlugins:[zH],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},...oq},children:nq(rUn(t))})})}function cUn(e){return e.presentation==="text"&&VC(e.name)?"markdown":Kq(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function lUn(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=HI,i=F6(e,n.path),a=ut({...i,enabled:s,subscribed:s}),o=T.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});T.useEffect(()=>{const h=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&h.projectId===e&&h.path===n.path&&(h.modifiedAt!==n.modifiedAt||h.size!==n.size||h.version!==null&&h.version!==r)&&tt.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 uUn({projectId:e,entry:n,onDelete:t,artifactEntries:r,remote:s}){const i=cUn(n),a=Wq(df(e,n.path)),{text:o,binary:c,truncated:u,error:h,wantsText:f}=lUn(e,n,i,a),[p,m]=T.useState(!1),[w,k]=T.useState(null),v=i==="markdown",b=n.path.split("/").slice(0,-1).join("/"),y=`${df(e,n.path)}&v=${encodeURIComponent(a??`${n.modifiedAt}:${n.size}`)}`;let x;return i==="image"||i==="audio"||i==="video"||i==="pdf"?x=_.jsx(yb.Provider,{value:w,children:_.jsx(zk,{kind:i,url:y,name:n.name})}):i==="download"||!f||c?x=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[i==="download"||c?wde():r0e()," ",_.jsx("a",{href:y,...i==="download"||c?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:i==="download"||c?SL():qde()})]}):h?x=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Xhe()," ",Ce(h)]}):o===null?x=_.jsxs(Pr,{children:[_.jsx(St,{})," ",cL()]}):v&&!p?x=_.jsx(Jq,{projectId:e,folder:b,markdown:o,entries:r}):x=_.jsx(Gq,{text:o,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(wf,{name:n.name}),_.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ce(n.path),children:n.name}),_.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0 @max-xl:hidden",children:[Ape()," ",new Date(n.modifiedAt).toLocaleString(E(),{dateStyle:"medium",timeStyle:"short"})]}),_.jsx("div",{ref:k,className:"contents"}),(i==="text"||i==="download")&&_.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:_l(n.size)}),v&&_.jsx(It,{size:"small",active:p,"data-tip":p?Dv():Pd(),"data-tip-align":"end","aria-label":p?Dv():Pd(),onClick:()=>m(C=>!C),children:_.jsx(f5,{size:13})}),_.jsx(Wh,{size:"small",href:y,target:"_blank",rel:"noopener noreferrer","data-tip":AN(),"data-tip-align":"end","aria-label":AN(),children:_.jsx(mf,{size:13})}),_.jsx(It,{size:"small","data-tip":jN(),"data-tip-align":"end","aria-label":jN(),onClick:()=>{window.confirm(gS({path:Ce(n.path)}))&&t(n.path)},children:_.jsx(Of,{size:13})})]}),_.jsx(XC,{projectId:e,request:{path:n.path,source:"artifacts"},remote:s}),_.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 ${v&&!p?"doc":""}`,children:[x,u&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:rpe()})]})]})}function eU({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,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,sUn)*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),onContextMenu:v=>{v.preventDefault(),u(v,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:Ce(p.name)}):pde({name:Ce(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},onKeyDown:v=>{(v.key==="ContextMenu"||v.shiftKey&&v.key==="F10")&&(v.preventDefault(),u(v,p.path))},children:_.jsx(Ka,{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(It,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":qhe(),"data-tip-align":"end","aria-label":cde({name:Ce(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(gS({path:Ce(p.path)}))&&o(p.path)},children:_.jsx(Of,{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:h,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(wf,{name:p.name}),_.jsx(KB,{name:p.name,onCommit:k=>h(p.path,k),onCancel:f})]},p.path):_.jsxs("button",{type:"button","data-artifact-path":p.path,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:DX({path:Ce(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(wf,{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 _Un({project:e,artifacts:n,onOpenFile:t,canRenameFile:r,remote:s}){var L,q;const[i,a]=T.useState(null),[o,c]=T.useState(null),[u,h]=T.useState(""),[f,p]=T.useState(""),[m,w]=T.useState(0);T.useEffect(()=>{const P=window.setTimeout(()=>p(u.trim()),250);return()=>window.clearTimeout(P)},[u]);const k=JV({...qEn(e.id,f),enabled:f.length>0}),v=T.useMemo(()=>{var P;return((P=k.data)==null?void 0:P.pages.flatMap(F=>F.entries))??[]},[k.data]),b=T.useMemo(()=>FB((n==null?void 0:n.entries)??[],o?[o]:[]),[n==null?void 0:n.entries,o]),y=u.trim().length>0,[x,C]=T.useState(()=>oUn(e.id)),[N,j]=T.useState(aUn),[A,z]=T.useState(null),[M,D]=T.useState(null),I=T.useRef(null);T.useEffect(()=>{var F;if(!i||y||!m)return;const P=(F=I.current)==null?void 0:F.querySelector(`[data-artifact-path="${CSS.escape(i)}"]`);P==null||P.scrollIntoView({block:"nearest"})},[i,y,m,b]),T.useEffect(()=>{try{localStorage.setItem(`${Xq}${e.id}`,JSON.stringify([...x]))}catch{}},[e.id,x]);const B=P=>{var se;P.preventDefault(),P.currentTarget.setPointerCapture(P.pointerId);const F=(se=I.current)==null?void 0:se.getBoundingClientRect(),re=document.body.style.userSelect;document.body.style.userSelect="none";const ie=K=>{const oe=Math.round(K.clientX-((F==null?void 0:F.left)??0)),ce=Math.min(Math.max(oe,Yq),Zq);j(ce);try{localStorage.setItem(Qq,String(ce))}catch{}},ue=()=>{window.removeEventListener("pointermove",ie),window.removeEventListener("pointerup",ue),window.removeEventListener("pointercancel",ue),document.body.style.userSelect=re};window.addEventListener("pointermove",ie),window.addEventListener("pointerup",ue),window.addEventListener("pointercancel",ue)};T.useEffect(()=>{if(!i||!n)return;const P=rh(b,i);(!P||P.isDir)&&a(null)},[i,n,b]);const G=P=>C(F=>{const re=new Set(F);return re.has(P)?re.delete(P):re.add(P),re}),U=P=>{(i===P||i!=null&&i.startsWith(P+"/"))&&a(null),((o==null?void 0:o.path)===P||o!=null&&o.path.startsWith(P+"/"))&&c(null),O5n(e.id,P).catch(()=>{})},Q=async(P,F)=>{try{await D5n(e.id,P,F),F.action==="rename"&&i===P&&a(null),F.action==="rename"&&((o==null?void 0:o.path)===P||o!=null&&o.path.startsWith(P+"/"))&&c(null)}catch(re){Zt(re instanceof Error?re.message:String(re),"error")}},V=P=>{const F=yi();ly(tt.fetchQuery(P6(e.id,{path:P,source:"artifacts"})).then(re=>{if(!zn(F)||!re.absolutePath)throw new Error(Lv());return re.absolutePath}))};if(!n)return _.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:_.jsxs(Pr,{className:"p-5",children:[_.jsx(St,{})," ",kpe()]})});const Z=P=>_.jsx(eU,{entries:P,depth:0,collapsed:x,selected:i,onToggle:G,onSelect:a,onOpenFile:t,onDelete:U,renamingPath:M,onContextMenu:(F,re)=>{z(q6(F,re))},onRename:(F,re)=>{D(null),Q(F,{action:"rename",newName:re})},onCancelRename:()=>D(null)}),J=i?rh(b,i):null,$=P=>{c(P),a(P.path),C(F=>{const re=new Set(F),ie=P.path.split("/");for(let ue=1;ueF+1)};return _.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:I,style:{width:N},children:[_.jsx(XC,{projectId:e.id,request:{path:"",source:"artifacts"},remote:s}),_.jsx("div",{className:"shrink-0 p-2",children:_.jsx(Br,{"aria-label":zN(),placeholder:zN(),value:u,onChange:P=>h(P.target.value),onKeyDown:P=>{P.key==="Escape"&&(P.preventDefault(),P.stopPropagation(),h(""))}})}),_.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:B}),_.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[y?_.jsx(_.Fragment,{children:f!==u.trim()||k.isPending?_.jsxs(Pr,{children:[_.jsx(St,{})," ",khe()]}):_.jsxs(_.Fragment,{children:[k.error&&_.jsx("p",{role:"alert",className:"m-0 px-3 py-2 text-sm text-accent-red",children:k.error.message}),!k.error&&v.length===0&&_.jsx("p",{role:"status",className:"m-0 px-3 py-2 text-sm text-subtext",children:uhe()}),v.map(P=>_.jsxs("button",{type:"button",className:"flex w-full min-w-0 items-center gap-2 px-3 py-2 text-start text-sm text-text hover:bg-panel",title:P.path,onClick:()=>$(P),children:[_.jsx(wf,{name:P.name}),_.jsx("span",{className:"min-w-0 break-all",children:P.path})]},P.path)),k.hasNextPage&&_.jsx(Ie,{disabled:k.isFetchingNextPage,onClick:()=>void k.fetchNextPage(),children:rhe()}),((L=k.data)==null?void 0:L.pages.some(P=>P.incomplete))&&_.jsx("p",{role:"status",className:"m-0 px-3 py-2 text-sm text-accent-amber",children:Xde()})]})}):b.length?Z(b):_.jsx(QC,{icon:GS,title:Ipe(),description:Xpe()}),!y&&n.truncated&&_.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:upe()})]})]}),J?_.jsx(uUn,{projectId:e.id,entry:J,onDelete:U,artifactEntries:b,remote:s},J.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(q7n,{size:22,strokeWidth:1.5}),_.jsx("span",{children:Ahe()})]}),A&&_.jsx(U6,{target:A,onOpen:(q=rh(b,A.path))!=null&&q.isDir?void 0:()=>t(A.path),onReveal:s?void 0:()=>{MS(e.id,A.path,{source:"artifacts"}).catch(P=>Zt(P instanceof Error?P.message:String(P),"error"))},onRename:r(A.path)?()=>D(A.path):void 0,onDuplicate:()=>void Q(A.path,{action:"duplicate"}),onCopyPath:()=>V(A.path),onDelete:()=>{window.confirm(gS({path:Ce(A.path)}))&&U(A.path)},onClose:()=>z(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",fUn="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",dUn="text-sm font-normal text-text",hUn="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 pUn(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(St,{}),_.jsx("span",{children:cfn()})]}):_.jsxs(_.Fragment,{children:[_.jsx(v8n,{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:[_l(e),n>0&&_.jsxs("span",{className:"text-muted",children:[" · ",vo(n)]})]})}function mUn({skill:e,onError:n}){const t=pn({mutationFn:skn}),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:dUn,children:e.name}),e.origin&&_.jsx(Wt,{size:"small",children:e.origin})]}),_.jsx(aU,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx(It,{size:"small","data-tip":e.origin?_un():a_n(),"data-tip-align":"end","aria-label":e.origin?Cun({name:Ce(e.name)}):rln({name:Ce(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?vun({name:Ce(e.name)}):Xcn({name:Ce(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:_.jsx(Of,{size:13})})]})}function gUn({template:e,onError:n}){const t=pn({mutationFn:tkn}),r=t.isPending,s=e.supportFiles.length;return _.jsxs("div",{className:fUn,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:hUn,children:[e.entry,s>0&&(s===1?Yln():Run({count:Jt(s)}))]})]}),_.jsx(aU,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx(It,{"data-tip":d_n(),"data-tip-align":"end","aria-label":gln({name:Ce(e.name)}),disabled:r,onClick:()=>{window.confirm(uln({name:Ce(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:_.jsx(Of,{size:13})})]})}function vUn(){var y;const e=pn({mutationFn:rkn}),n=ut(Xkn()),t=n.data,r=T.useRef(null),[s,i]=T.useState(!1),[a,o]=T.useState(!1),c=T.useCallback(()=>{const x=r.current;i(!!x&&x.scrollTop>1),o(!!x&&x.scrollHeight-x.scrollTop-x.clientHeight>1)},[]);T.useLayoutEffect(()=>{c();const x=r.current;if(!x)return;const C=new ResizeObserver(c);return C.observe(x),()=>C.disconnect()},[t,c]);const u=n.isFetching,h=(y=n.error)==null?void 0:y.message,[f,p]=T.useState(!1),[m,w]=T.useState(null),k=()=>{n.refetch()},v=T.useRef(!1),b=T.useCallback(async x=>{if(!v.current){if(w(null),!pUn(x.name)){w(wfn());return}if(x.size>tU){w(xI());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:x.name,contentBase64:await sU(x)})}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:tfn()}),_.jsxs(Ie,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[_.jsx(Va,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),_.jsx("p",{className:rU,children:Sln()}),_.jsx(iU,{accept:".md,.markdown,.zip",busy:f,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:Tln()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:qcn()})]}),onFile:x=>void b(x)}),m&&_.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),h&&_.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[Bun()," ",h]}),t===void 0?h?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(St,{})," ",N_n()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:F_n()}):_.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(x=>_.jsx(mUn,{skill:x,onError:w},x.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 bUn(){var h;const e=pn({mutationFn:ekn}),n=ut(Qkn()),t=n.data,r=(h=n.error)==null?void 0:h.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(jfn());return}if(f.size>tU){o(xI());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:y_n()}),_.jsx("p",{className:rU,children:pfn()}),_.jsx(iU,{accept:".tex,.zip",busy:s,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:$ln()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:pmn()})]}),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:[Kun()," ",r]}),t===void 0?r?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(St,{})," ",O_n()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:W_n()}):_.jsx("div",{className:"flex flex-col mt-1",children:t.map(f=>_.jsx(gUn,{template:f,onError:o},f.name))})]})}function yUn(){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:Jun()}),_.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:sun()}),_.jsx(vUn,{}),_.jsx(bUn,{})]})}const xUn="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Go({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?xUn:""}`,onClick:i,onDoubleClick:a,title:s?cmn({label:n}):n,"aria-label":s?tmn({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:cje(),onPointerDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),o()},children:_.jsx(xr,{size:12})})]})}const yM=["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 wUn({owner:e,repo:n,branch:t}){return!e||!n?_.jsx("span",{className:yM,children:_.jsx("code",{children:t})}):_.jsxs("a",{className:yM,href:Gb(e,n,t),target:"_blank",rel:"noopener noreferrer",title:Ov({name:Ce(t)}),children:[_.jsx("code",{children:t}),_.jsx(ry,{size:12})]})}const $4=["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(" "),xM=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function wM(e){return new Date(e).toLocaleString(E(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function kM(e,n){return $0((e.endedAt??n)-e.createdAt)}function kUn({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=TI(r),c=r.some(f=>f.status==="running"||f.status==="starting"),[u,h]=T.useState(()=>Date.now());return T.useEffect(()=>{if(!c)return;h(Date.now());const f=window.setInterval(()=>h(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(ml,{status:a?pa(a):"idle"})]}),_.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&_.jsxs(Ie,{...Wr(f=>s(a.id,f)),children:[_.jsx(bo,{size:15}),GIe()]}),_.jsxs(Ie,{...Wr(i),children:[_.jsx(Xb,{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:gIe()}),_.jsx(_c,{text:e.description})]}),_.jsxs("section",{className:$4,children:[_.jsx("h2",{children:a?qLe():b$e()}),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(ml,{status:pa(a)}),_.jsx(i6,{backend:a.backend}),_.jsxs("span",{title:f$e(),children:[_.jsx(NCn,{size:13}),wM(a.createdAt)]}),_.jsxs("span",{title:SIe(),children:[_.jsx(PCn,{size:13}),kM(a,u)]}),a.commitSha&&_.jsxs("span",{title:rIe(),children:[_.jsx(m7n,{size:14}),_.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&_.jsxs("span",{children:[TIe()," ",a.exitCode]})]}),a.command&&_.jsxs("code",{className:xM,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:$4,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(wUn,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&_.jsxs("span",{children:[$Ie()," ",_.jsx("code",{children:n.slug})]}),_.jsxs("span",{title:wM(e.createdAt),children:[uIe()," ",vo(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&_.jsxs("code",{className:xM,children:["$ ",e.runCommand]})]}),r.length>0&&_.jsxs("section",{className:$4,children:[_.jsx("h2",{children:i$e()}),_.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",{...Wr(m=>s(f.id,m)),children:[_.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[ZIe()," ",r.length-p]}),_.jsx(ml,{status:pa(f)}),_.jsx("span",{children:vo(f.createdAt)}),_.jsx("span",{children:kM(f,u)}),_.jsx(bo,{size:13})]},f.id))})]})]})})}function SM(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}=Zb(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 x3n(e,a);if(i)return;if(f.dataBase64&&r.write(SM(f.dataBase64)),a=f.nextOffset,f.eof)break}}catch{}finally{o=!1,c&&!i&&(c=!1,u())}}const h=sSn(e,f=>{if(i)return;const p=SM(f.dataBase64);!o&&f.offset===a?(r.write(p),a+=p.length):f.offset+p.length>a&&u()});return u(),()=>{i=!0,h(),s()}},[e]),_.jsx("div",{ref:n,className:"h-full w-full"})}function CUn({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:c}){const u=r.filter(h=>h.experimentId===e.id).sort((h,f)=>f.createdAt-h.createdAt);return t==="overview"?_.jsx(kUn,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(h,f)=>o("terminal",h,f),onOpenCode:h=>c("files",h)}):_.jsx(EUn,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function EUn({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=T.useState(null),[a,o]=T.useState(null),[c,u]=T.useState(!1),h=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 b=n.findIndex(y=>y.id===v);return b===-1?n.length:n.length-b};T.useEffect(()=>{if(!c)return;const v=b=>{var y;(y=h.current)!=null&&y.contains(b.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 OI(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(Ie,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[_.jsx(T$,{size:13}),m?cAe():bL()]}),n.length>0&&f&&_.jsxs("div",{className:"run-history relative shrink-0",ref:h,children:[_.jsxs(Ie,{title:ODe(),"aria-expanded":c,onClick:()=>u(v=>!v),children:[_.jsxs("span",{children:[_z()," ",w(f.id)]}),_.jsx(ml,{status:m?"cancelling":pa(f)}),_.jsx(mc,{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(vn,{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:[_z()," ",w(v.id)]}),_.jsx(ml,{status:pa(v)}),_.jsx("span",{className:"ms-auto text-xs text-muted",children:vo(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(SUn,{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?fo():xDe()})})]})}let jk=!1;function CM(e){jk=!0;try{return window.confirm(e)}finally{jk=!1}}const Ak=e=>e.replace(/\r\n/g,` -`),EM=(e,n,t)=>{const r=Ak(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r -`),conflict:null}},nl=e=>e.draft!==e.baseline,NUn=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),zUn=e=>e.crlf?e.draft.replace(/\n/g,`\r -`):e.draft;function jUn(e,n,t){return!nl(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class AUn{constructor(){Qs(this,"buffer",null);Qs(this,"listeners",new Set);Qs(this,"saving",!1);Qs(this,"saveError",null);Qs(this,"revision",0);Qs(this,"saveRevision",0);Qs(this,"getSnapshot",()=>this.buffer);Qs(this,"getRevision",()=>this.revision);Qs(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));Qs(this,"set",n=>{this.buffer=n,this.notify()});Qs(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});Qs(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});Qs(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&&(nl(this.buffer)||this.buffer.conflict!==null)}}function TUn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var Z,J,$;const c=ut({...UEn(),enabled:r,subscribed:r}),u=((Z=c.data)==null?void 0:Z.engine)??(c.isPending?void 0:null),h=((J=c.data)==null?void 0:J.hint)??null,f=(($=c.data)==null?void 0:$.installCommand)??null,[p,m]=T.useState(!1),[w,k]=T.useState(null),[v,b]=T.useState(null),[y,x]=T.useState(!1),[C,N]=T.useState(null),[j,A]=T.useState(null),[z,M]=T.useState(!1),[D,I]=T.useState(0),B=T.useCallback(L=>{M(L),L&&I(q=>q+1)},[]),G=T.useRef(o);G.current=o;const U=T.useRef(!1),Q=T.useRef(null),V=T.useCallback(()=>{if(U.current)return;Q.current=n,U.current=!0,m(!0);const L=G.current;A(null),b(null),N(null),R3n(e,n,{sessionId:t}).then(q=>{var F,re;const P=q.pdfPath;if(q.ok&&P){k(ie=>({path:P,version:((ie==null?void 0:ie.version)??0)+1,source:L})),x(q.hadErrors),N(q.note),q.hadErrors&&b(((F=q.log)==null?void 0:F.trim())||null),B(!0);return}k(null),x(!1),N(q.note),M(!1),b(((re=q.log)==null?void 0:re.trim())||Pet())}).catch(q=>{k(null),x(!1),N(null),M(!1),A(q instanceof Error?q.message:String(q))}).finally(()=>{U.current=!1,m(!1)})},[e,n,t,B]);return T.useEffect(()=>{!r||!s||!a||!u||Q.current!==n&&V()},[r,s,a,u,n,V]),{engine:u,installHint:h,installCommand:f,compiling:p,compiled:w,stale:w!==null&&w.source!==o,log:v,builtWithErrors:y,note:C,error:j,showPdf:z,setShowPdf:B,viewNonce:D,compile:()=>{i==null||i(),V()},dismiss:()=>{A(null),b(null)}}}const RUn=3e4,MUn=3e4,OUn=5*6e4;function DUn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:c}){var ue,se,K,oe;const u=T.useMemo(()=>KEn(e,n,{sessionId:t}),[e,n,t]),h=ut({...u,enabled:r,subscribed:r}),f=((ue=h.data)==null?void 0:ue.hasToken)??!1,p=((se=h.data)==null?void 0:se.hasSession)??!1,m=((K=h.data)==null?void 0:K.link)??null,w=!h.isPending,[k,v]=T.useState(null),[b,y]=T.useState(0),[x,C]=T.useState(!1),[N,j]=T.useState(null),[A,z]=T.useState(null),[M,D]=T.useState(!1),I=T.useCallback(ce=>{zn(u.queryKey)&&tt.setQueryData(u.queryKey,pe=>pe&&{...pe,hasSession:ce})},[u]),B=T.useCallback(ce=>{zn(u.queryKey)&&tt.setQueryData(u.queryKey,ce)},[u]);T.useEffect(()=>{j(null),y(0),L.current=!1,z(null),D(!1),V.current=!1},[r,e,n,t]),T.useEffect(()=>{D(!1)},[a]);const G=T.useRef(!1),U=T.useRef(c);U.current=c;const Q=T.useRef(o);Q.current=o;const V=T.useRef(!1),Z=T.useCallback(ce=>!f||!m||G.current||Q.current?!1:(G.current=!0,C(!0),z(null),H3n(e,n,{sessionId:t,resolve:ce}).then(pe=>{V.current=!1,j(pe),pe.pulled.includes(n)&&(Q.current?D(!0):U.current(pe.pulled))}).catch(pe=>{V.current=!0,j(null),z(pe instanceof Error?pe.message:String(pe))}).finally(()=>{G.current=!1,C(!1)}),!0),[e,n,t,f,m]),J=T.useRef(null),$=(k==null?void 0:k.state)==="live";T.useEffect(()=>{if(!r||!s||!w||!f||!m||o||$)return;const ce=`${n}:${m.projectId}:${a}`;J.current!==ce&&Z()&&(J.current=ce)},[r,s,w,f,m,n,a,o,x,Z,$]);const L=T.useRef(!1);!x&&N&&N.conflicts.length===0&&!A&&(L.current=!0);const q=r&&w&&!!m&&f&&p&&L.current,P=T.useRef(null),F=T.useRef(Promise.resolve()),re=T.useRef(!1);re.current=(k==null?void 0:k.state)==="stopped"&&k.error!=null;const ie=T.useRef(!1);return T.useEffect(()=>{if(!q)return;let ce=!1;const pe=()=>{const Me=ie.current;ie.current=!1,!(!Me&&re.current)&&(F.current=F.current.then(()=>{if(!ce)return I3n(e,n,{sessionId:t,retry:Me}).then(Fe=>{var Ye;ce||((P.current===null||((Ye=Fe.status)==null?void 0:Ye.state)==="stopped")&&v(Fe.status),P.current=Fe.key)}).catch(Fe=>{ce||v({state:"stopped",error:Fe instanceof Error?Fe.message:String(Fe),needsSession:!1,note:null})})}))};pe();const ve=setInterval(pe,MUn);return()=>{ce=!0,clearInterval(ve),P.current=null,v(null),F.current=F.current.then(()=>$3n(e,n,{sessionId:t})).catch(()=>{})}},[q,b,e,n,t]),T.useEffect(()=>uSn(ce=>{if(ce.key===P.current){if(ce.type==="live"){v(ce.status);return}ce.paths.includes(n)&&(Q.current?D(!0):U.current(ce.paths))}}),[n]),T.useEffect(()=>{if(!r||!s||!w||!f||!m||o||$)return;const ce=setInterval(()=>{G.current||V.current||tt.fetchQuery({...VEn(e,n,{sessionId:t}),staleTime:0}).then(pe=>{pe.remoteChanged&&Z()}).catch(pe=>{V.current=!0,z(pe instanceof Error?pe.message:String(pe))})},RUn);return()=>clearInterval(ce)},[r,s,w,f,m,o,e,n,t,Z,$]),T.useEffect(()=>{if(!r||!s||!w||!f||!m||!$)return;const ce=setInterval(Z,OUn);return()=>clearInterval(ce)},[r,s,w,f,m,$,Z]),{hasToken:f,hasSession:p,live:k,retryLive:()=>{ie.current=!0,y(ce=>ce+1)},link:m,loaded:w,syncing:x,last:N,error:A??((oe=h.error)==null?void 0:oe.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>D(!1),uploadUrl:U3n(e,n,{sessionId:t}),saveToken:async ce=>{const pe=await LI(ce);J.current=null,V.current=!1,z(null),zn(u.queryKey)&&tt.setQueryData(u.queryKey,ve=>ve&&{...ve,hasToken:pe.hasToken})},saveSession:async ce=>{const pe=await II(ce,{host:m==null?void 0:m.host});I(pe.hasSession),ie.current=!0,y(ve=>ve+1)},importSession:async()=>{const ce=await L3n({host:m==null?void 0:m.host});return I(ce.hasSession),ie.current=!0,y(pe=>pe+1),ce.source},linkProject:async ce=>{j(null),v(null),L.current=!1,J.current=null,B(await P3n(e,n,{project:ce,sessionId:t})),i==null||i()},unlink:async()=>{B(await F3n(e,n,{sessionId:t})),J.current=null,V.current=!1,j(null),z(null)},sync:ce=>{V.current=!1,Z(ce)&&(J.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}const NM=[{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"]}],LUn=4e6,IUn=200,zM=16e6,$Un=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)}),jM=e=>e.startsWith("//")?`https:${e}`:e;async function BUn(e,n){var s;let t=LUn;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>=IUn)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const h=u.headers.get("content-type")??"",f=Number(u.headers.get("content-length"));if(!c.some(w=>h.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 $Un(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function PUn(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(NM.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:u,typePrefixes:h}of NM){if(!o.matches(c))continue;const f=o.getAttribute(u);if(!f)continue;const p=n(f);p&&(p===f?o.setAttribute(u,jM(f)):s.push({element:o,attribute:u,url:p,typePrefixes:h}))}await BUn(s,t);for(const o of r.querySelectorAll("a[href]")){const c=o.getAttribute("href");!c||!pC(c)||(o.setAttribute("href",jM(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 FUn(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${zM-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>zM}}function HUn({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),FUn(e,n,t,c.signal).then(async({text:u,partial:h})=>({source:await PUn(u,s,c.signal),partial:h})).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(St,{})," ",CL()]}):_.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:Zqe()}),_.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:iUe({name:Ce(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function qUn({overleaf:e}){var f;const n=T.useRef(null),{open:t,setOpen:r,ref:s}=Ki(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,h=u?I3():c?Mvt():!e.hasToken||!e.link?W2t():e.syncing?UL():e.blocked?qL():PL();return T.useEffect(()=>{c&&r(!0)},[c,r]),T.useEffect(()=>{u&&Zt(I3(),"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=b=>{var y;b.target instanceof Node&&!((y=s.current)!=null&&y.contains(b.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(It,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":h,"data-tip-align":"end","aria-label":wJ({status:h}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?_.jsx(St,{}):_.jsx(UCn,{size:13,className:u||c?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&si.createPortal(_.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":lI(),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(It,{size:"small","aria-label":bqe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:_.jsx(xr,{size:13})})}),_.jsx(WUn,{overleaf:e})]}),document.body)]})}const L1=e=>_a(new Intl.ListFormat(E()).format(e.map(Ce)));function UUn(e){if(e.error)return bbt();if(e.syncing)return UL();if(e.blocked)return qL();const n=e.last;return n?n.pulled.length&&n.pushed.length?o2t({pulled:L1(n.pulled),pushed:L1(n.pushed)}):n.pulled.length?e2t({paths:L1(n.pulled)}):n.pushed.length?h2t({paths:L1(n.pushed)}):n.conflicts.length?yyt():PL():Pxt()}function GUn({href:e}){return _.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:HL()})}function KUn(e){return e.state==="live"?Pbt():e.state==="connecting"?Mbt():e.error??eyt()}function AM({overleaf:e,replacing:n}){const[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(!1),[c,u]=T.useState(null),h=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?owt():n?x2t():Jvt();return _.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsx("p",{className:"text-sm text-subtext",children:f}),a&&_.jsx(Br,{className:"basis-full min-w-0","aria-label":L3(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:L3(),autoComplete:"off"}),_.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&_.jsx(St,{}),a?_.jsx(Ie,{type:"button",disabled:s||!t.trim(),onClick:()=>h(()=>e.saveSession(t.trim())),children:s?Sa():Evt()}):_.jsx(Ie,{type:"button",disabled:s,onClick:()=>h(e.importSession),children:abt()}),_.jsx(Ie,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?FL():Vxt()})]}),c&&_.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:c})]})}function VUn({overleaf:e}){if(!e.hasSession)return _.jsx(AM,{overleaf:e});const n=e.live;if(!n)return _.jsx("p",{className:"text-sm text-subtext",children:oyt()});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:KUn(n)})]}),n.note&&_.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&_.jsx("div",{children:_.jsx(Ie,{onClick:e.retryLive,children:Vbt()})}),t&&_.jsx(AM,{overleaf:e,replacing:!0})]})}function WUn({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)},h=!e.hasToken||o;async function f(k){k.preventDefault();const v=n.trim();if(!(r||!v)){s(!0),a(null);try{h?(await e.saveToken(v),c(!1)):await e.linkProject(v),t("")}catch(b){a(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!h){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(St,{}),e.error?I3():UUn(e)]}),e.error&&_.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),_.jsx(VUn,{overleaf:e}),_.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[_.jsx(Ie,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?z2t():((m=e.live)==null?void 0:m.state)==="live"?ywt():void 0,onClick:()=>e.sync(),children:e.error?ni():dxt()}),_.jsxs(jh,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[ext()," ",_.jsx(mf,{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})," ",Pyt()]}),_.jsxs("div",{className:"flex flex-wrap gap-2",children:[_.jsx(Ie,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"keep-local"}),children:Vyt()}),_.jsx(Ie,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"take-overleaf"}),children:Mxt()})]})]},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:RS()})}),_.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[_.jsx(Ie,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:Vz()}),_.jsx(jh,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:HL()}),_.jsx(Ie,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(v=>{a(v instanceof Error?v.message:String(v))}),children:yxt()})]})]})]})}return _.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:f,children:[_.jsx("div",{className:"pe-8 text-sm text-subtext",children:h?Mwt():Pwt()}),_.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[_.jsx(Br,{className:"basis-full min-w-0","aria-label":h?Gz():Kz(),"aria-invalid":!!i,type:h?"password":"text",value:n,onChange:k=>t(k.target.value),placeholder:h?Gz():"https://www.overleaf.com/project/…",autoComplete:"off"}),_.jsx(Ie,{type:"submit",disabled:r||!n.trim(),children:r?h?Sa():ya():h?F2t():Ebt()}),_.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:h?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:h?Pvt():Kz()})]}),(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(GUn,{href:e.uploadUrl}),o?_.jsx(Ie,{variant:"ghost",type:"button",onClick:()=>c(!1),children:FL()}):e.hasToken&&_.jsx(Ie,{variant:"ghost",type:"button",onClick:u,children:Vz()})]})]})}function QUn({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(It,{"data-tip":n==="copied"?uf():n==="select"?IKe():dHe(),"aria-label":MHe(),onClick:()=>void s(),children:n==="copied"?_.jsx(bi,{size:13}):_.jsx(Yu,{size:13})})]})}function XUn(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 YUn({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:c,onScrollPositionChange:u,lineScrollRequest:h,onLineScrollRequestHandled:f,onEdit:p,artifactVersion:m,artifactEntries:w=[],bufferSession:k,remote:v=!1,restored:b=!1,onRestoreActivated:y,showSource:x=!1,onShowSourceChange:C}){var As,Fr;const N=H6(e,n,t??"repo",r,s),j=ut({...N,enabled:!k.saving}),A=j.data??null,z=((As=j.error)==null?void 0:As.message)??null,M=We=>{Vr(N.queryKey,vt=>(typeof We=="function"?We(vt??null):We)??void 0)},[D,I]=T.useState(0),B=t==="artifacts",G=t==="abs",U=VC(n),Q=qq(n),V=Gqn(n),Z=U||V,[J,$]=T.useState(!1),L=!b||J,q=()=>{$(!0),y==null||y()};T.useSyncExternalStore(k.subscribe,k.getRevision);const P=k.getSnapshot(),F=k.set,re=k.saving,ie=k.setSaving,ue=k.saveRevision,se=k.saveError,K=k.setSaveError,oe=T.useRef(null),ce=T.useRef(null),[pe,ve]=T.useState(!1),[Me,Fe]=T.useState(null),Ye=T.useRef(c),Te=(A==null?void 0:A.file)??null,$e=P&&nl(P)?P.path:(A==null?void 0:A.source)==="checkout"?A.file.path:n,yt=$e.split("/").slice(0,-1).join("/"),ot=(A==null?void 0:A.source)==="artifact",Mt=T.useCallback(We=>{var vt;return((vt=q5(yt,We,G))==null?void 0:vt.path)??null},[G,yt]),jt=T.useCallback(We=>G?DI(We):ot?df(e,We):K3(e,We,{sessionId:r,ref:s}),[ot,s,G,e,r]),Pt=T.useCallback(We=>{if(pC(We))return We;const vt=q5(yt,We,G);return vt?mOn(jt(vt.path),vt):null},[G,yt,jt]),Le=Kq(Te==null?void 0:Te.presentation),nt=(A==null?void 0:A.source)==="artifact"&&!B,ke=B&&(A==null?void 0:A.source)==="checkout",me=!s&&(A==null?void 0:A.source)==="checkout"&&Te!=null&&!Te.notFound,je=r!=null&&(A==null?void 0:A.source)==="checkout"&&A.file.root==="clone",qe=me&&Te!=null&&!Te.binary&&!Te.truncated&&!Le&&!je,rt=qe&&Te.version===void 0,dt=P!==null&&nl(P),st=!rt&&(qe&&typeof Te.version=="string"||dt),Ut=(P==null?void 0:P.draft)??Ak((Te==null?void 0:Te.content)??""),Xt=(P==null?void 0:P.baseline)??Ak((Te==null?void 0:Te.content)??""),en=st&&P!==null&&nl(P),an=P!==null&&!dt&&typeof(Te==null?void 0:Te.version)=="string"&&P.version!==Te.version,At=j.isFetching||an?void 0:h,gn=async We=>{const vt=k.getSnapshot();if(!st||!vt||!nl(vt))return!0;if(k.saving)return!1;if(vt.conflict&&We===void 0)return K(vt.conflict.exists?fz():pz()),!1;const fr=vt.draft,yn=zUn(vt);ie(!0),K(null);try{await tt.cancelQueries(N);const Hn=await E3n(e,$e,yn,{sessionId:r,expectedVersion:We??vt.version});return k.getSnapshot()?(k.saved(fr,Hn.version),M(Fn=>Fn&&Fn.source==="checkout"?{source:"checkout",file:{...Fn.file,content:yn,version:Hn.version}}:Fn),!0):!1}catch(Hn){if(Hn instanceof U3){const Zn=k.getSnapshot();return!Zn||!nl(Zn)||F({...Zn,conflict:{currentVersion:Hn.currentVersion,exists:Hn.exists}}),!1}return K(Hn instanceof Error?Hn.message:String(Hn)),!1}finally{ie(!1)}},on=Q&&me&&!je,Ot=TUn({projectId:e,filePath:$e,sessionId:r,enabled:on,autoRun:L,onManualAction:q,ready:Te!=null&&!Te.notFound,source:st?Ut:(Te==null?void 0:Te.content)??""}),dn=DUn({projectId:e,filePath:$e,sessionId:r,enabled:on,autoRun:L,onManualAction:q,savedSource:Xt,dirty:en,onPulled:T.useCallback(We=>{We.includes($e)&&I(vt=>vt+1)},[$e])}),cn=Q&&Ot.showPdf&&Ot.compiled!=null,kn=rt&&dt,Wn=(st||kn)&&!(Z&&!x)&&!cn,gs=Te!==null&&!Te.notFound&&!Te.binary&&!Le&&!cn,ns=gs&&!Wn&&(!V||x),gt=async()=>{if(Te)try{if(Te.truncated&&!Wn){const We=fetch(jt($e)).then(async vt=>{if(!vt.ok)throw new Error;return new Blob([await vt.text()],{type:"text/plain"})});await navigator.clipboard.write([new ClipboardItem({"text/plain":We})])}else await navigator.clipboard.writeText(Wn?Ut:Te.content);ve(!0),window.setTimeout(()=>ve(!1),1500)}catch{Zt(EHe(),"error")}},ln=We=>{if(!We.metaKey&&!We.ctrlKey||We.altKey||We.shiftKey||We.key.toLowerCase()!=="a"||!(We.target instanceof Node)||!We.currentTarget.contains(We.target))return;const vt=ce.current;if(!vt)return;We.preventDefault();const fr=document.createRange();fr.selectNodeContents(vt);const yn=window.getSelection();yn==null||yn.removeAllRanges(),yn==null||yn.addRange(fr)},bn=Ot.compiled?`${K3(e,Ot.compiled.path,{sessionId:r})}&v=${Ot.compiled.version}`:null,un=bn?`${bn}&view=${Ot.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,_r=Ot.compiled?Ot.compiled.path.split("/").pop()??Ot.compiled.path:null,Mn=async()=>{en&&!await gn()||Q&&Ot.engine&&Ot.compile()},Qn=async()=>{en&&(L?await Mn():await gn())},ar=XUn(()=>z3n(e,$e,{sessionId:r})),wt=v?gGe():Te!=null&&Te.notFound?Lv():s?wS({branch:Ce(s)}):me?null:SGe(),Ht=T.useCallback(()=>{k.saving||I(We=>We+1)},[k]),vr=()=>{F(null),K(null),Ht()},Pn=Wq(jt($e),!s&&!re);T.useEffect(()=>{if(!z||s)return;const We=window.setInterval(()=>{document.visibilityState!=="hidden"&&Ht()},2e3);return()=>window.clearInterval(We)},[z,s,Ht]);const Qr=`${jt($e)}&v=${encodeURIComponent(Pn??m??"")}&reload=${D}`;T.useEffect(()=>{var yn,Hn;if(!A||k.saving)return;const We=A,vt=k.getSnapshot();if(vt&&nl(vt)){const Zn=We.source==="checkout"?We.file:null,Fn=Zn!==null&&Zn.path===vt.path&&(!r||Zn.root==="worktree"),Yr=jUn(vt,Fn&&typeof Zn.version=="string"?Zn.version:null,Fn&&!Zn.notFound);Yr&&(Yr.currentVersion!==((yn=vt.conflict)==null?void 0:yn.currentVersion)||Yr.exists!==((Hn=vt.conflict)==null?void 0:Hn.exists))?F({...vt,conflict:Yr}):!Yr&&vt.conflict&&F({...vt,conflict:null})}(!vt||!nl(vt)&&(vt.version!==We.file.version||vt.path!==We.file.path))&&We.source==="checkout"&&!We.file.notFound&&!We.file.binary&&!We.file.truncated&&typeof We.file.version=="string"&&(F(EM(We.file.path,We.file.content,We.file.version)),K(null))},[A,k,r,re,ue,P]);const Xn=JSON.stringify(N.queryKey),Yn=T.useRef({sourceKey:Xn,nonce:D,artifactVersion:m,diskVersion:Pn});T.useEffect(()=>{const We=Yn.current;Yn.current={sourceKey:Xn,nonce:D,artifactVersion:m,diskVersion:Pn},We.sourceKey===Xn&&(We.nonce!==D||We.diskVersion!==null&&We.diskVersion!==Pn||We.artifactVersion!=null&&We.artifactVersion!==m)&&WEn(e,n,t??"repo",r,s)},[Xn,D,m,Pn,e,n,t,r,s]),T.useLayoutEffect(()=>{const We=oe.current,vt=Ye.current;!We||!Te||!vt||(We.scrollTop=vt.top,We.scrollLeft=vt.left)},[Te]);const Xr=We=>{if(We.source==="absolute")return $Ue();if(B)return SUe({root:r?o1():a1()});if(s)return TUe({branch:Ce(s)});if(r&&We.source==="checkout"&&We.file.root==="clone")return LVe();const vt=We.source==="checkout"?We.file.root:We.checkoutRoot;return GUe({root:vt==="worktree"?o1():a1()})};return _.jsx(uy,{value:A?k5(A,r,s):{sessionId:r,ref:s},children:_.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",onKeyDown:ln,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(wf,{name:$e}),_.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ce($e),children:$e.split("/").pop()||$e}),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:HX({branch:Ce(a)}),children:[_.jsx(Im,{size:11}),a]}),Wn&&(re||en||se)&&_.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${se?"text-accent-red":"text-muted"}`,title:se??(re?Sa():wVe()),children:re?_.jsxs(_.Fragment,{children:[_.jsx(St,{})," ",AKe()]}):se?kKe():EL()}),_.jsx("div",{ref:Fe,className:"contents"}),Q&&Ot.compiled&&_.jsx(It,{size:"small",active:!Ot.showPdf,"data-tip":Ot.stale&&Ot.showPdf?GGe():Ot.showPdf?Pd():yz(),"data-tip-align":"end","aria-label":Ot.showPdf?Pd():yz(),onClick:()=>Ot.setShowPdf(!Ot.showPdf),children:Ot.showPdf?_.jsx(f5,{size:13}):_.jsx(Qb,{size:13,className:Ot.stale?"text-accent-amber":void 0})}),Q&&bn&&_r&&_.jsx(Wh,{size:"small","data-tip":Ot.stale?Rqe({name:Ce(_r)}):Mv({name:Ce(_r)}),"data-tip-align":"end","aria-label":Mv({name:Ce(_r)}),href:bn,download:_r,children:_.jsx(Wb,{size:13,className:Ot.stale?"text-accent-amber":void 0})}),on&&_.jsx(qUn,{overleaf:dn}),Q&&me&&_.jsx(It,{size:"small","data-tip":Ot.compiled?bz():dz(),"data-tip-align":"end","aria-label":Ot.compiled?bz():dz(),disabled:Ot.compiling||!Ot.engine,onClick:()=>void Mn(),children:Ot.compiling?_.jsx(St,{}):_.jsx(e7n,{size:13})}),Z&&_.jsx(It,{size:"small",active:x,"data-tip":x?Dv():Pd(),"data-tip-align":"end","aria-label":x?Dv():Pd(),onClick:()=>C==null?void 0:C(!x),children:_.jsx(f5,{size:13})}),gs&&_.jsx(It,{size:"small","data-tip":pe?uf():hz(),"data-tip-align":"end","aria-label":pe?uf():hz(),onClick:()=>void gt(),children:pe?_.jsx(bi,{size:13}):_.jsx(Yu,{size:13})}),Te!=null&&_.jsx(_.Fragment,{children:_.jsx(It,{size:"small","data-tip":wt??ar.error??vz(),"data-tip-align":"end","aria-label":vz(),"aria-description":wt??void 0,disabled:ar.busy||wt!=null,onClick:()=>void ar.trigger(),children:ar.busy?_.jsx(St,{}):_.jsx(mf,{size:13})})})]}),A&&!A.file.notFound&&_.jsx(XC,{projectId:e,request:k5(A,r,s),remote:v}),!z&&ke&&(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:ZUe({root:A.file.root==="worktree"?o1():a1()})}),rt&&_.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:jVe()}),z&&Te!==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:[gz()," ",Ce(z)]}),(P==null?void 0:P.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:P.conflict.exists?fz():pz()}),((Fr=P==null?void 0:P.conflict)==null?void 0:Fr.exists)&&P.conflict.currentVersion&&_.jsx(Ie,{disabled:re,onPointerDown:We=>We.preventDefault(),onClick:()=>{var We;return void gn(((We=P.conflict)==null?void 0:We.currentVersion)??void 0)},children:$Ge()}),_.jsx(Ie,{disabled:re,onPointerDown:We=>We.preventDefault(),onClick:vr,children:uKe()})]}),(Ot.error||Ot.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 ${Ot.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Ot.error??(Ot.builtWithErrors?aHe():VFe())}),_.jsx(It,{"data-tip":iqe(),"data-tip-align":"end","aria-label":fqe(),onClick:Ot.dismiss,children:_.jsx(xr,{size:13})})]}),Ot.log&&_.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Ot.log})]}),on&&dn.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:TGe()}),_.jsx(Ie,{onClick:()=>{dn.reloaded(),I(We=>We+1)},children:KHe()})]}),Q&&me&&Ot.engine===null&&Ot.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:[Ot.installHint,Ot.installCommand&&_.jsx(QUn,{command:Ot.installCommand})]}),Ot.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:Ot.note}),cn&&Ot.stale&&_.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:nVe()}),_.jsxs("div",{ref:oe,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",tabIndex:ns?0:void 0,onScroll:We=>{const vt={top:Math.max(0,We.currentTarget.scrollTop),left:Math.max(0,We.currentTarget.scrollLeft)};Ye.current=vt,u==null||u(vt)},children:[!Wn&&!z&&!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:lVe()}),!Wn&&!z&&(A==null?void 0:A.source)==="artifact"&&!A.file.notFound&&nt&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:NFe({root:A.checkoutRoot==="worktree"?o1():a1()})}),z&&Te===null?_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[gz()," ",Ce(z)]}):Te===null?_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:CL()}):Wn?_.jsx(OB,{value:Ut,onChange:We=>{const vt=k.getSnapshot()??(Te&&typeof Te.version=="string"?EM(Te.path,Te.content,Te.version):null);vt&&F(NUn(vt,We)),p==null||p(),se&&K(null)},onSave:()=>void Qn(),onBlur:()=>{jk||Qn()},readOnly:kn,path:n,highlightLine:i,scrollRequest:At,onScrollRequestHandled:f,scrollPosition:Ye.current,onScrollPositionChange:We=>{Ye.current=We,u==null||u(We)}}):Te.notFound?_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:A?Xr(A):Lv()}):Le?_.jsx(yb.Provider,{value:Me,children:_.jsx(zk,{kind:Le,url:Qr,name:n.split("/").pop()??n})}):Te.binary?_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[OFe()," ",_.jsx("a",{href:Qr,download:n.split("/").pop()??n,children:SL()})]}):cn&&un&&_r?_.jsx(yb.Provider,{value:Me,children:_.jsx(zk,{kind:"pdf",url:un,name:_r,download:!1},un)}):U&&!x?_.jsx("div",{ref:ce,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:ot?_.jsx(Jq,{projectId:e,folder:yt,markdown:Te.content,entries:w}):_.jsx(_c,{text:Te.content,resolveFilePath:Mt,resolveImageSrc:Pt,onOpenFile:o&&((We,vt,fr,yn,Hn)=>o(We,r,s,Hn))})}):V&&!x?_.jsx(HUn,{html:Te.content,truncated:Te.truncated,url:Qr,name:$e,resolveSrc:Pt}):_.jsxs(_.Fragment,{children:[_.jsx("div",{ref:ce,children:_.jsx(Gq,{text:Te.content,path:n,highlightLine:i,scrollRequest:At,onScrollRequestHandled:f})}),Te.truncated&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Gqe()})]})]})]})})}const B4=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function ZUn({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:i,setOpen:a,ref:o}=Ki(),c=T.useRef(null);return T.useEffect(()=>{if(!i)return;const u=h=>{var f;h.key==="Escape"&&((f=c.current)==null||f.focus())};return document.addEventListener("keydown",u,!0),()=>document.removeEventListener("keydown",u,!0)},[i]),_.jsx("div",{className:"rail-brand px-3 py-1.5 border-b border-border shrink-0",children:_.jsxs("div",{className:"project-switcher relative min-w-0",ref:o,children:[_.jsxs("div",{className:"flex h-7 items-center justify-between gap-1 px-0.5",children:[_.jsx(It,{size:"small",className:"project-back text-text","aria-label":wz(),onClick:n,children:_.jsx(B0,{size:18})}),_.jsx("span",{className:"brand-project-label flex-1 text-xs font-medium tracking-wide uppercase text-subtext",children:RL()}),s&&_.jsx(It,{size:"small","data-tip":kz(),"data-tip-align":"end","aria-label":kz(),onClick:s,children:_.jsx(P$,{size:18})})]}),_.jsxs("button",{ref:c,className:`brand group flex h-8 w-full min-w-0 items-center gap-2 rounded-md px-2 text-start text-text hover:bg-surface focus-visible:outline-2 focus-visible:outline-text ${i?"open bg-surface":""}`,onClick:()=>a(u=>!u),"aria-expanded":i,children:[_.jsx("span",{className:"brand-project min-w-0 flex-1 truncate text-xl font-semibold",children:e}),_.jsx(mc,{className:`project-chevron shrink-0 text-muted transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100 ${i?"rotate-180 opacity-100":"opacity-0"}`,size:14})]}),i&&_.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 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 project-menu w-52.5 z-70",children:[_.jsx(vn,{onClick:()=>{a(!1),r()},children:_.jsxs("span",{className:B4,children:[_.jsx(D$,{size:14}),YYe()]})}),_.jsx(vn,{onClick:()=>{a(!1),n()},children:_.jsxs("span",{className:B4,children:[_.jsx(I$,{size:14}),wz()]})}),_.jsx(vn,{onClick:()=>{var u;(u=c.current)==null||u.focus(),a(!1),t()},children:_.jsxs("span",{className:B4,children:[_.jsx(c7n,{size:14}),sZe()]})})]})]})})}function JUn(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 h=(n.get(c)??[]).some(f=>f.archived||i(f.id));return r.set(c,h),h}function a(c){const u=s.get(c);if(u!==void 0)return u;const h=(n.get(c)??[]).some(f=>!f.archived||a(f.id));return s.set(c,h),h}const o=new Map;for(const c of e){let u=!1,h=!1,f=c.parentExperimentId?t.get(c.parentExperimentId):void 0;for(;f;)f.archived?h=!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&&h,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=Ki(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)},h=(f,p)=>{a.setOpen(!1),r(e,f,p)};return _.jsxs("div",{className:"nodrag ms-auto shrink-0",children:[s?_.jsx(It,{type:"button",ref:i,size:"small",className:"node-action","aria-label":vj({name:n}),"aria-expanded":a.open,onClick:u,children:_.jsx(Lm,{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":vj({name:n}),"aria-expanded":a.open,onClick:u,children:s1n()}),a.open&&si.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(vn,{onClick:()=>h("ancestors",!0),children:Ugn()}),t.archiveOnly&&_.jsx(vn,{onClick:()=>h("only",!0),children:g1n()}),t.archiveDown&&_.jsx(vn,{onClick:()=>h("descendants",!0),children:Ygn()}),t.restoreOnly&&_.jsx(vn,{onClick:()=>h("only",!1),children:EI()}),t.restoreAbove&&_.jsx(vn,{onClick:()=>h("ancestors",!1),children:gvn()}),t.restoreDown&&_.jsx(vn,{onClick:()=>h("descendants",!1),children:Tvn()})]}),document.body)]})}function eGn({runs:e,experiments:n,archiveActions:t,emptyHint:r,onOpen:s,onOpenLogs:i,onOpenCode:a,onArchive:o,onCancel:c}){const[u,h]=T.useState(new Set),[f,p]=T.useState(null),m=new Map;for(const v of e){const b=m.get(v.experimentId);b?b.push(v):m.set(v.experimentId,[v])}for(const v of m.values())v.sort((b,y)=>y.createdAt-b.createdAt);const w=[...n].sort((v,b)=>{var C,N,j,A;const y=((N=(C=m.get(v.id))==null?void 0:C[0])==null?void 0:N.createdAt)??v.createdAt;return(((A=(j=m.get(b.id))==null?void 0:j[0])==null?void 0:A.createdAt)??b.createdAt)-y});if(w.length===0)return _.jsx(QC,{icon:Ah,title:r??P$e(),description:r?void 0:E$e()});async function k(v){p(null),h(b=>new Set(b).add(v));try{await c(v)}catch(b){h(y=>{const x=new Set(y);return x.delete(v),x}),p(b instanceof Error?b.message:String(b))}}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:[tPe()," ",f]}),_.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":HBe(),children:w.map(v=>{const b=m.get(v.id)??[],y=b[0]??null,x=b.find(A=>A.status==="running"||A.status==="starting"),C=x??y,N=!!(x&&(x.cancelRequested||u.has(x.id))),j=x?N?"cancelling":pa(x):y?pa(y):"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",...Wr(A=>s(v,A),{stopPropagation:!0}),children:v.title||v.slug}),v.archived&&_.jsx("span",{className:"text-muted text-xs",children:CI()}),_.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(Im,{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(ml,{status:j})}),_.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:_.jsx("span",{children:b.length===1?eBe():hBe({count:Jt(b.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:y?vo(y.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":zX({name:v.title||v.slug}),onClick:A=>A.stopPropagation(),onDoubleClick:A=>A.stopPropagation(),onAuxClick:A=>A.stopPropagation(),children:[_.jsxs(Ie,{size:"small",disabled:!C,title:C?oBe():M$e(),...Wr(A=>{C&&i(v.id,C.id,A)},{stopPropagation:!0}),children:[_.jsx(bo,{size:15}),A3()]}),_.jsxs(Ie,{size:"small",title:rL({branch:Ce(v.branchName)}),...Wr(A=>a(v.id,A),{stopPropagation:!0}),children:[_.jsx(Xb,{size:15}),DBe()]}),x&&_.jsxs(Ie,{size:"small",variant:"danger",disabled:N,title:N?xBe():zBe(),onClick:()=>void k(x.id),children:[_.jsx(T$,{size:15}),N?jTe():bL()]}),_.jsx(oU,{id:v.id,name:v.title||v.slug,actions:t.get(v.id),onArchive:o})]})]},v.id)})})]})}function tGn({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(mgn())).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,h=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(h()[0]??c).focus();const f=p=>{if(p.key!=="Tab")return;const m=h();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()}},[]),si.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(It,{className:"absolute end-3.5 top-3.5","aria-label":q3(),onClick:()=>o(()=>e("dismiss")),disabled:t,children:_.jsx(xr,{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(s6,{})}),_.jsxs("div",{children:[_.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:Hmn()}),_.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:Agn()})]})]}),_.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[_.jsxs("p",{dir:"auto",children:[kgn()," ",_.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:ngn()}),wmn()]}),_.jsx("p",{dir:"auto",children:Qmn()})]}),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(Ie,{onClick:()=>o(n),disabled:t,children:Dmn()}),_.jsx(Ie,{variant:"primary",onClick:()=>o(()=>e("explore_demo")),disabled:t,children:t?Sa():lgn()})]})]})}),document.body)}function ms(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Zy(){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}})}pv.prototype=Zy.prototype={constructor:pv,on:function(e,n){var t=this._,r=rGn(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)),RM.hasOwnProperty(n)?{space:RM[n],local:e}:e}function iGn(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===Tk&&n.documentElement.namespaceURI===Tk?n.createElement(e):n.createElementNS(t,e)}}function aGn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function cU(e){var n=Jy(e);return(n.local?aGn:iGn)(n)}function oGn(){}function YC(e){return e==null?oGn:function(){return this.querySelector(e)}}function cGn(e){typeof e!="function"&&(e=YC(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=x&&(x=y+1);!(N=v[x])&&++x=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function MGn(e){e||(e=OGn);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 DGn(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function LGn(){return Array.from(this)}function IGn(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?WGn:typeof n=="function"?XGn:QGn)(e,n,t??"")):Ph(this.node(),e)}function Ph(e,n){return e.style.getPropertyValue(n)||dU(e).getComputedStyle(e,null).getPropertyValue(n)}function ZGn(e){return function(){delete this[e]}}function JGn(e,n){return function(){this[e]=n}}function eKn(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function tKn(e,n){return arguments.length>1?this.each((n==null?ZGn:typeof n=="function"?eKn:JGn)(e,n)):this.node()[e]}function hU(e){return e.trim().split(/^|\s+/)}function ZC(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=ZC(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function jKn(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function Rk(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:c,dy:u,dispatch:h}){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:h}})}Rk.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function BKn(e){return!e.ctrlKey&&!e.button}function PKn(){return this.parentNode}function FKn(e,n){return n??{x:e.x,y:e.y}}function HKn(){return navigator.maxTouchPoints||"ontouchstart"in this}function wU(){var e=BKn,n=PKn,t=FKn,r=HKn,s={},i=Zy("start","drag","end"),a=0,o,c,u,h,f=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",v).on("touchmove.drag",b,$Kn).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(h||!e.call(this,C,N))){var j=x(this,n.call(this,C,N),C,N,"mouse");j&&(fa(C.view).on("mousemove.drag",w,rm).on("mouseup.drag",k,rm),yU(C.view),P4(C),u=!1,o=C.clientX,c=C.clientY,j("start",C))}}function w(C){if(sh(C),!u){var N=C.clientX-o,j=C.clientY-c;u=N*N+j*j>f}s.mouse("drag",C)}function k(C){fa(C.view).on("mousemove.drag mouseup.drag",null),xU(C.view,u),sh(C),s.mouse("end",C)}function v(C,N){if(e.call(this,C,N)){var j=C.changedTouches,A=n.call(this,C,N),z=j.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?$1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?$1(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=UKn.exec(e))?new Ui(n[1],n[2],n[3],1):(n=GKn.exec(e))?new Ui(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=KKn.exec(e))?$1(n[1],n[2],n[3],n[4]):(n=VKn.exec(e))?$1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=WKn.exec(e))?BM(n[1],n[2]/100,n[3]/100,1):(n=QKn.exec(e))?BM(n[1],n[2]/100,n[3]/100,n[4]):MM.hasOwnProperty(e)?LM(MM[e]):e==="transparent"?new Ui(NaN,NaN,NaN,0):null}function LM(e){return new Ui(e>>16&255,e>>8&255,e&255,1)}function $1(e,n,t,r){return r<=0&&(e=n=t=NaN),new Ui(e,n,t,r)}function ZKn(e){return e instanceof Qm||(e=kf(e)),e?(e=e.rgb(),new Ui(e.r,e.g,e.b,e.opacity)):new Ui}function Mk(e,n,t,r){return arguments.length===1?ZKn(e):new Ui(e,n,t,r??1)}function Ui(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}JC(Ui,Mk,kU(Qm,{brighter(e){return e=e==null?wb:Math.pow(wb,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sm:Math.pow(sm,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ui(of(this.r),of(this.g),of(this.b),kb(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:IM,formatHex:IM,formatHex8:JKn,formatRgb:$M,toString:$M}));function IM(){return`#${F_(this.r)}${F_(this.g)}${F_(this.b)}`}function JKn(){return`#${F_(this.r)}${F_(this.g)}${F_(this.b)}${F_((isNaN(this.opacity)?1:this.opacity)*255)}`}function $M(){const e=kb(this.opacity);return`${e===1?"rgb(":"rgba("}${of(this.r)}, ${of(this.g)}, ${of(this.b)}${e===1?")":`, ${e})`}`}function kb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function of(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function F_(e){return e=of(e),(e<16?"0":"")+e.toString(16)}function BM(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new _o(e,n,t,r)}function SU(e){if(e instanceof _o)return new _o(e.h,e.s,e.l,e.opacity);if(e instanceof Qm||(e=kf(e)),!e)return new _o;if(e instanceof _o)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 _o(a,o,c,e.opacity)}function eVn(e,n,t,r){return arguments.length===1?SU(e):new _o(e,n,t,r??1)}function _o(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}JC(_o,eVn,kU(Qm,{brighter(e){return e=e==null?wb:Math.pow(wb,e),new _o(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sm:Math.pow(sm,e),new _o(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 Ui(F4(e>=240?e-240:e+120,s,r),F4(e,s,r),F4(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new _o(PM(this.h),B1(this.s),B1(this.l),kb(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=kb(this.opacity);return`${e===1?"hsl(":"hsla("}${PM(this.h)}, ${B1(this.s)*100}%, ${B1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function PM(e){return e=(e||0)%360,e<0?e+360:e}function B1(e){return Math.max(0,Math.min(1,e||0))}function F4(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 e7=e=>()=>e;function tVn(e,n){return function(t){return e+t*n}}function nVn(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 rVn(e){return(e=+e)==1?CU:function(n,t){return t-n?nVn(n,t,e):e7(isNaN(n)?t:n)}}function CU(e,n){var t=n-e;return t?tVn(e,t):e7(isNaN(e)?n:e)}const Sb=(function e(n){var t=rVn(n);function r(s,i){var a=t((s=Mk(s)).r,(i=Mk(i)).r),o=t(s.g,i.g),c=t(s.b,i.b),u=CU(s.opacity,i.opacity);return function(h){return s.r=a(h),s.g=o(h),s.b=c(h),s.opacity=u(h),s+""}}return r.gamma=e,r})(1);function sVn(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:tc(r,s)})),t=H4.lastIndex;return t180?h+=360:h-u>180&&(u+=360),p.push({i:f.push(s(f)+"rotate(",null,r)-2,x:tc(u,h)})):h&&f.push(s(f)+"rotate("+h+r)}function o(u,h,f,p){u!==h?p.push({i:f.push(s(f)+"skewX(",null,r)-2,x:tc(u,h)}):h&&f.push(s(f)+"skewX("+h+r)}function c(u,h,f,p,m,w){if(u!==f||h!==p){var k=m.push(s(m)+"scale(",null,",",null,")");w.push({i:k-4,x:tc(u,f)},{i:k-2,x:tc(h,p)})}else(f!==1||p!==1)&&m.push(s(m)+"scale("+f+","+p+")")}return function(u,h){var f=[],p=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,f,p),a(u.rotate,h.rotate,f,p),o(u.skewX,h.skewX,f,p),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,p),u=h=null,function(m){for(var w=-1,k=p.length,v;++w=0&&e._call.call(void 0,n),e=e._next;--Fh}function qM(){Sf=(Eb=am.now())+ex,Fh=d0=0;try{bVn()}finally{Fh=0,xVn(),Sf=0}}function yVn(){var e=am.now(),n=e-Eb;n>jU&&(ex-=n,Eb=e)}function xVn(){for(var e,n=Cb,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:Cb=t);h0=e,Lk(r)}function Lk(e){if(!Fh){d0&&(d0=clearTimeout(d0));var n=e-Sf;n>24?(e<1/0&&(d0=setTimeout(qM,e-am.now()-ex)),a0&&(a0=clearInterval(a0))):(a0||(Eb=am.now(),a0=setInterval(yVn,jU)),Fh=1,AU(qM))}}function UM(e,n,t){var r=new Nb;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var wVn=Zy("start","end","cancel","interrupt"),kVn=[],RU=0,GM=1,Ik=2,gv=3,KM=4,$k=5,vv=6;function tx(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;SVn(e,t,{name:n,index:r,group:s,on:wVn,tween:kVn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:RU})}function n7(e,n){var t=xo(e,n);if(t.state>RU)throw new Error("too late; already scheduled");return t}function wc(e,n){var t=xo(e,n);if(t.state>gv)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 SVn(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=TU(i,0,t.time);function i(u){t.state=GM,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var h,f,p,m;if(t.state!==GM)return c();for(h in r)if(m=r[h],m.name===t.name){if(m.state===gv)return UM(a);m.state===KM?(m.state=vv,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[h]):+hIk&&r.state<$k,r.state=vv,r.timer.stop(),r.on.call(s?"interrupt":"cancel",e,e.__data__,r.index,r.group),delete t[a]}i&&delete e.__transition}}function CVn(e){return this.each(function(){bv(this,e)})}function EVn(e,n){var t,r;return function(){var s=wc(this,e),i=s.tween;if(i!==t){r=t=i;for(var a=0,o=r.length;a=0&&(n=n.slice(0,t)),!n||n==="start"})}function eWn(e,n,t){var r,s,i=JVn(n)?n7:wc;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function tWn(e,n){var t=this._id;return arguments.length<2?xo(this.node(),t).on.on(e):this.each(eWn(t,e,n))}function nWn(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function rWn(){return this.on("end.remove",nWn(this._id))}function sWn(e){var n=this._name,t=this._id;typeof e!="function"&&(e=YC(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function jWn(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 hl(e,n,t){this.k=e,this.x=n,this.y=t}hl.prototype={constructor:hl,scale:function(e){return e===1?this:new hl(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new hl(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 nx=new hl(1,0,0);LU.prototype=hl.prototype;function LU(e){for(;!e.__zoom;)if(!(e=e.parentNode))return nx;return e.__zoom}function q4(e){e.stopImmediatePropagation()}function o0(e){e.preventDefault(),e.stopImmediatePropagation()}function AWn(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function TWn(){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 VM(){return this.__zoom||nx}function RWn(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function MWn(){return navigator.maxTouchPoints||"ontouchstart"in this}function OWn(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=AWn,n=TWn,t=OWn,r=RWn,s=MWn,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,c=mv,u=Zy("start","zoom","end"),h,f,p,m=500,w=150,k=0,v=10;function b(U){U.property("__zoom",VM).on("wheel.zoom",z,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",I).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(U,Q,V,Z){var J=U.selection?U.selection():U;J.property("__zoom",VM),U!==J?N(U,Q,V,Z):J.interrupt().each(function(){j(this,arguments).event(Z).start().zoom(null,typeof Q=="function"?Q.apply(this,arguments):Q).end()})},b.scaleBy=function(U,Q,V,Z){b.scaleTo(U,function(){var J=this.__zoom.k,$=typeof Q=="function"?Q.apply(this,arguments):Q;return J*$},V,Z)},b.scaleTo=function(U,Q,V,Z){b.transform(U,function(){var J=n.apply(this,arguments),$=this.__zoom,L=V==null?C(J):typeof V=="function"?V.apply(this,arguments):V,q=$.invert(L),P=typeof Q=="function"?Q.apply(this,arguments):Q;return t(x(y($,P),L,q),J,a)},V,Z)},b.translateBy=function(U,Q,V,Z){b.transform(U,function(){return t(this.__zoom.translate(typeof Q=="function"?Q.apply(this,arguments):Q,typeof V=="function"?V.apply(this,arguments):V),n.apply(this,arguments),a)},null,Z)},b.translateTo=function(U,Q,V,Z,J){b.transform(U,function(){var $=n.apply(this,arguments),L=this.__zoom,q=Z==null?C($):typeof Z=="function"?Z.apply(this,arguments):Z;return t(nx.translate(q[0],q[1]).scale(L.k).translate(typeof Q=="function"?-Q.apply(this,arguments):-Q,typeof V=="function"?-V.apply(this,arguments):-V),$,a)},Z,J)};function y(U,Q){return Q=Math.max(i[0],Math.min(i[1],Q)),Q===U.k?U:new hl(Q,U.x,U.y)}function x(U,Q,V){var Z=Q[0]-V[0]*U.k,J=Q[1]-V[1]*U.k;return Z===U.x&&J===U.y?U:new hl(U.k,Z,J)}function C(U){return[(+U[0][0]+ +U[1][0])/2,(+U[0][1]+ +U[1][1])/2]}function N(U,Q,V,Z){U.on("start.zoom",function(){j(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){j(this,arguments).event(Z).end()}).tween("zoom",function(){var J=this,$=arguments,L=j(J,$).event(Z),q=n.apply(J,$),P=V==null?C(q):typeof V=="function"?V.apply(J,$):V,F=Math.max(q[1][0]-q[0][0],q[1][1]-q[0][1]),re=J.__zoom,ie=typeof Q=="function"?Q.apply(J,$):Q,ue=c(re.invert(P).concat(F/re.k),ie.invert(P).concat(F/ie.k));return function(se){if(se===1)se=ie;else{var K=ue(se),oe=F/K[2];se=new hl(oe,P[0]-K[0]*oe,P[1]-K[1]*oe)}L.zoom(null,se)}})}function j(U,Q,V){return!V&&U.__zooming||new A(U,Q)}function A(U,Q){this.that=U,this.args=Q,this.active=0,this.sourceEvent=null,this.extent=n.apply(U,Q),this.taps=0}A.prototype={event:function(U){return U&&(this.sourceEvent=U),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(U,Q){return this.mouse&&U!=="mouse"&&(this.mouse[1]=Q.invert(this.mouse[0])),this.touch0&&U!=="touch"&&(this.touch0[1]=Q.invert(this.touch0[0])),this.touch1&&U!=="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(U){var Q=fa(this.that).datum();u.call(U,this.that,new jWn(U,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),Q)}};function z(U,...Q){if(!e.apply(this,arguments))return;var V=j(this,Q).event(U),Z=this.__zoom,J=Math.max(i[0],Math.min(i[1],Z.k*Math.pow(2,r.apply(this,arguments)))),$=ao(U);if(V.wheel)(V.mouse[0][0]!==$[0]||V.mouse[0][1]!==$[1])&&(V.mouse[1]=Z.invert(V.mouse[0]=$)),clearTimeout(V.wheel);else{if(Z.k===J)return;V.mouse=[$,Z.invert($)],bv(this),V.start()}o0(U),V.wheel=setTimeout(L,w),V.zoom("mouse",t(x(y(Z,J),V.mouse[0],V.mouse[1]),V.extent,a));function L(){V.wheel=null,V.end()}}function M(U,...Q){if(p||!e.apply(this,arguments))return;var V=U.currentTarget,Z=j(this,Q,!0).event(U),J=fa(U.view).on("mousemove.zoom",P,!0).on("mouseup.zoom",F,!0),$=ao(U,V),L=U.clientX,q=U.clientY;yU(U.view),q4(U),Z.mouse=[$,this.__zoom.invert($)],bv(this),Z.start();function P(re){if(o0(re),!Z.moved){var ie=re.clientX-L,ue=re.clientY-q;Z.moved=ie*ie+ue*ue>k}Z.event(re).zoom("mouse",t(x(Z.that.__zoom,Z.mouse[0]=ao(re,V),Z.mouse[1]),Z.extent,a))}function F(re){J.on("mousemove.zoom mouseup.zoom",null),xU(re.view,Z.moved),o0(re),Z.event(re).end()}}function D(U,...Q){if(e.apply(this,arguments)){var V=this.__zoom,Z=ao(U.changedTouches?U.changedTouches[0]:U,this),J=V.invert(Z),$=V.k*(U.shiftKey?.5:2),L=t(x(y(V,$),Z,J),n.apply(this,Q),a);o0(U),o>0?fa(this).transition().duration(o).call(N,L,Z,U):fa(this).call(b.transform,L,Z,U)}}function I(U,...Q){if(e.apply(this,arguments)){var V=U.touches,Z=V.length,J=j(this,Q,U.changedTouches.length===Z).event(U),$,L,q,P;for(q4(U),L=0;L`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.`},om=[[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 Hh;(function(e){e.Strict="strict",e.Loose="loose"})(Hh||(Hh={}));var cf;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(cf||(cf={}));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 yu;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(yu||(yu={}));var zb;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(zb||(zb={}));var Rt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Rt||(Rt={}));const WM={[Rt.Left]:Rt.Right,[Rt.Right]:Rt.Left,[Rt.Top]:Rt.Bottom,[Rt.Bottom]:Rt.Top};function FU(e){return e===null?null:e?"valid":"invalid"}const HU=e=>"id"in e&&"source"in e&&"target"in e,DWn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),s7=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Xm=(e,n=[0,0])=>{const{width:t,height:r}=Al(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},LWn=(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):s7(s)?s:n.nodeLookup.get(s.id));const o=a?jb(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return rx(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return sx(t)},Ym=(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=rx(t,jb(s)),r=!0)}),r?sx(t):{x:0,y:0,width:0,height:0}},i7=(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,h=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,b=m.height??p.height??p.initialHeight??0,{x:y,y:x}=p.internals.positionAbsolute,C=KU(o,c,u,h,y,x,v,b),N=v*b,j=i&&C>0;(!p.internals.handleBounds||j||C>=N||p.dragging)&&f.push(p)}return f},IWn=(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 $Wn(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 BWn({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=$Wn(e,a),c=Ym(o),u=o7(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},h=a.origin??r;let f=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!o)i==null||i("005",yo.error005());else{const m=o.measured.width,w=o.measured.height;m&&w&&(f=[[c,u],[c+m,u+w]])}else o&&Ef(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=Ef(f)?Cf(n,f,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",yo.error015())),{position:{x:p.x-c+(a.measured.width??0)*h[0],y:p.y-u+(a.measured.height??0)*h[1]},positionAbsolute:p}}async function PWn({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),h=IWn(a,c);for(const p of c)o.has(p.id)&&!h.find(w=>w.id===p.id)&&h.push(p);if(!s)return{edges:h,nodes:a};const f=await s({nodes:a,edges:h});return typeof f=="boolean"?f?{edges:h,nodes:a}:{edges:[],nodes:[]}:f}const qh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Cf=(e={x:0,y:0},n,t)=>({x:qh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:qh(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}=Al(t),{x:i,y:a}=t.internals.positionAbsolute;return Cf(e,[[i,a],[i+r,a+s]],n)}const QM=(e,n,t)=>et?-qh(Math.abs(e-t),1,n)/n:0,a7=(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]},rx=(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)}),Bk=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),sx=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),lm=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=s7(e)?e.internals.positionAbsolute:Xm(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}},jb=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=s7(e)?e.internals.positionAbsolute:Xm(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)=>sx(rx(Bk(e),Bk(n))),KU=(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)},Ab=(e,n)=>KU(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),XM=e=>ho(e.width)&&ho(e.height)&&ho(e.x)&&ho(e.y),ho=e=>!isNaN(e)&&isFinite(e),VU=(e,n)=>(t,r)=>{},Zm=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Jm=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?Zm(o,a):o},Uh=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function Td(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 FWn(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=Td(e,t),s=Td(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Td(e.top??e.y??0,t),s=Td(e.bottom??e.y??0,t),i=Td(e.left??e.x??0,n),a=Td(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 HWn(e,n,t,r,s,i){const{x:a,y:o}=Uh(e,[n,t,r]),{x:c,y:u}=Uh({x:e.x+e.width,y:e.y+e.height},[n,t,r]),h=s-c,f=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(h),bottom:Math.floor(f)}}const o7=(e,n,t,r,s,i)=>{const a=FWn(i,n,t),o=(n-a.x)/e.width,c=(t-a.y)/e.height,u=Math.min(o,c),h=qh(u,r,s),f=e.x+e.width/2,p=e.y+e.height/2,m=n/2-f*h,w=t/2-p*h,k=HWn(e,m,w,h,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:h}},um=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ef(e){return e!=null&&e!=="parent"}function Al(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 YM(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function qWn(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function UWn(e){return{...BU,...e||{}}}function j0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=po(e),o=Jm({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:c,y:u}=t?Zm(o,n):o;return{xSnapped:c,ySnapped:u,...o}}const c7=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)},GWn=["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:GWn.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const ZU=e=>"clientX"in e,po=(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)}},ZM=(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,...c7(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,h=Math.abs(c-e),f=Math.abs(u-n);return[c,u,h,f]}function H1(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function JM({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case Rt.Left:return[n-H1(n-r,i),t];case Rt.Right:return[n+H1(r-n,i),t];case Rt.Top:return[n,t-H1(t-s,i)];case Rt.Bottom:return[n,t+H1(s-t,i)]}}function eG({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top,curvature:a=.25}){const[o,c]=JM({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,h]=JM({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:h});return[`M${e},${n} C${o},${c} ${u},${h} ${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 WWn=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,QWn=(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)),XWn=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",yo.error006()),n;const r=t.getEdgeId||WWn;let s;return HU(e)?s={...e}:s={...e,id:r(e)},QWn(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 eO={[Rt.Left]:{x:-1,y:0},[Rt.Right]:{x:1,y:0},[Rt.Top]:{x:0,y:-1},[Rt.Bottom]:{x:0,y:1}},YWn=({source:e,sourcePosition:n=Rt.Bottom,target:t})=>n===Rt.Left||n===Rt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function ZWn({source:e,sourcePosition:n=Rt.Bottom,target:t,targetPosition:r=Rt.Top,center:s,offset:i,stepPosition:a}){const o=eO[n],c=eO[r],u={x:e.x+o.x*i,y:e.y+o.y*i},h={x:t.x+c.x*i,y:t.y+c.y*i},f=YWn({source:u,sourcePosition:n,target:h}),p=f.x!==0?"x":"y",m=f[p];let w=[],k,v;const b={x:0,y:0},y={x:0,y:0},[,,x,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+(h.x-u.x)*a,v=s.y??(u.y+h.y)/2):(k=s.x??(u.x+h.x)/2,v=s.y??u.y+(h.y-u.y)*a);const z=[{x:k,y:u.y},{x:k,y:h.y}],M=[{x:u.x,y:v},{x:h.x,y:v}];o[p]===m?w=p==="x"?z:M:w=p==="x"?M:z}else{const z=[{x:u.x,y:h.y}],M=[{x:h.x,y:u.y}];if(p==="x"?w=o.x===m?M:z:w=o.y===m?z:M,n===r){const U=Math.abs(e[p]-t[p]);if(U<=i){const Q=Math.min(i-1,i-U);o[p]===m?b[p]=(u[p]>e[p]?-1:1)*Q:y[p]=(h[p]>t[p]?-1:1)*Q}}if(n!==r){const U=p==="x"?"y":"x",Q=o[p]===c[U],V=u[U]>h[U],Z=u[U]=G?(k=(D.x+I.x)/2,v=w[0].y):(k=w[0].x,v=(D.y+I.y)/2)}const N={x:u.x+b.x,y:u.y+b.y},j={x:h.x+y.x,y:h.y+y.y};return[[e,...N.x!==w[0].x||N.y!==w[0].y?[N]:[],...w,...j.x!==w[w.length-1].x||j.y!==w[w.length-1].y?[j]:[],t],k,v,x,C]}function JWn(e,n,t,r){const s=Math.min(tO(e,n)/2,tO(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 Fk(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function tQn(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=Fk(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,nQn=10,l7={nodeOrigin:[0,0],nodeExtent:om,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},rQn={...l7,checkEquality:!0};function u7(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function sQn(e,n,t){const r=u7(l7,t);for(const s of e.values())if(s.parentId)f7(s,e,n,r);else{const i=Xm(s,r.nodeOrigin),a=Ef(s.extent)?s.extent:r.nodeExtent,o=Cf(i,a,Al(s));s.internals.positionAbsolute=o}}function iQn(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 _7(e){return e==="manual"}function Hk(e,n,t,r={}){var h,f;const s=u7(rQn,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!_7(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=Xm(p,s.nodeOrigin),k=Ef(p.extent)?p.extent:s.nodeExtent,v=Cf(w,k,Al(p));m={...s.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(f=p.measured)==null?void 0:f.height},internals:{positionAbsolute:v,handleBounds:iQn(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&&f7(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function aQn(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 f7(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:c}=u7(l7,r),u=e.parentId,h=n.get(u);if(!h){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}aQn(e,t),s&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++s.i,h.internals.z=h.internals.z+s.i*nQn),s&&h.internals.rootParentIndex!==void 0&&(s.i=h.internals.rootParentIndex);const f=i&&!_7(c)?rG:0,{x:p,y:m,z:w}=oQn(e,h,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=ho(e.zIndex)?e.zIndex:0;return _7(t)?r:r+(e.selected?n:0)}function oQn(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,c=Al(e),u=Xm(e,t),h=Ef(e.extent)?Cf(u,e.extent,c):u;let f=Cf({x:a+h.x,y:o+h.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 d7(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)??lm(c),h=GU(u,o.rect);i.set(o.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:o,parent:c},u)=>{var x;const h=c.internals.positionAbsolute,f=Al(c),p=c.origin??r,m=o.x0||w>0||b||y)&&(s.push({id:u,type:"position",position:{x:c.position.x-m+b,y:c.position.y-w+y}}),(x=t.get(u))==null||x.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=d7(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:c}}async function lQn({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 iO(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}`,h=`${i}-${o}--${s}-${a}`;iO("source",c,h,e,s,a),iO("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 aO(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 uQn(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 U4({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,c;const s=[];for(const[u,h]of n){const f=(a=t.get(u))==null?void 0:a.internals.userNode;f&&s.push({...f,position:h.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 _Qn({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=Zm(i,n);return{x:a.x-i.x,y:a.y-i.y}}function fQn({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},h=null,f=!1,p=null,m=!1,w=!1,k=null;function v({noDragClassName:y,handleSelector:x,domNode:C,isSelectable:N,nodeId:j,nodeClickDistance:A=0}){p=fa(C);function z({x:B,y:G}){const{nodeLookup:U,nodeExtent:Q,snapGrid:V,snapToGrid:Z,nodeOrigin:J,onNodeDrag:$,onSelectionDrag:L,onError:q,updateNodePositions:P}=n();i={x:B,y:G};let F=!1;const re=o.size>1,ie=re&&Q?Bk(Ym(o)):null,ue=re&&Z?_Qn({dragItems:o,snapGrid:V,x:B,y:G}):null;for(const[se,K]of o){if(!U.has(se))continue;let oe={x:B-K.distance.x,y:G-K.distance.y};Z&&(oe=ue?{x:Math.round(oe.x+ue.x),y:Math.round(oe.y+ue.y)}:Zm(oe,V));let ce=null;if(re&&Q&&!K.extent&&ie){const{positionAbsolute:Me}=K.internals,Fe=Me.x-ie.x+Q[0][0],Ye=Me.x+K.measured.width-ie.x2+Q[1][0],Te=Me.y-ie.y+Q[0][1],$e=Me.y+K.measured.height-ie.y2+Q[1][1];ce=[[Fe,Te],[Ye,$e]]}const{position:pe,positionAbsolute:ve}=qU({nodeId:se,nextPosition:oe,nodeLookup:U,nodeExtent:ce||Q,nodeOrigin:J,onError:q});F=F||K.position.x!==pe.x||K.position.y!==pe.y,K.position=pe,K.internals.positionAbsolute=ve}if(w=w||F,!!F&&(P(o,!0),k&&(r||$||!j&&L))){const[se,K]=U4({nodeId:j,dragItems:o,nodeLookup:U});r==null||r(k,o,se,K),$==null||$(k,se,K),j||L==null||L(k,K)}}async function M(){if(!h)return;const{transform:B,panBy:G,autoPanSpeed:U,autoPanOnNodeDrag:Q}=n();if(!Q){c=!1,cancelAnimationFrame(a);return}const[V,Z]=a7(u,h,U);(V!==0||Z!==0)&&(i.x=(i.x??0)-V/B[2],i.y=(i.y??0)-Z/B[2],await G({x:V,y:Z})&&z(i)),a=requestAnimationFrame(M)}function D(B){var re;const{nodeLookup:G,multiSelectionActive:U,nodesDraggable:Q,transform:V,snapGrid:Z,snapToGrid:J,selectNodesOnDrag:$,onNodeDragStart:L,onSelectionDragStart:q,unselectNodesAndEdges:P}=n();f=!0,(!$||!N)&&!U&&j&&((re=G.get(j))!=null&&re.selected||P()),N&&$&&j&&(e==null||e(j));const F=j0(B.sourceEvent,{transform:V,snapGrid:Z,snapToGrid:J,containerBounds:h});if(i=F,o=uQn(G,Q,F,j),o.size>0&&(t||L||!j&&q)){const[ie,ue]=U4({nodeId:j,dragItems:o,nodeLookup:G});t==null||t(B.sourceEvent,o,ie,ue),L==null||L(B.sourceEvent,ie,ue),j||q==null||q(B.sourceEvent,ue)}}const I=wU().clickDistance(A).on("start",B=>{const{domNode:G,nodeDragThreshold:U,transform:Q,snapGrid:V,snapToGrid:Z}=n();h=(G==null?void 0:G.getBoundingClientRect())||null,m=!1,w=!1,k=B.sourceEvent,U===0&&D(B),i=j0(B.sourceEvent,{transform:Q,snapGrid:V,snapToGrid:Z,containerBounds:h}),u=po(B.sourceEvent,h)}).on("drag",B=>{const{autoPanOnNodeDrag:G,transform:U,snapGrid:Q,snapToGrid:V,nodeDragThreshold:Z,nodeLookup:J}=n(),$=j0(B.sourceEvent,{transform:U,snapGrid:Q,snapToGrid:V,containerBounds:h});if(k=B.sourceEvent,(B.sourceEvent.type==="touchmove"&&B.sourceEvent.touches.length>1||j&&!J.has(j))&&(m=!0),!m){if(!c&&G&&f&&(c=!0,M()),!f){const L=po(B.sourceEvent,h),q=L.x-u.x,P=L.y-u.y;Math.sqrt(q*q+P*P)>Z&&D(B)}(i.x!==$.xSnapped||i.y!==$.ySnapped)&&o&&f&&(u=po(B.sourceEvent,h),z($))}}).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:G,updateNodePositions:U,onNodeDragStop:Q,onSelectionDragStop:V}=n();if(w&&(U(o,!1),w=!1),s||Q||!j&&V){const[Z,J]=U4({nodeId:j,dragItems:o,nodeLookup:G,dragging:!1});s==null||s(B.sourceEvent,o,Z,J),Q==null||Q(B.sourceEvent,Z,J),j||V==null||V(B.sourceEvent,J)}}}).filter(B=>{const G=B.target;return!B.button&&(!y||!aO(G,`.${y}`,C))&&(!x||aO(G,x,C))});p.call(I)}function b(){p==null||p.on(".drag",null)}return{update:v,destroy:b}}function dQn(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())Ab(s,lm(i))>0&&r.push(i);return r}const hQn=250;function pQn(e,n,t,r){var o,c;let s=[],i=1/0;const a=dQn(e,t,n+hQn);for(const u of a){const h=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of h){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:p,y:m}=Nf(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(h=>h.type===u)??s[0]}return s[0]}function oG(e,n,t,r,s,i=!1){var u,h,f;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((h=a.internals.handleBounds)==null?void 0:h.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,...Nf(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 mQn(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const lG=()=>!0;function gQn(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:c,lib:u,autoPanOnConnect:h,flowId:f,panBy:p,cancelConnection:m,onConnectStart:w,onConnect:k,onConnectEnd:v,isValidConnection:b=lG,onReconnectEnd:y,updateConnection:x,getTransform:C,getFromHandle:N,autoPanSpeed:j,dragThreshold:A=1,handleDomNode:z}){const M=XU(e.target);let D=0,I;const{x:B,y:G}=po(e),U=cG(i,z),Q=o==null?void 0:o.getBoundingClientRect();let V=!1;if(!Q||!U)return;const Z=oG(s,U,r,c,n);if(!Z)return;let J=po(e,Q),$=!1,L=null,q=!1,P=null;function F(){if(!h||!Q)return;const[pe,ve]=a7(J,Q,j);p({x:pe,y:ve}),D=requestAnimationFrame(F)}const re={...Z,nodeId:s,type:U,position:Z.position},ie=c.get(s);let se={inProgress:!0,isValid:null,from:Nf(ie,re,Rt.Left,!0),fromHandle:re,fromPosition:re.position,fromNode:ie,to:J,toHandle:null,toPosition:WM[re.position],toNode:null,pointer:J};function K(){V=!0,x(se),w==null||w(e,{nodeId:s,handleId:r,handleType:U})}A===0&&K();function oe(pe){if(!V){const{x:$e,y:yt}=po(pe),ot=$e-B,Mt=yt-G;if(!(ot*ot+Mt*Mt>A*A))return;K()}if(!N()||!re){ce(pe);return}const ve=C();J=po(pe,Q),I=pQn(Jm(J,ve,!1,[1,1]),t,c,re),$||(F(),$=!0);const Me=uG(pe,{handle:I,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:b,doc:M,lib:u,flowId:f,nodeLookup:c});P=Me.handleDomNode,L=Me.connection,q=mQn(!!I,Me.isValid);const Fe=c.get(s),Ye=Fe?Nf(Fe,re,Rt.Left,!0):se.from,Te={...se,from:Ye,isValid:q,to:Me.toHandle&&q?Uh({x:Me.toHandle.x,y:Me.toHandle.y},ve):J,toHandle:Me.toHandle,toPosition:q&&Me.toHandle?Me.toHandle.position:WM[re.position],toNode:Me.toHandle?c.get(Me.toHandle.nodeId):null,pointer:J};x(Te),se=Te}function ce(pe){if(!("touches"in pe&&pe.touches.length>0)){if(V){(I||P)&&L&&q&&(k==null||k(L));const{inProgress:ve,...Me}=se,Fe={...Me,toPosition:se.toHandle?se.toPosition:null};v==null||v(pe,Fe),i&&(y==null||y(pe,Fe))}m(),cancelAnimationFrame(D),$=!1,q=!1,L=null,P=null,M.removeEventListener("mousemove",oe),M.removeEventListener("mouseup",ce),M.removeEventListener("touchmove",oe),M.removeEventListener("touchend",ce)}}M.addEventListener("mousemove",oe),M.addEventListener("mouseup",ce),M.addEventListener("touchmove",oe),M.addEventListener("touchend",ce)}function uG(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:c,isValidConnection:u=lG,nodeLookup:h}){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}=po(e),k=a.elementFromPoint(m,w),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const y=cG(void 0,v),x=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),N=v.classList.contains("connectable"),j=v.classList.contains("connectableend");if(!x||!y)return b;const A={source:f?x:r,sourceHandle:f?C:s,target:f?r:x,targetHandle:f?s:C};b.connection=A;const M=N&&j&&(t===Hh.Strict?f&&y==="source"||!f&&y==="target":x!==r||C!==s);b.isValid=M&&u(A),b.toHandle=oG(x,y,C,h,t,!0)}return b}const qk={onPointerDown:gQn,isValid:uG};function vQn({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=fa(e);function i({translateExtent:o,width:c,height:u,zoomStep:h=1,pannable:f=!0,zoomable:p=!0,inversePan:m=!1}){const w=x=>{if(x.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=x.sourceEvent.ctrlKey&&um()?10:1,j=-x.sourceEvent.deltaY*(x.sourceEvent.deltaMode===1?.05:x.sourceEvent.deltaMode?1:.002)*h,A=C[2]*Math.pow(2,j*N);n.scaleTo(A)};let k=[0,0];const v=x=>{(x.sourceEvent.type==="mousedown"||x.sourceEvent.type==="touchstart")&&(k=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY])},b=x=>{const C=t();if(x.sourceEvent.type!=="mousemove"&&x.sourceEvent.type!=="touchmove"||!n)return;const N=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY],j=[N[0]-k[0],N[1]-k[1]];k=N;const A=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),z={x:C[0]-j[0]*A,y:C[1]-j[1]*A},M=[[0,0],[c,u]];n.setViewportConstrained({x:z.x,y:z.y,zoom:C[2]},M,o)},y=IU().on("start",v).on("zoom",f?b:null).on("zoom.wheel",p?w:null);s.call(y,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:ao}}const ix=e=>({x:e.x,y:e.y,zoom:e.k}),G4=({x:e,y:n,zoom:t})=>nx.translate(e,n).scale(t),Ud=(e,n)=>e.target.closest(`.${n}`),_G=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),bQn=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,K4=(e,n=0,t=bQn,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&&um()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function yQn({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:o,onPanZoom:c,onPanZoomEnd:u}){return h=>{if(Ud(h,n))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const f=t.property("__zoom").k||1;if(h.ctrlKey&&a){const v=ao(h),b=fG(h),y=f*Math.pow(2,b);r.scaleTo(t,y,v,h);return}const p=h.deltaMode===1?20:1;let m=s===cf.Vertical?0:h.deltaX*p,w=s===cf.Horizontal?0:h.deltaY*p;!um()&&h.shiftKey&&s!==cf.Vertical&&(m=h.deltaY*p,w=0),r.translateBy(t,-(m/f)*i,-(w/f)*i,{internal:!0});const k=ix(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,k),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(h,k))}}function xQn({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=Ud(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function wQn({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=ix(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 kQn({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,ix(i.transform)))}}function SQn({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=ix(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,c)},t?150:0)}}}function CQn({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:c,lib:u,connectionInProgress:h}){return f=>{var v;const p=e||n,m=t&&f.ctrlKey,w=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Ud(f,`${u}-flow__node`)||Ud(f,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||h&&!w||Ud(f,o)&&w||Ud(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 EQn({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},h=e.getBoundingClientRect(),f=IU().scaleExtent([n,t]).translateExtent(r),p=fa(e).call(f);y({x:s.x,y:s.y,zoom:qh(s.zoom,n,t)},[[0,0],[h.width,h.height]],r);const m=p.on("wheel.zoom"),w=p.on("dblclick.zoom");f.wheelDelta(fG);async function k(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?z0:mv).transform(K4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}function v({noWheelClassName:I,noPanClassName:B,onPaneContextMenu:G,userSelectionActive:U,panOnScroll:Q,panOnDrag:V,panOnScrollMode:Z,panOnScrollSpeed:J,preventScrolling:$,zoomOnPinch:L,zoomOnScroll:q,zoomOnDoubleClick:P,zoomActivationKeyPressed:F,lib:re,onTransformChange:ie,connectionInProgress:ue,paneClickDistance:se,selectionOnDrag:K}){U&&!u.isZoomingOrPanning&&b();const oe=Q&&!F&&!U;f.clickDistance(K?1/0:!ho(se)||se<0?0:se);const ce=oe?yQn({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:f,panOnScrollMode:Z,panOnScrollSpeed:J,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):xQn({noWheelClassName:I,preventScrolling:$,d3ZoomHandler:m});p.on("wheel.zoom",ce,{passive:!1});const pe=wQn({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});f.on("start",pe);const ve=kQn({zoomPanValues:u,panOnDrag:V,onPaneContextMenu:!!G,onPanZoom:i,onTransformChange:ie});f.on("zoom",ve);const Me=SQn({zoomPanValues:u,panOnDrag:V,panOnScroll:Q,onPaneContextMenu:G,onPanZoomEnd:o,onDraggingChange:c});f.on("end",Me);const Fe=CQn({zoomActivationKeyPressed:F,panOnDrag:V,zoomOnScroll:q,panOnScroll:Q,zoomOnDoubleClick:P,zoomOnPinch:L,userSelectionActive:U,noPanClassName:B,noWheelClassName:I,lib:re,connectionInProgress:ue});f.filter(Fe),P?p.on("dblclick.zoom",w):p.on("dblclick.zoom",null)}function b(){f.on("zoom",null)}async function y(I,B,G){const U=G4(I),Q=f==null?void 0:f.constrain()(U,B,G);return Q&&await k(Q),Q}async function x(I,B){const G=G4(I);return await k(G,B),G}function C(I){if(p){const B=G4(I),G=p.property("__zoom");(G.k!==I.zoom||G.x!==I.x||G.y!==I.y)&&(f==null||f.transform(p,B,null,{sync:!0}))}}function N(){const I=p?LU(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}async function j(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?z0:mv).scaleTo(K4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}async function A(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?z0:mv).scaleBy(K4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}function z(I){f==null||f.scaleExtent(I)}function M(I){f==null||f.translateExtent(I)}function D(I){const B=!ho(I)||I<0?0:I;f==null||f.clickDistance(B)}return{update:v,destroy:b,setViewport:x,setViewportConstrained:y,getViewport:N,scaleTo:j,scaleBy:A,setScaleExtent:z,setTranslateExtent:M,syncViewport:C,setClickDistance:D}}var Gh;(function(e){e.Line="line",e.Handle="handle"})(Gh||(Gh={}));function NQn({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 oO(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 hu(e,n){return Math.max(0,n-e)}function pu(e,n){return Math.max(0,e-n)}function q1(e,n,t){return Math.max(0,n-e,e-t)}function cO(e,n){return e?!n:n}function zQn(e,n,t,r,s,i,a,o){let{affectsX:c,affectsY:u}=n;const{isHorizontal:h,isVertical:f}=n,p=h&&f,{xSnapped:m,ySnapped:w}=t,{minWidth:k,maxWidth:v,minHeight:b,maxHeight:y}=r,{x,y:C,width:N,height:j,aspectRatio:A}=e;let z=Math.floor(h?m-e.pointerX:0),M=Math.floor(f?w-e.pointerY:0);const D=N+(c?-z:z),I=j+(u?-M:M),B=-i[0]*N,G=-i[1]*j;let U=q1(D,k,v),Q=q1(I,b,y);if(a){let J=0,$=0;c&&z<0?J=hu(x+z+B,a[0][0]):!c&&z>0&&(J=pu(x+D+B,a[1][0])),u&&M<0?$=hu(C+M+G,a[0][1]):!u&&M>0&&($=pu(C+I+G,a[1][1])),U=Math.max(U,J),Q=Math.max(Q,$)}if(o){let J=0,$=0;c&&z>0?J=pu(x+z,o[0][0]):!c&&z<0&&(J=hu(x+D,o[1][0])),u&&M>0?$=pu(C+M,o[0][1]):!u&&M<0&&($=hu(C+I,o[1][1])),U=Math.max(U,J),Q=Math.max(Q,$)}if(s){if(h){const J=q1(D/A,b,y)*A;if(U=Math.max(U,J),a){let $=0;!c&&!u||c&&!u&&p?$=pu(C+G+D/A,a[1][1])*A:$=hu(C+G+(c?z:-z)/A,a[0][1])*A,U=Math.max(U,$)}if(o){let $=0;!c&&!u||c&&!u&&p?$=hu(C+D/A,o[1][1])*A:$=pu(C+(c?z:-z)/A,o[0][1])*A,U=Math.max(U,$)}}if(f){const J=q1(I*A,k,v)/A;if(Q=Math.max(Q,J),a){let $=0;!c&&!u||u&&!c&&p?$=pu(x+I*A+B,a[1][0])/A:$=hu(x+(u?M:-M)*A+B,a[0][0])/A,Q=Math.max(Q,$)}if(o){let $=0;!c&&!u||u&&!c&&p?$=hu(x+I*A,o[1][0])/A:$=pu(x+(u?M:-M)*A,o[0][0])/A,Q=Math.max(Q,$)}}}M=M+(M<0?Q:-Q),z=z+(z<0?U:-U),s&&(p?D>I*A?M=(cO(c,u)?-z:z)/A:z=(cO(c,u)?-M:M)*A:h?(M=z/A,u=c):(z=M*A,c=u));const V=c?x+z:x,Z=u?C+M:C;return{width:N+(c?-z:z),height:j+(u?-M:M),x:i[0]*z*(c?-1:1)+V,y:i[1]*M*(u?-1:1)+Z}}const dG={width:0,height:0,x:0,y:0},jQn={...dG,pointerX:0,pointerY:0,aspectRatio:1};function AQn(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 TQn({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=fa(e);let a={controlDirection:oO("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:h,keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:w,onResizeEnd:k,shouldResize:v}){let b={...dG},y={...jQn};a={boundaries:h,resizeDirection:p,keepAspectRatio:f,controlDirection:oO(u)};let x,C=null,N=[],j,A,z,M=!1;const D=wU().on("start",I=>{const{nodeLookup:B,transform:G,snapGrid:U,snapToGrid:Q,nodeOrigin:V,paneDomNode:Z}=t();if(x=B.get(n),!x)return;C=(Z==null?void 0:Z.getBoundingClientRect())??null;const{xSnapped:J,ySnapped:$}=j0(I.sourceEvent,{transform:G,snapGrid:U,snapToGrid:Q,containerBounds:C});b={width:x.measured.width??0,height:x.measured.height??0,x:x.position.x??0,y:x.position.y??0},y={...b,pointerX:J,pointerY:$,aspectRatio:b.width/b.height},j=void 0,A=Ef(x.extent)?x.extent:void 0,x.parentId&&(x.extent==="parent"||x.expandParent)&&(j=B.get(x.parentId)),j&&x.extent==="parent"&&(A=[[0,0],[j.measured.width,j.measured.height]]),N=[],z=void 0;for(const[L,q]of B)if(q.parentId===n&&(N.push({id:L,position:{...q.position},extent:q.extent}),q.extent==="parent"||q.expandParent)){const P=AQn(q,x,q.origin??V);z?z=[[Math.min(P[0][0],z[0][0]),Math.min(P[0][1],z[0][1])],[Math.max(P[1][0],z[1][0]),Math.max(P[1][1],z[1][1])]]:z=P}m==null||m(I,{...b})}).on("drag",I=>{const{transform:B,snapGrid:G,snapToGrid:U,nodeOrigin:Q}=t(),V=j0(I.sourceEvent,{transform:B,snapGrid:G,snapToGrid:U,containerBounds:C}),Z=[];if(!x)return;const{x:J,y:$,width:L,height:q}=b,P={},F=x.origin??Q,{width:re,height:ie,x:ue,y:se}=zQn(y,a.controlDirection,V,a.boundaries,a.keepAspectRatio,F,A,z),K=re!==L,oe=ie!==q,ce=ue!==J&&K,pe=se!==$&&oe;if(!ce&&!pe&&!K&&!oe)return;if((ce||pe||F[0]===1||F[1]===1)&&(P.x=ce?ue:b.x,P.y=pe?se:b.y,b.x=P.x,b.y=P.y,N.length>0)){const Ye=ue-J,Te=se-$;for(const $e of N)$e.position={x:$e.position.x-Ye+F[0]*(re-L),y:$e.position.y-Te+F[1]*(ie-q)},Z.push($e)}if((K||oe)&&(P.width=K&&(!a.resizeDirection||a.resizeDirection==="horizontal")?re:b.width,P.height=oe&&(!a.resizeDirection||a.resizeDirection==="vertical")?ie:b.height,b.width=P.width,b.height=P.height),j&&x.expandParent){const Ye=F[0]*(P.width??0);P.x&&P.x{M&&(k==null||k(I,{...b}),s==null||s({...b}),M=!1)});i.call(D)}function c(){i.on(".drag",null)}return{update:o,destroy:c}}const RQn={},lO=e=>{let n;const t=new Set,r=(h,f)=>{const p=typeof h=="function"?h(n):h;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:h=>(t.add(h),()=>t.delete(h)),destroy:()=>{(RQn?"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},MQn=e=>e?lO(e):lO,{useDebugValue:OQn}=it,{useSyncExternalStoreWithSelector:DQn}=jQ,LQn=e=>e;function hG(e,n=LQn,t){const r=DQn(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return OQn(r),r}const uO=(e,n)=>{const t=MQn(e),r=(s,i=n)=>hG(t,s,i);return Object.assign(r,t),r},IQn=(e,n)=>e?uO(e,n):uO;function Tr(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 ax=T.createContext(null),$Qn=ax.Provider,pG=yo.error001("react");function Bn(e,n){const t=T.useContext(ax);if(t===null)throw new Error(pG);return hG(t,e,n)}function Mr(){const e=T.useContext(ax);if(e===null)throw new Error(pG);return T.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const _O={display:"none"},BQn={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",PQn="react-flow__aria-live",FQn=e=>e.ariaLiveMessage,HQn=e=>e.ariaLabelConfig;function qQn({rfId:e}){const n=Bn(FQn);return _.jsx("div",{id:`${PQn}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:BQn,children:n})}function UQn({rfId:e,disableKeyboardA11y:n}){const t=Bn(HQn);return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:`${mG}-${e}`,style:_O,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),_.jsx("div",{id:`${gG}-${e}`,style:_O,children:t["edge.a11yDescription.default"]}),!n&&_.jsx(qQn,{rfId:e})]})}const ox=T.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return _.jsx("div",{className:ms(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});ox.displayName="Panel";const fO="https://reactflow.dev?utm_source=attribution";function GQn({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:_.jsx(ox,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${fO}`,children:_.jsx("a",{href:fO,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const KQn=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}},U1=e=>e.id;function VQn(e,n){return Tr(e.selectedNodes.map(U1),n.selectedNodes.map(U1))&&Tr(e.selectedEdges.map(U1),n.selectedEdges.map(U1))}function WQn({onSelectionChange:e}){const n=Mr(),{selectedNodes:t,selectedEdges:r}=Bn(KQn,VQn);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 QQn=e=>!!e.onSelectionChangeHandlers;function XQn({onSelectionChange:e}){const n=Bn(QQn);return e||n?_.jsx(WQn,{onSelectionChange:e}):null}const vG=[0,0],YQn={x:0,y:0,zoom:1},ZQn=["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"],dO=[...ZQn,"rfId"],JQn=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}),hO={translateExtent:om,nodeOrigin:vG,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function eXn(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:c}=Bn(JQn,Tr),u=Mr();T.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=hO,o()}),[]);const h=T.useRef(hO);return T.useEffect(()=>{for(const f of dO){const p=e[f],m=h.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:UWn(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}h.current=e},dO.map(f=>e[f])),null}function pO(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function tXn(e){var r;const[n,t]=T.useState(e==="system"?null:e);return T.useEffect(()=>{if(e!=="system"){t(e);return}const s=pO(),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=pO())!=null&&r.matches?"dark":"light"}const mO=typeof document<"u"?document:null;function _m(e=null,n={target:mO,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("+",` +`)?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 h;r!==void 0&&(a?((h=o.current)==null||h.scrollIntoView({block:"center"}),s==null||s()):i.length===0&&(s==null||s()))},[i.length,s,r,a]);const{ruleCh:c}=hB(i.length),u=T.useMemo(()=>i.map((h,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:`${dB} 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 ${Jv} ${fB}`,children:MB(h)?_.jsx("br",{}):h})]},f)),[i,c,a]);return _.jsxs("div",{className:`file-view-codewrap relative py-3.5 ${Jv}`,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 DUn="modulepreload",LUn=function(e){return"/"+e},yM={},IUn=function(n,t,r){let s=Promise.resolve();if(t&&t.length>0){let a=function(u){return Promise.all(u.map(h=>Promise.resolve(h).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=LUn(u),u in yM)return;yM[u]=!0;const h=u.endsWith(".css"),f=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${u}"]${f}`))return;const p=document.createElement("link");if(p.rel=h?"stylesheet":DUn,h||(p.as="script"),p.crossOrigin="",p.href=u,c&&p.setAttribute("nonce",c),document.head.appendChild(p),h)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)})},yb=T.createContext(null);function $Un({url:e,name:n}){return _.jsx(Wh,{size:"small",href:e,download:n,"aria-label":Mv({name:Ce(n)}),"data-tip":Mv({name:Ce(n)}),"data-tip-align":"end",children:_.jsx(Kb,{size:13})})}const BUn=T.lazy(()=>IUn(()=>import("./PdfPreview-D66I2Zos.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:[ust()," ",_.jsxs("a",{href:e,download:n,children:[R3()," ",Ce(n)]})]})}function Nk({kind:e,url:n,name:t,download:r=!0}){const[s,i]=T.useState(!1),a=T.useContext(yb);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(kt,{})}),children:_.jsx(BUn,{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&&ii.createPortal(_.jsx($Un,{url:n,name:t}),a)]})}const Wq=e=>({queryKey:St("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 Qq(e,n=!0){return ut({...Wq(e),enabled:n,subscribed:n}).data??null}function XC({projectId:e,request:n,remote:t}){var a,o,c;const r=ut(P6(e,n)),s=xi(),i=!r.isError&&!r.isFetching?(a=r.data)==null?void 0:a.absolutePath:null;return _.jsxs("div",{className:"flex shrink-0 min-w-0 items-center gap-1 border-b border-border-variant px-3 py-1 text-xs text-subtext",children:[_.jsx("span",{dir:"auto",className:"min-w-0 flex-1 truncate",title:i??((o=r.error)==null?void 0:o.message),children:((c=r.error)==null?void 0:c.message)??(i?t?xL({path:Ce(i)}):Ce(i):n.ref?wS({branch:Ce(n.ref)}):wL())}),r.isPending&&_.jsx(kt,{}),i&&_.jsxs(_.Fragment,{children:[_.jsx(It,{size:"small","aria-label":A3(),"data-tip":A3(),onClick:()=>{zn(s)&&cy(i)},children:_.jsx(Zu,{size:13})}),!t&&_.jsx(It,{size:"small","aria-label":T3(),"data-tip":T3(),onClick:()=>{zn(s)&&MS(e,n.path,n).catch(u=>Zt(u instanceof Error?u.message:String(u),"error"))},children:_.jsx(Fu,{size:13})})]})]})}function PUn(e){return/^[a-z][a-z0-9+.-]*:/i.test(e)||e.startsWith("//")}function FUn(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 h=u.join("/");if(!h)return null;const f=new URLSearchParams(c);f.delete("path");const p=f.toString();return{path:h,url:`${Bu(e,h)}${p?`&${p}`:""}${i}`}}function HUn(e){if(!e.startsWith("---"))return e;const n=e.indexOf(` +---`,3);return n===-1?e:e.slice(n+4).replace(/^\r?\n/,"")}const Xq="orx:files-tree-width",Yq="orx:artifacts-collapsed:",Zq=180,Jq=320,qUn=8,UUn=280;function GUn(){try{const e=Number(localStorage.getItem(Xq));if(Number.isFinite(e)&&e>=Zq&&e<=Jq)return e}catch{}return UUn}function VUn(e){try{const n=localStorage.getItem(`${Yq}${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 rh(e,n){for(const t of e){if(t.path===n)return t;if(t.isDir&&n.startsWith(t.path+"/")){const r=rh(t.children??[],n);if(r)return r}}return null}function eU({projectId:e,folder:n,markdown:t,entries:r}){const s=i=>{if(PUn(i))return i;const a=FUn(e,n,i);if(!a)return null;const o=rh(r,a.path);if(!o)return a.url;const c=a.url.indexOf("#"),u=c===-1?a.url:a.url.slice(0,c),h=c===-1?"":a.url.slice(c);return`${u}&v=${o.modifiedAt}:${o.size}${h}`};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(XOn,{remarkPlugins:[JH,[eq,aq]],rehypePlugins:[zH],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},...oq},children:nq(HUn(t))})})}function KUn(e){return e.presentation==="text"&&KC(e.name)?"markdown":Vq(e.presentation)??(e.presentation==="text"||e.presentation==="unknown"?"text":"download")}function WUn(e,n,t,r){var u;const s=t==="markdown"||t==="text"&&n.size<=HI,i=F6(e,n.path),a=ut({...i,enabled:s,subscribed:s}),o=T.useRef({projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r});T.useEffect(()=>{const h=o.current;o.current={projectId:e,path:n.path,modifiedAt:n.modifiedAt,size:n.size,version:r},s&&h.projectId===e&&h.path===n.path&&(h.modifiedAt!==n.modifiedAt||h.size!==n.size||h.version!==null&&h.version!==r)&&tt.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?Ode():null),wantsText:s}}function QUn({projectId:e,entry:n,onDelete:t,artifactEntries:r,remote:s}){const i=KUn(n),a=Qq(Bu(e,n.path)),{text:o,binary:c,truncated:u,error:h,wantsText:f}=WUn(e,n,i,a),[p,m]=T.useState(!1),[w,k]=T.useState(null),v=i==="markdown",b=n.path.split("/").slice(0,-1).join("/"),y=`${Bu(e,n.path)}&v=${encodeURIComponent(a??`${n.modifiedAt}:${n.size}`)}`;let x;return i==="image"||i==="audio"||i==="video"||i==="pdf"?x=_.jsx(yb.Provider,{value:w,children:_.jsx(Nk,{kind:i,url:y,name:n.name})}):i==="download"||!f||c?x=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[i==="download"||c?yde():H0e()," ",_.jsx("a",{href:y,...i==="download"||c?{download:n.name}:{target:"_blank",rel:"noopener noreferrer"},children:i==="download"||c?SL():Fde()})]}):h?x=_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[Dpe()," ",Ce(h)]}):o===null?x=_.jsxs(Pr,{children:[_.jsx(kt,{})," ",cL()]}):v&&!p?x=_.jsx(eU,{projectId:e,folder:b,markdown:o,entries:r}):x=_.jsx(Gq,{text:o,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(wf,{name:n.name}),_.jsx("span",{className:"fpreview-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ce(n.path),children:n.name}),_.jsxs("span",{dir:"auto",className:"fpreview-date text-xs text-muted whitespace-nowrap shrink-0 @max-xl:hidden",children:[p0e()," ",new Date(n.modifiedAt).toLocaleString(E(),{dateStyle:"medium",timeStyle:"short"})]}),_.jsx("div",{ref:k,className:"contents"}),(i==="text"||i==="download")&&_.jsx("span",{className:"fpreview-size text-xs text-muted whitespace-nowrap shrink-0",children:_l(n.size)}),v&&_.jsx(It,{size:"small",active:p,"data-tip":p?Dv():Pd(),"data-tip-align":"end","aria-label":p?Dv():Pd(),onClick:()=>m(C=>!C),children:_.jsx(_5,{size:13})}),_.jsx(Wh,{size:"small",href:y,target:"_blank",rel:"noopener noreferrer","data-tip":TN(),"data-tip-align":"end","aria-label":TN(),children:_.jsx(mf,{size:13})}),_.jsx(It,{size:"small","data-tip":AN(),"data-tip-align":"end","aria-label":AN(),onClick:()=>{window.confirm(gS({path:Ce(n.path)}))&&t(n.path)},children:_.jsx(Of,{size:13})})]}),_.jsx(XC,{projectId:e,request:{path:n.path,source:"artifacts"},remote:s}),_.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 ${v&&!p?"doc":""}`,children:[x,u&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:Hpe()})]})]})}function tU({entries:e,depth:n,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,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,qUn)*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),onContextMenu:v=>{v.preventDefault(),u(v,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?Kfe({name:Ce(p.name)}):dde({name:Ce(p.name)}),onClick:v=>{v.stopPropagation(),s(p.path)},onKeyDown:v=>{(v.key==="ContextMenu"||v.shiftKey&&v.key==="F10")&&(v.preventDefault(),u(v,p.path))},children:_.jsx(Va,{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(It,{size:"small",className:"ft-row-delete opacity-35 focus-visible:opacity-100","data-tip":zpe(),"data-tip-align":"end","aria-label":ade({name:Ce(p.name)}),onClick:v=>{v.stopPropagation(),window.confirm(gS({path:Ce(p.path)}))&&o(p.path)},children:_.jsx(Of,{size:12})})]}),k&&(((w=p.children)==null?void 0:w.length)??0)>0&&_.jsx(tU,{entries:p.children??[],depth:n+1,collapsed:t,selected:r,onToggle:s,onSelect:i,onOpenFile:a,onDelete:o,renamingPath:c,onContextMenu:u,onRename:h,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(wf,{name:p.name}),_.jsx(VB,{name:p.name,onCommit:k=>h(p.path,k),onCancel:f})]},p.path):_.jsxs("button",{type:"button","data-artifact-path":p.path,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:MX({path:Ce(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(wf,{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 XUn({project:e,artifacts:n,onOpenFile:t,canRenameFile:r,remote:s}){var H,oe,ae,ue,se,V;const[i,a]=T.useState(null),[o,c]=T.useState(null),[u,h]=T.useState(""),[f,p]=T.useState(""),[m,w]=T.useState(0);T.useEffect(()=>{const ne=window.setTimeout(()=>p(u.trim()),250);return()=>window.clearTimeout(ne)},[u]);const k=OUn(e.id,f===u.trim()?f:""),v=T.useMemo(()=>k.pages.flatMap(ne=>ne.entries),[k.pages]),b=ut({...Wq(Bu(e.id,(o==null?void 0:o.path)??"")),enabled:!!o,subscribed:!!o}),y=b.data==="missing"&&!b.isFetching,x=y?null:o,C=T.useMemo(()=>FB((n==null?void 0:n.entries)??[],x?[x]:[]),[n==null?void 0:n.entries,x]),N=u.trim().length>0,[j,A]=T.useState(()=>VUn(e.id)),[z,M]=T.useState(GUn),[D,I]=T.useState(null),[B,G]=T.useState(null),q=T.useRef(null);T.useEffect(()=>{var ce;if(!i||N||!m)return;const ne=(ce=q.current)==null?void 0:ce.querySelector(`[data-artifact-path="${CSS.escape(i)}"]`);ne==null||ne.scrollIntoView({block:"nearest"})},[i,N,m,C]),T.useEffect(()=>{try{localStorage.setItem(`${Yq}${e.id}`,JSON.stringify([...j]))}catch{}},[e.id,j]);const Q=ne=>{var Pe;ne.preventDefault(),ne.currentTarget.setPointerCapture(ne.pointerId);const ce=(Pe=q.current)==null?void 0:Pe.getBoundingClientRect(),he=document.body.style.userSelect;document.body.style.userSelect="none";const me=Ye=>{const Re=Math.round(Ye.clientX-((ce==null?void 0:ce.left)??0)),$e=Math.min(Math.max(Re,Zq),Jq);M($e);try{localStorage.setItem(Xq,String($e))}catch{}},Ae=()=>{window.removeEventListener("pointermove",me),window.removeEventListener("pointerup",Ae),window.removeEventListener("pointercancel",Ae),document.body.style.userSelect=he};window.addEventListener("pointermove",me),window.addEventListener("pointerup",Ae),window.addEventListener("pointercancel",Ae)};T.useEffect(()=>{if(o&&y){i===o.path&&a(null),c(null);return}if(!i||!n)return;const ne=rh(C,i);(!ne||ne.isDir)&&a(null)},[i,n,C,o,y]);const K=ne=>A(ce=>{const he=new Set(ce);return he.has(ne)?he.delete(ne):he.add(ne),he}),Z=ne=>{(i===ne||i!=null&&i.startsWith(ne+"/"))&&a(null),((o==null?void 0:o.path)===ne||o!=null&&o.path.startsWith(ne+"/"))&&c(null),bkn(e.id,ne).catch(()=>{})},J=async(ne,ce)=>{try{await ykn(e.id,ne,ce),ce.action==="rename"&&i===ne&&a(null),ce.action==="rename"&&((o==null?void 0:o.path)===ne||o!=null&&o.path.startsWith(ne+"/"))&&c(null)}catch(he){Zt(he instanceof Error?he.message:String(he),"error")}},$=ne=>{const ce=xi();cy(tt.fetchQuery(P6(e.id,{path:ne,source:"artifacts"})).then(he=>{if(!zn(ce)||!he.absolutePath)throw new Error(Lv());return he.absolutePath}))};if(!n)return _.jsx("div",{className:"files-tab h-full min-h-0 flex bg-background",children:_.jsxs(Pr,{className:"p-5",children:[_.jsx(kt,{})," ",c0e()]})});const L=ne=>_.jsx(tU,{entries:ne,depth:0,collapsed:j,selected:i,onToggle:K,onSelect:a,onOpenFile:t,onDelete:Z,renamingPath:B,onContextMenu:(ce,he)=>{I(q6(ce,he))},onRename:(ce,he)=>{G(null),J(ce,{action:"rename",newName:he})},onCancelRename:()=>G(null)}),F=i?rh(C,i):null,U=ne=>{c(ne),a(ne.path),A(ce=>{const he=new Set(ce),me=ne.path.split("/");for(let Ae=1;Aece+1)};return _.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:q,style:{width:z},children:[_.jsx(XC,{projectId:e.id,request:{path:"",source:"artifacts"},remote:s}),_.jsx("div",{className:"shrink-0 p-2",children:_.jsx(Br,{"aria-label":jN(),placeholder:jN(),value:u,onChange:ne=>h(ne.target.value),onKeyDown:ne=>{ne.key==="Escape"&&(ne.preventDefault(),ne.stopPropagation(),h(""))}})}),_.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:Q}),_.jsxs("div",{className:"ftree-scroll flex-1 min-h-0 overflow-y-auto file-tree py-1.5 px-0 text-sm",children:[N?_.jsxs(_.Fragment,{children:[(f!==u.trim()||k.pending)&&_.jsxs(Pr,{children:[_.jsx(kt,{})," ",Whe()]}),((H=k.job)==null?void 0:H.status)==="paused"&&_.jsxs("div",{role:"alert",className:"px-3 py-2 text-sm text-accent-amber",children:[_.jsx("p",{children:tpe()}),_.jsx("p",{children:k.job.stage===0?zhe():cpe()}),_.jsxs("div",{className:"flex flex-wrap gap-2",children:[_.jsx(De,{onClick:k.resume,children:ohe()}),_.jsx(De,{onClick:k.cancel,children:zN()})]})]}),k.pending&&k.job&&_.jsx(De,{onClick:k.cancel,children:zN()}),((oe=k.job)==null?void 0:oe.status)==="cancelled"&&_.jsx("p",{role:"status",className:"m-0 px-3 py-2 text-sm text-subtext",children:ehe()}),_.jsxs(_.Fragment,{children:[k.error&&_.jsx("p",{role:"alert",className:"m-0 px-3 py-2 text-sm text-accent-red",children:k.error.message}),((ae=k.job)==null?void 0:ae.status)==="complete"&&v.length===0&&_.jsx("p",{role:"status",className:"m-0 px-3 py-2 text-sm text-subtext",children:Dhe()}),v.map(ne=>_.jsxs("button",{type:"button",className:"flex w-full min-w-0 items-center gap-2 px-3 py-2 text-start text-sm text-text hover:bg-panel",title:ne.path,onClick:()=>U(ne),children:[_.jsx(wf,{name:ne.name}),_.jsx("span",{className:"min-w-0 break-all",children:ne.path})]},ne.path)),((ue=k.job)==null?void 0:ue.status)==="complete"&&((se=k.pages.at(-1))==null?void 0:se.nextCursor)&&_.jsx(De,{onClick:k.loadMore,children:xhe()}),k.pages.some(ne=>ne.incomplete)&&_.jsx("p",{role:"status",className:"m-0 px-3 py-2 text-sm text-accent-amber",children:hhe()})]})]}):C.length?L(C):_.jsx(QC,{icon:GS,title:w0e(),description:D0e()}),!N&&n.truncated&&_.jsx("p",{className:"files-truncated m-0 py-2 px-3.5 text-sm text-muted",children:Qpe()})]})]}),F?_.jsx(QUn,{projectId:e.id,entry:F,onDelete:Z,artifactEntries:C,remote:s},F.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(z8n,{size:22,strokeWidth:1.5}),_.jsx("span",{children:ppe()})]}),D&&_.jsx(U6,{target:D,onOpen:(V=rh(C,D.path))!=null&&V.isDir?void 0:()=>t(D.path),onReveal:s?void 0:()=>{MS(e.id,D.path,{source:"artifacts"}).catch(ne=>Zt(ne instanceof Error?ne.message:String(ne),"error"))},onRename:r(D.path)?()=>G(D.path):void 0,onDuplicate:()=>void J(D.path,{action:"duplicate"}),onCopyPath:()=>$(D.path),onDelete:()=>{window.confirm(gS({path:Ce(D.path)}))&&Z(D.path)},onClose:()=>I(null)})]})}const nU=20*1024*1024,rU="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",sU="mt-0 mx-0 mb-3 text-sm leading-relaxed text-text",YUn="flex items-start gap-3 py-2.5 border-t border-t-border first:border-t-0",ZUn="text-sm font-normal text-text",JUn="mt-1 mb-0 text-sm leading-relaxed text-text";function iU(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 eGn(e){const n=e.toLowerCase();return n.endsWith(".md")||n.endsWith(".markdown")||n.endsWith(".zip")}function aU({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(kt,{}),_.jsx("span",{children:Kfn()})]}):_.jsxs(_.Fragment,{children:[_.jsx(r9n,{size:20,strokeWidth:1.5}),_.jsx("span",{children:t})]})]})}function oU({bytes:e,updatedAt:n}){return _.jsxs("div",{className:"shrink-0 text-end whitespace-nowrap pt-0.5 text-xs text-subtext",children:[_l(e),n>0&&_.jsxs("span",{className:"text-muted",children:[" · ",vo(n)]})]})}function tGn({skill:e,onError:n}){const t=pn({mutationFn:qkn}),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:ZUn,children:e.name}),e.origin&&_.jsx(Wt,{size:"small",children:e.origin})]}),_.jsx(oU,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx(It,{size:"small","data-tip":e.origin?Xun():G_n(),"data-tip-align":"end","aria-label":e.origin?u_n({name:Ce(e.name)}):Hln({name:Ce(e.name)}),disabled:r,onClick:()=>{window.confirm(e.origin?r_n({name:Ce(e.name)}):Dln({name:Ce(e.name)}))&&t.mutateAsync(e.name).catch(s=>{n(s instanceof Error?s.message:String(s))})},children:_.jsx(Of,{size:13})})]})}function nGn({template:e,onError:n}){const t=pn({mutationFn:Pkn}),r=t.isPending,s=e.supportFiles.length;return _.jsxs("div",{className:YUn,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:JUn,children:[e.entry,s>0&&(s===1?Lun():g_n({count:Jt(s)}))]})]}),_.jsx(oU,{bytes:e.bytes,updatedAt:e.updatedAt}),_.jsx(It,{"data-tip":Z_n(),"data-tip-align":"end","aria-label":nun({name:Ce(e.name)}),disabled:r,onClick:()=>{window.confirm(Qln({name:Ce(e.name)}))&&t.mutateAsync(e.name).catch(i=>{n(i instanceof Error?i.message:String(i))})},children:_.jsx(Of,{size:13})})]})}function rGn(){var y;const e=pn({mutationFn:Hkn}),n=ut(DSn()),t=n.data,r=T.useRef(null),[s,i]=T.useState(!1),[a,o]=T.useState(!1),c=T.useCallback(()=>{const x=r.current;i(!!x&&x.scrollTop>1),o(!!x&&x.scrollHeight-x.scrollTop-x.clientHeight>1)},[]);T.useLayoutEffect(()=>{c();const x=r.current;if(!x)return;const C=new ResizeObserver(c);return C.observe(x),()=>C.disconnect()},[t,c]);const u=n.isFetching,h=(y=n.error)==null?void 0:y.message,[f,p]=T.useState(!1),[m,w]=T.useState(null),k=()=>{n.refetch()},v=T.useRef(!1),b=T.useCallback(async x=>{if(!v.current){if(w(null),!eGn(x.name)){w(odn());return}if(x.size>nU){w(xI());return}v.current=!0,p(!0);try{await e.mutateAsync({filename:x.name,contentBase64:await iU(x)})}catch(C){w(C instanceof Error?C.message:String(C))}finally{v.current=!1,p(!1)}}},[]);return _.jsxs("section",{className:rU,children:[_.jsxs("div",{className:"flex items-baseline gap-2.5",children:[_.jsx("h3",{children:Pfn()}),_.jsxs(De,{className:"ms-auto",size:"small",onClick:k,disabled:u,children:[_.jsx(Ka,{size:12,className:u?"animate-[spin_0.9s_linear_infinite]":""})," ",Mm()]})]}),_.jsx("p",{className:sU,children:lun()}),_.jsx(aU,{accept:".md,.markdown,.zip",busy:f,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:mun()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:zln()})]}),onFile:x=>void b(x)}),m&&_.jsx("div",{role:"alert",className:"mt-2.5 text-base text-accent-red whitespace-pre-wrap",children:m}),h&&_.jsxs("div",{role:"alert",className:"pt-3 text-base text-accent-red",children:[S_n()," ",h]}),t===void 0?h?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(kt,{})," ",ffn()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:Efn()}):_.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(x=>_.jsx(tGn,{skill:x,onError:w},x.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 sGn(){var h;const e=pn({mutationFn:Bkn}),n=ut(OSn()),t=n.data,r=(h=n.error)==null?void 0:h.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(hdn());return}if(f.size>nU){o(xI());return}c.current=!0,i(!0);try{await e.mutateAsync({filename:f.name,contentBase64:await iU(f)})}catch(m){o(m instanceof Error?m.message:String(m))}finally{c.current=!1,i(!1)}},[]);return _.jsxs("section",{className:rU,children:[_.jsx("h3",{children:ifn()}),_.jsx("p",{className:sU,children:edn()}),_.jsx(aU,{accept:".tex,.zip",busy:s,prompt:_.jsxs(_.Fragment,{children:[_.jsx("span",{children:kun()}),_.jsx("span",{className:"block ps-4 mt-1 text-text",children:egn()})]}),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:[T_n()," ",r]}),t===void 0?r?null:_.jsxs("div",{className:"flex items-center gap-2 pt-3 text-sm text-subtext",children:[_.jsx(kt,{})," ",bfn()]}):t.length===0?_.jsx("div",{className:"pt-3 text-sm text-subtext",children:Mfn()}):_.jsx("div",{className:"flex flex-col mt-1",children:t.map(f=>_.jsx(nGn,{template:f,onError:o},f.name))})]})}function iGn(){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:$_n()}),_.jsx("p",{className:"mt-0 mx-0 mb-5 text-base leading-relaxed text-text",children:qun()}),_.jsx(rGn,{}),_.jsx(sGn,{})]})}const aGn="italic [&_.tab-label_>_span]:pe-1 [&_.tab-label::after]:pe-1";function Go({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?aGn:""}`,onClick:i,onDoubleClick:a,title:s?Kmn({label:n}):n,"aria-label":s?Pmn({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:Kje(),onPointerDown:c=>c.preventDefault(),onClick:c=>{c.stopPropagation(),o()},children:_.jsx(xr,{size:12})})]})}const xM=["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 oGn({owner:e,repo:n,branch:t}){return!e||!n?_.jsx("span",{className:xM,children:_.jsx("code",{children:t})}):_.jsxs("a",{className:xM,href:Ub(e,n,t),target:"_blank",rel:"noopener noreferrer",title:Ov({name:Ce(t)}),children:[_.jsx("code",{children:t}),_.jsx(ny,{size:12})]})}const I4=["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(" "),wM=["experiment-overview-command block mt-[13px] text-text text-sm","wrap-anywhere"].join(" ");function kM(e){return new Date(e).toLocaleString(E(),{month:"short",day:"numeric",year:"numeric",hour:"numeric",minute:"2-digit"})}function SM(e,n){return $0((e.endedAt??n)-e.createdAt)}function cGn({experiment:e,parentExperiment:n,project:t,runs:r,onOpenLogs:s,onOpenCode:i}){const a=r[0]??null,o=TI(r),c=r.some(f=>f.status==="running"||f.status==="starting"),[u,h]=T.useState(()=>Date.now());return T.useEffect(()=>{if(!c)return;h(Date.now());const f=window.setInterval(()=>h(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(ml,{status:a?pa(a):"idle"})]}),_.jsxs("div",{className:"experiment-overview-actions flex gap-[7px] mt-4.5 [@media((max-width:_720px))]:flex-wrap",children:[a&&_.jsxs(De,{...Wr(f=>s(a.id,f)),children:[_.jsx(bo,{size:15}),A$e()]}),_.jsxs(De,{...Wr(i),children:[_.jsx(Qb,{size:15}),DIe()]})]}),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:n$e()}),_.jsx(_c,{text:e.description})]}),_.jsxs("section",{className:I4,children:[_.jsx("h2",{children:a?zIe():sBe()}),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(ml,{status:pa(a)}),_.jsx(i6,{backend:a.backend}),_.jsxs("span",{title:Y$e(),children:[_.jsx(f7n,{size:13}),kM(a.createdAt)]}),_.jsxs("span",{title:l$e(),children:[_.jsx(C7n,{size:13}),SM(a,u)]}),a.commitSha&&_.jsxs("span",{title:HIe(),children:[_.jsx(t8n,{size:14}),_.jsx("code",{children:a.commitSha.slice(0,7)})]}),a.exitCode!==null&&a.exitCode!==void 0&&a.exitCode!==0&&_.jsxs("span",{children:[m$e()," ",a.exitCode]})]}),a.command&&_.jsxs("code",{className:wM,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:I4,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(oGn,{owner:t.githubEnabled?t.githubOwner:"",repo:t.githubEnabled?t.githubRepo:"",branch:e.branchName}),n&&_.jsxs("span",{children:[k$e()," ",_.jsx("code",{children:n.slug})]}),_.jsxs("span",{title:kM(e.createdAt),children:[QIe()," ",vo(e.createdAt)]})]}),e.runCommand!==(a==null?void 0:a.command)&&_.jsxs("code",{className:wM,children:["$ ",e.runCommand]})]}),r.length>0&&_.jsxs("section",{className:I4,children:[_.jsx("h2",{children:U$e()}),_.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",{...Wr(m=>s(f.id,m)),children:[_.jsxs("span",{className:"experiment-run-number text-xs font-medium",children:[I$e()," ",r.length-p]}),_.jsx(ml,{status:pa(f)}),_.jsx("span",{children:vo(f.createdAt)}),_.jsx("span",{children:SM(f,u)}),_.jsx(bo,{size:13})]},f.id))})]})]})})}function CM(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}=Yb(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 a5n(e,a);if(i)return;if(f.dataBase64&&r.write(CM(f.dataBase64)),a=f.nextOffset,f.eof)break}}catch{}finally{o=!1,c&&!i&&(c=!1,u())}}const h=qSn(e,f=>{if(i)return;const p=CM(f.dataBase64);!o&&f.offset===a?(r.write(p),a+=p.length):f.offset+p.length>a&&u()});return u(),()=>{i=!0,h(),s()}},[e]),_.jsx("div",{ref:n,className:"h-full w-full"})}function uGn({experiment:e,project:n,view:t,runs:r,selectedRunId:s,onSelectRun:i,parentExperiment:a,onOpenView:o,onOpenCode:c}){const u=r.filter(h=>h.experimentId===e.id).sort((h,f)=>f.createdAt-h.createdAt);return t==="overview"?_.jsx(cGn,{experiment:e,parentExperiment:a,project:n,runs:u,onOpenLogs:(h,f)=>o("terminal",h,f),onOpenCode:h=>c("files",h)}):_.jsx(_Gn,{experiment:e,expRuns:u,selectedRunId:s,onSelectRun:i})}function _Gn({experiment:e,expRuns:n,selectedRunId:t,onSelectRun:r}){const[s,i]=T.useState(null),[a,o]=T.useState(null),[c,u]=T.useState(!1),h=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 b=n.findIndex(y=>y.id===v);return b===-1?n.length:n.length-b};T.useEffect(()=>{if(!c)return;const v=b=>{var y;(y=h.current)!=null&&y.contains(b.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 OI(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(De,{size:"small",variant:"ghost",disabled:m,onClick:()=>void k(),children:[_.jsx(T$,{size:13}),m?KAe():bL()]}),n.length>0&&f&&_.jsxs("div",{className:"run-history relative shrink-0",ref:h,children:[_.jsxs(De,{title:bLe(),"aria-expanded":c,onClick:()=>u(v=>!v),children:[_.jsxs("span",{children:[fz()," ",w(f.id)]}),_.jsx(ml,{status:m?"cancelling":pa(f)}),_.jsx(mc,{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(vn,{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:[fz()," ",w(v.id)]}),_.jsx(ml,{status:pa(v)}),_.jsx("span",{className:"ms-auto text-xs text-muted",children:vo(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(lGn,{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?fo():aLe()})})]})}let zk=!1;function EM(e){zk=!0;try{return window.confirm(e)}finally{zk=!1}}const jk=e=>e.replace(/\r\n/g,` +`),NM=(e,n,t)=>{const r=jk(n);return{path:e,draft:r,baseline:r,version:t,crlf:n.includes(`\r +`),conflict:null}},nl=e=>e.draft!==e.baseline,fGn=(e,n)=>({...e,draft:n,conflict:n===e.baseline?null:e.conflict}),dGn=e=>e.crlf?e.draft.replace(/\n/g,`\r +`):e.draft;function hGn(e,n,t){return!nl(e)||t&&n===e.version?null:{currentVersion:n,exists:t}}class pGn{constructor(){fs(this,"buffer",null);fs(this,"listeners",new Set);fs(this,"saving",!1);fs(this,"saveError",null);fs(this,"revision",0);fs(this,"saveRevision",0);fs(this,"getSnapshot",()=>this.buffer);fs(this,"getRevision",()=>this.revision);fs(this,"subscribe",n=>(this.listeners.add(n),()=>{this.listeners.delete(n)}));fs(this,"set",n=>{this.buffer=n,this.notify()});fs(this,"setSaving",n=>{this.saving=n,n&&this.saveRevision++,this.notify()});fs(this,"saved",(n,t)=>{this.buffer&&this.set({...this.buffer,baseline:n,version:t,conflict:null})});fs(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&&(nl(this.buffer)||this.buffer.conflict!==null)}}function mGn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,ready:a,source:o}){var Z,J,$;const c=ut({...zNn(),enabled:r,subscribed:r}),u=((Z=c.data)==null?void 0:Z.engine)??(c.isPending?void 0:null),h=((J=c.data)==null?void 0:J.hint)??null,f=(($=c.data)==null?void 0:$.installCommand)??null,[p,m]=T.useState(!1),[w,k]=T.useState(null),[v,b]=T.useState(null),[y,x]=T.useState(!1),[C,N]=T.useState(null),[j,A]=T.useState(null),[z,M]=T.useState(!1),[D,I]=T.useState(0),B=T.useCallback(L=>{M(L),L&&I(F=>F+1)},[]),G=T.useRef(o);G.current=o;const q=T.useRef(!1),Q=T.useRef(null),K=T.useCallback(()=>{if(q.current)return;Q.current=n,q.current=!0,m(!0);const L=G.current;A(null),b(null),N(null),g5n(e,n,{sessionId:t}).then(F=>{var H,oe;const U=F.pdfPath;if(F.ok&&U){k(ae=>({path:U,version:((ae==null?void 0:ae.version)??0)+1,source:L})),x(F.hadErrors),N(F.note),F.hadErrors&&b(((H=F.log)==null?void 0:H.trim())||null),B(!0);return}k(null),x(!1),N(F.note),M(!1),b(((oe=F.log)==null?void 0:oe.trim())||Ctt())}).catch(F=>{k(null),x(!1),N(null),M(!1),A(F instanceof Error?F.message:String(F))}).finally(()=>{q.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:h,installCommand:f,compiling:p,compiled:w,stale:w!==null&&w.source!==o,log:v,builtWithErrors:y,note:C,error:j,showPdf:z,setShowPdf:B,viewNonce:D,compile:()=>{i==null||i(),K()},dismiss:()=>{A(null),b(null)}}}const gGn=3e4,vGn=3e4,bGn=5*6e4;function yGn({projectId:e,filePath:n,sessionId:t,enabled:r,autoRun:s=!0,onManualAction:i,savedSource:a,dirty:o,onPulled:c}){var ue,se,V,ne;const u=T.useMemo(()=>ANn(e,n,{sessionId:t}),[e,n,t]),h=ut({...u,enabled:r,subscribed:r}),f=((ue=h.data)==null?void 0:ue.hasToken)??!1,p=((se=h.data)==null?void 0:se.hasSession)??!1,m=((V=h.data)==null?void 0:V.link)??null,w=!h.isPending,[k,v]=T.useState(null),[b,y]=T.useState(0),[x,C]=T.useState(!1),[N,j]=T.useState(null),[A,z]=T.useState(null),[M,D]=T.useState(!1),I=T.useCallback(ce=>{zn(u.queryKey)&&tt.setQueryData(u.queryKey,he=>he&&{...he,hasSession:ce})},[u]),B=T.useCallback(ce=>{zn(u.queryKey)&&tt.setQueryData(u.queryKey,ce)},[u]);T.useEffect(()=>{j(null),y(0),L.current=!1,z(null),D(!1),K.current=!1},[r,e,n,t]),T.useEffect(()=>{D(!1)},[a]);const G=T.useRef(!1),q=T.useRef(c);q.current=c;const Q=T.useRef(o);Q.current=o;const K=T.useRef(!1),Z=T.useCallback(ce=>!f||!m||G.current||Q.current?!1:(G.current=!0,C(!0),z(null),N5n(e,n,{sessionId:t,resolve:ce}).then(he=>{K.current=!1,j(he),he.pulled.includes(n)&&(Q.current?D(!0):q.current(he.pulled))}).catch(he=>{K.current=!0,j(null),z(he instanceof Error?he.message:String(he))}).finally(()=>{G.current=!1,C(!1)}),!0),[e,n,t,f,m]),J=T.useRef(null),$=(k==null?void 0:k.state)==="live";T.useEffect(()=>{if(!r||!s||!w||!f||!m||o||$)return;const ce=`${n}:${m.projectId}:${a}`;J.current!==ce&&Z()&&(J.current=ce)},[r,s,w,f,m,n,a,o,x,Z,$]);const L=T.useRef(!1);!x&&N&&N.conflicts.length===0&&!A&&(L.current=!0);const F=r&&w&&!!m&&f&&p&&L.current,U=T.useRef(null),H=T.useRef(Promise.resolve()),oe=T.useRef(!1);oe.current=(k==null?void 0:k.state)==="stopped"&&k.error!=null;const ae=T.useRef(!1);return T.useEffect(()=>{if(!F)return;let ce=!1;const he=()=>{const Ae=ae.current;ae.current=!1,!(!Ae&&oe.current)&&(H.current=H.current.then(()=>{if(!ce)return w5n(e,n,{sessionId:t,retry:Ae}).then(Pe=>{var Ye;ce||((U.current===null||((Ye=Pe.status)==null?void 0:Ye.state)==="stopped")&&v(Pe.status),U.current=Pe.key)}).catch(Pe=>{ce||v({state:"stopped",error:Pe instanceof Error?Pe.message:String(Pe),needsSession:!1,note:null})})}))};he();const me=setInterval(he,vGn);return()=>{ce=!0,clearInterval(me),U.current=null,v(null),H.current=H.current.then(()=>k5n(e,n,{sessionId:t})).catch(()=>{})}},[F,b,e,n,t]),T.useEffect(()=>QSn(ce=>{if(ce.key===U.current){if(ce.type==="live"){v(ce.status);return}ce.paths.includes(n)&&(Q.current?D(!0):q.current(ce.paths))}}),[n]),T.useEffect(()=>{if(!r||!s||!w||!f||!m||o||$)return;const ce=setInterval(()=>{G.current||K.current||tt.fetchQuery({...TNn(e,n,{sessionId:t}),staleTime:0}).then(he=>{he.remoteChanged&&Z()}).catch(he=>{K.current=!0,z(he instanceof Error?he.message:String(he))})},gGn);return()=>clearInterval(ce)},[r,s,w,f,m,o,e,n,t,Z,$]),T.useEffect(()=>{if(!r||!s||!w||!f||!m||!$)return;const ce=setInterval(Z,bGn);return()=>clearInterval(ce)},[r,s,w,f,m,$,Z]),{hasToken:f,hasSession:p,live:k,retryLive:()=>{ae.current=!0,y(ce=>ce+1)},link:m,loaded:w,syncing:x,last:N,error:A??((ne=h.error)==null?void 0:ne.message)??null,blocked:o,staleOnDisk:M,reloaded:()=>D(!1),uploadUrl:j5n(e,n,{sessionId:t}),saveToken:async ce=>{const he=await LI(ce);J.current=null,K.current=!1,z(null),zn(u.queryKey)&&tt.setQueryData(u.queryKey,me=>me&&{...me,hasToken:he.hasToken})},saveSession:async ce=>{const he=await II(ce,{host:m==null?void 0:m.host});I(he.hasSession),ae.current=!0,y(me=>me+1)},importSession:async()=>{const ce=await x5n({host:m==null?void 0:m.host});return I(ce.hasSession),ae.current=!0,y(he=>he+1),ce.source},linkProject:async ce=>{j(null),v(null),L.current=!1,J.current=null,B(await C5n(e,n,{project:ce,sessionId:t})),i==null||i()},unlink:async()=>{B(await E5n(e,n,{sessionId:t})),J.current=null,K.current=!1,j(null),z(null)},sync:ce=>{K.current=!1,Z(ce)&&(J.current=`${n}:${m==null?void 0:m.projectId}:${a}`,i==null||i())}}}const zM=[{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"]}],xGn=4e6,wGn=200,jM=16e6,kGn=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)}),AM=e=>e.startsWith("//")?`https:${e}`:e;async function SGn(e,n){var s;let t=xGn;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>=wGn)continue;r.set(o,null);const u=await fetch(o,{signal:n}).catch(()=>null);if(!(u!=null&&u.ok))continue;const h=u.headers.get("content-type")??"",f=Number(u.headers.get("content-length"));if(!c.some(w=>h.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 kGn(p);!p||!m||(t-=p.size,r.set(o,m),i.setAttribute(a,m))}}async function CGn(e,n,t){var a;const r=new DOMParser().parseFromString(e,"text/html"),s=[];for(const o of r.querySelectorAll(zM.map(c=>c.selector).join(", ")))for(const{selector:c,attribute:u,typePrefixes:h}of zM){if(!o.matches(c))continue;const f=o.getAttribute(u);if(!f)continue;const p=n(f);p&&(p===f?o.setAttribute(u,AM(f)):s.push({element:o,attribute:u,url:p,typePrefixes:h}))}await SGn(s,t);for(const o of r.querySelectorAll("a[href]")){const c=o.getAttribute("href");!c||!pC(c)||(o.setAttribute("href",AM(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 EGn(e,n,t,r){var o;if(!n)return{text:e,partial:!1};const s=await fetch(t,{signal:r,headers:{Range:`bytes=0-${jM-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>jM}}function NGn({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),EGn(e,n,t,c.signal).then(async({text:u,partial:h})=>({source:await CGn(u,s,c.signal),partial:h})).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(kt,{})," ",CL()]}):_.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:IUe()}),_.jsx("iframe",{className:"block min-h-0 flex-1 w-full border-0 bg-white",title:UUe({name:Ce(r)}),sandbox:"allow-scripts allow-popups allow-downloads",referrerPolicy:"no-referrer",srcDoc:i.source})]})}function zGn({overleaf:e}){var f;const n=T.useRef(null),{open:t,setOpen:r,ref:s}=Vi(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,h=u?L3():c?vbt():!e.hasToken||!e.link?Mwt():e.syncing?UL():e.blocked?qL():PL();return T.useEffect(()=>{c&&r(!0)},[c,r]),T.useEffect(()=>{u&&Zt(L3(),"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=b=>{var y;b.target instanceof Node&&!((y=s.current)!=null&&y.contains(b.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(It,{ref:n,size:"small",active:t,disabled:!e.loaded,"data-tip":h,"data-tip-align":"end","aria-label":yJ({status:h}),"aria-haspopup":"dialog","aria-expanded":t,"aria-controls":t?i:void 0,onClick:()=>r(!t),children:e.syncing?_.jsx(kt,{}):_.jsx(j7n,{size:13,className:u||c?"text-accent-red":e.hasToken&&e.link?"text-accent-green":void 0})}),t&&ii.createPortal(_.jsxs("div",{ref:s,id:i,role:"dialog","aria-label":lI(),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(It,{size:"small","aria-label":sUe(),onClick:()=>{var p;r(!1),(p=n.current)==null||p.focus()},children:_.jsx(xr,{size:13})})}),_.jsx(MGn,{overleaf:e})]}),document.body)]})}const L1=e=>_a(new Intl.ListFormat(E()).format(e.map(Ce)));function jGn(e){if(e.error)return syt();if(e.syncing)return UL();if(e.blocked)return qL();const n=e.last;return n?n.pulled.length&&n.pushed.length?V2t({pulled:L1(n.pulled),pushed:L1(n.pushed)}):n.pulled.length?B2t({paths:L1(n.pulled)}):n.pushed.length?J2t({paths:L1(n.pushed)}):n.conflicts.length?ixt():PL():C2t()}function AGn({href:e}){return _.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:e,target:"_blank",rel:"noreferrer",children:HL()})}function TGn(e){return e.state==="live"?Cyt():e.state==="connecting"?vyt():e.error??Byt()}function TM({overleaf:e,replacing:n}){const[t,r]=T.useState(""),[s,i]=T.useState(!1),[a,o]=T.useState(!1),[c,u]=T.useState(null),h=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?Vwt():n?awt():$bt();return _.jsxs("div",{className:"flex flex-col gap-1.5",children:[_.jsx("p",{className:"text-sm text-subtext",children:f}),a&&_.jsx(Br,{className:"basis-full min-w-0","aria-label":D3(),type:"password",value:t,onChange:p=>r(p.target.value),placeholder:D3(),autoComplete:"off"}),_.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s&&_.jsx(kt,{}),a?_.jsx(De,{type:"button",disabled:s||!t.trim(),onClick:()=>h(()=>e.saveSession(t.trim())),children:s?Sa():_bt()}):_.jsx(De,{type:"button",disabled:s,onClick:()=>h(e.importSession),children:Gbt()}),_.jsx(De,{variant:"ghost",type:"button",disabled:s,onClick:()=>o(!a),children:a?FL():R2t()})]}),c&&_.jsx("div",{role:"alert",className:"text-sm text-accent-red whitespace-pre-wrap break-words",children:c})]})}function RGn({overleaf:e}){if(!e.hasSession)return _.jsx(TM,{overleaf:e});const n=e.live;if(!n)return _.jsx("p",{className:"text-sm text-subtext",children:Vyt()});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:TGn(n)})]}),n.note&&_.jsx("p",{className:"text-sm text-accent-amber",children:n.note}),n.state==="stopped"&&!t&&_.jsx("div",{children:_.jsx(De,{onClick:e.retryLive,children:Ryt()})}),t&&_.jsx(TM,{overleaf:e,replacing:!0})]})}function MGn({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)},h=!e.hasToken||o;async function f(k){k.preventDefault();const v=n.trim();if(!(r||!v)){s(!0),a(null);try{h?(await e.saveToken(v),c(!1)):await e.linkProject(v),t("")}catch(b){a(b instanceof Error?b.message:String(b))}finally{s(!1)}}}if(e.link&&!h){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(kt,{}),e.error?L3():jGn(e)]}),e.error&&_.jsx("p",{className:"text-sm text-text whitespace-pre-wrap break-words",children:e.error})]}),_.jsx(RGn,{overleaf:e}),_.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[_.jsx(De,{variant:e.error?"primary":"default",disabled:e.syncing||e.blocked,"data-tip":e.blocked?dwt():((m=e.live)==null?void 0:m.state)==="live"?i4t():void 0,onClick:()=>e.sync(),children:e.error?ri():Zxt()}),_.jsxs(jh,{variant:"ghost",href:e.link.url,target:"_blank",rel:"noreferrer",children:[Bxt()," ",_.jsx(mf,{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})," ",Cxt()]}),_.jsxs("div",{className:"flex flex-wrap gap-2",children:[_.jsx(De,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"keep-local"}),children:Rxt()}),_.jsx(De,{disabled:e.syncing||e.blocked,onClick:()=>e.sync({[v]:"take-overleaf"}),children:v2t()})]})]},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:RS()})}),_.jsxs("div",{className:"mt-2 flex flex-col items-start gap-1",children:[_.jsx(De,{variant:"ghost",className:"font-normal",type:"button",onClick:u,children:Wz()}),_.jsx(jh,{variant:"ghost",className:"font-normal",href:e.uploadUrl,target:"_blank",rel:"noreferrer",children:HL()}),_.jsx(De,{variant:"ghost",className:"font-normal",disabled:e.syncing,onClick:()=>void e.unlink().catch(v=>{a(v instanceof Error?v.message:String(v))}),children:i2t()})]})]})]})}return _.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:f,children:[_.jsx("div",{className:"pe-8 text-sm text-subtext",children:h?v4t():C4t()}),_.jsxs("div",{className:"flex items-center flex-wrap gap-2",children:[_.jsx(Br,{className:"basis-full min-w-0","aria-label":h?Vz():Kz(),"aria-invalid":!!i,type:h?"password":"text",value:n,onChange:k=>t(k.target.value),placeholder:h?Vz():"https://www.overleaf.com/project/…",autoComplete:"off"}),_.jsx(De,{type:"submit",disabled:r||!n.trim(),children:r?h?Sa():ya():h?Ewt():_yt()}),_.jsx("a",{className:"text-sm text-subtext whitespace-nowrap",href:h?"https://www.overleaf.com/user/settings":"https://www.overleaf.com/project",target:"_blank",rel:"noreferrer",children:h?Cbt():Kz()})]}),(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(AGn,{href:e.uploadUrl}),o?_.jsx(De,{variant:"ghost",type:"button",onClick:()=>c(!1),children:FL()}):e.hasToken&&_.jsx(De,{variant:"ghost",type:"button",onClick:u,children:Wz()})]})]})}function OGn({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(It,{"data-tip":n==="copied"?_f():n==="select"?wKe():ZHe(),"aria-label":vqe(),onClick:()=>void s(),children:n==="copied"?_.jsx(yi,{size:13}):_.jsx(Zu,{size:13})})]})}function DGn(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 LGn({projectId:e,path:n,source:t="repo",sessionId:r,gitRef:s,line:i,branchLabel:a,onOpenFile:o,scrollPosition:c,onScrollPositionChange:u,lineScrollRequest:h,onLineScrollRequestHandled:f,onEdit:p,artifactVersion:m,artifactEntries:w=[],bufferSession:k,remote:v=!1,restored:b=!1,onRestoreActivated:y,showSource:x=!1,onShowSourceChange:C}){var Ts,Fr;const N=H6(e,n,t??"repo",r,s),j=ut({...N,enabled:!k.saving}),A=j.data??null,z=((Ts=j.error)==null?void 0:Ts.message)??null,M=We=>{Kr(N.queryKey,vt=>(typeof We=="function"?We(vt??null):We)??void 0)},[D,I]=T.useState(0),B=t==="artifacts",G=t==="abs",q=KC(n),Q=qq(n),K=jUn(n),Z=q||K,[J,$]=T.useState(!1),L=!b||J,F=()=>{$(!0),y==null||y()};T.useSyncExternalStore(k.subscribe,k.getRevision);const U=k.getSnapshot(),H=k.set,oe=k.saving,ae=k.setSaving,ue=k.saveRevision,se=k.saveError,V=k.setSaveError,ne=T.useRef(null),ce=T.useRef(null),[he,me]=T.useState(!1),[Ae,Pe]=T.useState(null),Ye=T.useRef(c),Re=(A==null?void 0:A.file)??null,$e=U&&nl(U)?U.path:(A==null?void 0:A.source)==="checkout"?A.file.path:n,yt=$e.split("/").slice(0,-1).join("/"),ot=(A==null?void 0:A.source)==="artifact",Mt=T.useCallback(We=>{var vt;return((vt=H5(yt,We,G))==null?void 0:vt.path)??null},[G,yt]),jt=T.useCallback(We=>G?DI(We):ot?Bu(e,We):G3(e,We,{sessionId:r,ref:s}),[ot,s,G,e,r]),Pt=T.useCallback(We=>{if(pC(We))return We;const vt=H5(yt,We,G);return vt?eDn(jt(vt.path),vt):null},[G,yt,jt]),Ie=Vq(Re==null?void 0:Re.presentation),nt=(A==null?void 0:A.source)==="artifact"&&!B,ke=B&&(A==null?void 0:A.source)==="checkout",ge=!s&&(A==null?void 0:A.source)==="checkout"&&Re!=null&&!Re.notFound,je=r!=null&&(A==null?void 0:A.source)==="checkout"&&A.file.root==="clone",qe=ge&&Re!=null&&!Re.binary&&!Re.truncated&&!Ie&&!je,rt=qe&&Re.version===void 0,dt=U!==null&&nl(U),st=!rt&&(qe&&typeof Re.version=="string"||dt),Ut=(U==null?void 0:U.draft)??jk((Re==null?void 0:Re.content)??""),Xt=(U==null?void 0:U.baseline)??jk((Re==null?void 0:Re.content)??""),en=st&&U!==null&&nl(U),an=U!==null&&!dt&&typeof(Re==null?void 0:Re.version)=="string"&&U.version!==Re.version,At=j.isFetching||an?void 0:h,gn=async We=>{const vt=k.getSnapshot();if(!st||!vt||!nl(vt))return!0;if(k.saving)return!1;if(vt.conflict&&We===void 0)return V(vt.conflict.exists?dz():mz()),!1;const fr=vt.draft,yn=dGn(vt);ae(!0),V(null);try{await tt.cancelQueries(N);const Hn=await _5n(e,$e,yn,{sessionId:r,expectedVersion:We??vt.version});return k.getSnapshot()?(k.saved(fr,Hn.version),M(Fn=>Fn&&Fn.source==="checkout"?{source:"checkout",file:{...Fn.file,content:yn,version:Hn.version}}:Fn),!0):!1}catch(Hn){if(Hn instanceof q3){const Zn=k.getSnapshot();return!Zn||!nl(Zn)||H({...Zn,conflict:{currentVersion:Hn.currentVersion,exists:Hn.exists}}),!1}return V(Hn instanceof Error?Hn.message:String(Hn)),!1}finally{ae(!1)}},on=Q&&ge&&!je,Ot=mGn({projectId:e,filePath:$e,sessionId:r,enabled:on,autoRun:L,onManualAction:F,ready:Re!=null&&!Re.notFound,source:st?Ut:(Re==null?void 0:Re.content)??""}),dn=yGn({projectId:e,filePath:$e,sessionId:r,enabled:on,autoRun:L,onManualAction:F,savedSource:Xt,dirty:en,onPulled:T.useCallback(We=>{We.includes($e)&&I(vt=>vt+1)},[$e])}),cn=Q&&Ot.showPdf&&Ot.compiled!=null,kn=rt&&dt,Wn=(st||kn)&&!(Z&&!x)&&!cn,vs=Re!==null&&!Re.notFound&&!Re.binary&&!Ie&&!cn,ns=vs&&!Wn&&(!K||x),gt=async()=>{if(Re)try{if(Re.truncated&&!Wn){const We=fetch(jt($e)).then(async vt=>{if(!vt.ok)throw new Error;return new Blob([await vt.text()],{type:"text/plain"})});await navigator.clipboard.write([new ClipboardItem({"text/plain":We})])}else await navigator.clipboard.writeText(Wn?Ut:Re.content);me(!0),window.setTimeout(()=>me(!1),1500)}catch{Zt(_qe(),"error")}},ln=We=>{if(!We.metaKey&&!We.ctrlKey||We.altKey||We.shiftKey||We.key.toLowerCase()!=="a"||!(We.target instanceof Node)||!We.currentTarget.contains(We.target))return;const vt=ce.current;if(!vt)return;We.preventDefault();const fr=document.createRange();fr.selectNodeContents(vt);const yn=window.getSelection();yn==null||yn.removeAllRanges(),yn==null||yn.addRange(fr)},bn=Ot.compiled?`${G3(e,Ot.compiled.path,{sessionId:r})}&v=${Ot.compiled.version}`:null,un=bn?`${bn}&view=${Ot.viewNonce}#toolbar=0&navpanes=0&statusbar=0`:null,_r=Ot.compiled?Ot.compiled.path.split("/").pop()??Ot.compiled.path:null,Mn=async()=>{en&&!await gn()||Q&&Ot.engine&&Ot.compile()},Qn=async()=>{en&&(L?await Mn():await gn())},ar=DGn(()=>d5n(e,$e,{sessionId:r})),wt=v?nVe():Re!=null&&Re.notFound?Lv():s?wS({branch:Ce(s)}):ge?null:lVe(),Ht=T.useCallback(()=>{k.saving||I(We=>We+1)},[k]),vr=()=>{H(null),V(null),Ht()},Pn=Qq(jt($e),!s&&!oe);T.useEffect(()=>{if(!z||s)return;const We=window.setInterval(()=>{document.visibilityState!=="hidden"&&Ht()},2e3);return()=>window.clearInterval(We)},[z,s,Ht]);const Qr=`${jt($e)}&v=${encodeURIComponent(Pn??m??"")}&reload=${D}`;T.useEffect(()=>{var yn,Hn;if(!A||k.saving)return;const We=A,vt=k.getSnapshot();if(vt&&nl(vt)){const Zn=We.source==="checkout"?We.file:null,Fn=Zn!==null&&Zn.path===vt.path&&(!r||Zn.root==="worktree"),Yr=hGn(vt,Fn&&typeof Zn.version=="string"?Zn.version:null,Fn&&!Zn.notFound);Yr&&(Yr.currentVersion!==((yn=vt.conflict)==null?void 0:yn.currentVersion)||Yr.exists!==((Hn=vt.conflict)==null?void 0:Hn.exists))?H({...vt,conflict:Yr}):!Yr&&vt.conflict&&H({...vt,conflict:null})}(!vt||!nl(vt)&&(vt.version!==We.file.version||vt.path!==We.file.path))&&We.source==="checkout"&&!We.file.notFound&&!We.file.binary&&!We.file.truncated&&typeof We.file.version=="string"&&(H(NM(We.file.path,We.file.content,We.file.version)),V(null))},[A,k,r,oe,ue,U]);const Xn=JSON.stringify(N.queryKey),Yn=T.useRef({sourceKey:Xn,nonce:D,artifactVersion:m,diskVersion:Pn});T.useEffect(()=>{const We=Yn.current;Yn.current={sourceKey:Xn,nonce:D,artifactVersion:m,diskVersion:Pn},We.sourceKey===Xn&&(We.nonce!==D||We.diskVersion!==null&&We.diskVersion!==Pn||We.artifactVersion!=null&&We.artifactVersion!==m)&&RNn(e,n,t??"repo",r,s)},[Xn,D,m,Pn,e,n,t,r,s]),T.useLayoutEffect(()=>{const We=ne.current,vt=Ye.current;!We||!Re||!vt||(We.scrollTop=vt.top,We.scrollLeft=vt.left)},[Re]);const Xr=We=>{if(We.source==="absolute")return kGe();if(B)return lGe({root:r?o1():a1()});if(s)return mGe({branch:Ce(s)});if(r&&We.source==="checkout"&&We.file.root==="clone")return xWe();const vt=We.source==="checkout"?We.file.root:We.checkoutRoot;return AGe({root:vt==="worktree"?o1():a1()})};return _.jsx(ly,{value:A?w5(A,r,s):{sessionId:r,ref:s},children:_.jsxs("div",{className:"file-view flex flex-col h-full min-h-0 min-w-0",onKeyDown:ln,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(wf,{name:$e}),_.jsx("span",{className:"file-view-path flex-1 min-w-0 truncate text-sm text-subtext","data-tip":Ce($e),children:$e.split("/").pop()||$e}),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:PX({branch:Ce(a)}),children:[_.jsx(Im,{size:11}),a]}),Wn&&(oe||en||se)&&_.jsx("span",{className:`file-view-save-status inline-flex items-center gap-1 text-sm shrink-0 ${se?"text-accent-red":"text-muted"}`,title:se??(oe?Sa():oWe()),children:oe?_.jsxs(_.Fragment,{children:[_.jsx(kt,{})," ",pKe()]}):se?cKe():EL()}),_.jsx("div",{ref:Pe,className:"contents"}),Q&&Ot.compiled&&_.jsx(It,{size:"small",active:!Ot.showPdf,"data-tip":Ot.stale&&Ot.showPdf?AVe():Ot.showPdf?Pd():xz(),"data-tip-align":"end","aria-label":Ot.showPdf?Pd():xz(),onClick:()=>Ot.setShowPdf(!Ot.showPdf),children:Ot.showPdf?_.jsx(_5,{size:13}):_.jsx(Wb,{size:13,className:Ot.stale?"text-accent-amber":void 0})}),Q&&bn&&_r&&_.jsx(Wh,{size:"small","data-tip":Ot.stale?gUe({name:Ce(_r)}):Mv({name:Ce(_r)}),"data-tip-align":"end","aria-label":Mv({name:Ce(_r)}),href:bn,download:_r,children:_.jsx(Kb,{size:13,className:Ot.stale?"text-accent-amber":void 0})}),on&&_.jsx(zGn,{overleaf:dn}),Q&&ge&&_.jsx(It,{size:"small","data-tip":Ot.compiled?yz():hz(),"data-tip-align":"end","aria-label":Ot.compiled?yz():hz(),disabled:Ot.compiling||!Ot.engine,onClick:()=>void Mn(),children:Ot.compiling?_.jsx(kt,{}):_.jsx(B7n,{size:13})}),Z&&_.jsx(It,{size:"small",active:x,"data-tip":x?Dv():Pd(),"data-tip-align":"end","aria-label":x?Dv():Pd(),onClick:()=>C==null?void 0:C(!x),children:_.jsx(_5,{size:13})}),vs&&_.jsx(It,{size:"small","data-tip":he?_f():pz(),"data-tip-align":"end","aria-label":he?_f():pz(),onClick:()=>void gt(),children:he?_.jsx(yi,{size:13}):_.jsx(Zu,{size:13})}),Re!=null&&_.jsx(_.Fragment,{children:_.jsx(It,{size:"small","data-tip":wt??ar.error??bz(),"data-tip-align":"end","aria-label":bz(),"aria-description":wt??void 0,disabled:ar.busy||wt!=null,onClick:()=>void ar.trigger(),children:ar.busy?_.jsx(kt,{}):_.jsx(mf,{size:13})})})]}),A&&!A.file.notFound&&_.jsx(XC,{projectId:e,request:w5(A,r,s),remote:v}),!z&&ke&&(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:IGe({root:A.file.root==="worktree"?o1():a1()})}),rt&&_.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:hWe()}),z&&Re!==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:[vz()," ",Ce(z)]}),(U==null?void 0:U.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:U.conflict.exists?dz():mz()}),((Fr=U==null?void 0:U.conflict)==null?void 0:Fr.exists)&&U.conflict.currentVersion&&_.jsx(De,{disabled:oe,onPointerDown:We=>We.preventDefault(),onClick:()=>{var We;return void gn(((We=U.conflict)==null?void 0:We.currentVersion)??void 0)},children:kVe()}),_.jsx(De,{disabled:oe,onPointerDown:We=>We.preventDefault(),onClick:vr,children:QVe()})]}),(Ot.error||Ot.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 ${Ot.builtWithErrors?"text-subtext":"text-accent-red"}`,children:Ot.error??(Ot.builtWithErrors?GHe():RHe())}),_.jsx(It,{"data-tip":Uqe(),"data-tip-align":"end","aria-label":Yqe(),onClick:Ot.dismiss,children:_.jsx(xr,{size:13})})]}),Ot.log&&_.jsx("pre",{className:"mt-1.5 mb-0 font-mono text-xs text-subtext whitespace-pre-wrap wrap-anywhere",children:Ot.log})]}),on&&dn.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:mVe()}),_.jsx(De,{onClick:()=>{dn.reloaded(),I(We=>We+1)},children:Tqe()})]}),Q&&ge&&Ot.engine===null&&Ot.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:[Ot.installHint,Ot.installCommand&&_.jsx(OGn,{command:Ot.installCommand})]}),Ot.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:Ot.note}),cn&&Ot.stale&&_.jsx("div",{className:"file-view-note shrink-0 border-b border-b-border-variant py-2 px-4 text-sm text-subtext",children:FKe()}),_.jsxs("div",{ref:ne,className:"file-view-body flex-1 min-h-0 overflow-auto bg-background",tabIndex:ns?0:void 0,onScroll:We=>{const vt={top:Math.max(0,We.currentTarget.scrollTop),left:Math.max(0,We.currentTarget.scrollLeft)};Ye.current=vt,u==null||u(vt)},children:[!Wn&&!z&&!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:WKe()}),!Wn&&!z&&(A==null?void 0:A.source)==="artifact"&&!A.file.notFound&&nt&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:fHe({root:A.checkoutRoot==="worktree"?o1():a1()})}),z&&Re===null?_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[vz()," ",Ce(z)]}):Re===null?_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:CL()}):Wn?_.jsx(OB,{value:Ut,onChange:We=>{const vt=k.getSnapshot()??(Re&&typeof Re.version=="string"?NM(Re.path,Re.content,Re.version):null);vt&&H(fGn(vt,We)),p==null||p(),se&&V(null)},onSave:()=>void Qn(),onBlur:()=>{zk||Qn()},readOnly:kn,path:n,highlightLine:i,scrollRequest:At,onScrollRequestHandled:f,scrollPosition:Ye.current,onScrollPositionChange:We=>{Ye.current=We,u==null||u(We)}}):Re.notFound?_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:A?Xr(A):Lv()}):Ie?_.jsx(yb.Provider,{value:Ae,children:_.jsx(Nk,{kind:Ie,url:Qr,name:n.split("/").pop()??n})}):Re.binary?_.jsxs("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:[bHe()," ",_.jsx("a",{href:Qr,download:n.split("/").pop()??n,children:SL()})]}):cn&&un&&_r?_.jsx(yb.Provider,{value:Ae,children:_.jsx(Nk,{kind:"pdf",url:un,name:_r,download:!1},un)}):q&&!x?_.jsx("div",{ref:ce,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:ot?_.jsx(eU,{projectId:e,folder:yt,markdown:Re.content,entries:w}):_.jsx(_c,{text:Re.content,resolveFilePath:Mt,resolveImageSrc:Pt,onOpenFile:o&&((We,vt,fr,yn,Hn)=>o(We,r,s,Hn))})}):K&&!x?_.jsx(NGn,{html:Re.content,truncated:Re.truncated,url:Qr,name:$e,resolveSrc:Pt}):_.jsxs(_.Fragment,{children:[_.jsx("div",{ref:ce,children:_.jsx(Gq,{text:Re.content,path:n,highlightLine:i,scrollRequest:At,onScrollRequestHandled:f})}),Re.truncated&&_.jsx("div",{className:"file-view-note py-2.5 px-4 text-sm text-muted",children:AUe()})]})]})]})})}const $4=["project-menu-label inline-flex items-center gap-2 min-w-0 overflow-hidden","text-ellipsis whitespace-nowrap"].join(" ");function IGn({projectName:e,onHome:n,onNewProject:t,onRepository:r,onCollapse:s}){const{open:i,setOpen:a,ref:o}=Vi(),c=T.useRef(null);return T.useEffect(()=>{if(!i)return;const u=h=>{var f;h.key==="Escape"&&((f=c.current)==null||f.focus())};return document.addEventListener("keydown",u,!0),()=>document.removeEventListener("keydown",u,!0)},[i]),_.jsx("div",{className:"rail-brand px-3 py-1.5 border-b border-border shrink-0",children:_.jsxs("div",{className:"project-switcher relative min-w-0",ref:o,children:[_.jsxs("div",{className:"flex h-7 items-center justify-between gap-1 px-0.5",children:[_.jsx(It,{size:"small",className:"project-back text-text","aria-label":kz(),onClick:n,children:_.jsx(B0,{size:18})}),_.jsx("span",{className:"brand-project-label flex-1 text-xs font-medium tracking-wide uppercase text-subtext",children:RL()}),s&&_.jsx(It,{size:"small","data-tip":Sz(),"data-tip-align":"end","aria-label":Sz(),onClick:s,children:_.jsx(P$,{size:18})})]}),_.jsxs("button",{ref:c,className:`brand group flex h-8 w-full min-w-0 items-center gap-2 rounded-md px-2 text-start text-text hover:bg-surface focus-visible:outline-2 focus-visible:outline-text ${i?"open bg-surface":""}`,onClick:()=>a(u=>!u),"aria-expanded":i,children:[_.jsx("span",{className:"brand-project min-w-0 flex-1 truncate text-xl font-semibold",children:e}),_.jsx(mc,{className:`project-chevron shrink-0 text-muted transition-opacity group-hover:opacity-100 group-focus-visible:opacity-100 ${i?"rotate-180 opacity-100":"opacity-0"}`,size:14})]}),i&&_.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 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 project-menu w-52.5 z-70",children:[_.jsx(vn,{onClick:()=>{a(!1),r()},children:_.jsxs("span",{className:$4,children:[_.jsx(D$,{size:14}),LZe()]})}),_.jsx(vn,{onClick:()=>{a(!1),n()},children:_.jsxs("span",{className:$4,children:[_.jsx(I$,{size:14}),kz()]})}),_.jsx(vn,{onClick:()=>{var u;(u=c.current)==null||u.focus(),a(!1),t()},children:_.jsxs("span",{className:$4,children:[_.jsx(K7n,{size:14}),qZe()]})})]})]})})}function $Gn(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 h=(n.get(c)??[]).some(f=>f.archived||i(f.id));return r.set(c,h),h}function a(c){const u=s.get(c);if(u!==void 0)return u;const h=(n.get(c)??[]).some(f=>!f.archived||a(f.id));return s.set(c,h),h}const o=new Map;for(const c of e){let u=!1,h=!1,f=c.parentExperimentId?t.get(c.parentExperimentId):void 0;for(;f;)f.archived?h=!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&&h,restoreDown:i(c.id)})}return o}function cU({id:e,name:n,actions:t,onArchive:r,compact:s=!1}){const i=T.useRef(null),a=Vi(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)},h=(f,p)=>{a.setOpen(!1),r(e,f,p)};return _.jsxs("div",{className:"nodrag ms-auto shrink-0",children:[s?_.jsx(It,{type:"button",ref:i,size:"small",className:"node-action","aria-label":bj({name:n}),"aria-expanded":a.open,onClick:u,children:_.jsx(Lm,{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":bj({name:n}),"aria-expanded":a.open,onClick:u,children:q1n()}),a.open&&ii.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(vn,{onClick:()=>h("ancestors",!0),children:j1n()}),t.archiveOnly&&_.jsx(vn,{onClick:()=>h("only",!0),children:nvn()}),t.archiveDown&&_.jsx(vn,{onClick:()=>h("descendants",!0),children:L1n()}),t.restoreOnly&&_.jsx(vn,{onClick:()=>h("only",!1),children:EI()}),t.restoreAbove&&_.jsx(vn,{onClick:()=>h("ancestors",!1),children:nbn()}),t.restoreDown&&_.jsx(vn,{onClick:()=>h("descendants",!1),children:mbn()})]}),document.body)]})}function BGn({runs:e,experiments:n,archiveActions:t,emptyHint:r,onOpen:s,onOpenLogs:i,onOpenCode:a,onArchive:o,onCancel:c}){const[u,h]=T.useState(new Set),[f,p]=T.useState(null),m=new Map;for(const v of e){const b=m.get(v.experimentId);b?b.push(v):m.set(v.experimentId,[v])}for(const v of m.values())v.sort((b,y)=>y.createdAt-b.createdAt);const w=[...n].sort((v,b)=>{var C,N,j,A;const y=((N=(C=m.get(v.id))==null?void 0:C[0])==null?void 0:N.createdAt)??v.createdAt;return(((A=(j=m.get(b.id))==null?void 0:j[0])==null?void 0:A.createdAt)??b.createdAt)-y});if(w.length===0)return _.jsx(QC,{icon:Ah,title:r??CBe(),description:r?void 0:_Be()});async function k(v){p(null),h(b=>new Set(b).add(v));try{await c(v)}catch(b){h(y=>{const x=new Set(y);return x.delete(v),x}),p(b instanceof Error?b.message:String(b))}}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:[PPe()," ",f]}),_.jsx("div",{className:"experiments-table w-full text-sm bg-background",role:"list","aria-label":NPe(),children:w.map(v=>{const b=m.get(v.id)??[],y=b[0]??null,x=b.find(A=>A.status==="running"||A.status==="starting"),C=x??y,N=!!(x&&(x.cancelRequested||u.has(x.id))),j=x?N?"cancelling":pa(x):y?pa(y):"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",...Wr(A=>s(v,A),{stopPropagation:!0}),children:v.title||v.slug}),v.archived&&_.jsx("span",{className:"text-muted text-xs",children:CI()}),_.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(Im,{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(ml,{status:j})}),_.jsx("div",{className:"experiment-run-summary flex items-center min-w-0 gap-2 text-subtext text-sm font-medium",children:_.jsx("span",{children:b.length===1?BBe():JBe({count:Jt(b.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:y?vo(y.createdAt):RBe()})})]}),_.jsxs("div",{className:"experiment-table-actions [grid-area:actions] flex flex-wrap items-center justify-start gap-2 mt-3",role:"group","aria-label":EX({name:v.title||v.slug}),onClick:A=>A.stopPropagation(),onDoubleClick:A=>A.stopPropagation(),onAuxClick:A=>A.stopPropagation(),children:[_.jsxs(De,{size:"small",disabled:!C,title:C?VBe():vBe(),...Wr(A=>{C&&i(v.id,C.id,A)},{stopPropagation:!0}),children:[_.jsx(bo,{size:15}),j3()]}),_.jsxs(De,{size:"small",title:rL({branch:Ce(v.branchName)}),...Wr(A=>a(v.id,A),{stopPropagation:!0}),children:[_.jsx(Qb,{size:15}),yPe()]}),x&&_.jsxs(De,{size:"small",variant:"danger",disabled:N,title:N?aPe():dPe(),onClick:()=>void k(x.id),children:[_.jsx(T$,{size:15}),N?hRe():bL()]}),_.jsx(cU,{id:v.id,name:v.title||v.slug,actions:t.get(v.id),onArchive:o})]})]},v.id)})})]})}function PGn({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(t1n())).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,h=()=>[...c.querySelectorAll('button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], [tabindex]:not([tabindex="-1"])')];(h()[0]??c).focus();const f=p=>{if(p.key!=="Tab")return;const m=h();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()}},[]),ii.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(It,{className:"absolute end-3.5 top-3.5","aria-label":H3(),onClick:()=>o(()=>e("dismiss")),disabled:t,children:_.jsx(xr,{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(s6,{})}),_.jsxs("div",{children:[_.jsx("div",{className:"mb-0.5 text-xs font-medium tracking-[0.08em] text-primary uppercase",children:Ngn()}),_.jsx("h2",{id:"demo-welcome-title",className:"m-0 text-2xl leading-tight tracking-[-0.02em]",children:p1n()})]})]}),_.jsxs("div",{className:"text-base leading-relaxed text-text [&_p]:m-0 [&_p_+_p]:mt-3",children:[_.jsxs("p",{dir:"auto",children:[c1n()," ",_.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:Fgn()}),ogn()]}),_.jsx("p",{dir:"auto",children:Ogn()})]}),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(De,{onClick:()=>o(n),disabled:t,children:ygn()}),_.jsx(De,{variant:"primary",onClick:()=>o(()=>e("explore_demo")),disabled:t,children:t?Sa():Wgn()})]})]})}),document.body)}function gs(e){if(typeof e=="string"||typeof e=="number")return""+e;let n="";if(Array.isArray(e))for(let t=0,r;t{}};function Yy(){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}})}pv.prototype=Yy.prototype={constructor:pv,on:function(e,n){var t=this._,r=HGn(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)),MM.hasOwnProperty(n)?{space:MM[n],local:e}:e}function UGn(e){return function(){var n=this.ownerDocument,t=this.namespaceURI;return t===Ak&&n.documentElement.namespaceURI===Ak?n.createElement(e):n.createElementNS(t,e)}}function GGn(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function lU(e){var n=Zy(e);return(n.local?GGn:UGn)(n)}function VGn(){}function YC(e){return e==null?VGn:function(){return this.querySelector(e)}}function KGn(e){typeof e!="function"&&(e=YC(e));for(var n=this._groups,t=n.length,r=new Array(t),s=0;s=x&&(x=y+1);!(N=v[x])&&++x=0;)(a=r[s])&&(i&&a.compareDocumentPosition(i)^4&&i.parentNode.insertBefore(a,i),i=a);return this}function vVn(e){e||(e=bVn);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 yVn(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function xVn(){return Array.from(this)}function wVn(){for(var e=this._groups,n=0,t=e.length;n1?this.each((n==null?MVn:typeof n=="function"?DVn:OVn)(e,n,t??"")):Ph(this.node(),e)}function Ph(e,n){return e.style.getPropertyValue(n)||hU(e).getComputedStyle(e,null).getPropertyValue(n)}function IVn(e){return function(){delete this[e]}}function $Vn(e,n){return function(){this[e]=n}}function BVn(e,n){return function(){var t=n.apply(this,arguments);t==null?delete this[e]:this[e]=t}}function PVn(e,n){return arguments.length>1?this.each((n==null?IVn:typeof n=="function"?BVn:$Vn)(e,n)):this.node()[e]}function pU(e){return e.trim().split(/^|\s+/)}function ZC(e){return e.classList||new mU(e)}function mU(e){this._node=e,this._names=pU(e.getAttribute("class")||"")}mU.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 gU(e,n){for(var t=ZC(e),r=-1,s=n.length;++r=0&&(t=n.slice(r+1),n=n.slice(0,r)),{type:n,name:t}})}function hKn(e){return function(){var n=this.__on;if(n){for(var t=0,r=-1,s=n.length,i;t()=>e;function Tk(e,{sourceEvent:n,subject:t,target:r,identifier:s,active:i,x:a,y:o,dx:c,dy:u,dispatch:h}){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:h}})}Tk.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function SKn(e){return!e.ctrlKey&&!e.button}function CKn(){return this.parentNode}function EKn(e,n){return n??{x:e.x,y:e.y}}function NKn(){return navigator.maxTouchPoints||"ontouchstart"in this}function kU(){var e=SKn,n=CKn,t=EKn,r=NKn,s={},i=Yy("start","drag","end"),a=0,o,c,u,h,f=0;function p(C){C.on("mousedown.drag",m).filter(r).on("touchstart.drag",v).on("touchmove.drag",b,kKn).on("touchend.drag touchcancel.drag",y).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(C,N){if(!(h||!e.call(this,C,N))){var j=x(this,n.call(this,C,N),C,N,"mouse");j&&(fa(C.view).on("mousemove.drag",w,rm).on("mouseup.drag",k,rm),xU(C.view),B4(C),u=!1,o=C.clientX,c=C.clientY,j("start",C))}}function w(C){if(sh(C),!u){var N=C.clientX-o,j=C.clientY-c;u=N*N+j*j>f}s.mouse("drag",C)}function k(C){fa(C.view).on("mousemove.drag mouseup.drag",null),wU(C.view,u),sh(C),s.mouse("end",C)}function v(C,N){if(e.call(this,C,N)){var j=C.changedTouches,A=n.call(this,C,N),z=j.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?$1(n>>24&255,n>>16&255,n>>8&255,(n&255)/255):t===4?$1(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=jKn.exec(e))?new Ui(n[1],n[2],n[3],1):(n=AKn.exec(e))?new Ui(n[1]*255/100,n[2]*255/100,n[3]*255/100,1):(n=TKn.exec(e))?$1(n[1],n[2],n[3],n[4]):(n=RKn.exec(e))?$1(n[1]*255/100,n[2]*255/100,n[3]*255/100,n[4]):(n=MKn.exec(e))?PM(n[1],n[2]/100,n[3]/100,1):(n=OKn.exec(e))?PM(n[1],n[2]/100,n[3]/100,n[4]):OM.hasOwnProperty(e)?IM(OM[e]):e==="transparent"?new Ui(NaN,NaN,NaN,0):null}function IM(e){return new Ui(e>>16&255,e>>8&255,e&255,1)}function $1(e,n,t,r){return r<=0&&(e=n=t=NaN),new Ui(e,n,t,r)}function IKn(e){return e instanceof Qm||(e=kf(e)),e?(e=e.rgb(),new Ui(e.r,e.g,e.b,e.opacity)):new Ui}function Rk(e,n,t,r){return arguments.length===1?IKn(e):new Ui(e,n,t,r??1)}function Ui(e,n,t,r){this.r=+e,this.g=+n,this.b=+t,this.opacity=+r}JC(Ui,Rk,SU(Qm,{brighter(e){return e=e==null?wb:Math.pow(wb,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?sm:Math.pow(sm,e),new Ui(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Ui(cf(this.r),cf(this.g),cf(this.b),kb(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:$M,formatHex:$M,formatHex8:$Kn,formatRgb:BM,toString:BM}));function $M(){return`#${H_(this.r)}${H_(this.g)}${H_(this.b)}`}function $Kn(){return`#${H_(this.r)}${H_(this.g)}${H_(this.b)}${H_((isNaN(this.opacity)?1:this.opacity)*255)}`}function BM(){const e=kb(this.opacity);return`${e===1?"rgb(":"rgba("}${cf(this.r)}, ${cf(this.g)}, ${cf(this.b)}${e===1?")":`, ${e})`}`}function kb(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function cf(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function H_(e){return e=cf(e),(e<16?"0":"")+e.toString(16)}function PM(e,n,t,r){return r<=0?e=n=t=NaN:t<=0||t>=1?e=n=NaN:n<=0&&(e=NaN),new _o(e,n,t,r)}function CU(e){if(e instanceof _o)return new _o(e.h,e.s,e.l,e.opacity);if(e instanceof Qm||(e=kf(e)),!e)return new _o;if(e instanceof _o)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 _o(a,o,c,e.opacity)}function BKn(e,n,t,r){return arguments.length===1?CU(e):new _o(e,n,t,r??1)}function _o(e,n,t,r){this.h=+e,this.s=+n,this.l=+t,this.opacity=+r}JC(_o,BKn,SU(Qm,{brighter(e){return e=e==null?wb:Math.pow(wb,e),new _o(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?sm:Math.pow(sm,e),new _o(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 Ui(P4(e>=240?e-240:e+120,s,r),P4(e,s,r),P4(e<120?e+240:e-120,s,r),this.opacity)},clamp(){return new _o(FM(this.h),B1(this.s),B1(this.l),kb(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=kb(this.opacity);return`${e===1?"hsl(":"hsla("}${FM(this.h)}, ${B1(this.s)*100}%, ${B1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function FM(e){return e=(e||0)%360,e<0?e+360:e}function B1(e){return Math.max(0,Math.min(1,e||0))}function P4(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 e7=e=>()=>e;function PKn(e,n){return function(t){return e+t*n}}function FKn(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 HKn(e){return(e=+e)==1?EU:function(n,t){return t-n?FKn(n,t,e):e7(isNaN(n)?t:n)}}function EU(e,n){var t=n-e;return t?PKn(e,t):e7(isNaN(e)?n:e)}const Sb=(function e(n){var t=HKn(n);function r(s,i){var a=t((s=Rk(s)).r,(i=Rk(i)).r),o=t(s.g,i.g),c=t(s.b,i.b),u=EU(s.opacity,i.opacity);return function(h){return s.r=a(h),s.g=o(h),s.b=c(h),s.opacity=u(h),s+""}}return r.gamma=e,r})(1);function qKn(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:tc(r,s)})),t=F4.lastIndex;return t180?h+=360:h-u>180&&(u+=360),p.push({i:f.push(s(f)+"rotate(",null,r)-2,x:tc(u,h)})):h&&f.push(s(f)+"rotate("+h+r)}function o(u,h,f,p){u!==h?p.push({i:f.push(s(f)+"skewX(",null,r)-2,x:tc(u,h)}):h&&f.push(s(f)+"skewX("+h+r)}function c(u,h,f,p,m,w){if(u!==f||h!==p){var k=m.push(s(m)+"scale(",null,",",null,")");w.push({i:k-4,x:tc(u,f)},{i:k-2,x:tc(h,p)})}else(f!==1||p!==1)&&m.push(s(m)+"scale("+f+","+p+")")}return function(u,h){var f=[],p=[];return u=e(u),h=e(h),i(u.translateX,u.translateY,h.translateX,h.translateY,f,p),a(u.rotate,h.rotate,f,p),o(u.skewX,h.skewX,f,p),c(u.scaleX,u.scaleY,h.scaleX,h.scaleY,f,p),u=h=null,function(m){for(var w=-1,k=p.length,v;++w=0&&e._call.call(void 0,n),e=e._next;--Fh}function UM(){Sf=(Eb=am.now())+Jy,Fh=d0=0;try{sWn()}finally{Fh=0,aWn(),Sf=0}}function iWn(){var e=am.now(),n=e-Eb;n>AU&&(Jy-=n,Eb=e)}function aWn(){for(var e,n=Cb,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:Cb=t);h0=e,Dk(r)}function Dk(e){if(!Fh){d0&&(d0=clearTimeout(d0));var n=e-Sf;n>24?(e<1/0&&(d0=setTimeout(UM,e-am.now()-Jy)),a0&&(a0=clearInterval(a0))):(a0||(Eb=am.now(),a0=setInterval(iWn,AU)),Fh=1,TU(UM))}}function GM(e,n,t){var r=new Nb;return n=n==null?0:+n,r.restart(s=>{r.stop(),e(s+n)},n,t),r}var oWn=Yy("start","end","cancel","interrupt"),cWn=[],MU=0,VM=1,Lk=2,gv=3,KM=4,Ik=5,vv=6;function ex(e,n,t,r,s,i){var a=e.__transition;if(!a)e.__transition={};else if(t in a)return;lWn(e,t,{name:n,index:r,group:s,on:oWn,tween:cWn,time:i.time,delay:i.delay,duration:i.duration,ease:i.ease,timer:null,state:MU})}function n7(e,n){var t=xo(e,n);if(t.state>MU)throw new Error("too late; already scheduled");return t}function wc(e,n){var t=xo(e,n);if(t.state>gv)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 lWn(e,n,t){var r=e.__transition,s;r[n]=t,t.timer=RU(i,0,t.time);function i(u){t.state=VM,t.timer.restart(a,t.delay,t.time),t.delay<=u&&a(u-t.delay)}function a(u){var h,f,p,m;if(t.state!==VM)return c();for(h in r)if(m=r[h],m.name===t.name){if(m.state===gv)return GM(a);m.state===KM?(m.state=vv,m.timer.stop(),m.on.call("interrupt",e,e.__data__,m.index,m.group),delete r[h]):+hLk&&r.state=0&&(n=n.slice(0,t)),!n||n==="start"})}function BWn(e,n,t){var r,s,i=$Wn(n)?n7:wc;return function(){var a=i(this,e),o=a.on;o!==r&&(s=(r=o).copy()).on(n,t),a.on=s}}function PWn(e,n){var t=this._id;return arguments.length<2?xo(this.node(),t).on.on(e):this.each(BWn(t,e,n))}function FWn(e){return function(){var n=this.parentNode;for(var t in this.__transition)if(+t!==e)return;n&&n.removeChild(this)}}function HWn(){return this.on("end.remove",FWn(this._id))}function qWn(e){var n=this._name,t=this._id;typeof e!="function"&&(e=YC(e));for(var r=this._groups,s=r.length,i=new Array(s),a=0;a()=>e;function hQn(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 hl(e,n,t){this.k=e,this.x=n,this.y=t}hl.prototype={constructor:hl,scale:function(e){return e===1?this:new hl(this.k*e,this.x,this.y)},translate:function(e,n){return e===0&n===0?this:new hl(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 tx=new hl(1,0,0);IU.prototype=hl.prototype;function IU(e){for(;!e.__zoom;)if(!(e=e.parentNode))return tx;return e.__zoom}function H4(e){e.stopImmediatePropagation()}function o0(e){e.preventDefault(),e.stopImmediatePropagation()}function pQn(e){return(!e.ctrlKey||e.type==="wheel")&&!e.button}function mQn(){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 WM(){return this.__zoom||tx}function gQn(e){return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*(e.ctrlKey?10:1)}function vQn(){return navigator.maxTouchPoints||"ontouchstart"in this}function bQn(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 $U(){var e=pQn,n=mQn,t=bQn,r=gQn,s=vQn,i=[0,1/0],a=[[-1/0,-1/0],[1/0,1/0]],o=250,c=mv,u=Yy("start","zoom","end"),h,f,p,m=500,w=150,k=0,v=10;function b(q){q.property("__zoom",WM).on("wheel.zoom",z,{passive:!1}).on("mousedown.zoom",M).on("dblclick.zoom",D).filter(s).on("touchstart.zoom",I).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",G).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(q,Q,K,Z){var J=q.selection?q.selection():q;J.property("__zoom",WM),q!==J?N(q,Q,K,Z):J.interrupt().each(function(){j(this,arguments).event(Z).start().zoom(null,typeof Q=="function"?Q.apply(this,arguments):Q).end()})},b.scaleBy=function(q,Q,K,Z){b.scaleTo(q,function(){var J=this.__zoom.k,$=typeof Q=="function"?Q.apply(this,arguments):Q;return J*$},K,Z)},b.scaleTo=function(q,Q,K,Z){b.transform(q,function(){var J=n.apply(this,arguments),$=this.__zoom,L=K==null?C(J):typeof K=="function"?K.apply(this,arguments):K,F=$.invert(L),U=typeof Q=="function"?Q.apply(this,arguments):Q;return t(x(y($,U),L,F),J,a)},K,Z)},b.translateBy=function(q,Q,K,Z){b.transform(q,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)},b.translateTo=function(q,Q,K,Z,J){b.transform(q,function(){var $=n.apply(this,arguments),L=this.__zoom,F=Z==null?C($):typeof Z=="function"?Z.apply(this,arguments):Z;return t(tx.translate(F[0],F[1]).scale(L.k).translate(typeof Q=="function"?-Q.apply(this,arguments):-Q,typeof K=="function"?-K.apply(this,arguments):-K),$,a)},Z,J)};function y(q,Q){return Q=Math.max(i[0],Math.min(i[1],Q)),Q===q.k?q:new hl(Q,q.x,q.y)}function x(q,Q,K){var Z=Q[0]-K[0]*q.k,J=Q[1]-K[1]*q.k;return Z===q.x&&J===q.y?q:new hl(q.k,Z,J)}function C(q){return[(+q[0][0]+ +q[1][0])/2,(+q[0][1]+ +q[1][1])/2]}function N(q,Q,K,Z){q.on("start.zoom",function(){j(this,arguments).event(Z).start()}).on("interrupt.zoom end.zoom",function(){j(this,arguments).event(Z).end()}).tween("zoom",function(){var J=this,$=arguments,L=j(J,$).event(Z),F=n.apply(J,$),U=K==null?C(F):typeof K=="function"?K.apply(J,$):K,H=Math.max(F[1][0]-F[0][0],F[1][1]-F[0][1]),oe=J.__zoom,ae=typeof Q=="function"?Q.apply(J,$):Q,ue=c(oe.invert(U).concat(H/oe.k),ae.invert(U).concat(H/ae.k));return function(se){if(se===1)se=ae;else{var V=ue(se),ne=H/V[2];se=new hl(ne,U[0]-V[0]*ne,U[1]-V[1]*ne)}L.zoom(null,se)}})}function j(q,Q,K){return!K&&q.__zooming||new A(q,Q)}function A(q,Q){this.that=q,this.args=Q,this.active=0,this.sourceEvent=null,this.extent=n.apply(q,Q),this.taps=0}A.prototype={event:function(q){return q&&(this.sourceEvent=q),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(q,Q){return this.mouse&&q!=="mouse"&&(this.mouse[1]=Q.invert(this.mouse[0])),this.touch0&&q!=="touch"&&(this.touch0[1]=Q.invert(this.touch0[0])),this.touch1&&q!=="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(q){var Q=fa(this.that).datum();u.call(q,this.that,new hQn(q,{sourceEvent:this.sourceEvent,target:b,transform:this.that.__zoom,dispatch:u}),Q)}};function z(q,...Q){if(!e.apply(this,arguments))return;var K=j(this,Q).event(q),Z=this.__zoom,J=Math.max(i[0],Math.min(i[1],Z.k*Math.pow(2,r.apply(this,arguments)))),$=ao(q);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===J)return;K.mouse=[$,Z.invert($)],bv(this),K.start()}o0(q),K.wheel=setTimeout(L,w),K.zoom("mouse",t(x(y(Z,J),K.mouse[0],K.mouse[1]),K.extent,a));function L(){K.wheel=null,K.end()}}function M(q,...Q){if(p||!e.apply(this,arguments))return;var K=q.currentTarget,Z=j(this,Q,!0).event(q),J=fa(q.view).on("mousemove.zoom",U,!0).on("mouseup.zoom",H,!0),$=ao(q,K),L=q.clientX,F=q.clientY;xU(q.view),H4(q),Z.mouse=[$,this.__zoom.invert($)],bv(this),Z.start();function U(oe){if(o0(oe),!Z.moved){var ae=oe.clientX-L,ue=oe.clientY-F;Z.moved=ae*ae+ue*ue>k}Z.event(oe).zoom("mouse",t(x(Z.that.__zoom,Z.mouse[0]=ao(oe,K),Z.mouse[1]),Z.extent,a))}function H(oe){J.on("mousemove.zoom mouseup.zoom",null),wU(oe.view,Z.moved),o0(oe),Z.event(oe).end()}}function D(q,...Q){if(e.apply(this,arguments)){var K=this.__zoom,Z=ao(q.changedTouches?q.changedTouches[0]:q,this),J=K.invert(Z),$=K.k*(q.shiftKey?.5:2),L=t(x(y(K,$),Z,J),n.apply(this,Q),a);o0(q),o>0?fa(this).transition().duration(o).call(N,L,Z,q):fa(this).call(b.transform,L,Z,q)}}function I(q,...Q){if(e.apply(this,arguments)){var K=q.touches,Z=K.length,J=j(this,Q,q.changedTouches.length===Z).event(q),$,L,F,U;for(H4(q),L=0;L`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.`},om=[[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY],[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY]],BU=["Enter"," ","Escape"],PU={"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 Hh;(function(e){e.Strict="strict",e.Loose="loose"})(Hh||(Hh={}));var lf;(function(e){e.Free="free",e.Vertical="vertical",e.Horizontal="horizontal"})(lf||(lf={}));var cm;(function(e){e.Partial="partial",e.Full="full"})(cm||(cm={}));const FU={inProgress:!1,isValid:null,from:null,fromHandle:null,fromPosition:null,fromNode:null,to:null,toHandle:null,toPosition:null,toNode:null,pointer:null};var yu;(function(e){e.Bezier="default",e.Straight="straight",e.Step="step",e.SmoothStep="smoothstep",e.SimpleBezier="simplebezier"})(yu||(yu={}));var zb;(function(e){e.Arrow="arrow",e.ArrowClosed="arrowclosed"})(zb||(zb={}));var Rt;(function(e){e.Left="left",e.Top="top",e.Right="right",e.Bottom="bottom"})(Rt||(Rt={}));const QM={[Rt.Left]:Rt.Right,[Rt.Right]:Rt.Left,[Rt.Top]:Rt.Bottom,[Rt.Bottom]:Rt.Top};function HU(e){return e===null?null:e?"valid":"invalid"}const qU=e=>"id"in e&&"source"in e&&"target"in e,yQn=e=>"id"in e&&"position"in e&&!("source"in e)&&!("target"in e),s7=e=>"id"in e&&"internals"in e&&!("source"in e)&&!("target"in e),Xm=(e,n=[0,0])=>{const{width:t,height:r}=Al(e),s=e.origin??n,i=t*s[0],a=r*s[1];return{x:e.position.x-i,y:e.position.y-a}},xQn=(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):s7(s)?s:n.nodeLookup.get(s.id));const o=a?jb(a,n.nodeOrigin):{x:0,y:0,x2:0,y2:0};return nx(r,o)},{x:1/0,y:1/0,x2:-1/0,y2:-1/0});return rx(t)},Ym=(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=nx(t,jb(s)),r=!0)}),r?rx(t):{x:0,y:0,width:0,height:0}},i7=(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,h=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,b=m.height??p.height??p.initialHeight??0,{x:y,y:x}=p.internals.positionAbsolute,C=KU(o,c,u,h,y,x,v,b),N=v*b,j=i&&C>0;(!p.internals.handleBounds||j||C>=N||p.dragging)&&f.push(p)}return f},wQn=(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 kQn(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 SQn({nodes:e,width:n,height:t,panZoom:r,minZoom:s,maxZoom:i},a){if(e.size===0)return!0;const o=kQn(e,a),c=Ym(o),u=o7(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 UU({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},h=a.origin??r;let f=a.extent||s;if(a.extent==="parent"&&!a.expandParent)if(!o)i==null||i("005",yo.error005());else{const m=o.measured.width,w=o.measured.height;m&&w&&(f=[[c,u],[c+m,u+w]])}else o&&Ef(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=Ef(f)?Cf(n,f,a.measured):n;return(a.measured.width===void 0||a.measured.height===void 0)&&(i==null||i("015",yo.error015())),{position:{x:p.x-c+(a.measured.width??0)*h[0],y:p.y-u+(a.measured.height??0)*h[1]},positionAbsolute:p}}async function CQn({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),h=wQn(a,c);for(const p of c)o.has(p.id)&&!h.find(w=>w.id===p.id)&&h.push(p);if(!s)return{edges:h,nodes:a};const f=await s({nodes:a,edges:h});return typeof f=="boolean"?f?{edges:h,nodes:a}:{edges:[],nodes:[]}:f}const qh=(e,n=0,t=1)=>Math.min(Math.max(e,n),t),Cf=(e={x:0,y:0},n,t)=>({x:qh(e.x,n[0][0],n[1][0]-((t==null?void 0:t.width)??0)),y:qh(e.y,n[0][1],n[1][1]-((t==null?void 0:t.height)??0))});function GU(e,n,t){const{width:r,height:s}=Al(t),{x:i,y:a}=t.internals.positionAbsolute;return Cf(e,[[i,a],[i+r,a+s]],n)}const XM=(e,n,t)=>et?-qh(Math.abs(e-t),1,n)/n:0,a7=(e,n,t=15,r=40)=>{const s=XM(e.x,r,n.width-r)*t,i=XM(e.y,r,n.height-r)*t;return[s,i]},nx=(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)}),$k=({x:e,y:n,width:t,height:r})=>({x:e,y:n,x2:e+t,y2:n+r}),rx=({x:e,y:n,x2:t,y2:r})=>({x:e,y:n,width:t-e,height:r-n}),lm=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=s7(e)?e.internals.positionAbsolute:Xm(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}},jb=(e,n=[0,0])=>{var s,i;const{x:t,y:r}=s7(e)?e.internals.positionAbsolute:Xm(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)}},VU=(e,n)=>rx(nx($k(e),$k(n))),KU=(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)},Ab=(e,n)=>KU(e.x,e.y,e.width,e.height,n.x,n.y,n.width,n.height),YM=e=>ho(e.width)&&ho(e.height)&&ho(e.x)&&ho(e.y),ho=e=>!isNaN(e)&&isFinite(e),WU=(e,n)=>(t,r)=>{},Zm=(e,n=[1,1])=>({x:n[0]*Math.round(e.x/n[0]),y:n[1]*Math.round(e.y/n[1])}),Jm=({x:e,y:n},[t,r,s],i=!1,a=[1,1])=>{const o={x:(e-t)/s,y:(n-r)/s};return i?Zm(o,a):o},Uh=({x:e,y:n},[t,r,s])=>({x:e*s+t,y:n*s+r});function Td(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 EQn(e,n,t){if(typeof e=="string"||typeof e=="number"){const r=Td(e,t),s=Td(e,n);return{top:r,right:s,bottom:r,left:s,x:s*2,y:r*2}}if(typeof e=="object"){const r=Td(e.top??e.y??0,t),s=Td(e.bottom??e.y??0,t),i=Td(e.left??e.x??0,n),a=Td(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 NQn(e,n,t,r,s,i){const{x:a,y:o}=Uh(e,[n,t,r]),{x:c,y:u}=Uh({x:e.x+e.width,y:e.y+e.height},[n,t,r]),h=s-c,f=i-u;return{left:Math.floor(a),top:Math.floor(o),right:Math.floor(h),bottom:Math.floor(f)}}const o7=(e,n,t,r,s,i)=>{const a=EQn(i,n,t),o=(n-a.x)/e.width,c=(t-a.y)/e.height,u=Math.min(o,c),h=qh(u,r,s),f=e.x+e.width/2,p=e.y+e.height/2,m=n/2-f*h,w=t/2-p*h,k=NQn(e,m,w,h,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:h}},um=()=>{var e;return typeof navigator<"u"&&((e=navigator==null?void 0:navigator.userAgent)==null?void 0:e.indexOf("Mac"))>=0};function Ef(e){return e!=null&&e!=="parent"}function Al(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 QU(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 XU(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 ZM(e,n){if(e.size!==n.size)return!1;for(const t of e)if(!n.has(t))return!1;return!0}function zQn(){let e,n;return{promise:new Promise((r,s)=>{e=r,n=s}),resolve:e,reject:n}}function jQn(e){return{...PU,...e||{}}}function j0(e,{snapGrid:n=[0,0],snapToGrid:t=!1,transform:r,containerBounds:s}){const{x:i,y:a}=po(e),o=Jm({x:i-((s==null?void 0:s.left)??0),y:a-((s==null?void 0:s.top)??0)},r),{x:c,y:u}=t?Zm(o,n):o;return{xSnapped:c,ySnapped:u,...o}}const c7=e=>({width:e.offsetWidth,height:e.offsetHeight}),YU=e=>{var n;return((n=e==null?void 0:e.getRootNode)==null?void 0:n.call(e))||(window==null?void 0:window.document)},AQn=["INPUT","SELECT","TEXTAREA"];function ZU(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:AQn.includes(n.nodeName)||n.hasAttribute("contenteditable")||!!n.closest(".nokey")}const JU=e=>"clientX"in e,po=(e,n)=>{var i,a;const t=JU(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)}},JM=(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,...c7(a)}})};function eG({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,h=Math.abs(c-e),f=Math.abs(u-n);return[c,u,h,f]}function H1(e,n){return e>=0?.5*e:n*25*Math.sqrt(-e)}function eO({pos:e,x1:n,y1:t,x2:r,y2:s,c:i}){switch(e){case Rt.Left:return[n-H1(n-r,i),t];case Rt.Right:return[n+H1(r-n,i),t];case Rt.Top:return[n,t-H1(t-s,i)];case Rt.Bottom:return[n,t+H1(s-t,i)]}}function tG({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top,curvature:a=.25}){const[o,c]=eO({pos:t,x1:e,y1:n,x2:r,y2:s,c:a}),[u,h]=eO({pos:i,x1:r,y1:s,x2:e,y2:n,c:a}),[f,p,m,w]=eG({sourceX:e,sourceY:n,targetX:r,targetY:s,sourceControlX:o,sourceControlY:c,targetControlX:u,targetControlY:h});return[`M${e},${n} C${o},${c} ${u},${h} ${r},${s}`,f,p,m,w]}function nG({sourceX:e,sourceY:n,targetX:t,targetY:r}){const s=Math.abs(t-e)/2,i=t0}const MQn=({source:e,sourceHandle:n,target:t,targetHandle:r})=>`xy-edge__${e}${n||""}-${t}${r||""}`,OQn=(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)),DQn=(e,n,t={})=>{var i;if(!e.source||!e.target)return(i=t.onError)==null||i.call(t,"006",yo.error006()),n;const r=t.getEdgeId||MQn;let s;return qU(e)?s={...e}:s={...e,id:r(e)},OQn(s,n)?n:(s.sourceHandle===null&&delete s.sourceHandle,s.targetHandle===null&&delete s.targetHandle,n.concat(s))};function rG({sourceX:e,sourceY:n,targetX:t,targetY:r}){const[s,i,a,o]=nG({sourceX:e,sourceY:n,targetX:t,targetY:r});return[`M ${e},${n}L ${t},${r}`,s,i,a,o]}const tO={[Rt.Left]:{x:-1,y:0},[Rt.Right]:{x:1,y:0},[Rt.Top]:{x:0,y:-1},[Rt.Bottom]:{x:0,y:1}},LQn=({source:e,sourcePosition:n=Rt.Bottom,target:t})=>n===Rt.Left||n===Rt.Right?e.xMath.sqrt(Math.pow(n.x-e.x,2)+Math.pow(n.y-e.y,2));function IQn({source:e,sourcePosition:n=Rt.Bottom,target:t,targetPosition:r=Rt.Top,center:s,offset:i,stepPosition:a}){const o=tO[n],c=tO[r],u={x:e.x+o.x*i,y:e.y+o.y*i},h={x:t.x+c.x*i,y:t.y+c.y*i},f=LQn({source:u,sourcePosition:n,target:h}),p=f.x!==0?"x":"y",m=f[p];let w=[],k,v;const b={x:0,y:0},y={x:0,y:0},[,,x,C]=nG({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+(h.x-u.x)*a,v=s.y??(u.y+h.y)/2):(k=s.x??(u.x+h.x)/2,v=s.y??u.y+(h.y-u.y)*a);const z=[{x:k,y:u.y},{x:k,y:h.y}],M=[{x:u.x,y:v},{x:h.x,y:v}];o[p]===m?w=p==="x"?z:M:w=p==="x"?M:z}else{const z=[{x:u.x,y:h.y}],M=[{x:h.x,y:u.y}];if(p==="x"?w=o.x===m?M:z:w=o.y===m?z:M,n===r){const q=Math.abs(e[p]-t[p]);if(q<=i){const Q=Math.min(i-1,i-q);o[p]===m?b[p]=(u[p]>e[p]?-1:1)*Q:y[p]=(h[p]>t[p]?-1:1)*Q}}if(n!==r){const q=p==="x"?"y":"x",Q=o[p]===c[q],K=u[q]>h[q],Z=u[q]=G?(k=(D.x+I.x)/2,v=w[0].y):(k=w[0].x,v=(D.y+I.y)/2)}const N={x:u.x+b.x,y:u.y+b.y},j={x:h.x+y.x,y:h.y+y.y};return[[e,...N.x!==w[0].x||N.y!==w[0].y?[N]:[],...w,...j.x!==w[w.length-1].x||j.y!==w[w.length-1].y?[j]:[],t],k,v,x,C]}function $Qn(e,n,t,r){const s=Math.min(nO(e,n)/2,nO(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 Pk(e,n){return e?typeof e=="string"?e:`${n?`${n}__`:""}${Object.keys(e).sort().map(r=>`${r}=${e[r]}`).join("&")}`:""}function PQn(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=Pk(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 sG=1e3,FQn=10,l7={nodeOrigin:[0,0],nodeExtent:om,elevateNodesOnSelect:!0,zIndexMode:"basic",defaults:{}},HQn={...l7,checkEquality:!0};function u7(e,n){const t={...e};for(const r in n)n[r]!==void 0&&(t[r]=n[r]);return t}function qQn(e,n,t){const r=u7(l7,t);for(const s of e.values())if(s.parentId)f7(s,e,n,r);else{const i=Xm(s,r.nodeOrigin),a=Ef(s.extent)?s.extent:r.nodeExtent,o=Cf(i,a,Al(s));s.internals.positionAbsolute=o}}function UQn(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 _7(e){return e==="manual"}function Fk(e,n,t,r={}){var h,f;const s=u7(HQn,r),i={i:0},a=new Map(n),o=s!=null&&s.elevateNodesOnSelect&&!_7(s.zIndexMode)?sG: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=Xm(p,s.nodeOrigin),k=Ef(p.extent)?p.extent:s.nodeExtent,v=Cf(w,k,Al(p));m={...s.defaults,...p,measured:{width:(h=p.measured)==null?void 0:h.width,height:(f=p.measured)==null?void 0:f.height},internals:{positionAbsolute:v,handleBounds:UQn(p,m),z:iG(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&&f7(m,n,t,r,i),u||(u=p.selected??!1)}return{nodesInitialized:c,hasSelectedNodes:u}}function GQn(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 f7(e,n,t,r,s){const{elevateNodesOnSelect:i,nodeOrigin:a,nodeExtent:o,zIndexMode:c}=u7(l7,r),u=e.parentId,h=n.get(u);if(!h){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}GQn(e,t),s&&!h.parentId&&h.internals.rootParentIndex===void 0&&c==="auto"&&(h.internals.rootParentIndex=++s.i,h.internals.z=h.internals.z+s.i*FQn),s&&h.internals.rootParentIndex!==void 0&&(s.i=h.internals.rootParentIndex);const f=i&&!_7(c)?sG:0,{x:p,y:m,z:w}=VQn(e,h,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 iG(e,n,t){const r=ho(e.zIndex)?e.zIndex:0;return _7(t)?r:r+(e.selected?n:0)}function VQn(e,n,t,r,s,i){const{x:a,y:o}=n.internals.positionAbsolute,c=Al(e),u=Xm(e,t),h=Ef(e.extent)?Cf(u,e.extent,c):u;let f=Cf({x:a+h.x,y:o+h.y},r,c);e.extent==="parent"&&(f=GU(f,c,n));const p=iG(e,s,i),m=n.internals.z??0;return{x:f.x,y:f.y,z:m>=p?m+1:p}}function d7(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)??lm(c),h=VU(u,o.rect);i.set(o.parentId,{expandedRect:h,parent:c})}return i.size>0&&i.forEach(({expandedRect:o,parent:c},u)=>{var x;const h=c.internals.positionAbsolute,f=Al(c),p=c.origin??r,m=o.x0||w>0||b||y)&&(s.push({id:u,type:"position",position:{x:c.position.x-m+b,y:c.position.y-w+y}}),(x=t.get(u))==null||x.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=d7(p,n,t,s);u.push(...m)}return{changes:u,updatedInternals:c}}async function WQn({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 aO(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 aG(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}`,h=`${i}-${o}--${s}-${a}`;aO("source",c,h,e,s,a),aO("target",c,u,e,i,o),n.set(r.id,r)}}function oG(e,n){if(!e.parentId)return!1;const t=n.get(e.parentId);return t?t.selected?!0:oG(t,n):!1}function oO(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 QQn(e,n,t,r){const s=new Map;for(const[i,a]of e)if((a.selected||a.id===r)&&(!a.parentId||!oG(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 q4({nodeId:e,dragItems:n,nodeLookup:t,dragging:r=!0}){var a,o,c;const s=[];for(const[u,h]of n){const f=(a=t.get(u))==null?void 0:a.internals.userNode;f&&s.push({...f,position:h.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 XQn({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=Zm(i,n);return{x:a.x-i.x,y:a.y-i.y}}function YQn({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},h=null,f=!1,p=null,m=!1,w=!1,k=null;function v({noDragClassName:y,handleSelector:x,domNode:C,isSelectable:N,nodeId:j,nodeClickDistance:A=0}){p=fa(C);function z({x:B,y:G}){const{nodeLookup:q,nodeExtent:Q,snapGrid:K,snapToGrid:Z,nodeOrigin:J,onNodeDrag:$,onSelectionDrag:L,onError:F,updateNodePositions:U}=n();i={x:B,y:G};let H=!1;const oe=o.size>1,ae=oe&&Q?$k(Ym(o)):null,ue=oe&&Z?XQn({dragItems:o,snapGrid:K,x:B,y:G}):null;for(const[se,V]of o){if(!q.has(se))continue;let ne={x:B-V.distance.x,y:G-V.distance.y};Z&&(ne=ue?{x:Math.round(ne.x+ue.x),y:Math.round(ne.y+ue.y)}:Zm(ne,K));let ce=null;if(oe&&Q&&!V.extent&&ae){const{positionAbsolute:Ae}=V.internals,Pe=Ae.x-ae.x+Q[0][0],Ye=Ae.x+V.measured.width-ae.x2+Q[1][0],Re=Ae.y-ae.y+Q[0][1],$e=Ae.y+V.measured.height-ae.y2+Q[1][1];ce=[[Pe,Re],[Ye,$e]]}const{position:he,positionAbsolute:me}=UU({nodeId:se,nextPosition:ne,nodeLookup:q,nodeExtent:ce||Q,nodeOrigin:J,onError:F});H=H||V.position.x!==he.x||V.position.y!==he.y,V.position=he,V.internals.positionAbsolute=me}if(w=w||H,!!H&&(U(o,!0),k&&(r||$||!j&&L))){const[se,V]=q4({nodeId:j,dragItems:o,nodeLookup:q});r==null||r(k,o,se,V),$==null||$(k,se,V),j||L==null||L(k,V)}}async function M(){if(!h)return;const{transform:B,panBy:G,autoPanSpeed:q,autoPanOnNodeDrag:Q}=n();if(!Q){c=!1,cancelAnimationFrame(a);return}const[K,Z]=a7(u,h,q);(K!==0||Z!==0)&&(i.x=(i.x??0)-K/B[2],i.y=(i.y??0)-Z/B[2],await G({x:K,y:Z})&&z(i)),a=requestAnimationFrame(M)}function D(B){var oe;const{nodeLookup:G,multiSelectionActive:q,nodesDraggable:Q,transform:K,snapGrid:Z,snapToGrid:J,selectNodesOnDrag:$,onNodeDragStart:L,onSelectionDragStart:F,unselectNodesAndEdges:U}=n();f=!0,(!$||!N)&&!q&&j&&((oe=G.get(j))!=null&&oe.selected||U()),N&&$&&j&&(e==null||e(j));const H=j0(B.sourceEvent,{transform:K,snapGrid:Z,snapToGrid:J,containerBounds:h});if(i=H,o=QQn(G,Q,H,j),o.size>0&&(t||L||!j&&F)){const[ae,ue]=q4({nodeId:j,dragItems:o,nodeLookup:G});t==null||t(B.sourceEvent,o,ae,ue),L==null||L(B.sourceEvent,ae,ue),j||F==null||F(B.sourceEvent,ue)}}const I=kU().clickDistance(A).on("start",B=>{const{domNode:G,nodeDragThreshold:q,transform:Q,snapGrid:K,snapToGrid:Z}=n();h=(G==null?void 0:G.getBoundingClientRect())||null,m=!1,w=!1,k=B.sourceEvent,q===0&&D(B),i=j0(B.sourceEvent,{transform:Q,snapGrid:K,snapToGrid:Z,containerBounds:h}),u=po(B.sourceEvent,h)}).on("drag",B=>{const{autoPanOnNodeDrag:G,transform:q,snapGrid:Q,snapToGrid:K,nodeDragThreshold:Z,nodeLookup:J}=n(),$=j0(B.sourceEvent,{transform:q,snapGrid:Q,snapToGrid:K,containerBounds:h});if(k=B.sourceEvent,(B.sourceEvent.type==="touchmove"&&B.sourceEvent.touches.length>1||j&&!J.has(j))&&(m=!0),!m){if(!c&&G&&f&&(c=!0,M()),!f){const L=po(B.sourceEvent,h),F=L.x-u.x,U=L.y-u.y;Math.sqrt(F*F+U*U)>Z&&D(B)}(i.x!==$.xSnapped||i.y!==$.ySnapped)&&o&&f&&(u=po(B.sourceEvent,h),z($))}}).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:G,updateNodePositions:q,onNodeDragStop:Q,onSelectionDragStop:K}=n();if(w&&(q(o,!1),w=!1),s||Q||!j&&K){const[Z,J]=q4({nodeId:j,dragItems:o,nodeLookup:G,dragging:!1});s==null||s(B.sourceEvent,o,Z,J),Q==null||Q(B.sourceEvent,Z,J),j||K==null||K(B.sourceEvent,J)}}}).filter(B=>{const G=B.target;return!B.button&&(!y||!oO(G,`.${y}`,C))&&(!x||oO(G,x,C))});p.call(I)}function b(){p==null||p.on(".drag",null)}return{update:v,destroy:b}}function ZQn(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())Ab(s,lm(i))>0&&r.push(i);return r}const JQn=250;function eXn(e,n,t,r){var o,c;let s=[],i=1/0;const a=ZQn(e,t,n+JQn);for(const u of a){const h=[...((o=u.internals.handleBounds)==null?void 0:o.source)??[],...((c=u.internals.handleBounds)==null?void 0:c.target)??[]];for(const f of h){if(r.nodeId===f.nodeId&&r.type===f.type&&r.id===f.id)continue;const{x:p,y:m}=Nf(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(h=>h.type===u)??s[0]}return s[0]}function cG(e,n,t,r,s,i=!1){var u,h,f;const a=r.get(e);if(!a)return null;const o=s==="strict"?(u=a.internals.handleBounds)==null?void 0:u[n]:[...((h=a.internals.handleBounds)==null?void 0:h.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,...Nf(a,c,c.position,!0)}:c}function lG(e,n){return e||(n!=null&&n.classList.contains("target")?"target":n!=null&&n.classList.contains("source")?"source":null)}function tXn(e,n){let t=null;return n?t=!0:e&&!n&&(t=!1),t}const uG=()=>!0;function nXn(e,{connectionMode:n,connectionRadius:t,handleId:r,nodeId:s,edgeUpdaterType:i,isTarget:a,domNode:o,nodeLookup:c,lib:u,autoPanOnConnect:h,flowId:f,panBy:p,cancelConnection:m,onConnectStart:w,onConnect:k,onConnectEnd:v,isValidConnection:b=uG,onReconnectEnd:y,updateConnection:x,getTransform:C,getFromHandle:N,autoPanSpeed:j,dragThreshold:A=1,handleDomNode:z}){const M=YU(e.target);let D=0,I;const{x:B,y:G}=po(e),q=lG(i,z),Q=o==null?void 0:o.getBoundingClientRect();let K=!1;if(!Q||!q)return;const Z=cG(s,q,r,c,n);if(!Z)return;let J=po(e,Q),$=!1,L=null,F=!1,U=null;function H(){if(!h||!Q)return;const[he,me]=a7(J,Q,j);p({x:he,y:me}),D=requestAnimationFrame(H)}const oe={...Z,nodeId:s,type:q,position:Z.position},ae=c.get(s);let se={inProgress:!0,isValid:null,from:Nf(ae,oe,Rt.Left,!0),fromHandle:oe,fromPosition:oe.position,fromNode:ae,to:J,toHandle:null,toPosition:QM[oe.position],toNode:null,pointer:J};function V(){K=!0,x(se),w==null||w(e,{nodeId:s,handleId:r,handleType:q})}A===0&&V();function ne(he){if(!K){const{x:$e,y:yt}=po(he),ot=$e-B,Mt=yt-G;if(!(ot*ot+Mt*Mt>A*A))return;V()}if(!N()||!oe){ce(he);return}const me=C();J=po(he,Q),I=eXn(Jm(J,me,!1,[1,1]),t,c,oe),$||(H(),$=!0);const Ae=_G(he,{handle:I,connectionMode:n,fromNodeId:s,fromHandleId:r,fromType:a?"target":"source",isValidConnection:b,doc:M,lib:u,flowId:f,nodeLookup:c});U=Ae.handleDomNode,L=Ae.connection,F=tXn(!!I,Ae.isValid);const Pe=c.get(s),Ye=Pe?Nf(Pe,oe,Rt.Left,!0):se.from,Re={...se,from:Ye,isValid:F,to:Ae.toHandle&&F?Uh({x:Ae.toHandle.x,y:Ae.toHandle.y},me):J,toHandle:Ae.toHandle,toPosition:F&&Ae.toHandle?Ae.toHandle.position:QM[oe.position],toNode:Ae.toHandle?c.get(Ae.toHandle.nodeId):null,pointer:J};x(Re),se=Re}function ce(he){if(!("touches"in he&&he.touches.length>0)){if(K){(I||U)&&L&&F&&(k==null||k(L));const{inProgress:me,...Ae}=se,Pe={...Ae,toPosition:se.toHandle?se.toPosition:null};v==null||v(he,Pe),i&&(y==null||y(he,Pe))}m(),cancelAnimationFrame(D),$=!1,F=!1,L=null,U=null,M.removeEventListener("mousemove",ne),M.removeEventListener("mouseup",ce),M.removeEventListener("touchmove",ne),M.removeEventListener("touchend",ce)}}M.addEventListener("mousemove",ne),M.addEventListener("mouseup",ce),M.addEventListener("touchmove",ne),M.addEventListener("touchend",ce)}function _G(e,{handle:n,connectionMode:t,fromNodeId:r,fromHandleId:s,fromType:i,doc:a,lib:o,flowId:c,isValidConnection:u=uG,nodeLookup:h}){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}=po(e),k=a.elementFromPoint(m,w),v=k!=null&&k.classList.contains(`${o}-flow__handle`)?k:p,b={handleDomNode:v,isValid:!1,connection:null,toHandle:null};if(v){const y=lG(void 0,v),x=v.getAttribute("data-nodeid"),C=v.getAttribute("data-handleid"),N=v.classList.contains("connectable"),j=v.classList.contains("connectableend");if(!x||!y)return b;const A={source:f?x:r,sourceHandle:f?C:s,target:f?r:x,targetHandle:f?s:C};b.connection=A;const M=N&&j&&(t===Hh.Strict?f&&y==="source"||!f&&y==="target":x!==r||C!==s);b.isValid=M&&u(A),b.toHandle=cG(x,y,C,h,t,!0)}return b}const Hk={onPointerDown:nXn,isValid:_G};function rXn({domNode:e,panZoom:n,getTransform:t,getViewScale:r}){const s=fa(e);function i({translateExtent:o,width:c,height:u,zoomStep:h=1,pannable:f=!0,zoomable:p=!0,inversePan:m=!1}){const w=x=>{if(x.sourceEvent.type!=="wheel"||!n)return;const C=t(),N=x.sourceEvent.ctrlKey&&um()?10:1,j=-x.sourceEvent.deltaY*(x.sourceEvent.deltaMode===1?.05:x.sourceEvent.deltaMode?1:.002)*h,A=C[2]*Math.pow(2,j*N);n.scaleTo(A)};let k=[0,0];const v=x=>{(x.sourceEvent.type==="mousedown"||x.sourceEvent.type==="touchstart")&&(k=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY])},b=x=>{const C=t();if(x.sourceEvent.type!=="mousemove"&&x.sourceEvent.type!=="touchmove"||!n)return;const N=[x.sourceEvent.clientX??x.sourceEvent.touches[0].clientX,x.sourceEvent.clientY??x.sourceEvent.touches[0].clientY],j=[N[0]-k[0],N[1]-k[1]];k=N;const A=r()*Math.max(C[2],Math.log(C[2]))*(m?-1:1),z={x:C[0]-j[0]*A,y:C[1]-j[1]*A},M=[[0,0],[c,u]];n.setViewportConstrained({x:z.x,y:z.y,zoom:C[2]},M,o)},y=$U().on("start",v).on("zoom",f?b:null).on("zoom.wheel",p?w:null);s.call(y,{})}function a(){s.on("zoom",null)}return{update:i,destroy:a,pointer:ao}}const sx=e=>({x:e.x,y:e.y,zoom:e.k}),U4=({x:e,y:n,zoom:t})=>tx.translate(e,n).scale(t),Ud=(e,n)=>e.target.closest(`.${n}`),fG=(e,n)=>n===2&&Array.isArray(e)&&e.includes(2),sXn=e=>((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2,G4=(e,n=0,t=sXn,r=()=>{})=>{const s=typeof n=="number"&&n>0;return s||r(),s?e.transition().duration(n).ease(t).on("end",r):e},dG=e=>{const n=e.ctrlKey&&um()?10:1;return-e.deltaY*(e.deltaMode===1?.05:e.deltaMode?1:.002)*n};function iXn({zoomPanValues:e,noWheelClassName:n,d3Selection:t,d3Zoom:r,panOnScrollMode:s,panOnScrollSpeed:i,zoomOnPinch:a,onPanZoomStart:o,onPanZoom:c,onPanZoomEnd:u}){return h=>{if(Ud(h,n))return h.ctrlKey&&h.preventDefault(),!1;h.preventDefault(),h.stopImmediatePropagation();const f=t.property("__zoom").k||1;if(h.ctrlKey&&a){const v=ao(h),b=dG(h),y=f*Math.pow(2,b);r.scaleTo(t,y,v,h);return}const p=h.deltaMode===1?20:1;let m=s===lf.Vertical?0:h.deltaX*p,w=s===lf.Horizontal?0:h.deltaY*p;!um()&&h.shiftKey&&s!==lf.Vertical&&(m=h.deltaY*p,w=0),r.translateBy(t,-(m/f)*i,-(w/f)*i,{internal:!0});const k=sx(t.property("__zoom"));clearTimeout(e.panScrollTimeout),e.isPanScrolling?(c==null||c(h,k),e.panScrollTimeout=setTimeout(()=>{u==null||u(h,k),e.isPanScrolling=!1},150)):(e.isPanScrolling=!0,o==null||o(h,k))}}function aXn({noWheelClassName:e,preventScrolling:n,d3ZoomHandler:t}){return function(r,s){const i=r.type==="wheel",a=!n&&i&&!r.ctrlKey,o=Ud(r,e);if(r.ctrlKey&&i&&o&&r.preventDefault(),a||o)return null;r.preventDefault(),t.call(this,r,s)}}function oXn({zoomPanValues:e,onDraggingChange:n,onPanZoomStart:t}){return r=>{var i,a,o;if((i=r.sourceEvent)!=null&&i.internal)return;const s=sx(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 cXn({zoomPanValues:e,panOnDrag:n,onPaneContextMenu:t,onTransformChange:r,onPanZoom:s}){return i=>{var a,o;e.usedRightMouseButton=!!(t&&fG(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,sx(i.transform)))}}function lXn({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&&fG(n,e.mouseButton??0)&&!e.usedRightMouseButton&&a.sourceEvent&&i(a.sourceEvent),e.usedRightMouseButton=!1,r(!1),s)){const c=sx(a.transform);e.prevViewport=c,clearTimeout(e.timerId),e.timerId=setTimeout(()=>{s==null||s(a.sourceEvent,c)},t?150:0)}}}function uXn({zoomActivationKeyPressed:e,zoomOnScroll:n,zoomOnPinch:t,panOnDrag:r,panOnScroll:s,zoomOnDoubleClick:i,userSelectionActive:a,noWheelClassName:o,noPanClassName:c,lib:u,connectionInProgress:h}){return f=>{var v;const p=e||n,m=t&&f.ctrlKey,w=f.type==="wheel";if(f.button===1&&f.type==="mousedown"&&(Ud(f,`${u}-flow__node`)||Ud(f,`${u}-flow__edge`)))return!0;if(!r&&!p&&!s&&!i&&!t||a||h&&!w||Ud(f,o)&&w||Ud(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 _Xn({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},h=e.getBoundingClientRect(),f=$U().scaleExtent([n,t]).translateExtent(r),p=fa(e).call(f);y({x:s.x,y:s.y,zoom:qh(s.zoom,n,t)},[[0,0],[h.width,h.height]],r);const m=p.on("wheel.zoom"),w=p.on("dblclick.zoom");f.wheelDelta(dG);async function k(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?z0:mv).transform(G4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}function v({noWheelClassName:I,noPanClassName:B,onPaneContextMenu:G,userSelectionActive:q,panOnScroll:Q,panOnDrag:K,panOnScrollMode:Z,panOnScrollSpeed:J,preventScrolling:$,zoomOnPinch:L,zoomOnScroll:F,zoomOnDoubleClick:U,zoomActivationKeyPressed:H,lib:oe,onTransformChange:ae,connectionInProgress:ue,paneClickDistance:se,selectionOnDrag:V}){q&&!u.isZoomingOrPanning&&b();const ne=Q&&!H&&!q;f.clickDistance(V?1/0:!ho(se)||se<0?0:se);const ce=ne?iXn({zoomPanValues:u,noWheelClassName:I,d3Selection:p,d3Zoom:f,panOnScrollMode:Z,panOnScrollSpeed:J,zoomOnPinch:L,onPanZoomStart:a,onPanZoom:i,onPanZoomEnd:o}):aXn({noWheelClassName:I,preventScrolling:$,d3ZoomHandler:m});p.on("wheel.zoom",ce,{passive:!1});const he=oXn({zoomPanValues:u,onDraggingChange:c,onPanZoomStart:a});f.on("start",he);const me=cXn({zoomPanValues:u,panOnDrag:K,onPaneContextMenu:!!G,onPanZoom:i,onTransformChange:ae});f.on("zoom",me);const Ae=lXn({zoomPanValues:u,panOnDrag:K,panOnScroll:Q,onPaneContextMenu:G,onPanZoomEnd:o,onDraggingChange:c});f.on("end",Ae);const Pe=uXn({zoomActivationKeyPressed:H,panOnDrag:K,zoomOnScroll:F,panOnScroll:Q,zoomOnDoubleClick:U,zoomOnPinch:L,userSelectionActive:q,noPanClassName:B,noWheelClassName:I,lib:oe,connectionInProgress:ue});f.filter(Pe),U?p.on("dblclick.zoom",w):p.on("dblclick.zoom",null)}function b(){f.on("zoom",null)}async function y(I,B,G){const q=U4(I),Q=f==null?void 0:f.constrain()(q,B,G);return Q&&await k(Q),Q}async function x(I,B){const G=U4(I);return await k(G,B),G}function C(I){if(p){const B=U4(I),G=p.property("__zoom");(G.k!==I.zoom||G.x!==I.x||G.y!==I.y)&&(f==null||f.transform(p,B,null,{sync:!0}))}}function N(){const I=p?IU(p.node()):{x:0,y:0,k:1};return{x:I.x,y:I.y,zoom:I.k}}async function j(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?z0:mv).scaleTo(G4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}async function A(I,B){return p?new Promise(G=>{f==null||f.interpolate((B==null?void 0:B.interpolate)==="linear"?z0:mv).scaleBy(G4(p,B==null?void 0:B.duration,B==null?void 0:B.ease,()=>G(!0)),I)}):!1}function z(I){f==null||f.scaleExtent(I)}function M(I){f==null||f.translateExtent(I)}function D(I){const B=!ho(I)||I<0?0:I;f==null||f.clickDistance(B)}return{update:v,destroy:b,setViewport:x,setViewportConstrained:y,getViewport:N,scaleTo:j,scaleBy:A,setScaleExtent:z,setTranslateExtent:M,syncViewport:C,setClickDistance:D}}var Gh;(function(e){e.Line="line",e.Handle="handle"})(Gh||(Gh={}));function fXn({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 cO(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 hu(e,n){return Math.max(0,n-e)}function pu(e,n){return Math.max(0,e-n)}function q1(e,n,t){return Math.max(0,n-e,e-t)}function lO(e,n){return e?!n:n}function dXn(e,n,t,r,s,i,a,o){let{affectsX:c,affectsY:u}=n;const{isHorizontal:h,isVertical:f}=n,p=h&&f,{xSnapped:m,ySnapped:w}=t,{minWidth:k,maxWidth:v,minHeight:b,maxHeight:y}=r,{x,y:C,width:N,height:j,aspectRatio:A}=e;let z=Math.floor(h?m-e.pointerX:0),M=Math.floor(f?w-e.pointerY:0);const D=N+(c?-z:z),I=j+(u?-M:M),B=-i[0]*N,G=-i[1]*j;let q=q1(D,k,v),Q=q1(I,b,y);if(a){let J=0,$=0;c&&z<0?J=hu(x+z+B,a[0][0]):!c&&z>0&&(J=pu(x+D+B,a[1][0])),u&&M<0?$=hu(C+M+G,a[0][1]):!u&&M>0&&($=pu(C+I+G,a[1][1])),q=Math.max(q,J),Q=Math.max(Q,$)}if(o){let J=0,$=0;c&&z>0?J=pu(x+z,o[0][0]):!c&&z<0&&(J=hu(x+D,o[1][0])),u&&M>0?$=pu(C+M,o[0][1]):!u&&M<0&&($=hu(C+I,o[1][1])),q=Math.max(q,J),Q=Math.max(Q,$)}if(s){if(h){const J=q1(D/A,b,y)*A;if(q=Math.max(q,J),a){let $=0;!c&&!u||c&&!u&&p?$=pu(C+G+D/A,a[1][1])*A:$=hu(C+G+(c?z:-z)/A,a[0][1])*A,q=Math.max(q,$)}if(o){let $=0;!c&&!u||c&&!u&&p?$=hu(C+D/A,o[1][1])*A:$=pu(C+(c?z:-z)/A,o[0][1])*A,q=Math.max(q,$)}}if(f){const J=q1(I*A,k,v)/A;if(Q=Math.max(Q,J),a){let $=0;!c&&!u||u&&!c&&p?$=pu(x+I*A+B,a[1][0])/A:$=hu(x+(u?M:-M)*A+B,a[0][0])/A,Q=Math.max(Q,$)}if(o){let $=0;!c&&!u||u&&!c&&p?$=hu(x+I*A,o[1][0])/A:$=pu(x+(u?M:-M)*A,o[0][0])/A,Q=Math.max(Q,$)}}}M=M+(M<0?Q:-Q),z=z+(z<0?q:-q),s&&(p?D>I*A?M=(lO(c,u)?-z:z)/A:z=(lO(c,u)?-M:M)*A:h?(M=z/A,u=c):(z=M*A,c=u));const K=c?x+z:x,Z=u?C+M:C;return{width:N+(c?-z:z),height:j+(u?-M:M),x:i[0]*z*(c?-1:1)+K,y:i[1]*M*(u?-1:1)+Z}}const hG={width:0,height:0,x:0,y:0},hXn={...hG,pointerX:0,pointerY:0,aspectRatio:1};function pXn(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 mXn({domNode:e,nodeId:n,getStoreItems:t,onChange:r,onEnd:s}){const i=fa(e);let a={controlDirection:cO("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:h,keepAspectRatio:f,resizeDirection:p,onResizeStart:m,onResize:w,onResizeEnd:k,shouldResize:v}){let b={...hG},y={...hXn};a={boundaries:h,resizeDirection:p,keepAspectRatio:f,controlDirection:cO(u)};let x,C=null,N=[],j,A,z,M=!1;const D=kU().on("start",I=>{const{nodeLookup:B,transform:G,snapGrid:q,snapToGrid:Q,nodeOrigin:K,paneDomNode:Z}=t();if(x=B.get(n),!x)return;C=(Z==null?void 0:Z.getBoundingClientRect())??null;const{xSnapped:J,ySnapped:$}=j0(I.sourceEvent,{transform:G,snapGrid:q,snapToGrid:Q,containerBounds:C});b={width:x.measured.width??0,height:x.measured.height??0,x:x.position.x??0,y:x.position.y??0},y={...b,pointerX:J,pointerY:$,aspectRatio:b.width/b.height},j=void 0,A=Ef(x.extent)?x.extent:void 0,x.parentId&&(x.extent==="parent"||x.expandParent)&&(j=B.get(x.parentId)),j&&x.extent==="parent"&&(A=[[0,0],[j.measured.width,j.measured.height]]),N=[],z=void 0;for(const[L,F]of B)if(F.parentId===n&&(N.push({id:L,position:{...F.position},extent:F.extent}),F.extent==="parent"||F.expandParent)){const U=pXn(F,x,F.origin??K);z?z=[[Math.min(U[0][0],z[0][0]),Math.min(U[0][1],z[0][1])],[Math.max(U[1][0],z[1][0]),Math.max(U[1][1],z[1][1])]]:z=U}m==null||m(I,{...b})}).on("drag",I=>{const{transform:B,snapGrid:G,snapToGrid:q,nodeOrigin:Q}=t(),K=j0(I.sourceEvent,{transform:B,snapGrid:G,snapToGrid:q,containerBounds:C}),Z=[];if(!x)return;const{x:J,y:$,width:L,height:F}=b,U={},H=x.origin??Q,{width:oe,height:ae,x:ue,y:se}=dXn(y,a.controlDirection,K,a.boundaries,a.keepAspectRatio,H,A,z),V=oe!==L,ne=ae!==F,ce=ue!==J&&V,he=se!==$&≠if(!ce&&!he&&!V&&!ne)return;if((ce||he||H[0]===1||H[1]===1)&&(U.x=ce?ue:b.x,U.y=he?se:b.y,b.x=U.x,b.y=U.y,N.length>0)){const Ye=ue-J,Re=se-$;for(const $e of N)$e.position={x:$e.position.x-Ye+H[0]*(oe-L),y:$e.position.y-Re+H[1]*(ae-F)},Z.push($e)}if((V||ne)&&(U.width=V&&(!a.resizeDirection||a.resizeDirection==="horizontal")?oe:b.width,U.height=ne&&(!a.resizeDirection||a.resizeDirection==="vertical")?ae:b.height,b.width=U.width,b.height=U.height),j&&x.expandParent){const Ye=H[0]*(U.width??0);U.x&&U.x{M&&(k==null||k(I,{...b}),s==null||s({...b}),M=!1)});i.call(D)}function c(){i.on(".drag",null)}return{update:o,destroy:c}}const gXn={},uO=e=>{let n;const t=new Set,r=(h,f)=>{const p=typeof h=="function"?h(n):h;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:h=>(t.add(h),()=>t.delete(h)),destroy:()=>{(gXn?"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},vXn=e=>e?uO(e):uO,{useDebugValue:bXn}=it,{useSyncExternalStoreWithSelector:yXn}=NQ,xXn=e=>e;function pG(e,n=xXn,t){const r=yXn(e.subscribe,e.getState,e.getServerState||e.getInitialState,n,t);return bXn(r),r}const _O=(e,n)=>{const t=vXn(e),r=(s,i=n)=>pG(t,s,i);return Object.assign(r,t),r},wXn=(e,n)=>e?_O(e,n):_O;function Tr(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 ix=T.createContext(null),kXn=ix.Provider,mG=yo.error001("react");function Bn(e,n){const t=T.useContext(ix);if(t===null)throw new Error(mG);return pG(t,e,n)}function Mr(){const e=T.useContext(ix);if(e===null)throw new Error(mG);return T.useMemo(()=>({getState:e.getState,setState:e.setState,subscribe:e.subscribe}),[e])}const fO={display:"none"},SXn={position:"absolute",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0px, 0px, 0px, 0px)",clipPath:"inset(100%)"},gG="react-flow__node-desc",vG="react-flow__edge-desc",CXn="react-flow__aria-live",EXn=e=>e.ariaLiveMessage,NXn=e=>e.ariaLabelConfig;function zXn({rfId:e}){const n=Bn(EXn);return _.jsx("div",{id:`${CXn}-${e}`,"aria-live":"assertive","aria-atomic":"true",style:SXn,children:n})}function jXn({rfId:e,disableKeyboardA11y:n}){const t=Bn(NXn);return _.jsxs(_.Fragment,{children:[_.jsx("div",{id:`${gG}-${e}`,style:fO,children:n?t["node.a11yDescription.default"]:t["node.a11yDescription.keyboardDisabled"]}),_.jsx("div",{id:`${vG}-${e}`,style:fO,children:t["edge.a11yDescription.default"]}),!n&&_.jsx(zXn,{rfId:e})]})}const ax=T.forwardRef(({position:e="top-left",children:n,className:t,style:r,...s},i)=>{const a=`${e}`.split("-");return _.jsx("div",{className:gs(["react-flow__panel",t,...a]),style:r,ref:i,...s,children:n})});ax.displayName="Panel";const dO="https://reactflow.dev?utm_source=attribution";function AXn({proOptions:e,position:n="bottom-right"}){return e!=null&&e.hideAttribution?null:_.jsx(ax,{position:n,className:"react-flow__attribution","data-message":`Please only hide this attribution when you are subscribed to React Flow Pro: ${dO}`,children:_.jsx("a",{href:dO,target:"_blank",rel:"noopener noreferrer","aria-label":"React Flow attribution",children:"React Flow"})})}const TXn=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}},U1=e=>e.id;function RXn(e,n){return Tr(e.selectedNodes.map(U1),n.selectedNodes.map(U1))&&Tr(e.selectedEdges.map(U1),n.selectedEdges.map(U1))}function MXn({onSelectionChange:e}){const n=Mr(),{selectedNodes:t,selectedEdges:r}=Bn(TXn,RXn);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 OXn=e=>!!e.onSelectionChangeHandlers;function DXn({onSelectionChange:e}){const n=Bn(OXn);return e||n?_.jsx(MXn,{onSelectionChange:e}):null}const bG=[0,0],LXn={x:0,y:0,zoom:1},IXn=["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"],hO=[...IXn,"rfId"],$Xn=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}),pO={translateExtent:om,nodeOrigin:bG,minZoom:.5,maxZoom:2,elementsSelectable:!0,noPanClassName:"nopan",rfId:"1"};function BXn(e){const{setNodes:n,setEdges:t,setMinZoom:r,setMaxZoom:s,setTranslateExtent:i,setNodeExtent:a,reset:o,setDefaultNodesAndEdges:c}=Bn($Xn,Tr),u=Mr();T.useEffect(()=>(c(e.defaultNodes,e.defaultEdges),()=>{h.current=pO,o()}),[]);const h=T.useRef(pO);return T.useEffect(()=>{for(const f of hO){const p=e[f],m=h.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:jQn(p)}):f==="fitView"?u.setState({fitViewQueued:p}):f==="fitViewOptions"?u.setState({fitViewOptions:p}):u.setState({[f]:p})))}h.current=e},hO.map(f=>e[f])),null}function mO(){return typeof window>"u"||!window.matchMedia?null:window.matchMedia("(prefers-color-scheme: dark)")}function PXn(e){var r;const[n,t]=T.useState(e==="system"?null:e);return T.useEffect(()=>{if(e!=="system"){t(e);return}const s=mO(),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=mO())!=null&&r.matches?"dark":"light"}const gO=typeof document<"u"?document:null;function _m(e=null,n={target:gO,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(` -`)),h=u.reduce((f,p)=>f.concat(...p),[]);return[u,h]}return[[],[]]},[e]);return T.useEffect(()=>{const c=(n==null?void 0:n.target)??mO,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const h=m=>{var v,b;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&YU(m))return!1;const k=vO(m.code,o);if(i.current.add(m[k]),gO(a,i.current,!1)){const y=((b=(v=m.composedPath)==null?void 0:v.call(m))==null?void 0:b[0])||m.target,x=(y==null?void 0:y.nodeName)==="BUTTON"||(y==null?void 0:y.nodeName)==="A";n.preventDefault!==!1&&(s.current||!x)&&m.preventDefault(),r(!0)}},f=m=>{const w=vO(m.code,o);gO(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",h),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function gO(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function vO(e,n){return n.includes(e)?"code":"key"}const nXn=()=>{const e=Mr();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=o7(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},h=t.snapGrid??s,f=t.snapToGrid??i;return Jm(u,r,f,h)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=Uh(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)rXn(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 rXn(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 sXn(e,n){return bG(e,n)}function iXn(e,n){return bG(e,n)}function L_(e,n){return{id:e,type:"select",selected:n}}function Gd(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(L_(i.id,a)))}return r}function bO({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 yO(e){return{id:e.id,type:"remove"}}const aXn=VU();function oXn(e,n,t={}){return XWn(e,n,{...t,onError:t.onError??aXn})}const xO=e=>DWn(e),cXn=e=>HU(e);function yG(e){return T.forwardRef(e)}const lXn=typeof window<"u"?T.useLayoutEffect:T.useEffect;function wO(e){const[n,t]=T.useState(BigInt(0)),[r]=T.useState(()=>uXn(()=>t(s=>s+BigInt(1))));return lXn(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function uXn(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const xG=T.createContext(null);function _Xn({children:e}){const n=Mr(),t=T.useCallback(o=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:h,onNodesChange:f,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:w}=n.getState();let k=c;for(const b of o)k=typeof b=="function"?b(k):b;let v=bO({items:k,lookup:p});for(const b of w.values())v=b(v);h&&u(k),v.length>0?f==null||f(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:y,setNodes:x}=n.getState();b&&x(y)})},[]),r=wO(t),s=T.useCallback(o=>{const{edges:c=[],setEdges:u,hasDefaultEdges:h,onEdgesChange:f,edgeLookup:p}=n.getState();let m=c;for(const w of o)m=typeof w=="function"?w(m):w;h?u(m):f&&f(bO({items:m,lookup:p}))},[]),i=wO(s),a=T.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return _.jsx(xG.Provider,{value:a,children:e})}function fXn(){const e=T.useContext(xG);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const dXn=e=>!!e.panZoom;function h7(){const e=nXn(),n=Mr(),t=fXn(),r=Bn(dXn),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 b,y;const{nodeLookup:p,nodeOrigin:m}=n.getState(),w=xO(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:((b=w.measured)==null?void 0:b.width)??w.width,height:((y=w.measured)==null?void 0:y.height)??w.height};return lm(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&&xO(v)?v:{...k,...v}}return k}))},h=(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&&cXn(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(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x:w,y:k,zoom:v}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:m,edges:w,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:y,onDelete:x,onBeforeDelete:C}=n.getState(),{nodes:N,edges:j}=await PWn({nodesToRemove:f,edgesToRemove:p,nodes:m,edges:w,onBeforeDelete:C}),A=j.length>0,z=N.length>0;if(A){const M=j.map(yO);v==null||v(j),y(M)}if(z){const M=N.map(yO);k==null||k(N),b(M)}return(z||A)&&(x==null||x({nodes:N,edges:j})),{deletedNodes:N,deletedEdges:j}},getIntersectingNodes:(f,p=!0,m)=>{const w=XM(f),k=w?f:c(f),v=m!==void 0;return k?(m||n.getState().nodes).filter(b=>{const y=n.getState().nodeLookup.get(b.id);if(y&&!w&&(b.id===f.id||!y.internals.positionAbsolute))return!1;const x=lm(v?b:y),C=Ab(x,k);return p&&C>0||C>=x.width*x.height||C>=k.width*k.height}):[]},isNodeIntersecting:(f,p,m=!0)=>{const k=XM(f)?f:c(f);if(!k)return!1;const v=Ab(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:h,updateEdgeData:(f,p,m={replace:!1})=>{h(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 LWn(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??qWn();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 kO=e=>e.selected,hXn=typeof window<"u"?window:void 0;function pXn({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=Mr(),{deleteElements:r}=h7(),s=_m(e,{actInsideInputWithModifier:!1}),i=_m(n,{target:hXn});T.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(kO),edges:a.filter(kO)}),t.setState({nodesSelectionActive:!1})}},[s]),T.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function mXn(e){const n=Mr();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=c7(e.current);(r.height===0||r.width===0)&&((o=(a=n.getState()).onError)==null||o.call(a,"004",yo.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 cx={position:"absolute",width:"100%",height:"100%",top:0,left:0},gXn=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function vXn({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=cf.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:c,translateExtent:u,minZoom:h,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:w,noWheelClassName:k,noPanClassName:v,onViewportChange:b,isControlledViewport:y,paneClickDistance:x,selectionOnDrag:C}){const N=Mr(),j=T.useRef(null),{userSelectionActive:A,lib:z,connectionInProgress:M}=Bn(gXn,Tr),D=_m(p),I=T.useRef();mXn(j);const B=T.useCallback(G=>{b==null||b({x:G[0],y:G[1],zoom:G[2]}),y||N.setState({transform:G})},[b,y]);return T.useEffect(()=>{if(j.current){I.current=EQn({domNode:j.current,minZoom:h,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:V=>N.setState(Z=>Z.paneDragging===V?Z:{paneDragging:V}),onPanZoomStart:(V,Z)=>{const{onViewportChangeStart:J,onMoveStart:$}=N.getState();$==null||$(V,Z),J==null||J(Z)},onPanZoom:(V,Z)=>{const{onViewportChange:J,onMove:$}=N.getState();$==null||$(V,Z),J==null||J(Z)},onPanZoomEnd:(V,Z)=>{const{onViewportChangeEnd:J,onMoveEnd:$}=N.getState();$==null||$(V,Z),J==null||J(Z)}});const{x:G,y:U,zoom:Q}=I.current.getViewport();return N.setState({panZoom:I.current,transform:[G,U,Q],domNode:j.current.closest(".react-flow")}),()=>{var V;(V=I.current)==null||V.destroy()}}},[]),T.useEffect(()=>{var G;(G=I.current)==null||G.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:z,onTransformChange:B,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:x})},[e,n,t,r,s,i,a,o,D,m,v,A,k,z,B,M,C,x]),_.jsx("div",{className:"react-flow__renderer",ref:j,style:cx,children:w})}const bXn=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function yXn(){const{userSelectionActive:e,userSelectionRect:n}=Bn(bXn,Tr);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 V4=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},xXn=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function wXn({isSelecting:e,selectionKeyPressed:n,selectionMode:t=cm.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:h,onPaneScroll:f,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:w,children:k}){const v=T.useRef(0),b=Mr(),{userSelectionActive:y,elementsSelectable:x,dragging:C,panBy:N,autoPanSpeed:j}=Bn(xXn,Tr),A=x&&(e||y),z=T.useRef(null),M=T.useRef(),D=T.useRef(new Set),I=T.useRef(new Set),B=T.useRef(!1),G=T.useRef(!1),U=T.useRef({x:0,y:0}),Q=T.useRef(!1),V=K=>{if(G.current||B.current||b.getState().connection.inProgress){G.current=!1,B.current=!1;return}u==null||u(K),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},Z=K=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){K.preventDefault();return}h==null||h(K)},J=f?K=>f(K):void 0,$=K=>{G.current&&(K.stopPropagation(),G.current=!1)},L=K=>{var $e,yt;const{domNode:oe,transform:ce}=b.getState();if(M.current=oe==null?void 0:oe.getBoundingClientRect(),!M.current)return;const pe=K.target===z.current;if(!pe&&!!K.target.closest(".nokey")||!e||!(a&&pe||n)||K.button!==0||!K.isPrimary)return;(yt=($e=K.target)==null?void 0:$e.setPointerCapture)==null||yt.call($e,K.pointerId),G.current=!1;const{x:Fe,y:Ye}=po(K.nativeEvent,M.current),Te=Jm({x:Fe,y:Ye},ce);b.setState({userSelectionRect:{width:0,height:0,startX:Te.x,startY:Te.y,x:Fe,y:Ye}}),pe||(K.stopPropagation(),K.preventDefault())};function q(K,oe){const{userSelectionRect:ce}=b.getState();if(!ce)return;const{transform:pe,nodeLookup:ve,edgeLookup:Me,connectionLookup:Fe,triggerNodeChanges:Ye,triggerEdgeChanges:Te,defaultEdgeOptions:$e}=b.getState(),yt={x:ce.startX,y:ce.startY},{x:ot,y:Mt}=Uh(yt,pe),jt={startX:yt.x,startY:yt.y,x:Kke.id)),I.current=new Set;const nt=($e==null?void 0:$e.selectable)??!0;for(const ke of D.current){const me=Fe.get(ke);if(me)for(const{edgeId:je}of me.values()){const qe=Me.get(je);qe&&(qe.selectable??nt)&&I.current.add(je)}}if(!YM(Pt,D.current)){const ke=Gd(ve,D.current,!0);Ye(ke)}if(!YM(Le,I.current)){const ke=Gd(Me,I.current);Te(ke)}b.setState({userSelectionRect:jt,userSelectionActive:!0,nodesSelectionActive:!1})}function P(){if(!s||!M.current)return;const[K,oe]=a7(U.current,M.current,j);N({x:K,y:oe}).then(ce=>{if(!G.current||!ce){v.current=requestAnimationFrame(P);return}const{x:pe,y:ve}=U.current;q(pe,ve),v.current=requestAnimationFrame(P)})}const F=()=>{cancelAnimationFrame(v.current),v.current=0,Q.current=!1};T.useEffect(()=>()=>F(),[]);const re=K=>{const{userSelectionRect:oe,transform:ce,resetSelectedElements:pe}=b.getState();if(!M.current||!oe)return;const{x:ve,y:Me}=po(K.nativeEvent,M.current);U.current={x:ve,y:Me};const Fe=Uh({x:oe.startX,y:oe.startY},ce);if(!G.current){const Ye=n?0:i;if(Math.hypot(ve-Fe.x,Me-Fe.y)<=Ye)return;pe(),o==null||o(K)}G.current=!0,Q.current||(P(),Q.current=!0),q(ve,Me)},ie=K=>{var oe,ce;if(!A){K.target===z.current&&b.getState().connection.inProgress&&(B.current=!0);return}K.button===0&&((ce=(oe=K.target)==null?void 0:oe.releasePointerCapture)==null||ce.call(oe,K.pointerId),!y&&K.target===z.current&&b.getState().userSelectionRect&&(V==null||V(K)),b.setState({userSelectionActive:!1,userSelectionRect:null}),G.current&&(c==null||c(K),b.setState({nodesSelectionActive:D.current.size>0})),F())},ue=K=>{var oe,ce;(ce=(oe=K.target)==null?void 0:oe.releasePointerCapture)==null||ce.call(oe,K.pointerId),F()},se=r===!0||Array.isArray(r)&&r.includes(0);return _.jsxs("div",{className:ms(["react-flow__pane",{draggable:se,dragging:C,selection:e}]),onClick:A?void 0:V4(V,z),onContextMenu:V4(Z,z),onWheel:V4(J,z),onPointerEnter:A?void 0:p,onPointerMove:A?re:m,onPointerUp:ie,onPointerCancel:A?ue:void 0,onPointerDownCapture:A?L:void 0,onClickCapture:A?$:void 0,onPointerLeave:w,ref:z,style:cx,children:[k,_.jsx(yXn,{})]})}function Uk({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",yo.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):s([e])}function wG({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=Mr(),[c,u]=T.useState(!1),h=T.useRef();return T.useEffect(()=>{h.current=fQn({getStoreItems:()=>o.getState(),onNodeMouseDown:f=>{Uk({id:f,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),T.useEffect(()=>{if(!(n||!e.current||!h.current))return h.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var f;(f=h.current)==null||f.destroy()}},[t,r,n,i,e,s,a]),c}const kXn=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function kG(){const e=Mr();return T.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:c,nodeLookup:u,nodeOrigin:h}=e.getState(),f=new Map,p=kXn(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[,b]of u){if(!p(b))continue;let y={x:b.internals.positionAbsolute.x+k,y:b.internals.positionAbsolute.y+v};s&&(y=Zm(y,i));const{position:x,positionAbsolute:C}=qU({nodeId:b.id,nextPosition:y,nodeLookup:u,nodeExtent:r,nodeOrigin:h,onError:o});b.position=x,b.internals.positionAbsolute=C,f.set(b.id,b)}c(f)},[])}const p7=T.createContext(null),SXn=p7.Provider;p7.Consumer;const SG=()=>T.useContext(p7),CXn=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),CG=T.createContext(null);function EXn({children:e}){const n=Bn(CXn,Tr);return _.jsx(CG.Provider,{value:n,children:e})}function NXn(){const e=T.useContext(CG);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const zXn={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},jXn=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:c,isValid:u}=a;if(!o&&!s)return zXn;const h=(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:h,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===Hh.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:h&&u}};function AXn({type:e="source",position:n=Rt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:c,className:u,onMouseDown:h,onTouchStart:f,...p},m){var Q,V;const w=a||null,k=e==="target",v=Mr(),b=SG(),{connectOnClick:y,noPanClassName:x,rfId:C}=NXn(),{connectingFrom:N,connectingTo:j,clickConnecting:A,isPossibleEndHandle:z,connectionInProcess:M,clickConnectionInProcess:D,valid:I}=Bn(jXn(b,w,e),Tr);b||(V=(Q=v.getState()).onError)==null||V.call(Q,"010",yo.error010());const B=Z=>{const{defaultEdgeOptions:J,onConnect:$,hasDefaultEdges:L}=v.getState(),q={...J,...Z};if(L){const{edges:P,setEdges:F,onError:re}=v.getState();F(oXn(q,P,{onError:re}))}$==null||$(q),o==null||o(q)},G=Z=>{if(!b)return;const J=ZU(Z.nativeEvent);if(s&&(J&&Z.button===0||!J)){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:b,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...L)=>{var q,P;return(P=(q=v.getState()).onConnectEnd)==null?void 0:P.call(q,...L)},updateConnection:$.updateConnection,onConnect:B,isValidConnection:t||((...L)=>{var q,P;return((P=(q=v.getState()).isValidConnection)==null?void 0:P.call(q,...L))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}J?h==null||h(Z):f==null||f(Z)},U=Z=>{const{onClickConnectStart:J,onClickConnectEnd:$,connectionClickStartHandle:L,connectionMode:q,isValidConnection:P,lib:F,rfId:re,nodeLookup:ie,connection:ue}=v.getState();if(!b||!L&&!s)return;if(!L){J==null||J(Z.nativeEvent,{nodeId:b,handleId:w,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:w}});return}const se=XU(Z.target),K=t||P,{connection:oe,isValid:ce}=qk.isValid(Z.nativeEvent,{handle:{nodeId:b,id:w,type:e},connectionMode:q,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:K,flowId:re,doc:se,lib:F,nodeLookup:ie});ce&&oe&&B(oe);const pe=structuredClone(ue);delete pe.inProgress,pe.toPosition=pe.toHandle?pe.toHandle.position:null,$==null||$(Z,pe),v.setState({connectionClickStartHandle:null})};return _.jsx("div",{"data-handleid":w,"data-nodeid":b,"data-handlepos":n,"data-id":`${C}-${b}-${w}-${e}`,className:ms(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",x,u,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:i,clickconnecting:A,connectingfrom:N,connectingto:j,valid:I,connectionindicator:r&&(!M||z)&&(M||D?i:s)}]),onMouseDown:G,onTouchStart:G,onClick:y?U:void 0,ref:m,...p,children:c})}const dc=T.memo(yG(AXn));function TXn({data:e,isConnectable:n,sourcePosition:t=Rt.Bottom}){return _.jsxs(_.Fragment,{children:[e==null?void 0:e.label,_.jsx(dc,{type:"source",position:t,isConnectable:n})]})}function RXn({data:e,isConnectable:n,targetPosition:t=Rt.Top,sourcePosition:r=Rt.Bottom}){return _.jsxs(_.Fragment,{children:[_.jsx(dc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,_.jsx(dc,{type:"source",position:r,isConnectable:n})]})}function MXn(){return null}function OXn({data:e,isConnectable:n,targetPosition:t=Rt.Top}){return _.jsxs(_.Fragment,{children:[_.jsx(dc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Tb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},SO={input:TXn,default:RXn,output:OXn,group:MXn};function DXn(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 LXn=e=>{const{width:n,height:t,x:r,y:s}=Ym(e.nodeLookup,{filter:i=>!!i.selected});return{width:ho(n)?n:null,height:ho(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 IXn({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=Mr(),{width:s,height:i,transformString:a,userSelectionActive:o}=Bn(LXn,Tr),c=kG(),u=T.useRef(null);T.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const h=!o&&s!==null&&i!==null;if(wG({nodeRef:u,disabled:!h}),!h)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(Tb,m.key)&&(m.preventDefault(),c({direction:Tb[m.key],factor:m.shiftKey?4:1}))};return _.jsx("div",{className:ms(["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 CO=typeof window<"u"?window:void 0,$Xn=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:h,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:w,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:y,zoomOnPinch:x,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:j,zoomOnDoubleClick:A,panOnDrag:z,autoPanOnSelection:M,defaultViewport:D,translateExtent:I,minZoom:B,maxZoom:G,preventScrolling:U,onSelectionContextMenu:Q,noWheelClassName:V,noPanClassName:Z,disableKeyboardA11y:J,onViewportChange:$,isControlledViewport:L}){const{nodesSelectionActive:q,userSelectionActive:P}=Bn($Xn,Tr),F=_m(u,{target:CO}),re=_m(k,{target:CO}),ie=re||z,ue=re||C,se=h&&ie!==!0,K=F||P||se;return pXn({deleteKeyCode:c,multiSelectionKeyCode:w}),_.jsx(vXn,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:y,zoomOnPinch:x,panOnScroll:ue,panOnScrollSpeed:N,panOnScrollMode:j,zoomOnDoubleClick:A,panOnDrag:!F&&ie,defaultViewport:D,translateExtent:I,minZoom:B,maxZoom:G,zoomActivationKeyCode:v,preventScrolling:U,noWheelClassName:V,noPanClassName:Z,onViewportChange:$,isControlledViewport:L,paneClickDistance:o,selectionOnDrag:se,children:_.jsxs(wXn,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:ie,autoPanOnSelection:M,isSelecting:!!K,selectionMode:f,selectionKeyPressed:F,paneClickDistance:o,selectionOnDrag:se,children:[e,q&&_.jsx(IXn,{onSelectionContextMenu:Q,noPanClassName:Z,disableKeyboardA11y:J})]})})}EG.displayName="FlowRenderer";const BXn=T.memo(EG),PXn=e=>n=>e?i7(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 FXn(e){return Bn(T.useCallback(PXn(e),[e]),Tr)}const HXn=e=>e.updateNodeInternals;function qXn(){const e=Bn(HXn),[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 UXn({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=Mr(),i=T.useRef(null),a=T.useRef(null),o=T.useRef(e.sourcePosition),c=T.useRef(e.targetPosition),u=T.useRef(n),h=t&&!!e.internals.handleBounds;return T.useEffect(()=>{i.current&&!e.hidden&&(!h||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[h,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 GXn({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:c,nodesConnectable:u,nodesFocusable:h,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:w,rfId:k,nodeTypes:v,nodeClickDistance:b,onError:y}){const{node:x,internals:C,isParent:N}=Bn(K=>{const oe=K.nodeLookup.get(e),ce=K.parentLookup.has(e);return{node:oe,internals:oe.internals,isParent:ce}},Tr);let j=x.type||"default",A=(v==null?void 0:v[j])||SO[j];A===void 0&&(y==null||y("003",yo.error003(j)),j="default",A=(v==null?void 0:v.default)||SO.default);const z=!!(x.draggable||o&&typeof x.draggable>"u"),M=!!(x.selectable||c&&typeof x.selectable>"u"),D=!!(x.connectable||u&&typeof x.connectable>"u"),I=!!(x.focusable||h&&typeof x.focusable>"u"),B=Mr(),G=WU(x),U=UXn({node:x,nodeType:j,hasDimensions:G,resizeObserver:f}),Q=wG({nodeRef:U,disabled:x.hidden||!z,noDragClassName:p,handleSelector:x.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:b}),V=kG();if(x.hidden)return null;const Z=Al(x),J=DXn(x),$=M||z||n||t||r||s,L=t?K=>t(K,{...C.userNode}):void 0,q=r?K=>r(K,{...C.userNode}):void 0,P=s?K=>s(K,{...C.userNode}):void 0,F=i?K=>i(K,{...C.userNode}):void 0,re=a?K=>a(K,{...C.userNode}):void 0,ie=K=>{const{selectNodesOnDrag:oe,nodeDragThreshold:ce}=B.getState();M&&(!oe||!z||ce>0)&&Uk({id:e,store:B,nodeRef:U}),n&&n(K,{...C.userNode})},ue=K=>{if(!(YU(K.nativeEvent)||w)){if($U.includes(K.key)&&M){const oe=K.key==="Escape";Uk({id:e,store:B,unselect:oe,nodeRef:U})}else if(z&&x.selected&&Object.prototype.hasOwnProperty.call(Tb,K.key)){K.preventDefault();const{ariaLabelConfig:oe}=B.getState();B.setState({ariaLiveMessage:oe["node.a11yDescription.ariaLiveMessage"]({direction:K.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),V({direction:Tb[K.key],factor:K.shiftKey?4:1})}}},se=()=>{var Fe;if(w||!((Fe=U.current)!=null&&Fe.matches(":focus-visible")))return;const{transform:K,width:oe,height:ce,autoPanOnNodeFocus:pe,setCenter:ve}=B.getState();if(!pe)return;i7(new Map([[e,x]]),{x:0,y:0,width:oe,height:ce},K,!0).length>0||ve(x.position.x+Z.width/2,x.position.y+Z.height/2,{zoom:K[2]})};return _.jsx("div",{className:ms(["react-flow__node",`react-flow__node-${j}`,{[m]:z},x.className,{selected:x.selected,selectable:M,parent:N,draggable:z,dragging:Q}]),ref:U,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:G?"visible":"hidden",...x.style,...J},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:q,onMouseLeave:P,onContextMenu:F,onClick:ie,onDoubleClick:re,onKeyDown:I?ue:void 0,tabIndex:I?0:void 0,onFocus:I?se:void 0,role:x.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${mG}-${k}`,"aria-label":x.ariaLabel,...x.domAttributes,children:_.jsx(SXn,{value:e,children:_.jsx(A,{id:e,data:x.data,type:j,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:x.selected??!1,selectable:M,draggable:z,deletable:x.deletable??!0,isConnectable:D,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:Q,dragHandle:x.dragHandle,zIndex:C.z,parentId:x.parentId,...Z})})})}var KXn=T.memo(GXn);const VXn=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}=Bn(VXn,Tr),a=FXn(e.onlyRenderVisibleElements),o=qXn();return _.jsx("div",{className:"react-flow__nodes",style:cx,children:a.map(c=>_.jsx(KXn,{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 WXn=T.memo(NG);function QXn(e){return Bn(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&&VWn({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Tr)}const XXn=({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"})},YXn=({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"})},EO={[zb.Arrow]:XXn,[zb.ArrowClosed]:YXn};function ZXn(e){const n=Mr();return T.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(EO,e)?EO[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",yo.error009(e)),null)},[e])}const JXn=({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=ZXn(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=Bn(i=>i.edges),r=Bn(i=>i.defaultEdgeOptions),s=T.useMemo(()=>tQn(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(JXn,{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 eYn=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,...h}){const[f,p]=T.useState({x:1,y:0,width:0,height:0}),m=ms(["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",...h,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 tYn=T.memo(jG);function lx({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c,interactionWidth:u=20,...h}){return _.jsxs(_.Fragment,{children:[_.jsx("path",{...h,d:e,fill:"none",className:ms(["react-flow__edge-path",h.className])}),u?_.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&ho(n)&&ho(t)?_.jsx(tYn,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c}):null]})}function NO({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===Rt.Left||e===Rt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function AG({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top}){const[a,o]=NO({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,u]=NO({pos:i,x1:r,y1:s,x2:e,y2:n}),[h,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}`,h,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:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:b})=>{const[y,x,C]=AG({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),N=e.isInternal?void 0:n;return _.jsx(lx,{id:N,path:y,labelX:x,labelY:C,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:b})})}const nYn=TG({isInternal:!1}),RG=TG({isInternal:!0});nYn.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:h,labelBgBorderRadius:f,style:p,sourcePosition:m=Rt.Bottom,targetPosition:w=Rt.Top,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:y})=>{const[x,C,N]=Pk({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:w,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset,stepPosition:b==null?void 0:b.stepPosition}),j=e.isInternal?void 0:n;return _.jsx(lx,{id:j,path:x,labelX:C,labelY:N,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,markerEnd:k,markerStart:v,interactionWidth:y})})}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 rYn=LG({isInternal:!1}),IG=LG({isInternal:!0});rYn.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:h,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:w,interactionWidth:k})=>{const[v,b,y]=nG({sourceX:t,sourceY:r,targetX:s,targetY:i}),x=e.isInternal?void 0:n;return _.jsx(lx,{id:x,path:v,labelX:b,labelY:y,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:w,interactionWidth:k})})}const sYn=$G({isInternal:!1}),BG=$G({isInternal:!0});sYn.displayName="StraightEdge";BG.displayName="StraightEdgeInternal";function PG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=Rt.Bottom,targetPosition:o=Rt.Top,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:y})=>{const[x,C,N]=eG({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:b==null?void 0:b.curvature}),j=e.isInternal?void 0:n;return _.jsx(lx,{id:j,path:x,labelX:C,labelY:N,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:y})})}const iYn=PG({isInternal:!1}),FG=PG({isInternal:!0});iYn.displayName="BezierEdge";FG.displayName="BezierEdgeInternal";const zO={default:FG,straight:BG,step:IG,smoothstep:DG,simplebezier:RG},jO={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},aYn=(e,n,t)=>t===Rt.Left?e-n:t===Rt.Right?e+n:e,oYn=(e,n,t)=>t===Rt.Top?e-n:t===Rt.Bottom?e+n:e,AO="react-flow__edgeupdater";function TO({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:ms([AO,`${AO}-${o}`]),cx:aYn(n,r,e),cy:oYn(t,r,e),r,stroke:"transparent",fill:"transparent"})}function cYn({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:c,onReconnect:u,onReconnectStart:h,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){const w=Mr(),k=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:j,domNode:A,connectionMode:z,connectionRadius:M,lib:D,onConnectStart:I,cancelConnection:B,nodeLookup:G,rfId:U,panBy:Q,updateConnection:V}=w.getState(),Z=N.type==="target",J=(q,P)=>{p(!1),f==null||f(q,t,N.type,P)},$=q=>u==null?void 0:u(t,q),L=(q,P)=>{p(!0),h==null||h(C,t,N.type),I==null||I(q,P)};qk.onPointerDown(C.nativeEvent,{autoPanOnConnect:j,connectionMode:z,connectionRadius:M,domNode:A,handleId:N.id,nodeId:N.nodeId,nodeLookup:G,isTarget:Z,edgeUpdaterType:N.type,lib:D,flowId:U,cancelConnection:B,panBy:Q,isValidConnection:(...q)=>{var P,F;return((F=(P=w.getState()).isValidConnection)==null?void 0:F.call(P,...q))??!0},onConnect:$,onConnectStart:L,onConnectEnd:(...q)=>{var P,F;return(F=(P=w.getState()).onConnectEnd)==null?void 0:F.call(P,...q)},onReconnectEnd:J,updateConnection:V,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"}),b=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),y=()=>m(!0),x=()=>m(!1);return _.jsxs(_.Fragment,{children:[(e===!0||e==="source")&&_.jsx(TO,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:y,onMouseOut:x,type:"source"}),(e===!0||e==="target")&&_.jsx(TO,{position:c,centerX:i,centerY:a,radius:n,onMouseDown:b,onMouseEnter:y,onMouseOut:x,type:"target"})]})}function lYn({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,reconnectRadius:h,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:w,edgeTypes:k,noPanClassName:v,onError:b,disableKeyboardA11y:y}){let x=Bn(ve=>ve.edgeLookup.get(e));const C=Bn(ve=>ve.defaultEdgeOptions);x=C?{...C,...x}:x;let N=x.type||"default",j=(k==null?void 0:k[N])||zO[N];j===void 0&&(b==null||b("011",yo.error011(N)),N="default",j=(k==null?void 0:k.default)||zO.default);const A=!!(x.focusable||n&&typeof x.focusable>"u"),z=typeof f<"u"&&(x.reconnectable||t&&typeof x.reconnectable>"u"),M=!!(x.selectable||r&&typeof x.selectable>"u"),D=T.useRef(null),[I,B]=T.useState(!1),[G,U]=T.useState(!1),Q=Mr(),{zIndex:V=x.zIndex,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:q,targetPosition:P}=Bn(T.useCallback(ve=>{const Me=ve.nodeLookup.get(x.source),Fe=ve.nodeLookup.get(x.target);if(!Me||!Fe)return jO;const Ye=eQn({id:e,sourceNode:Me,targetNode:Fe,sourceHandle:x.sourceHandle||null,targetHandle:x.targetHandle||null,connectionMode:ve.connectionMode,onError:b}),Te=KWn({selected:x.selected,zIndex:x.zIndex,sourceNode:Me,targetNode:Fe,elevateOnSelect:ve.elevateEdgesOnSelect,zIndexMode:ve.zIndexMode});return{...Ye||jO,zIndex:Te}},[x.source,x.target,x.sourceHandle,x.targetHandle,x.selected,x.zIndex]),Tr),F=T.useMemo(()=>x.markerStart?`url('#${Fk(x.markerStart,w)}')`:void 0,[x.markerStart,w]),re=T.useMemo(()=>x.markerEnd?`url('#${Fk(x.markerEnd,w)}')`:void 0,[x.markerEnd,w]);if(x.hidden||Z===null||J===null||$===null||L===null)return null;const ie=ve=>{var Te;const{addSelectedEdges:Me,unselectNodesAndEdges:Fe,multiSelectionActive:Ye}=Q.getState();M&&(Q.setState({nodesSelectionActive:!1}),x.selected&&Ye?(Fe({nodes:[],edges:[x]}),(Te=D.current)==null||Te.blur()):Me([e])),s&&s(ve,x)},ue=i?ve=>{i(ve,{...x})}:void 0,se=a?ve=>{a(ve,{...x})}:void 0,K=o?ve=>{o(ve,{...x})}:void 0,oe=c?ve=>{c(ve,{...x})}:void 0,ce=u?ve=>{u(ve,{...x})}:void 0,pe=ve=>{var Me;if(!y&&$U.includes(ve.key)&&M){const{unselectNodesAndEdges:Fe,addSelectedEdges:Ye}=Q.getState();ve.key==="Escape"?((Me=D.current)==null||Me.blur(),Fe({edges:[x]})):Ye([e])}};return _.jsx("svg",{style:{zIndex:V},children:_.jsxs("g",{className:ms(["react-flow__edge",`react-flow__edge-${N}`,x.className,v,{selected:x.selected,animated:x.animated,inactive:!M&&!s,updating:I,selectable:M}]),onClick:ie,onDoubleClick:ue,onContextMenu:se,onMouseEnter:K,onMouseMove:oe,onMouseLeave:ce,onKeyDown:A?pe:void 0,tabIndex:A?0:void 0,role:x.ariaRole??(A?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":x.ariaLabel===null?void 0:x.ariaLabel||`Edge from ${x.source} to ${x.target}`,"aria-describedby":A?`${gG}-${w}`:void 0,ref:D,...x.domAttributes,children:[!G&&_.jsx(j,{id:e,source:x.source,target:x.target,type:x.type,selected:x.selected,animated:x.animated,selectable:M,deletable:x.deletable??!0,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:q,targetPosition:P,data:x.data,style:x.style,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerStart:F,markerEnd:re,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth}),z&&_.jsx(cYn,{edge:x,isReconnectable:z,reconnectRadius:h,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:q,targetPosition:P,setUpdateHover:B,setReconnecting:U})]})})}var uYn=T.memo(lYn);const _Yn=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:h,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:y,onError:x}=Bn(_Yn,Tr),C=QXn(n);return _.jsxs("div",{className:"react-flow__edges",children:[_.jsx(eYn,{defaultColor:e,rfId:t}),C.map(N=>_.jsx(uYn,{id:N,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:y,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,onClick:h,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,rfId:t,onError:x,edgeTypes:r,disableKeyboardA11y:k},N))]})}HG.displayName="EdgeRenderer";const fYn=T.memo(HG),dYn=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function hYn({children:e}){const n=Bn(dYn);return _.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function pYn(e){const n=h7(),t=T.useRef(!1);T.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const mYn=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function gYn(e){const n=Bn(mYn),t=Mr();return T.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function vYn(e){return e.connection.inProgress?{...e.connection,to:Jm(e.connection.to,e.transform)}:{...e.connection}}function bYn(e){return vYn}function yYn(e){const n=bYn();return Bn(n,Tr)}const xYn=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function wYn({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:c}=Bn(xYn,Tr);return!(i&&s&&c)?null:_.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:_.jsx("g",{className:ms(["react-flow__connection",FU(o)]),children:_.jsx(qG,{style:n,type:t,CustomComponent:r,isValid:o})})})}const qG=({style:e,type:n=yu.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:c,to:u,toNode:h,toHandle:f,toPosition:p,pointer:m}=yYn();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:h,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 yu.Bezier:[w]=eG(k);break;case yu.SimpleBezier:[w]=AG(k);break;case yu.Step:[w]=Pk({...k,borderRadius:0});break;case yu.SmoothStep:[w]=Pk(k);break;default:[w]=nG(k)}return _.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};qG.displayName="ConnectionLine";const kYn={};function RO(e=kYn){T.useRef(e),Mr(),T.useEffect(()=>{},[e])}function SYn(){Mr(),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:h,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:w,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:y,selectionOnDrag:x,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:j,zoomActivationKeyCode:A,deleteKeyCode:z,onlyRenderVisibleElements:M,elementsSelectable:D,defaultViewport:I,translateExtent:B,minZoom:G,maxZoom:U,preventScrolling:Q,defaultMarkerColor:V,zoomOnScroll:Z,zoomOnPinch:J,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:q,zoomOnDoubleClick:P,panOnDrag:F,autoPanOnSelection:re,onPaneClick:ie,onPaneMouseEnter:ue,onPaneMouseMove:se,onPaneMouseLeave:K,onPaneScroll:oe,onPaneContextMenu:ce,paneClickDistance:pe,nodeClickDistance:ve,onEdgeContextMenu:Me,onEdgeMouseEnter:Fe,onEdgeMouseMove:Ye,onEdgeMouseLeave:Te,reconnectRadius:$e,onReconnect:yt,onReconnectStart:ot,onReconnectEnd:Mt,noDragClassName:jt,noWheelClassName:Pt,noPanClassName:Le,disableKeyboardA11y:nt,nodeExtent:ke,rfId:me,viewport:je,onViewportChange:qe}){return RO(e),RO(n),SYn(),pYn(t),gYn(je),_.jsx(BXn,{onPaneClick:ie,onPaneMouseEnter:ue,onPaneMouseMove:se,onPaneMouseLeave:K,onPaneContextMenu:ce,onPaneScroll:oe,paneClickDistance:pe,deleteKeyCode:z,selectionKeyCode:y,selectionOnDrag:x,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:j,zoomActivationKeyCode:A,elementsSelectable:D,zoomOnScroll:Z,zoomOnPinch:J,zoomOnDoubleClick:P,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:q,panOnDrag:F,autoPanOnSelection:re,defaultViewport:I,translateExtent:B,minZoom:G,maxZoom:U,onSelectionContextMenu:f,preventScrolling:Q,noDragClassName:jt,noWheelClassName:Pt,noPanClassName:Le,disableKeyboardA11y:nt,onViewportChange:qe,isControlledViewport:!!je,children:_.jsxs(hYn,{children:[_.jsx(fYn,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:yt,onReconnectStart:ot,onReconnectEnd:Mt,onlyRenderVisibleElements:M,onEdgeContextMenu:Me,onEdgeMouseEnter:Fe,onEdgeMouseMove:Ye,onEdgeMouseLeave:Te,reconnectRadius:$e,defaultMarkerColor:V,noPanClassName:Le,disableKeyboardA11y:nt,rfId:me}),_.jsx(wYn,{style:k,type:w,component:v,containerStyle:b}),_.jsx("div",{className:"react-flow__edgelabel-renderer"}),_.jsx(WXn,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,nodeClickDistance:ve,onlyRenderVisibleElements:M,noPanClassName:Le,noDragClassName:jt,disableKeyboardA11y:nt,nodeExtent:ke,rfId:me}),_.jsx("div",{className:"react-flow__viewport-portal"})]})})}UG.displayName="GraphView";const CYn=T.memo(UG),EYn=VU(),MO=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c=.5,maxZoom:u=2,nodeOrigin:h,nodeExtent:f,zIndexMode:p="basic"}={})=>{const m=new Map,w=new Map,k=new Map,v=new Map,b=r??n??[],y=t??e??[],x=h??[0,0],C=f??om;iG(k,v,b);const{nodesInitialized:N}=Hk(y,m,w,{nodeOrigin:x,nodeExtent:C,zIndexMode:p});let j=[0,0,1];if(a&&s&&i){const A=Ym(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:z,y:M,zoom:D}=o7(A,s,i,c,u,(o==null?void 0:o.padding)??.1);j=[z,M,D]}return{rfId:"1",width:s??0,height:i??0,transform:j,nodes:y,nodesInitialized:N,nodeLookup:m,parentLookup:w,edges:b,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:om,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Hh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,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:EYn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:BU,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},NYn=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:f,zIndexMode:p})=>IQn((m,w)=>{async function k(){const{nodeLookup:v,panZoom:b,fitViewOptions:y,fitViewResolver:x,width:C,height:N,minZoom:j,maxZoom:A}=w();b&&(await BWn({nodes:v,width:C,height:N,panZoom:b,minZoom:j,maxZoom:A},y),x==null||x.resolve(!0),m({fitViewResolver:null}))}return{...MO({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:f,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:y,nodeOrigin:x,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:j,nodesSelectionActive:A}=w(),{nodesInitialized:z,hasSelectedNodes:M}=Hk(v,b,y,{nodeOrigin:x,nodeExtent:f,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:j}),D=A&&M;N&&z?(k(),m({nodes:v,nodesInitialized:z,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):m({nodes:v,nodesInitialized:z,nodesSelectionActive:D})},setEdges:v=>{const{connectionLookup:b,edgeLookup:y}=w();iG(b,y,v),m({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:y}=w();y(v),m({hasDefaultNodes:!0})}if(b){const{setEdges:y}=w();y(b),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:y,parentLookup:x,domNode:C,nodeOrigin:N,nodeExtent:j,debug:A,fitViewQueued:z,zIndexMode:M}=w(),{changes:D,updatedInternals:I}=cQn(v,y,x,C,N,j,M);I&&(sQn(y,x,{nodeOrigin:N,nodeExtent:j,zIndexMode:M}),z?(k(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(D==null?void 0:D.length)>0&&(A&&console.log("React Flow: trigger node changes",D),b==null||b(D)))},updateNodePositions:(v,b=!1)=>{const y=[];let x=[];const{nodeLookup:C,triggerNodeChanges:N,connection:j,updateConnection:A,onNodesChangeMiddlewareMap:z}=w();for(const[M,D]of v){const I=C.get(M),B=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(D!=null&&D.position)),G={id:M,type:"position",position:B?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:b};if(I&&j.inProgress&&j.fromNode.id===I.id){const U=Nf(I,j.fromHandle,Rt.Left,!0);A({...j,from:U})}B&&I.parentId&&y.push({id:M,parentId:I.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),x.push(G)}if(y.length>0){const{parentLookup:M,nodeOrigin:D}=w(),I=d7(y,C,M,D);x.push(...I)}for(const M of z.values())x=M(x);N(x)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:y,nodes:x,hasDefaultNodes:C,debug:N}=w();if(v!=null&&v.length){if(C){const j=sXn(v,x);y(j)}N&&console.log("React Flow: trigger node changes",v),b==null||b(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:y,edges:x,hasDefaultEdges:C,debug:N}=w();if(v!=null&&v.length){if(C){const j=iXn(v,x);y(j)}N&&console.log("React Flow: trigger edge changes",v),b==null||b(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:y,nodeLookup:x,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(b){const j=v.map(A=>L_(A,!0));C(j);return}C(Gd(x,new Set([...v]),!0)),N(Gd(y))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:y,nodeLookup:x,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(b){const j=v.map(A=>L_(A,!0));N(j);return}N(Gd(y,new Set([...v]))),C(Gd(x,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:y,nodes:x,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:j}=w(),A=v||x,z=b||y,M=[];for(const I of A){if(!I.selected)continue;const B=C.get(I.id);B&&(B.selected=!1),M.push(L_(I.id,!1))}const D=[];for(const I of z)I.selected&&D.push(L_(I.id,!1));N(M),j(D)},setMinZoom:v=>{const{panZoom:b,maxZoom:y}=w();b==null||b.setScaleExtent([v,y]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:y}=w();b==null||b.setScaleExtent([y,v]),m({maxZoom:v})},setTranslateExtent:v=>{var b;(b=w().panZoom)==null||b.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:y,triggerEdgeChanges:x,elementsSelectable:C}=w();if(!C)return;const N=b.reduce((A,z)=>z.selected?[...A,L_(z.id,!1)]:A,[]),j=v.reduce((A,z)=>z.selected?[...A,L_(z.id,!1)]:A,[]);y(N),x(j)},setNodeExtent:v=>{const{nodes:b,nodeLookup:y,parentLookup:x,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:j,zIndexMode:A}=w();v[0][0]===j[0][0]&&v[0][1]===j[0][1]&&v[1][0]===j[1][0]&&v[1][1]===j[1][1]||(Hk(b,y,x,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:A}),m({nodeExtent:v}))},panBy:v=>{const{transform:b,width:y,height:x,panZoom:C,translateExtent:N}=w();return lQn({delta:v,panZoom:C,transform:b,translateExtent:N,width:y,height:x})},setCenter:async(v,b,y)=>{const{width:x,height:C,maxZoom:N,panZoom:j}=w();if(!j)return!1;const A=typeof(y==null?void 0:y.zoom)<"u"?y.zoom:N;return await j.setViewport({x:x/2-v*A,y:C/2-b*A,zoom:A},{duration:y==null?void 0:y.duration,ease:y==null?void 0:y.ease,interpolate:y==null?void 0:y.interpolate}),!0},cancelConnection:()=>{m({connection:{...PU}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...MO()})}},Object.is);function zYn({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:c,fitView:u,nodeOrigin:h,nodeExtent:f,zIndexMode:p,children:m}){const[w]=T.useState(()=>NYn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:c,nodeOrigin:h,nodeExtent:f,zIndexMode:p}));return _.jsx($Qn,{value:w,children:_.jsx(_Xn,{children:_.jsx(EXn,{children:m})})})}function jYn({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:c,minZoom:u,maxZoom:h,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return T.useContext(ax)?_.jsx(_.Fragment,{children:e}):_.jsx(zYn,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:h,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const AYn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function TYn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:c,onInit:u,onMove:h,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:y,onNodeMouseMove:x,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:j,onNodeDragStart:A,onNodeDrag:z,onNodeDragStop:M,onNodesDelete:D,onEdgesDelete:I,onDelete:B,onSelectionChange:G,onSelectionDragStart:U,onSelectionDrag:Q,onSelectionDragStop:V,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:$,onBeforeDelete:L,connectionMode:q,connectionLineType:P=yu.Bezier,connectionLineStyle:F,connectionLineComponent:re,connectionLineContainerStyle:ie,deleteKeyCode:ue="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:K=!1,selectionMode:oe=cm.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:pe=um()?"Meta":"Control",zoomActivationKeyCode:ve=um()?"Meta":"Control",snapToGrid:Me,snapGrid:Fe,onlyRenderVisibleElements:Ye=!1,selectNodesOnDrag:Te,nodesDraggable:$e,autoPanOnNodeFocus:yt,nodesConnectable:ot,nodesFocusable:Mt,nodeOrigin:jt=vG,edgesFocusable:Pt,edgesReconnectable:Le,elementsSelectable:nt=!0,defaultViewport:ke=YQn,minZoom:me=.5,maxZoom:je=2,translateExtent:qe=om,preventScrolling:rt=!0,nodeExtent:dt,defaultMarkerColor:st="#b1b1b7",zoomOnScroll:Ut=!0,zoomOnPinch:Xt=!0,panOnScroll:en=!1,panOnScrollSpeed:an=.5,panOnScrollMode:At=cf.Free,zoomOnDoubleClick:gn=!0,panOnDrag:on=!0,onPaneClick:Ot,onPaneMouseEnter:dn,onPaneMouseMove:cn,onPaneMouseLeave:kn,onPaneScroll:Wn,onPaneContextMenu:gs,paneClickDistance:ns=1,nodeClickDistance:gt=0,children:ln,onReconnect:bn,onReconnectStart:un,onReconnectEnd:_r,onEdgeContextMenu:Mn,onEdgeDoubleClick:Qn,onEdgeMouseEnter:ar,onEdgeMouseMove:wt,onEdgeMouseLeave:Ht,reconnectRadius:vr=10,onNodesChange:Pn,onEdgesChange:Qr,noDragClassName:Xn="nodrag",noWheelClassName:Yn="nowheel",noPanClassName:Xr="nopan",fitView:As,fitViewOptions:Fr,connectOnClick:We,attributionPosition:vt,proOptions:fr,defaultEdgeOptions:yn,elevateNodesOnSelect:Hn=!0,elevateEdgesOnSelect:Zn=!1,disableKeyboardA11y:Fn=!1,autoPanOnConnect:Yr,autoPanOnNodeDrag:An,autoPanOnSelection:wo=!0,autoPanSpeed:ai,connectionRadius:Ds,isValidConnection:Hr,onError:t_,style:ko,id:So,nodeDragThreshold:qs,connectionDragThreshold:Us,viewport:Wi,onViewportChange:Gs,width:cr,height:Si,colorMode:Ct="light",debug:za,onScroll:rs,ariaLabelConfig:Ks,zIndexMode:_t="basic",...Bt},oi){const Ci=So||"1",Ei=tXn(Ct),Or=T.useCallback(ci=>{ci.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),rs==null||rs(ci)},[rs]);return _.jsx("div",{"data-testid":"rf__wrapper",...Bt,onScroll:Or,style:{...ko,...AYn},ref:oi,className:ms(["react-flow",s,Ei]),id:So,role:"application",children:_.jsxs(jYn,{nodes:e,edges:n,width:cr,height:Si,fitView:As,fitViewOptions:Fr,minZoom:me,maxZoom:je,nodeOrigin:jt,nodeExtent:dt,zIndexMode:_t,children:[_.jsx(eXn,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:$e,autoPanOnNodeFocus:yt,nodesConnectable:ot,nodesFocusable:Mt,edgesFocusable:Pt,edgesReconnectable:Le,elementsSelectable:nt,elevateNodesOnSelect:Hn,elevateEdgesOnSelect:Zn,minZoom:me,maxZoom:je,nodeExtent:dt,onNodesChange:Pn,onEdgesChange:Qr,snapToGrid:Me,snapGrid:Fe,connectionMode:q,translateExtent:qe,connectOnClick:We,defaultEdgeOptions:yn,fitView:As,fitViewOptions:Fr,onNodesDelete:D,onEdgesDelete:I,onDelete:B,onNodeDragStart:A,onNodeDrag:z,onNodeDragStop:M,onSelectionDrag:Q,onSelectionDragStart:U,onSelectionDragStop:V,onMove:h,onMoveStart:f,onMoveEnd:p,noPanClassName:Xr,nodeOrigin:jt,rfId:Ci,autoPanOnConnect:Yr,autoPanOnNodeDrag:An,autoPanSpeed:ai,onError:t_,connectionRadius:Ds,isValidConnection:Hr,selectNodesOnDrag:Te,nodeDragThreshold:qs,connectionDragThreshold:Us,onBeforeDelete:L,debug:za,ariaLabelConfig:Ks,zIndexMode:_t}),_.jsx(CYn,{onInit:u,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:y,onNodeMouseMove:x,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:j,nodeTypes:i,edgeTypes:a,connectionLineType:P,connectionLineStyle:F,connectionLineComponent:re,connectionLineContainerStyle:ie,selectionKeyCode:se,selectionOnDrag:K,selectionMode:oe,deleteKeyCode:ue,multiSelectionKeyCode:pe,panActivationKeyCode:ce,zoomActivationKeyCode:ve,onlyRenderVisibleElements:Ye,defaultViewport:ke,translateExtent:qe,minZoom:me,maxZoom:je,preventScrolling:rt,zoomOnScroll:Ut,zoomOnPinch:Xt,zoomOnDoubleClick:gn,panOnScroll:en,panOnScrollSpeed:an,panOnScrollMode:At,panOnDrag:on,autoPanOnSelection:wo,onPaneClick:Ot,onPaneMouseEnter:dn,onPaneMouseMove:cn,onPaneMouseLeave:kn,onPaneScroll:Wn,onPaneContextMenu:gs,paneClickDistance:ns,nodeClickDistance:gt,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:$,onReconnect:bn,onReconnectStart:un,onReconnectEnd:_r,onEdgeContextMenu:Mn,onEdgeDoubleClick:Qn,onEdgeMouseEnter:ar,onEdgeMouseMove:wt,onEdgeMouseLeave:Ht,reconnectRadius:vr,defaultMarkerColor:st,noDragClassName:Xn,noWheelClassName:Yn,noPanClassName:Xr,rfId:Ci,disableKeyboardA11y:Fn,nodeExtent:dt,viewport:Wi,onViewportChange:Gs}),_.jsx(XQn,{onSelectionChange:G}),ln,_.jsx(GQn,{proOptions:fr,position:vt}),_.jsx(UQn,{rfId:Ci,disableKeyboardA11y:Fn})]})})}var RYn=yG(TYn);function MYn({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:ms(["react-flow__background-pattern",t,r])})}function OYn({radius:e,className:n}){return _.jsx("circle",{cx:e,cy:e,r:e,className:ms(["react-flow__background-pattern","dots",n])})}var vl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(vl||(vl={}));const DYn={[vl.Dots]:1,[vl.Lines]:1,[vl.Cross]:6},LYn=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function GG({id:e,variant:n=vl.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:c,className:u,patternClassName:h}){const f=T.useRef(null),{transform:p,patternId:m}=Bn(LYn,Tr),w=r||DYn[n],k=n===vl.Dots,v=n===vl.Cross,b=Array.isArray(t)?t:[t,t],y=[b[0]*p[2]||1,b[1]*p[2]||1],x=w*p[2],C=Array.isArray(i)?i:[i,i],N=v?[x,x]:y,j=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],A=`${m}${e||""}`;return _.jsxs("svg",{className:ms(["react-flow__background",u]),style:{...c,...cx,"--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]%y[0],y:p[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${j[0]},-${j[1]})`,children:k?_.jsx(OYn,{radius:x/2,className:h}):_.jsx(MYn,{dimensions:N,lineWidth:s,variant:n,className:h})}),_.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${A})`})]})}GG.displayName="Background";const IYn=T.memo(GG);function $Yn(){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 BYn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:_.jsx("path",{d:"M0 0h32v4.2H0z"})})}function PYn(){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 FYn(){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 HYn(){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 G1({children:e,className:n,...t}){return _.jsx("button",{type:"button",className:ms(["react-flow__controls-button",n]),...t,children:e})}const qYn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function KG({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:c,className:u,children:h,position:f="bottom-left",orientation:p="vertical","aria-label":m}){const w=Mr(),{isInteractive:k,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:y}=Bn(qYn,Tr),{zoomIn:x,zoomOut:C,fitView:N}=h7(),j=()=>{x(),i==null||i()},A=()=>{C(),a==null||a()},z=()=>{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(ox,{className:ms(["react-flow__controls",D,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":m??y["controls.ariaLabel"],children:[n&&_.jsxs(_.Fragment,{children:[_.jsx(G1,{onClick:j,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:b,children:_.jsx($Yn,{})}),_.jsx(G1,{onClick:A,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:v,children:_.jsx(BYn,{})})]}),t&&_.jsx(G1,{className:"react-flow__controls-fitview",onClick:z,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:_.jsx(PYn,{})}),r&&_.jsx(G1,{className:"react-flow__controls-interactive",onClick:M,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:k?_.jsx(HYn,{}):_.jsx(FYn,{})}),h]})}KG.displayName="Controls";T.memo(KG);function UYn({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:c,className:u,borderRadius:h,shapeRendering:f,selected:p,onClick:m}){const{background:w,backgroundColor:k}=i||{},v=a||w||k;return _.jsx("rect",{className:ms(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:h,ry:h,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:c},shapeRendering:f,onClick:m?b=>m(b,e):void 0})}const GYn=T.memo(UYn),KYn=e=>e.nodes.map(n=>n.id),W4=e=>e instanceof Function?e:()=>e;function VYn({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=GYn,onClick:a}){const o=Bn(KYn,Tr),c=W4(n),u=W4(e),h=W4(t),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return _.jsx(_.Fragment,{children:o.map(p=>_.jsx(QYn,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:f},p))})}function WYn({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:c}){const{node:u,x:h,y:f,width:p,height:m}=Bn(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:b,y}=k.internals.positionAbsolute,{width:x,height:C}=Al(v);return{node:v,x:b,y,width:x,height:C}},Tr);return!u||u.hidden||!WU(u)?null:_.jsx(o,{x:h,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 QYn=T.memo(WYn);var XYn=T.memo(VYn);const YYn=200,ZYn=150,JYn=e=>!e.hidden,eZn=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(Ym(e.nodeLookup,{filter:JYn}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},tZn="react-flow__minimap-desc";function VG({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:c,maskColor:u,maskStrokeColor:h,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:w,pannable:k=!1,zoomable:v=!1,ariaLabel:b,inversePan:y,zoomStep:x=1,offsetScale:C=5}){const N=Mr(),j=T.useRef(null),{boundingRect:A,viewBB:z,rfId:M,panZoom:D,translateExtent:I,flowWidth:B,flowHeight:G,ariaLabelConfig:U}=Bn(eZn,Tr),Q=(e==null?void 0:e.width)??YYn,V=(e==null?void 0:e.height)??ZYn,Z=A.width/Q,J=A.height/V,$=Math.max(Z,J),L=$*Q,q=$*V,P=C*$,F=A.x-(L-A.width)/2-P,re=A.y-(q-A.height)/2-P,ie=L+P*2,ue=q+P*2,se=`${tZn}-${M}`,K=T.useRef(0),oe=T.useRef();K.current=$,T.useEffect(()=>{if(j.current&&D)return oe.current=vQn({domNode:j.current,panZoom:D,getTransform:()=>N.getState().transform,getViewScale:()=>K.current}),()=>{var Me;(Me=oe.current)==null||Me.destroy()}},[D]),T.useEffect(()=>{var Me;(Me=oe.current)==null||Me.update({translateExtent:I,width:B,height:G,inversePan:y,pannable:k,zoomStep:x,zoomable:v})},[k,v,y,x,I,B,G]);const ce=m?Me=>{var Te;const[Fe,Ye]=((Te=oe.current)==null?void 0:Te.pointer(Me))||[0,0];m(Me,{x:Fe,y:Ye})}:void 0,pe=w?T.useCallback((Me,Fe)=>{const Ye=N.getState().nodeLookup.get(Fe).internals.userNode;w(Me,Ye)},[]):void 0,ve=b??U["minimap.ariaLabel"];return _.jsx(ox,{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 h=="string"?h: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:ms(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:_.jsxs("svg",{width:Q,height:V,viewBox:`${F} ${re} ${ie} ${ue}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:j,onClick:ce,children:[ve&&_.jsx("title",{id:se,children:ve}),_.jsx(XYn,{onClick:pe,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),_.jsx("path",{className:"react-flow__minimap-mask",d:`M${F-P},${re-P}h${ie+P*2}v${ue+P*2}h${-ie-P*2}z - M${z.x},${z.y}h${z.width}v${z.height}h${-z.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}VG.displayName="MiniMap";T.memo(VG);const nZn=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,rZn={[Gh.Line]:"right",[Gh.Handle]:"bottom-right"};function sZn({nodeId:e,position:n,variant:t=Gh.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:w,onResizeStart:k,onResize:v,onResizeEnd:b}){const y=SG(),x=typeof e=="string"?e:y,C=Mr(),N=T.useRef(null),j=t===Gh.Handle,A=Bn(T.useCallback(nZn(j&&m),[j,m]),Tr),z=T.useRef(null),M=n??rZn[t];T.useEffect(()=>{if(!(!N.current||!x))return z.current||(z.current=TQn({domNode:N.current,nodeId:x,getStoreItems:()=>{const{nodeLookup:I,transform:B,snapGrid:G,snapToGrid:U,nodeOrigin:Q,domNode:V}=C.getState();return{nodeLookup:I,transform:B,snapGrid:G,snapToGrid:U,nodeOrigin:Q,paneDomNode:V}},onChange:(I,B)=>{const{triggerNodeChanges:G,nodeLookup:U,parentLookup:Q,nodeOrigin:V}=C.getState(),Z=[],J={x:I.x,y:I.y},$=U.get(x);if($&&$.expandParent&&$.parentId){const L=$.origin??V,q=I.width??$.measured.width??0,P=I.height??$.measured.height??0,F={id:$.id,parentId:$.parentId,rect:{width:q,height:P,...QU({x:I.x??$.position.x,y:I.y??$.position.y},{width:q,height:P},$.parentId,U,L)}},re=d7([F],U,Q,V);Z.push(...re),J.x=I.x?Math.max(L[0]*q,I.x):void 0,J.y=I.y?Math.max(L[1]*P,I.y):void 0}if(J.x!==void 0&&J.y!==void 0){const L={id:x,type:"position",position:{...J}};Z.push(L)}if(I.width!==void 0&&I.height!==void 0){const q={id:x,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};Z.push(q)}for(const L of B){const q={...L,type:"position"};Z.push(q)}G(Z)},onEnd:({width:I,height:B})=>{const G={id:x,type:"dimensions",resizing:!1,dimensions:{width:I,height:B}};C.getState().triggerNodeChanges([G])}})),z.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:c,maxWidth:u,maxHeight:h},keepAspectRatio:f,resizeDirection:p,onResizeStart:k,onResize:v,onResizeEnd:b,shouldResize:w}),()=>{var I;(I=z.current)==null||I.destroy()}},[M,o,c,u,h,f,k,v,b,w]);const D=M.split("-");return _.jsx("div",{className:ms(["react-flow__resize-control","nodrag",...D,t,r]),ref:N,style:{...s,scale:A,...a&&{[j?"backgroundColor":"borderColor"]:a}},children:i})}T.memo(sZn);function iZn(){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 K1=8;function aZn(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=T.useState({viewWidth:0,viewHeight:0});T.useEffect(()=>{function h(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",h),h(),()=>window.removeEventListener("resize",h)},[]);let o=0,c=0,u=0;if(e){const{distance:h}=e;switch(e.anchor){case"left":o=e.x-t-h,c=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+h,c=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,c=e.y+e.height+h;break;case"above":o=e.x+e.width/2-t/2,c=e.y-r-h;break}const f=o,p=c;o=Math.min(Math.max(o,K1),i-t-K1),c=Math.min(Math.max(c,K1),s-r-K1),u=e.anchor==="left"||e.anchor==="right"?p-c:f-o}return{x:o,y:c,arrowAdjustment:u}}const Q4=380,X4=12,oZn=350,cZn=150,Gk=new EventTarget;function lZn(){Gk.dispatchEvent(new Event("move"))}function uZn(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 Gk.addEventListener("move",u),()=>{Gk.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),T.useEffect(()=>{r(u=>{var f;if(!u)return u;const h=((f=e.current)==null?void 0:f.getBoundingClientRect())??null;return h&&u.x===h.x&&u.y===h.y&&u.width===h.width&&u.height===h.height?u:h})},[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)},oZn)},[e]),o=T.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),cZn)},[]),c=T.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:c}}function _Zn(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 fZn({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:a,onMouseEnter:o,onMouseLeave:c}){const u=iZn(),h=s.right+X4+Q4<=window.innerWidth,f=s.x-X4-Q4>=0,p=h?"right":f?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:w}=aZn({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:X4},u),k=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:v}=ut({...FEn(k??""),enabled:!!k,subscribed:!!k}),b=T.useMemo(()=>{if(!v)return null;const B=v;let G=B.diff;if(B.truncated){const Z=G.lastIndexOf(` +`)),h=u.reduce((f,p)=>f.concat(...p),[]);return[u,h]}return[[],[]]},[e]);return T.useEffect(()=>{const c=(n==null?void 0:n.target)??gO,u=(n==null?void 0:n.actInsideInputWithModifier)??!0;if(e!==null){const h=m=>{var v,b;if(s.current=m.ctrlKey||m.metaKey||m.shiftKey||m.altKey,(!s.current||s.current&&!u)&&ZU(m))return!1;const k=bO(m.code,o);if(i.current.add(m[k]),vO(a,i.current,!1)){const y=((b=(v=m.composedPath)==null?void 0:v.call(m))==null?void 0:b[0])||m.target,x=(y==null?void 0:y.nodeName)==="BUTTON"||(y==null?void 0:y.nodeName)==="A";n.preventDefault!==!1&&(s.current||!x)&&m.preventDefault(),r(!0)}},f=m=>{const w=bO(m.code,o);vO(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",h),c==null||c.addEventListener("keyup",f),window.addEventListener("blur",p),window.addEventListener("contextmenu",p),()=>{c==null||c.removeEventListener("keydown",h),c==null||c.removeEventListener("keyup",f),window.removeEventListener("blur",p),window.removeEventListener("contextmenu",p)}}},[e,r]),t}function vO(e,n,t){return e.filter(r=>t||r.length===n.size).some(r=>r.every(s=>n.has(s)))}function bO(e,n){return n.includes(e)?"code":"key"}const FXn=()=>{const e=Mr();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=o7(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},h=t.snapGrid??s,f=t.snapToGrid??i;return Jm(u,r,f,h)},flowToScreenPosition:n=>{const{transform:t,domNode:r}=e.getState();if(!r)return n;const{x:s,y:i}=r.getBoundingClientRect(),a=Uh(n,t);return{x:a.x+s,y:a.y+i}}}),[])};function yG(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)HXn(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 HXn(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 qXn(e,n){return yG(e,n)}function UXn(e,n){return yG(e,n)}function I_(e,n){return{id:e,type:"select",selected:n}}function Gd(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(I_(i.id,a)))}return r}function yO({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 xO(e){return{id:e.id,type:"remove"}}const GXn=WU();function VXn(e,n,t={}){return DQn(e,n,{...t,onError:t.onError??GXn})}const wO=e=>yQn(e),KXn=e=>qU(e);function xG(e){return T.forwardRef(e)}const WXn=typeof window<"u"?T.useLayoutEffect:T.useEffect;function kO(e){const[n,t]=T.useState(BigInt(0)),[r]=T.useState(()=>QXn(()=>t(s=>s+BigInt(1))));return WXn(()=>{const s=r.get();s.length&&(e(s),r.reset())},[n]),r}function QXn(e){let n=[];return{get:()=>n,reset:()=>{n=[]},push:t=>{n.push(t),e()}}}const wG=T.createContext(null);function XXn({children:e}){const n=Mr(),t=T.useCallback(o=>{const{nodes:c=[],setNodes:u,hasDefaultNodes:h,onNodesChange:f,nodeLookup:p,fitViewQueued:m,onNodesChangeMiddlewareMap:w}=n.getState();let k=c;for(const b of o)k=typeof b=="function"?b(k):b;let v=yO({items:k,lookup:p});for(const b of w.values())v=b(v);h&&u(k),v.length>0?f==null||f(v):m&&window.requestAnimationFrame(()=>{const{fitViewQueued:b,nodes:y,setNodes:x}=n.getState();b&&x(y)})},[]),r=kO(t),s=T.useCallback(o=>{const{edges:c=[],setEdges:u,hasDefaultEdges:h,onEdgesChange:f,edgeLookup:p}=n.getState();let m=c;for(const w of o)m=typeof w=="function"?w(m):w;h?u(m):f&&f(yO({items:m,lookup:p}))},[]),i=kO(s),a=T.useMemo(()=>({nodeQueue:r,edgeQueue:i}),[]);return _.jsx(wG.Provider,{value:a,children:e})}function YXn(){const e=T.useContext(wG);if(!e)throw new Error("useBatchContext must be used within a BatchProvider");return e}const ZXn=e=>!!e.panZoom;function h7(){const e=FXn(),n=Mr(),t=YXn(),r=Bn(ZXn),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 b,y;const{nodeLookup:p,nodeOrigin:m}=n.getState(),w=wO(f)?f:p.get(f.id),k=w.parentId?XU(w.position,w.measured,w.parentId,p,m):w.position,v={...w,position:k,width:((b=w.measured)==null?void 0:b.width)??w.width,height:((y=w.measured)==null?void 0:y.height)??w.height};return lm(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&&wO(v)?v:{...k,...v}}return k}))},h=(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&&KXn(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(b=>({...b})),edges:p.map(b=>({...b})),viewport:{x:w,y:k,zoom:v}}},deleteElements:async({nodes:f=[],edges:p=[]})=>{const{nodes:m,edges:w,onNodesDelete:k,onEdgesDelete:v,triggerNodeChanges:b,triggerEdgeChanges:y,onDelete:x,onBeforeDelete:C}=n.getState(),{nodes:N,edges:j}=await CQn({nodesToRemove:f,edgesToRemove:p,nodes:m,edges:w,onBeforeDelete:C}),A=j.length>0,z=N.length>0;if(A){const M=j.map(xO);v==null||v(j),y(M)}if(z){const M=N.map(xO);k==null||k(N),b(M)}return(z||A)&&(x==null||x({nodes:N,edges:j})),{deletedNodes:N,deletedEdges:j}},getIntersectingNodes:(f,p=!0,m)=>{const w=YM(f),k=w?f:c(f),v=m!==void 0;return k?(m||n.getState().nodes).filter(b=>{const y=n.getState().nodeLookup.get(b.id);if(y&&!w&&(b.id===f.id||!y.internals.positionAbsolute))return!1;const x=lm(v?b:y),C=Ab(x,k);return p&&C>0||C>=x.width*x.height||C>=k.width*k.height}):[]},isNodeIntersecting:(f,p,m=!0)=>{const k=YM(f)?f:c(f);if(!k)return!1;const v=Ab(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:h,updateEdgeData:(f,p,m={replace:!1})=>{h(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 xQn(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??zQn();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 SO=e=>e.selected,JXn=typeof window<"u"?window:void 0;function eYn({deleteKeyCode:e,multiSelectionKeyCode:n}){const t=Mr(),{deleteElements:r}=h7(),s=_m(e,{actInsideInputWithModifier:!1}),i=_m(n,{target:JXn});T.useEffect(()=>{if(s){const{edges:a,nodes:o}=t.getState();r({nodes:o.filter(SO),edges:a.filter(SO)}),t.setState({nodesSelectionActive:!1})}},[s]),T.useEffect(()=>{t.setState({multiSelectionActive:i})},[i])}function tYn(e){const n=Mr();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=c7(e.current);(r.height===0||r.width===0)&&((o=(a=n.getState()).onError)==null||o.call(a,"004",yo.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 ox={position:"absolute",width:"100%",height:"100%",top:0,left:0},nYn=e=>({userSelectionActive:e.userSelectionActive,lib:e.lib,connectionInProgress:e.connection.inProgress});function rYn({onPaneContextMenu:e,zoomOnScroll:n=!0,zoomOnPinch:t=!0,panOnScroll:r=!1,panOnScrollSpeed:s=.5,panOnScrollMode:i=lf.Free,zoomOnDoubleClick:a=!0,panOnDrag:o=!0,defaultViewport:c,translateExtent:u,minZoom:h,maxZoom:f,zoomActivationKeyCode:p,preventScrolling:m=!0,children:w,noWheelClassName:k,noPanClassName:v,onViewportChange:b,isControlledViewport:y,paneClickDistance:x,selectionOnDrag:C}){const N=Mr(),j=T.useRef(null),{userSelectionActive:A,lib:z,connectionInProgress:M}=Bn(nYn,Tr),D=_m(p),I=T.useRef();tYn(j);const B=T.useCallback(G=>{b==null||b({x:G[0],y:G[1],zoom:G[2]}),y||N.setState({transform:G})},[b,y]);return T.useEffect(()=>{if(j.current){I.current=_Xn({domNode:j.current,minZoom:h,maxZoom:f,translateExtent:u,viewport:c,onDraggingChange:K=>N.setState(Z=>Z.paneDragging===K?Z:{paneDragging:K}),onPanZoomStart:(K,Z)=>{const{onViewportChangeStart:J,onMoveStart:$}=N.getState();$==null||$(K,Z),J==null||J(Z)},onPanZoom:(K,Z)=>{const{onViewportChange:J,onMove:$}=N.getState();$==null||$(K,Z),J==null||J(Z)},onPanZoomEnd:(K,Z)=>{const{onViewportChangeEnd:J,onMoveEnd:$}=N.getState();$==null||$(K,Z),J==null||J(Z)}});const{x:G,y:q,zoom:Q}=I.current.getViewport();return N.setState({panZoom:I.current,transform:[G,q,Q],domNode:j.current.closest(".react-flow")}),()=>{var K;(K=I.current)==null||K.destroy()}}},[]),T.useEffect(()=>{var G;(G=I.current)==null||G.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:z,onTransformChange:B,connectionInProgress:M,selectionOnDrag:C,paneClickDistance:x})},[e,n,t,r,s,i,a,o,D,m,v,A,k,z,B,M,C,x]),_.jsx("div",{className:"react-flow__renderer",ref:j,style:ox,children:w})}const sYn=e=>({userSelectionActive:e.userSelectionActive,userSelectionRect:e.userSelectionRect});function iYn(){const{userSelectionActive:e,userSelectionRect:n}=Bn(sYn,Tr);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 V4=(e,n)=>t=>{t.target===n.current&&(e==null||e(t))},aYn=e=>({userSelectionActive:e.userSelectionActive,elementsSelectable:e.elementsSelectable,dragging:e.paneDragging,panBy:e.panBy,autoPanSpeed:e.autoPanSpeed});function oYn({isSelecting:e,selectionKeyPressed:n,selectionMode:t=cm.Full,panOnDrag:r,autoPanOnSelection:s,paneClickDistance:i,selectionOnDrag:a,onSelectionStart:o,onSelectionEnd:c,onPaneClick:u,onPaneContextMenu:h,onPaneScroll:f,onPaneMouseEnter:p,onPaneMouseMove:m,onPaneMouseLeave:w,children:k}){const v=T.useRef(0),b=Mr(),{userSelectionActive:y,elementsSelectable:x,dragging:C,panBy:N,autoPanSpeed:j}=Bn(aYn,Tr),A=x&&(e||y),z=T.useRef(null),M=T.useRef(),D=T.useRef(new Set),I=T.useRef(new Set),B=T.useRef(!1),G=T.useRef(!1),q=T.useRef({x:0,y:0}),Q=T.useRef(!1),K=V=>{if(G.current||B.current||b.getState().connection.inProgress){G.current=!1,B.current=!1;return}u==null||u(V),b.getState().resetSelectedElements(),b.setState({nodesSelectionActive:!1})},Z=V=>{if(Array.isArray(r)&&(r!=null&&r.includes(2))){V.preventDefault();return}h==null||h(V)},J=f?V=>f(V):void 0,$=V=>{G.current&&(V.stopPropagation(),G.current=!1)},L=V=>{var $e,yt;const{domNode:ne,transform:ce}=b.getState();if(M.current=ne==null?void 0:ne.getBoundingClientRect(),!M.current)return;const he=V.target===z.current;if(!he&&!!V.target.closest(".nokey")||!e||!(a&&he||n)||V.button!==0||!V.isPrimary)return;(yt=($e=V.target)==null?void 0:$e.setPointerCapture)==null||yt.call($e,V.pointerId),G.current=!1;const{x:Pe,y:Ye}=po(V.nativeEvent,M.current),Re=Jm({x:Pe,y:Ye},ce);b.setState({userSelectionRect:{width:0,height:0,startX:Re.x,startY:Re.y,x:Pe,y:Ye}}),he||(V.stopPropagation(),V.preventDefault())};function F(V,ne){const{userSelectionRect:ce}=b.getState();if(!ce)return;const{transform:he,nodeLookup:me,edgeLookup:Ae,connectionLookup:Pe,triggerNodeChanges:Ye,triggerEdgeChanges:Re,defaultEdgeOptions:$e}=b.getState(),yt={x:ce.startX,y:ce.startY},{x:ot,y:Mt}=Uh(yt,he),jt={startX:yt.x,startY:yt.y,x:Vke.id)),I.current=new Set;const nt=($e==null?void 0:$e.selectable)??!0;for(const ke of D.current){const ge=Pe.get(ke);if(ge)for(const{edgeId:je}of ge.values()){const qe=Ae.get(je);qe&&(qe.selectable??nt)&&I.current.add(je)}}if(!ZM(Pt,D.current)){const ke=Gd(me,D.current,!0);Ye(ke)}if(!ZM(Ie,I.current)){const ke=Gd(Ae,I.current);Re(ke)}b.setState({userSelectionRect:jt,userSelectionActive:!0,nodesSelectionActive:!1})}function U(){if(!s||!M.current)return;const[V,ne]=a7(q.current,M.current,j);N({x:V,y:ne}).then(ce=>{if(!G.current||!ce){v.current=requestAnimationFrame(U);return}const{x:he,y:me}=q.current;F(he,me),v.current=requestAnimationFrame(U)})}const H=()=>{cancelAnimationFrame(v.current),v.current=0,Q.current=!1};T.useEffect(()=>()=>H(),[]);const oe=V=>{const{userSelectionRect:ne,transform:ce,resetSelectedElements:he}=b.getState();if(!M.current||!ne)return;const{x:me,y:Ae}=po(V.nativeEvent,M.current);q.current={x:me,y:Ae};const Pe=Uh({x:ne.startX,y:ne.startY},ce);if(!G.current){const Ye=n?0:i;if(Math.hypot(me-Pe.x,Ae-Pe.y)<=Ye)return;he(),o==null||o(V)}G.current=!0,Q.current||(U(),Q.current=!0),F(me,Ae)},ae=V=>{var ne,ce;if(!A){V.target===z.current&&b.getState().connection.inProgress&&(B.current=!0);return}V.button===0&&((ce=(ne=V.target)==null?void 0:ne.releasePointerCapture)==null||ce.call(ne,V.pointerId),!y&&V.target===z.current&&b.getState().userSelectionRect&&(K==null||K(V)),b.setState({userSelectionActive:!1,userSelectionRect:null}),G.current&&(c==null||c(V),b.setState({nodesSelectionActive:D.current.size>0})),H())},ue=V=>{var ne,ce;(ce=(ne=V.target)==null?void 0:ne.releasePointerCapture)==null||ce.call(ne,V.pointerId),H()},se=r===!0||Array.isArray(r)&&r.includes(0);return _.jsxs("div",{className:gs(["react-flow__pane",{draggable:se,dragging:C,selection:e}]),onClick:A?void 0:V4(K,z),onContextMenu:V4(Z,z),onWheel:V4(J,z),onPointerEnter:A?void 0:p,onPointerMove:A?oe:m,onPointerUp:ae,onPointerCancel:A?ue:void 0,onPointerDownCapture:A?L:void 0,onClickCapture:A?$:void 0,onPointerLeave:w,ref:z,style:ox,children:[k,_.jsx(iYn,{})]})}function qk({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",yo.error012(e));return}n.setState({nodesSelectionActive:!1}),u.selected?(t||u.selected&&a)&&(i({nodes:[u],edges:[]}),requestAnimationFrame(()=>{var h;return(h=r==null?void 0:r.current)==null?void 0:h.blur()})):s([e])}function kG({nodeRef:e,disabled:n=!1,noDragClassName:t,handleSelector:r,nodeId:s,isSelectable:i,nodeClickDistance:a}){const o=Mr(),[c,u]=T.useState(!1),h=T.useRef();return T.useEffect(()=>{h.current=YQn({getStoreItems:()=>o.getState(),onNodeMouseDown:f=>{qk({id:f,store:o,nodeRef:e})},onDragStart:()=>{u(!0)},onDragStop:()=>{u(!1)}})},[]),T.useEffect(()=>{if(!(n||!e.current||!h.current))return h.current.update({noDragClassName:t,handleSelector:r,domNode:e.current,isSelectable:i,nodeId:s,nodeClickDistance:a}),()=>{var f;(f=h.current)==null||f.destroy()}},[t,r,n,i,e,s,a]),c}const cYn=e=>n=>n.selected&&(n.draggable||e&&typeof n.draggable>"u");function SG(){const e=Mr();return T.useCallback(t=>{const{nodeExtent:r,snapToGrid:s,snapGrid:i,nodesDraggable:a,onError:o,updateNodePositions:c,nodeLookup:u,nodeOrigin:h}=e.getState(),f=new Map,p=cYn(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[,b]of u){if(!p(b))continue;let y={x:b.internals.positionAbsolute.x+k,y:b.internals.positionAbsolute.y+v};s&&(y=Zm(y,i));const{position:x,positionAbsolute:C}=UU({nodeId:b.id,nextPosition:y,nodeLookup:u,nodeExtent:r,nodeOrigin:h,onError:o});b.position=x,b.internals.positionAbsolute=C,f.set(b.id,b)}c(f)},[])}const p7=T.createContext(null),lYn=p7.Provider;p7.Consumer;const CG=()=>T.useContext(p7),uYn=e=>({connectOnClick:e.connectOnClick,noPanClassName:e.noPanClassName,rfId:e.rfId}),EG=T.createContext(null);function _Yn({children:e}){const n=Bn(uYn,Tr);return _.jsx(EG.Provider,{value:n,children:e})}function fYn(){const e=T.useContext(EG);if(!e)throw new Error("useHandleConfig must be used within a HandleConfigProvider");return e}const dYn={connectingFrom:!1,connectingTo:!1,clickConnecting:!1,isPossibleEndHandle:!0,connectionInProcess:!1,clickConnectionInProcess:!1,valid:!1},hYn=(e,n,t)=>r=>{const{connectionClickStartHandle:s,connectionMode:i,connection:a}=r,{fromHandle:o,toHandle:c,isValid:u}=a;if(!o&&!s)return dYn;const h=(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:h,clickConnecting:(s==null?void 0:s.nodeId)===e&&(s==null?void 0:s.id)===n&&(s==null?void 0:s.type)===t,isPossibleEndHandle:i===Hh.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:h&&u}};function pYn({type:e="source",position:n=Rt.Top,isValidConnection:t,isConnectable:r=!0,isConnectableStart:s=!0,isConnectableEnd:i=!0,id:a,onConnect:o,children:c,className:u,onMouseDown:h,onTouchStart:f,...p},m){var Q,K;const w=a||null,k=e==="target",v=Mr(),b=CG(),{connectOnClick:y,noPanClassName:x,rfId:C}=fYn(),{connectingFrom:N,connectingTo:j,clickConnecting:A,isPossibleEndHandle:z,connectionInProcess:M,clickConnectionInProcess:D,valid:I}=Bn(hYn(b,w,e),Tr);b||(K=(Q=v.getState()).onError)==null||K.call(Q,"010",yo.error010());const B=Z=>{const{defaultEdgeOptions:J,onConnect:$,hasDefaultEdges:L}=v.getState(),F={...J,...Z};if(L){const{edges:U,setEdges:H,onError:oe}=v.getState();H(VXn(F,U,{onError:oe}))}$==null||$(F),o==null||o(F)},G=Z=>{if(!b)return;const J=JU(Z.nativeEvent);if(s&&(J&&Z.button===0||!J)){const $=v.getState();Hk.onPointerDown(Z.nativeEvent,{handleDomNode:Z.currentTarget,autoPanOnConnect:$.autoPanOnConnect,connectionMode:$.connectionMode,connectionRadius:$.connectionRadius,domNode:$.domNode,nodeLookup:$.nodeLookup,lib:$.lib,isTarget:k,handleId:w,nodeId:b,flowId:$.rfId,panBy:$.panBy,cancelConnection:$.cancelConnection,onConnectStart:$.onConnectStart,onConnectEnd:(...L)=>{var F,U;return(U=(F=v.getState()).onConnectEnd)==null?void 0:U.call(F,...L)},updateConnection:$.updateConnection,onConnect:B,isValidConnection:t||((...L)=>{var F,U;return((U=(F=v.getState()).isValidConnection)==null?void 0:U.call(F,...L))??!0}),getTransform:()=>v.getState().transform,getFromHandle:()=>v.getState().connection.fromHandle,autoPanSpeed:$.autoPanSpeed,dragThreshold:$.connectionDragThreshold})}J?h==null||h(Z):f==null||f(Z)},q=Z=>{const{onClickConnectStart:J,onClickConnectEnd:$,connectionClickStartHandle:L,connectionMode:F,isValidConnection:U,lib:H,rfId:oe,nodeLookup:ae,connection:ue}=v.getState();if(!b||!L&&!s)return;if(!L){J==null||J(Z.nativeEvent,{nodeId:b,handleId:w,handleType:e}),v.setState({connectionClickStartHandle:{nodeId:b,type:e,id:w}});return}const se=YU(Z.target),V=t||U,{connection:ne,isValid:ce}=Hk.isValid(Z.nativeEvent,{handle:{nodeId:b,id:w,type:e},connectionMode:F,fromNodeId:L.nodeId,fromHandleId:L.id||null,fromType:L.type,isValidConnection:V,flowId:oe,doc:se,lib:H,nodeLookup:ae});ce&&ne&&B(ne);const he=structuredClone(ue);delete he.inProgress,he.toPosition=he.toHandle?he.toHandle.position:null,$==null||$(Z,he),v.setState({connectionClickStartHandle:null})};return _.jsx("div",{"data-handleid":w,"data-nodeid":b,"data-handlepos":n,"data-id":`${C}-${b}-${w}-${e}`,className:gs(["react-flow__handle",`react-flow__handle-${n}`,"nodrag",x,u,{source:!k,target:k,connectable:r,connectablestart:s,connectableend:i,clickconnecting:A,connectingfrom:N,connectingto:j,valid:I,connectionindicator:r&&(!M||z)&&(M||D?i:s)}]),onMouseDown:G,onTouchStart:G,onClick:y?q:void 0,ref:m,...p,children:c})}const dc=T.memo(xG(pYn));function mYn({data:e,isConnectable:n,sourcePosition:t=Rt.Bottom}){return _.jsxs(_.Fragment,{children:[e==null?void 0:e.label,_.jsx(dc,{type:"source",position:t,isConnectable:n})]})}function gYn({data:e,isConnectable:n,targetPosition:t=Rt.Top,sourcePosition:r=Rt.Bottom}){return _.jsxs(_.Fragment,{children:[_.jsx(dc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label,_.jsx(dc,{type:"source",position:r,isConnectable:n})]})}function vYn(){return null}function bYn({data:e,isConnectable:n,targetPosition:t=Rt.Top}){return _.jsxs(_.Fragment,{children:[_.jsx(dc,{type:"target",position:t,isConnectable:n}),e==null?void 0:e.label]})}const Tb={ArrowUp:{x:0,y:-1},ArrowDown:{x:0,y:1},ArrowLeft:{x:-1,y:0},ArrowRight:{x:1,y:0}},CO={input:mYn,default:gYn,output:bYn,group:vYn};function yYn(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 xYn=e=>{const{width:n,height:t,x:r,y:s}=Ym(e.nodeLookup,{filter:i=>!!i.selected});return{width:ho(n)?n:null,height:ho(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 wYn({onSelectionContextMenu:e,noPanClassName:n,disableKeyboardA11y:t}){const r=Mr(),{width:s,height:i,transformString:a,userSelectionActive:o}=Bn(xYn,Tr),c=SG(),u=T.useRef(null);T.useEffect(()=>{var m;t||(m=u.current)==null||m.focus({preventScroll:!0})},[t]);const h=!o&&s!==null&&i!==null;if(kG({nodeRef:u,disabled:!h}),!h)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(Tb,m.key)&&(m.preventDefault(),c({direction:Tb[m.key],factor:m.shiftKey?4:1}))};return _.jsx("div",{className:gs(["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 EO=typeof window<"u"?window:void 0,kYn=e=>({nodesSelectionActive:e.nodesSelectionActive,userSelectionActive:e.userSelectionActive});function NG({children:e,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,paneClickDistance:o,deleteKeyCode:c,selectionKeyCode:u,selectionOnDrag:h,selectionMode:f,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:w,panActivationKeyCode:k,zoomActivationKeyCode:v,elementsSelectable:b,zoomOnScroll:y,zoomOnPinch:x,panOnScroll:C,panOnScrollSpeed:N,panOnScrollMode:j,zoomOnDoubleClick:A,panOnDrag:z,autoPanOnSelection:M,defaultViewport:D,translateExtent:I,minZoom:B,maxZoom:G,preventScrolling:q,onSelectionContextMenu:Q,noWheelClassName:K,noPanClassName:Z,disableKeyboardA11y:J,onViewportChange:$,isControlledViewport:L}){const{nodesSelectionActive:F,userSelectionActive:U}=Bn(kYn,Tr),H=_m(u,{target:EO}),oe=_m(k,{target:EO}),ae=oe||z,ue=oe||C,se=h&&ae!==!0,V=H||U||se;return eYn({deleteKeyCode:c,multiSelectionKeyCode:w}),_.jsx(rYn,{onPaneContextMenu:i,elementsSelectable:b,zoomOnScroll:y,zoomOnPinch:x,panOnScroll:ue,panOnScrollSpeed:N,panOnScrollMode:j,zoomOnDoubleClick:A,panOnDrag:!H&&ae,defaultViewport:D,translateExtent:I,minZoom:B,maxZoom:G,zoomActivationKeyCode:v,preventScrolling:q,noWheelClassName:K,noPanClassName:Z,onViewportChange:$,isControlledViewport:L,paneClickDistance:o,selectionOnDrag:se,children:_.jsxs(oYn,{onSelectionStart:p,onSelectionEnd:m,onPaneClick:n,onPaneMouseEnter:t,onPaneMouseMove:r,onPaneMouseLeave:s,onPaneContextMenu:i,onPaneScroll:a,panOnDrag:ae,autoPanOnSelection:M,isSelecting:!!V,selectionMode:f,selectionKeyPressed:H,paneClickDistance:o,selectionOnDrag:se,children:[e,F&&_.jsx(wYn,{onSelectionContextMenu:Q,noPanClassName:Z,disableKeyboardA11y:J})]})})}NG.displayName="FlowRenderer";const SYn=T.memo(NG),CYn=e=>n=>e?i7(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 EYn(e){return Bn(T.useCallback(CYn(e),[e]),Tr)}const NYn=e=>e.updateNodeInternals;function zYn(){const e=Bn(NYn),[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 jYn({node:e,nodeType:n,hasDimensions:t,resizeObserver:r}){const s=Mr(),i=T.useRef(null),a=T.useRef(null),o=T.useRef(e.sourcePosition),c=T.useRef(e.targetPosition),u=T.useRef(n),h=t&&!!e.internals.handleBounds;return T.useEffect(()=>{i.current&&!e.hidden&&(!h||a.current!==i.current)&&(a.current&&(r==null||r.unobserve(a.current)),r==null||r.observe(i.current),a.current=i.current)},[h,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 AYn({id:e,onClick:n,onMouseEnter:t,onMouseMove:r,onMouseLeave:s,onContextMenu:i,onDoubleClick:a,nodesDraggable:o,elementsSelectable:c,nodesConnectable:u,nodesFocusable:h,resizeObserver:f,noDragClassName:p,noPanClassName:m,disableKeyboardA11y:w,rfId:k,nodeTypes:v,nodeClickDistance:b,onError:y}){const{node:x,internals:C,isParent:N}=Bn(V=>{const ne=V.nodeLookup.get(e),ce=V.parentLookup.has(e);return{node:ne,internals:ne.internals,isParent:ce}},Tr);let j=x.type||"default",A=(v==null?void 0:v[j])||CO[j];A===void 0&&(y==null||y("003",yo.error003(j)),j="default",A=(v==null?void 0:v.default)||CO.default);const z=!!(x.draggable||o&&typeof x.draggable>"u"),M=!!(x.selectable||c&&typeof x.selectable>"u"),D=!!(x.connectable||u&&typeof x.connectable>"u"),I=!!(x.focusable||h&&typeof x.focusable>"u"),B=Mr(),G=QU(x),q=jYn({node:x,nodeType:j,hasDimensions:G,resizeObserver:f}),Q=kG({nodeRef:q,disabled:x.hidden||!z,noDragClassName:p,handleSelector:x.dragHandle,nodeId:e,isSelectable:M,nodeClickDistance:b}),K=SG();if(x.hidden)return null;const Z=Al(x),J=yYn(x),$=M||z||n||t||r||s,L=t?V=>t(V,{...C.userNode}):void 0,F=r?V=>r(V,{...C.userNode}):void 0,U=s?V=>s(V,{...C.userNode}):void 0,H=i?V=>i(V,{...C.userNode}):void 0,oe=a?V=>a(V,{...C.userNode}):void 0,ae=V=>{const{selectNodesOnDrag:ne,nodeDragThreshold:ce}=B.getState();M&&(!ne||!z||ce>0)&&qk({id:e,store:B,nodeRef:q}),n&&n(V,{...C.userNode})},ue=V=>{if(!(ZU(V.nativeEvent)||w)){if(BU.includes(V.key)&&M){const ne=V.key==="Escape";qk({id:e,store:B,unselect:ne,nodeRef:q})}else if(z&&x.selected&&Object.prototype.hasOwnProperty.call(Tb,V.key)){V.preventDefault();const{ariaLabelConfig:ne}=B.getState();B.setState({ariaLiveMessage:ne["node.a11yDescription.ariaLiveMessage"]({direction:V.key.replace("Arrow","").toLowerCase(),x:~~C.positionAbsolute.x,y:~~C.positionAbsolute.y})}),K({direction:Tb[V.key],factor:V.shiftKey?4:1})}}},se=()=>{var Pe;if(w||!((Pe=q.current)!=null&&Pe.matches(":focus-visible")))return;const{transform:V,width:ne,height:ce,autoPanOnNodeFocus:he,setCenter:me}=B.getState();if(!he)return;i7(new Map([[e,x]]),{x:0,y:0,width:ne,height:ce},V,!0).length>0||me(x.position.x+Z.width/2,x.position.y+Z.height/2,{zoom:V[2]})};return _.jsx("div",{className:gs(["react-flow__node",`react-flow__node-${j}`,{[m]:z},x.className,{selected:x.selected,selectable:M,parent:N,draggable:z,dragging:Q}]),ref:q,style:{zIndex:C.z,transform:`translate(${C.positionAbsolute.x}px,${C.positionAbsolute.y}px)`,pointerEvents:$?"all":"none",visibility:G?"visible":"hidden",...x.style,...J},"data-id":e,"data-testid":`rf__node-${e}`,onMouseEnter:L,onMouseMove:F,onMouseLeave:U,onContextMenu:H,onClick:ae,onDoubleClick:oe,onKeyDown:I?ue:void 0,tabIndex:I?0:void 0,onFocus:I?se:void 0,role:x.ariaRole??(I?"group":void 0),"aria-roledescription":"node","aria-describedby":w?void 0:`${gG}-${k}`,"aria-label":x.ariaLabel,...x.domAttributes,children:_.jsx(lYn,{value:e,children:_.jsx(A,{id:e,data:x.data,type:j,positionAbsoluteX:C.positionAbsolute.x,positionAbsoluteY:C.positionAbsolute.y,selected:x.selected??!1,selectable:M,draggable:z,deletable:x.deletable??!0,isConnectable:D,sourcePosition:x.sourcePosition,targetPosition:x.targetPosition,dragging:Q,dragHandle:x.dragHandle,zIndex:C.z,parentId:x.parentId,...Z})})})}var TYn=T.memo(AYn);const RYn=e=>({nodesDraggable:e.nodesDraggable,nodesConnectable:e.nodesConnectable,nodesFocusable:e.nodesFocusable,elementsSelectable:e.elementsSelectable,onError:e.onError});function zG(e){const{nodesDraggable:n,nodesConnectable:t,nodesFocusable:r,elementsSelectable:s,onError:i}=Bn(RYn,Tr),a=EYn(e.onlyRenderVisibleElements),o=zYn();return _.jsx("div",{className:"react-flow__nodes",style:ox,children:a.map(c=>_.jsx(TYn,{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))})}zG.displayName="NodeRenderer";const MYn=T.memo(zG);function OYn(e){return Bn(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&&RQn({sourceNode:i,targetNode:a,width:t.width,height:t.height,transform:t.transform})&&r.push(s.id)}return r},[e]),Tr)}const DYn=({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"})},LYn=({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"})},NO={[zb.Arrow]:DYn,[zb.ArrowClosed]:LYn};function IYn(e){const n=Mr();return T.useMemo(()=>{var s,i;return Object.prototype.hasOwnProperty.call(NO,e)?NO[e]:((i=(s=n.getState()).onError)==null||i.call(s,"009",yo.error009(e)),null)},[e])}const $Yn=({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=IYn(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},jG=({defaultColor:e,rfId:n})=>{const t=Bn(i=>i.edges),r=Bn(i=>i.defaultEdgeOptions),s=T.useMemo(()=>PQn(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($Yn,{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};jG.displayName="MarkerDefinitions";var BYn=T.memo(jG);function AG({x:e,y:n,label:t,labelStyle:r,labelShowBg:s=!0,labelBgStyle:i,labelBgPadding:a=[2,4],labelBgBorderRadius:o=2,children:c,className:u,...h}){const[f,p]=T.useState({x:1,y:0,width:0,height:0}),m=gs(["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",...h,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}AG.displayName="EdgeText";const PYn=T.memo(AG);function cx({path:e,labelX:n,labelY:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c,interactionWidth:u=20,...h}){return _.jsxs(_.Fragment,{children:[_.jsx("path",{...h,d:e,fill:"none",className:gs(["react-flow__edge-path",h.className])}),u?_.jsx("path",{d:e,fill:"none",strokeOpacity:0,strokeWidth:u,className:"react-flow__edge-interaction"}):null,r&&ho(n)&&ho(t)?_.jsx(PYn,{x:n,y:t,label:r,labelStyle:s,labelShowBg:i,labelBgStyle:a,labelBgPadding:o,labelBgBorderRadius:c}):null]})}function zO({pos:e,x1:n,y1:t,x2:r,y2:s}){return e===Rt.Left||e===Rt.Right?[.5*(n+r),t]:[n,.5*(t+s)]}function TG({sourceX:e,sourceY:n,sourcePosition:t=Rt.Bottom,targetX:r,targetY:s,targetPosition:i=Rt.Top}){const[a,o]=zO({pos:t,x1:e,y1:n,x2:r,y2:s}),[c,u]=zO({pos:i,x1:r,y1:s,x2:e,y2:n}),[h,f,p,m]=eG({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}`,h,f,p,m]}function RG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a,targetPosition:o,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:b})=>{const[y,x,C]=TG({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o}),N=e.isInternal?void 0:n;return _.jsx(cx,{id:N,path:y,labelX:x,labelY:C,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:b})})}const FYn=RG({isInternal:!1}),MG=RG({isInternal:!0});FYn.displayName="SimpleBezierEdge";MG.displayName="SimpleBezierEdgeInternal";function OG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,sourcePosition:m=Rt.Bottom,targetPosition:w=Rt.Top,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:y})=>{const[x,C,N]=Bk({sourceX:t,sourceY:r,sourcePosition:m,targetX:s,targetY:i,targetPosition:w,borderRadius:b==null?void 0:b.borderRadius,offset:b==null?void 0:b.offset,stepPosition:b==null?void 0:b.stepPosition}),j=e.isInternal?void 0:n;return _.jsx(cx,{id:j,path:x,labelX:C,labelY:N,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,markerEnd:k,markerStart:v,interactionWidth:y})})}const DG=OG({isInternal:!1}),LG=OG({isInternal:!0});DG.displayName="SmoothStepEdge";LG.displayName="SmoothStepEdgeInternal";function IG(e){return T.memo(({id:n,...t})=>{var s;const r=e.isInternal?void 0:n;return _.jsx(DG,{...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 HYn=IG({isInternal:!1}),$G=IG({isInternal:!0});HYn.displayName="StepEdge";$G.displayName="StepEdgeInternal";function BG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:w,interactionWidth:k})=>{const[v,b,y]=rG({sourceX:t,sourceY:r,targetX:s,targetY:i}),x=e.isInternal?void 0:n;return _.jsx(cx,{id:x,path:v,labelX:b,labelY:y,label:a,labelStyle:o,labelShowBg:c,labelBgStyle:u,labelBgPadding:h,labelBgBorderRadius:f,style:p,markerEnd:m,markerStart:w,interactionWidth:k})})}const qYn=BG({isInternal:!1}),PG=BG({isInternal:!0});qYn.displayName="StraightEdge";PG.displayName="StraightEdgeInternal";function FG(e){return T.memo(({id:n,sourceX:t,sourceY:r,targetX:s,targetY:i,sourcePosition:a=Rt.Bottom,targetPosition:o=Rt.Top,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,pathOptions:b,interactionWidth:y})=>{const[x,C,N]=tG({sourceX:t,sourceY:r,sourcePosition:a,targetX:s,targetY:i,targetPosition:o,curvature:b==null?void 0:b.curvature}),j=e.isInternal?void 0:n;return _.jsx(cx,{id:j,path:x,labelX:C,labelY:N,label:c,labelStyle:u,labelShowBg:h,labelBgStyle:f,labelBgPadding:p,labelBgBorderRadius:m,style:w,markerEnd:k,markerStart:v,interactionWidth:y})})}const UYn=FG({isInternal:!1}),HG=FG({isInternal:!0});UYn.displayName="BezierEdge";HG.displayName="BezierEdgeInternal";const jO={default:HG,straight:PG,step:$G,smoothstep:LG,simplebezier:MG},AO={sourceX:null,sourceY:null,targetX:null,targetY:null,sourcePosition:null,targetPosition:null,zIndex:void 0},GYn=(e,n,t)=>t===Rt.Left?e-n:t===Rt.Right?e+n:e,VYn=(e,n,t)=>t===Rt.Top?e-n:t===Rt.Bottom?e+n:e,TO="react-flow__edgeupdater";function RO({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:gs([TO,`${TO}-${o}`]),cx:GYn(n,r,e),cy:VYn(t,r,e),r,stroke:"transparent",fill:"transparent"})}function KYn({isReconnectable:e,reconnectRadius:n,edge:t,sourceX:r,sourceY:s,targetX:i,targetY:a,sourcePosition:o,targetPosition:c,onReconnect:u,onReconnectStart:h,onReconnectEnd:f,setReconnecting:p,setUpdateHover:m}){const w=Mr(),k=(C,N)=>{if(C.button!==0)return;const{autoPanOnConnect:j,domNode:A,connectionMode:z,connectionRadius:M,lib:D,onConnectStart:I,cancelConnection:B,nodeLookup:G,rfId:q,panBy:Q,updateConnection:K}=w.getState(),Z=N.type==="target",J=(F,U)=>{p(!1),f==null||f(F,t,N.type,U)},$=F=>u==null?void 0:u(t,F),L=(F,U)=>{p(!0),h==null||h(C,t,N.type),I==null||I(F,U)};Hk.onPointerDown(C.nativeEvent,{autoPanOnConnect:j,connectionMode:z,connectionRadius:M,domNode:A,handleId:N.id,nodeId:N.nodeId,nodeLookup:G,isTarget:Z,edgeUpdaterType:N.type,lib:D,flowId:q,cancelConnection:B,panBy:Q,isValidConnection:(...F)=>{var U,H;return((H=(U=w.getState()).isValidConnection)==null?void 0:H.call(U,...F))??!0},onConnect:$,onConnectStart:L,onConnectEnd:(...F)=>{var U,H;return(H=(U=w.getState()).onConnectEnd)==null?void 0:H.call(U,...F)},onReconnectEnd:J,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"}),b=C=>k(C,{nodeId:t.source,id:t.sourceHandle??null,type:"source"}),y=()=>m(!0),x=()=>m(!1);return _.jsxs(_.Fragment,{children:[(e===!0||e==="source")&&_.jsx(RO,{position:o,centerX:r,centerY:s,radius:n,onMouseDown:v,onMouseEnter:y,onMouseOut:x,type:"source"}),(e===!0||e==="target")&&_.jsx(RO,{position:c,centerX:i,centerY:a,radius:n,onMouseDown:b,onMouseEnter:y,onMouseOut:x,type:"target"})]})}function WYn({id:e,edgesFocusable:n,edgesReconnectable:t,elementsSelectable:r,onClick:s,onDoubleClick:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,reconnectRadius:h,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,rfId:w,edgeTypes:k,noPanClassName:v,onError:b,disableKeyboardA11y:y}){let x=Bn(me=>me.edgeLookup.get(e));const C=Bn(me=>me.defaultEdgeOptions);x=C?{...C,...x}:x;let N=x.type||"default",j=(k==null?void 0:k[N])||jO[N];j===void 0&&(b==null||b("011",yo.error011(N)),N="default",j=(k==null?void 0:k.default)||jO.default);const A=!!(x.focusable||n&&typeof x.focusable>"u"),z=typeof f<"u"&&(x.reconnectable||t&&typeof x.reconnectable>"u"),M=!!(x.selectable||r&&typeof x.selectable>"u"),D=T.useRef(null),[I,B]=T.useState(!1),[G,q]=T.useState(!1),Q=Mr(),{zIndex:K=x.zIndex,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:F,targetPosition:U}=Bn(T.useCallback(me=>{const Ae=me.nodeLookup.get(x.source),Pe=me.nodeLookup.get(x.target);if(!Ae||!Pe)return AO;const Ye=BQn({id:e,sourceNode:Ae,targetNode:Pe,sourceHandle:x.sourceHandle||null,targetHandle:x.targetHandle||null,connectionMode:me.connectionMode,onError:b}),Re=TQn({selected:x.selected,zIndex:x.zIndex,sourceNode:Ae,targetNode:Pe,elevateOnSelect:me.elevateEdgesOnSelect,zIndexMode:me.zIndexMode});return{...Ye||AO,zIndex:Re}},[x.source,x.target,x.sourceHandle,x.targetHandle,x.selected,x.zIndex]),Tr),H=T.useMemo(()=>x.markerStart?`url('#${Pk(x.markerStart,w)}')`:void 0,[x.markerStart,w]),oe=T.useMemo(()=>x.markerEnd?`url('#${Pk(x.markerEnd,w)}')`:void 0,[x.markerEnd,w]);if(x.hidden||Z===null||J===null||$===null||L===null)return null;const ae=me=>{var Re;const{addSelectedEdges:Ae,unselectNodesAndEdges:Pe,multiSelectionActive:Ye}=Q.getState();M&&(Q.setState({nodesSelectionActive:!1}),x.selected&&Ye?(Pe({nodes:[],edges:[x]}),(Re=D.current)==null||Re.blur()):Ae([e])),s&&s(me,x)},ue=i?me=>{i(me,{...x})}:void 0,se=a?me=>{a(me,{...x})}:void 0,V=o?me=>{o(me,{...x})}:void 0,ne=c?me=>{c(me,{...x})}:void 0,ce=u?me=>{u(me,{...x})}:void 0,he=me=>{var Ae;if(!y&&BU.includes(me.key)&&M){const{unselectNodesAndEdges:Pe,addSelectedEdges:Ye}=Q.getState();me.key==="Escape"?((Ae=D.current)==null||Ae.blur(),Pe({edges:[x]})):Ye([e])}};return _.jsx("svg",{style:{zIndex:K},children:_.jsxs("g",{className:gs(["react-flow__edge",`react-flow__edge-${N}`,x.className,v,{selected:x.selected,animated:x.animated,inactive:!M&&!s,updating:I,selectable:M}]),onClick:ae,onDoubleClick:ue,onContextMenu:se,onMouseEnter:V,onMouseMove:ne,onMouseLeave:ce,onKeyDown:A?he:void 0,tabIndex:A?0:void 0,role:x.ariaRole??(A?"group":"img"),"aria-roledescription":"edge","data-id":e,"data-testid":`rf__edge-${e}`,"aria-label":x.ariaLabel===null?void 0:x.ariaLabel||`Edge from ${x.source} to ${x.target}`,"aria-describedby":A?`${vG}-${w}`:void 0,ref:D,...x.domAttributes,children:[!G&&_.jsx(j,{id:e,source:x.source,target:x.target,type:x.type,selected:x.selected,animated:x.animated,selectable:M,deletable:x.deletable??!0,label:x.label,labelStyle:x.labelStyle,labelShowBg:x.labelShowBg,labelBgStyle:x.labelBgStyle,labelBgPadding:x.labelBgPadding,labelBgBorderRadius:x.labelBgBorderRadius,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:F,targetPosition:U,data:x.data,style:x.style,sourceHandleId:x.sourceHandle,targetHandleId:x.targetHandle,markerStart:H,markerEnd:oe,pathOptions:"pathOptions"in x?x.pathOptions:void 0,interactionWidth:x.interactionWidth}),z&&_.jsx(KYn,{edge:x,isReconnectable:z,reconnectRadius:h,onReconnect:f,onReconnectStart:p,onReconnectEnd:m,sourceX:Z,sourceY:J,targetX:$,targetY:L,sourcePosition:F,targetPosition:U,setUpdateHover:B,setReconnecting:q})]})})}var QYn=T.memo(WYn);const XYn=e=>({edgesFocusable:e.edgesFocusable,edgesReconnectable:e.edgesReconnectable,elementsSelectable:e.elementsSelectable,connectionMode:e.connectionMode,onError:e.onError});function qG({defaultMarkerColor:e,onlyRenderVisibleElements:n,rfId:t,edgeTypes:r,noPanClassName:s,onReconnect:i,onEdgeContextMenu:a,onEdgeMouseEnter:o,onEdgeMouseMove:c,onEdgeMouseLeave:u,onEdgeClick:h,reconnectRadius:f,onEdgeDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,disableKeyboardA11y:k}){const{edgesFocusable:v,edgesReconnectable:b,elementsSelectable:y,onError:x}=Bn(XYn,Tr),C=OYn(n);return _.jsxs("div",{className:"react-flow__edges",children:[_.jsx(BYn,{defaultColor:e,rfId:t}),C.map(N=>_.jsx(QYn,{id:N,edgesFocusable:v,edgesReconnectable:b,elementsSelectable:y,noPanClassName:s,onReconnect:i,onContextMenu:a,onMouseEnter:o,onMouseMove:c,onMouseLeave:u,onClick:h,reconnectRadius:f,onDoubleClick:p,onReconnectStart:m,onReconnectEnd:w,rfId:t,onError:x,edgeTypes:r,disableKeyboardA11y:k},N))]})}qG.displayName="EdgeRenderer";const YYn=T.memo(qG),ZYn=e=>`translate(${e.transform[0]}px,${e.transform[1]}px) scale(${e.transform[2]})`;function JYn({children:e}){const n=Bn(ZYn);return _.jsx("div",{className:"react-flow__viewport xyflow__viewport react-flow__container",style:{transform:n},children:e})}function eZn(e){const n=h7(),t=T.useRef(!1);T.useEffect(()=>{!t.current&&n.viewportInitialized&&e&&(setTimeout(()=>e(n),1),t.current=!0)},[e,n.viewportInitialized])}const tZn=e=>{var n;return(n=e.panZoom)==null?void 0:n.syncViewport};function nZn(e){const n=Bn(tZn),t=Mr();return T.useEffect(()=>{e&&(n==null||n(e),t.setState({transform:[e.x,e.y,e.zoom]}))},[e,n]),null}function rZn(e){return e.connection.inProgress?{...e.connection,to:Jm(e.connection.to,e.transform)}:{...e.connection}}function sZn(e){return rZn}function iZn(e){const n=sZn();return Bn(n,Tr)}const aZn=e=>({nodesConnectable:e.nodesConnectable,isValid:e.connection.isValid,inProgress:e.connection.inProgress,width:e.width,height:e.height});function oZn({containerStyle:e,style:n,type:t,component:r}){const{nodesConnectable:s,width:i,height:a,isValid:o,inProgress:c}=Bn(aZn,Tr);return!(i&&s&&c)?null:_.jsx("svg",{style:e,width:i,height:a,className:"react-flow__connectionline react-flow__container",children:_.jsx("g",{className:gs(["react-flow__connection",HU(o)]),children:_.jsx(UG,{style:n,type:t,CustomComponent:r,isValid:o})})})}const UG=({style:e,type:n=yu.Bezier,CustomComponent:t,isValid:r})=>{const{inProgress:s,from:i,fromNode:a,fromHandle:o,fromPosition:c,to:u,toNode:h,toHandle:f,toPosition:p,pointer:m}=iZn();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:HU(r),toNode:h,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 yu.Bezier:[w]=tG(k);break;case yu.SimpleBezier:[w]=TG(k);break;case yu.Step:[w]=Bk({...k,borderRadius:0});break;case yu.SmoothStep:[w]=Bk(k);break;default:[w]=rG(k)}return _.jsx("path",{d:w,fill:"none",className:"react-flow__connection-path",style:e})};UG.displayName="ConnectionLine";const cZn={};function MO(e=cZn){T.useRef(e),Mr(),T.useEffect(()=>{},[e])}function lZn(){Mr(),T.useRef(!1),T.useEffect(()=>{},[])}function GG({nodeTypes:e,edgeTypes:n,onInit:t,onNodeClick:r,onEdgeClick:s,onNodeDoubleClick:i,onEdgeDoubleClick:a,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,onSelectionContextMenu:f,onSelectionStart:p,onSelectionEnd:m,connectionLineType:w,connectionLineStyle:k,connectionLineComponent:v,connectionLineContainerStyle:b,selectionKeyCode:y,selectionOnDrag:x,selectionMode:C,multiSelectionKeyCode:N,panActivationKeyCode:j,zoomActivationKeyCode:A,deleteKeyCode:z,onlyRenderVisibleElements:M,elementsSelectable:D,defaultViewport:I,translateExtent:B,minZoom:G,maxZoom:q,preventScrolling:Q,defaultMarkerColor:K,zoomOnScroll:Z,zoomOnPinch:J,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:F,zoomOnDoubleClick:U,panOnDrag:H,autoPanOnSelection:oe,onPaneClick:ae,onPaneMouseEnter:ue,onPaneMouseMove:se,onPaneMouseLeave:V,onPaneScroll:ne,onPaneContextMenu:ce,paneClickDistance:he,nodeClickDistance:me,onEdgeContextMenu:Ae,onEdgeMouseEnter:Pe,onEdgeMouseMove:Ye,onEdgeMouseLeave:Re,reconnectRadius:$e,onReconnect:yt,onReconnectStart:ot,onReconnectEnd:Mt,noDragClassName:jt,noWheelClassName:Pt,noPanClassName:Ie,disableKeyboardA11y:nt,nodeExtent:ke,rfId:ge,viewport:je,onViewportChange:qe}){return MO(e),MO(n),lZn(),eZn(t),nZn(je),_.jsx(SYn,{onPaneClick:ae,onPaneMouseEnter:ue,onPaneMouseMove:se,onPaneMouseLeave:V,onPaneContextMenu:ce,onPaneScroll:ne,paneClickDistance:he,deleteKeyCode:z,selectionKeyCode:y,selectionOnDrag:x,selectionMode:C,onSelectionStart:p,onSelectionEnd:m,multiSelectionKeyCode:N,panActivationKeyCode:j,zoomActivationKeyCode:A,elementsSelectable:D,zoomOnScroll:Z,zoomOnPinch:J,zoomOnDoubleClick:U,panOnScroll:$,panOnScrollSpeed:L,panOnScrollMode:F,panOnDrag:H,autoPanOnSelection:oe,defaultViewport:I,translateExtent:B,minZoom:G,maxZoom:q,onSelectionContextMenu:f,preventScrolling:Q,noDragClassName:jt,noWheelClassName:Pt,noPanClassName:Ie,disableKeyboardA11y:nt,onViewportChange:qe,isControlledViewport:!!je,children:_.jsxs(JYn,{children:[_.jsx(YYn,{edgeTypes:n,onEdgeClick:s,onEdgeDoubleClick:a,onReconnect:yt,onReconnectStart:ot,onReconnectEnd:Mt,onlyRenderVisibleElements:M,onEdgeContextMenu:Ae,onEdgeMouseEnter:Pe,onEdgeMouseMove:Ye,onEdgeMouseLeave:Re,reconnectRadius:$e,defaultMarkerColor:K,noPanClassName:Ie,disableKeyboardA11y:nt,rfId:ge}),_.jsx(oZn,{style:k,type:w,component:v,containerStyle:b}),_.jsx("div",{className:"react-flow__edgelabel-renderer"}),_.jsx(MYn,{nodeTypes:e,onNodeClick:r,onNodeDoubleClick:i,onNodeMouseEnter:o,onNodeMouseMove:c,onNodeMouseLeave:u,onNodeContextMenu:h,nodeClickDistance:me,onlyRenderVisibleElements:M,noPanClassName:Ie,noDragClassName:jt,disableKeyboardA11y:nt,nodeExtent:ke,rfId:ge}),_.jsx("div",{className:"react-flow__viewport-portal"})]})})}GG.displayName="GraphView";const uZn=T.memo(GG),_Zn=WU(),OO=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c=.5,maxZoom:u=2,nodeOrigin:h,nodeExtent:f,zIndexMode:p="basic"}={})=>{const m=new Map,w=new Map,k=new Map,v=new Map,b=r??n??[],y=t??e??[],x=h??[0,0],C=f??om;aG(k,v,b);const{nodesInitialized:N}=Fk(y,m,w,{nodeOrigin:x,nodeExtent:C,zIndexMode:p});let j=[0,0,1];if(a&&s&&i){const A=Ym(m,{filter:I=>!!((I.width||I.initialWidth)&&(I.height||I.initialHeight))}),{x:z,y:M,zoom:D}=o7(A,s,i,c,u,(o==null?void 0:o.padding)??.1);j=[z,M,D]}return{rfId:"1",width:s??0,height:i??0,transform:j,nodes:y,nodesInitialized:N,nodeLookup:m,parentLookup:w,edges:b,edgeLookup:v,connectionLookup:k,onNodesChange:null,onEdgesChange:null,hasDefaultNodes:t!==void 0,hasDefaultEdges:r!==void 0,panZoom:null,minZoom:c,maxZoom:u,translateExtent:om,nodeExtent:C,nodesSelectionActive:!1,userSelectionActive:!1,userSelectionRect:null,connectionMode:Hh.Strict,domNode:null,paneDragging:!1,noPanClassName:"nopan",nodeOrigin:x,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:{...FU},connectionClickStartHandle:null,connectOnClick:!0,ariaLiveMessage:"",autoPanOnConnect:!0,autoPanOnNodeDrag:!0,autoPanOnNodeFocus:!0,autoPanSpeed:15,connectionRadius:20,onError:_Zn,isValidConnection:void 0,onSelectionChangeHandlers:[],lib:"react",debug:!1,ariaLabelConfig:PU,zIndexMode:p,onNodesChangeMiddlewareMap:new Map,onEdgesChangeMiddlewareMap:new Map}},fZn=({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:f,zIndexMode:p})=>wXn((m,w)=>{async function k(){const{nodeLookup:v,panZoom:b,fitViewOptions:y,fitViewResolver:x,width:C,height:N,minZoom:j,maxZoom:A}=w();b&&(await SQn({nodes:v,width:C,height:N,panZoom:b,minZoom:j,maxZoom:A},y),x==null||x.resolve(!0),m({fitViewResolver:null}))}return{...OO({nodes:e,edges:n,width:s,height:i,fitView:a,fitViewOptions:o,minZoom:c,maxZoom:u,nodeOrigin:h,nodeExtent:f,defaultNodes:t,defaultEdges:r,zIndexMode:p}),setNodes:v=>{const{nodeLookup:b,parentLookup:y,nodeOrigin:x,elevateNodesOnSelect:C,fitViewQueued:N,zIndexMode:j,nodesSelectionActive:A}=w(),{nodesInitialized:z,hasSelectedNodes:M}=Fk(v,b,y,{nodeOrigin:x,nodeExtent:f,elevateNodesOnSelect:C,checkEquality:!0,zIndexMode:j}),D=A&&M;N&&z?(k(),m({nodes:v,nodesInitialized:z,fitViewQueued:!1,fitViewOptions:void 0,nodesSelectionActive:D})):m({nodes:v,nodesInitialized:z,nodesSelectionActive:D})},setEdges:v=>{const{connectionLookup:b,edgeLookup:y}=w();aG(b,y,v),m({edges:v})},setDefaultNodesAndEdges:(v,b)=>{if(v){const{setNodes:y}=w();y(v),m({hasDefaultNodes:!0})}if(b){const{setEdges:y}=w();y(b),m({hasDefaultEdges:!0})}},updateNodeInternals:v=>{const{triggerNodeChanges:b,nodeLookup:y,parentLookup:x,domNode:C,nodeOrigin:N,nodeExtent:j,debug:A,fitViewQueued:z,zIndexMode:M}=w(),{changes:D,updatedInternals:I}=KQn(v,y,x,C,N,j,M);I&&(qQn(y,x,{nodeOrigin:N,nodeExtent:j,zIndexMode:M}),z?(k(),m({fitViewQueued:!1,fitViewOptions:void 0})):m({}),(D==null?void 0:D.length)>0&&(A&&console.log("React Flow: trigger node changes",D),b==null||b(D)))},updateNodePositions:(v,b=!1)=>{const y=[];let x=[];const{nodeLookup:C,triggerNodeChanges:N,connection:j,updateConnection:A,onNodesChangeMiddlewareMap:z}=w();for(const[M,D]of v){const I=C.get(M),B=!!(I!=null&&I.expandParent&&(I!=null&&I.parentId)&&(D!=null&&D.position)),G={id:M,type:"position",position:B?{x:Math.max(0,D.position.x),y:Math.max(0,D.position.y)}:D.position,dragging:b};if(I&&j.inProgress&&j.fromNode.id===I.id){const q=Nf(I,j.fromHandle,Rt.Left,!0);A({...j,from:q})}B&&I.parentId&&y.push({id:M,parentId:I.parentId,rect:{...D.internals.positionAbsolute,width:D.measured.width??0,height:D.measured.height??0}}),x.push(G)}if(y.length>0){const{parentLookup:M,nodeOrigin:D}=w(),I=d7(y,C,M,D);x.push(...I)}for(const M of z.values())x=M(x);N(x)},triggerNodeChanges:v=>{const{onNodesChange:b,setNodes:y,nodes:x,hasDefaultNodes:C,debug:N}=w();if(v!=null&&v.length){if(C){const j=qXn(v,x);y(j)}N&&console.log("React Flow: trigger node changes",v),b==null||b(v)}},triggerEdgeChanges:v=>{const{onEdgesChange:b,setEdges:y,edges:x,hasDefaultEdges:C,debug:N}=w();if(v!=null&&v.length){if(C){const j=UXn(v,x);y(j)}N&&console.log("React Flow: trigger edge changes",v),b==null||b(v)}},addSelectedNodes:v=>{const{multiSelectionActive:b,edgeLookup:y,nodeLookup:x,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(b){const j=v.map(A=>I_(A,!0));C(j);return}C(Gd(x,new Set([...v]),!0)),N(Gd(y))},addSelectedEdges:v=>{const{multiSelectionActive:b,edgeLookup:y,nodeLookup:x,triggerNodeChanges:C,triggerEdgeChanges:N}=w();if(b){const j=v.map(A=>I_(A,!0));N(j);return}N(Gd(y,new Set([...v]))),C(Gd(x,new Set,!0))},unselectNodesAndEdges:({nodes:v,edges:b}={})=>{const{edges:y,nodes:x,nodeLookup:C,triggerNodeChanges:N,triggerEdgeChanges:j}=w(),A=v||x,z=b||y,M=[];for(const I of A){if(!I.selected)continue;const B=C.get(I.id);B&&(B.selected=!1),M.push(I_(I.id,!1))}const D=[];for(const I of z)I.selected&&D.push(I_(I.id,!1));N(M),j(D)},setMinZoom:v=>{const{panZoom:b,maxZoom:y}=w();b==null||b.setScaleExtent([v,y]),m({minZoom:v})},setMaxZoom:v=>{const{panZoom:b,minZoom:y}=w();b==null||b.setScaleExtent([y,v]),m({maxZoom:v})},setTranslateExtent:v=>{var b;(b=w().panZoom)==null||b.setTranslateExtent(v),m({translateExtent:v})},resetSelectedElements:()=>{const{edges:v,nodes:b,triggerNodeChanges:y,triggerEdgeChanges:x,elementsSelectable:C}=w();if(!C)return;const N=b.reduce((A,z)=>z.selected?[...A,I_(z.id,!1)]:A,[]),j=v.reduce((A,z)=>z.selected?[...A,I_(z.id,!1)]:A,[]);y(N),x(j)},setNodeExtent:v=>{const{nodes:b,nodeLookup:y,parentLookup:x,nodeOrigin:C,elevateNodesOnSelect:N,nodeExtent:j,zIndexMode:A}=w();v[0][0]===j[0][0]&&v[0][1]===j[0][1]&&v[1][0]===j[1][0]&&v[1][1]===j[1][1]||(Fk(b,y,x,{nodeOrigin:C,nodeExtent:v,elevateNodesOnSelect:N,checkEquality:!1,zIndexMode:A}),m({nodeExtent:v}))},panBy:v=>{const{transform:b,width:y,height:x,panZoom:C,translateExtent:N}=w();return WQn({delta:v,panZoom:C,transform:b,translateExtent:N,width:y,height:x})},setCenter:async(v,b,y)=>{const{width:x,height:C,maxZoom:N,panZoom:j}=w();if(!j)return!1;const A=typeof(y==null?void 0:y.zoom)<"u"?y.zoom:N;return await j.setViewport({x:x/2-v*A,y:C/2-b*A,zoom:A},{duration:y==null?void 0:y.duration,ease:y==null?void 0:y.ease,interpolate:y==null?void 0:y.interpolate}),!0},cancelConnection:()=>{m({connection:{...FU}})},updateConnection:v=>{m({connection:v})},reset:()=>m({...OO()})}},Object.is);function dZn({initialNodes:e,initialEdges:n,defaultNodes:t,defaultEdges:r,initialWidth:s,initialHeight:i,initialMinZoom:a,initialMaxZoom:o,initialFitViewOptions:c,fitView:u,nodeOrigin:h,nodeExtent:f,zIndexMode:p,children:m}){const[w]=T.useState(()=>fZn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,width:s,height:i,fitView:u,minZoom:a,maxZoom:o,fitViewOptions:c,nodeOrigin:h,nodeExtent:f,zIndexMode:p}));return _.jsx(kXn,{value:w,children:_.jsx(XXn,{children:_.jsx(_Yn,{children:m})})})}function hZn({children:e,nodes:n,edges:t,defaultNodes:r,defaultEdges:s,width:i,height:a,fitView:o,fitViewOptions:c,minZoom:u,maxZoom:h,nodeOrigin:f,nodeExtent:p,zIndexMode:m}){return T.useContext(ix)?_.jsx(_.Fragment,{children:e}):_.jsx(dZn,{initialNodes:n,initialEdges:t,defaultNodes:r,defaultEdges:s,initialWidth:i,initialHeight:a,fitView:o,initialFitViewOptions:c,initialMinZoom:u,initialMaxZoom:h,nodeOrigin:f,nodeExtent:p,zIndexMode:m,children:e})}const pZn={width:"100%",height:"100%",overflow:"hidden",position:"relative",zIndex:0};function mZn({nodes:e,edges:n,defaultNodes:t,defaultEdges:r,className:s,nodeTypes:i,edgeTypes:a,onNodeClick:o,onEdgeClick:c,onInit:u,onMove:h,onMoveStart:f,onMoveEnd:p,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,onNodeMouseEnter:y,onNodeMouseMove:x,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:j,onNodeDragStart:A,onNodeDrag:z,onNodeDragStop:M,onNodesDelete:D,onEdgesDelete:I,onDelete:B,onSelectionChange:G,onSelectionDragStart:q,onSelectionDrag:Q,onSelectionDragStop:K,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:$,onBeforeDelete:L,connectionMode:F,connectionLineType:U=yu.Bezier,connectionLineStyle:H,connectionLineComponent:oe,connectionLineContainerStyle:ae,deleteKeyCode:ue="Backspace",selectionKeyCode:se="Shift",selectionOnDrag:V=!1,selectionMode:ne=cm.Full,panActivationKeyCode:ce="Space",multiSelectionKeyCode:he=um()?"Meta":"Control",zoomActivationKeyCode:me=um()?"Meta":"Control",snapToGrid:Ae,snapGrid:Pe,onlyRenderVisibleElements:Ye=!1,selectNodesOnDrag:Re,nodesDraggable:$e,autoPanOnNodeFocus:yt,nodesConnectable:ot,nodesFocusable:Mt,nodeOrigin:jt=bG,edgesFocusable:Pt,edgesReconnectable:Ie,elementsSelectable:nt=!0,defaultViewport:ke=LXn,minZoom:ge=.5,maxZoom:je=2,translateExtent:qe=om,preventScrolling:rt=!0,nodeExtent:dt,defaultMarkerColor:st="#b1b1b7",zoomOnScroll:Ut=!0,zoomOnPinch:Xt=!0,panOnScroll:en=!1,panOnScrollSpeed:an=.5,panOnScrollMode:At=lf.Free,zoomOnDoubleClick:gn=!0,panOnDrag:on=!0,onPaneClick:Ot,onPaneMouseEnter:dn,onPaneMouseMove:cn,onPaneMouseLeave:kn,onPaneScroll:Wn,onPaneContextMenu:vs,paneClickDistance:ns=1,nodeClickDistance:gt=0,children:ln,onReconnect:bn,onReconnectStart:un,onReconnectEnd:_r,onEdgeContextMenu:Mn,onEdgeDoubleClick:Qn,onEdgeMouseEnter:ar,onEdgeMouseMove:wt,onEdgeMouseLeave:Ht,reconnectRadius:vr=10,onNodesChange:Pn,onEdgesChange:Qr,noDragClassName:Xn="nodrag",noWheelClassName:Yn="nowheel",noPanClassName:Xr="nopan",fitView:Ts,fitViewOptions:Fr,connectOnClick:We,attributionPosition:vt,proOptions:fr,defaultEdgeOptions:yn,elevateNodesOnSelect:Hn=!0,elevateEdgesOnSelect:Zn=!1,disableKeyboardA11y:Fn=!1,autoPanOnConnect:Yr,autoPanOnNodeDrag:An,autoPanOnSelection:wo=!0,autoPanSpeed:oi,connectionRadius:Is,isValidConnection:Hr,onError:n_,style:ko,id:So,nodeDragThreshold:Gs,connectionDragThreshold:Vs,viewport:Wi,onViewportChange:Ks,width:cr,height:Si,colorMode:Ct="light",debug:za,onScroll:rs,ariaLabelConfig:Ws,zIndexMode:_t="basic",...Bt},ci){const Ci=So||"1",Ei=PXn(Ct),Or=T.useCallback(li=>{li.currentTarget.scrollTo({top:0,left:0,behavior:"instant"}),rs==null||rs(li)},[rs]);return _.jsx("div",{"data-testid":"rf__wrapper",...Bt,onScroll:Or,style:{...ko,...pZn},ref:ci,className:gs(["react-flow",s,Ei]),id:So,role:"application",children:_.jsxs(hZn,{nodes:e,edges:n,width:cr,height:Si,fitView:Ts,fitViewOptions:Fr,minZoom:ge,maxZoom:je,nodeOrigin:jt,nodeExtent:dt,zIndexMode:_t,children:[_.jsx(BXn,{nodes:e,edges:n,defaultNodes:t,defaultEdges:r,onConnect:m,onConnectStart:w,onConnectEnd:k,onClickConnectStart:v,onClickConnectEnd:b,nodesDraggable:$e,autoPanOnNodeFocus:yt,nodesConnectable:ot,nodesFocusable:Mt,edgesFocusable:Pt,edgesReconnectable:Ie,elementsSelectable:nt,elevateNodesOnSelect:Hn,elevateEdgesOnSelect:Zn,minZoom:ge,maxZoom:je,nodeExtent:dt,onNodesChange:Pn,onEdgesChange:Qr,snapToGrid:Ae,snapGrid:Pe,connectionMode:F,translateExtent:qe,connectOnClick:We,defaultEdgeOptions:yn,fitView:Ts,fitViewOptions:Fr,onNodesDelete:D,onEdgesDelete:I,onDelete:B,onNodeDragStart:A,onNodeDrag:z,onNodeDragStop:M,onSelectionDrag:Q,onSelectionDragStart:q,onSelectionDragStop:K,onMove:h,onMoveStart:f,onMoveEnd:p,noPanClassName:Xr,nodeOrigin:jt,rfId:Ci,autoPanOnConnect:Yr,autoPanOnNodeDrag:An,autoPanSpeed:oi,onError:n_,connectionRadius:Is,isValidConnection:Hr,selectNodesOnDrag:Re,nodeDragThreshold:Gs,connectionDragThreshold:Vs,onBeforeDelete:L,debug:za,ariaLabelConfig:Ws,zIndexMode:_t}),_.jsx(uZn,{onInit:u,onNodeClick:o,onEdgeClick:c,onNodeMouseEnter:y,onNodeMouseMove:x,onNodeMouseLeave:C,onNodeContextMenu:N,onNodeDoubleClick:j,nodeTypes:i,edgeTypes:a,connectionLineType:U,connectionLineStyle:H,connectionLineComponent:oe,connectionLineContainerStyle:ae,selectionKeyCode:se,selectionOnDrag:V,selectionMode:ne,deleteKeyCode:ue,multiSelectionKeyCode:he,panActivationKeyCode:ce,zoomActivationKeyCode:me,onlyRenderVisibleElements:Ye,defaultViewport:ke,translateExtent:qe,minZoom:ge,maxZoom:je,preventScrolling:rt,zoomOnScroll:Ut,zoomOnPinch:Xt,zoomOnDoubleClick:gn,panOnScroll:en,panOnScrollSpeed:an,panOnScrollMode:At,panOnDrag:on,autoPanOnSelection:wo,onPaneClick:Ot,onPaneMouseEnter:dn,onPaneMouseMove:cn,onPaneMouseLeave:kn,onPaneScroll:Wn,onPaneContextMenu:vs,paneClickDistance:ns,nodeClickDistance:gt,onSelectionContextMenu:Z,onSelectionStart:J,onSelectionEnd:$,onReconnect:bn,onReconnectStart:un,onReconnectEnd:_r,onEdgeContextMenu:Mn,onEdgeDoubleClick:Qn,onEdgeMouseEnter:ar,onEdgeMouseMove:wt,onEdgeMouseLeave:Ht,reconnectRadius:vr,defaultMarkerColor:st,noDragClassName:Xn,noWheelClassName:Yn,noPanClassName:Xr,rfId:Ci,disableKeyboardA11y:Fn,nodeExtent:dt,viewport:Wi,onViewportChange:Ks}),_.jsx(DXn,{onSelectionChange:G}),ln,_.jsx(AXn,{proOptions:fr,position:vt}),_.jsx(jXn,{rfId:Ci,disableKeyboardA11y:Fn})]})})}var gZn=xG(mZn);function vZn({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:gs(["react-flow__background-pattern",t,r])})}function bZn({radius:e,className:n}){return _.jsx("circle",{cx:e,cy:e,r:e,className:gs(["react-flow__background-pattern","dots",n])})}var vl;(function(e){e.Lines="lines",e.Dots="dots",e.Cross="cross"})(vl||(vl={}));const yZn={[vl.Dots]:1,[vl.Lines]:1,[vl.Cross]:6},xZn=e=>({transform:e.transform,patternId:`pattern-${e.rfId}`});function VG({id:e,variant:n=vl.Dots,gap:t=20,size:r,lineWidth:s=1,offset:i=0,color:a,bgColor:o,style:c,className:u,patternClassName:h}){const f=T.useRef(null),{transform:p,patternId:m}=Bn(xZn,Tr),w=r||yZn[n],k=n===vl.Dots,v=n===vl.Cross,b=Array.isArray(t)?t:[t,t],y=[b[0]*p[2]||1,b[1]*p[2]||1],x=w*p[2],C=Array.isArray(i)?i:[i,i],N=v?[x,x]:y,j=[C[0]*p[2]||1+N[0]/2,C[1]*p[2]||1+N[1]/2],A=`${m}${e||""}`;return _.jsxs("svg",{className:gs(["react-flow__background",u]),style:{...c,...ox,"--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]%y[0],y:p[1]%y[1],width:y[0],height:y[1],patternUnits:"userSpaceOnUse",patternTransform:`translate(-${j[0]},-${j[1]})`,children:k?_.jsx(bZn,{radius:x/2,className:h}):_.jsx(vZn,{dimensions:N,lineWidth:s,variant:n,className:h})}),_.jsx("rect",{x:"0",y:"0",width:"100%",height:"100%",fill:`url(#${A})`})]})}VG.displayName="Background";const wZn=T.memo(VG);function kZn(){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 SZn(){return _.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 5",children:_.jsx("path",{d:"M0 0h32v4.2H0z"})})}function CZn(){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 EZn(){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 NZn(){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 G1({children:e,className:n,...t}){return _.jsx("button",{type:"button",className:gs(["react-flow__controls-button",n]),...t,children:e})}const zZn=e=>({isInteractive:e.nodesDraggable||e.nodesConnectable||e.elementsSelectable,minZoomReached:e.transform[2]<=e.minZoom,maxZoomReached:e.transform[2]>=e.maxZoom,ariaLabelConfig:e.ariaLabelConfig});function KG({style:e,showZoom:n=!0,showFitView:t=!0,showInteractive:r=!0,fitViewOptions:s,onZoomIn:i,onZoomOut:a,onFitView:o,onInteractiveChange:c,className:u,children:h,position:f="bottom-left",orientation:p="vertical","aria-label":m}){const w=Mr(),{isInteractive:k,minZoomReached:v,maxZoomReached:b,ariaLabelConfig:y}=Bn(zZn,Tr),{zoomIn:x,zoomOut:C,fitView:N}=h7(),j=()=>{x(),i==null||i()},A=()=>{C(),a==null||a()},z=()=>{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(ax,{className:gs(["react-flow__controls",D,u]),position:f,style:e,"data-testid":"rf__controls","aria-label":m??y["controls.ariaLabel"],children:[n&&_.jsxs(_.Fragment,{children:[_.jsx(G1,{onClick:j,className:"react-flow__controls-zoomin",title:y["controls.zoomIn.ariaLabel"],"aria-label":y["controls.zoomIn.ariaLabel"],disabled:b,children:_.jsx(kZn,{})}),_.jsx(G1,{onClick:A,className:"react-flow__controls-zoomout",title:y["controls.zoomOut.ariaLabel"],"aria-label":y["controls.zoomOut.ariaLabel"],disabled:v,children:_.jsx(SZn,{})})]}),t&&_.jsx(G1,{className:"react-flow__controls-fitview",onClick:z,title:y["controls.fitView.ariaLabel"],"aria-label":y["controls.fitView.ariaLabel"],children:_.jsx(CZn,{})}),r&&_.jsx(G1,{className:"react-flow__controls-interactive",onClick:M,title:y["controls.interactive.ariaLabel"],"aria-label":y["controls.interactive.ariaLabel"],children:k?_.jsx(NZn,{}):_.jsx(EZn,{})}),h]})}KG.displayName="Controls";T.memo(KG);function jZn({id:e,x:n,y:t,width:r,height:s,style:i,color:a,strokeColor:o,strokeWidth:c,className:u,borderRadius:h,shapeRendering:f,selected:p,onClick:m}){const{background:w,backgroundColor:k}=i||{},v=a||w||k;return _.jsx("rect",{className:gs(["react-flow__minimap-node",{selected:p},u]),x:n,y:t,rx:h,ry:h,width:r,height:s,style:{fill:v,stroke:o,strokeWidth:c},shapeRendering:f,onClick:m?b=>m(b,e):void 0})}const AZn=T.memo(jZn),TZn=e=>e.nodes.map(n=>n.id),K4=e=>e instanceof Function?e:()=>e;function RZn({nodeStrokeColor:e,nodeColor:n,nodeClassName:t="",nodeBorderRadius:r=5,nodeStrokeWidth:s,nodeComponent:i=AZn,onClick:a}){const o=Bn(TZn,Tr),c=K4(n),u=K4(e),h=K4(t),f=typeof window>"u"||window.chrome?"crispEdges":"geometricPrecision";return _.jsx(_.Fragment,{children:o.map(p=>_.jsx(OZn,{id:p,nodeColorFunc:c,nodeStrokeColorFunc:u,nodeClassNameFunc:h,nodeBorderRadius:r,nodeStrokeWidth:s,NodeComponent:i,onClick:a,shapeRendering:f},p))})}function MZn({id:e,nodeColorFunc:n,nodeStrokeColorFunc:t,nodeClassNameFunc:r,nodeBorderRadius:s,nodeStrokeWidth:i,shapeRendering:a,NodeComponent:o,onClick:c}){const{node:u,x:h,y:f,width:p,height:m}=Bn(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:b,y}=k.internals.positionAbsolute,{width:x,height:C}=Al(v);return{node:v,x:b,y,width:x,height:C}},Tr);return!u||u.hidden||!QU(u)?null:_.jsx(o,{x:h,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 OZn=T.memo(MZn);var DZn=T.memo(RZn);const LZn=200,IZn=150,$Zn=e=>!e.hidden,BZn=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?VU(Ym(e.nodeLookup,{filter:$Zn}),n):n,rfId:e.rfId,panZoom:e.panZoom,translateExtent:e.translateExtent,flowWidth:e.width,flowHeight:e.height,ariaLabelConfig:e.ariaLabelConfig}},PZn="react-flow__minimap-desc";function WG({style:e,className:n,nodeStrokeColor:t,nodeColor:r,nodeClassName:s="",nodeBorderRadius:i=5,nodeStrokeWidth:a,nodeComponent:o,bgColor:c,maskColor:u,maskStrokeColor:h,maskStrokeWidth:f,position:p="bottom-right",onClick:m,onNodeClick:w,pannable:k=!1,zoomable:v=!1,ariaLabel:b,inversePan:y,zoomStep:x=1,offsetScale:C=5}){const N=Mr(),j=T.useRef(null),{boundingRect:A,viewBB:z,rfId:M,panZoom:D,translateExtent:I,flowWidth:B,flowHeight:G,ariaLabelConfig:q}=Bn(BZn,Tr),Q=(e==null?void 0:e.width)??LZn,K=(e==null?void 0:e.height)??IZn,Z=A.width/Q,J=A.height/K,$=Math.max(Z,J),L=$*Q,F=$*K,U=C*$,H=A.x-(L-A.width)/2-U,oe=A.y-(F-A.height)/2-U,ae=L+U*2,ue=F+U*2,se=`${PZn}-${M}`,V=T.useRef(0),ne=T.useRef();V.current=$,T.useEffect(()=>{if(j.current&&D)return ne.current=rXn({domNode:j.current,panZoom:D,getTransform:()=>N.getState().transform,getViewScale:()=>V.current}),()=>{var Ae;(Ae=ne.current)==null||Ae.destroy()}},[D]),T.useEffect(()=>{var Ae;(Ae=ne.current)==null||Ae.update({translateExtent:I,width:B,height:G,inversePan:y,pannable:k,zoomStep:x,zoomable:v})},[k,v,y,x,I,B,G]);const ce=m?Ae=>{var Re;const[Pe,Ye]=((Re=ne.current)==null?void 0:Re.pointer(Ae))||[0,0];m(Ae,{x:Pe,y:Ye})}:void 0,he=w?T.useCallback((Ae,Pe)=>{const Ye=N.getState().nodeLookup.get(Pe).internals.userNode;w(Ae,Ye)},[]):void 0,me=b??q["minimap.ariaLabel"];return _.jsx(ax,{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 h=="string"?h: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:gs(["react-flow__minimap",n]),"data-testid":"rf__minimap",children:_.jsxs("svg",{width:Q,height:K,viewBox:`${H} ${oe} ${ae} ${ue}`,className:"react-flow__minimap-svg",role:"img","aria-labelledby":se,ref:j,onClick:ce,children:[me&&_.jsx("title",{id:se,children:me}),_.jsx(DZn,{onClick:he,nodeColor:r,nodeStrokeColor:t,nodeBorderRadius:i,nodeClassName:s,nodeStrokeWidth:a,nodeComponent:o}),_.jsx("path",{className:"react-flow__minimap-mask",d:`M${H-U},${oe-U}h${ae+U*2}v${ue+U*2}h${-ae-U*2}z + M${z.x},${z.y}h${z.width}v${z.height}h${-z.width}z`,fillRule:"evenodd",pointerEvents:"none"})]})})}WG.displayName="MiniMap";T.memo(WG);const FZn=e=>n=>e?`${Math.max(1/n.transform[2],1)}`:void 0,HZn={[Gh.Line]:"right",[Gh.Handle]:"bottom-right"};function qZn({nodeId:e,position:n,variant:t=Gh.Handle,className:r,style:s=void 0,children:i,color:a,minWidth:o=10,minHeight:c=10,maxWidth:u=Number.MAX_VALUE,maxHeight:h=Number.MAX_VALUE,keepAspectRatio:f=!1,resizeDirection:p,autoScale:m=!0,shouldResize:w,onResizeStart:k,onResize:v,onResizeEnd:b}){const y=CG(),x=typeof e=="string"?e:y,C=Mr(),N=T.useRef(null),j=t===Gh.Handle,A=Bn(T.useCallback(FZn(j&&m),[j,m]),Tr),z=T.useRef(null),M=n??HZn[t];T.useEffect(()=>{if(!(!N.current||!x))return z.current||(z.current=mXn({domNode:N.current,nodeId:x,getStoreItems:()=>{const{nodeLookup:I,transform:B,snapGrid:G,snapToGrid:q,nodeOrigin:Q,domNode:K}=C.getState();return{nodeLookup:I,transform:B,snapGrid:G,snapToGrid:q,nodeOrigin:Q,paneDomNode:K}},onChange:(I,B)=>{const{triggerNodeChanges:G,nodeLookup:q,parentLookup:Q,nodeOrigin:K}=C.getState(),Z=[],J={x:I.x,y:I.y},$=q.get(x);if($&&$.expandParent&&$.parentId){const L=$.origin??K,F=I.width??$.measured.width??0,U=I.height??$.measured.height??0,H={id:$.id,parentId:$.parentId,rect:{width:F,height:U,...XU({x:I.x??$.position.x,y:I.y??$.position.y},{width:F,height:U},$.parentId,q,L)}},oe=d7([H],q,Q,K);Z.push(...oe),J.x=I.x?Math.max(L[0]*F,I.x):void 0,J.y=I.y?Math.max(L[1]*U,I.y):void 0}if(J.x!==void 0&&J.y!==void 0){const L={id:x,type:"position",position:{...J}};Z.push(L)}if(I.width!==void 0&&I.height!==void 0){const F={id:x,type:"dimensions",resizing:!0,setAttributes:p?p==="horizontal"?"width":"height":!0,dimensions:{width:I.width,height:I.height}};Z.push(F)}for(const L of B){const F={...L,type:"position"};Z.push(F)}G(Z)},onEnd:({width:I,height:B})=>{const G={id:x,type:"dimensions",resizing:!1,dimensions:{width:I,height:B}};C.getState().triggerNodeChanges([G])}})),z.current.update({controlPosition:M,boundaries:{minWidth:o,minHeight:c,maxWidth:u,maxHeight:h},keepAspectRatio:f,resizeDirection:p,onResizeStart:k,onResize:v,onResizeEnd:b,shouldResize:w}),()=>{var I;(I=z.current)==null||I.destroy()}},[M,o,c,u,h,f,k,v,b,w]);const D=M.split("-");return _.jsx("div",{className:gs(["react-flow__resize-control","nodrag",...D,t,r]),ref:N,style:{...s,scale:A,...a&&{[j?"backgroundColor":"borderColor"]:a}},children:i})}T.memo(qZn);function UZn(){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 V1=8;function GZn(e,n){const{offsetWidth:t,offsetHeight:r}=n,[{viewHeight:s,viewWidth:i},a]=T.useState({viewWidth:0,viewHeight:0});T.useEffect(()=>{function h(){a({viewWidth:window.innerWidth,viewHeight:window.innerHeight})}return window.addEventListener("resize",h),h(),()=>window.removeEventListener("resize",h)},[]);let o=0,c=0,u=0;if(e){const{distance:h}=e;switch(e.anchor){case"left":o=e.x-t-h,c=e.y+e.height/2-r/2;break;case"right":o=e.x+e.width+h,c=e.y+e.height/2-r/2;break;case"below":o=e.x+e.width/2-t/2,c=e.y+e.height+h;break;case"above":o=e.x+e.width/2-t/2,c=e.y-r-h;break}const f=o,p=c;o=Math.min(Math.max(o,V1),i-t-V1),c=Math.min(Math.max(c,V1),s-r-V1),u=e.anchor==="left"||e.anchor==="right"?p-c:f-o}return{x:o,y:c,arrowAdjustment:u}}const W4=380,Q4=12,VZn=350,KZn=150,Uk=new EventTarget;function WZn(){Uk.dispatchEvent(new Event("move"))}function QZn(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 Uk.addEventListener("move",u),()=>{Uk.removeEventListener("move",u),window.clearTimeout(s.current),window.clearTimeout(i.current)}},[]),T.useEffect(()=>{r(u=>{var f;if(!u)return u;const h=((f=e.current)==null?void 0:f.getBoundingClientRect())??null;return h&&u.x===h.x&&u.y===h.y&&u.width===h.width&&u.height===h.height?u:h})},[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)},VZn)},[e]),o=T.useCallback(()=>{window.clearTimeout(s.current),window.clearTimeout(i.current),i.current=window.setTimeout(()=>r(null),KZn)},[]),c=T.useCallback(()=>window.clearTimeout(i.current),[]);return{rect:t,onMouseEnter:a,onMouseLeave:o,keepOpen:c}}function XZn(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 YZn({exp:e,runs:n,latestRun:t,parentSlug:r,anchor:s,onOpenLogs:i,onOpenCode:a,onMouseEnter:o,onMouseLeave:c}){const u=UZn(),h=s.right+Q4+W4<=window.innerWidth,f=s.x-Q4-W4>=0,p=h?"right":f?"left":s.y>window.innerHeight/2?"above":"below",{x:m,y:w}=GZn({x:s.x,y:s.y,width:s.width,height:s.height,anchor:p,distance:Q4},u),k=e.parentExperimentId&&(t!=null&&t.commitSha)?t.id:null,{data:v}=ut({...ENn(k??""),enabled:!!k,subscribed:!!k}),b=T.useMemo(()=>{if(!v)return null;const B=v;let G=B.diff;if(B.truncated){const Z=G.lastIndexOf(` diff --git `);G=Z!==-1?G.slice(0,Z+1):G.slice(0,G.lastIndexOf(` -`)+1)}let U=[];try{U=G.trim()?E5(G):[]}catch{return null}if(B.truncated&&U.every(Z=>Z.hunks.length===0))return null;let Q=0,V=0;for(const Z of U){const J=Cy(Z);Q+=J.additions,V+=J.deletions}return{fileCount:U.length,additions:Q,deletions:V,truncated:B.truncated}},[v]),y={done:0,failed:0,cancelled:0,live:0};for(const B of n)B.status==="done"?y.done+=1:B.status==="failed"?y.failed+=1:B.status==="cancelled"?y.cancelled+=1:y.live+=1;const x=t?$0((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,j=TI(n),A=T.useRef(null),[z,M]=T.useState(!1),[D,I]=T.useState(!1);return T.useEffect(()=>{M(!1)},[N]),T.useEffect(()=>{const B=A.current;B&&I(B.scrollHeight>B.clientHeight+1)},[N,z]),si.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:Q4,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(ml,{status:t?pa(t):"idle"})]}),e.title&&_.jsx("div",{className:"hc-title",children:e.title}),_.jsxs("div",{className:"hc-actions",children:[i&&_.jsxs("button",{type:"button",...Wr(i),children:[_.jsx(bo,{size:13}),LLe()]}),_.jsxs("button",{type:"button",...Wr(a),children:[_.jsx(Xb,{size:13}),pLe()]})]}),N&&_.jsx("div",{className:`hc-body${z?" expanded":""}`,ref:A,children:N}),N&&(D||z)&&_.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>M(B=>!B),children:z?vL():mTe()}),C&&_.jsx("div",{className:"hc-failure",children:C}),j&&_.jsx("div",{className:"hc-monitoring",title:j,children:j}),_.jsxs("div",{className:"hc-stats",children:[_.jsx("span",{children:new Intl.ListFormat(E(),{style:"short"}).format([n.length===1?vJe():CJe({count:Jt(n.length)}),...y.done>0?[AZe({count:Jt(y.done)})]:[],...y.failed>0?[IZe({count:Jt(y.failed)})]:[],...y.cancelled>0?[kZe({count:Jt(y.cancelled)})]:[],...y.live>0?[sJe({count:Jt(y.live)})]:[]])}),t&&OS(t.backend)&&_.jsx(i6,{backend:t.backend}),x&&_.jsx("span",{children:x}),t&&_.jsx("span",{children:vo(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(Im,{size:12}),e.branchName]}),r&&_.jsxs("span",{children:[jLe()," ",_.jsx("span",{children:r})]})]}),b&&b.fileCount>0&&_.jsx("div",{className:"hc-git-row",title:b.truncated?wY({parent:Ce(r??"parent")}):pY({parent:Ce(r??"parent")}),children:_.jsxs("span",{children:[b.truncated&&"≥ ",_.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",b.additions]})," ",_.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",b.deletions]})," · ",b.fileCount===1&&!b.truncated?_Je():b.truncated?YZe({count:Jt(b.fileCount)}):UZe({count:Jt(b.fileCount)})]})})]}),_.jsxs("div",{className:"hc-foot",children:[_.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),_.jsxs("span",{children:[wLe()," ",_Zn(e.createdAt)]})]})]}),document.body)}const OO=["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(" "),dZn=264,hZn=132,yv=44,pZn=72,mZn=148,gZn=44,vZn=160,bZn=64;function yZn(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 xZn(e,n){const t=new Map,r=o=>{const c=t.get(o)??1+o.children.reduce((u,h)=>u+r(h),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 h=[];let f=0;for(const p of o.children)i(p)?h.push(...a(p)):f+=r(p);return f>0&&h.push({kind:"elided",id:`el-${o.exp.id}`,count:f,children:[]}),[{kind:"exp",exp:o.exp,children:h}]}if(!i(o))return[];let c=0;const u=[];return(function h(f){c+=1;for(const p of f.children)n(p)?u.push(...a(p)):i(p)?h(p):c+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:c,children:u}]}return e.flatMap(a)}function wZn(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 Kk(e){return e.kind==="exp"?dZn:e.kind==="archived"?vZn:mZn}function kZn(e){return e.kind==="exp"?hZn:gZn}function V1(e){return e.kind==="exp"?e.exp.id:e.id}function xv(e){if(e.children.length===0)return Kk(e);const n=e.children.reduce((t,r)=>t+xv(r),0)+yv*(e.children.length-1);return Math.max(Kk(e),n)}function SZn(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const CZn=T.memo(function({data:n}){Qu();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:c,onOpenView:u,onOpenCode:h,onArchive:f,actions:p}=n,m=r?pa(r):void 0,w=m==="running"||m==="starting"||m==="cancelling",k=i?I1n():w?Uvn():rl(),v=s.slice(-8),b=T.useRef(null),y=uZn(b,n);return _.jsxs("div",{ref:b,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:y.onMouseEnter,onMouseLeave:y.onMouseLeave,children:[_.jsx(dc,{type:"target",position:Rt.Top}),_.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...Wr(x=>u(t.id,"overview",x)),children:[_.jsxs("div",{className:"node-eyebrow",children:[_.jsx("span",{children:t.archived?CI():k}),_.jsx(ml,{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:Zbn()}),v.length>0?_.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:v.map(x=>_.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 ${SZn(pa(x))}`,title:G6(pa(x))},x.id))}):_.jsx("span",{children:$bn()}),_.jsx("span",{className:"flex-1"}),r&&_.jsx("span",{children:vo(r.createdAt)})]})]}),_.jsxs("div",{className:"node-actions",onClick:x=>x.stopPropagation(),children:[s.length>0&&_.jsxs("button",{className:"node-action",title:Gbn(),...Wr(x=>u(t.id,"terminal",x)),children:[_.jsx(bo,{size:13}),NI()]}),_.jsxs("button",{className:"node-action",title:rL({branch:Ce(t.branchName)}),...Wr(x=>h(t.id,t.branchName,"files",x)),children:[_.jsx(Xb,{size:13}),_bn()]}),o&&c&&_.jsx("a",{className:"node-action",title:Ov({name:Ce(t.branchName)}),"aria-label":Ov({name:Ce(t.branchName)}),href:Gb(o,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:x=>x.stopPropagation(),children:_.jsx(ry,{size:13})}),_.jsx(oU,{id:t.id,name:t.slug,actions:p,onArchive:f,compact:!0})]}),_.jsx(dc,{type:"source",position:Rt.Bottom}),y.rect&&_.jsx(fZn,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:y.rect,onOpenLogs:s.length>0?x=>u(t.id,"terminal",x):void 0,onOpenCode:x=>h(t.id,t.branchName,"files",x),onMouseEnter:y.keepOpen,onMouseLeave:y.onMouseLeave})]})}),EZn=T.memo(function({data:n}){Qu();const{rootId:t,count:r,onRestoreRegion:s}=n,i=T.useRef(null),a=Ki(i),[o,c]=T.useState({top:0,left:0}),u=()=>{if(!a.open&&i.current){const h=i.current.getBoundingClientRect(),f=window.innerHeight-h.bottom>=44;c({top:f?h.bottom+4:Math.max(4,h.top-44),left:Math.max(4,Math.min(h.left,window.innerWidth-232))})}a.setOpen(h=>!h)};return _.jsxs("div",{className:"archived-node w-40 h-11",children:[_.jsx(dc,{type:"target",position:Rt.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(gCn,{size:15,className:"shrink-0 text-subtext","aria-hidden":"true"}),_.jsx("span",{children:A1n({count:Jt(r)})})]}),_.jsx(dc,{type:"source",position:Rt.Bottom}),a.open&&si.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(vn,{onClick:()=>{a.setOpen(!1),s(t)},children:r===1?EI():Svn({count:Jt(r)})})}),document.body)]})}),NZn=T.memo(function({data:n}){Qu();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:iyn(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[_.jsx(dc,{type:"target",position:Rt.Top}),_.jsx(Lm,{size:14}),_.jsxs("span",{className:"elided-node-label",children:[t===1?uvn():X1n({count:Jt(t)}),_.jsx("span",{className:"elided-node-sub",children:rvn()})]}),_.jsx(dc,{type:"source",position:Rt.Bottom})]})}),zZn={exp:CZn,archived:EZn,elided:NZn},WG={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},jZn={...WG.style,strokeDasharray:"4 4"};function AZn({experiments:e,archiveActions:n,showArchived:t,runs:r,project:s,onOpenView:i,onOpenCode:a,onArchive:o,agentSessionId:c,onShowProjectScope:u,onRestoreRegion:h,viewport:f,onViewportChange:p}){const{nodes:m,edges:w}=T.useMemo(()=>{const k=new Map;for(const z of r){const M=k.get(z.experimentId);M?M.push(z):k.set(z.experimentId,[z])}for(const z of k.values())z.sort((M,D)=>M.createdAt-D.createdAt);const v=[],b=[],y=z=>!c||z.exp.chatSessionId===c,x=xZn(yZn(e),y),C=t?x:wZn(x),N=new Map(e.map(z=>[z.id,z.slug]));function j(z,M,D){const I=M-Kk(z)/2;if(z.kind==="exp"){const U=k.get(z.exp.id)??[];v.push({id:z.exp.id,type:"exp",position:{x:I,y:D},data:{exp:z.exp,latestRun:U[U.length-1]??null,runs:U,isBaseline:!z.exp.parentExperimentId,parentSlug:z.exp.parentExperimentId?N.get(z.exp.parentExperimentId)??null:null,githubOwner:s.githubEnabled?s.githubOwner:"",githubRepo:s.githubEnabled?s.githubRepo:"",onOpenView:i,onOpenCode:a,onArchive:o,actions:n.get(z.exp.id)}})}else z.kind==="archived"?v.push({id:z.id,type:"archived",position:{x:I,y:D},data:{rootId:z.rootId,count:z.count,onRestoreRegion:h}}):v.push({id:z.id,type:"elided",position:{x:I,y:D},data:{count:z.count,onShowProjectScope:u}});if(z.children.length===0)return;const B=z.children.reduce((U,Q)=>U+xv(Q),0)+yv*(z.children.length-1);let G=M-B/2;for(const U of z.children){const Q=xv(U),V=z.kind!=="exp"||U.kind!=="exp"||z.exp.archived||U.exp.archived;b.push({id:`e-${V1(z)}-${V1(U)}`,source:V1(z),target:V1(U),...V?{style:jZn}:{}}),j(U,G+Q/2,D+kZn(z)+(U.kind==="archived"?bZn:pZn)),G+=Q+yv}}let A=0;for(const z of C){const M=xv(z);j(z,A+M/2,0),A+=M+yv}return{nodes:v,edges:b}},[e,n,t,r,i,a,o,s.githubOwner,s.githubRepo,s.githubEnabled,c,u,h]);return e.length===0?_.jsxs("div",{className:OO,children:[_.jsx("p",{className:"empty-state-title",children:Tbn()}),_.jsx("p",{className:"empty-state-hint",children:sbn()})]}):m.length===0&&c?_.jsxs("div",{className:OO,children:[_.jsx("p",{className:"empty-state-title",children:Sbn()}),_.jsx("p",{className:"empty-state-hint",children:Yvn()})]}):_.jsx(RYn,{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:zZn,defaultEdgeOptions:WG,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:lZn,onMoveEnd:(k,v)=>{k&&p(v)},minZoom:.15,defaultViewport:f??void 0,fitView:f===null,fitViewOptions:{padding:.25,maxZoom:1},children:_.jsx(IYn,{variant:vl.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},c??"project")}const c0=["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 TZn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function RZn(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("~/")||mC(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},h=i.startsWith("/")&&c?u(c):null,f=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(h!==null)return h?{path:h,source:"artifacts"}:null;if(f!==null)i=f;else{const p=s?TZn(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 MZn(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const OZn=10,DO=1448,DZn=80,LZn=48;function LO(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 IO(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 W1=e=>Ce(e instanceof Error?e.message:String(e));function IZn({runtime:e,projectId:n,pane:t}){var f_,d_,Ri,Dc;const r=pn({mutationFn:s3n}),s=xi(),i=QD({select:Y=>Y.location}),a=gf(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=(a==null?void 0:a.kind)==="task"?a.sessionId??null:c.current;(a==null?void 0:a.kind)==="task"&&(c.current=u);const h=t!==void 0,f=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[p,m]=T.useState(null),[w,k]=T.useState(0),v=`${i.href} +`)+1)}let q=[];try{q=G.trim()?C5(G):[]}catch{return null}if(B.truncated&&q.every(Z=>Z.hunks.length===0))return null;let Q=0,K=0;for(const Z of q){const J=Sy(Z);Q+=J.additions,K+=J.deletions}return{fileCount:q.length,additions:Q,deletions:K,truncated:B.truncated}},[v]),y={done:0,failed:0,cancelled:0,live:0};for(const B of n)B.status==="done"?y.done+=1:B.status==="failed"?y.failed+=1:B.status==="cancelled"?y.cancelled+=1:y.live+=1;const x=t?$0((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,j=TI(n),A=T.useRef(null),[z,M]=T.useState(!1),[D,I]=T.useState(!1);return T.useEffect(()=>{M(!1)},[N]),T.useEffect(()=>{const B=A.current;B&&I(B.scrollHeight>B.clientHeight+1)},[N,z]),ii.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:W4,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(ml,{status:t?pa(t):"idle"})]}),e.title&&_.jsx("div",{className:"hc-title",children:e.title}),_.jsxs("div",{className:"hc-actions",children:[i&&_.jsxs("button",{type:"button",...Wr(i),children:[_.jsx(bo,{size:13}),xIe()]}),_.jsxs("button",{type:"button",...Wr(a),children:[_.jsx(Qb,{size:13}),eIe()]})]}),N&&_.jsx("div",{className:`hc-body${z?" expanded":""}`,ref:A,children:N}),N&&(D||z)&&_.jsx("button",{type:"button",className:"hc-toggle",onClick:()=>M(B=>!B),children:z?vL():tRe()}),C&&_.jsx("div",{className:"hc-failure",children:C}),j&&_.jsx("div",{className:"hc-monitoring",title:j,children:j}),_.jsxs("div",{className:"hc-stats",children:[_.jsx("span",{children:new Intl.ListFormat(E(),{style:"short"}).format([n.length===1?ret():_et({count:Jt(n.length)}),...y.done>0?[pJe({count:Jt(y.done)})]:[],...y.failed>0?[wJe({count:Jt(y.failed)})]:[],...y.cancelled>0?[cJe({count:Jt(y.cancelled)})]:[],...y.live>0?[qJe({count:Jt(y.live)})]:[]])}),t&&OS(t.backend)&&_.jsx(i6,{backend:t.backend}),x&&_.jsx("span",{children:x}),t&&_.jsx("span",{children:vo(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(Im,{size:12}),e.branchName]}),r&&_.jsxs("span",{children:[hIe()," ",_.jsx("span",{children:r})]})]}),b&&b.fileCount>0&&_.jsx("div",{className:"hc-git-row",title:b.truncated?yY({parent:Ce(r??"parent")}):dY({parent:Ce(r??"parent")}),children:_.jsxs("span",{children:[b.truncated&&"≥ ",_.jsxs("span",{className:"diff-stat-add text-accent-green",children:["+",b.additions]})," ",_.jsxs("span",{className:"diff-stat-del text-accent-red",children:["−",b.deletions]})," · ",b.fileCount===1&&!b.truncated?XJe():b.truncated?LJe({count:Jt(b.fileCount)}):jJe({count:Jt(b.fileCount)})]})})]}),_.jsxs("div",{className:"hc-foot",children:[_.jsxs("span",{className:"hc-command font-mono",children:["$ ",e.runCommand]}),_.jsxs("span",{children:[oIe()," ",XZn(e.createdAt)]})]})]}),document.body)}const DO=["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(" "),ZZn=264,JZn=132,yv=44,eJn=72,tJn=148,nJn=44,rJn=160,sJn=64;function iJn(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 aJn(e,n){const t=new Map,r=o=>{const c=t.get(o)??1+o.children.reduce((u,h)=>u+r(h),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 h=[];let f=0;for(const p of o.children)i(p)?h.push(...a(p)):f+=r(p);return f>0&&h.push({kind:"elided",id:`el-${o.exp.id}`,count:f,children:[]}),[{kind:"exp",exp:o.exp,children:h}]}if(!i(o))return[];let c=0;const u=[];return(function h(f){c+=1;for(const p of f.children)n(p)?u.push(...a(p)):i(p)?h(p):c+=r(p)})(o),[{kind:"elided",id:`el-${o.exp.id}`,count:c,children:u}]}return e.flatMap(a)}function oJn(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 Gk(e){return e.kind==="exp"?ZZn:e.kind==="archived"?rJn:tJn}function cJn(e){return e.kind==="exp"?JZn:nJn}function K1(e){return e.kind==="exp"?e.exp.id:e.id}function xv(e){if(e.children.length===0)return Gk(e);const n=e.children.reduce((t,r)=>t+xv(r),0)+yv*(e.children.length-1);return Math.max(Gk(e),n)}function lJn(e){return e==="done"?"pass":e==="failed"?"fail":e==="running"||e==="starting"||e==="cancelling"?"live":"other"}const uJn=T.memo(function({data:n}){Xu();const{exp:t,latestRun:r,runs:s,isBaseline:i,parentSlug:a,githubOwner:o,githubRepo:c,onOpenView:u,onOpenCode:h,onArchive:f,actions:p}=n,m=r?pa(r):void 0,w=m==="running"||m==="starting"||m==="cancelling",k=i?wvn():w?jbn():rl(),v=s.slice(-8),b=T.useRef(null),y=QZn(b,n);return _.jsxs("div",{ref:b,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:y.onMouseEnter,onMouseLeave:y.onMouseLeave,children:[_.jsx(dc,{type:"target",position:Rt.Top}),_.jsxs("div",{role:"button",tabIndex:0,className:"node-overview-link nodrag",...Wr(x=>u(t.id,"overview",x)),children:[_.jsxs("div",{className:"node-eyebrow",children:[_.jsx("span",{children:t.archived?CI():k}),_.jsx(ml,{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:Iyn()}),v.length>0?_.jsx("span",{className:"run-squares flex items-center gap-[3px]",children:v.map(x=>_.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 ${lJn(pa(x))}`,title:G6(pa(x))},x.id))}):_.jsx("span",{children:kyn()}),_.jsx("span",{className:"flex-1"}),r&&_.jsx("span",{children:vo(r.createdAt)})]})]}),_.jsxs("div",{className:"node-actions",onClick:x=>x.stopPropagation(),children:[s.length>0&&_.jsxs("button",{className:"node-action",title:Ayn(),...Wr(x=>u(t.id,"terminal",x)),children:[_.jsx(bo,{size:13}),NI()]}),_.jsxs("button",{className:"node-action",title:rL({branch:Ce(t.branchName)}),...Wr(x=>h(t.id,t.branchName,"files",x)),children:[_.jsx(Qb,{size:13}),Xbn()]}),o&&c&&_.jsx("a",{className:"node-action",title:Ov({name:Ce(t.branchName)}),"aria-label":Ov({name:Ce(t.branchName)}),href:Ub(o,c,t.branchName),target:"_blank",rel:"noopener noreferrer",onClick:x=>x.stopPropagation(),children:_.jsx(ny,{size:13})}),_.jsx(cU,{id:t.id,name:t.slug,actions:p,onArchive:f,compact:!0})]}),_.jsx(dc,{type:"source",position:Rt.Bottom}),y.rect&&_.jsx(YZn,{exp:t,runs:s,latestRun:r,parentSlug:a,anchor:y.rect,onOpenLogs:s.length>0?x=>u(t.id,"terminal",x):void 0,onOpenCode:x=>h(t.id,t.branchName,"files",x),onMouseEnter:y.keepOpen,onMouseLeave:y.onMouseLeave})]})}),_Jn=T.memo(function({data:n}){Xu();const{rootId:t,count:r,onRestoreRegion:s}=n,i=T.useRef(null),a=Vi(i),[o,c]=T.useState({top:0,left:0}),u=()=>{if(!a.open&&i.current){const h=i.current.getBoundingClientRect(),f=window.innerHeight-h.bottom>=44;c({top:f?h.bottom+4:Math.max(4,h.top-44),left:Math.max(4,Math.min(h.left,window.innerWidth-232))})}a.setOpen(h=>!h)};return _.jsxs("div",{className:"archived-node w-40 h-11",children:[_.jsx(dc,{type:"target",position:Rt.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(n7n,{size:15,className:"shrink-0 text-subtext","aria-hidden":"true"}),_.jsx("span",{children:pvn({count:Jt(r)})})]}),_.jsx(dc,{type:"source",position:Rt.Bottom}),a.open&&ii.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(vn,{onClick:()=>{a.setOpen(!1),s(t)},children:r===1?EI():lbn({count:Jt(r)})})}),document.body)]})}),fJn=T.memo(function({data:n}){Xu();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:Uyn(),onClick:r,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),r())},children:[_.jsx(dc,{type:"target",position:Rt.Top}),_.jsx(Lm,{size:14}),_.jsxs("span",{className:"elided-node-label",children:[t===1?Qvn():Dvn({count:Jt(t)}),_.jsx("span",{className:"elided-node-sub",children:Hvn()})]}),_.jsx(dc,{type:"source",position:Rt.Bottom})]})}),dJn={exp:uJn,archived:_Jn,elided:fJn},QG={type:"default",style:{stroke:"var(--text)",strokeWidth:1.5,opacity:.3}},hJn={...QG.style,strokeDasharray:"4 4"};function pJn({experiments:e,archiveActions:n,showArchived:t,runs:r,project:s,onOpenView:i,onOpenCode:a,onArchive:o,agentSessionId:c,onShowProjectScope:u,onRestoreRegion:h,viewport:f,onViewportChange:p}){const{nodes:m,edges:w}=T.useMemo(()=>{const k=new Map;for(const z of r){const M=k.get(z.experimentId);M?M.push(z):k.set(z.experimentId,[z])}for(const z of k.values())z.sort((M,D)=>M.createdAt-D.createdAt);const v=[],b=[],y=z=>!c||z.exp.chatSessionId===c,x=aJn(iJn(e),y),C=t?x:oJn(x),N=new Map(e.map(z=>[z.id,z.slug]));function j(z,M,D){const I=M-Gk(z)/2;if(z.kind==="exp"){const q=k.get(z.exp.id)??[];v.push({id:z.exp.id,type:"exp",position:{x:I,y:D},data:{exp:z.exp,latestRun:q[q.length-1]??null,runs:q,isBaseline:!z.exp.parentExperimentId,parentSlug:z.exp.parentExperimentId?N.get(z.exp.parentExperimentId)??null:null,githubOwner:s.githubEnabled?s.githubOwner:"",githubRepo:s.githubEnabled?s.githubRepo:"",onOpenView:i,onOpenCode:a,onArchive:o,actions:n.get(z.exp.id)}})}else z.kind==="archived"?v.push({id:z.id,type:"archived",position:{x:I,y:D},data:{rootId:z.rootId,count:z.count,onRestoreRegion:h}}):v.push({id:z.id,type:"elided",position:{x:I,y:D},data:{count:z.count,onShowProjectScope:u}});if(z.children.length===0)return;const B=z.children.reduce((q,Q)=>q+xv(Q),0)+yv*(z.children.length-1);let G=M-B/2;for(const q of z.children){const Q=xv(q),K=z.kind!=="exp"||q.kind!=="exp"||z.exp.archived||q.exp.archived;b.push({id:`e-${K1(z)}-${K1(q)}`,source:K1(z),target:K1(q),...K?{style:hJn}:{}}),j(q,G+Q/2,D+cJn(z)+(q.kind==="archived"?sJn:eJn)),G+=Q+yv}}let A=0;for(const z of C){const M=xv(z);j(z,A+M/2,0),A+=M+yv}return{nodes:v,edges:b}},[e,n,t,r,i,a,o,s.githubOwner,s.githubRepo,s.githubEnabled,c,u,h]);return e.length===0?_.jsxs("div",{className:DO,children:[_.jsx("p",{className:"empty-state-title",children:myn()}),_.jsx("p",{className:"empty-state-hint",children:qbn()})]}):m.length===0&&c?_.jsxs("div",{className:DO,children:[_.jsx("p",{className:"empty-state-title",children:lyn()}),_.jsx("p",{className:"empty-state-hint",children:Lbn()})]}):_.jsx(gZn,{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:dJn,defaultEdgeOptions:QG,nodesDraggable:!1,nodesConnectable:!1,nodesFocusable:!1,onMoveStart:WZn,onMoveEnd:(k,v)=>{k&&p(v)},minZoom:.15,defaultViewport:f??void 0,fitView:f===null,fitViewOptions:{padding:.25,maxZoom:1},children:_.jsx(wZn,{variant:vl.Dots,color:"var(--dots-strong)",gap:28,size:1.6})},c??"project")}const c0=["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 mJn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function gJn(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("~/")||mC(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},h=i.startsWith("/")&&c?u(c):null,f=i.startsWith("/")&&o?u(o):null;if(!i.startsWith("/"))a=t;else{if(h!==null)return h?{path:h,source:"artifacts"}:null;if(f!==null)i=f;else{const p=s?mJn(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 vJn(e,n){if(!(e.source==="artifacts"||e.source==="abs"))return e.ref??e.branchLabel??n}const bJn=10,LO=1448,yJn=80,xJn=48;function IO(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 $O(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 W1=e=>Ce(e instanceof Error?e.message:String(e));function wJn({runtime:e,projectId:n,pane:t}){var d_,h_,Ri,Dc;const r=pn({mutationFn:q3n}),s=wi(),i=QD({select:Y=>Y.location}),a=gf(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=(a==null?void 0:a.kind)==="task"?a.sessionId??null:c.current;(a==null?void 0:a.kind)==="task"&&(c.current=u);const h=t!==void 0,f=(t==null?void 0:t.kind)==="experiment"?t.runId??null:null,[p,m]=T.useState(null),[w,k]=T.useState(0),v=`${i.href} ${JSON.stringify(t??null)} -${w}`,b=T.useRef({key:"",value:0});b.current.key!==v&&(b.current={key:v,value:b.current.value+1});const y=T.useMemo(()=>{const Y=t?co(t):"experiments";return typeof Y=="object"&&"path"in Y&&Y.line&&p!==b.current.value?{...Y,lineScrollRequest:b.current.value}:Y},[t,p,i.href,w]),x=ut(Gi(n)),C=T.useMemo(()=>{var Y;return((Y=x.data)==null?void 0:Y.map(_e=>_e.id))??null},[x.data]),N=T.useRef(new Set),j=T.useRef(new Set),A=T.useRef({}),[z,M]=T.useState(0),D=T.useRef({projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"});D.current={projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"};const I=T.useCallback((Y,_e=!1)=>{const xe=D.current;xe.projectId&&s.navigate({href:iv(xe.projectId,xe.activeSessionId,Y),replace:_e})},[s]),B=T.useCallback(Y=>{const _e=fl(Y);I(_e.kind==="file"?{..._e,line:void 0}:_e)},[I]),G=T.useCallback(()=>I(void 0),[I]),U=T.useCallback(Y=>{(t==null?void 0:t.kind)==="experiment"&&I({...t,runId:Y??void 0})},[t,I]),Q=T.useCallback(Y=>{s.navigate({href:Y?`/projects/${encodeURIComponent(Y)}`:"/projects"})},[s]),V=T.useCallback(Y=>{var _e;if(n)if(Y==="chat"){const xe=c.current;s.navigate({href:iv(n,xe,(_e=Lu(Ts.current,xe??"new"))==null?void 0:_e.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${Y==="skills"?"skills":`settings/${Y}`}`})},[s,n]),Z=Qu(),{status:J}=I6(e.kind==="local"),$=T.useMemo(()=>zh(),[n]),L=ut($),q=L.data??null,P=T.useCallback(Y=>{Vr($.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[$]),F=T.useMemo(()=>Om(),[n]),re=ut(F),ie=re.data??null,ue=T.useCallback(Y=>{Vr(F.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[F]),se=T.useRef(void 0);se.current=ie==null?void 0:ie.tourCompleted;const K=[!x.data&&x.error?lL():null,!L.data&&L.error?v0():null,!re.data&&re.error?ofe():null].filter(Y=>Y!==null),oe=K.length?xfe({items:new Intl.ListFormat(Z).format(K)}):null,ce=T.useRef(null),pe=ut(Vv(n)),ve=pe.data??[],Me=!pe.isPending,[Fe,Ye]=T.useState(!1),$e=ut(Tu(n)).data??[],yt=T.useRef($e);yt.current=$e;const ot=T.useRef(new Map),Mt=T.useRef(new Set),jt=T.useRef(null),Pt=T.useRef(!1),Le=T.useRef(new Map),nt=T.useRef(new Map),ke=T.useRef(0),me=T.useRef(ve);me.current=ve;const qe=ut(HEn(n)).data??null,[rt,dt]=T.useState("table"),[st,Ut]=T.useState(!1),[Xt,en]=T.useState("project"),an=T.useRef(null),{open:At,setOpen:gn,ref:on}=Ki(an),[Ot,dn]=T.useState(!1),cn=ve.every(Y=>Y.chatSessionId),kn=u&&cn?Xt:"project",Wn=T.useMemo(()=>kn!=="agent"?ve:ve.filter(Y=>Y.chatSessionId===u),[ve,kn,u]),gs=T.useMemo(()=>Wn.filter(Y=>st||!Y.archived),[Wn,st]),ns=T.useMemo(()=>JUn(ve),[ve]),gt=T.useCallback(async(Y,_e,xe)=>{try{await b3n(Y,_e,xe),await tt.invalidateQueries({queryKey:Vv(n).queryKey})}catch(ze){Zt(ze instanceof Error?ze.message:String(ze),"error")}},[n]),ln=T.useCallback(Y=>{gt(Y,kn==="agent"?"taskRegion":"region",!1)},[gt,kn]),bn=T.useMemo(()=>{if(kn!=="agent")return $e;const Y=new Set(Wn.map(_e=>_e.id));return $e.filter(_e=>Y.has(_e.experimentId))},[$e,Wn,kn]),[un,_r]=T.useState([]),[Mn,Qn]=T.useState(!1),[ar,wt]=T.useState(!1),[Ht,vr]=T.useState(!1),[Pn,Qr]=T.useState(!1),[Xn,Yn]=T.useState(null),[Xr,As]=T.useState([]),[Fr,We]=T.useState([]),vt=T.useRef(new Map),fr=T.useRef(new Map),yn=Y=>{let _e=fr.current.get(Y);return _e||(_e=new AUn,fr.current.set(Y,_e)),_e},[Hn,Zn]=T.useState([]),[Fn,Yr]=T.useState([]),[An,wo]=T.useState([]),[ai,Ds]=T.useState([]),[Hr,t_]=T.useState([]),[ko,So]=T.useState(null),[qs,Us]=T.useState("files"),[Wi,Gs]=T.useState(new Set),[cr,Si]=T.useState(!1),[Ct,za]=T.useState(null),[rs,Ks]=T.useState(sB),[_t,Bt]=T.useState(()=>window.innerWidth>=DO),oi=o==="chat"&&!h&&_t,[Ci,Ei]=T.useState(!0),[Or,ci]=T.useState(!1),kc=T.useRef(t6()),Qi=T.useRef(u);Qi.current=u;const ss=T.useRef(un);ss.current=un;const Wa=T.useRef(Hr);Wa.current=Hr;const Ni=T.useRef(null),Yt=T.useCallback(Y=>{const _e=[...Y];Wa.current=_e,t_(_e)},[]),zi=T.useCallback(Y=>{Ni.current=Y,So(Y)},[]),Tl=T.useCallback(Y=>{const _e=Tt(Y);As(Re=>Xp(Re,_e)),We(Re=>Xp(Re,_e)),Zn(Re=>Xp(Re,_e)),Yr(Re=>Xp(Re,_e)),Ds(Re=>Xp(Re,_e));const xe=Aa.current;if(xe&&"path"in Y){const Re=Hs(xe,Qi.current,Y);vt.current.delete(Re),fr.current.delete(Re),j.current.delete(Re),N.current.delete(Re)}const ze=ss.current.filter(Re=>Tt(Re)!==_e);ss.current=ze,_r(ze)},[]),$n=T.useCallback(Y=>{const _e=Tt(Y),xe=[...ss.current.filter(ze=>Tt(ze)!==_e),m1(Y)];ss.current=xe,_r(xe),B(Y)},[B]),dr=T.useCallback((Y,_e,xe)=>{const ze=Tt(Y),Re=Ni.current,Xe=DPn({order:Wa.current,previewKey:Re?Tt(Re):null},ze,_e);Xe.replacedKey&&Re&&typeof Re!="string"&&Tt(Re)===Xe.replacedKey&&Tl(Re),Yt(Xe.order),Xe.previewKey===null?zi(null):Xe.previewKey===ze&&zi(m1(Y));const Ve=[...ss.current.filter(Lt=>Tt(Lt)!==ze),m1(Y)];ss.current=Ve,_r(Ve),I(fl(Y,xe))},[Tl,Yt,zi,I]),Ls=T.useCallback(Y=>{const _e=Ni.current;_e&&Tt(_e)===Tt(Y)&&zi(null)},[zi]);T.useEffect(()=>{let Y=!1;const _e=ze=>{const Re=Ni.current,Xe=ze.target;if(Xe instanceof Element&&Xe.closest("input, textarea, [contenteditable='true']")!==null){Y=!1;return}if(Re&&Tt(Re)===Tt(kc.current.rightTab)&&(ze.metaKey||ze.ctrlKey)&&!ze.altKey&&!ze.shiftKey&&ze.key.toLowerCase()==="k"){ze.preventDefault(),Y=!0;return}if(Y&&ze.key==="Enter"){ze.preventDefault(),Y=!1;const Lt=Ni.current;Lt&&Ls(Lt);return}Y=!1},xe=()=>{Y=!1};return window.addEventListener("keydown",_e),window.addEventListener("blur",xe),window.addEventListener("pointerdown",xe),()=>{window.removeEventListener("keydown",_e),window.removeEventListener("blur",xe),window.removeEventListener("pointerdown",xe)}},[Ls]);const is=T.useCallback((Y,_e)=>{const xe=Tt(Y),ze=Ni.current;ze&&Tt(ze)===xe&&zi(null);const Re=LPn({order:Wa.current,previewKey:ze?Tt(ze):null},xe,ss.current.map(Tt));Yt(Re.order);const Xe=ss.current.filter(Lt=>Tt(Lt)!==xe);if(ss.current=Xe,_r(Xe),!_e)return;const Ve=Re.fallbackKey?Xe.find(Lt=>Tt(Lt)===Re.fallbackKey):void 0;Ve?B(Ve):(G(),Si(!1))},[Yt,zi,B,G]),Vs=V,Xi=T.useMemo(()=>({rightTab:m1(y),tabHistory:un,experimentsTabOpen:Mn,filesTabOpen:ar,artifactsTabOpen:Ht,terminalTabOpen:Pn,expTabs:Xr,fileTabs:Fr,planTabs:Hn,subagentTabs:Fn,sideTabs:An,codeTabs:ai,contentTabOrder:Wa.current,previewTab:Ni.current,filesView:qs,filesToggled:Wi,selectedRunId:f,scope:Xt,panelOpen:h,panelMax:cr,treeViewport:Ct}),[y,un,Mn,ar,Ht,Pn,Xr,Fr,Hn,Fn,An,ai,Hr,ko,qs,Wi,f,Xt,h,cr,Ct]);kc.current=Xi;const Rl=T.useCallback(()=>Object.fromEntries(vt.current),[]),Sc=T.useRef(void 0),Ff=T.useCallback(()=>{clearTimeout(Sc.current),Sc.current=setTimeout(()=>M(Y=>Y+1),200)},[]);T.useEffect(()=>()=>clearTimeout(Sc.current),[]);const Co=T.useCallback((Y,_e,xe)=>{if(_r(Y.tabHistory),ss.current=Y.tabHistory,Qn(Y.experimentsTabOpen),wt(Y.filesTabOpen),vr(Y.artifactsTabOpen),Qr(Y.terminalTabOpen),As(Y.expTabs),We(Y.fileTabs),Zn(Re=>Re===Y.planTabs?Re:Y.planTabs.map(Xe=>{var Ve;return{...Xe,plan:((Ve=Re.find(Lt=>Lt.sessionId===Xe.sessionId&&Lt.promptId===Xe.promptId))==null?void 0:Ve.plan)??""}})),Yr(Y.subagentTabs),wo(Y.sideTabs),Ds(Y.codeTabs),Yt(Y.contentTabOrder),zi(Y.previewTab),Us(Y.filesView),Gs(Y.filesToggled),en(Y.scope),Si(Y.panelMax),za(Y.treeViewport),dn(D.current.activeSessionId===Xd&&Y.fileTabs.some(Re=>z_(Re,{path:bw,source:"artifacts"}))),xe){for(const[Re,Xe]of Object.entries((_e==null?void 0:_e.scroll)??{}))vt.current.set(Re,Xe);Object.assign(A.current,_e==null?void 0:_e.sourceModes)}const ze=D.current;if(ze.projectId)for(const Re of Y.fileTabs){const Xe=Hs(ze.projectId,ze.activeSessionId,Re);j.current.has(Xe)||N.current.add(Xe)}},[Yt,zi]),{ready:as,loaded:n_,error:Yi,retry:Zi,capture:Cc,workspace:Ts}=V8n({projectId:ie&&C!==null&&((a==null?void 0:a.kind)!=="task"||!u||C.includes(u))?n:null,taskKey:u??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",firstDemoOpen:(ie==null?void 0:ie.tourCompleted)===!1,state:Xi,apply:Co,getScroll:Rl,sourceModes:A.current,revision:z}),ja=T.useRef(null);T.useLayoutEffect(()=>{if(!as||!Me||(a==null?void 0:a.kind)!=="task")return;const Y=ja.current;(Y==null?void 0:Y.projectId)===n&&Y.taskId===u&&Y.scope!==kn&&za(null),ja.current={projectId:n,taskId:u,scope:kn}},[as,Me,a==null?void 0:a.kind,n,u,kn]);const Qa=T.useCallback((Y,_e)=>{var Lt;const xe=(_e==null?void 0:_e.projectId)??n;if(!xe)return;const ze=xe===n;Y&&ze&&_e!=null&&_e.replace&&u===null&&(Cc(),G8n(xe,Y));const Re=Lu(eB(xe),Y??"new"),Xe=Re?Re.active:Vo(xe)?(Lt=n6(Y??void 0,se.current===!1))==null?void 0:Lt.active:void 0,Ve=ze&&(_e!=null&&_e.replace)&&Y&&u===null?D.current.pane:Xe;s.navigate({href:iv(xe,Y,Ve),replace:ze&&(_e==null?void 0:_e.replace)})},[s,n,u,Cc]);T.useEffect(()=>{as&&(a==null?void 0:a.kind)!=="task"&&!c.current&&Ts.current.lastTaskId&&(C!=null&&C.includes(Ts.current.lastTaskId))&&(c.current=Ts.current.lastTaskId,M(Y=>Y+1))},[as,a==null?void 0:a.kind,Ts,C]),sX({shouldBlockFn:({next:Y})=>{var _e;return((_e=gf(Y.pathname))==null?void 0:_e.projectId)!==n&&[...fr.current.values()].some(xe=>xe.needsProtection)&&!CM(mz())},enableBeforeUnload:()=>[...fr.current.values()].some(Y=>Y.needsProtection)});const Xa=T.useRef(null);T.useEffect(()=>{const Y=Yb(i.href);!ie||!as||!Y||(ey.queue({lastLocation:Y,railOpen:Ci,panelWidth:rs,experimentsView:rt},Xa.current===Y?250:0),Xa.current=Y)},[i.href,ie,as,Ci,rs,rt]);const Zr=(ie==null?void 0:ie.onboardingCompleted)??!1,[vs,Jn]=T.useState(!1),[Ml,Eo]=T.useState(null),[ap,ji]=T.useState(0),No=T.useCallback(()=>Jn(!0),[]),Ya=T.useCallback(async Y=>{const _e=se.current===!1,xe=await r.mutateAsync({tourCompleted:!0});_e&&vu({name:"demo_welcome_choice",choice:Y}),ue(ze=>ze&&{...ze,tourCompleted:xe.tourCompleted}),Jn(!1),Y==="explore_demo"&&ji(ze=>ze+1)},[]),Za=T.useCallback(async()=>{await Ya("create_project"),ci(!0)},[Ya]);T.useEffect(()=>{!n||!Vo(n)||!Zr||ie!=null&&ie.tourCompleted||No()},[n,Zr,No,ie==null?void 0:ie.tourCompleted]);const _n=(q==null?void 0:q.find(Y=>Y.id===n))??null;T.useEffect(()=>{const Y=oe||ie===null?null:_n==null?void 0:_n.name;document.title=Y?`${_a(Y)} — OpenResearch`:"OpenResearch"},[oe,ie,_n]);const Aa=T.useRef(n);Aa.current=n;const zo=T.useCallback(Y=>{n&&vu({name:"first_action",surface:Vo(n)?"demo":"project",action:Y})},[n]);T.useEffect(()=>{o!=="chat"&&o!=="skills"&&zo("open_settings")},[o,zo]);const Ec=T.useCallback((Y=!1)=>{Y&&(!D.current.isTask||D.current.pane)||(zo("open_experiment"),Qn(!0),I({kind:"home",view:"experiments"},Y))},[I,zo]),Nc=()=>{L.refetch(),re.refetch(),x.refetch()},hr=T.useRef(!1);T.useEffect(()=>{if(!ie||hr.current)return;hr.current=!0,ce.current=ie.preferredAgent;const Y=JS()??ie.workspace;Y&&(Ei(Y.railOpen),Ks(Math.min(Y.panelWidth,Fd())),dt(Y.experimentsView))},[ie]),T.useEffect(()=>{C&&c.current&&!C.includes(c.current)&&(c.current=null)},[C]);const r_=T.useRef(Promise.resolve()),bs=T.useRef(0),li=T.useCallback(Y=>{const _e=++bs.current;ue(ze=>ze&&{...ze,preferredAgent:Y});const xe=r_.current.then(()=>r.mutateAsync({preferredAgent:Y})).then(ze=>{ce.current=ze.preferredAgent,_e===bs.current&&ue(Re=>Re&&{...Re,preferredAgent:ze.preferredAgent})}).catch(ze=>{throw _e===bs.current&&ue(Re=>Re&&{...Re,preferredAgent:ce.current}),ze});return r_.current=xe.catch(()=>{}),xe},[]),Ji=T.useRef(Promise.resolve()),Ol=T.useRef(0),Hf=T.useCallback(Y=>{const _e=++Ol.current;ue(xe=>xe&&{...xe,preferredAutonomy:Y}),Ji.current=Ji.current.then(()=>r.mutateAsync({preferredAutonomy:Y})).catch(()=>{_e===Ol.current&&re.refetch()})},[]);T.useEffect(()=>{const Y=()=>{Ks(_e=>Math.min(_e,Fd())),Bt(window.innerWidth>=DO)};return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)},[]);const Ai=T.useCallback(Y=>{Pt.current=!1,Le.current.clear(),nt.current.clear();const _e=++ke.current;tt.fetchQuery(Tu(Y)).then(xe=>{if(Aa.current!==Y||jt.current!==Y||ke.current!==_e)return;Le.current=new Map(xe.map(Re=>[Re.id,Re]));const ze=[...nt.current.values()].some(Re=>{const Xe=Le.current.get(Re.id);return!Xe||Xe.status!=="running"&&Xe.updatedAt<=Re.updatedAt});nt.current.clear();for(const Re of xe){const Xe=ot.current.get(Re.id);(!Xe||Xe.updatedAt{var Xe;return xe.some(Ve=>Ve.id===Re&&Ve.status==="running")?Re:((Xe=xe.find(Ve=>Ve.status==="running"))==null?void 0:Xe.id)??null}),ze&&Ec(!0)}).catch(()=>{ke.current===_e&&(nt.current.clear(),Ye(!0))})},[Ec]);T.useEffect(()=>{if(n)return jt.current=n,ot.current.clear(),Mt.current.clear(),m3n(n).catch(()=>{}),Ai(n),()=>{ke.current++}},[Ai,n]);const qf=T.useCallback(()=>{vr(!0),$n("artifacts")},[$n]),Uf=T.useCallback(()=>{Qr(!0),$n("terminal")},[$n]),Ja=u??(n?`project:${n}`:null);T.useEffect(()=>{Yn(h?y==="terminal"?Ja:Y=>Y===Ja?Y:null:null)},[h,y,Ja]),gSn({onReconnect:()=>{const Y=Aa.current;Y&&(jt.current=Y,ot.current.clear(),Mt.current.clear(),Ai(Y))},onRun:Y=>{if(Y.projectId!==Aa.current||Y.projectId!==jt.current)return;const _e=ot.current.get(Y.id),xe=Mt.current.has(Y.id);if(_e&&_e.updatedAt>Y.updatedAt||(ot.current.set(Y.id,Y),Mt.current.add(Y.id),Vo(Y.projectId)&&Eo(Xe=>Y.status==="running"?Xe??Y.id:Xe===Y.id?null:Xe),Y.status!=="running"||(_e==null?void 0:_e.status)==="running"))return;const ze=Le.current.get(Y.id),Re=Pt.current&&(!ze||ze.status!=="running"&&ze.updatedAt<=Y.updatedAt);xe&&_e||Re?Ec(!0):Pt.current||nt.current.set(Y.id,Y)}});const Gf=T.useCallback(()=>en("project"),[]),Ws=T.useCallback((Y,_e="overview",xe="preview",ze)=>{zo("open_experiment");const Re={id:Y,view:_e};As(Xe=>Xe.some(Ve=>Nw(Ve,Re))?Xe:[...Xe,Re]),_e==="terminal"&&Vo(Aa.current)&&Ks(Xe=>Math.max(Xe,cA())),dr(Re,xe,ze)},[dr]),s_=T.useCallback((Y,_e="preview")=>{const xe=yt.current.filter(Re=>Re.id===Y||Re.id.startsWith(Y)),ze=xe.length===1?xe[0]:null;ze&&Ws(ze.experimentId,"terminal",_e,ze.id)},[Ws]),Kf=T.useMemo(()=>new Map(ve.map(Y=>{var _e;return[Y.id,((_e=Y.title)==null?void 0:_e.trim())||Y.slug||rl()]})),[ve,Z]),ea=IO(Kf),Dl=T.useMemo(()=>{const Y=new Map;for(const _e of $e)Y.set(_e.id,ea.get(_e.experimentId)??rl());return Y},[ea,$e,Z]),i_=IO(Dl),zc=T.useCallback(Y=>{const _e=i_.get(Y);if(_e)return _e;const xe=[...i_].filter(([ze])=>ze.startsWith(Y));return xe.length===1?xe[0][1]:""},[i_]),Ll=T.useCallback(Y=>{const _e=ea.get(Y);if(_e)return _e;const xe=[...ea].filter(([ze])=>ze.startsWith(Y));return xe.length===1?xe[0][1]:""},[ea]),jc=T.useCallback((Y,_e="preview")=>{const xe=me.current.filter(ze=>ze.id===Y||ze.id.startsWith(Y));xe.length===1&&Ws(xe[0].id,"overview",_e)},[Ws]),a_=T.useCallback(Y=>{const _e=Xr.findIndex(xe=>Nw(xe,Y));_e!==-1&&(As(xe=>xe.filter((ze,Re)=>Re!==_e)),is(Y,Tt(y)===Tt(Y)))},[Xr,is,y]),jo=T.useCallback((Y,_e="preview")=>{Y.line!=null&&k(Re=>Re+1);const xe=Aa.current;if(xe){const Re=Hs(xe,Qi.current,Y);kc.current.fileTabs.some(Xe=>z_(Xe,Y))||N.current.delete(Re),j.current.add(Re)}const ze=Z$(Y);We(Re=>{const Xe=Re.findIndex(Lt=>z_(Lt,Y));if(Xe===-1)return[...Re,ze];const Ve=Re.slice();return Ve[Xe]=ze,Ve}),dr(Y,_e)},[dr]),eo=T.useCallback((Y,_e,xe,ze,Re,Xe)=>{const Ve=q==null?void 0:q.find(Jr=>Jr.id===n),Lt=RZn(Y,Ve==null?void 0:Ve.repoPath,_e,(Ve==null?void 0:Ve.artifactsDir)??(Ve==null?void 0:Ve.filesDir),Ve==null?void 0:Ve.slug);if(!Lt)return null;const Un=Re?me.current.find(Jr=>Jr.id===Re||Re.length>=6&&Jr.id.startsWith(Re)):void 0,ws=xe??(Un==null?void 0:Un.branchName),Rs=Lt.source==null||Lt.source==="repo";return ws&&Rs&&(Lt.ref=ws),Xe&&!Lt.ref&&Rs&&(Lt.branchLabel=Xe),ze!=null&&(Lt.line=ze),Lt},[q,n]),Ao=T.useCallback((Y,_e,xe,ze,Re,Xe,Ve="preview")=>{const Lt=eo(Y,_e,xe,ze,Re,Xe);Lt&&jo(Lt,Ve)},[jo,eo]),To=T.useCallback(Y=>jo({path:Y,source:"artifacts"},"keepOpen"),[jo]),Ac=T.useCallback((Y,_e,xe,ze,Re,Xe="preview")=>{const Ve=eo(Y,_e,Re,xe,ze);Ve&&jo(Ve,Xe)},[jo,eo]),Vf=T.useMemo(()=>({projectId:n??"",remote:e.kind==="ssh",resolve:(Y,_e,xe)=>{const ze=(_e==null?void 0:_e.source)==="artifacts"?`artifacts/${Y}`:Y,Re=eo(ze,_e?_e.sessionId:u??void 0,_e==null?void 0:_e.ref,void 0,xe);return Re?{path:Re.path,source:Re.source??"repo",sessionId:Re.sessionId,ref:Re.ref}:null}}),[n,e.kind,eo,u]),Sr=T.useCallback((Y,_e)=>{Ls(Y),_e()},[Ls]),Wf=T.useCallback(Y=>{var ze;const _e=Fr.findIndex(Re=>z_(Re,Y));if(_e===-1)return;const xe=n?Hs(n,u,Y):null;xe&&((ze=fr.current.get(xe))!=null&&ze.needsProtection)&&!CM(mz())||(We(Re=>Re.filter((Xe,Ve)=>Ve!==_e)),xe&&(vt.current.delete(xe),fr.current.delete(xe),j.current.delete(xe),N.current.delete(xe),delete A.current[xe]),u===Xd&&z_(Y,{path:bw,source:"artifacts"})&&dn(!1),is(Y,Tt(y)===Tt(Y)))},[u,Fr,is,n,y]),o_=T.useCallback(Y=>{Y.lineScrollRequest!==void 0&&m(Y.lineScrollRequest)},[]),Tc=T.useCallback((Y,_e,xe,ze="preview")=>{const Re={kind:"plan",sessionId:_e,promptId:xe,plan:Y};Zn(Xe=>{const Ve=Xe.findIndex(Un=>Un.promptId===xe);if(Ve===-1)return[...Xe,Re];const Lt=Xe.slice();return Lt[Ve]=Re,Lt}),dr(Re,ze)},[dr]),Ro=T.useCallback(Y=>{const _e=Hn.findIndex(xe=>xe.promptId===Y.promptId);_e!==-1&&(Zn(xe=>xe.filter((ze,Re)=>Re!==_e)),is(Y,Tt(y)===Tt(Y)))},[is,Hn,y]),Il=T.useCallback((Y,_e,xe,ze="preview")=>{const Re={kind:"subagent",sessionId:Y,spawnPartId:_e,label:xe};Yr(Xe=>Xe.some(Ve=>Ve.spawnPartId===_e)?Xe:[...Xe,Re]),dr(Re,ze)},[dr]),Qf=T.useCallback(Y=>{const _e=Fn.findIndex(xe=>xe.spawnPartId===Y.spawnPartId);_e!==-1&&(Yr(xe=>xe.filter((ze,Re)=>Re!==_e)),is(Y,Tt(y)===Tt(Y)))},[is,y,Fn]),Xf=T.useCallback(Y=>{const _e={kind:"side",sessionId:Y};wo(xe=>xe.some(ze=>ze.sessionId===Y)?xe:[...xe,_e]),Ks(xe=>Math.max(xe,cA())),dr(_e,"keepOpen")},[dr]),Mo=T.useCallback(Y=>{An.some(_e=>_e.sessionId===Y.sessionId)&&(wo(_e=>_e.filter(xe=>xe.sessionId!==Y.sessionId)),is(Y,Tt(y)===Tt(Y)))},[is,y,An]);T.useEffect(()=>{const Y=x.data;if(Y)for(const _e of An)Y.some(xe=>xe.id===_e.sessionId)||Mo(_e)},[x.data,An,Mo]);const $l=T.useCallback(async(Y,_e)=>{let xe;try{xe=await dkn(Y)}catch(ze){Zt(ccn({error:W1(ze)}),"error");return}if(D.current.activeSessionId!==Y){Q3(xe.id).catch(ze=>{Zt(gj({error:W1(ze)}),"error")});return}if(Vr(Gi(xe.projectId).queryKey,ze=>ze&&[xe,...ze.filter(Re=>Re.id!==xe.id)]),Xf(xe.id),!!_e)try{await tt.fetchQuery(ac(xe.id)),await X3(xe.id,_e)}catch(ze){Zt(W1(ze),"error")}},[Xf]),Oo=T.useCallback(Y=>{Mo(Y),Q3(Y.sessionId).catch(_e=>{Zt(gj({error:W1(_e)}),"error")})},[Mo]),[Do,c_]=T.useState({});T.useEffect(()=>{if(c_(Ve=>{const Lt=new Set(Fn.map(Un=>Un.spawnPartId));return Object.keys(Ve).every(Un=>Lt.has(Un))?Ve:Object.fromEntries(Object.entries(Ve).filter(([Un])=>Lt.has(Un)))}),Fn.length===0)return;let Y=!0;const _e=new Set,xe=(Ve,Lt,Un)=>{c_(ws=>{var Jr;let Rs=ws;for(const ta of Lt)if(!(Un&&_e.has(ta.spawnPartId)))for(const Cn of Ve){const os=bb(Cn.parts,ta.spawnPartId);if(!os)continue;Un||_e.add(ta.spawnPartId);const na={label:mqn(os),running:((Jr=os.state)==null?void 0:Jr.status)==="running"},On=Rs[ta.spawnPartId];(!On||On.label!==na.label||On.running!==na.running)&&(Rs===ws&&(Rs={...ws}),Rs[ta.spawnPartId]=na);break}return Rs})};let ze=0;const Re=()=>{const Ve=++ze;for(const Lt of new Set(Fn.map(Un=>Un.sessionId)))tt.fetchQuery({...ac(Lt),staleTime:0}).then(({messages:Un})=>{Y&&Ve===ze&&xe(Un,Fn.filter(ws=>ws.sessionId===Lt),!0)}).catch(()=>{})};Re();const Xe=Gv(Ve=>{if(Ve.type==="reconnected"){_e.clear(),Re();return}if(Ve.type!=="message")return;const Lt=Fn.filter(Un=>Un.sessionId===Ve.sessionId);Lt.length&&xe([Ve.message],Lt,!1)});return()=>{Y=!1,Xe()}},[Fn]);const Ta=T.useCallback((Y,_e,xe="files",ze="preview")=>{const Re={code:!0,experimentId:Y,branch:_e,view:xe,toggled:new Set};Ds(Xe=>Xe.some(Ve=>Cd(Ve,Re))?Xe.map(Ve=>Cd(Ve,Re)?{...Ve,experimentId:Y,view:xe}:Ve):[...Xe,Re]),dr(Re,ze)},[dr]),l_=T.useCallback((Y,_e)=>{Ds(xe=>xe.map(ze=>Cd(ze,Y)?{...ze,..._e}:ze)),_e.view&&I(fl({...Y,..._e}))},[]),Yf=T.useCallback(Y=>{const _e=ai.findIndex(xe=>Cd(xe,Y));_e!==-1&&(Ds(xe=>xe.filter((ze,Re)=>Re!==_e)),is(Y,Tt(y)===Tt(Y)))},[ai,is,y]),Bl=T.useCallback(()=>{wt(!0),$n("files")},[$n]),Ti=T.useCallback(Y=>{Y==="experiments"?Qn(!1):Y==="files"?wt(!1):Y==="terminal"?(Qr(!1),Yn(null)):vr(!1),is(Y,y===Y)},[is,y]),u_=Y=>{Y.preventDefault(),Y.currentTarget.setPointerCapture(Y.pointerId);const xe=document.body.style.userSelect;document.body.style.userSelect="none";const ze=cr,Re=Y.clientX,Xe=rs;let Ve=!1;function Lt(){window.removeEventListener("pointermove",Un),window.removeEventListener("pointerup",Lt),window.removeEventListener("pointercancel",Lt),document.body.style.userSelect=xe}function Un(ws){if(ze){const Cn=ws.clientX-Re;if(Ve||CnJr+DZn){Si(!0);return}Si(!1);const ta=Math.min(Math.max(Rs,Yv),Jr);Ks(ta)}window.addEventListener("pointermove",Un),window.addEventListener("pointerup",Lt),window.addEventListener("pointercancel",Lt)},__=(Y,_e)=>{P(xe=>xe?LO(xe,Y):[Y]),s.navigate({href:`/projects/${encodeURIComponent(Y.id)}${_e?"/settings/git":""}`}),_e&&Zt(_e,"error")},Is=typeof y=="object"&&"id"in y?y:null,er=typeof y=="object"&&"path"in y?y:null,Lo=(er==null?void 0:er.source)==="artifacts"&&qe?rh(qe.entries,er.path):null,op=Lo?`${Lo.modifiedAt}:${Lo.size}`:null,Rc=u===Xd&&Ot?Fr.find(Y=>z_(Y,{path:bw,source:"artifacts"})):void 0,cp=Rc?[Rc]:[],qn=typeof y=="object"&&"kind"in y&&y.kind==="plan"?y:null,ui=qn==null?void 0:qn.sessionId,to=qn==null?void 0:qn.promptId,Pl=!!(ui&&to&&(C!=null&&C.includes(ui))),Mc=ut({...ac(ui??""),enabled:Pl,subscribed:Pl}),Io=T.useMemo(()=>{var _e;if(!ui||!to||!Mc.data)return null;const Y=Mc.data.messages.flatMap(xe=>{const ze=bb(xe.parts,to);return ze?[ze]:[]})[0];return{key:`${ui}:${to}`,text:((_e=Y==null?void 0:Y.prompt)==null?void 0:_e.plan)??null}},[ui,to,Mc.data]),ys=typeof y=="object"&&"kind"in y&&y.kind==="subagent"?y:null,xs=typeof y=="object"&&"kind"in y&&y.kind==="side"?y:null,te=xs?(f_=x.data)==null?void 0:f_.find(Y=>Y.id===xs.sessionId):void 0,ge=typeof y=="object"&&"code"in y?y:null,Se=ge?ai.find(Y=>Cd(Y,ge))??null:null,Oe=new Map;for(const Y of[...Xr,...Fr,...Hn,...Fn,...An,...ai])Oe.set(Tt(Y),Y);const Pe=Rc?Tt(Rc):null,Et=Hr.filter(Y=>Y!==Pe).map(Y=>Oe.get(Y)).filter(H8n),qt=Y=>ko!==null&&Tt(ko)===Tt(Y),xn=Y=>_.jsx(Go,{active:er!==null&&z_(er,Y),label:Y.path.split("/").pop()||Y.path,icon:_.jsx(O$,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>Wf(Y)},`file:${e6(Y)}`),rn=Is?ve.find(Y=>Y.id===Is.id)??null:null,or=Se?ve.find(Y=>Y.id===Se.experimentId&&Y.branchName===Se.branch)??null:null,Oc=Y=>{var xe,ze,Re,Xe;if("path"in Y)return xn(Y);if("id"in Y){const Ve=ve.find(Lt=>Lt.id===Y.id);return _.jsx(Go,{active:Is!==null&&Nw(Is,Y),label:Ve?Ve.title||Ve.slug:"…",icon:Y.view==="overview"?_.jsx(jCn,{size:12,className:"shrink-0"}):_.jsx(bo,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>a_(Y)},Tt(Y))}if("kind"in Y&&Y.kind==="plan")return _.jsx(Go,{active:qn!==null&&qn.promptId===Y.promptId,label:pL(),icon:_.jsx(VS,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>Ro(Y)},Tt(Y));if("kind"in Y&&Y.kind==="side"){const Ve=(xe=x.data)==null?void 0:xe.find(Lt=>Lt.id===Y.sessionId);return _.jsx(Go,{active:xs!==null&&xs.sessionId===Y.sessionId,label:((ze=Ve==null?void 0:Ve.title)==null?void 0:ze.trim())||H3(),shimmer:(Ve==null?void 0:Ve.busy)??!1,icon:_.jsx(P0,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>Oo(Y)},Tt(Y))}if("kind"in Y)return _.jsx(Go,{active:ys!==null&&ys.spawnPartId===Y.spawnPartId,label:((Re=Do[Y.spawnPartId])==null?void 0:Re.label)??Y.label??zfe(),shimmer:((Xe=Do[Y.spawnPartId])==null?void 0:Xe.running)??!1,icon:_.jsx(XS,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>Qf(Y)},Tt(Y));const _e=ve.find(Ve=>Ve.id===Y.experimentId);return _.jsx(Go,{active:Se!==null&&Cd(Se,Y),label:(_e==null?void 0:_e.slug)??Y.branch,icon:_.jsx(Pu,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>Ls(Y),onClose:()=>Yf(Y)},Tt(Y))};if(!a||a.kind==="resume")return null;if(oe)return _.jsxs("div",{className:"app flex flex-col h-full",children:[_.jsxs("div",{className:c0,children:[_.jsx("p",{children:oe}),_.jsx(Ie,{variant:"primary",onClick:Nc,children:ni()})]}),e.kind==="ssh"&&_.jsx(g5,{runtime:e,corner:!0})]});if(q&&!_n)return _.jsxs("div",{className:c0,children:[fo(),_.jsx(Ie,{onClick:()=>Q(null),children:v0()})]});if(Yi&&!as)return _.jsxs("div",{className:c0,children:[_.jsx("p",{role:"alert",children:Yi}),_.jsx(Ie,{onClick:Zi,children:ni()})]});if(q===null||ie===null||!n_||C===null)return _.jsxs("div",{className:"app flex flex-col h-full",children:[_.jsx("div",{className:c0,children:_.jsx(St,{})}),e.kind==="ssh"&&_.jsx(g5,{runtime:e,corner:!0})]});if(!_n||(a==null?void 0:a.kind)==="task"&&u&&!(C!=null&&C.includes(u)))return _.jsxs("div",{className:c0,children:[fo(),_.jsx(Ie,{onClick:()=>Q(null),children:v0()})]});const Zf=_.jsx(ZUn,{projectName:((d_=q.find(Y=>Y.id===n))==null?void 0:d_.name)??"",onHome:()=>void s.navigate({to:"/projects"}),onNewProject:()=>ci(!0),onRepository:()=>Vs("git"),onCollapse:()=>Ei(!1)});return _.jsx(VB,{value:Vf,children:_.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&_.jsx(cB,{}),e.kind==="local"&&_.jsx(BB,{status:J}),Yi&&_.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:Yi}),_.jsx(Ie,{onClick:Zi,children:ni()})]}),_.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${oi?"workspace-card-visible":""}`,children:[n&&_.jsx(hM,{projectId:n,projectName:(_n==null?void 0:_n.name)??"",railHeader:Zf,railOpen:Ci,onShowRail:()=>Ei(!0),mainView:o,onSelectMainView:Vs,onOpenFile:Ac,onOpenRun:s_,runExperimentName:zc,onOpenExperiment:jc,experimentName:Ll,onOpenPlan:Tc,onOpenSubagent:Il,onOpenSideChat:(Y,_e)=>void $l(Y,_e),composerFocusNonce:ap,demoRunningRunId:Ml,runtime:e,onOpenDemoWelcome:_n&&Vo(_n.id)?No:void 0,activeSessionId:u,onActiveSessionChange:Qa,preferredAgent:ie.preferredAgent,onPreferredAgentChange:li,preferredAutonomy:ie.preferredAutonomy??G3,onPreferredAutonomyChange:Hf,children:o==="skills"?_.jsx(yUn,{}):o!=="chat"?_.jsx(UFn,{remote:e.kind==="ssh",tab:o,project:_n,onProjectUpdate:Y=>{P(_e=>_e?LO(_e,Y):[Y])},onSelectTab:Vs}):null}),o==="chat"&&_.jsx(pAn,{expanded:oi,experiments:ve,runs:$e,onOpenExperiment:(Y,_e)=>Ws(Y,"overview","preview",_e),rightOffset:h?rs+28:void 0,activeView:h&&(y==="files"||y==="artifacts"||y==="experiments"||y==="terminal")?y:null,projectId:_n.id,onCompute:()=>Vs("compute"),sessionId:u,busy:((Ri=x.data)==null?void 0:Ri.some(Y=>Y.id===u&&Y.busy))??!1,onChanges:()=>{Us("changes"),Bl()},onFiles:()=>{Us("files"),Bl()},onTerminal:Uf,onArtifacts:qf,onExperiments:()=>Ec(),onSideChat:u?()=>void $l(u,""):void 0}),o==="chat"&&h&&_.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 ${cr?"max":""}`,style:cr?void 0:{width:rs},"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 ${cr?"cursor-e-resize":"cursor-col-resize"}`,title:cr?gue():uue(),onPointerDown:u_}),_.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:[cp.map(xn),ar&&_.jsx(Go,{active:y==="files",label:z3(),icon:_.jsx(Pu,{size:12,className:"shrink-0"}),onSelect:()=>$n("files"),onClose:()=>Ti("files")}),Pn&&_.jsx(Go,{active:y==="terminal",label:Fv(),icon:_.jsx(bo,{size:12,className:"shrink-0"}),onSelect:()=>$n("terminal"),onClose:()=>Ti("terminal")}),Ht&&_.jsx(Go,{active:y==="artifacts",label:aL(),icon:_.jsx(GS,{size:12,className:"shrink-0"}),onSelect:()=>$n("artifacts"),onClose:()=>Ti("artifacts")}),Mn&&_.jsx(Go,{active:y==="experiments",label:oL(),icon:_.jsx(Ah,{size:12,className:"shrink-0"}),onSelect:()=>$n("experiments"),onClose:()=>Ti("experiments")}),Et.map(Oc)]}),_.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[_.jsx(It,{title:cr?NN():EN(),"aria-label":cr?NN():EN(),onClick:()=>Si(Y=>!Y),children:cr?_.jsx(D7n,{size:14}):_.jsx(T7n,{size:14})}),_.jsx(It,{title:I0(),"aria-label":I0(),onClick:()=>{G(),Si(!1)},children:_.jsx(xr,{size:14})})]})]}),y==="terminal"&&Pn?null:!as||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!Me||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!Fe?_.jsx(la,{children:_.jsx(St,{})}):Is&&(!rn||f&&!$e.some(Y=>Y.id===f&&Y.experimentId===Is.id))||ge&&!or||t&&"sessionId"in t&&t.sessionId&&!(C!=null&&C.includes(t.sessionId))?_.jsx(la,{children:_.jsx("div",{className:"p-6 text-subtext",children:fo()})}):y==="artifacts"?_.jsx(la,{children:_n&&_.jsx(_Un,{project:_n,artifacts:qe,remote:e.kind==="ssh",onOpenFile:To,canRenameFile:Y=>{var _e;return!((_e=fr.current.get(Hs(_n.id,u,{path:Y,source:"artifacts"})))!=null&&_e.needsProtection)}},_n.id)}):y==="experiments"?_.jsxs(la,{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:on,children:[_.jsx(It,{size:"small",ref:an,className:"experiment-scope-trigger",active:kn==="agent",title:Lue({scope:kn==="agent"?SN():CN()}),"aria-label":c_e(),"aria-expanded":At,onClick:()=>gn(Y=>!Y),children:_.jsx(_7n,{size:16,strokeWidth:2.5})}),At&&_.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(vn,{"aria-pressed":kn==="agent",disabled:!u||!cn,title:u?cn?void 0:p_e():j_e(),onClick:()=>{en("agent"),gn(!1)},children:[_.jsx("span",{children:SN()}),kn==="agent"&&_.jsx(bi,{size:13})]}),_.jsxs(vn,{"aria-pressed":kn==="project",onClick:()=>{en("project"),gn(!1)},children:[_.jsx("span",{children:CN()}),kn==="project"&&_.jsx(bi,{size:13})]}),_.jsx("div",{className:"my-1 border-t border-border-variant"}),_.jsxs(vn,{"aria-pressed":st,onClick:()=>{Ut(Y=>!Y),gn(!1)},children:[_.jsx("span",{children:hfe()}),st&&_.jsx(bi,{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:rt==="table"?"active":"","aria-pressed":rt==="table",onClick:()=>dt("table"),children:Dfe()}),_.jsx("button",{className:rt==="tree"?"active":"","aria-pressed":rt==="tree",onClick:()=>dt("tree"),children:Hfe()})]})]})]}),_.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:rt==="tree"?_n&&_.jsx(AZn,{experiments:ve,archiveActions:ns,showArchived:st,runs:bn,project:_n,onOpenView:Ws,onOpenCode:Ta,onArchive:gt,agentSessionId:kn==="agent"?u:null,onShowProjectScope:Gf,onRestoreRegion:ln,viewport:Ct,onViewportChange:za}):_.jsx(eGn,{archiveActions:ns,runs:bn,emptyHint:!st&&Wn.length>0&&gs.length===0?Ign():kn==="agent"&&ve.length>0?w_e():void 0,experiments:gs,onOpen:(Y,_e)=>{Ws(Y.id,"overview",_e)},onOpenLogs:(Y,_e,xe)=>{Ws(Y,"terminal",xe,_e)},onOpenCode:(Y,_e)=>{const xe=ve.find(ze=>ze.id===Y);xe&&Ta(xe.id,xe.branchName,"files",_e)},onArchive:gt,onCancel:OI})})]}):y==="files"?_.jsx(la,{children:_n?_.jsx(Wqn,{sessionId:u??void 0,project:_n,view:qs,toggled:Wi,onViewChange:Us,onToggledChange:Gs,canRenameFile:Y=>{var _e;return!((_e=fr.current.get(Hs(_n.id,u,{path:Y,source:"repo",sessionId:u??void 0})))!=null&&_e.needsProtection)},onOpenFile:(Y,_e,xe,ze)=>Ao(Y,_e,xe,void 0,void 0,void 0,ze)},`files:${u??`project:${_n.id}`}`):_.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:_.jsx(nh,{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(D$,{size:22}),_.jsx("p",{children:efe()})]})})})}):er?_.jsx(la,{children:n&&_.jsx(YUn,{remote:e.kind==="ssh",restored:N.current.has(Hs(n,u,er)),onRestoreActivated:()=>{const Y=Hs(n,u,er);N.current.delete(Y),j.current.add(Y)},showSource:A.current[Hs(n,u,er)]??!1,onShowSourceChange:Y=>{A.current[Hs(n,u,er)]=Y,M(_e=>_e+1)},projectId:n,path:er.path,source:er.source,sessionId:er.source==="artifacts"?u??void 0:er.sessionId,gitRef:er.ref,line:er.line,branchLabel:MZn(er,_n==null?void 0:_n.baselineBranch),artifactVersion:op,artifactEntries:er.source==="artifacts"?qe==null?void 0:qe.entries:void 0,bufferSession:yn(Hs(n,u,er)),onOpenFile:(Y,_e,xe,ze)=>Sr(er,()=>Ao(Y,_e,xe,void 0,void 0,void 0,ze)),scrollPosition:vt.current.get(Hs(n,u,er)),onScrollPositionChange:Y=>{vt.current.set(Hs(n,u,er),Y),Ff()},lineScrollRequest:er.lineScrollRequest,onLineScrollRequestHandled:()=>o_(er),onEdit:()=>Ls(er)},Hs(n,u,er))}):qn?_.jsx(la,{children:_.jsx(uy,{value:{sessionId:qn.sessionId},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:(Io==null?void 0:Io.key)===`${qn.sessionId}:${qn.promptId}`?Io.text??fo():((Dc=Hn.find(Y=>Y.promptId===qn.promptId))==null?void 0:Dc.plan)||cL(),onOpenFile:(Y,_e,xe,ze,Re)=>Sr(qn,()=>Ao(Y,qn.sessionId,ze,_e,xe,void 0,Re))})})})}):xs&&n?_.jsx(la,{children:te?_.jsx("div",{className:"flex min-h-0 flex-1",children:_.jsx(hM,{embedded:!0,projectId:n,projectName:(_n==null?void 0:_n.name)??"",railOpen:!1,onShowRail:()=>Ei(!0),mainView:"chat",onSelectMainView:Vs,onOpenFile:(Y,_e,xe,ze,Re,Xe)=>Sr(xs,()=>Ac(Y,_e,xe,ze,Re,Xe)),onOpenRun:(Y,_e)=>Sr(xs,()=>s_(Y,_e)),runExperimentName:zc,onOpenExperiment:(Y,_e)=>Sr(xs,()=>jc(Y,_e)),experimentName:Ll,onOpenPlan:(Y,_e,xe,ze)=>Sr(xs,()=>Tc(Y,_e,xe,ze)),onOpenSubagent:(Y,_e,xe,ze)=>Sr(xs,()=>Il(Y,_e,xe,ze)),runtime:e,activeSessionId:xs.sessionId,onOpenSideChat:(Y,_e)=>void $l(Y,_e),onActiveSessionChange:(Y,_e)=>{var ze;const xe=!((ze=tt.getQueryData(Gi(n).queryKey))!=null&&ze.some(Re=>Re.id===xs.sessionId));Y===null&&xe?Mo(xs):Qa(Y,_e)},preferredAgent:ie.preferredAgent,onPreferredAgentChange:li,preferredAutonomy:ie.preferredAutonomy??G3,onPreferredAutonomyChange:Hf},xs.sessionId)}):_.jsx("div",{className:"p-6 text-sm text-muted",children:SI()})}):ys?_.jsx(Mqn,{projectId:n,sessionId:ys.sessionId,spawnPartId:ys.spawnPartId,onOpenFile:(Y,_e,xe,ze,Re)=>Sr(ys,()=>Ac(Y,ys.sessionId,_e,xe,ze,Re)),onOpenRun:(Y,_e)=>Sr(ys,()=>s_(Y,_e)),runExperimentName:zc,onOpenExperiment:(Y,_e)=>Sr(ys,()=>jc(Y,_e)),experimentName:Ll,onOpenSubagent:(Y,_e,xe)=>Sr(ys,()=>Il(ys.sessionId,Y,_e,xe))},ys.spawnPartId):Se?_.jsx(la,{children:n&&_n&&Se&&or&&_.jsx(Vqn,{projectId:n,project:_n,experiment:or,view:Se.view,toggled:Se.toggled,onViewChange:Y=>l_(Se,{view:Y}),onToggledChange:Y=>l_(Se,{toggled:Y}),onOpenFile:(Y,_e,xe,ze)=>Sr(Se,()=>Ao(Y,_e,xe,void 0,void 0,or.branchName,ze))},`code:${Se.branch}`)}):_.jsx(la,{children:Is&&rn&&_n&&_.jsx(CUn,{experiment:rn,project:_n,view:Is.view,runs:$e,selectedRunId:f,onSelectRun:U,parentExperiment:ve.find(Y=>Y.id===rn.parentExperimentId)??null,onOpenView:(Y,_e,xe)=>{Sr(Is,()=>Ws(rn.id,Y,xe,_e))},onOpenCode:(Y,_e)=>Sr(Is,()=>Ta(rn.id,rn.branchName,Y,_e))},`${Is.id}:${Is.view}`)}),Pn&&Xn!==null&&Xn===Ja&&_n&&_.jsx(la,{className:y==="terminal"?void 0:"hidden",children:_.jsx(gAn,{projectId:_n.id,sessionId:u,active:y==="terminal"},Ja)})]})]}),Or&&_.jsx(oB,{remote:e.kind==="ssh",onClose:()=>ci(!1),onCreated:(Y,_e)=>{ci(!1),__(Y,_e)}}),vs&&_n&&Vo(_n.id)&&_.jsx(tGn,{onClose:Ya,onCreateProject:Za})]})})}const Vk=hc()({validateSearch:e=>({pane:YS(e.pane)}),beforeLoad:({location:e})=>{if(!gf(e.pathname))throw TW()},component:$Zn});function $Zn(){const{projectId:e}=Vk.useParams(),{pane:n}=Vk.useSearch(),t=xi(),r=QD({select:s=>s.location});return T.useEffect(()=>{const s=BZn(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),_.jsxs(_.Fragment,{children:[_.jsx(O0,{}),_.jsx(IZn,{projectId:e,pane:n,runtime:tB()},e)]})}function BZn(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&YS(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const QG=hc()({component:PZn});function PZn(){const{projectId:e}=QG.useParams();return _.jsx(DEn,{projectId:e})}const FZn=hc()({}),HZn=hc()({}),qZn=hc()({}),UZn=hc()({}),GZn=IEn.update({id:"/",path:"/",getParentRoute:()=>ty}),m7=$En.update({id:"/projects",path:"/projects",getParentRoute:()=>ty}),KZn=BEn.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>ty}),VZn=PEn.update({id:"/",path:"/",getParentRoute:()=>m7}),ip=Vk.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>m7}),WZn=QG.update({id:"/",path:"/",getParentRoute:()=>ip}),QZn=FZn.update({id:"/skills",path:"/skills",getParentRoute:()=>ip}),XZn=HZn.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>ip}),YZn=qZn.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>ip}),ZZn=UZn.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>ip}),JZn={ProjectsProjectIdSkillsRoute:QZn,ProjectsProjectIdIndexRoute:WZn,ProjectsProjectIdSettingsTabRoute:XZn,ProjectsProjectIdTasksSessionIdRoute:YZn,ProjectsProjectIdTasksNewRoute:ZZn},eJn=ip._addFileChildren(JZn),tJn={ProjectsProjectIdRoute:eJn,ProjectsIndexRoute:VZn},nJn=m7._addFileChildren(tJn),rJn={IndexRoute:GZn,ProjectsRoute:nJn,RemoteLaunchRoute:KZn},sJn=ty._addFileChildren(rJn)._addFileTypes(),iJn=JQ({routeTree:sJn,context:{queryClient:tt},trailingSlash:"never",defaultPendingComponent:$6,defaultErrorComponent:B6,defaultNotFoundComponent:MEn}),Q1={minimize:"",maximize:"",restore:"",close:""};function aJn(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 Y4(e){return n=>{n.button===0&&(n.preventDefault(),XG(`resize:${e}`))}}function Z4({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 oJn(){const e=T.useSyncExternalStore(aJn,()=>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:Y4("n")}),_.jsx("div",{className:"fixed start-0 top-0 z-300 size-2 cursor-nwse-resize",onMouseDown:Y4("nw")}),_.jsx("div",{className:"fixed end-0 top-0 z-300 size-2 cursor-nesw-resize",onMouseDown:Y4("ne")})]}),_.jsxs("div",{className:"fixed end-0 top-0 z-300 flex",children:[_.jsx(Z4,{label:O2n(),glyph:Q1.minimize,message:"minimize",className:"hover:bg-panel"}),_.jsx(Z4,{label:e?F2n():N2n(),glyph:e?Q1.restore:Q1.maximize,message:"zoom",className:"hover:bg-panel"}),_.jsx(Z4,{label:y2n(),glyph:Q1.close,message:"close",className:"hover:bg-accent-red hover:text-white"})]})]})}const YG=E();document.documentElement.lang=YG;document.documentElement.dir="ltr";UI(YG);oW.createRoot(document.getElementById("root")).render(_.jsxs(T.StrictMode,{children:[_.jsx(bV,{client:tt,children:_.jsx(nX,{router:iJn})}),_.jsx(cCn,{}),i$&&_.jsx(oJn,{})]}));export{mc as C,It as I,yb as M,Qh as P,H$ as S,I7n as a,Sz as b,ct as c,Br as d,Zqn as e,Jt as f,E as g,si as h,Cz as i,_ as j,T as r}; +${w}`,b=T.useRef({key:"",value:0});b.current.key!==v&&(b.current={key:v,value:b.current.value+1});const y=T.useMemo(()=>{const Y=t?co(t):"experiments";return typeof Y=="object"&&"path"in Y&&Y.line&&p!==b.current.value?{...Y,lineScrollRequest:b.current.value}:Y},[t,p,i.href,w]),x=ut(Gi(n)),C=T.useMemo(()=>{var Y;return((Y=x.data)==null?void 0:Y.map(_e=>_e.id))??null},[x.data]),N=T.useRef(new Set),j=T.useRef(new Set),A=T.useRef({}),[z,M]=T.useState(0),D=T.useRef({projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"});D.current={projectId:n,activeSessionId:u,pane:t,isTask:(a==null?void 0:a.kind)==="task"};const I=T.useCallback((Y,_e=!1)=>{const xe=D.current;xe.projectId&&s.navigate({href:iv(xe.projectId,xe.activeSessionId,Y),replace:_e})},[s]),B=T.useCallback(Y=>{const _e=fl(Y);I(_e.kind==="file"?{..._e,line:void 0}:_e)},[I]),G=T.useCallback(()=>I(void 0),[I]),q=T.useCallback(Y=>{(t==null?void 0:t.kind)==="experiment"&&I({...t,runId:Y??void 0})},[t,I]),Q=T.useCallback(Y=>{s.navigate({href:Y?`/projects/${encodeURIComponent(Y)}`:"/projects"})},[s]),K=T.useCallback(Y=>{var _e;if(n)if(Y==="chat"){const xe=c.current;s.navigate({href:iv(n,xe,(_e=Lu(Rs.current,xe??"new"))==null?void 0:_e.active)})}else s.navigate({href:`/projects/${encodeURIComponent(n)}/${Y==="skills"?"skills":`settings/${Y}`}`})},[s,n]),Z=Xu(),{status:J}=I6(e.kind==="local"),$=T.useMemo(()=>zh(),[n]),L=ut($),F=L.data??null,U=T.useCallback(Y=>{Kr($.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[$]),H=T.useMemo(()=>Om(),[n]),oe=ut(H),ae=oe.data??null,ue=T.useCallback(Y=>{Kr(H.queryKey,_e=>(typeof Y=="function"?Y(_e??null):Y)??void 0)},[H]),se=T.useRef(void 0);se.current=ae==null?void 0:ae.tourCompleted;const V=[!x.data&&x.error?lL():null,!L.data&&L.error?v0():null,!oe.data&&oe.error?ife():null].filter(Y=>Y!==null),ne=V.length?bfe({items:new Intl.ListFormat(Z).format(V)}):null,ce=T.useRef(null),he=ut(Kv(n)),me=he.data??[],Ae=!he.isPending,[Pe,Ye]=T.useState(!1),$e=ut(Tu(n)).data??[],yt=T.useRef($e);yt.current=$e;const ot=T.useRef(new Map),Mt=T.useRef(new Set),jt=T.useRef(null),Pt=T.useRef(!1),Ie=T.useRef(new Map),nt=T.useRef(new Map),ke=T.useRef(0),ge=T.useRef(me);ge.current=me;const qe=ut(NNn(n)).data??null,[rt,dt]=T.useState("table"),[st,Ut]=T.useState(!1),[Xt,en]=T.useState("project"),an=T.useRef(null),{open:At,setOpen:gn,ref:on}=Vi(an),[Ot,dn]=T.useState(!1),cn=me.every(Y=>Y.chatSessionId),kn=u&&cn?Xt:"project",Wn=T.useMemo(()=>kn!=="agent"?me:me.filter(Y=>Y.chatSessionId===u),[me,kn,u]),vs=T.useMemo(()=>Wn.filter(Y=>st||!Y.archived),[Wn,st]),ns=T.useMemo(()=>$Gn(me),[me]),gt=T.useCallback(async(Y,_e,xe)=>{try{await s5n(Y,_e,xe),await tt.invalidateQueries({queryKey:Kv(n).queryKey})}catch(ze){Zt(ze instanceof Error?ze.message:String(ze),"error")}},[n]),ln=T.useCallback(Y=>{gt(Y,kn==="agent"?"taskRegion":"region",!1)},[gt,kn]),bn=T.useMemo(()=>{if(kn!=="agent")return $e;const Y=new Set(Wn.map(_e=>_e.id));return $e.filter(_e=>Y.has(_e.experimentId))},[$e,Wn,kn]),[un,_r]=T.useState([]),[Mn,Qn]=T.useState(!1),[ar,wt]=T.useState(!1),[Ht,vr]=T.useState(!1),[Pn,Qr]=T.useState(!1),[Xn,Yn]=T.useState(null),[Xr,Ts]=T.useState([]),[Fr,We]=T.useState([]),vt=T.useRef(new Map),fr=T.useRef(new Map),yn=Y=>{let _e=fr.current.get(Y);return _e||(_e=new pGn,fr.current.set(Y,_e)),_e},[Hn,Zn]=T.useState([]),[Fn,Yr]=T.useState([]),[An,wo]=T.useState([]),[oi,Is]=T.useState([]),[Hr,n_]=T.useState([]),[ko,So]=T.useState(null),[Gs,Vs]=T.useState("files"),[Wi,Ks]=T.useState(new Set),[cr,Si]=T.useState(!1),[Ct,za]=T.useState(null),[rs,Ws]=T.useState(sB),[_t,Bt]=T.useState(()=>window.innerWidth>=LO),ci=o==="chat"&&!h&&_t,[Ci,Ei]=T.useState(!0),[Or,li]=T.useState(!1),kc=T.useRef(t6()),Qi=T.useRef(u);Qi.current=u;const ss=T.useRef(un);ss.current=un;const Wa=T.useRef(Hr);Wa.current=Hr;const Ni=T.useRef(null),Yt=T.useCallback(Y=>{const _e=[...Y];Wa.current=_e,n_(_e)},[]),zi=T.useCallback(Y=>{Ni.current=Y,So(Y)},[]),Tl=T.useCallback(Y=>{const _e=Tt(Y);Ts(Me=>Xp(Me,_e)),We(Me=>Xp(Me,_e)),Zn(Me=>Xp(Me,_e)),Yr(Me=>Xp(Me,_e)),Is(Me=>Xp(Me,_e));const xe=Aa.current;if(xe&&"path"in Y){const Me=Us(xe,Qi.current,Y);vt.current.delete(Me),fr.current.delete(Me),j.current.delete(Me),N.current.delete(Me)}const ze=ss.current.filter(Me=>Tt(Me)!==_e);ss.current=ze,_r(ze)},[]),$n=T.useCallback(Y=>{const _e=Tt(Y),xe=[...ss.current.filter(ze=>Tt(ze)!==_e),m1(Y)];ss.current=xe,_r(xe),B(Y)},[B]),dr=T.useCallback((Y,_e,xe)=>{const ze=Tt(Y),Me=Ni.current,Xe=bFn({order:Wa.current,previewKey:Me?Tt(Me):null},ze,_e);Xe.replacedKey&&Me&&typeof Me!="string"&&Tt(Me)===Xe.replacedKey&&Tl(Me),Yt(Xe.order),Xe.previewKey===null?zi(null):Xe.previewKey===ze&&zi(m1(Y));const Ke=[...ss.current.filter(Lt=>Tt(Lt)!==ze),m1(Y)];ss.current=Ke,_r(Ke),I(fl(Y,xe))},[Tl,Yt,zi,I]),$s=T.useCallback(Y=>{const _e=Ni.current;_e&&Tt(_e)===Tt(Y)&&zi(null)},[zi]);T.useEffect(()=>{let Y=!1;const _e=ze=>{const Me=Ni.current,Xe=ze.target;if(Xe instanceof Element&&Xe.closest("input, textarea, [contenteditable='true']")!==null){Y=!1;return}if(Me&&Tt(Me)===Tt(kc.current.rightTab)&&(ze.metaKey||ze.ctrlKey)&&!ze.altKey&&!ze.shiftKey&&ze.key.toLowerCase()==="k"){ze.preventDefault(),Y=!0;return}if(Y&&ze.key==="Enter"){ze.preventDefault(),Y=!1;const Lt=Ni.current;Lt&&$s(Lt);return}Y=!1},xe=()=>{Y=!1};return window.addEventListener("keydown",_e),window.addEventListener("blur",xe),window.addEventListener("pointerdown",xe),()=>{window.removeEventListener("keydown",_e),window.removeEventListener("blur",xe),window.removeEventListener("pointerdown",xe)}},[$s]);const is=T.useCallback((Y,_e)=>{const xe=Tt(Y),ze=Ni.current;ze&&Tt(ze)===xe&&zi(null);const Me=yFn({order:Wa.current,previewKey:ze?Tt(ze):null},xe,ss.current.map(Tt));Yt(Me.order);const Xe=ss.current.filter(Lt=>Tt(Lt)!==xe);if(ss.current=Xe,_r(Xe),!_e)return;const Ke=Me.fallbackKey?Xe.find(Lt=>Tt(Lt)===Me.fallbackKey):void 0;Ke?B(Ke):(G(),Si(!1))},[Yt,zi,B,G]),Qs=K,Xi=T.useMemo(()=>({rightTab:m1(y),tabHistory:un,experimentsTabOpen:Mn,filesTabOpen:ar,artifactsTabOpen:Ht,terminalTabOpen:Pn,expTabs:Xr,fileTabs:Fr,planTabs:Hn,subagentTabs:Fn,sideTabs:An,codeTabs:oi,contentTabOrder:Wa.current,previewTab:Ni.current,filesView:Gs,filesToggled:Wi,selectedRunId:f,scope:Xt,panelOpen:h,panelMax:cr,treeViewport:Ct}),[y,un,Mn,ar,Ht,Pn,Xr,Fr,Hn,Fn,An,oi,Hr,ko,Gs,Wi,f,Xt,h,cr,Ct]);kc.current=Xi;const Rl=T.useCallback(()=>Object.fromEntries(vt.current),[]),Sc=T.useRef(void 0),Ff=T.useCallback(()=>{clearTimeout(Sc.current),Sc.current=setTimeout(()=>M(Y=>Y+1),200)},[]);T.useEffect(()=>()=>clearTimeout(Sc.current),[]);const Co=T.useCallback((Y,_e,xe)=>{if(_r(Y.tabHistory),ss.current=Y.tabHistory,Qn(Y.experimentsTabOpen),wt(Y.filesTabOpen),vr(Y.artifactsTabOpen),Qr(Y.terminalTabOpen),Ts(Y.expTabs),We(Y.fileTabs),Zn(Me=>Me===Y.planTabs?Me:Y.planTabs.map(Xe=>{var Ke;return{...Xe,plan:((Ke=Me.find(Lt=>Lt.sessionId===Xe.sessionId&&Lt.promptId===Xe.promptId))==null?void 0:Ke.plan)??""}})),Yr(Y.subagentTabs),wo(Y.sideTabs),Is(Y.codeTabs),Yt(Y.contentTabOrder),zi(Y.previewTab),Vs(Y.filesView),Ks(Y.filesToggled),en(Y.scope),Si(Y.panelMax),za(Y.treeViewport),dn(D.current.activeSessionId===Xd&&Y.fileTabs.some(Me=>j_(Me,{path:vw,source:"artifacts"}))),xe){for(const[Me,Xe]of Object.entries((_e==null?void 0:_e.scroll)??{}))vt.current.set(Me,Xe);Object.assign(A.current,_e==null?void 0:_e.sourceModes)}const ze=D.current;if(ze.projectId)for(const Me of Y.fileTabs){const Xe=Us(ze.projectId,ze.activeSessionId,Me);j.current.has(Xe)||N.current.add(Xe)}},[Yt,zi]),{ready:as,loaded:r_,error:Yi,retry:Zi,capture:Cc,workspace:Rs}=R9n({projectId:ae&&C!==null&&((a==null?void 0:a.kind)!=="task"||!u||C.includes(u))?n:null,taskKey:u??"new",location:i.href,pane:t,isTask:(a==null?void 0:a.kind)==="task",firstDemoOpen:(ae==null?void 0:ae.tourCompleted)===!1,state:Xi,apply:Co,getScroll:Rl,sourceModes:A.current,revision:z}),ja=T.useRef(null);T.useLayoutEffect(()=>{if(!as||!Ae||(a==null?void 0:a.kind)!=="task")return;const Y=ja.current;(Y==null?void 0:Y.projectId)===n&&Y.taskId===u&&Y.scope!==kn&&za(null),ja.current={projectId:n,taskId:u,scope:kn}},[as,Ae,a==null?void 0:a.kind,n,u,kn]);const Qa=T.useCallback((Y,_e)=>{var Lt;const xe=(_e==null?void 0:_e.projectId)??n;if(!xe)return;const ze=xe===n;Y&&ze&&_e!=null&&_e.replace&&u===null&&(Cc(),A9n(xe,Y));const Me=Lu(eB(xe),Y??"new"),Xe=Me?Me.active:Ko(xe)?(Lt=n6(Y??void 0,se.current===!1))==null?void 0:Lt.active:void 0,Ke=ze&&(_e!=null&&_e.replace)&&Y&&u===null?D.current.pane:Xe;s.navigate({href:iv(xe,Y,Ke),replace:ze&&(_e==null?void 0:_e.replace)})},[s,n,u,Cc]);T.useEffect(()=>{as&&(a==null?void 0:a.kind)!=="task"&&!c.current&&Rs.current.lastTaskId&&(C!=null&&C.includes(Rs.current.lastTaskId))&&(c.current=Rs.current.lastTaskId,M(Y=>Y+1))},[as,a==null?void 0:a.kind,Rs,C]),nX({shouldBlockFn:({next:Y})=>{var _e;return((_e=gf(Y.pathname))==null?void 0:_e.projectId)!==n&&[...fr.current.values()].some(xe=>xe.needsProtection)&&!EM(gz())},enableBeforeUnload:()=>[...fr.current.values()].some(Y=>Y.needsProtection)});const Xa=T.useRef(null);T.useEffect(()=>{const Y=Xb(i.href);!ae||!as||!Y||(Jb.queue({lastLocation:Y,railOpen:Ci,panelWidth:rs,experimentsView:rt},Xa.current===Y?250:0),Xa.current=Y)},[i.href,ae,as,Ci,rs,rt]);const Zr=(ae==null?void 0:ae.onboardingCompleted)??!1,[bs,Jn]=T.useState(!1),[Ml,Eo]=T.useState(null),[ap,ji]=T.useState(0),No=T.useCallback(()=>Jn(!0),[]),Ya=T.useCallback(async Y=>{const _e=se.current===!1,xe=await r.mutateAsync({tourCompleted:!0});_e&&vu({name:"demo_welcome_choice",choice:Y}),ue(ze=>ze&&{...ze,tourCompleted:xe.tourCompleted}),Jn(!1),Y==="explore_demo"&&ji(ze=>ze+1)},[]),Za=T.useCallback(async()=>{await Ya("create_project"),li(!0)},[Ya]);T.useEffect(()=>{!n||!Ko(n)||!Zr||ae!=null&&ae.tourCompleted||No()},[n,Zr,No,ae==null?void 0:ae.tourCompleted]);const _n=(F==null?void 0:F.find(Y=>Y.id===n))??null;T.useEffect(()=>{const Y=ne||ae===null?null:_n==null?void 0:_n.name;document.title=Y?`${_a(Y)} — OpenResearch`:"OpenResearch"},[ne,ae,_n]);const Aa=T.useRef(n);Aa.current=n;const zo=T.useCallback(Y=>{n&&vu({name:"first_action",surface:Ko(n)?"demo":"project",action:Y})},[n]);T.useEffect(()=>{o!=="chat"&&o!=="skills"&&zo("open_settings")},[o,zo]);const Ec=T.useCallback((Y=!1)=>{Y&&(!D.current.isTask||D.current.pane)||(zo("open_experiment"),Qn(!0),I({kind:"home",view:"experiments"},Y))},[I,zo]),Nc=()=>{L.refetch(),oe.refetch(),x.refetch()},hr=T.useRef(!1);T.useEffect(()=>{if(!ae||hr.current)return;hr.current=!0,ce.current=ae.preferredAgent;const Y=JS()??ae.workspace;Y&&(Ei(Y.railOpen),Ws(Math.min(Y.panelWidth,Fd())),dt(Y.experimentsView))},[ae]),T.useEffect(()=>{C&&c.current&&!C.includes(c.current)&&(c.current=null)},[C]);const s_=T.useRef(Promise.resolve()),ys=T.useRef(0),ui=T.useCallback(Y=>{const _e=++ys.current;ue(ze=>ze&&{...ze,preferredAgent:Y});const xe=s_.current.then(()=>r.mutateAsync({preferredAgent:Y})).then(ze=>{ce.current=ze.preferredAgent,_e===ys.current&&ue(Me=>Me&&{...Me,preferredAgent:ze.preferredAgent})}).catch(ze=>{throw _e===ys.current&&ue(Me=>Me&&{...Me,preferredAgent:ce.current}),ze});return s_.current=xe.catch(()=>{}),xe},[]),Ji=T.useRef(Promise.resolve()),Ol=T.useRef(0),Hf=T.useCallback(Y=>{const _e=++Ol.current;ue(xe=>xe&&{...xe,preferredAutonomy:Y}),Ji.current=Ji.current.then(()=>r.mutateAsync({preferredAutonomy:Y})).catch(()=>{_e===Ol.current&&oe.refetch()})},[]);T.useEffect(()=>{const Y=()=>{Ws(_e=>Math.min(_e,Fd())),Bt(window.innerWidth>=LO)};return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)},[]);const Ai=T.useCallback(Y=>{Pt.current=!1,Ie.current.clear(),nt.current.clear();const _e=++ke.current;tt.fetchQuery(Tu(Y)).then(xe=>{if(Aa.current!==Y||jt.current!==Y||ke.current!==_e)return;Ie.current=new Map(xe.map(Me=>[Me.id,Me]));const ze=[...nt.current.values()].some(Me=>{const Xe=Ie.current.get(Me.id);return!Xe||Xe.status!=="running"&&Xe.updatedAt<=Me.updatedAt});nt.current.clear();for(const Me of xe){const Xe=ot.current.get(Me.id);(!Xe||Xe.updatedAt{var Xe;return xe.some(Ke=>Ke.id===Me&&Ke.status==="running")?Me:((Xe=xe.find(Ke=>Ke.status==="running"))==null?void 0:Xe.id)??null}),ze&&Ec(!0)}).catch(()=>{ke.current===_e&&(nt.current.clear(),Ye(!0))})},[Ec]);T.useEffect(()=>{if(n)return jt.current=n,ot.current.clear(),Mt.current.clear(),t5n(n).catch(()=>{}),Ai(n),()=>{ke.current++}},[Ai,n]);const qf=T.useCallback(()=>{vr(!0),$n("artifacts")},[$n]),Uf=T.useCallback(()=>{Qr(!0),$n("terminal")},[$n]),Ja=u??(n?`project:${n}`:null);T.useEffect(()=>{Yn(h?y==="terminal"?Ja:Y=>Y===Ja?Y:null:null)},[h,y,Ja]),n6n({onReconnect:()=>{const Y=Aa.current;Y&&(jt.current=Y,ot.current.clear(),Mt.current.clear(),Ai(Y))},onRun:Y=>{if(Y.projectId!==Aa.current||Y.projectId!==jt.current)return;const _e=ot.current.get(Y.id),xe=Mt.current.has(Y.id);if(_e&&_e.updatedAt>Y.updatedAt||(ot.current.set(Y.id,Y),Mt.current.add(Y.id),Ko(Y.projectId)&&Eo(Xe=>Y.status==="running"?Xe??Y.id:Xe===Y.id?null:Xe),Y.status!=="running"||(_e==null?void 0:_e.status)==="running"))return;const ze=Ie.current.get(Y.id),Me=Pt.current&&(!ze||ze.status!=="running"&&ze.updatedAt<=Y.updatedAt);xe&&_e||Me?Ec(!0):Pt.current||nt.current.set(Y.id,Y)}});const Gf=T.useCallback(()=>en("project"),[]),Xs=T.useCallback((Y,_e="overview",xe="preview",ze)=>{zo("open_experiment");const Me={id:Y,view:_e};Ts(Xe=>Xe.some(Ke=>Ew(Ke,Me))?Xe:[...Xe,Me]),_e==="terminal"&&Ko(Aa.current)&&Ws(Xe=>Math.max(Xe,lA())),dr(Me,xe,ze)},[dr]),i_=T.useCallback((Y,_e="preview")=>{const xe=yt.current.filter(Me=>Me.id===Y||Me.id.startsWith(Y)),ze=xe.length===1?xe[0]:null;ze&&Xs(ze.experimentId,"terminal",_e,ze.id)},[Xs]),Vf=T.useMemo(()=>new Map(me.map(Y=>{var _e;return[Y.id,((_e=Y.title)==null?void 0:_e.trim())||Y.slug||rl()]})),[me,Z]),ea=$O(Vf),Dl=T.useMemo(()=>{const Y=new Map;for(const _e of $e)Y.set(_e.id,ea.get(_e.experimentId)??rl());return Y},[ea,$e,Z]),a_=$O(Dl),zc=T.useCallback(Y=>{const _e=a_.get(Y);if(_e)return _e;const xe=[...a_].filter(([ze])=>ze.startsWith(Y));return xe.length===1?xe[0][1]:""},[a_]),Ll=T.useCallback(Y=>{const _e=ea.get(Y);if(_e)return _e;const xe=[...ea].filter(([ze])=>ze.startsWith(Y));return xe.length===1?xe[0][1]:""},[ea]),jc=T.useCallback((Y,_e="preview")=>{const xe=ge.current.filter(ze=>ze.id===Y||ze.id.startsWith(Y));xe.length===1&&Xs(xe[0].id,"overview",_e)},[Xs]),o_=T.useCallback(Y=>{const _e=Xr.findIndex(xe=>Ew(xe,Y));_e!==-1&&(Ts(xe=>xe.filter((ze,Me)=>Me!==_e)),is(Y,Tt(y)===Tt(Y)))},[Xr,is,y]),jo=T.useCallback((Y,_e="preview")=>{Y.line!=null&&k(Me=>Me+1);const xe=Aa.current;if(xe){const Me=Us(xe,Qi.current,Y);kc.current.fileTabs.some(Xe=>j_(Xe,Y))||N.current.delete(Me),j.current.add(Me)}const ze=Z$(Y);We(Me=>{const Xe=Me.findIndex(Lt=>j_(Lt,Y));if(Xe===-1)return[...Me,ze];const Ke=Me.slice();return Ke[Xe]=ze,Ke}),dr(Y,_e)},[dr]),eo=T.useCallback((Y,_e,xe,ze,Me,Xe)=>{const Ke=F==null?void 0:F.find(Jr=>Jr.id===n),Lt=gJn(Y,Ke==null?void 0:Ke.repoPath,_e,(Ke==null?void 0:Ke.artifactsDir)??(Ke==null?void 0:Ke.filesDir),Ke==null?void 0:Ke.slug);if(!Lt)return null;const Un=Me?ge.current.find(Jr=>Jr.id===Me||Me.length>=6&&Jr.id.startsWith(Me)):void 0,ks=xe??(Un==null?void 0:Un.branchName),Ms=Lt.source==null||Lt.source==="repo";return ks&&Ms&&(Lt.ref=ks),Xe&&!Lt.ref&&Ms&&(Lt.branchLabel=Xe),ze!=null&&(Lt.line=ze),Lt},[F,n]),Ao=T.useCallback((Y,_e,xe,ze,Me,Xe,Ke="preview")=>{const Lt=eo(Y,_e,xe,ze,Me,Xe);Lt&&jo(Lt,Ke)},[jo,eo]),To=T.useCallback(Y=>jo({path:Y,source:"artifacts"},"keepOpen"),[jo]),Ac=T.useCallback((Y,_e,xe,ze,Me,Xe="preview")=>{const Ke=eo(Y,_e,Me,xe,ze);Ke&&jo(Ke,Xe)},[jo,eo]),Kf=T.useMemo(()=>({projectId:n??"",remote:e.kind==="ssh",resolve:(Y,_e,xe)=>{const ze=(_e==null?void 0:_e.source)==="artifacts"?`artifacts/${Y}`:Y,Me=eo(ze,_e?_e.sessionId:u??void 0,_e==null?void 0:_e.ref,void 0,xe);return Me?{path:Me.path,source:Me.source??"repo",sessionId:Me.sessionId,ref:Me.ref}:null}}),[n,e.kind,eo,u]),Sr=T.useCallback((Y,_e)=>{$s(Y),_e()},[$s]),Wf=T.useCallback(Y=>{var ze;const _e=Fr.findIndex(Me=>j_(Me,Y));if(_e===-1)return;const xe=n?Us(n,u,Y):null;xe&&((ze=fr.current.get(xe))!=null&&ze.needsProtection)&&!EM(gz())||(We(Me=>Me.filter((Xe,Ke)=>Ke!==_e)),xe&&(vt.current.delete(xe),fr.current.delete(xe),j.current.delete(xe),N.current.delete(xe),delete A.current[xe]),u===Xd&&j_(Y,{path:vw,source:"artifacts"})&&dn(!1),is(Y,Tt(y)===Tt(Y)))},[u,Fr,is,n,y]),c_=T.useCallback(Y=>{Y.lineScrollRequest!==void 0&&m(Y.lineScrollRequest)},[]),Tc=T.useCallback((Y,_e,xe,ze="preview")=>{const Me={kind:"plan",sessionId:_e,promptId:xe,plan:Y};Zn(Xe=>{const Ke=Xe.findIndex(Un=>Un.promptId===xe);if(Ke===-1)return[...Xe,Me];const Lt=Xe.slice();return Lt[Ke]=Me,Lt}),dr(Me,ze)},[dr]),Ro=T.useCallback(Y=>{const _e=Hn.findIndex(xe=>xe.promptId===Y.promptId);_e!==-1&&(Zn(xe=>xe.filter((ze,Me)=>Me!==_e)),is(Y,Tt(y)===Tt(Y)))},[is,Hn,y]),Il=T.useCallback((Y,_e,xe,ze="preview")=>{const Me={kind:"subagent",sessionId:Y,spawnPartId:_e,label:xe};Yr(Xe=>Xe.some(Ke=>Ke.spawnPartId===_e)?Xe:[...Xe,Me]),dr(Me,ze)},[dr]),Qf=T.useCallback(Y=>{const _e=Fn.findIndex(xe=>xe.spawnPartId===Y.spawnPartId);_e!==-1&&(Yr(xe=>xe.filter((ze,Me)=>Me!==_e)),is(Y,Tt(y)===Tt(Y)))},[is,y,Fn]),Xf=T.useCallback(Y=>{const _e={kind:"side",sessionId:Y};wo(xe=>xe.some(ze=>ze.sessionId===Y)?xe:[...xe,_e]),Ws(xe=>Math.max(xe,lA())),dr(_e,"keepOpen")},[dr]),Mo=T.useCallback(Y=>{An.some(_e=>_e.sessionId===Y.sessionId)&&(wo(_e=>_e.filter(xe=>xe.sessionId!==Y.sessionId)),is(Y,Tt(y)===Tt(Y)))},[is,y,An]);T.useEffect(()=>{const Y=x.data;if(Y)for(const _e of An)Y.some(xe=>xe.id===_e.sessionId)||Mo(_e)},[x.data,An,Mo]);const $l=T.useCallback(async(Y,_e)=>{let xe;try{xe=await Zkn(Y)}catch(ze){Zt(Kcn({error:W1(ze)}),"error");return}if(D.current.activeSessionId!==Y){W3(xe.id).catch(ze=>{Zt(vj({error:W1(ze)}),"error")});return}if(Kr(Gi(xe.projectId).queryKey,ze=>ze&&[xe,...ze.filter(Me=>Me.id!==xe.id)]),Xf(xe.id),!!_e)try{await tt.fetchQuery(ac(xe.id)),await Q3(xe.id,_e)}catch(ze){Zt(W1(ze),"error")}},[Xf]),Oo=T.useCallback(Y=>{Mo(Y),W3(Y.sessionId).catch(_e=>{Zt(vj({error:W1(_e)}),"error")})},[Mo]),[Do,l_]=T.useState({});T.useEffect(()=>{if(l_(Ke=>{const Lt=new Set(Fn.map(Un=>Un.spawnPartId));return Object.keys(Ke).every(Un=>Lt.has(Un))?Ke:Object.fromEntries(Object.entries(Ke).filter(([Un])=>Lt.has(Un)))}),Fn.length===0)return;let Y=!0;const _e=new Set,xe=(Ke,Lt,Un)=>{l_(ks=>{var Jr;let Ms=ks;for(const ta of Lt)if(!(Un&&_e.has(ta.spawnPartId)))for(const Cn of Ke){const os=bb(Cn.parts,ta.spawnPartId);if(!os)continue;Un||_e.add(ta.spawnPartId);const na={label:eUn(os),running:((Jr=os.state)==null?void 0:Jr.status)==="running"},On=Ms[ta.spawnPartId];(!On||On.label!==na.label||On.running!==na.running)&&(Ms===ks&&(Ms={...ks}),Ms[ta.spawnPartId]=na);break}return Ms})};let ze=0;const Me=()=>{const Ke=++ze;for(const Lt of new Set(Fn.map(Un=>Un.sessionId)))tt.fetchQuery({...ac(Lt),staleTime:0}).then(({messages:Un})=>{Y&&Ke===ze&&xe(Un,Fn.filter(ks=>ks.sessionId===Lt),!0)}).catch(()=>{})};Me();const Xe=Gv(Ke=>{if(Ke.type==="reconnected"){_e.clear(),Me();return}if(Ke.type!=="message")return;const Lt=Fn.filter(Un=>Un.sessionId===Ke.sessionId);Lt.length&&xe([Ke.message],Lt,!1)});return()=>{Y=!1,Xe()}},[Fn]);const Ta=T.useCallback((Y,_e,xe="files",ze="preview")=>{const Me={code:!0,experimentId:Y,branch:_e,view:xe,toggled:new Set};Is(Xe=>Xe.some(Ke=>Cd(Ke,Me))?Xe.map(Ke=>Cd(Ke,Me)?{...Ke,experimentId:Y,view:xe}:Ke):[...Xe,Me]),dr(Me,ze)},[dr]),u_=T.useCallback((Y,_e)=>{Is(xe=>xe.map(ze=>Cd(ze,Y)?{...ze,..._e}:ze)),_e.view&&I(fl({...Y,..._e}))},[]),Yf=T.useCallback(Y=>{const _e=oi.findIndex(xe=>Cd(xe,Y));_e!==-1&&(Is(xe=>xe.filter((ze,Me)=>Me!==_e)),is(Y,Tt(y)===Tt(Y)))},[oi,is,y]),Bl=T.useCallback(()=>{wt(!0),$n("files")},[$n]),Ti=T.useCallback(Y=>{Y==="experiments"?Qn(!1):Y==="files"?wt(!1):Y==="terminal"?(Qr(!1),Yn(null)):vr(!1),is(Y,y===Y)},[is,y]),__=Y=>{Y.preventDefault(),Y.currentTarget.setPointerCapture(Y.pointerId);const xe=document.body.style.userSelect;document.body.style.userSelect="none";const ze=cr,Me=Y.clientX,Xe=rs;let Ke=!1;function Lt(){window.removeEventListener("pointermove",Un),window.removeEventListener("pointerup",Lt),window.removeEventListener("pointercancel",Lt),document.body.style.userSelect=xe}function Un(ks){if(ze){const Cn=ks.clientX-Me;if(Ke||CnJr+yJn){Si(!0);return}Si(!1);const ta=Math.min(Math.max(Ms,Yv),Jr);Ws(ta)}window.addEventListener("pointermove",Un),window.addEventListener("pointerup",Lt),window.addEventListener("pointercancel",Lt)},f_=(Y,_e)=>{U(xe=>xe?IO(xe,Y):[Y]),s.navigate({href:`/projects/${encodeURIComponent(Y.id)}${_e?"/settings/git":""}`}),_e&&Zt(_e,"error")},Bs=typeof y=="object"&&"id"in y?y:null,er=typeof y=="object"&&"path"in y?y:null,Lo=(er==null?void 0:er.source)==="artifacts"&&qe?rh(qe.entries,er.path):null,op=Lo?`${Lo.modifiedAt}:${Lo.size}`:null,Rc=u===Xd&&Ot?Fr.find(Y=>j_(Y,{path:vw,source:"artifacts"})):void 0,cp=Rc?[Rc]:[],qn=typeof y=="object"&&"kind"in y&&y.kind==="plan"?y:null,_i=qn==null?void 0:qn.sessionId,to=qn==null?void 0:qn.promptId,Pl=!!(_i&&to&&(C!=null&&C.includes(_i))),Mc=ut({...ac(_i??""),enabled:Pl,subscribed:Pl}),Io=T.useMemo(()=>{var _e;if(!_i||!to||!Mc.data)return null;const Y=Mc.data.messages.flatMap(xe=>{const ze=bb(xe.parts,to);return ze?[ze]:[]})[0];return{key:`${_i}:${to}`,text:((_e=Y==null?void 0:Y.prompt)==null?void 0:_e.plan)??null}},[_i,to,Mc.data]),xs=typeof y=="object"&&"kind"in y&&y.kind==="subagent"?y:null,ws=typeof y=="object"&&"kind"in y&&y.kind==="side"?y:null,te=ws?(d_=x.data)==null?void 0:d_.find(Y=>Y.id===ws.sessionId):void 0,ve=typeof y=="object"&&"code"in y?y:null,Se=ve?oi.find(Y=>Cd(Y,ve))??null:null,Oe=new Map;for(const Y of[...Xr,...Fr,...Hn,...Fn,...An,...oi])Oe.set(Tt(Y),Y);const Fe=Rc?Tt(Rc):null,Et=Hr.filter(Y=>Y!==Fe).map(Y=>Oe.get(Y)).filter(N9n),qt=Y=>ko!==null&&Tt(ko)===Tt(Y),xn=Y=>_.jsx(Go,{active:er!==null&&j_(er,Y),label:Y.path.split("/").pop()||Y.path,icon:_.jsx(O$,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>$s(Y),onClose:()=>Wf(Y)},`file:${e6(Y)}`),rn=Bs?me.find(Y=>Y.id===Bs.id)??null:null,or=Se?me.find(Y=>Y.id===Se.experimentId&&Y.branchName===Se.branch)??null:null,Oc=Y=>{var xe,ze,Me,Xe;if("path"in Y)return xn(Y);if("id"in Y){const Ke=me.find(Lt=>Lt.id===Y.id);return _.jsx(Go,{active:Bs!==null&&Ew(Bs,Y),label:Ke?Ke.title||Ke.slug:"…",icon:Y.view==="overview"?_.jsx(h7n,{size:12,className:"shrink-0"}):_.jsx(bo,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>$s(Y),onClose:()=>o_(Y)},Tt(Y))}if("kind"in Y&&Y.kind==="plan")return _.jsx(Go,{active:qn!==null&&qn.promptId===Y.promptId,label:pL(),icon:_.jsx(KS,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>$s(Y),onClose:()=>Ro(Y)},Tt(Y));if("kind"in Y&&Y.kind==="side"){const Ke=(xe=x.data)==null?void 0:xe.find(Lt=>Lt.id===Y.sessionId);return _.jsx(Go,{active:ws!==null&&ws.sessionId===Y.sessionId,label:((ze=Ke==null?void 0:Ke.title)==null?void 0:ze.trim())||F3(),shimmer:(Ke==null?void 0:Ke.busy)??!1,icon:_.jsx(P0,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>$s(Y),onClose:()=>Oo(Y)},Tt(Y))}if("kind"in Y)return _.jsx(Go,{active:xs!==null&&xs.spawnPartId===Y.spawnPartId,label:((Me=Do[Y.spawnPartId])==null?void 0:Me.label)??Y.label??Efe(),shimmer:((Xe=Do[Y.spawnPartId])==null?void 0:Xe.running)??!1,icon:_.jsx(XS,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>$s(Y),onClose:()=>Qf(Y)},Tt(Y));const _e=me.find(Ke=>Ke.id===Y.experimentId);return _.jsx(Go,{active:Se!==null&&Cd(Se,Y),label:(_e==null?void 0:_e.slug)??Y.branch,icon:_.jsx(Fu,{size:12,className:"shrink-0"}),preview:qt(Y),onSelect:()=>$n(Y),onPromote:()=>$s(Y),onClose:()=>Yf(Y)},Tt(Y))};if(!a||a.kind==="resume")return null;if(ne)return _.jsxs("div",{className:"app flex flex-col h-full",children:[_.jsxs("div",{className:c0,children:[_.jsx("p",{children:ne}),_.jsx(De,{variant:"primary",onClick:Nc,children:ri()})]}),e.kind==="ssh"&&_.jsx(m5,{runtime:e,corner:!0})]});if(F&&!_n)return _.jsxs("div",{className:c0,children:[fo(),_.jsx(De,{onClick:()=>Q(null),children:v0()})]});if(Yi&&!as)return _.jsxs("div",{className:c0,children:[_.jsx("p",{role:"alert",children:Yi}),_.jsx(De,{onClick:Zi,children:ri()})]});if(F===null||ae===null||!r_||C===null)return _.jsxs("div",{className:"app flex flex-col h-full",children:[_.jsx("div",{className:c0,children:_.jsx(kt,{})}),e.kind==="ssh"&&_.jsx(m5,{runtime:e,corner:!0})]});if(!_n||(a==null?void 0:a.kind)==="task"&&u&&!(C!=null&&C.includes(u)))return _.jsxs("div",{className:c0,children:[fo(),_.jsx(De,{onClick:()=>Q(null),children:v0()})]});const Zf=_.jsx(IGn,{projectName:((h_=F.find(Y=>Y.id===n))==null?void 0:h_.name)??"",onHome:()=>void s.navigate({to:"/projects"}),onNewProject:()=>li(!0),onRepository:()=>Qs("git"),onCollapse:()=>Ei(!1)});return _.jsx(KB,{value:Kf,children:_.jsxs("div",{className:"app flex flex-col h-full",children:[e.kind==="local"&&_.jsx(cB,{}),e.kind==="local"&&_.jsx(BB,{status:J}),Yi&&_.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:Yi}),_.jsx(De,{onClick:Zi,children:ri()})]}),_.jsxs("div",{className:`app-body workspace-body relative flex flex-1 min-h-0 py-0 px-3.5 ${ci?"workspace-card-visible":""}`,children:[n&&_.jsx(pM,{projectId:n,projectName:(_n==null?void 0:_n.name)??"",railHeader:Zf,railOpen:Ci,onShowRail:()=>Ei(!0),mainView:o,onSelectMainView:Qs,onOpenFile:Ac,onOpenRun:i_,runExperimentName:zc,onOpenExperiment:jc,experimentName:Ll,onOpenPlan:Tc,onOpenSubagent:Il,onOpenSideChat:(Y,_e)=>void $l(Y,_e),composerFocusNonce:ap,demoRunningRunId:Ml,runtime:e,onOpenDemoWelcome:_n&&Ko(_n.id)?No:void 0,activeSessionId:u,onActiveSessionChange:Qa,preferredAgent:ae.preferredAgent,onPreferredAgentChange:ui,preferredAutonomy:ae.preferredAutonomy??U3,onPreferredAutonomyChange:Hf,children:o==="skills"?_.jsx(iGn,{}):o!=="chat"?_.jsx(zHn,{remote:e.kind==="ssh",tab:o,project:_n,onProjectUpdate:Y=>{U(_e=>_e?IO(_e,Y):[Y])},onSelectTab:Qs}):null}),o==="chat"&&_.jsx(JAn,{expanded:ci,experiments:me,runs:$e,onOpenExperiment:(Y,_e)=>Xs(Y,"overview","preview",_e),rightOffset:h?rs+28:void 0,activeView:h&&(y==="files"||y==="artifacts"||y==="experiments"||y==="terminal")?y:null,projectId:_n.id,onCompute:()=>Qs("compute"),sessionId:u,busy:((Ri=x.data)==null?void 0:Ri.some(Y=>Y.id===u&&Y.busy))??!1,onChanges:()=>{Vs("changes"),Bl()},onFiles:()=>{Vs("files"),Bl()},onTerminal:Uf,onArtifacts:qf,onExperiments:()=>Ec(),onSideChat:u?()=>void $l(u,""):void 0}),o==="chat"&&h&&_.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 ${cr?"max":""}`,style:cr?void 0:{width:rs},"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 ${cr?"cursor-e-resize":"cursor-col-resize"}`,title:cr?pue():cue(),onPointerDown:__}),_.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:[cp.map(xn),ar&&_.jsx(Go,{active:y==="files",label:N3(),icon:_.jsx(Fu,{size:12,className:"shrink-0"}),onSelect:()=>$n("files"),onClose:()=>Ti("files")}),Pn&&_.jsx(Go,{active:y==="terminal",label:Fv(),icon:_.jsx(bo,{size:12,className:"shrink-0"}),onSelect:()=>$n("terminal"),onClose:()=>Ti("terminal")}),Ht&&_.jsx(Go,{active:y==="artifacts",label:aL(),icon:_.jsx(GS,{size:12,className:"shrink-0"}),onSelect:()=>$n("artifacts"),onClose:()=>Ti("artifacts")}),Mn&&_.jsx(Go,{active:y==="experiments",label:oL(),icon:_.jsx(Ah,{size:12,className:"shrink-0"}),onSelect:()=>$n("experiments"),onClose:()=>Ti("experiments")}),Et.map(Oc)]}),_.jsxs("div",{className:"panel-controls inline-flex items-center gap-0.5 self-center py-0 px-1.5 shrink-0",children:[_.jsx(It,{title:cr?NN():EN(),"aria-label":cr?NN():EN(),onClick:()=>Si(Y=>!Y),children:cr?_.jsx(y8n,{size:14}):_.jsx(m8n,{size:14})}),_.jsx(It,{title:I0(),"aria-label":I0(),onClick:()=>{G(),Si(!1)},children:_.jsx(xr,{size:14})})]})]}),y==="terminal"&&Pn?null:!as||((t==null?void 0:t.kind)==="experiment"||(t==null?void 0:t.kind)==="code")&&!Ae||(t==null?void 0:t.kind)==="experiment"&&t.runId&&!Pe?_.jsx(la,{children:_.jsx(kt,{})}):Bs&&(!rn||f&&!$e.some(Y=>Y.id===f&&Y.experimentId===Bs.id))||ve&&!or||t&&"sessionId"in t&&t.sessionId&&!(C!=null&&C.includes(t.sessionId))?_.jsx(la,{children:_.jsx("div",{className:"p-6 text-subtext",children:fo()})}):y==="artifacts"?_.jsx(la,{children:_n&&_.jsx(XUn,{project:_n,artifacts:qe,remote:e.kind==="ssh",onOpenFile:To,canRenameFile:Y=>{var _e;return!((_e=fr.current.get(Us(_n.id,u,{path:Y,source:"artifacts"})))!=null&&_e.needsProtection)}},_n.id)}):y==="experiments"?_.jsxs(la,{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:on,children:[_.jsx(It,{size:"small",ref:an,className:"experiment-scope-trigger",active:kn==="agent",title:Oue({scope:kn==="agent"?SN():CN()}),"aria-label":a_e(),"aria-expanded":At,onClick:()=>gn(Y=>!Y),children:_.jsx(X7n,{size:16,strokeWidth:2.5})}),At&&_.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(vn,{"aria-pressed":kn==="agent",disabled:!u||!cn,title:u?cn?void 0:d_e():N_e(),onClick:()=>{en("agent"),gn(!1)},children:[_.jsx("span",{children:SN()}),kn==="agent"&&_.jsx(yi,{size:13})]}),_.jsxs(vn,{"aria-pressed":kn==="project",onClick:()=>{en("project"),gn(!1)},children:[_.jsx("span",{children:CN()}),kn==="project"&&_.jsx(yi,{size:13})]}),_.jsx("div",{className:"my-1 border-t border-border-variant"}),_.jsxs(vn,{"aria-pressed":st,onClick:()=>{Ut(Y=>!Y),gn(!1)},children:[_.jsx("span",{children:ffe()}),st&&_.jsx(yi,{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":Fue(),children:[_.jsx("button",{className:rt==="table"?"active":"","aria-pressed":rt==="table",onClick:()=>dt("table"),children:Mfe()}),_.jsx("button",{className:rt==="tree"?"active":"","aria-pressed":rt==="tree",onClick:()=>dt("tree"),children:Pfe()})]})]})]}),_.jsx("div",{className:"pane-content flex-1 min-h-0 relative bg-background",children:rt==="tree"?_n&&_.jsx(pJn,{experiments:me,archiveActions:ns,showArchived:st,runs:bn,project:_n,onOpenView:Xs,onOpenCode:Ta,onArchive:gt,agentSessionId:kn==="agent"?u:null,onShowProjectScope:Gf,onRestoreRegion:ln,viewport:Ct,onViewportChange:za}):_.jsx(BGn,{archiveActions:ns,runs:bn,emptyHint:!st&&Wn.length>0&&vs.length===0?w1n():kn==="agent"&&me.length>0?y_e():void 0,experiments:vs,onOpen:(Y,_e)=>{Xs(Y.id,"overview",_e)},onOpenLogs:(Y,_e,xe)=>{Xs(Y,"terminal",xe,_e)},onOpenCode:(Y,_e)=>{const xe=me.find(ze=>ze.id===Y);xe&&Ta(xe.id,xe.branchName,"files",_e)},onArchive:gt,onCancel:OI})})]}):y==="files"?_.jsx(la,{children:_n?_.jsx(RUn,{sessionId:u??void 0,project:_n,view:Gs,toggled:Wi,onViewChange:Vs,onToggledChange:Ks,canRenameFile:Y=>{var _e;return!((_e=fr.current.get(Us(_n.id,u,{path:Y,source:"repo",sessionId:u??void 0})))!=null&&_e.needsProtection)},onOpenFile:(Y,_e,xe,ze)=>Ao(Y,_e,xe,void 0,void 0,void 0,ze)},`files:${u??`project:${_n.id}`}`):_.jsx("div",{className:"code-tab flex flex-col h-full min-h-0 wt-tab",children:_.jsx(nh,{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(D$,{size:22}),_.jsx("p",{children:Z_e()})]})})})}):er?_.jsx(la,{children:n&&_.jsx(LGn,{remote:e.kind==="ssh",restored:N.current.has(Us(n,u,er)),onRestoreActivated:()=>{const Y=Us(n,u,er);N.current.delete(Y),j.current.add(Y)},showSource:A.current[Us(n,u,er)]??!1,onShowSourceChange:Y=>{A.current[Us(n,u,er)]=Y,M(_e=>_e+1)},projectId:n,path:er.path,source:er.source,sessionId:er.source==="artifacts"?u??void 0:er.sessionId,gitRef:er.ref,line:er.line,branchLabel:vJn(er,_n==null?void 0:_n.baselineBranch),artifactVersion:op,artifactEntries:er.source==="artifacts"?qe==null?void 0:qe.entries:void 0,bufferSession:yn(Us(n,u,er)),onOpenFile:(Y,_e,xe,ze)=>Sr(er,()=>Ao(Y,_e,xe,void 0,void 0,void 0,ze)),scrollPosition:vt.current.get(Us(n,u,er)),onScrollPositionChange:Y=>{vt.current.set(Us(n,u,er),Y),Ff()},lineScrollRequest:er.lineScrollRequest,onLineScrollRequestHandled:()=>c_(er),onEdit:()=>$s(er)},Us(n,u,er))}):qn?_.jsx(la,{children:_.jsx(ly,{value:{sessionId:qn.sessionId},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:(Io==null?void 0:Io.key)===`${qn.sessionId}:${qn.promptId}`?Io.text??fo():((Dc=Hn.find(Y=>Y.promptId===qn.promptId))==null?void 0:Dc.plan)||cL(),onOpenFile:(Y,_e,xe,ze,Me)=>Sr(qn,()=>Ao(Y,qn.sessionId,ze,_e,xe,void 0,Me))})})})}):ws&&n?_.jsx(la,{children:te?_.jsx("div",{className:"flex min-h-0 flex-1",children:_.jsx(pM,{embedded:!0,projectId:n,projectName:(_n==null?void 0:_n.name)??"",railOpen:!1,onShowRail:()=>Ei(!0),mainView:"chat",onSelectMainView:Qs,onOpenFile:(Y,_e,xe,ze,Me,Xe)=>Sr(ws,()=>Ac(Y,_e,xe,ze,Me,Xe)),onOpenRun:(Y,_e)=>Sr(ws,()=>i_(Y,_e)),runExperimentName:zc,onOpenExperiment:(Y,_e)=>Sr(ws,()=>jc(Y,_e)),experimentName:Ll,onOpenPlan:(Y,_e,xe,ze)=>Sr(ws,()=>Tc(Y,_e,xe,ze)),onOpenSubagent:(Y,_e,xe,ze)=>Sr(ws,()=>Il(Y,_e,xe,ze)),runtime:e,activeSessionId:ws.sessionId,onOpenSideChat:(Y,_e)=>void $l(Y,_e),onActiveSessionChange:(Y,_e)=>{var ze;const xe=!((ze=tt.getQueryData(Gi(n).queryKey))!=null&&ze.some(Me=>Me.id===ws.sessionId));Y===null&&xe?Mo(ws):Qa(Y,_e)},preferredAgent:ae.preferredAgent,onPreferredAgentChange:ui,preferredAutonomy:ae.preferredAutonomy??U3,onPreferredAutonomyChange:Hf},ws.sessionId)}):_.jsx("div",{className:"p-6 text-sm text-muted",children:SI()})}):xs?_.jsx(gUn,{projectId:n,sessionId:xs.sessionId,spawnPartId:xs.spawnPartId,onOpenFile:(Y,_e,xe,ze,Me)=>Sr(xs,()=>Ac(Y,xs.sessionId,_e,xe,ze,Me)),onOpenRun:(Y,_e)=>Sr(xs,()=>i_(Y,_e)),runExperimentName:zc,onOpenExperiment:(Y,_e)=>Sr(xs,()=>jc(Y,_e)),experimentName:Ll,onOpenSubagent:(Y,_e,xe)=>Sr(xs,()=>Il(xs.sessionId,Y,_e,xe))},xs.spawnPartId):Se?_.jsx(la,{children:n&&_n&&Se&&or&&_.jsx(TUn,{projectId:n,project:_n,experiment:or,view:Se.view,toggled:Se.toggled,onViewChange:Y=>u_(Se,{view:Y}),onToggledChange:Y=>u_(Se,{toggled:Y}),onOpenFile:(Y,_e,xe,ze)=>Sr(Se,()=>Ao(Y,_e,xe,void 0,void 0,or.branchName,ze))},`code:${Se.branch}`)}):_.jsx(la,{children:Bs&&rn&&_n&&_.jsx(uGn,{experiment:rn,project:_n,view:Bs.view,runs:$e,selectedRunId:f,onSelectRun:q,parentExperiment:me.find(Y=>Y.id===rn.parentExperimentId)??null,onOpenView:(Y,_e,xe)=>{Sr(Bs,()=>Xs(rn.id,Y,xe,_e))},onOpenCode:(Y,_e)=>Sr(Bs,()=>Ta(rn.id,rn.branchName,Y,_e))},`${Bs.id}:${Bs.view}`)}),Pn&&Xn!==null&&Xn===Ja&&_n&&_.jsx(la,{className:y==="terminal"?void 0:"hidden",children:_.jsx(tTn,{projectId:_n.id,sessionId:u,active:y==="terminal"},Ja)})]})]}),Or&&_.jsx(oB,{remote:e.kind==="ssh",onClose:()=>li(!1),onCreated:(Y,_e)=>{li(!1),f_(Y,_e)}}),bs&&_n&&Ko(_n.id)&&_.jsx(PGn,{onClose:Ya,onCreateProject:Za})]})})}const Vk=hc()({validateSearch:e=>({pane:YS(e.pane)}),beforeLoad:({location:e})=>{if(!gf(e.pathname))throw jW()},component:kJn});function kJn(){const{projectId:e}=Vk.useParams(),{pane:n}=Vk.useSearch(),t=wi(),r=QD({select:s=>s.location});return T.useEffect(()=>{const s=SJn(r.searchStr);s!==null&&t.navigate({href:`${r.pathname}${s}${r.hash?`#${r.hash}`:""}`,replace:!0})},[r,t]),_.jsxs(_.Fragment,{children:[_.jsx(O0,{}),_.jsx(wJn,{projectId:e,pane:n,runtime:tB()},e)]})}function SJn(e){const n=new URLSearchParams(e);if(!n.has("pane"))return null;try{if(n.getAll("pane").length===1&&YS(JSON.parse(n.get("pane")??"")))return null}catch{}n.delete("pane");const t=n.toString();return t?`?${t}`:""}const XG=hc()({component:CJn});function CJn(){const{projectId:e}=XG.useParams();return _.jsx(yNn,{projectId:e})}const EJn=hc()({}),NJn=hc()({}),zJn=hc()({}),jJn=hc()({}),AJn=wNn.update({id:"/",path:"/",getParentRoute:()=>ey}),m7=kNn.update({id:"/projects",path:"/projects",getParentRoute:()=>ey}),TJn=SNn.update({id:"/remote-launch",path:"/remote-launch",getParentRoute:()=>ey}),RJn=CNn.update({id:"/",path:"/",getParentRoute:()=>m7}),ip=Vk.update({id:"/$projectId",path:"/$projectId",getParentRoute:()=>m7}),MJn=XG.update({id:"/",path:"/",getParentRoute:()=>ip}),OJn=EJn.update({id:"/skills",path:"/skills",getParentRoute:()=>ip}),DJn=NJn.update({id:"/settings/$tab",path:"/settings/$tab",getParentRoute:()=>ip}),LJn=zJn.update({id:"/tasks/$sessionId",path:"/tasks/$sessionId",getParentRoute:()=>ip}),IJn=jJn.update({id:"/tasks/new",path:"/tasks/new",getParentRoute:()=>ip}),$Jn={ProjectsProjectIdSkillsRoute:OJn,ProjectsProjectIdIndexRoute:MJn,ProjectsProjectIdSettingsTabRoute:DJn,ProjectsProjectIdTasksSessionIdRoute:LJn,ProjectsProjectIdTasksNewRoute:IJn},BJn=ip._addFileChildren($Jn),PJn={ProjectsProjectIdRoute:BJn,ProjectsIndexRoute:RJn},FJn=m7._addFileChildren(PJn),HJn={IndexRoute:AJn,ProjectsRoute:FJn,RemoteLaunchRoute:TJn},qJn=ey._addFileChildren(HJn)._addFileTypes(),UJn=YQ({routeTree:qJn,context:{queryClient:tt},trailingSlash:"never",defaultPendingComponent:$6,defaultErrorComponent:B6,defaultNotFoundComponent:vNn}),Q1={minimize:"",maximize:"",restore:"",close:""};function GJn(e){const n=new MutationObserver(e);return n.observe(document.documentElement,{attributes:!0,attributeFilter:["data-maximized"]}),()=>n.disconnect()}function YG(e){var n;(n=window.ipc)==null||n.postMessage(`titlebar:${e}`)}function X4(e){return n=>{n.button===0&&(n.preventDefault(),YG(`resize:${e}`))}}function Y4({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:()=>YG(t),children:n})}function VJn(){const e=T.useSyncExternalStore(GJn,()=>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:X4("n")}),_.jsx("div",{className:"fixed start-0 top-0 z-300 size-2 cursor-nwse-resize",onMouseDown:X4("nw")}),_.jsx("div",{className:"fixed end-0 top-0 z-300 size-2 cursor-nesw-resize",onMouseDown:X4("ne")})]}),_.jsxs("div",{className:"fixed end-0 top-0 z-300 flex",children:[_.jsx(Y4,{label:bwn(),glyph:Q1.minimize,message:"minimize",className:"hover:bg-panel"}),_.jsx(Y4,{label:e?Ewn():fwn(),glyph:e?Q1.restore:Q1.maximize,message:"zoom",className:"hover:bg-panel"}),_.jsx(Y4,{label:iwn(),glyph:Q1.close,message:"close",className:"hover:bg-accent-red hover:text-white"})]})]})}const ZG=E();document.documentElement.lang=ZG;document.documentElement.dir="ltr";UI(ZG);iW.createRoot(document.getElementById("root")).render(_.jsxs(T.StrictMode,{children:[_.jsx(yK,{client:tt,children:_.jsx(eX,{router:UJn})}),_.jsx(KCn,{}),i$&&_.jsx(VJn,{})]}));export{mc as C,It as I,yb as M,Qh as P,H$ as S,w8n as a,Cz as b,ct as c,Br as d,$Un as e,Jt as f,E as g,ii as h,Ez as i,_ as j,T as r}; diff --git a/ui/dist/index.html b/ui/dist/index.html index 8423b5660..a1e83c3d8 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 dccd36d64..a883573ad 100644 --- a/ui/messages/ar.json +++ b/ui/messages/ar.json @@ -1276,5 +1276,11 @@ "artifacts_search_searching": "جارٍ البحث…", "artifacts_search_no_results": "لا توجد ملفات مطابقة", "artifacts_search_load_more": "تحميل المزيد من النتائج", - "artifacts_search_incomplete": "تعذر البحث في بعض المجلدات. قد تكون النتائج غير مكتملة." + "artifacts_search_incomplete": "تعذر البحث في بعض المجلدات. قد تكون النتائج غير مكتملة.", + "artifacts_search_slow": "يستغرق البحث وقتًا طويلًا. قد يحتوي مجلد الملفات على ملفات كثيرة أو وحدة شبكة. هل تريد المتابعة؟", + "artifacts_search_next_budget": "المتابعة لمدة تصل إلى 15 دقيقة إضافية.", + "artifacts_search_unlimited_warning": "تزيل المتابعة الحد الزمني. إذا تعطل نظام الملفات فقد لا تنتهي العملية. يمكنك إلغاء المزيد من البحث، لكن لا يمكن مقاطعة استدعاء نظام ملفات عالق بالفعل.", + "artifacts_search_continue": "متابعة", + "artifacts_search_cancel": "إلغاء البحث", + "artifacts_search_cancelled": "تم إلغاء البحث. غيّر الاستعلام لبدء بحث جديد." } diff --git a/ui/messages/en.json b/ui/messages/en.json index ee1fb7720..4165b8034 100644 --- a/ui/messages/en.json +++ b/ui/messages/en.json @@ -1276,5 +1276,11 @@ "artifacts_search_searching": "Searching…", "artifacts_search_no_results": "No matching artifacts", "artifacts_search_load_more": "Load more results", - "artifacts_search_incomplete": "Some folders could not be searched. Results may be incomplete." + "artifacts_search_incomplete": "Some folders could not be searched. Results may be incomplete.", + "artifacts_search_slow": "Search is taking a long time. The artifacts directory may contain many files or a network mount. Continue searching?", + "artifacts_search_next_budget": "Continue for up to 15 more minutes.", + "artifacts_search_unlimited_warning": "Continuing removes the time limit. If the filesystem fails, this operation may never finish. You can still cancel further traversal, but an already blocked filesystem call cannot be interrupted.", + "artifacts_search_continue": "Continue", + "artifacts_search_cancel": "Cancel search", + "artifacts_search_cancelled": "Search cancelled. Change the query to start a new search." } diff --git a/ui/messages/es.json b/ui/messages/es.json index 189bebc70..ce90c4f87 100644 --- a/ui/messages/es.json +++ b/ui/messages/es.json @@ -1276,5 +1276,11 @@ "artifacts_search_searching": "Buscando…", "artifacts_search_no_results": "No hay artefactos coincidentes", "artifacts_search_load_more": "Cargar más resultados", - "artifacts_search_incomplete": "No se pudieron buscar algunas carpetas. Los resultados pueden estar incompletos." + "artifacts_search_incomplete": "No se pudieron buscar algunas carpetas. Los resultados pueden estar incompletos.", + "artifacts_search_slow": "La búsqueda está tardando mucho. El directorio de artefactos puede contener muchos archivos o un volumen de red. ¿Continuar?", + "artifacts_search_next_budget": "Continuar durante un máximo de 15 minutos más.", + "artifacts_search_unlimited_warning": "Continuar elimina el límite de tiempo. Si el sistema de archivos falla, la operación podría no terminar. Puedes cancelar el recorrido, pero no interrumpir una llamada al sistema de archivos ya bloqueada.", + "artifacts_search_continue": "Continuar", + "artifacts_search_cancel": "Cancelar búsqueda", + "artifacts_search_cancelled": "Búsqueda cancelada. Cambia la consulta para iniciar otra." } diff --git a/ui/messages/fa.json b/ui/messages/fa.json index a7ef79b66..599103fce 100644 --- a/ui/messages/fa.json +++ b/ui/messages/fa.json @@ -1276,5 +1276,11 @@ "artifacts_search_searching": "در حال جستجو…", "artifacts_search_no_results": "فایل منطبقی پیدا نشد", "artifacts_search_load_more": "بارگیری نتایج بیشتر", - "artifacts_search_incomplete": "جستجو در برخی پوشه‌ها ممکن نبود. نتایج ممکن است ناقص باشند." + "artifacts_search_incomplete": "جستجو در برخی پوشه‌ها ممکن نبود. نتایج ممکن است ناقص باشند.", + "artifacts_search_slow": "جستجو طولانی شده است. پوشهٔ فایل‌ها ممکن است فایل‌های زیاد یا یک درایو شبکه داشته باشد. ادامه می‌دهید؟", + "artifacts_search_next_budget": "ادامه برای حداکثر ۱۵ دقیقهٔ دیگر.", + "artifacts_search_unlimited_warning": "ادامه، محدودیت زمانی را حذف می‌کند. در صورت خرابی سیستم فایل، عملیات ممکن است هرگز تمام نشود. می‌توانید ادامهٔ پیمایش را لغو کنید، اما فراخوانی سیستم فایل که قبلاً مسدود شده قابل قطع نیست.", + "artifacts_search_continue": "ادامه", + "artifacts_search_cancel": "لغو جستجو", + "artifacts_search_cancelled": "جستجو لغو شد. برای شروع جستجوی جدید، عبارت را تغییر دهید." } diff --git a/ui/messages/hi.json b/ui/messages/hi.json index 57233ced6..f7648f061 100644 --- a/ui/messages/hi.json +++ b/ui/messages/hi.json @@ -1276,5 +1276,11 @@ "artifacts_search_searching": "खोज रहे हैं…", "artifacts_search_no_results": "कोई मेल खाता आर्टिफ़ैक्ट नहीं मिला", "artifacts_search_load_more": "और परिणाम लोड करें", - "artifacts_search_incomplete": "कुछ फ़ोल्डरों में खोज नहीं हो सकी। परिणाम अधूरे हो सकते हैं।" + "artifacts_search_incomplete": "कुछ फ़ोल्डरों में खोज नहीं हो सकी। परिणाम अधूरे हो सकते हैं।", + "artifacts_search_slow": "खोज में बहुत समय लग रहा है। आर्टिफ़ैक्ट फ़ोल्डर में बहुत सारी फ़ाइलें या नेटवर्क वॉल्यूम हो सकता है। खोज जारी रखें?", + "artifacts_search_next_budget": "अधिकतम 15 मिनट और जारी रखें।", + "artifacts_search_unlimited_warning": "जारी रखने पर समय सीमा हट जाएगी। फ़ाइल सिस्टम विफल होने पर यह प्रक्रिया कभी समाप्त नहीं हो सकती। आगे की खोज रद्द की जा सकती है, लेकिन पहले से अटकी फ़ाइल सिस्टम कॉल बाधित नहीं की जा सकती।", + "artifacts_search_continue": "जारी रखें", + "artifacts_search_cancel": "खोज रद्द करें", + "artifacts_search_cancelled": "खोज रद्द हुई। नई खोज शुरू करने के लिए क्वेरी बदलें।" } diff --git a/ui/messages/zh-CN.json b/ui/messages/zh-CN.json index 6a9b8ded5..639153cd3 100644 --- a/ui/messages/zh-CN.json +++ b/ui/messages/zh-CN.json @@ -1276,5 +1276,11 @@ "artifacts_search_searching": "正在搜索…", "artifacts_search_no_results": "没有匹配的产物", "artifacts_search_load_more": "加载更多结果", - "artifacts_search_incomplete": "部分文件夹无法搜索,结果可能不完整。" + "artifacts_search_incomplete": "部分文件夹无法搜索,结果可能不完整。", + "artifacts_search_slow": "搜索耗时较长。产物目录可能包含大量文件或网络挂载。是否继续搜索?", + "artifacts_search_next_budget": "继续搜索,最多再等待 15 分钟。", + "artifacts_search_unlimited_warning": "继续将移除时间限制。如果文件系统发生故障,操作可能永远无法完成。仍可取消后续遍历,但无法中断已阻塞的文件系统调用。", + "artifacts_search_continue": "继续", + "artifacts_search_cancel": "取消搜索", + "artifacts_search_cancelled": "搜索已取消。更改查询可开始新的搜索。" } diff --git a/ui/src/api.ts b/ui/src/api.ts index 196090dcc..d1067c8fa 100644 --- a/ui/src/api.ts +++ b/ui/src/api.ts @@ -568,8 +568,22 @@ export interface ArtifactSearch { nextCursor: string | null; incomplete: boolean; } -export const searchArtifacts = (projectId: string, q: string, after?: string, signal?: AbortSignal) => - get(`/api/projects/${projectId}/files/search?${new URLSearchParams({ q, ...(after ? { after } : {}) })}`, signal); +export interface ArtifactSearchJob { + id: string; + status: "running" | "paused" | "complete" | "cancelled" | "failed"; + stage: number; + result: ArtifactSearch | null; + error: string | null; +} +export const artifactSearchClient = (projectId: string) => { + const url = `/api/projects/${projectId}/files/search`; + return { + start: (q: string, after?: string) => fetch(url, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ q, after }) }).then(json), + status: (id: string) => get(`${url}/${id}`), + resume: (id: string) => fetch(`${url}/${id}/continue`, { method: "POST" }).then(json), + cancel: (id: string) => fetch(`${url}/${id}`, { method: "DELETE" }).then(json<{ ok: boolean }>), + }; +}; export interface LatexEngine { /** The engine that will run, or null when the machine has none. */ diff --git a/ui/src/artifactSearch.ts b/ui/src/artifactSearch.ts new file mode 100644 index 000000000..7dfee0d24 --- /dev/null +++ b/ui/src/artifactSearch.ts @@ -0,0 +1,77 @@ +import type { ArtifactSearchJob } from "./api"; + +type Client = { + start: (q: string, after?: string) => Promise; + status: (id: string) => Promise; + resume: (id: string) => Promise; + cancel: (id: string) => Promise; +}; + +/** One page's lifetime, including a start response arriving after unmount. + * No automatic retries/restarts: resume always addresses the same server job. */ +export class ArtifactSearchSession { + private job: ArtifactSearchJob | null = null; + private disposed = false; + private version = 0; + private timer: ReturnType | undefined; + constructor(private client: Client, private publish: (job: ArtifactSearchJob) => void, private fail: (error: Error) => void) {} + + async start(query: string, after?: string) { + try { + const job = await this.client.start(query, after); + this.job = job; + if (this.disposed) { void this.client.cancel(job.id).catch(() => {}); return; } + this.accept(job); + } catch (error) { this.failed(error); } + } + + private accept(job: ArtifactSearchJob) { + if (this.disposed) return; + this.job = job; + this.publish(job); + clearTimeout(this.timer); + if (job.status === "running" || job.status === "paused") { + // Paused searches still renew their lease while the panel is open. + this.timer = setTimeout(() => void this.poll(), job.status === "paused" ? 2_000 : 250); + } + } + + private async poll() { + if (!this.job || this.disposed) return; + const version = this.version; + try { + const job = await this.client.status(this.job.id); + if (version === this.version) this.accept(job); + } catch (error) { if (version === this.version) this.failed(error); } + } + + async resume() { + if (!this.job || this.disposed || this.job.status !== "paused") return; + this.version++; + clearTimeout(this.timer); + this.job = { ...this.job, status: "running" }; + this.publish(this.job); + try { this.accept(await this.client.resume(this.job.id)); } + catch (error) { this.failed(error); } + } + + cancel() { + if (this.job && !this.disposed) this.publish({ ...this.job, status: "cancelled" }); + this.dispose(); + } + + dispose() { + if (this.disposed) return; + this.disposed = true; + this.version++; + clearTimeout(this.timer); + if (this.job) void this.client.cancel(this.job.id).catch(() => {}); + } + + private failed(error: unknown) { + if (!this.disposed) { + this.fail(error instanceof Error ? error : new Error(String(error))); + this.dispose(); + } + } +} diff --git a/ui/src/components/ArtifactsTab.tsx b/ui/src/components/ArtifactsTab.tsx index b24a700e5..54ff70717 100644 --- a/ui/src/components/ArtifactsTab.tsx +++ b/ui/src/components/ArtifactsTab.tsx @@ -1,7 +1,8 @@ import { WorkspaceEmptyState } from "./WorkspaceEmptyState"; -import { useQuery, useInfiniteQuery } from "@tanstack/react-query"; +import { useQuery } from "@tanstack/react-query"; import { isCurrentScope, queryClient, workspaceScope } from "../queries/client"; -import { getArtifactFileTextQuery, getFileLocationQuery, searchArtifactsQuery } from "../queries/files"; +import { getArtifactFileTextQuery, getFileLocationQuery } from "../queries/files"; +import { useArtifactSearch } from "../useArtifactSearch"; import { m } from "../paraglide/messages.js"; import { ltr } from "../i18n"; import { getLocale } from "../paraglide/runtime.js"; @@ -34,7 +35,7 @@ import { FileTypeIcon, isMarkdownFile } from "./FileTypeIcon"; import { MediaPreview, mediaPreviewKind, type MediaPreviewKind } from "./MediaPreview"; import { MediaToolbarSlot } from "./mediaToolbar"; import { normalizeMarkdownForRendering } from "../markdownNormalization"; -import { useFileVersion } from "../useFileVersion"; +import { useFileVersion, fileVersionQuery } from "../useFileVersion"; import { mdCodeComponents, remarkMathOptions } from "./Md"; import { FileContextMenu, @@ -545,9 +546,14 @@ export function ArtifactsTab({ const timer = window.setTimeout(() => setSearchQuery(searchDraft.trim()), 250); return () => window.clearTimeout(timer); }, [searchDraft]); - const search = useInfiniteQuery({ ...searchArtifactsQuery(project.id, searchQuery), enabled: searchQuery.length > 0 }); - const hits = useMemo(() => search.data?.pages.flatMap(page => page.entries) ?? [], [search.data]); - const entries = useMemo(() => withArtifactEntries(artifacts?.entries ?? [], selectedHit ? [selectedHit] : []), [artifacts?.entries, selectedHit]); + // Changing the draft cancels the old scan immediately, before the debounce. + const search = useArtifactSearch(project.id, searchQuery === searchDraft.trim() ? searchQuery : ""); + const hits = useMemo(() => search.pages.flatMap(page => page.entries), [search.pages]); + // Share the preview's existing HEAD poll; absence from a capped tree proves nothing. + const hitVersion = useQuery({ ...fileVersionQuery(artifactUrl(project.id, selectedHit?.path ?? "")), enabled: !!selectedHit, subscribed: !!selectedHit }); + const hitMissing = hitVersion.data === "missing" && !hitVersion.isFetching; + const liveHit = hitMissing ? null : selectedHit; + const entries = useMemo(() => withArtifactEntries(artifacts?.entries ?? [], liveHit ? [liveHit] : []), [artifacts?.entries, liveHit]); const searchActive = searchDraft.trim().length > 0; // Folders are open by default — including ones that appear later — so this // tracks what the user closed instead. @@ -604,10 +610,15 @@ export function ArtifactsTab({ // Clear a selection that vanished or became a directory on disk. useEffect(() => { + if (selectedHit && hitMissing) { + if (selected === selectedHit.path) setSelected(null); + setSelectedHit(null); + return; + } if (!selected || !artifacts) return; const entry = findArtifactEntry(entries, selected); if (!entry || entry.isDir) setSelected(null); - }, [selected, artifacts, entries]); + }, [selected, artifacts, entries, selectedHit, hitMissing]); const toggle = (path: string) => setCollapsed((prev) => { @@ -701,15 +712,26 @@ export function ArtifactsTab({
{searchActive ? <> - {(searchQuery !== searchDraft.trim() || search.isPending) ? {m.artifacts_search_searching()} : <> + {(searchQuery !== searchDraft.trim() || search.pending) && {m.artifacts_search_searching()}} + {search.job?.status === "paused" &&
+

{m.artifacts_search_slow()}

+

{search.job.stage === 0 ? m.artifacts_search_next_budget() : m.artifacts_search_unlimited_warning()}

+
+ + +
+
} + {search.pending && search.job && } + {search.job?.status === "cancelled" &&

{m.artifacts_search_cancelled()}

} + <> {search.error &&

{search.error.message}

} - {!search.error && hits.length === 0 &&

{m.artifacts_search_no_results()}

} + {search.job?.status === "complete" && hits.length === 0 &&

{m.artifacts_search_no_results()}

} {hits.map(hit => )} - {search.hasNextPage && } - {search.data?.pages.some(page => page.incomplete) &&

{m.artifacts_search_incomplete()}

} - } + {search.job?.status === "complete" && search.pages.at(-1)?.nextCursor && } + {search.pages.some(page => page.incomplete) &&

{m.artifacts_search_incomplete()}

} + : entries.length ? tree(entries) : } {!searchActive && artifacts.truncated && (

{m.artifacts_tab_listing_truncated_the_folder_has_more_artifacts()}

diff --git a/ui/src/queries/files.ts b/ui/src/queries/files.ts index 02c6b43bc..44ebc7105 100644 --- a/ui/src/queries/files.ts +++ b/ui/src/queries/files.ts @@ -1,5 +1,5 @@ import { isCommit } from "./invalidation"; -import { queryOptions, infiniteQueryOptions, type FetchQueryOptions } from "@tanstack/react-query"; +import { queryOptions, type FetchQueryOptions } from "@tanstack/react-query"; import * as api from "../api"; import { workspaceKey, queryClient } from "./client"; @@ -55,14 +55,6 @@ export const getFileLocationQuery = (projectId: string, request: api.FileLocatio staleTime: 0, }); -export const searchArtifactsQuery = (projectId: string, q: string) => infiniteQueryOptions({ - queryKey: workspaceKey("searchArtifacts", projectId, q), - queryFn: ({ signal, pageParam }) => api.searchArtifacts(projectId, q, pageParam, signal), - initialPageParam: undefined as string | undefined, - getNextPageParam: page => page.nextCursor ?? undefined, - staleTime: 5_000, -}); - export const getArtifactFileTextQuery = (projectId: string, path: string) => queryOptions({ queryKey: workspaceKey("getArtifactFileText", projectId, path), queryFn: ({ signal }) => api.getArtifactFileText(projectId, path, signal), diff --git a/ui/src/useArtifactSearch.ts b/ui/src/useArtifactSearch.ts new file mode 100644 index 000000000..0aa77b07e --- /dev/null +++ b/ui/src/useArtifactSearch.ts @@ -0,0 +1,49 @@ +import { useEffect, useRef, useState, useSyncExternalStore } from "react"; +import { artifactSearchClient, type ArtifactSearch, type ArtifactSearchJob } from "./api"; +import { ArtifactSearchSession } from "./artifactSearch"; +import { getWorkspaceGeneration, subscribeWorkspace } from "./queries/client"; + +export function useArtifactSearch(projectId: string, query: string) { + const generation = useSyncExternalStore(subscribeWorkspace, getWorkspaceGeneration); + const key = JSON.stringify([projectId, query, generation]); + const [owner, setOwner] = useState(key); + const [pages, setPages] = useState([]); + const [job, setJob] = useState(null); + const [error, setError] = useState(null); + const session = useRef(null); + const load = useRef<(after?: string) => void>(() => {}); + useEffect(() => { + let alive = true; + setOwner(key); + const client = artifactSearchClient(projectId); + load.current = (after?: string) => { + if (!alive || !query) return; + session.current?.dispose(); + setJob(null); + setError(null); + const next = new ArtifactSearchSession(client, progress => { + if (!alive) return; + setJob(progress); + if (progress.status === "complete" && progress.result) { + setPages(previous => [...previous, progress.result!]); + } + if (progress.status === "failed") setError(new Error(progress.error ?? "Search failed")); + }, failure => { if (alive) setError(failure); }); + session.current = next; + void next.start(query, after); + }; + setPages([]); + setJob(null); + setError(null); + load.current(); + return () => { alive = false; session.current?.dispose(); session.current = null; }; + }, [projectId, query, generation, key]); + const current = owner === key; + return { + pages: current ? pages : [], job: current ? job : null, error: current ? error : null, + pending: !!query && (!current || (!error && (!job || job.status === "running"))), + resume: () => void session.current?.resume(), + cancel: () => session.current?.cancel(), + loadMore: () => load.current(pages.at(-1)?.nextCursor ?? undefined), + }; +} diff --git a/ui/tests/artifactSearch.test.mjs b/ui/tests/artifactSearch.test.mjs new file mode 100644 index 000000000..c0e70af7f --- /dev/null +++ b/ui/tests/artifactSearch.test.mjs @@ -0,0 +1,64 @@ +import assert from "node:assert/strict"; +import test from "node:test"; +import { readFileSync } from "node:fs"; +import ts from "typescript"; + +const code = ts.transpileModule(readFileSync(new URL("../src/artifactSearch.ts", import.meta.url), "utf8"), { + compilerOptions: { module: ts.ModuleKind.CommonJS, target: ts.ScriptTarget.ES2022 }, +}).outputText; +const exports = {}; +new Function("exports", code)(exports); +const { ArtifactSearchSession } = exports; +const job = (status, stage = 0) => ({ id: "same-search", status, stage, result: null, error: null }); +const flush = async () => { await Promise.resolve(); await Promise.resolve(); }; + +test("slow search continues the same job through both warnings without restarting", async t => { + t.mock.timers.enable({ apis: ["setTimeout"] }); + let starts = 0, stage = 0; + const resumes = [], updates = []; + const session = new ArtifactSearchSession({ + start: async () => { starts++; return job("running"); }, + status: async () => stage < 2 ? job("paused", stage) : { ...job("complete", stage), result: { entries: [], nextCursor: null, incomplete: false } }, + resume: async id => { resumes.push(id); return job("running", ++stage); }, + cancel: async () => {}, + }, update => updates.push(update), error => { throw error; }); + await session.start("report"); + t.mock.timers.tick(250); await flush(); + assert.deepEqual([updates.at(-1).status, updates.at(-1).stage], ["paused", 0]); + await session.resume(); + t.mock.timers.tick(250); await flush(); + assert.deepEqual([updates.at(-1).status, updates.at(-1).stage], ["paused", 1]); + await session.resume(); + t.mock.timers.tick(250); await flush(); + assert.equal(updates.at(-1).status, "complete"); + assert.equal(starts, 1); + assert.deepEqual(resumes, ["same-search", "same-search"]); + session.dispose(); +}); + +test("query change/unmount cancels late starts and cancellation ignores in-flight results", async t => { + t.mock.timers.enable({ apis: ["setTimeout"] }); + let resolveStart, resolveStatus; + const cancelled = [], updates = []; + const client = { + start: () => new Promise(resolve => { resolveStart = resolve; }), + status: () => new Promise(resolve => { resolveStatus = resolve; }), + resume: async () => { throw new Error("cancelled searches must not resume"); }, + cancel: async id => { cancelled.push(id); }, + }; + const abandoned = new ArtifactSearchSession(client, update => updates.push(update), error => { throw error; }); + const starting = abandoned.start("old"); + abandoned.dispose(); + resolveStart(job("running")); await starting; + assert.deepEqual(cancelled, ["same-search"]); + assert.equal(updates.length, 0); + const active = new ArtifactSearchSession({ ...client, start: async () => job("running") }, update => updates.push(update), error => { throw error; }); + await active.start("new"); + t.mock.timers.tick(250); await flush(); + active.cancel(); + resolveStatus(job("complete")); await flush(); + await active.resume(); + assert.equal(updates.at(-1).status, "cancelled"); + assert.equal(updates.some(update => update.status === "complete"), false); + assert.equal(cancelled.length, 2); +}); From edb9591e6fc32bbd705014344737db6bc255b9cc Mon Sep 17 00:00:00 2001 From: Aleksandr Rodionov Date: Sun, 4 Oct 2026 23:12:01 +0300 Subject: [PATCH 3/4] Raise initial artifact search timeout to five seconds --- src/commands/up/artifact_search.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/commands/up/artifact_search.rs b/src/commands/up/artifact_search.rs index 24f2b6db4..7d0386f5c 100644 --- a/src/commands/up/artifact_search.rs +++ b/src/commands/up/artifact_search.rs @@ -8,7 +8,7 @@ use std::time::Instant; // Background browser tabs may throttle heartbeats to once a minute. const LEASE: Duration = Duration::from_secs(5 * 60); const BUDGETS: [Option; 3] = [ - Some(Duration::from_secs(1)), + Some(Duration::from_secs(5)), Some(Duration::from_secs(15 * 60)), None, ]; @@ -225,6 +225,12 @@ mod tests { #[test] fn budgets_pause_resume_and_expire_instead_of_restarting() { let mut progress = Progress::new(); + assert_eq!( + progress.deadline.unwrap().duration_since(progress.touched), + Duration::from_secs(5) + ); + progress.tick(progress.touched + Duration::from_secs(4)); + assert_eq!(progress.status, "running"); assert!(!progress.resume()); progress.tick(progress.deadline.unwrap()); assert_eq!(progress.status, "paused"); From 725f4cd107b86bd20a2d3ad11b6d7742046f041f Mon Sep 17 00:00:00 2001 From: Aleksandr Rodionov Date: Wed, 7 Oct 2026 14:17:35 +0300 Subject: [PATCH 4/4] chore: rerun CI after Windows picker test timeout